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.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.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.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.SKELETON_SKULL && block.getType() == Material.SKELETON_WALL_SKULL) {
|
||||||
if (itemStack.getType() == Material.WITHER_SKELETON_SKULL && block.getType() == Material.WITHER_SKELETON_WALL_SKULL) return true;
|
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.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.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() == 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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -258,23 +258,23 @@ object TNTLeagueGame {
|
|||||||
fun updateFightinfo() {
|
fun updateFightinfo() {
|
||||||
NetworkSender.send(
|
NetworkSender.send(
|
||||||
FightInfoPacket(
|
FightInfoPacket(
|
||||||
plugin.server.worlds.first().name,
|
plugin.server.worlds.first().name,
|
||||||
"TNTLeague",
|
"TNTLeague",
|
||||||
"",
|
"",
|
||||||
blueTeam.name.message.colorByTeam(blueTeam),
|
blueTeam.name.message.colorByTeam(blueTeam),
|
||||||
redTeam.name.message.colorByTeam(redTeam),
|
redTeam.name.message.colorByTeam(redTeam),
|
||||||
state.lobbyName,
|
state.lobbyName,
|
||||||
TNTLeagueConfig.config.gameTime - gameTimeRemaining,
|
TNTLeagueConfig.config.gameTime - gameTimeRemaining,
|
||||||
blueTeam.leader?.let { SteamwarUser.get(it.uniqueId)!!.getId() }
|
blueTeam.leader?.let { SteamwarUser.get(it.uniqueId)!!.getId() }
|
||||||
?: 0,
|
?: 0,
|
||||||
redTeam.leader?.let { SteamwarUser.get(it.uniqueId)!!.getId() }
|
redTeam.leader?.let { SteamwarUser.get(it.uniqueId)!!.getId() }
|
||||||
?: 0,
|
?: 0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
blueTeam.members.map { SteamwarUser.get(it.uniqueId)!!.getId() },
|
blueTeam.members.map { SteamwarUser.get(it.uniqueId)!!.getId() },
|
||||||
redTeam.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.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) {
|
enum class GameState(val listener: Listener, val lobbyName: String) {
|
||||||
|
|||||||
Reference in New Issue
Block a user