diff --git a/FightSystem_10/pom.xml b/FightSystem_10/pom.xml new file mode 100644 index 0000000..237fc8c --- /dev/null +++ b/FightSystem_10/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + + + steamwar + FightSystem + 1.0 + + + FightSystem_10 + 1.0 + + + src + + + src + + **/*.java + **/*.kt + + + + + + + + steamwar + FightSystem_9 + 1.0 + + + steamwar + FightSystem_API + 1.0 + + + steamwar + WorldEdit + 1.0 + provided + + + steamwar + Spigot + 1.10 + provided + + + \ No newline at end of file diff --git a/FightSystem_10/src/de/steamwar/fightsystem/countdown/Countdown_10.java b/FightSystem_10/src/de/steamwar/fightsystem/countdown/Countdown_10.java new file mode 100644 index 0000000..8f1be57 --- /dev/null +++ b/FightSystem_10/src/de/steamwar/fightsystem/countdown/Countdown_10.java @@ -0,0 +1,11 @@ +package de.steamwar.fightsystem.countdown; + +import org.bukkit.Sound; + +class Countdown_10 { + private Countdown_10(){} + + static Sound getSound(SWSound sound){ + return Countdown_9.getSound(sound); + } +} diff --git a/FightSystem_10/src/de/steamwar/fightsystem/fight/FightTeam_10.java b/FightSystem_10/src/de/steamwar/fightsystem/fight/FightTeam_10.java new file mode 100644 index 0000000..d86fc97 --- /dev/null +++ b/FightSystem_10/src/de/steamwar/fightsystem/fight/FightTeam_10.java @@ -0,0 +1,26 @@ +package de.steamwar.fightsystem.fight; + +import com.sk89q.worldedit.EditSession; +import de.steamwar.sql.NoClipboardException; +import de.steamwar.sql.Schematic; +import org.bukkit.ChatColor; +import org.bukkit.DyeColor; +import org.bukkit.scoreboard.Team; + +import java.io.IOException; + +class FightTeam_10 { + private FightTeam_10(){} + + static void setTeamColor(Team team, ChatColor color) { + FightTeam_8.setTeamColor(team, color); + } + + static void replaceTeamColor(EditSession e, DyeColor c, int cornerX, int cornerY, int cornerZ){ + FightTeam_8.replaceTeamColor(e, c, cornerX, cornerY, cornerZ); + } + + static EditSession pasteSchematic(Schematic schematic, int pasteX, int pasteY, int pasteZ, boolean rotate) throws Schematic.WrongVersionException, IOException, NoClipboardException { + return FightTeam_8.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate); + } +} diff --git a/FightSystem_10/src/de/steamwar/fightsystem/listener/BasicListener_10.java b/FightSystem_10/src/de/steamwar/fightsystem/listener/BasicListener_10.java new file mode 100644 index 0000000..00e7c4a --- /dev/null +++ b/FightSystem_10/src/de/steamwar/fightsystem/listener/BasicListener_10.java @@ -0,0 +1,20 @@ +package de.steamwar.fightsystem.listener; + +import net.md_5.bungee.api.chat.BaseComponent; +import org.bukkit.entity.Player; + +class BasicListener_10 { + private BasicListener_10(){} + + static void toActionbar(Player player, BaseComponent... components){ + BasicListener_9.toActionbar(player, components); + } + + static void toChat(Player player, BaseComponent... components){ + BasicListener_9.toChat(player, components); + } + + static void setAttackSpeed(Player player){ + BasicListener_9.setAttackSpeed(player); + } +} diff --git a/FightSystem_10/src/de/steamwar/fightsystem/utils/ColorConverter_10.java b/FightSystem_10/src/de/steamwar/fightsystem/utils/ColorConverter_10.java new file mode 100644 index 0000000..0223581 --- /dev/null +++ b/FightSystem_10/src/de/steamwar/fightsystem/utils/ColorConverter_10.java @@ -0,0 +1,11 @@ +package de.steamwar.fightsystem.utils; + +import org.bukkit.DyeColor; + +class ColorConverter_10 { + private ColorConverter_10(){} + + static DyeColor getSilver(){ + return ColorConverter_8.getSilver(); + } +} diff --git a/FightSystem_10/src/de/steamwar/fightsystem/utils/TechHider_10.java b/FightSystem_10/src/de/steamwar/fightsystem/utils/TechHider_10.java new file mode 100644 index 0000000..9597762 --- /dev/null +++ b/FightSystem_10/src/de/steamwar/fightsystem/utils/TechHider_10.java @@ -0,0 +1,15 @@ +package de.steamwar.fightsystem.utils; + +import javafx.util.Pair; +import net.minecraft.server.v1_10_R1.PacketPlayOutMapChunk; +import org.bukkit.craftbukkit.v1_10_R1.CraftChunk; +import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer; +import org.bukkit.entity.Player; + +class TechHider_10 { + private TechHider_10(){} + + static void reloadChunk(Player p, Pair chunk){ + ((CraftPlayer)p).getHandle().playerConnection.sendPacket(new PacketPlayOutMapChunk(((CraftChunk)p.getWorld().getChunkAt(chunk.getKey(), chunk.getValue())).getHandle(), 65535)); + } +} diff --git a/FightSystem_10/src/de/steamwar/fightsystem/utils/WaterRemover_10.java b/FightSystem_10/src/de/steamwar/fightsystem/utils/WaterRemover_10.java new file mode 100644 index 0000000..fe3ddcc --- /dev/null +++ b/FightSystem_10/src/de/steamwar/fightsystem/utils/WaterRemover_10.java @@ -0,0 +1,11 @@ +package de.steamwar.fightsystem.utils; + +import org.bukkit.Material; + +class WaterRemover_10 { + private WaterRemover_10(){} + + static boolean isWater(Material type){ + return WaterRemover_8.isWater(type); + } +} diff --git a/FightSystem_12/pom.xml b/FightSystem_12/pom.xml index c4ab97a..337969e 100644 --- a/FightSystem_12/pom.xml +++ b/FightSystem_12/pom.xml @@ -29,7 +29,7 @@ steamwar - FightSystem_8 + FightSystem_10 1.0 @@ -37,12 +37,6 @@ FightSystem_API 1.0 - - steamwar - FAWE - 1.0 - provided - steamwar WorldEdit diff --git a/FightSystem_12/src/de/steamwar/fightsystem/countdown/Countdown_12.java b/FightSystem_12/src/de/steamwar/fightsystem/countdown/Countdown_12.java index a8c69bb..c9e0ec9 100644 --- a/FightSystem_12/src/de/steamwar/fightsystem/countdown/Countdown_12.java +++ b/FightSystem_12/src/de/steamwar/fightsystem/countdown/Countdown_12.java @@ -6,15 +6,6 @@ class Countdown_12 { private Countdown_12(){} static Sound getSound(SWSound sound){ - switch(sound){ - case ENTITY_WITHER_DEATH: - return Sound.ENTITY_WITHER_DEATH; - case BLOCK_NOTE_BASS: - return Sound.BLOCK_NOTE_BASS; - case BLOCK_NOTE_PLING: - return Sound.BLOCK_NOTE_PLING; - default: - return null; - } + return Countdown_9.getSound(sound); } } diff --git a/FightSystem_12/src/de/steamwar/fightsystem/fight/FightTeam_12.java b/FightSystem_12/src/de/steamwar/fightsystem/fight/FightTeam_12.java index 933e4fd..0e76487 100644 --- a/FightSystem_12/src/de/steamwar/fightsystem/fight/FightTeam_12.java +++ b/FightSystem_12/src/de/steamwar/fightsystem/fight/FightTeam_12.java @@ -1,6 +1,7 @@ package de.steamwar.fightsystem.fight; import com.sk89q.worldedit.EditSession; +import com.sk89q.worldedit.MaxChangedBlocksException; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.blocks.BaseBlock; import com.sk89q.worldedit.regions.CuboidRegion; @@ -16,7 +17,7 @@ import java.io.IOException; import java.util.Collections; import java.util.Set; -public class FightTeam_12 { +class FightTeam_12 { private FightTeam_12(){} @SuppressWarnings("deprecation") @@ -32,7 +33,6 @@ public class FightTeam_12 { static void setTeamColor(Team team, ChatColor color){ team.setColor(color); - team.setOption(Team.Option.NAME_TAG_VISIBILITY, Team.OptionStatus.FOR_OWN_TEAM); } @@ -41,8 +41,12 @@ public class FightTeam_12 { FightTeam_8.replaceTeamColor(e, c, cornerX, cornerY, cornerZ); Vector corner = new Vector(cornerX, cornerY, cornerZ); CuboidRegion region = new CuboidRegion(corner, corner.add(Config.SchemsizeX, Config.SchemsizeY, Config.SchemsizeZ)); - e.replaceBlocks(region, CONCRETE_SET, new BaseBlock(CONCRETE.getId(), c.getWoolData())); - e.replaceBlocks(region, CONCRETE_POWDER_SET, new BaseBlock(CONCRETE_POWDER.getId(), c.getWoolData())); + try { + e.replaceBlocks(region, CONCRETE_SET, new BaseBlock(CONCRETE.getId(), c.getWoolData())); + e.replaceBlocks(region, CONCRETE_POWDER_SET, new BaseBlock(CONCRETE_POWDER.getId(), c.getWoolData())); + } catch (MaxChangedBlocksException ex) { + //ignored + } } static EditSession pasteSchematic(Schematic schematic, int pasteX, int pasteY, int pasteZ, boolean rotate) throws Schematic.WrongVersionException, IOException, NoClipboardException { diff --git a/FightSystem_12/src/de/steamwar/fightsystem/listener/BasicListener_12.java b/FightSystem_12/src/de/steamwar/fightsystem/listener/BasicListener_12.java index 9dc603b..a6439f6 100644 --- a/FightSystem_12/src/de/steamwar/fightsystem/listener/BasicListener_12.java +++ b/FightSystem_12/src/de/steamwar/fightsystem/listener/BasicListener_12.java @@ -1,24 +1,20 @@ package de.steamwar.fightsystem.listener; -import net.md_5.bungee.api.ChatMessageType; import net.md_5.bungee.api.chat.BaseComponent; -import org.bukkit.attribute.Attribute; -import org.bukkit.attribute.AttributeInstance; import org.bukkit.entity.Player; class BasicListener_12 { private BasicListener_12(){} static void toActionbar(Player player, BaseComponent... components){ - player.spigot().sendMessage(ChatMessageType.ACTION_BAR, components); + BasicListener_9.toActionbar(player, components); } static void toChat(Player player, BaseComponent... components){ - player.spigot().sendMessage(ChatMessageType.CHAT, components); + BasicListener_9.toChat(player, components); } static void setAttackSpeed(Player player){ - AttributeInstance attribute = player.getAttribute(Attribute.GENERIC_ATTACK_SPEED); - attribute.setBaseValue(16); + BasicListener_9.setAttackSpeed(player); } } diff --git a/FightSystem_12/src/de/steamwar/fightsystem/utils/ColorConverter_12.java b/FightSystem_12/src/de/steamwar/fightsystem/utils/ColorConverter_12.java index d86d85d..e99e3fe 100644 --- a/FightSystem_12/src/de/steamwar/fightsystem/utils/ColorConverter_12.java +++ b/FightSystem_12/src/de/steamwar/fightsystem/utils/ColorConverter_12.java @@ -6,6 +6,6 @@ class ColorConverter_12 { private ColorConverter_12(){} static DyeColor getSilver(){ - return DyeColor.SILVER; + return ColorConverter_8.getSilver(); } } diff --git a/FightSystem_12/src/de/steamwar/fightsystem/utils/WaterRemover_12.java b/FightSystem_12/src/de/steamwar/fightsystem/utils/WaterRemover_12.java index 06bbd21..cefc2ba 100644 --- a/FightSystem_12/src/de/steamwar/fightsystem/utils/WaterRemover_12.java +++ b/FightSystem_12/src/de/steamwar/fightsystem/utils/WaterRemover_12.java @@ -6,6 +6,6 @@ class WaterRemover_12 { private WaterRemover_12(){} static boolean isWater(Material type){ - return type == Material.WATER || type == Material.STATIONARY_WATER; + return WaterRemover_8.isWater(type); } } diff --git a/FightSystem_14/src/de/steamwar/fightsystem/listener/BasicListener_14.java b/FightSystem_14/src/de/steamwar/fightsystem/listener/BasicListener_14.java new file mode 100644 index 0000000..4e49c6b --- /dev/null +++ b/FightSystem_14/src/de/steamwar/fightsystem/listener/BasicListener_14.java @@ -0,0 +1,20 @@ +package de.steamwar.fightsystem.listener; + +import net.md_5.bungee.api.chat.BaseComponent; +import org.bukkit.entity.Player; + +class BasicListener_14 { + private BasicListener_14(){} + + static void toActionbar(Player player, BaseComponent... components){ + BasicListener_9.toActionbar(player, components); + } + + static void toChat(Player player, BaseComponent... components){ + BasicListener_9.toChat(player, components); + } + + static void setAttackSpeed(Player player){ + BasicListener_9.setAttackSpeed(player); + } +} diff --git a/FightSystem_8/src/de/steamwar/fightsystem/fight/FightTeam_8.java b/FightSystem_8/src/de/steamwar/fightsystem/fight/FightTeam_8.java index 75ffff2..f1872c9 100644 --- a/FightSystem_8/src/de/steamwar/fightsystem/fight/FightTeam_8.java +++ b/FightSystem_8/src/de/steamwar/fightsystem/fight/FightTeam_8.java @@ -24,7 +24,6 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.HandlerList; import org.bukkit.event.Listener; import org.bukkit.event.block.BlockPhysicsEvent; -import org.bukkit.scoreboard.NameTagVisibility; import org.bukkit.scoreboard.Team; import java.io.IOException; @@ -53,7 +52,6 @@ class FightTeam_8 { static void setTeamColor(Team team, ChatColor color){ team.setPrefix("ยง" + color.getChar()); - team.setNameTagVisibility(NameTagVisibility.HIDE_FOR_OTHER_TEAMS); } @SuppressWarnings("deprecation") diff --git a/FightSystem_8/src/de/steamwar/fightsystem/utils/ColorConverter_8.java b/FightSystem_8/src/de/steamwar/fightsystem/utils/ColorConverter_8.java new file mode 100644 index 0000000..75fb01b --- /dev/null +++ b/FightSystem_8/src/de/steamwar/fightsystem/utils/ColorConverter_8.java @@ -0,0 +1,11 @@ +package de.steamwar.fightsystem.utils; + +import org.bukkit.DyeColor; + +class ColorConverter_8 { + private ColorConverter_8(){} + + static DyeColor getSilver(){ + return DyeColor.SILVER; + } +} diff --git a/FightSystem_8/src/de/steamwar/fightsystem/utils/WaterRemover_8.java b/FightSystem_8/src/de/steamwar/fightsystem/utils/WaterRemover_8.java new file mode 100644 index 0000000..e4d1c23 --- /dev/null +++ b/FightSystem_8/src/de/steamwar/fightsystem/utils/WaterRemover_8.java @@ -0,0 +1,11 @@ +package de.steamwar.fightsystem.utils; + +import org.bukkit.Material; + +public class WaterRemover_8 { + private WaterRemover_8(){} + + static boolean isWater(Material type){ + return type == Material.WATER || type == Material.STATIONARY_WATER; + } +} diff --git a/FightSystem_9/pom.xml b/FightSystem_9/pom.xml new file mode 100644 index 0000000..a17fad1 --- /dev/null +++ b/FightSystem_9/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + + + steamwar + FightSystem + 1.0 + + + FightSystem_9 + 1.0 + + + src + + + src + + **/*.java + **/*.kt + + + + + + + + steamwar + FightSystem_8 + 1.0 + + + steamwar + FightSystem_API + 1.0 + + + steamwar + WorldEdit + 1.0 + provided + + + steamwar + Spigot + 1.9 + provided + + + \ No newline at end of file diff --git a/FightSystem_9/src/de/steamwar/fightsystem/countdown/Countdown_9.java b/FightSystem_9/src/de/steamwar/fightsystem/countdown/Countdown_9.java new file mode 100644 index 0000000..ab2da8f --- /dev/null +++ b/FightSystem_9/src/de/steamwar/fightsystem/countdown/Countdown_9.java @@ -0,0 +1,20 @@ +package de.steamwar.fightsystem.countdown; + +import org.bukkit.Sound; + +class Countdown_9 { + private Countdown_9(){} + + static Sound getSound(SWSound sound){ + switch(sound){ + case ENTITY_WITHER_DEATH: + return Sound.ENTITY_WITHER_DEATH; + case BLOCK_NOTE_BASS: + return Sound.BLOCK_NOTE_BASS; + case BLOCK_NOTE_PLING: + return Sound.BLOCK_NOTE_PLING; + default: + return null; + } + } +} diff --git a/FightSystem_9/src/de/steamwar/fightsystem/fight/FightTeam_9.java b/FightSystem_9/src/de/steamwar/fightsystem/fight/FightTeam_9.java new file mode 100644 index 0000000..1d38af3 --- /dev/null +++ b/FightSystem_9/src/de/steamwar/fightsystem/fight/FightTeam_9.java @@ -0,0 +1,26 @@ +package de.steamwar.fightsystem.fight; + +import com.sk89q.worldedit.EditSession; +import de.steamwar.sql.NoClipboardException; +import de.steamwar.sql.Schematic; +import org.bukkit.ChatColor; +import org.bukkit.DyeColor; +import org.bukkit.scoreboard.Team; + +import java.io.IOException; + +class FightTeam_9 { + private FightTeam_9(){} + + static void setTeamColor(Team team, ChatColor color){ + FightTeam_8.setTeamColor(team, color); + } + + static void replaceTeamColor(EditSession e, DyeColor c, int cornerX, int cornerY, int cornerZ){ + FightTeam_8.replaceTeamColor(e, c, cornerX, cornerY, cornerZ); + } + + static EditSession pasteSchematic(Schematic schematic, int pasteX, int pasteY, int pasteZ, boolean rotate) throws Schematic.WrongVersionException, IOException, NoClipboardException { + return FightTeam_8.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate); + } +} diff --git a/FightSystem_9/src/de/steamwar/fightsystem/listener/BasicListener_9.java b/FightSystem_9/src/de/steamwar/fightsystem/listener/BasicListener_9.java new file mode 100644 index 0000000..574724b --- /dev/null +++ b/FightSystem_9/src/de/steamwar/fightsystem/listener/BasicListener_9.java @@ -0,0 +1,24 @@ +package de.steamwar.fightsystem.listener; + +import net.md_5.bungee.api.ChatMessageType; +import net.md_5.bungee.api.chat.BaseComponent; +import org.bukkit.attribute.Attribute; +import org.bukkit.attribute.AttributeInstance; +import org.bukkit.entity.Player; + +class BasicListener_9 { + private BasicListener_9(){} + + static void toActionbar(Player player, BaseComponent... components){ + player.spigot().sendMessage(ChatMessageType.ACTION_BAR, components); + } + + static void toChat(Player player, BaseComponent... components){ + player.spigot().sendMessage(ChatMessageType.CHAT, components); + } + + static void setAttackSpeed(Player player){ + AttributeInstance attribute = player.getAttribute(Attribute.GENERIC_ATTACK_SPEED); + attribute.setBaseValue(16); + } +} diff --git a/FightSystem_9/src/de/steamwar/fightsystem/utils/ColorConverter_9.java b/FightSystem_9/src/de/steamwar/fightsystem/utils/ColorConverter_9.java new file mode 100644 index 0000000..d04b2e3 --- /dev/null +++ b/FightSystem_9/src/de/steamwar/fightsystem/utils/ColorConverter_9.java @@ -0,0 +1,11 @@ +package de.steamwar.fightsystem.utils; + +import org.bukkit.DyeColor; + +class ColorConverter_9 { + private ColorConverter_9(){} + + static DyeColor getSilver(){ + return ColorConverter_8.getSilver(); + } +} diff --git a/FightSystem_9/src/de/steamwar/fightsystem/utils/TechHider_9.java b/FightSystem_9/src/de/steamwar/fightsystem/utils/TechHider_9.java new file mode 100644 index 0000000..9ce621e --- /dev/null +++ b/FightSystem_9/src/de/steamwar/fightsystem/utils/TechHider_9.java @@ -0,0 +1,15 @@ +package de.steamwar.fightsystem.utils; + +import javafx.util.Pair; +import net.minecraft.server.v1_9_R2.PacketPlayOutMapChunk; +import org.bukkit.craftbukkit.v1_9_R2.CraftChunk; +import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer; +import org.bukkit.entity.Player; + +class TechHider_9 { + private TechHider_9(){} + + static void reloadChunk(Player p, Pair chunk){ + ((CraftPlayer)p).getHandle().playerConnection.sendPacket(new PacketPlayOutMapChunk(((CraftChunk)p.getWorld().getChunkAt(chunk.getKey(), chunk.getValue())).getHandle(), 65535)); + } +} diff --git a/FightSystem_9/src/de/steamwar/fightsystem/utils/WaterRemover_9.java b/FightSystem_9/src/de/steamwar/fightsystem/utils/WaterRemover_9.java new file mode 100644 index 0000000..3243269 --- /dev/null +++ b/FightSystem_9/src/de/steamwar/fightsystem/utils/WaterRemover_9.java @@ -0,0 +1,11 @@ +package de.steamwar.fightsystem.utils; + +import org.bukkit.Material; + +class WaterRemover_9 { + private WaterRemover_9(){} + + static boolean isWater(Material type){ + return WaterRemover_8.isWater(type); + } +} diff --git a/FightSystem_Main/pom.xml b/FightSystem_Main/pom.xml index 0b8092b..5143bd0 100644 --- a/FightSystem_Main/pom.xml +++ b/FightSystem_Main/pom.xml @@ -46,7 +46,7 @@ steamwar Spigot - 1.14 + 1.15 provided diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/countdown/Countdown.java b/FightSystem_Main/src/de/steamwar/fightsystem/countdown/Countdown.java index d501ba2..aeec8cc 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/countdown/Countdown.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/countdown/Countdown.java @@ -41,10 +41,14 @@ public abstract class Countdown { return null; switch (Core.getVersion()){ - case 8: - return Countdown_8.getSound(sound); case 14: return Countdown_14.getSound(sound); + case 10: + return Countdown_10.getSound(sound); + case 9: + return Countdown_9.getSound(sound); + case 8: + return Countdown_8.getSound(sound); default: return Countdown_12.getSound(sound); } diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/fight/FightTeam.java b/FightSystem_Main/src/de/steamwar/fightsystem/fight/FightTeam.java index 4c3d00a..e20b9bf 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/fight/FightTeam.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/fight/FightTeam.java @@ -18,6 +18,7 @@ import org.bukkit.block.Block; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; +import org.bukkit.scoreboard.NameTagVisibility; import org.bukkit.scoreboard.Team; import java.io.IOException; @@ -69,18 +70,27 @@ public class FightTeam implements IFightTeam{ team = FightScoreboard.getScoreboard().registerNewTeam(name); else team = FightScoreboard.getScoreboard().getTeam(name); + assert team != null; setTeamColor(team, color); + //noinspection deprecation + team.setNameTagVisibility(NameTagVisibility.HIDE_FOR_OTHER_TEAMS); team.setAllowFriendlyFire(false); } private void setTeamColor(Team team, ChatColor color){ switch(Core.getVersion()){ - case 8: - FightTeam_8.setTeamColor(team, color); - break; case 14: FightTeam_14.setTeamColor(team, color); break; + case 10: + FightTeam_10.setTeamColor(team, color); + break; + case 9: + FightTeam_9.setTeamColor(team, color); + break; + case 8: + FightTeam_8.setTeamColor(team, color); + break; default: FightTeam_12.setTeamColor(team, color); } @@ -232,12 +242,18 @@ public class FightTeam implements IFightTeam{ EditSession e; try { switch(Core.getVersion()){ - case 8: - e = FightTeam_8.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate); - break; case 14: e = FightTeam_14.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate); break; + case 10: + e = FightTeam_10.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate); + break; + case 9: + e = FightTeam_9.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate); + break; + case 8: + e = FightTeam_8.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate); + break; default: e = FightTeam_12.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate); } @@ -256,12 +272,18 @@ public class FightTeam implements IFightTeam{ DyeColor c = ColorConverter.chat2dye(color); switch(Core.getVersion()){ - case 8: - FightTeam_8.replaceTeamColor(e, c, cornerX, cornerY, cornerZ); - break; case 14: FightTeam_14.replaceTeamColor(e, c, cornerX, cornerY, cornerZ); break; + case 10: + FightTeam_10.replaceTeamColor(e, c, cornerX, cornerY, cornerZ); + break; + case 9: + FightTeam_9.replaceTeamColor(e, c, cornerX, cornerY, cornerZ); + break; + case 8: + FightTeam_8.replaceTeamColor(e, c, cornerX, cornerY, cornerZ); + break; default: FightTeam_12.replaceTeamColor(e, c, cornerX, cornerY, cornerZ); } diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/listener/BasicListener.java b/FightSystem_Main/src/de/steamwar/fightsystem/listener/BasicListener.java index 163b7f0..1a5a629 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/listener/BasicListener.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/listener/BasicListener.java @@ -47,6 +47,15 @@ public abstract class BasicListener implements Listener { public static void toActionbar(Player player, BaseComponent... components){ switch(Core.getVersion()){ + case 14: + BasicListener_14.toActionbar(player, components); + break; + case 10: + BasicListener_10.toActionbar(player, components); + break; + case 9: + BasicListener_9.toActionbar(player, components); + break; case 8: BasicListener_8.toActionbar(player, components); break; @@ -55,17 +64,17 @@ public abstract class BasicListener implements Listener { } } - void setAttackSpeed(Player player){ - switch(Core.getVersion()){ - case 8: - break; - default: - BasicListener_12.setAttackSpeed(player); - } - } - public static void toChat(Player player, BaseComponent... components){ switch(Core.getVersion()){ + case 14: + BasicListener_14.toChat(player, components); + break; + case 10: + BasicListener_10.toChat(player, components); + break; + case 9: + BasicListener_9.toChat(player, components); + break; case 8: BasicListener_8.toChat(player, components); break; @@ -73,4 +82,22 @@ public abstract class BasicListener implements Listener { BasicListener_12.toChat(player, components); } } + + void setAttackSpeed(Player player){ + switch(Core.getVersion()){ + case 14: + BasicListener_14.setAttackSpeed(player); + break; + case 10: + BasicListener_10.setAttackSpeed(player); + break; + case 9: + BasicListener_9.setAttackSpeed(player); + break; + case 8: + break; + default: + BasicListener_12.setAttackSpeed(player); + } + } } diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/utils/ColorConverter.java b/FightSystem_Main/src/de/steamwar/fightsystem/utils/ColorConverter.java index 890e751..6e19655 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/utils/ColorConverter.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/utils/ColorConverter.java @@ -34,6 +34,15 @@ public class ColorConverter { case 14: chat2dye.put(ChatColor.GRAY, ColorConverter_14.getSilver()); break; + case 10: + chat2dye.put(ChatColor.GRAY, ColorConverter_10.getSilver()); + break; + case 9: + chat2dye.put(ChatColor.GRAY, ColorConverter_9.getSilver()); + break; + case 8: + chat2dye.put(ChatColor.GRAY, ColorConverter_8.getSilver()); + break; default: chat2dye.put(ChatColor.GRAY, ColorConverter_12.getSilver()); } diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/utils/TechHider.java b/FightSystem_Main/src/de/steamwar/fightsystem/utils/TechHider.java index 32ae288..c506929 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/utils/TechHider.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/utils/TechHider.java @@ -68,11 +68,13 @@ public class TechHider { blockHider(); multiBlockHider(); switch(Core.getVersion()){ - case 8: - break; case 14: TechHider_14.start(); break; + case 10: + case 9: + case 8: + break; default: TechHider_12.start(); } @@ -189,12 +191,18 @@ public class TechHider { private static void reloadChunk(Player p, Pair chunk){ switch(Core.getVersion()){ - case 8: - TechHider_8.reloadChunk(p, chunk); - break; case 14: TechHider_14.reloadChunk(p, chunk); break; + case 10: + TechHider_10.reloadChunk(p, chunk); + break; + case 9: + TechHider_9.reloadChunk(p, chunk); + break; + case 8: + TechHider_8.reloadChunk(p, chunk); + break; default: TechHider_12.reloadChunk(p, chunk); } diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/utils/WaterRemover.java b/FightSystem_Main/src/de/steamwar/fightsystem/utils/WaterRemover.java index 6f20077..9976036 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/utils/WaterRemover.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/utils/WaterRemover.java @@ -96,6 +96,12 @@ public class WaterRemover { switch(Core.getVersion()){ case 14: return WaterRemover_14.isWater(type); + case 10: + return WaterRemover_10.isWater(type); + case 9: + return WaterRemover_9.isWater(type); + case 8: + return WaterRemover_8.isWater(type); default: return WaterRemover_12.isWater(type); } diff --git a/pom.xml b/pom.xml index 2046376..8e2deb5 100644 --- a/pom.xml +++ b/pom.xml @@ -38,6 +38,8 @@ FightSystem_API FightSystem_8 + FightSystem_9 + FightSystem_10 FightSystem_12 FightSystem_14 FightSystem_Main