forked from SteamWar/SteamWar
Format code
This commit is contained in:
+12
-4
@@ -76,13 +76,21 @@ public class AttributesCopyCommand extends SWCommand {
|
||||
if (itemStack.getType() == Material.ZOMBIE_HEAD && block.getType() == Material.ZOMBIE_WALL_HEAD) return true;
|
||||
if (itemStack.getType() == Material.CREEPER_HEAD && block.getType() == Material.CREEPER_WALL_HEAD) return true;
|
||||
if (itemStack.getType() == Material.DRAGON_HEAD && block.getType() == Material.DRAGON_WALL_HEAD) return true;
|
||||
if (itemStack.getType() == Material.SKELETON_SKULL && block.getType() == Material.SKELETON_WALL_SKULL) return true;
|
||||
if (itemStack.getType() == Material.WITHER_SKELETON_SKULL && block.getType() == Material.WITHER_SKELETON_WALL_SKULL) return true;
|
||||
if (itemStack.getType() == Material.SKELETON_SKULL && block.getType() == Material.SKELETON_WALL_SKULL) {
|
||||
return true;
|
||||
}
|
||||
if (itemStack.getType() == Material.WITHER_SKELETON_SKULL && block.getType() == Material.WITHER_SKELETON_WALL_SKULL) {
|
||||
return true;
|
||||
}
|
||||
if (itemStack.getType() == Material.TORCH && block.getType() == Material.WALL_TORCH) return true;
|
||||
if (itemStack.getType() == Material.SOUL_TORCH && block.getType() == Material.SOUL_WALL_TORCH) return true;
|
||||
if (itemStack.getType() == Material.REDSTONE_TORCH && block.getType() == Material.REDSTONE_WALL_TORCH) return true;
|
||||
if (itemStack.getType() == Material.REDSTONE_TORCH && block.getType() == Material.REDSTONE_WALL_TORCH) {
|
||||
return true;
|
||||
}
|
||||
if (itemStack.getType() == Material.WHEAT_SEEDS && block.getType() == Material.WHEAT) return true;
|
||||
if (itemStack.getType().name().contains("_BANNER") && block.getType().name().contains("_WALL_BANNER")) return true;
|
||||
if (itemStack.getType().name().contains("_BANNER") && block.getType().name().contains("_WALL_BANNER")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,23 +258,23 @@ object TNTLeagueGame {
|
||||
fun updateFightinfo() {
|
||||
NetworkSender.send(
|
||||
FightInfoPacket(
|
||||
plugin.server.worlds.first().name,
|
||||
"TNTLeague",
|
||||
"",
|
||||
blueTeam.name.message.colorByTeam(blueTeam),
|
||||
redTeam.name.message.colorByTeam(redTeam),
|
||||
state.lobbyName,
|
||||
TNTLeagueConfig.config.gameTime - gameTimeRemaining,
|
||||
blueTeam.leader?.let { SteamwarUser.get(it.uniqueId)!!.getId() }
|
||||
?: 0,
|
||||
redTeam.leader?.let { SteamwarUser.get(it.uniqueId)!!.getId() }
|
||||
?: 0,
|
||||
0,
|
||||
0,
|
||||
blueTeam.members.map { SteamwarUser.get(it.uniqueId)!!.getId() },
|
||||
redTeam.members.map { SteamwarUser.get(it.uniqueId)!!.getId() },
|
||||
plugin.server.onlinePlayers.filter { !blueTeam.members.contains(it) && !redTeam.members.contains(it) }.map { SteamwarUser.get(it.uniqueId)!!.getId() }
|
||||
))
|
||||
plugin.server.worlds.first().name,
|
||||
"TNTLeague",
|
||||
"",
|
||||
blueTeam.name.message.colorByTeam(blueTeam),
|
||||
redTeam.name.message.colorByTeam(redTeam),
|
||||
state.lobbyName,
|
||||
TNTLeagueConfig.config.gameTime - gameTimeRemaining,
|
||||
blueTeam.leader?.let { SteamwarUser.get(it.uniqueId)!!.getId() }
|
||||
?: 0,
|
||||
redTeam.leader?.let { SteamwarUser.get(it.uniqueId)!!.getId() }
|
||||
?: 0,
|
||||
0,
|
||||
0,
|
||||
blueTeam.members.map { SteamwarUser.get(it.uniqueId)!!.getId() },
|
||||
redTeam.members.map { SteamwarUser.get(it.uniqueId)!!.getId() },
|
||||
plugin.server.onlinePlayers.filter { !blueTeam.members.contains(it) && !redTeam.members.contains(it) }.map { SteamwarUser.get(it.uniqueId)!!.getId() }
|
||||
))
|
||||
}
|
||||
|
||||
enum class GameState(val listener: Listener, val lobbyName: String) {
|
||||
|
||||
Reference in New Issue
Block a user