Skip to content

Commit

Permalink
Update FakeOnlinePlayer.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
NichtStudioCode committed Jul 16, 2023
1 parent 4974b5d commit 8416032
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions nova/src/main/kotlin/xyz/xenondevs/nova/util/FakeOnlinePlayer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ import org.jetbrains.annotations.Contract
import xyz.xenondevs.nova.integration.permission.PermissionManager
import java.net.InetAddress
import java.net.InetSocketAddress
import java.time.Duration
import java.time.Instant
import java.util.*

/**
Expand Down Expand Up @@ -124,6 +126,14 @@ class FakeOnlinePlayer(
throw UnsupportedOperationException("Player is not online")
}

override fun ban(reason: String?, expires: Instant?, source: String?, kickPlayer: Boolean): BanEntry<PlayerProfile>? {
throw UnsupportedOperationException("Player is not online")
}

override fun ban(reason: String?, expires: Duration?, source: String?, kickPlayer: Boolean): BanEntry<PlayerProfile>? {
throw UnsupportedOperationException("Player is not online")
}

override fun getName(): String {
return offlinePlayer.name ?: "OfflinePlayer"
}
Expand Down Expand Up @@ -188,6 +198,14 @@ class FakeOnlinePlayer(
throw UnsupportedOperationException("Player is not online")
}

override fun banIp(reason: String?, expires: Instant?, source: String?, kickPlayer: Boolean): BanEntry<InetAddress>? {
throw UnsupportedOperationException("Player is not online")
}

override fun banIp(reason: String?, expires: Duration?, source: String?, kickPlayer: Boolean): BanEntry<InetAddress>? {
throw UnsupportedOperationException("Player is not online")
}

override fun chat(msg: String) {
throw UnsupportedOperationException("Player is not online")
}
Expand Down

0 comments on commit 8416032

Please sign in to comment.