diff --git a/src/de/warking/lobby/LobbySystem.java b/src/de/steamwar/lobby/LobbySystem.java similarity index 76% rename from src/de/warking/lobby/LobbySystem.java rename to src/de/steamwar/lobby/LobbySystem.java index 991a9f8..b4d5c6f 100644 --- a/src/de/warking/lobby/LobbySystem.java +++ b/src/de/steamwar/lobby/LobbySystem.java @@ -1,13 +1,11 @@ -package de.warking.lobby; +package de.steamwar.lobby; -import de.warking.lobby.command.buildCommand; -import de.warking.lobby.command.checkCommand; -import de.warking.lobby.command.setLocation; -import de.warking.lobby.gadgets.GadgetManager; -import de.warking.lobby.listener.*; -import de.warking.lobby.manager.BackendManager; -import de.warking.lobby.manager.FileManager; -import de.warking.lobby.manager.LocationManager; +import de.steamwar.lobby.command.buildCommand; +import de.steamwar.lobby.gadgets.GadgetManager; +import de.steamwar.lobby.listener.*; +import de.steamwar.lobby.manager.BackendManager; +import de.steamwar.lobby.manager.FileManager; +import de.steamwar.lobby.manager.LocationManager; import org.bukkit.Bukkit; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; @@ -31,12 +29,10 @@ public class LobbySystem extends JavaPlugin { public void onEnable() { locationManager = new LocationManager(); - fileManager = new de.warking.lobby.manager.FileManager(instance); + fileManager = new FileManager(instance); loadBackend(); prefix = backendManager.prefix; - - this.getCommand("setlocation").setExecutor(new setLocation()); - this.getCommand("check").setExecutor(new checkCommand()); + this.getCommand("build").setExecutor(new buildCommand()); init(); diff --git a/src/de/warking/lobby/command/buildCommand.java b/src/de/steamwar/lobby/command/buildCommand.java similarity index 80% rename from src/de/warking/lobby/command/buildCommand.java rename to src/de/steamwar/lobby/command/buildCommand.java index 37b4b6b..bad4b11 100644 --- a/src/de/warking/lobby/command/buildCommand.java +++ b/src/de/steamwar/lobby/command/buildCommand.java @@ -1,9 +1,8 @@ -package de.warking.lobby.command; +package de.steamwar.lobby.command; -import de.warking.lobby.LobbySystem; -import de.warking.lobby.inventorys.LobbyInventorys; -import de.warking.lobby.manager.BackendManager; -import de.warking.lobby.manager.FileManager; +import de.steamwar.lobby.LobbySystem; +import de.steamwar.lobby.inventorys.LobbyInventorys; +import de.steamwar.lobby.manager.BackendManager; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -34,7 +33,7 @@ public class buildCommand implements CommandExecutor { } } else - player.sendMessage(LobbySystem.prefix + "§cDu darfst das nicht!"); + player.sendMessage(LobbySystem.prefix + "�cDu darfst das nicht!"); return false; } } diff --git a/src/de/warking/lobby/gadgets/Gadget.java b/src/de/steamwar/lobby/gadgets/Gadget.java similarity index 69% rename from src/de/warking/lobby/gadgets/Gadget.java rename to src/de/steamwar/lobby/gadgets/Gadget.java index b0b00d1..e064a78 100644 --- a/src/de/warking/lobby/gadgets/Gadget.java +++ b/src/de/steamwar/lobby/gadgets/Gadget.java @@ -1,4 +1,4 @@ -package de.warking.lobby.gadgets; +package de.steamwar.lobby.gadgets; public enum Gadget { diff --git a/src/de/warking/lobby/gadgets/GadgetManager.java b/src/de/steamwar/lobby/gadgets/GadgetManager.java similarity index 63% rename from src/de/warking/lobby/gadgets/GadgetManager.java rename to src/de/steamwar/lobby/gadgets/GadgetManager.java index 27c9ef2..55adeac 100644 --- a/src/de/warking/lobby/gadgets/GadgetManager.java +++ b/src/de/steamwar/lobby/gadgets/GadgetManager.java @@ -1,16 +1,14 @@ -package de.warking.lobby.gadgets; +package de.steamwar.lobby.gadgets; import org.bukkit.entity.Player; import java.util.HashMap; +import java.util.Map; public class GadgetManager { - public HashMap playerGadgets = new HashMap<>(); - public HashMap playerGadgetCooldown = new HashMap<>(); - - public GadgetManager() { - } + public Map playerGadgets = new HashMap<>(); + public Map playerGadgetCooldown = new HashMap<>(); public Gadget getPlayerGadget(Player player) { return playerGadgets.get(player); @@ -25,10 +23,7 @@ public class GadgetManager { } public boolean hasPlayerGadget(Player player) { - if(playerGadgets.containsKey(player)) { - return true; - } else - return false; + return playerGadgets.containsKey(player); } public void setPlayerGadgetCooldown(Player player, Gadget gadget) { @@ -40,10 +35,7 @@ public class GadgetManager { } public boolean hasPlayerGadgetCooldown(Player player) { - if(playerGadgetCooldown.containsKey(player)) { - return true; - } else - return false; + return playerGadgetCooldown.containsKey(player); } diff --git a/src/de/warking/lobby/inventorys/ExtrasInventorys.java b/src/de/steamwar/lobby/inventorys/ExtrasInventorys.java similarity index 81% rename from src/de/warking/lobby/inventorys/ExtrasInventorys.java rename to src/de/steamwar/lobby/inventorys/ExtrasInventorys.java index 8c3d81f..fb2dda1 100644 --- a/src/de/warking/lobby/inventorys/ExtrasInventorys.java +++ b/src/de/steamwar/lobby/inventorys/ExtrasInventorys.java @@ -1,6 +1,6 @@ -package de.warking.lobby.inventorys; +package de.steamwar.lobby.inventorys; -import de.warking.lobby.utils.ItemBuilder; +import de.steamwar.lobby.utils.ItemBuilder; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.inventory.Inventory; @@ -9,16 +9,16 @@ public class ExtrasInventorys { public static Inventory getGadgets() { - Inventory inv = Bukkit.createInventory(null, 45, "§8» §aGadgets §8«"); + Inventory inv = Bukkit.createInventory(null, 45, "§aGadgets"); for(int i = 0; i < inv.getSize(); i++) { inv.setItem(i, new ItemBuilder(Material.STAINED_GLASS_PANE, (short)15).setDisplayName(" ").build()); } - inv.setItem(0, new ItemBuilder(Material.ENDER_PEARL).setDisplayName("§dEnder Perle").removeAllAtributs().build()); - inv.setItem(1, new ItemBuilder(Material.ELYTRA).setDisplayName("§cJetpack").removeAllAtributs().build()); - inv.setItem(2, new ItemBuilder(Material.FISHING_ROD).setDisplayName("§eGreifhaken").removeAllAtributs().build()); - //inv.setItem(3, new ItemBuilder(Material.getMaterial(417)).setDisplayName("§cTNT Kanone").addEnchantment(Enchantment.DURABILITY, 1).removeAllAtributs().build()); + inv.setItem(0, new ItemBuilder(Material.ENDER_PEARL).setDisplayName("§dEnder Perle").removeAllAtributs().build()); + inv.setItem(1, new ItemBuilder(Material.ELYTRA).setDisplayName("§cJetpack").removeAllAtributs().build()); + inv.setItem(2, new ItemBuilder(Material.FISHING_ROD).setDisplayName("§eGreifhaken").removeAllAtributs().build()); + //inv.setItem(3, new ItemBuilder(Material.getMaterial(417)).setDisplayName("�cTNT Kanone").addEnchantment(Enchantment.DURABILITY, 1).removeAllAtributs().build()); return inv; } @@ -26,17 +26,17 @@ public class ExtrasInventorys { public static Inventory getArmorInventory() { - Inventory inv = Bukkit.createInventory(null, 45, "§8» §9Rüstung §8«"); + Inventory inv = Bukkit.createInventory(null, 45, "§8Rüstung"); for(int i = 0; i < inv.getSize(); i++) { inv.setItem(i, new ItemBuilder(Material.STAINED_GLASS_PANE, (short)15).setDisplayName(" ").build()); } - inv.setItem(0, new ItemBuilder(Material.WOOD_HOE).setDisplayName("§0LEDER").removeAllAtributs().build()); - inv.setItem(2, new ItemBuilder(Material.STONE_SPADE).setDisplayName("§8KETTE").removeAllAtributs().build()); - inv.setItem(4, new ItemBuilder(Material.IRON_PICKAXE).setDisplayName("§7IRON").removeAllAtributs().build()); - inv.setItem(6, new ItemBuilder(Material.GOLD_AXE).setDisplayName("§eGOLD").removeAllAtributs().build()); - inv.setItem(8, new ItemBuilder(Material.DIAMOND_SWORD).setDisplayName("§bDIAMANT").removeAllAtributs().build()); + inv.setItem(0, new ItemBuilder(Material.WOOD_HOE).setDisplayName("§0LEDER").removeAllAtributs().build()); + inv.setItem(2, new ItemBuilder(Material.STONE_SPADE).setDisplayName("§8KETTE").removeAllAtributs().build()); + inv.setItem(4, new ItemBuilder(Material.IRON_PICKAXE).setDisplayName("§7IRON").removeAllAtributs().build()); + inv.setItem(6, new ItemBuilder(Material.GOLD_AXE).setDisplayName("§eGOLD").removeAllAtributs().build()); + inv.setItem(8, new ItemBuilder(Material.DIAMOND_SWORD).setDisplayName("§bDIAMANT").removeAllAtributs().build()); inv.setItem(9, new ItemBuilder(Material.LEATHER_HELMET).setDisplayName(" ").removeAllAtributs().build()); @@ -70,7 +70,7 @@ public class ExtrasInventorys { public static Inventory getPartikel() { - Inventory inv = Bukkit.createInventory(null, 45, "§8» §dPartikel §8«"); + Inventory inv = Bukkit.createInventory(null, 45, "§dPartikel"); for(int i = 0; i < inv.getSize(); i++) { inv.setItem(i, new ItemBuilder(Material.STAINED_GLASS_PANE, (short)15).setDisplayName(" ").build()); @@ -84,7 +84,7 @@ public class ExtrasInventorys { public static Inventory getPets() { - Inventory inv = Bukkit.createInventory(null, 45, "§8» §ePets §8«"); + Inventory inv = Bukkit.createInventory(null, 45, "�8� �ePets �8�"); for(int i = 0; i < inv.getSize(); i++) { inv.setItem(i, new ItemBuilder(Material.STAINED_GLASS_PANE, (short)15).setDisplayName(" ").build()); diff --git a/src/de/warking/lobby/inventorys/LobbyInventorys.java b/src/de/steamwar/lobby/inventorys/LobbyInventorys.java similarity index 54% rename from src/de/warking/lobby/inventorys/LobbyInventorys.java rename to src/de/steamwar/lobby/inventorys/LobbyInventorys.java index 8b1ec62..1834568 100644 --- a/src/de/warking/lobby/inventorys/LobbyInventorys.java +++ b/src/de/steamwar/lobby/inventorys/LobbyInventorys.java @@ -1,12 +1,10 @@ -package de.warking.lobby.inventorys; +package de.steamwar.lobby.inventorys; -import de.warking.lobby.LobbySystem; -import de.warking.lobby.manager.BackendManager; -import de.warking.lobby.manager.FileManager; -import de.warking.lobby.utils.ItemBuilder; +import de.steamwar.lobby.LobbySystem; +import de.steamwar.lobby.manager.FileManager; +import de.steamwar.lobby.utils.ItemBuilder; import org.bukkit.Bukkit; import org.bukkit.Material; -import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryType; import org.bukkit.inventory.Inventory; @@ -22,48 +20,48 @@ public class LobbyInventorys { FileManager fm = LobbySystem.getInstance().getFileManager(); - inv.setItem(fm.getIntegerFromConfig("Items.Lobby.Navigator.Slot")-1, new ItemBuilder(Material.valueOf(fm.getStringFromConfig("Items.Lobby.Navigator.ID"))).setDisplayName(fm.getStringFromConfig("Items.Lobby.Navigator.Display").replaceAll("&", "§")).removeAllAtributs().build()); - inv.setItem(fm.getIntegerFromConfig("Items.Lobby.Extras.Slot")-1, new ItemBuilder(Material.valueOf(fm.getStringFromConfig("Items.Lobby.Extras.ID"))).setDisplayName(fm.getStringFromConfig("Items.Lobby.Extras.Display").replaceAll("&", "§")).removeAllAtributs().build()); - //inv.setItem(fm.getIntegerFromConfig("Items.Lobby.Lobby-Switcher.Slot")-1, new ItemBuilder(Material.valueOf(fm.getStringFromConfig("Items.Lobby.Lobby-Switcher.ID"))).setDisplayName(fm.getStringFromConfig("Items.Lobby.Lobby-Switcher.Display").replaceAll("&", "§")).removeAllAtributs().build()); - inv.setItem(fm.getIntegerFromConfig("Items.Lobby.Hider.Slot")-1, new ItemBuilder(Material.valueOf(fm.getStringFromConfig("Items.Lobby.Hider.ID"))).setDisplayName(fm.getStringFromConfig("Items.Lobby.Hider.Display").replaceAll("&", "§")).removeAllAtributs().build()); + //inv.setItem(fm.getIntegerFromConfig("Items.Lobby.Navigator.Slot")-1, new ItemBuilder(Material.valueOf(fm.getStringFromConfig("Items.Lobby.Navigator.ID"))).setDisplayName(fm.getStringFromConfig("Items.Lobby.Navigator.Display").replaceAll("&", "�")).removeAllAtributs().build()); + //inv.setItem(fm.getIntegerFromConfig("Items.Lobby.Extras.Slot")-1, new ItemBuilder(Material.valueOf(fm.getStringFromConfig("Items.Lobby.Extras.ID"))).setDisplayName(fm.getStringFromConfig("Items.Lobby.Extras.Display").replaceAll("&", "§")).removeAllAtributs().build()); + //inv.setItem(fm.getIntegerFromConfig("Items.Lobby.Lobby-Switcher.Slot")-1, new ItemBuilder(Material.valueOf(fm.getStringFromConfig("Items.Lobby.Lobby-Switcher.ID"))).setDisplayName(fm.getStringFromConfig("Items.Lobby.Lobby-Switcher.Display").replaceAll("&", "�")).removeAllAtributs().build()); + //inv.setItem(fm.getIntegerFromConfig("Items.Lobby.Hider.Slot")-1, new ItemBuilder(Material.valueOf(fm.getStringFromConfig("Items.Lobby.Hider.ID"))).setDisplayName(fm.getStringFromConfig("Items.Lobby.Hider.Display").replaceAll("&", "§")).removeAllAtributs().build()); } public static Inventory getNavigatorInventory() { - String name = LobbySystem.getInstance().getFileManager().getStringFromConfig("Items.Lobby.Navigator.Display").replaceAll("&", "§").split(" ")[0]; + String name = LobbySystem.getInstance().getFileManager().getStringFromConfig("Items.Lobby.Navigator.Display").replaceAll("&", "�").split(" ")[0]; Inventory inv = Bukkit.createInventory(null, 45, name); for(int i = 0; i < inv.getSize(); i++) { inv.setItem(i, new ItemBuilder(Material.STAINED_GLASS_PANE, (short)15).setDisplayName(" ").build()); } - inv.setItem(22, new ItemBuilder(Material.MAGMA_CREAM).setDisplayName("§8» §6Spawn §8«").removeAllAtributs().build()); - //inv.setItem(2, new ItemBuilder(Material.ELYTRA).setDisplayName("§8» §3AirShip §8«").removeAllAtributs().build()); - //inv.setItem(6, new ItemBuilder(Material.CHEST).setDisplayName("§8» §aMiniGames §8«").removeAllAtributs().build()); - //inv.setItem(19, new ItemBuilder(Material.TNT).setDisplayName("§8» §9WarGear §8«").removeAllAtributs().build()); - //inv.setItem(25, new ItemBuilder(Material.WOOD_SWORD).setDisplayName("§8» §2Survival §8«").removeAllAtributs().build()); - //inv.setItem(38, new ItemBuilder(Material.EXPLOSIVE_MINECART).setDisplayName("§8» §bMini WarGear §8«").removeAllAtributs().build()); - //inv.setItem(40, new ItemBuilder(Material.GOLD_NUGGET).setDisplayName("§8» §eTägliche Belohnung §8«").removeAllAtributs().build()); - //inv.setItem(42, new ItemBuilder(Material.BOWL).setDisplayName("§8» §dBattleBox §8«").removeAllAtributs().build()); + //inv.setItem(22, new ItemBuilder(Material.MAGMA_CREAM).setDisplayName("�8� �6Spawn �8�").removeAllAtributs().build()); + //inv.setItem(2, new ItemBuilder(Material.ELYTRA).setDisplayName("�8� �3AirShip �8�").removeAllAtributs().build()); + //inv.setItem(6, new ItemBuilder(Material.CHEST).setDisplayName("�8� �aMiniGames �8�").removeAllAtributs().build()); + //inv.setItem(19, new ItemBuilder(Material.TNT).setDisplayName("�8� �9WarGear �8�").removeAllAtributs().build()); + //inv.setItem(25, new ItemBuilder(Material.WOOD_SWORD).setDisplayName("�8� �2Survival �8�").removeAllAtributs().build()); + //inv.setItem(38, new ItemBuilder(Material.EXPLOSIVE_MINECART).setDisplayName("�8� �bMini WarGear �8�").removeAllAtributs().build()); + //inv.setItem(40, new ItemBuilder(Material.GOLD_NUGGET).setDisplayName("�8� �eT�gliche Belohnung �8�").removeAllAtributs().build()); + //inv.setItem(42, new ItemBuilder(Material.BOWL).setDisplayName("�8� �dBattleBox �8�").removeAllAtributs().build()); return inv; } public static Inventory ExtrasInventory() { - String name = LobbySystem.getInstance().getFileManager().getStringFromConfig("Items.Lobby.Extras.Display").replaceAll("&", "§").split(" ")[0]; + String name = LobbySystem.getInstance().getFileManager().getStringFromConfig("Items.Lobby.Extras.Display").replaceAll("&", "�").split(" ")[0]; Inventory inv = Bukkit.createInventory(null, 45, name); for(int i = 0; i < inv.getSize(); i++) { inv.setItem(i, new ItemBuilder(Material.STAINED_GLASS_PANE, (short)15).setDisplayName(" ").build()); } - inv.setItem(0, new ItemBuilder(Material.IRON_CHESTPLATE).setDisplayName("§8» §9Rüstung §8«").removeAllAtributs().build()); + inv.setItem(0, new ItemBuilder(Material.IRON_CHESTPLATE).setDisplayName("§9Rüstung").removeAllAtributs().build()); - inv.setItem(9, new ItemBuilder(Material.PISTON_BASE).setDisplayName("§8» §aGadgets §8«").build()); + inv.setItem(9, new ItemBuilder(Material.PISTON_BASE).setDisplayName("§aGadgets").build()); - inv.setItem(18, new ItemBuilder(Material.NETHER_STAR).setDisplayName("§8» §dPartikel §8«").build()); + inv.setItem(18, new ItemBuilder(Material.NETHER_STAR).setDisplayName("§dPartikel").build()); - inv.setItem(27, new ItemBuilder(Material.BONE).setDisplayName("§8» §ePets §8«").build()); + inv.setItem(27, new ItemBuilder(Material.BONE).setDisplayName("§ePets").build()); return inv; @@ -71,18 +69,18 @@ public class LobbyInventorys { public static Inventory PlayerHideInventory(Player player) { - String name = "§9Spieler Verstecken"; + String name = "§9Spieler Verstecken"; Inventory inv = Bukkit.createInventory(null, InventoryType.BREWING, name); - inv.setItem(0, new ItemBuilder(Material.INK_SACK, (short)10).setDisplayName("§8» §aAlle Spieler §8«").removeAllAtributs().build()); - inv.setItem(1, new ItemBuilder(Material.INK_SACK, (short)5).setDisplayName("§8» §5YouTuber/ Teammitglieder §8«").removeAllAtributs().build()); - inv.setItem(2, new ItemBuilder(Material.INK_SACK, (short)8).setDisplayName("§8» §7Keine Spieler §8«").removeAllAtributs().build()); + inv.setItem(0, new ItemBuilder(Material.INK_SACK, (short)10).setDisplayName("§aAlle Spieler").removeAllAtributs().build()); + inv.setItem(1, new ItemBuilder(Material.INK_SACK, (short)5).setDisplayName("§5YouTuber/ Teammitglieder").removeAllAtributs().build()); + inv.setItem(2, new ItemBuilder(Material.INK_SACK, (short)8).setDisplayName("§7Keine Spieler").removeAllAtributs().build()); - //if(BackendManager.hideAll.contains(player)) inv.setItem(3, new ItemBuilder(Material.INK_SACK, (short)8).setDisplayName("§8» §7Keine Spieler §8«").removeAllAtributs().build()); - //if(BackendManager.hideUsers.contains(player)) inv.setItem(3, new ItemBuilder(Material.INK_SACK, (short)5).setDisplayName("§7Aktuell §8» §5YouTuber/ Teammitglieder §8«").addEnchantment(Enchantment.DURABILITY, 1).removeAllAtributs().build()); - //if(!(BackendManager.hideAll.contains(player) && BackendManager.hideUsers.contains(player))) inv.setItem(3, new ItemBuilder(Material.INK_SACK, (short)10).setDisplayName("§7Aktuell §8» §aAlle Spieler").addEnchantment(Enchantment.DURABILITY, 1).removeAllAtributs().build()); + //if(BackendManager.hideAll.contains(player)) inv.setItem(3, new ItemBuilder(Material.INK_SACK, (short)8).setDisplayName("�8� �7Keine Spieler �8�").removeAllAtributs().build()); + //if(BackendManager.hideUsers.contains(player)) inv.setItem(3, new ItemBuilder(Material.INK_SACK, (short)5).setDisplayName("�7Aktuell �8� �5YouTuber/ Teammitglieder �8�").addEnchantment(Enchantment.DURABILITY, 1).removeAllAtributs().build()); + //if(!(BackendManager.hideAll.contains(player) && BackendManager.hideUsers.contains(player))) inv.setItem(3, new ItemBuilder(Material.INK_SACK, (short)10).setDisplayName("�7Aktuell �8� �aAlle Spieler").addEnchantment(Enchantment.DURABILITY, 1).removeAllAtributs().build()); - inv.setItem(4, new ItemBuilder(Material.TNT).setDisplayName("§8» §cSilentLobby §8«").removeAllAtributs().build()); + inv.setItem(4, new ItemBuilder(Material.TNT).setDisplayName("§cSilentLobby").removeAllAtributs().build()); return inv; diff --git a/src/de/warking/lobby/listener/BlockListener.java b/src/de/steamwar/lobby/listener/BlockListener.java similarity index 93% rename from src/de/warking/lobby/listener/BlockListener.java rename to src/de/steamwar/lobby/listener/BlockListener.java index 147cc36..804ba67 100644 --- a/src/de/warking/lobby/listener/BlockListener.java +++ b/src/de/steamwar/lobby/listener/BlockListener.java @@ -1,6 +1,6 @@ -package de.warking.lobby.listener; +package de.steamwar.lobby.listener; -import de.warking.lobby.manager.BackendManager; +import de.steamwar.lobby.manager.BackendManager; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; diff --git a/src/de/warking/lobby/listener/EntityDamageByEntityEvent.java b/src/de/steamwar/lobby/listener/EntityDamageByEntityEvent.java similarity index 93% rename from src/de/warking/lobby/listener/EntityDamageByEntityEvent.java rename to src/de/steamwar/lobby/listener/EntityDamageByEntityEvent.java index 7aef1cd..69b0563 100644 --- a/src/de/warking/lobby/listener/EntityDamageByEntityEvent.java +++ b/src/de/steamwar/lobby/listener/EntityDamageByEntityEvent.java @@ -1,7 +1,7 @@ -package de.warking.lobby.listener; +package de.steamwar.lobby.listener; -import de.warking.lobby.gadgets.Gadget; -import de.warking.lobby.LobbySystem; +import de.steamwar.lobby.LobbySystem; +import de.steamwar.lobby.gadgets.Gadget; import net.minecraft.server.v1_12_R1.PacketPlayOutExplosion; import net.minecraft.server.v1_12_R1.Vec3D; import org.bukkit.Bukkit; diff --git a/src/de/warking/lobby/listener/FishEvent.java b/src/de/steamwar/lobby/listener/FishEvent.java similarity index 94% rename from src/de/warking/lobby/listener/FishEvent.java rename to src/de/steamwar/lobby/listener/FishEvent.java index 768cc95..5d86b5d 100644 --- a/src/de/warking/lobby/listener/FishEvent.java +++ b/src/de/steamwar/lobby/listener/FishEvent.java @@ -1,7 +1,7 @@ -package de.warking.lobby.listener; +package de.steamwar.lobby.listener; -import de.warking.lobby.gadgets.Gadget; -import de.warking.lobby.LobbySystem; +import de.steamwar.lobby.LobbySystem; +import de.steamwar.lobby.gadgets.Gadget; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; diff --git a/src/de/warking/lobby/listener/JoinEvent.java b/src/de/steamwar/lobby/listener/JoinEvent.java similarity index 85% rename from src/de/warking/lobby/listener/JoinEvent.java rename to src/de/steamwar/lobby/listener/JoinEvent.java index 582df3c..92aec07 100644 --- a/src/de/warking/lobby/listener/JoinEvent.java +++ b/src/de/steamwar/lobby/listener/JoinEvent.java @@ -1,17 +1,16 @@ -package de.warking.lobby.listener; +package de.steamwar.lobby.listener; +import de.steamwar.lobby.LobbySystem; +import de.steamwar.lobby.manager.BackendManager; +import de.steamwar.lobby.manager.FileManager; import de.warking.hunjy.Core; -import de.warking.lobby.inventorys.LobbyInventorys; +import de.steamwar.lobby.inventorys.LobbyInventorys; import org.bukkit.GameMode; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; -import de.warking.lobby.LobbySystem; -import de.warking.lobby.manager.BackendManager; -import de.warking.lobby.manager.FileManager; - public class JoinEvent implements Listener { public BackendManager backend = LobbySystem.getInstance().getBackendManager(); diff --git a/src/de/warking/lobby/listener/LobbyInteractListener.java b/src/de/steamwar/lobby/listener/LobbyInteractListener.java similarity index 79% rename from src/de/warking/lobby/listener/LobbyInteractListener.java rename to src/de/steamwar/lobby/listener/LobbyInteractListener.java index 964e62b..99a1127 100644 --- a/src/de/warking/lobby/listener/LobbyInteractListener.java +++ b/src/de/steamwar/lobby/listener/LobbyInteractListener.java @@ -1,7 +1,10 @@ -package de.warking.lobby.listener; +package de.steamwar.lobby.listener; -import de.warking.lobby.gadgets.Gadget; -import de.warking.lobby.inventorys.LobbyInventorys; +import de.steamwar.lobby.LobbySystem; +import de.steamwar.lobby.gadgets.Gadget; +import de.steamwar.lobby.manager.FileManager; +import de.steamwar.lobby.utils.ItemBuilder; +import de.steamwar.lobby.inventorys.LobbyInventorys; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.Sound; @@ -12,14 +15,10 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerInteractEvent; -import de.warking.lobby.LobbySystem; -import de.warking.lobby.manager.FileManager; -import de.warking.lobby.utils.ItemBuilder; - public class LobbyInteractListener implements Listener { - // »« + // �� public FileManager fm = LobbySystem.getInstance().getFileManager(); @@ -36,9 +35,9 @@ public class LobbyInteractListener implements Listener { }else if(event.getItem().getType() == Material.valueOf(fm.getStringFromConfig("Items.Lobby.Extras.ID"))) { player.openInventory(LobbyInventorys.ExtrasInventory()); event.setCancelled(true); - } else if(event.getItem().getType() == Material.ELYTRA && event.getItem().getItemMeta().getDisplayName().equalsIgnoreCase("§cJetpack")) { + } else if(event.getItem().getType() == Material.ELYTRA && event.getItem().getItemMeta().getDisplayName().equalsIgnoreCase("§cJetpack")) { event.setCancelled(true); - } else if(event.getItem().getType() ==Material.getMaterial(417) && event.getItem().getItemMeta().getDisplayName().equalsIgnoreCase("§cTNT Kanone")) { + } else if(event.getItem().getType() ==Material.getMaterial(417) && event.getItem().getItemMeta().getDisplayName().equalsIgnoreCase("§cTNT Kanone")) { shootTNTCanon(player); } } else @@ -56,19 +55,19 @@ public class LobbyInteractListener implements Listener { snowball.setShooter(player); player.getWorld().playSound(player.getLocation(), Sound.ENTITY_IRONGOLEM_ATTACK, 1, 1); addCooldown(player, Gadget.TNT_CANNON); - player.getInventory().setItem(5, new ItemBuilder(Material.INK_SACK, (short)8).setDisplayName("§6Warten...").removeAllAtributs().build()); + player.getInventory().setItem(5, new ItemBuilder(Material.INK_SACK, (short)8).setDisplayName("§6Warten...").removeAllAtributs().build()); player.getItemInHand().getItemMeta().setUnbreakable(true); } } - private void addCooldown(Player player, Gadget gadget) { + private void addCooldown(final Player player, Gadget gadget) { LobbySystem.getInstance().getGadgetManager().setPlayerGadgetCooldown(player, gadget); Bukkit.getScheduler().scheduleSyncDelayedTask(LobbySystem.getInstance(), new Runnable() { @Override public void run() { LobbySystem.getInstance().getGadgetManager().removePlayerGadgetCooldown(player); - if(LobbySystem.getInstance().getGadgetManager().getPlayerGadget(player) == Gadget.TNT_CANNON) player.getInventory().setItem(5, new ItemBuilder(Material.getMaterial(417)).setDisplayName("§cTNT Kanone").addEnchantment(Enchantment.DURABILITY, 1).removeAllAtributs().build()); + if(LobbySystem.getInstance().getGadgetManager().getPlayerGadget(player) == Gadget.TNT_CANNON) player.getInventory().setItem(5, new ItemBuilder(Material.getMaterial(417)).setDisplayName("§cTNT Kanone").addEnchantment(Enchantment.DURABILITY, 1).removeAllAtributs().build()); } }, 20*10); } diff --git a/src/de/warking/lobby/listener/LobbyInvClickManager.java b/src/de/steamwar/lobby/listener/LobbyInvClickManager.java similarity index 84% rename from src/de/warking/lobby/listener/LobbyInvClickManager.java rename to src/de/steamwar/lobby/listener/LobbyInvClickManager.java index 2f5ff06..0b18496 100644 --- a/src/de/warking/lobby/listener/LobbyInvClickManager.java +++ b/src/de/steamwar/lobby/listener/LobbyInvClickManager.java @@ -1,13 +1,14 @@ -package de.warking.lobby.listener; +package de.steamwar.lobby.listener; import java.util.ArrayList; +import de.steamwar.lobby.LobbySystem; +import de.steamwar.lobby.gadgets.Gadget; +import de.steamwar.lobby.manager.BackendManager; +import de.steamwar.lobby.manager.FileManager; +import de.steamwar.lobby.utils.ItemBuilder; import de.warking.hunjy.Core; -import de.warking.lobby.gadgets.Gadget; -import de.warking.lobby.inventorys.ExtrasInventorys; -import de.warking.lobby.manager.BackendManager; -import de.warking.lobby.manager.FileManager; -import de.warking.lobby.utils.ItemBuilder; +import de.steamwar.lobby.inventorys.ExtrasInventorys; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.Sound; @@ -17,7 +18,6 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryClickEvent; -import de.warking.lobby.LobbySystem; import org.bukkit.event.inventory.InventoryType; public class LobbyInvClickManager implements Listener{ @@ -104,57 +104,54 @@ public class LobbyInvClickManager implements Listener{ //navigator - String navigatorName = fm.getStringFromConfig("Items.Lobby.Navigator.Display").replaceAll("&", "§"); + String navigatorName = fm.getStringFromConfig("Items.Lobby.Navigator.Display").replaceAll("&", "§"); if(event.getClickedInventory().getType() == InventoryType.CHEST && event.getClickedInventory().getName().equals(navigatorName)) { switch (materialName) { - case "§8» §6Spawn §8«": + case "§6Spawn": player.teleport(LobbySystem.getInstance().getLocationManager().loadLocation("main.lobby")); break; - case "§8» §3AirShip §8«": + case "§3AirShip": player.teleport(LobbySystem.getInstance().getLocationManager().loadLocation("navigation.airship")); break; - case "§8» §aMiniGames §8«": + case "§aMiniGames": player.teleport(LobbySystem.getInstance().getLocationManager().loadLocation("navigation.minigame")); break; - case "§8» §9WarGear §8«": + case "§9WarGear": player.teleport(LobbySystem.getInstance().getLocationManager().loadLocation("navigation.wargear")); break; - case "§8» §2Survival §8«": + case "§2Survival": player.teleport(LobbySystem.getInstance().getLocationManager().loadLocation("navigation.survival")); break; - case "§8» §bMini WarGear §8«": + case "§bMini WarGear": player.teleport(LobbySystem.getInstance().getLocationManager().loadLocation("navigation.miniwargear")); break; - case "§8» §eTägliche Belohnung §8«": + case "§eTägliche Belohnung": player.teleport(LobbySystem.getInstance().getLocationManager().loadLocation("navigation.tb")); break; - case "§8» §dBattleBox §8«": - player.teleport(LobbySystem.getInstance().getLocationManager().loadLocation("navigation.battlebox")); - break; } return; } //hide players - String hiderName = fm.getStringFromConfig("Items.Lobby.Hider.Display").replaceAll("&", "§"); + String hiderName = fm.getStringFromConfig("Items.Lobby.Hider.Display").replaceAll("&", "§"); if (event.getClickedInventory().getType() == InventoryType.BREWING && event.getClickedInventory().getName().equals(hiderName)) { switch (materialName) { - case "§8» §aAlle Spieler §8«": + case "§aAlle Spieler": for (Player allPlayers : Bukkit.getServer().getOnlinePlayers()) { player.showPlayer(allPlayers); } if(BackendManager.hideUsers.contains(player)) BackendManager.hideUsers.remove(player); if(BackendManager.hideAll.contains(player)) BackendManager.hideAll.remove(player); - //event.getInventory().setItem(3, new ItemBuilder(Material.INK_SACK, (short)10).setDisplayName("§7Aktuell §8» §aAlle Spieler").addEnchantment(Enchantment.DURABILITY, 1).removeAllAtributs().build()); + //event.getInventory().setItem(3, new ItemBuilder(Material.INK_SACK, (short)10).setDisplayName("§7Aktuell §8§ §aAlle Spieler").addEnchantment(Enchantment.DURABILITY, 1).removeAllAtributs().build()); break; - case "§8» §5YouTuber/ Teammitglieder §8«": + case "§5YouTuber/ Teammitglieder": for (Player allPlayers : Bukkit.getServer().getOnlinePlayers()) { if (Core.getInstance().getPlayerManager(allPlayers).getGroupName().equalsIgnoreCase("member")) { player.hidePlayer(allPlayers); @@ -163,17 +160,17 @@ public class LobbyInvClickManager implements Listener{ } if(BackendManager.hideAll.contains(player)) BackendManager.hideAll.remove(player); if(!BackendManager.hideUsers.contains(player)) BackendManager.hideUsers.add(player); - //event.getInventory().setItem(3, new ItemBuilder(Material.INK_SACK, (short)5).setDisplayName("§7Aktuell §8» §5YouTuber/ Teammitglieder §8«").addEnchantment(Enchantment.DURABILITY, 1).removeAllAtributs().build()); + //event.getInventory().setItem(3, new ItemBuilder(Material.INK_SACK, (short)5).setDisplayName("§7Aktuell §8§ §5YouTuber/ Teammitglieder §8§").addEnchantment(Enchantment.DURABILITY, 1).removeAllAtributs().build()); break; - case "§8» §7Keine Spieler §8«": + case "§7Keine Spieler": for (Player allPlayers : Bukkit.getServer().getOnlinePlayers()) { player.hidePlayer(allPlayers); } if(!BackendManager.hideAll.contains(player)) BackendManager.hideAll.add(player); if(BackendManager.hideUsers.contains(player)) BackendManager.hideUsers.remove(player); - //event.getInventory().setItem(3, new ItemBuilder(Material.INK_SACK, (short)8).setDisplayName("§7Aktuell §8» §7Keine Spieler §8«").addEnchantment(Enchantment.DURABILITY, 1).removeAllAtributs().build()); + //event.getInventory().setItem(3, new ItemBuilder(Material.INK_SACK, (short)8).setDisplayName("§7Aktuell §8§ §7Keine Spieler §8§").addEnchantment(Enchantment.DURABILITY, 1).removeAllAtributs().build()); break; - case "§8» §cSilentLobby §8«": + case "§cSilentLobby": //change server break; } @@ -181,55 +178,55 @@ public class LobbyInvClickManager implements Listener{ } //Extras - String extrasName = fm.getStringFromConfig("Items.Lobby.Extras.Display").replaceAll("&", "§").split(" ")[0]; + String extrasName = fm.getStringFromConfig("Items.Lobby.Extras.Display").replaceAll("&", "§").split(" ")[0]; if (event.getClickedInventory().getType() == InventoryType.CHEST && event.getClickedInventory().getName().equals(extrasName)) { switch (materialName) { - case "§8» §9Rüstung §8«": + case "§9Rüstung": player.openInventory(ExtrasInventorys.getArmorInventory()); break; - case "§8» §aGadgets §8«": + case "§aGadgets": player.openInventory(ExtrasInventorys.getGadgets()); break; - case "§8» §dPartikel §8«": + case "§dPartikel": player.openInventory(ExtrasInventorys.getPartikel()); break; - case "§8» §ePets §8«": + case "§ePets": player.openInventory(ExtrasInventorys.getPets()); break; } return; } - if(event.getClickedInventory().getType() == InventoryType.CHEST && event.getClickedInventory().getName().equals("§8» §9Rüstung §8«")) { + if(event.getClickedInventory().getType() == InventoryType.CHEST && event.getClickedInventory().getName().equals("§9Rüstung")) { switch (materialName) { - case "§0LEDER": + case "§0LEDER": player.getInventory().setHelmet(new ItemBuilder(Material.LEATHER_HELMET).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); player.getInventory().setChestplate(new ItemBuilder(Material.LEATHER_CHESTPLATE).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); player.getInventory().setLeggings(new ItemBuilder(Material.LEATHER_LEGGINGS).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); player.getInventory().setBoots(new ItemBuilder(Material.LEATHER_BOOTS).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); break; - case "§8KETTE": + case "§8KETTE": player.getInventory().setHelmet(new ItemBuilder(Material.CHAINMAIL_HELMET).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); player.getInventory().setChestplate(new ItemBuilder(Material.CHAINMAIL_CHESTPLATE).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); player.getInventory().setLeggings(new ItemBuilder(Material.CHAINMAIL_LEGGINGS).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); player.getInventory().setBoots(new ItemBuilder(Material.CHAINMAIL_BOOTS).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); break; - case "§7IRON": + case "§7IRON": player.getInventory().setHelmet(new ItemBuilder(Material.IRON_HELMET).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); player.getInventory().setChestplate(new ItemBuilder(Material.IRON_CHESTPLATE).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); player.getInventory().setLeggings(new ItemBuilder(Material.IRON_LEGGINGS).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); player.getInventory().setBoots(new ItemBuilder(Material.IRON_BOOTS).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); break; - case "§eGOLD": + case "§eGOLD": player.getInventory().setHelmet(new ItemBuilder(Material.GOLD_HELMET).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); player.getInventory().setChestplate(new ItemBuilder(Material.GOLD_CHESTPLATE).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); player.getInventory().setLeggings(new ItemBuilder(Material.GOLD_LEGGINGS).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); player.getInventory().setBoots(new ItemBuilder(Material.GOLD_BOOTS).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); break; - case "§bDIAMANT": + case "§bDIAMANT": player.getInventory().setHelmet(new ItemBuilder(Material.DIAMOND_HELMET).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); player.getInventory().setChestplate(new ItemBuilder(Material.DIAMOND_CHESTPLATE).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); player.getInventory().setLeggings(new ItemBuilder(Material.DIAMOND_LEGGINGS).setDisplayName(" ").setUnbreakable(true).removeAllAtributs().build()); @@ -240,33 +237,33 @@ public class LobbyInvClickManager implements Listener{ } //Gadgets - if(event.getClickedInventory().getType() == InventoryType.CHEST && event.getClickedInventory().getName().equals("§8» §aGadgets §8«")) { + if(event.getClickedInventory().getType() == InventoryType.CHEST && event.getClickedInventory().getName().equals("§8§ §aGadgets §8§")) { switch (materialName) { - case "§dEnder Perle": - player.getInventory().setItem(5, new ItemBuilder(Material.ENDER_PEARL).setDisplayName("§dEnder Perle").removeAllAtributs().build()); + case "§dEnder Perle": + player.getInventory().setItem(5, new ItemBuilder(Material.ENDER_PEARL).setDisplayName("§dEnder Perle").removeAllAtributs().build()); if(LobbySystem.getInstance().getGadgetManager().hasPlayerGadget(player)) LobbySystem.getInstance().getGadgetManager().removePlayerGadget(player); LobbySystem.getInstance().getGadgetManager().setPlayerGadget(player, Gadget.ENDER_PEARL); player.playSound(player.getLocation(), Sound.BLOCK_ANVIL_USE, 1, 100); player.updateInventory(); break; - case "§cJetpack": - player.getInventory().setItem(5, new ItemBuilder(Material.ELYTRA).setDisplayName("§cJetpack").setUnbreakable(true).removeAllAtributs().build()); + case "§cJetpack": + player.getInventory().setItem(5, new ItemBuilder(Material.ELYTRA).setDisplayName("§cJetpack").setUnbreakable(true).removeAllAtributs().build()); if(LobbySystem.getInstance().getGadgetManager().hasPlayerGadget(player)) LobbySystem.getInstance().getGadgetManager().removePlayerGadget(player); LobbySystem.getInstance().getGadgetManager().setPlayerGadget(player, Gadget.JETPACK); player.playSound(player.getLocation(), Sound.BLOCK_ANVIL_USE, 1, 100); player.updateInventory(); break; - case "§eGreifhaken": - player.getInventory().setItem(5, new ItemBuilder(Material.FISHING_ROD).setDisplayName("§eGreifhaken").setUnbreakable(true).removeAllAtributs().build()); + case "§eGreifhaken": + player.getInventory().setItem(5, new ItemBuilder(Material.FISHING_ROD).setDisplayName("§eGreifhaken").setUnbreakable(true).removeAllAtributs().build()); if(LobbySystem.getInstance().getGadgetManager().hasPlayerGadget(player)) LobbySystem.getInstance().getGadgetManager().removePlayerGadget(player); LobbySystem.getInstance().getGadgetManager().setPlayerGadget(player, Gadget.HOOK); player.playSound(player.getLocation(), Sound.BLOCK_ANVIL_USE, 1, 100); player.updateInventory(); break; - case "§cTNT Kanone": - player.getInventory().setItem(5, new ItemBuilder(Material.getMaterial(417)).setDisplayName("§cTNT Kanone").setUnbreakable(true).addEnchantment(Enchantment.DURABILITY, 1).removeAllAtributs().build()); + case "§cTNT Kanone": + player.getInventory().setItem(5, new ItemBuilder(Material.getMaterial(417)).setDisplayName("§cTNT Kanone").setUnbreakable(true).addEnchantment(Enchantment.DURABILITY, 1).removeAllAtributs().build()); if(LobbySystem.getInstance().getGadgetManager().hasPlayerGadget(player)) LobbySystem.getInstance().getGadgetManager().removePlayerGadget(player); LobbySystem.getInstance().getGadgetManager().setPlayerGadget(player, Gadget.TNT_CANNON); player.playSound(player.getLocation(), Sound.BLOCK_ANVIL_USE, 1, 100); diff --git a/src/de/warking/lobby/listener/PlayerKickEvent.java b/src/de/steamwar/lobby/listener/PlayerKickEvent.java similarity index 84% rename from src/de/warking/lobby/listener/PlayerKickEvent.java rename to src/de/steamwar/lobby/listener/PlayerKickEvent.java index bbdca0d..3a67ac7 100644 --- a/src/de/warking/lobby/listener/PlayerKickEvent.java +++ b/src/de/steamwar/lobby/listener/PlayerKickEvent.java @@ -1,8 +1,8 @@ -package de.warking.lobby.listener; +package de.steamwar.lobby.listener; -import de.warking.lobby.gadgets.Gadget; -import de.warking.lobby.LobbySystem; -import de.warking.lobby.manager.BackendManager; +import de.steamwar.lobby.LobbySystem; +import de.steamwar.lobby.gadgets.Gadget; +import de.steamwar.lobby.manager.BackendManager; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; diff --git a/src/de/warking/lobby/listener/PlayerMoveListener.java b/src/de/steamwar/lobby/listener/PlayerMoveListener.java similarity index 95% rename from src/de/warking/lobby/listener/PlayerMoveListener.java rename to src/de/steamwar/lobby/listener/PlayerMoveListener.java index 89801a2..2a8ad86 100644 --- a/src/de/warking/lobby/listener/PlayerMoveListener.java +++ b/src/de/steamwar/lobby/listener/PlayerMoveListener.java @@ -1,6 +1,6 @@ -package de.warking.lobby.listener; +package de.steamwar.lobby.listener; -import de.warking.lobby.LobbySystem; +import de.steamwar.lobby.LobbySystem; import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; diff --git a/src/de/warking/lobby/listener/PlayerQuitListener.java b/src/de/steamwar/lobby/listener/PlayerQuitListener.java similarity index 89% rename from src/de/warking/lobby/listener/PlayerQuitListener.java rename to src/de/steamwar/lobby/listener/PlayerQuitListener.java index c8f6912..4604046 100644 --- a/src/de/warking/lobby/listener/PlayerQuitListener.java +++ b/src/de/steamwar/lobby/listener/PlayerQuitListener.java @@ -1,4 +1,4 @@ -package de.warking.lobby.listener; +package de.steamwar.lobby.listener; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; diff --git a/src/de/warking/lobby/listener/ProjectileLaunchEvent.java b/src/de/steamwar/lobby/listener/ProjectileLaunchEvent.java similarity index 84% rename from src/de/warking/lobby/listener/ProjectileLaunchEvent.java rename to src/de/steamwar/lobby/listener/ProjectileLaunchEvent.java index f90b87e..4433cb5 100644 --- a/src/de/warking/lobby/listener/ProjectileLaunchEvent.java +++ b/src/de/steamwar/lobby/listener/ProjectileLaunchEvent.java @@ -1,8 +1,8 @@ -package de.warking.lobby.listener; +package de.steamwar.lobby.listener; -import de.warking.lobby.gadgets.Gadget; -import de.warking.lobby.LobbySystem; -import de.warking.lobby.utils.ItemBuilder; +import de.steamwar.lobby.LobbySystem; +import de.steamwar.lobby.gadgets.Gadget; +import de.steamwar.lobby.utils.ItemBuilder; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.entity.EnderPearl; @@ -31,7 +31,7 @@ public class ProjectileLaunchEvent implements Listener { Bukkit.getScheduler().scheduleSyncDelayedTask(LobbySystem.getInstance(), new Runnable() { @Override public void run() { - player.getInventory().setItem(5, new ItemBuilder(Material.INK_SACK, (short)8).setDisplayName("§6Warten...").removeAllAtributs().build()); + player.getInventory().setItem(5, new ItemBuilder(Material.INK_SACK, (short)8).setDisplayName("�6Warten...").removeAllAtributs().build()); } }, 5L); player.updateInventory(); @@ -42,7 +42,7 @@ public class ProjectileLaunchEvent implements Listener { public void run() { LobbySystem.getInstance().getGadgetManager().removePlayerGadgetCooldown(player); if(!LobbySystem.getInstance().getGadgetManager().getPlayerGadget(player).equals(Gadget.ENDER_PEARL)) return; - player.getInventory().setItem(5, new ItemBuilder(Material.ENDER_PEARL).setDisplayName("§dEnder Perle").removeAllAtributs().build()); + player.getInventory().setItem(5, new ItemBuilder(Material.ENDER_PEARL).setDisplayName("�dEnder Perle").removeAllAtributs().build()); } }, 20*10); diff --git a/src/de/warking/lobby/listener/QuitEvent.java b/src/de/steamwar/lobby/listener/QuitEvent.java similarity index 87% rename from src/de/warking/lobby/listener/QuitEvent.java rename to src/de/steamwar/lobby/listener/QuitEvent.java index cb8eae4..0a26cac 100644 --- a/src/de/warking/lobby/listener/QuitEvent.java +++ b/src/de/steamwar/lobby/listener/QuitEvent.java @@ -1,6 +1,6 @@ -package de.warking.lobby.listener; +package de.steamwar.lobby.listener; -import de.warking.lobby.manager.BackendManager; +import de.steamwar.lobby.manager.BackendManager; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; diff --git a/src/de/warking/lobby/listener/SneakListener.java b/src/de/steamwar/lobby/listener/SneakListener.java similarity index 80% rename from src/de/warking/lobby/listener/SneakListener.java rename to src/de/steamwar/lobby/listener/SneakListener.java index febe0fb..0fd4f26 100644 --- a/src/de/warking/lobby/listener/SneakListener.java +++ b/src/de/steamwar/lobby/listener/SneakListener.java @@ -1,7 +1,7 @@ -package de.warking.lobby.listener; +package de.steamwar.lobby.listener; -import de.warking.lobby.gadgets.Gadget; -import de.warking.lobby.LobbySystem; +import de.steamwar.lobby.LobbySystem; +import de.steamwar.lobby.gadgets.Gadget; import org.bukkit.Effect; import org.bukkit.Sound; import org.bukkit.entity.Player; @@ -14,7 +14,7 @@ public class SneakListener implements Listener { @EventHandler public void handleSneak(PlayerToggleSneakEvent event) { - Player player = event.getPlayer(); + final Player player = event.getPlayer(); if(LobbySystem.getInstance().getGadgetManager().getPlayerGadget(player) == Gadget.JETPACK) { new BukkitRunnable() { @Override @@ -30,8 +30,8 @@ public class SneakListener implements Listener { @Override public void run() { if(player.isSneaking() && LobbySystem.getInstance().getGadgetManager().getPlayerGadget(player) == Gadget.JETPACK) { - player.getWorld().playEffect(player.getLocation(), Effect.LAVA_POP, 10); - player.getWorld().playEffect(player.getLocation(), Effect.LAVA_POP, 10); + //player.getWorld().playEffect(player.getLocation(), Effect.LAVA_POP, 10); + //player.getWorld().playEffect(player.getLocation(), Effect.LAVA_POP, 10); player.getWorld().playEffect(player.getLocation(), Effect.LAVA_POP, 10); player.playSound(player.getLocation(), Sound.ENTITY_FIREWORK_LAUNCH, 0.1F, 0.1F); diff --git a/src/de/warking/lobby/listener/TeleportEvent.java b/src/de/steamwar/lobby/listener/TeleportEvent.java similarity index 83% rename from src/de/warking/lobby/listener/TeleportEvent.java rename to src/de/steamwar/lobby/listener/TeleportEvent.java index 28d68e7..3570553 100644 --- a/src/de/warking/lobby/listener/TeleportEvent.java +++ b/src/de/steamwar/lobby/listener/TeleportEvent.java @@ -1,7 +1,7 @@ -package de.warking.lobby.listener; +package de.steamwar.lobby.listener; -import de.warking.lobby.gadgets.Gadget; -import de.warking.lobby.LobbySystem; +import de.steamwar.lobby.LobbySystem; +import de.steamwar.lobby.gadgets.Gadget; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; diff --git a/src/de/warking/lobby/manager/BackendManager.java b/src/de/steamwar/lobby/manager/BackendManager.java similarity index 97% rename from src/de/warking/lobby/manager/BackendManager.java rename to src/de/steamwar/lobby/manager/BackendManager.java index 658c5cf..a9849b1 100644 --- a/src/de/warking/lobby/manager/BackendManager.java +++ b/src/de/steamwar/lobby/manager/BackendManager.java @@ -1,6 +1,6 @@ -package de.warking.lobby.manager; +package de.steamwar.lobby.manager; -import de.warking.lobby.LobbySystem; +import de.steamwar.lobby.LobbySystem; import org.bukkit.entity.Player; import java.util.ArrayList; diff --git a/src/de/warking/lobby/manager/FileManager.java b/src/de/steamwar/lobby/manager/FileManager.java similarity index 89% rename from src/de/warking/lobby/manager/FileManager.java rename to src/de/steamwar/lobby/manager/FileManager.java index 6662516..75ef473 100644 --- a/src/de/warking/lobby/manager/FileManager.java +++ b/src/de/steamwar/lobby/manager/FileManager.java @@ -1,12 +1,11 @@ -package de.warking.lobby.manager; +package de.steamwar.lobby.manager; import java.io.File; import java.io.IOException; +import de.steamwar.lobby.LobbySystem; import org.bukkit.configuration.file.FileConfiguration; -import de.warking.lobby.LobbySystem; - public class FileManager { @@ -35,7 +34,7 @@ public class FileManager { } public String getStringFromConfig(String path) { - return config.getString(path).replaceAll("&", "§"); + return config.getString(path).replaceAll("&", "�"); } public int getIntegerFromConfig(String path) { diff --git a/src/de/warking/lobby/manager/LocationManager.java b/src/de/steamwar/lobby/manager/LocationManager.java similarity index 95% rename from src/de/warking/lobby/manager/LocationManager.java rename to src/de/steamwar/lobby/manager/LocationManager.java index 86415c9..5c20f07 100644 --- a/src/de/warking/lobby/manager/LocationManager.java +++ b/src/de/steamwar/lobby/manager/LocationManager.java @@ -1,15 +1,14 @@ -package de.warking.lobby.manager; +package de.steamwar.lobby.manager; import java.io.File; import java.io.IOException; +import de.steamwar.lobby.LobbySystem; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.configuration.file.YamlConfiguration; -import de.warking.lobby.LobbySystem; - public class LocationManager { private File file; diff --git a/src/de/warking/lobby/utils/ItemBuilder.java b/src/de/steamwar/lobby/utils/ItemBuilder.java similarity index 97% rename from src/de/warking/lobby/utils/ItemBuilder.java rename to src/de/steamwar/lobby/utils/ItemBuilder.java index 1b31e76..b0ad800 100644 --- a/src/de/warking/lobby/utils/ItemBuilder.java +++ b/src/de/steamwar/lobby/utils/ItemBuilder.java @@ -1,4 +1,4 @@ -package de.warking.lobby.utils; +package de.steamwar.lobby.utils; import java.util.ArrayList; diff --git a/src/de/warking/lobby/command/checkCommand.java b/src/de/warking/lobby/command/checkCommand.java deleted file mode 100644 index ded5597..0000000 --- a/src/de/warking/lobby/command/checkCommand.java +++ /dev/null @@ -1,39 +0,0 @@ -package de.warking.lobby.command; - -import de.warking.lobby.LobbySystem; -import org.bukkit.command.Command; -import org.bukkit.command.CommandExecutor; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; - -public class checkCommand implements CommandExecutor { - - @Override - public boolean onCommand(CommandSender sender, Command command, String lable, String[] args) { - if(!(sender instanceof Player)) - return false; - Player player = (Player)sender; - - if(args.length == 0) { - player.sendMessage(LobbySystem.prefix + "§7Benutze §c/check [loc/mysql/config]"); - }else if(args.length == 1) { - if(args[0].equalsIgnoreCase("loc") || args[0].equalsIgnoreCase("l") || args[0].equalsIgnoreCase("location")) { - if(player.hasPermission("lobby.admin.edit.location")) { - String[] split = LobbySystem.getInstance().getBackendManager().checkLocations().split(" newLine "); - player.sendMessage(LobbySystem.prefix + "§7Es fehlen folgene Positionen!"); - if(split.length > 0) { - for(int i = 0; i < split.length; i++) { - player.sendMessage(split[i]); - } - player.sendMessage(LobbySystem.prefix + "§7Du kannst die fehlnene Positionen mit §c/setlocation §7erstellen"); - }else { - player.sendMessage(LobbySystem.prefix + "§aEs wurden alle Positionen gesetzt!"); - } - - } - } - } - return false; - } - -} diff --git a/src/de/warking/lobby/command/setLocation.java b/src/de/warking/lobby/command/setLocation.java deleted file mode 100644 index 8abfc33..0000000 --- a/src/de/warking/lobby/command/setLocation.java +++ /dev/null @@ -1,30 +0,0 @@ -package de.warking.lobby.command; - -import de.warking.lobby.LobbySystem; -import de.warking.lobby.inventorys.LobbyInventorys; -import de.warking.lobby.listener.LobbyInvClickManager; -import de.warking.lobby.manager.FileManager; -import org.bukkit.command.Command; -import org.bukkit.command.CommandExecutor; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; - -public class setLocation implements CommandExecutor { - - public FileManager fm = LobbySystem.getInstance().getFileManager(); - - @Override - public boolean onCommand(CommandSender sender, Command command, String lable, String[] args) { - if(!(sender instanceof Player)) - return false; - Player player = (Player)sender; - - if(player.hasPermission("lobby.admin.edit.location")) { - LobbyInvClickManager.inSetup.add(player); - player.openInventory(LobbyInventorys.getNavigatorInventory()); - } - - return false; - } - -} diff --git a/src/plugin.yml b/src/plugin.yml index 0188af7..2a87098 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -2,10 +2,8 @@ name: LobbySystem version: 1.0 author: [hunjy, Yaruma3341] depend: [CoreSystem] -main: de.warking.lobby.LobbySystem +main: de.steamwar.lobby.LobbySystem commands: - setlocation: - check: build: