feat: updated game systems
This commit is contained in:
parent
80de826345
commit
fab70cee5c
19 changed files with 220 additions and 101 deletions
|
@ -5,6 +5,7 @@ import org.bukkit.ChatColor
|
|||
import org.bukkit.GameMode
|
||||
import org.bukkit.Material
|
||||
import org.bukkit.inventory.ItemStack
|
||||
import xyz.atnrch.dragon.GameState
|
||||
import xyz.atnrch.dragon.RunnerDragon
|
||||
import xyz.atnrch.dragon.teams.Team
|
||||
import xyz.haoshoku.nick.api.NickAPI
|
||||
|
@ -14,6 +15,15 @@ import java.util.*
|
|||
class DragonPlayer(uuid: UUID) {
|
||||
val player = Bukkit.getPlayer(uuid)!!
|
||||
|
||||
fun instantiatePlayer() {
|
||||
if (RunnerDragon.STATE == GameState.WAITING) {
|
||||
RunnerDragon.instance.worldManager.teleportAtSpawn(player)
|
||||
updateHeaderFooter()
|
||||
impulse101()
|
||||
setTeam(Team.DEFAULT_TEAM)
|
||||
}
|
||||
}
|
||||
|
||||
fun updateHeaderFooter() {
|
||||
player.playerListHeader = """
|
||||
${RunnerDragon.TITLE}
|
||||
|
@ -30,7 +40,7 @@ class DragonPlayer(uuid: UUID) {
|
|||
}
|
||||
|
||||
fun sendMessage(message: String) {
|
||||
player.sendMessage("${ChatColor.WHITE}[${RunnerDragon.TITLE}${ChatColor.WHITE}] ${ChatColor.RESET}$message")
|
||||
player.sendMessage("${RunnerDragon.TITLE_MSG} ${ChatColor.RESET}$message")
|
||||
}
|
||||
|
||||
fun getTeam(): Team? {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue