From 9ae44d6cd5073c6fa51b710af6b102ddb5c16cf8 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sun, 26 Jun 2016 12:21:32 +0200 Subject: [PATCH] Equalize world class naming --- .../github/dre2n/dungeonsxl/DungeonsXL.java | 24 +++--- .../dungeonsxl/command/CreateCommand.java | 12 +-- .../dre2n/dungeonsxl/command/EditCommand.java | 12 +-- .../dungeonsxl/command/EscapeCommand.java | 4 +- .../dre2n/dungeonsxl/command/GameCommand.java | 4 +- .../dungeonsxl/command/InviteCommand.java | 4 +- .../dungeonsxl/command/LeaveCommand.java | 6 +- .../dre2n/dungeonsxl/command/ListCommand.java | 12 +-- .../dre2n/dungeonsxl/command/MainCommand.java | 2 +- .../dre2n/dungeonsxl/command/MsgCommand.java | 4 +- .../dre2n/dungeonsxl/command/PlayCommand.java | 2 +- .../dungeonsxl/command/ReloadCommand.java | 2 +- .../dre2n/dungeonsxl/command/SaveCommand.java | 4 +- .../dre2n/dungeonsxl/command/TestCommand.java | 4 +- .../dungeonsxl/command/UninviteCommand.java | 4 +- .../dungeonsxl/config/DungeonConfig.java | 32 ++++---- .../dre2n/dungeonsxl/config/SignData.java | 24 +++--- .../event/dgroup/DGroupFinishFloorEvent.java | 14 ++-- .../event/dgroup/DGroupStartFloorEvent.java | 10 +-- .../event/dsign/DSignRegistrationEvent.java | 10 +-- .../event/editworld/EditWorldEvent.java | 10 +-- .../editworld/EditWorldGenerateEvent.java | 4 +- .../event/editworld/EditWorldSaveEvent.java | 4 +- .../event/editworld/EditWorldUnloadEvent.java | 4 +- .../event/gameworld/GameWorldEvent.java | 10 +-- .../gameworld/GameWorldStartGameEvent.java | 4 +- .../event/gameworld/GameWorldUnloadEvent.java | 4 +- .../io/github/dre2n/dungeonsxl/game/Game.java | 32 ++++---- .../dungeonsxl/game/GamePlaceableBlock.java | 4 +- .../dre2n/dungeonsxl/global/DPortal.java | 6 +- .../dre2n/dungeonsxl/global/GameSign.java | 2 +- .../dungeonsxl/listener/BlockListener.java | 22 +++--- .../dungeonsxl/listener/EntityListener.java | 24 +++--- .../dungeonsxl/listener/HangingListener.java | 4 +- .../dungeonsxl/listener/PlayerListener.java | 30 +++---- .../dungeonsxl/listener/WorldListener.java | 8 +- .../dungeonsxl/mob/CitizensMobProvider.java | 4 +- .../io/github/dre2n/dungeonsxl/mob/DMob.java | 10 +-- .../github/dre2n/dungeonsxl/mob/DMobType.java | 4 +- .../dre2n/dungeonsxl/player/DEditPlayer.java | 16 ++-- .../dre2n/dungeonsxl/player/DGamePlayer.java | 24 +++--- .../dre2n/dungeonsxl/player/DGroup.java | 32 ++++---- .../dre2n/dungeonsxl/reward/RewardChest.java | 12 +-- .../dre2n/dungeonsxl/sign/BlockSign.java | 4 +- .../dre2n/dungeonsxl/sign/CheckpointSign.java | 4 +- .../dre2n/dungeonsxl/sign/ChestSign.java | 4 +- .../dungeonsxl/sign/ChunkUpdaterSign.java | 4 +- .../dre2n/dungeonsxl/sign/ClassesSign.java | 4 +- .../dre2n/dungeonsxl/sign/CommandSign.java | 4 +- .../dre2n/dungeonsxl/sign/DMobSign.java | 4 +- .../github/dre2n/dungeonsxl/sign/DSign.java | 14 ++-- .../dre2n/dungeonsxl/sign/DropSign.java | 4 +- .../github/dre2n/dungeonsxl/sign/EndSign.java | 4 +- .../dungeonsxl/sign/ExternalMobSign.java | 4 +- .../dre2n/dungeonsxl/sign/FloorSign.java | 14 ++-- .../dre2n/dungeonsxl/sign/HologramSign.java | 4 +- .../dre2n/dungeonsxl/sign/InteractSign.java | 8 +- .../dre2n/dungeonsxl/sign/LeaveSign.java | 4 +- .../dungeonsxl/sign/LivesModifierSign.java | 4 +- .../dre2n/dungeonsxl/sign/LobbySign.java | 4 +- .../dre2n/dungeonsxl/sign/MessageSign.java | 4 +- .../dre2n/dungeonsxl/sign/OpenDoorSign.java | 6 +- .../dre2n/dungeonsxl/sign/PlaceSign.java | 4 +- .../dre2n/dungeonsxl/sign/ReadySign.java | 4 +- .../dre2n/dungeonsxl/sign/RedstoneSign.java | 4 +- .../dre2n/dungeonsxl/sign/ScriptSign.java | 4 +- .../dungeonsxl/sign/SoundMessageSign.java | 4 +- .../dre2n/dungeonsxl/sign/StartSign.java | 4 +- .../dre2n/dungeonsxl/sign/TeleportSign.java | 4 +- .../dre2n/dungeonsxl/sign/TriggerSign.java | 8 +- .../dre2n/dungeonsxl/sign/WaveSign.java | 4 +- .../dungeonsxl/task/DelayedPowerTask.java | 4 +- .../dungeonsxl/task/ExternalMobSpawnTask.java | 4 +- .../dre2n/dungeonsxl/task/LazyUpdateTask.java | 4 +- .../dre2n/dungeonsxl/task/MobSpawnTask.java | 4 +- .../dungeonsxl/task/RedstoneEventTask.java | 4 +- .../dungeonsxl/task/WorldUnloadTask.java | 8 +- .../dungeonsxl/trigger/DistanceTrigger.java | 4 +- .../dungeonsxl/trigger/InteractTrigger.java | 10 +-- .../dre2n/dungeonsxl/trigger/MobTrigger.java | 6 +- .../dungeonsxl/trigger/ProgressTrigger.java | 20 ++--- .../dungeonsxl/trigger/RedstoneTrigger.java | 6 +- .../dre2n/dungeonsxl/trigger/SignTrigger.java | 6 +- .../dre2n/dungeonsxl/trigger/Trigger.java | 8 +- .../dungeonsxl/trigger/UseItemTrigger.java | 6 +- .../dre2n/dungeonsxl/trigger/WaveTrigger.java | 8 +- .../world/{EditWorld.java => DEditWorld.java} | 20 ++--- .../world/{GameWorld.java => DGameWorld.java} | 20 ++--- ...InstanceWorld.java => DInstanceWorld.java} | 14 ++-- ...ResourceWorld.java => DResourceWorld.java} | 40 +++++----- .../world/{Worlds.java => DWorlds.java} | 78 +++++++++---------- .../dre2n/dungeonsxl/sign/CustomSign.java | 4 +- .../dungeonsxl/trigger/CustomTrigger.java | 12 +-- 93 files changed, 447 insertions(+), 449 deletions(-) rename src/main/java/io/github/dre2n/dungeonsxl/world/{EditWorld.java => DEditWorld.java} (88%) rename src/main/java/io/github/dre2n/dungeonsxl/world/{GameWorld.java => DGameWorld.java} (95%) rename src/main/java/io/github/dre2n/dungeonsxl/world/{InstanceWorld.java => DInstanceWorld.java} (89%) rename src/main/java/io/github/dre2n/dungeonsxl/world/{ResourceWorld.java => DResourceWorld.java} (84%) rename src/main/java/io/github/dre2n/dungeonsxl/world/{Worlds.java => DWorlds.java} (70%) diff --git a/src/main/java/io/github/dre2n/dungeonsxl/DungeonsXL.java b/src/main/java/io/github/dre2n/dungeonsxl/DungeonsXL.java index 181b0f69..658eba8a 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/DungeonsXL.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/DungeonsXL.java @@ -52,7 +52,7 @@ import io.github.dre2n.dungeonsxl.task.SecureModeTask; import io.github.dre2n.dungeonsxl.task.UpdateTask; import io.github.dre2n.dungeonsxl.task.WorldUnloadTask; import io.github.dre2n.dungeonsxl.trigger.TriggerTypes; -import io.github.dre2n.dungeonsxl.world.Worlds; +import io.github.dre2n.dungeonsxl.world.DWorlds; import io.github.dre2n.itemsxl.ItemsXL; import java.io.File; import java.util.List; @@ -98,7 +98,7 @@ public class DungeonsXL extends BRPlugin { private DClasses dClasses; private DMobTypes dMobTypes; private SignScripts signScripts; - private Worlds worlds; + private DWorlds dWorlds; private BukkitTask announcerTask; private BukkitTask worldUnloadTask; @@ -200,8 +200,8 @@ public class DungeonsXL extends BRPlugin { dLootInventories.clear(); dGroups.clear(); - // Delete Worlds - worlds.deleteAllInstances(); + // Delete DWorlds + dWorlds.deleteAllInstances(); // Disable listeners HandlerList.unregisterAll(this); @@ -266,18 +266,16 @@ public class DungeonsXL extends BRPlugin { public void saveData() { protections.saveAll(); DSavePlayer.save(); - worlds.saveAll(); + dWorlds.saveAll(); } public void loadAll() { protections.loadAll(); dPlayers.loadAll(); DSavePlayer.load(); - worlds.check(); + dWorlds.check(); } - - /* Getters and loaders */ /** * @return the plugin instance @@ -575,17 +573,17 @@ public class DungeonsXL extends BRPlugin { } /** - * @return the loaded instance of Worlds + * @return the loaded instance of DWorlds */ - public Worlds getWorlds() { - return worlds; + public DWorlds getDWorlds() { + return dWorlds; } /** - * load / reload a new instance of Worlds + * load / reload a new instance of DWorlds */ public void loadWorlds(File folder) { - worlds = new Worlds(MAPS); + dWorlds = new DWorlds(MAPS); } /** diff --git a/src/main/java/io/github/dre2n/dungeonsxl/command/CreateCommand.java b/src/main/java/io/github/dre2n/dungeonsxl/command/CreateCommand.java index 8b47d850..ff2a31cd 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/command/CreateCommand.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/command/CreateCommand.java @@ -23,8 +23,8 @@ import io.github.dre2n.dungeonsxl.config.DMessages; import io.github.dre2n.dungeonsxl.player.DEditPlayer; import io.github.dre2n.dungeonsxl.player.DGamePlayer; import io.github.dre2n.dungeonsxl.player.DPermissions; -import io.github.dre2n.dungeonsxl.world.EditWorld; -import io.github.dre2n.dungeonsxl.world.ResourceWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; +import io.github.dre2n.dungeonsxl.world.DResourceWorld; import java.io.File; import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; @@ -67,8 +67,8 @@ public class CreateCommand extends BRCommand { MessageUtil.log(plugin, DMessages.LOG_GENERATE_NEW_WORLD.getMessage()); // Create World - ResourceWorld resource = new ResourceWorld(name); - EditWorld editWorld = resource.generate(); + DResourceWorld resource = new DResourceWorld(name); + DEditWorld editWorld = resource.generate(); editWorld.save(); editWorld.delete(); @@ -88,8 +88,8 @@ public class CreateCommand extends BRCommand { MessageUtil.log(plugin, DMessages.LOG_GENERATE_NEW_WORLD.getMessage()); // Create World - ResourceWorld resource = new ResourceWorld(name); - EditWorld editWorld = resource.generate(); + DResourceWorld resource = new DResourceWorld(name); + DEditWorld editWorld = resource.generate(); // MSG Done MessageUtil.log(plugin, DMessages.LOG_WORLD_GENERATION_FINISHED.getMessage()); diff --git a/src/main/java/io/github/dre2n/dungeonsxl/command/EditCommand.java b/src/main/java/io/github/dre2n/dungeonsxl/command/EditCommand.java index 9b5ea793..fd880ede 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/command/EditCommand.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/command/EditCommand.java @@ -25,9 +25,9 @@ import io.github.dre2n.dungeonsxl.player.DGlobalPlayer; import io.github.dre2n.dungeonsxl.player.DGroup; import io.github.dre2n.dungeonsxl.player.DInstancePlayer; import io.github.dre2n.dungeonsxl.player.DPermissions; -import io.github.dre2n.dungeonsxl.world.EditWorld; -import io.github.dre2n.dungeonsxl.world.ResourceWorld; -import io.github.dre2n.dungeonsxl.world.Worlds; +import io.github.dre2n.dungeonsxl.world.DEditWorld; +import io.github.dre2n.dungeonsxl.world.DResourceWorld; +import io.github.dre2n.dungeonsxl.world.DWorlds; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -37,7 +37,7 @@ import org.bukkit.entity.Player; public class EditCommand extends BRCommand { DungeonsXL plugin = DungeonsXL.getInstance(); - Worlds worlds = plugin.getWorlds(); + DWorlds worlds = plugin.getDWorlds(); public EditCommand() { setCommand("edit"); @@ -57,8 +57,8 @@ public class EditCommand extends BRCommand { return; } - ResourceWorld resource = worlds.getResourceByName(mapName); - EditWorld editWorld = resource.instantiateAsEditWorld(); + DResourceWorld resource = worlds.getResourceByName(mapName); + DEditWorld editWorld = resource.instantiateAsEditWorld(); DGroup dGroup = DGroup.getByPlayer(player); DGlobalPlayer dPlayer = plugin.getDPlayers().getByPlayer(player); diff --git a/src/main/java/io/github/dre2n/dungeonsxl/command/EscapeCommand.java b/src/main/java/io/github/dre2n/dungeonsxl/command/EscapeCommand.java index 187061b6..495b6adc 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/command/EscapeCommand.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/command/EscapeCommand.java @@ -23,7 +23,7 @@ import io.github.dre2n.dungeonsxl.player.DEditPlayer; import io.github.dre2n.dungeonsxl.player.DGamePlayer; import io.github.dre2n.dungeonsxl.player.DGroup; import io.github.dre2n.dungeonsxl.player.DPermissions; -import io.github.dre2n.dungeonsxl.world.EditWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -52,7 +52,7 @@ public class EscapeCommand extends BRCommand { } else if (dPlayer != null) { dPlayer.escape(); - EditWorld editWorld = EditWorld.getByWorld(dPlayer.getWorld()); + DEditWorld editWorld = DEditWorld.getByWorld(dPlayer.getWorld()); if (editWorld == null) { return; } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/command/GameCommand.java b/src/main/java/io/github/dre2n/dungeonsxl/command/GameCommand.java index 5467d651..28546129 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/command/GameCommand.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/command/GameCommand.java @@ -23,7 +23,7 @@ import io.github.dre2n.dungeonsxl.config.DMessages; import io.github.dre2n.dungeonsxl.game.Game; import io.github.dre2n.dungeonsxl.player.DGroup; import io.github.dre2n.dungeonsxl.player.DPermissions; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -52,7 +52,7 @@ public class GameCommand extends BRCommand { return; } - GameWorld gameWorld = dGroup.getGameWorld(); + DGameWorld gameWorld = dGroup.getGameWorld(); if (gameWorld == null) { MessageUtil.sendMessage(sender, DMessages.ERROR_NO_GAME.getMessage()); return; diff --git a/src/main/java/io/github/dre2n/dungeonsxl/command/InviteCommand.java b/src/main/java/io/github/dre2n/dungeonsxl/command/InviteCommand.java index 4293e49f..e6b39ff8 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/command/InviteCommand.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/command/InviteCommand.java @@ -21,7 +21,7 @@ import io.github.dre2n.commons.util.messageutil.MessageUtil; import io.github.dre2n.dungeonsxl.DungeonsXL; import io.github.dre2n.dungeonsxl.config.DMessages; import io.github.dre2n.dungeonsxl.player.DPermissions; -import io.github.dre2n.dungeonsxl.world.ResourceWorld; +import io.github.dre2n.dungeonsxl.world.DResourceWorld; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; import org.bukkit.command.CommandSender; @@ -45,7 +45,7 @@ public class InviteCommand extends BRCommand { @Override public void onExecute(String[] args, CommandSender sender) { - ResourceWorld resource = plugin.getWorlds().getResourceByName(args[2]); + DResourceWorld resource = plugin.getDWorlds().getResourceByName(args[2]); OfflinePlayer player = Bukkit.getOfflinePlayer(args[2]); if (resource != null) { diff --git a/src/main/java/io/github/dre2n/dungeonsxl/command/LeaveCommand.java b/src/main/java/io/github/dre2n/dungeonsxl/command/LeaveCommand.java index a7470fe4..ab290a7e 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/command/LeaveCommand.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/command/LeaveCommand.java @@ -27,7 +27,7 @@ import io.github.dre2n.dungeonsxl.player.DGlobalPlayer; import io.github.dre2n.dungeonsxl.player.DGroup; import io.github.dre2n.dungeonsxl.player.DInstancePlayer; import io.github.dre2n.dungeonsxl.player.DPermissions; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -53,8 +53,8 @@ public class LeaveCommand extends BRCommand { DGlobalPlayer dPlayer = plugin.getDPlayers().getByPlayer(player); - if (GameWorld.getByWorld(player.getWorld()) != null) { - if (GameWorld.getByWorld(player.getWorld()).isTutorial()) { + if (DGameWorld.getByWorld(player.getWorld()) != null) { + if (DGameWorld.getByWorld(player.getWorld()).isTutorial()) { MessageUtil.sendMessage(player, DMessages.ERROR_NO_LEAVE_IN_TUTORIAL.getMessage()); return; } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/command/ListCommand.java b/src/main/java/io/github/dre2n/dungeonsxl/command/ListCommand.java index 90d52506..90402fb9 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/command/ListCommand.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/command/ListCommand.java @@ -24,9 +24,9 @@ import io.github.dre2n.dungeonsxl.config.DMessages; import io.github.dre2n.dungeonsxl.config.DungeonConfig; import io.github.dre2n.dungeonsxl.dungeon.Dungeon; import io.github.dre2n.dungeonsxl.player.DPermissions; -import io.github.dre2n.dungeonsxl.world.EditWorld; -import io.github.dre2n.dungeonsxl.world.GameWorld; -import io.github.dre2n.dungeonsxl.world.Worlds; +import io.github.dre2n.dungeonsxl.world.DEditWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; +import io.github.dre2n.dungeonsxl.world.DWorlds; import java.io.File; import java.util.ArrayList; import org.bukkit.command.CommandSender; @@ -38,7 +38,7 @@ import org.bukkit.entity.Player; public class ListCommand extends BRCommand { DungeonsXL plugin = DungeonsXL.getInstance(); - Worlds worlds = plugin.getWorlds(); + DWorlds worlds = plugin.getDWorlds(); public ListCommand() { setCommand("list"); @@ -63,10 +63,10 @@ public class ListCommand extends BRCommand { mapList.add(file.getName()); } ArrayList loadedList = new ArrayList<>(); - for (EditWorld editWorld : worlds.getEditWorlds()) { + for (DEditWorld editWorld : worlds.getEditWorlds()) { loadedList.add(editWorld.getWorld().getWorldFolder().getName()); } - for (GameWorld gameWorld : worlds.getGameWorlds()) { + for (DGameWorld gameWorld : worlds.getGameWorlds()) { loadedList.add(gameWorld.getWorld().getWorldFolder().getName()); } ArrayList toSend = new ArrayList<>(); diff --git a/src/main/java/io/github/dre2n/dungeonsxl/command/MainCommand.java b/src/main/java/io/github/dre2n/dungeonsxl/command/MainCommand.java index a0f05bb3..53f0143d 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/command/MainCommand.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/command/MainCommand.java @@ -50,7 +50,7 @@ public class MainCommand extends BRCommand { int maps = new File(plugin.getDataFolder() + "/maps").listFiles().length; int dungeons = new File(plugin.getDataFolder() + "/dungeons").listFiles().length; - int loaded = plugin.getWorlds().getEditWorlds().size() + plugin.getWorlds().getGameWorlds().size(); + int loaded = plugin.getDWorlds().getEditWorlds().size() + plugin.getDWorlds().getGameWorlds().size(); int players = plugin.getDPlayers().getDGamePlayers().size(); Internals internals = CompatibilityHandler.getInstance().getInternals(); String vault = ""; diff --git a/src/main/java/io/github/dre2n/dungeonsxl/command/MsgCommand.java b/src/main/java/io/github/dre2n/dungeonsxl/command/MsgCommand.java index 4bfc689c..99d37b66 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/command/MsgCommand.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/command/MsgCommand.java @@ -23,7 +23,7 @@ import io.github.dre2n.dungeonsxl.DungeonsXL; import io.github.dre2n.dungeonsxl.config.DMessages; import io.github.dre2n.dungeonsxl.config.WorldConfig; import io.github.dre2n.dungeonsxl.player.DPermissions; -import io.github.dre2n.dungeonsxl.world.EditWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -47,7 +47,7 @@ public class MsgCommand extends BRCommand { @Override public void onExecute(String[] args, CommandSender sender) { Player player = (Player) sender; - EditWorld editWorld = EditWorld.getByWorld(player.getWorld()); + DEditWorld editWorld = DEditWorld.getByWorld(player.getWorld()); if (editWorld == null) { MessageUtil.sendMessage(player, DMessages.ERROR_NOT_IN_DUNGEON.getMessage()); diff --git a/src/main/java/io/github/dre2n/dungeonsxl/command/PlayCommand.java b/src/main/java/io/github/dre2n/dungeonsxl/command/PlayCommand.java index 5445037e..27849e54 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/command/PlayCommand.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/command/PlayCommand.java @@ -83,7 +83,7 @@ public class PlayCommand extends BRCommand { } } - if (!multiFloor && !plugin.getWorlds().exists(identifier)) { + if (!multiFloor && !plugin.getDWorlds().exists(identifier)) { MessageUtil.sendMessage(player, DMessages.ERROR_DUNGEON_NOT_EXIST.getMessage(identifier)); return; } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/command/ReloadCommand.java b/src/main/java/io/github/dre2n/dungeonsxl/command/ReloadCommand.java index d3d90501..b40d08d8 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/command/ReloadCommand.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/command/ReloadCommand.java @@ -51,7 +51,7 @@ public class ReloadCommand extends BRCommand { int maps = new File(plugin.getDataFolder() + "/maps").listFiles().length; int dungeons = new File(plugin.getDataFolder() + "/dungeons").listFiles().length; - int loaded = plugin.getWorlds().getEditWorlds().size() + plugin.getWorlds().getGameWorlds().size(); + int loaded = plugin.getDWorlds().getEditWorlds().size() + plugin.getDWorlds().getGameWorlds().size(); int players = plugin.getDPlayers().getDGamePlayers().size(); Internals internals = CompatibilityHandler.getInstance().getInternals(); String vault = ""; diff --git a/src/main/java/io/github/dre2n/dungeonsxl/command/SaveCommand.java b/src/main/java/io/github/dre2n/dungeonsxl/command/SaveCommand.java index 37d04877..6f288749 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/command/SaveCommand.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/command/SaveCommand.java @@ -21,7 +21,7 @@ import io.github.dre2n.commons.util.messageutil.MessageUtil; import io.github.dre2n.dungeonsxl.DungeonsXL; import io.github.dre2n.dungeonsxl.config.DMessages; import io.github.dre2n.dungeonsxl.player.DPermissions; -import io.github.dre2n.dungeonsxl.world.EditWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -44,7 +44,7 @@ public class SaveCommand extends BRCommand { @Override public void onExecute(String[] args, CommandSender sender) { Player player = (Player) sender; - EditWorld editWorld = EditWorld.getByWorld(player.getWorld()); + DEditWorld editWorld = DEditWorld.getByWorld(player.getWorld()); if (editWorld != null) { editWorld.save(); MessageUtil.sendMessage(player, DMessages.CMD_SAVE_SUCCESS.getMessage()); diff --git a/src/main/java/io/github/dre2n/dungeonsxl/command/TestCommand.java b/src/main/java/io/github/dre2n/dungeonsxl/command/TestCommand.java index 9d5b5e21..50880655 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/command/TestCommand.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/command/TestCommand.java @@ -25,7 +25,7 @@ import io.github.dre2n.dungeonsxl.game.GameTypeDefault; import io.github.dre2n.dungeonsxl.player.DGamePlayer; import io.github.dre2n.dungeonsxl.player.DGroup; import io.github.dre2n.dungeonsxl.player.DPermissions; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -60,7 +60,7 @@ public class TestCommand extends BRCommand { return; } - GameWorld gameWorld = dGroup.getGameWorld(); + DGameWorld gameWorld = dGroup.getGameWorld(); if (gameWorld == null) { MessageUtil.sendMessage(sender, DMessages.ERROR_NOT_IN_DUNGEON.getMessage()); return; diff --git a/src/main/java/io/github/dre2n/dungeonsxl/command/UninviteCommand.java b/src/main/java/io/github/dre2n/dungeonsxl/command/UninviteCommand.java index 8e74a902..2594d2bf 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/command/UninviteCommand.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/command/UninviteCommand.java @@ -21,7 +21,7 @@ import io.github.dre2n.commons.util.messageutil.MessageUtil; import io.github.dre2n.dungeonsxl.DungeonsXL; import io.github.dre2n.dungeonsxl.config.DMessages; import io.github.dre2n.dungeonsxl.player.DPermissions; -import io.github.dre2n.dungeonsxl.world.ResourceWorld; +import io.github.dre2n.dungeonsxl.world.DResourceWorld; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; import org.bukkit.command.CommandSender; @@ -45,7 +45,7 @@ public class UninviteCommand extends BRCommand { @Override public void onExecute(String[] args, CommandSender sender) { - ResourceWorld resource = plugin.getWorlds().getResourceByName(args[2]); + DResourceWorld resource = plugin.getDWorlds().getResourceByName(args[2]); if (resource == null) { MessageUtil.sendMessage(sender, DMessages.ERROR_DUNGEON_NOT_EXIST.getMessage(args[2])); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/config/DungeonConfig.java b/src/main/java/io/github/dre2n/dungeonsxl/config/DungeonConfig.java index 81c717c6..8e9bc752 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/config/DungeonConfig.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/config/DungeonConfig.java @@ -18,8 +18,8 @@ package io.github.dre2n.dungeonsxl.config; import io.github.dre2n.commons.config.BRConfig; import io.github.dre2n.dungeonsxl.DungeonsXL; -import io.github.dre2n.dungeonsxl.world.ResourceWorld; -import io.github.dre2n.dungeonsxl.world.Worlds; +import io.github.dre2n.dungeonsxl.world.DResourceWorld; +import io.github.dre2n.dungeonsxl.world.DWorlds; import java.io.File; import java.util.ArrayList; import java.util.List; @@ -29,13 +29,13 @@ import java.util.List; */ public class DungeonConfig extends BRConfig { - Worlds worlds = DungeonsXL.getInstance().getWorlds(); + DWorlds worlds = DungeonsXL.getInstance().getDWorlds(); public static final int CONFIG_VERSION = 1; - private ResourceWorld startFloor; - private ResourceWorld endFloor; - private List floors = new ArrayList<>(); + private DResourceWorld startFloor; + private DResourceWorld endFloor; + private List floors = new ArrayList<>(); private int floorCount; private boolean removeWhenPlayed; private WorldConfig overrideValues; @@ -53,7 +53,7 @@ public class DungeonConfig extends BRConfig { /** * @return the startFloor */ - public ResourceWorld getStartFloor() { + public DResourceWorld getStartFloor() { return startFloor; } @@ -61,14 +61,14 @@ public class DungeonConfig extends BRConfig { * @param startFloor * the startFloor to set */ - public void setStartFloor(ResourceWorld startFloor) { + public void setStartFloor(DResourceWorld startFloor) { this.startFloor = startFloor; } /** * @return the endFloor */ - public ResourceWorld getEndFloor() { + public DResourceWorld getEndFloor() { return endFloor; } @@ -76,14 +76,14 @@ public class DungeonConfig extends BRConfig { * @param endFloor * the endFloor to set */ - public void setEndFloor(ResourceWorld endFloor) { + public void setEndFloor(DResourceWorld endFloor) { this.endFloor = endFloor; } /** * @return the floors */ - public List getFloors() { + public List getFloors() { return floors; } @@ -91,7 +91,7 @@ public class DungeonConfig extends BRConfig { * @param resource * the resource to add */ - public void addFloor(ResourceWorld resource) { + public void addFloor(DResourceWorld resource) { floors.add(resource); } @@ -99,7 +99,7 @@ public class DungeonConfig extends BRConfig { * @param resource * the resource to remove */ - public void removeFloor(ResourceWorld resource) { + public void removeFloor(DResourceWorld resource) { floors.remove(resource); } @@ -172,10 +172,10 @@ public class DungeonConfig extends BRConfig { /** * @param resource - * the ResourceWorld to check + * the DResourceWorld to check * @return true if the floor is either in the list or the start / end floor. */ - public boolean containsFloor(ResourceWorld resource) { + public boolean containsFloor(DResourceWorld resource) { return floors.contains(resource) || startFloor.equals(resource) || endFloor.equals(resource); } @@ -225,7 +225,7 @@ public class DungeonConfig extends BRConfig { public void load() { if (config.contains("floors")) { for (String floor : config.getStringList("floors")) { - ResourceWorld resource = worlds.getResourceByName(floor); + DResourceWorld resource = worlds.getResourceByName(floor); if (resource != null) { floors.add(resource); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/config/SignData.java b/src/main/java/io/github/dre2n/dungeonsxl/config/SignData.java index c674054c..b0d84ce0 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/config/SignData.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/config/SignData.java @@ -17,8 +17,8 @@ package io.github.dre2n.dungeonsxl.config; import io.github.dre2n.dungeonsxl.sign.DSign; -import io.github.dre2n.dungeonsxl.world.EditWorld; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -50,14 +50,14 @@ public class SignData { /* Actions */ /** - * Applies all signs from the file to the EditWorld. - * Also sets the lobby location of the EditWorld to the location of the lobby sign if one exists. + * Applies all signs from the file to the DEditWorld. + * Also sets the lobby location of the DEditWorld to the location of the lobby sign if one exists. * * @param editWorld - * the EditWorld where the signs are + * the DEditWorld where the signs are * @throws IOException */ - public void deserializeSigns(EditWorld editWorld) throws IOException { + public void deserializeSigns(DEditWorld editWorld) throws IOException { ObjectInputStream os = new ObjectInputStream(new FileInputStream(file)); int length = os.readInt(); @@ -81,14 +81,14 @@ public class SignData { } /** - * Applies all signs from the file to the GameWorld. + * Applies all signs from the file to the DGameWorld. * * @param gameWorld - * the GameWorld where the signs are + * the DGameWorld where the signs are * @return a Set of all DSign blocks * @throws IOException */ - public void deserializeSigns(GameWorld gameWorld) throws IOException { + public void deserializeSigns(DGameWorld gameWorld) throws IOException { ObjectInputStream os = new ObjectInputStream(new FileInputStream(file)); int length = os.readInt(); @@ -108,13 +108,13 @@ public class SignData { } /** - * Applies all signs from the EditWorld to the file. + * Applies all signs from the DEditWorld to the file. * * @param editWorld - * the EditWorld that contains the signs to serialize + * the DEditWorld that contains the signs to serialize * @throws IOException */ - public void serializeSigns(EditWorld editWorld) throws IOException { + public void serializeSigns(DEditWorld editWorld) throws IOException { serializeSigns(editWorld.getSigns()); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/event/dgroup/DGroupFinishFloorEvent.java b/src/main/java/io/github/dre2n/dungeonsxl/event/dgroup/DGroupFinishFloorEvent.java index 9e94b8a6..6fab15d4 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/event/dgroup/DGroupFinishFloorEvent.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/event/dgroup/DGroupFinishFloorEvent.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.event.dgroup; import io.github.dre2n.dungeonsxl.player.DGroup; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; @@ -29,10 +29,10 @@ public class DGroupFinishFloorEvent extends DGroupEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); private boolean cancelled; - private GameWorld finished; + private DGameWorld finished; private String next; - public DGroupFinishFloorEvent(DGroup dGroup, GameWorld finished, String next) { + public DGroupFinishFloorEvent(DGroup dGroup, DGameWorld finished, String next) { super(dGroup); this.finished = finished; this.next = next; @@ -41,15 +41,15 @@ public class DGroupFinishFloorEvent extends DGroupEvent implements Cancellable { /** * @return the finished */ - public GameWorld getFinished() { + public DGameWorld getFinished() { return finished; } /** * @param finished - * the name of the GameWorld to set + * the name of the DGameWorld to set */ - public void setFinished(GameWorld finished) { + public void setFinished(DGameWorld finished) { this.finished = finished; } @@ -62,7 +62,7 @@ public class DGroupFinishFloorEvent extends DGroupEvent implements Cancellable { /** * @param next - * the name of the GameWorld to set + * the name of the DGameWorld to set */ public void setNext(String next) { this.next = next; diff --git a/src/main/java/io/github/dre2n/dungeonsxl/event/dgroup/DGroupStartFloorEvent.java b/src/main/java/io/github/dre2n/dungeonsxl/event/dgroup/DGroupStartFloorEvent.java index 16387055..162c99a6 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/event/dgroup/DGroupStartFloorEvent.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/event/dgroup/DGroupStartFloorEvent.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.event.dgroup; import io.github.dre2n.dungeonsxl.player.DGroup; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; @@ -29,9 +29,9 @@ public class DGroupStartFloorEvent extends DGroupEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); private boolean cancelled; - private GameWorld gameWorld; + private DGameWorld gameWorld; - public DGroupStartFloorEvent(DGroup dGroup, GameWorld gameWorld) { + public DGroupStartFloorEvent(DGroup dGroup, DGameWorld gameWorld) { super(dGroup); this.gameWorld = gameWorld; } @@ -39,7 +39,7 @@ public class DGroupStartFloorEvent extends DGroupEvent implements Cancellable { /** * @return the gameWorld */ - public GameWorld getGameWorld() { + public DGameWorld getGameWorld() { return gameWorld; } @@ -47,7 +47,7 @@ public class DGroupStartFloorEvent extends DGroupEvent implements Cancellable { * @param gameWorld * the gameWorld to set */ - public void setGameWorld(GameWorld gameWorld) { + public void setGameWorld(DGameWorld gameWorld) { this.gameWorld = gameWorld; } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/event/dsign/DSignRegistrationEvent.java b/src/main/java/io/github/dre2n/dungeonsxl/event/dsign/DSignRegistrationEvent.java index e8fccf66..75d1d0f3 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/event/dsign/DSignRegistrationEvent.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/event/dsign/DSignRegistrationEvent.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.event.dsign; import io.github.dre2n.dungeonsxl.sign.DSign; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.block.Sign; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; @@ -31,9 +31,9 @@ public class DSignRegistrationEvent extends DSignEvent implements Cancellable { private boolean cancelled; private Sign sign; - private GameWorld gameWorld; + private DGameWorld gameWorld; - public DSignRegistrationEvent(Sign sign, GameWorld gameWorld, DSign dSign) { + public DSignRegistrationEvent(Sign sign, DGameWorld gameWorld, DSign dSign) { super(dSign); this.sign = sign; this.gameWorld = gameWorld; @@ -57,7 +57,7 @@ public class DSignRegistrationEvent extends DSignEvent implements Cancellable { /** * @return the gameWorld */ - public GameWorld getGameWorld() { + public DGameWorld getGameWorld() { return gameWorld; } @@ -65,7 +65,7 @@ public class DSignRegistrationEvent extends DSignEvent implements Cancellable { * @param gameWorld * the gameWorld to set */ - public void setGameWorld(GameWorld gameWorld) { + public void setGameWorld(DGameWorld gameWorld) { this.gameWorld = gameWorld; } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/event/editworld/EditWorldEvent.java b/src/main/java/io/github/dre2n/dungeonsxl/event/editworld/EditWorldEvent.java index a3975162..7900de70 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/event/editworld/EditWorldEvent.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/event/editworld/EditWorldEvent.java @@ -16,7 +16,7 @@ */ package io.github.dre2n.dungeonsxl.event.editworld; -import io.github.dre2n.dungeonsxl.world.EditWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; import org.bukkit.event.Event; /** @@ -24,16 +24,16 @@ import org.bukkit.event.Event; */ public abstract class EditWorldEvent extends Event { - protected EditWorld editWorld; + protected DEditWorld editWorld; - public EditWorldEvent(EditWorld editWorld) { + public EditWorldEvent(DEditWorld editWorld) { this.editWorld = editWorld; } /** * @return the editWorld */ - public EditWorld getEditWorld() { + public DEditWorld getEditWorld() { return editWorld; } @@ -41,7 +41,7 @@ public abstract class EditWorldEvent extends Event { * @param editWorld * the editWorld to set */ - public void setEditWorld(EditWorld editWorld) { + public void setEditWorld(DEditWorld editWorld) { this.editWorld = editWorld; } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/event/editworld/EditWorldGenerateEvent.java b/src/main/java/io/github/dre2n/dungeonsxl/event/editworld/EditWorldGenerateEvent.java index a8f6a4de..fa705133 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/event/editworld/EditWorldGenerateEvent.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/event/editworld/EditWorldGenerateEvent.java @@ -16,7 +16,7 @@ */ package io.github.dre2n.dungeonsxl.event.editworld; -import io.github.dre2n.dungeonsxl.world.EditWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; @@ -28,7 +28,7 @@ public class EditWorldGenerateEvent extends EditWorldEvent implements Cancellabl private static final HandlerList handlers = new HandlerList(); private boolean cancelled; - public EditWorldGenerateEvent(EditWorld editWorld) { + public EditWorldGenerateEvent(DEditWorld editWorld) { super(editWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/event/editworld/EditWorldSaveEvent.java b/src/main/java/io/github/dre2n/dungeonsxl/event/editworld/EditWorldSaveEvent.java index 20e4d5c8..ef4fe71b 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/event/editworld/EditWorldSaveEvent.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/event/editworld/EditWorldSaveEvent.java @@ -16,7 +16,7 @@ */ package io.github.dre2n.dungeonsxl.event.editworld; -import io.github.dre2n.dungeonsxl.world.EditWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; @@ -28,7 +28,7 @@ public class EditWorldSaveEvent extends EditWorldEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); private boolean cancelled; - public EditWorldSaveEvent(EditWorld editWorld) { + public EditWorldSaveEvent(DEditWorld editWorld) { super(editWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/event/editworld/EditWorldUnloadEvent.java b/src/main/java/io/github/dre2n/dungeonsxl/event/editworld/EditWorldUnloadEvent.java index 8b931508..cad8f1e3 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/event/editworld/EditWorldUnloadEvent.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/event/editworld/EditWorldUnloadEvent.java @@ -16,7 +16,7 @@ */ package io.github.dre2n.dungeonsxl.event.editworld; -import io.github.dre2n.dungeonsxl.world.EditWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; @@ -30,7 +30,7 @@ public class EditWorldUnloadEvent extends EditWorldEvent implements Cancellable private boolean save; - public EditWorldUnloadEvent(EditWorld editWorld, boolean save) { + public EditWorldUnloadEvent(DEditWorld editWorld, boolean save) { super(editWorld); this.save = save; } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/event/gameworld/GameWorldEvent.java b/src/main/java/io/github/dre2n/dungeonsxl/event/gameworld/GameWorldEvent.java index 2a74acc6..132c23fc 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/event/gameworld/GameWorldEvent.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/event/gameworld/GameWorldEvent.java @@ -16,7 +16,7 @@ */ package io.github.dre2n.dungeonsxl.event.gameworld; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.event.Event; /** @@ -24,16 +24,16 @@ import org.bukkit.event.Event; */ public abstract class GameWorldEvent extends Event { - protected GameWorld gameWorld; + protected DGameWorld gameWorld; - public GameWorldEvent(GameWorld gameWorld) { + public GameWorldEvent(DGameWorld gameWorld) { this.gameWorld = gameWorld; } /** * @return the gameWorld */ - public GameWorld getGameWorld() { + public DGameWorld getGameWorld() { return gameWorld; } @@ -41,7 +41,7 @@ public abstract class GameWorldEvent extends Event { * @param gameWorld * the gameWorld to set */ - public void setGameWorld(GameWorld gameWorld) { + public void setGameWorld(DGameWorld gameWorld) { this.gameWorld = gameWorld; } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/event/gameworld/GameWorldStartGameEvent.java b/src/main/java/io/github/dre2n/dungeonsxl/event/gameworld/GameWorldStartGameEvent.java index 209acec7..943966b9 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/event/gameworld/GameWorldStartGameEvent.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/event/gameworld/GameWorldStartGameEvent.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.event.gameworld; import io.github.dre2n.dungeonsxl.game.Game; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; @@ -31,7 +31,7 @@ public class GameWorldStartGameEvent extends GameWorldEvent implements Cancellab private Game game; - public GameWorldStartGameEvent(GameWorld gameWorld, Game game) { + public GameWorldStartGameEvent(DGameWorld gameWorld, Game game) { super(gameWorld); this.game = game; } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/event/gameworld/GameWorldUnloadEvent.java b/src/main/java/io/github/dre2n/dungeonsxl/event/gameworld/GameWorldUnloadEvent.java index 3ad91f27..a76be98f 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/event/gameworld/GameWorldUnloadEvent.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/event/gameworld/GameWorldUnloadEvent.java @@ -16,7 +16,7 @@ */ package io.github.dre2n.dungeonsxl.event.gameworld; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; @@ -29,7 +29,7 @@ public class GameWorldUnloadEvent extends GameWorldEvent implements Cancellable private boolean cancelled; - public GameWorldUnloadEvent(GameWorld gameWorld) { + public GameWorldUnloadEvent(DGameWorld gameWorld) { super(gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/game/Game.java b/src/main/java/io/github/dre2n/dungeonsxl/game/Game.java index c4300457..4c150b4a 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/game/Game.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/game/Game.java @@ -27,8 +27,8 @@ import io.github.dre2n.dungeonsxl.player.DGroup; import io.github.dre2n.dungeonsxl.sign.DSign; import io.github.dre2n.dungeonsxl.sign.MobSign; import io.github.dre2n.dungeonsxl.trigger.ProgressTrigger; -import io.github.dre2n.dungeonsxl.world.GameWorld; -import io.github.dre2n.dungeonsxl.world.ResourceWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; +import io.github.dre2n.dungeonsxl.world.DResourceWorld; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -50,7 +50,7 @@ public class Game { private List dGroups = new ArrayList<>(); private boolean started; private GameType type = GameTypeDefault.DEFAULT; - private GameWorld world; + private DGameWorld world; private GameRules rules; private int waveCount; private Map gameKills = new HashMap<>(); @@ -64,7 +64,7 @@ public class Game { plugin.getGames().add(this); } - public Game(DGroup dGroup, GameWorld world) { + public Game(DGroup dGroup, DGameWorld world) { dGroups.add(dGroup); started = false; this.world = world; @@ -78,18 +78,18 @@ public class Game { dGroups.add(dGroup); started = false; - // TO DO world = new GameWorld(); - ResourceWorld resource = plugin.getWorlds().getResourceByName(worldName); + // TO DO world = new DGameWorld(); + DResourceWorld resource = plugin.getDWorlds().getResourceByName(worldName); dGroup.setGameWorld(world); resource.instantiateAsGameWorld(); fetchRules(); } - public Game(DGroup dGroup, GameType type, GameWorld world) { + public Game(DGroup dGroup, GameType type, DGameWorld world) { this(new ArrayList<>(Arrays.asList(dGroup)), type, world); } - public Game(List dGroups, GameType type, GameWorld world) { + public Game(List dGroups, GameType type, DGameWorld world) { this.dGroups = dGroups; this.type = type; this.world = world; @@ -157,17 +157,17 @@ public class Game { } /** - * @return the GameWorld connected to the Game + * @return the DGameWorld connected to the Game */ - public GameWorld getWorld() { + public DGameWorld getWorld() { return world; } /** * @param world - * the GameWorld to connect to the Game + * the DGameWorld to connect to the Game */ - public void setWorld(GameWorld world) { + public void setWorld(DGameWorld world) { this.world = world; } @@ -236,8 +236,8 @@ public class Game { * * @return the unplayed floors */ - public List getUnplayedFloors() { - List unplayedFloors = new ArrayList<>(); + public List getUnplayedFloors() { + List unplayedFloors = new ArrayList<>(); for (DGroup dGroup : dGroups) { if (dGroup.getUnplayedFloors().size() < unplayedFloors.size()) { unplayedFloors = dGroup.getUnplayedFloors(); @@ -427,7 +427,7 @@ public class Game { return getByDGroup(DGroup.getByPlayer(player)); } - public static Game getByGameWorld(GameWorld gameWorld) { + public static Game getByGameWorld(DGameWorld gameWorld) { for (Game game : plugin.getGames()) { if (game.getWorld().equals(gameWorld)) { return game; @@ -438,7 +438,7 @@ public class Game { } public static Game getByWorld(World world) { - GameWorld gameWorld = GameWorld.getByWorld(world); + DGameWorld gameWorld = DGameWorld.getByWorld(world); if (gameWorld != null) { return getByGameWorld(gameWorld); } else { diff --git a/src/main/java/io/github/dre2n/dungeonsxl/game/GamePlaceableBlock.java b/src/main/java/io/github/dre2n/dungeonsxl/game/GamePlaceableBlock.java index 6f3bb96b..f2fa393b 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/game/GamePlaceableBlock.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/game/GamePlaceableBlock.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.game; import io.github.dre2n.commons.util.NumberUtil; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.util.HashSet; import java.util.Set; import org.bukkit.Material; @@ -254,7 +254,7 @@ public class GamePlaceableBlock { } // Can build - public static boolean canBuildHere(Block block, BlockFace blockFace, Material mat, GameWorld gameWorld) { + public static boolean canBuildHere(Block block, BlockFace blockFace, Material mat, DGameWorld gameWorld) { for (GamePlaceableBlock gamePlacableBlock : gameWorld.getPlaceableBlocks()) { if (gamePlacableBlock.block.getFace(block) != BlockFace.SELF) { continue; diff --git a/src/main/java/io/github/dre2n/dungeonsxl/global/DPortal.java b/src/main/java/io/github/dre2n/dungeonsxl/global/DPortal.java index 2ec333bd..02b2d2dd 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/global/DPortal.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/global/DPortal.java @@ -22,7 +22,7 @@ import io.github.dre2n.dungeonsxl.config.DMessages; import io.github.dre2n.dungeonsxl.game.Game; import io.github.dre2n.dungeonsxl.player.DGamePlayer; import io.github.dre2n.dungeonsxl.player.DGroup; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.util.HashSet; import java.util.Set; import org.bukkit.Location; @@ -167,7 +167,7 @@ public class DPortal extends GlobalProtection { return; } - GameWorld target = dGroup.getGameWorld(); + DGameWorld target = dGroup.getGameWorld(); Game game = Game.getByDGroup(dGroup); if (target == null && game != null) { @@ -186,7 +186,7 @@ public class DPortal extends GlobalProtection { } if (target == null && dGroup.getMapName() != null) { - target = plugin.getWorlds().getResourceByName(dGroup.getMapName()).instantiateAsGameWorld();//TO DO + target = plugin.getDWorlds().getResourceByName(dGroup.getMapName()).instantiateAsGameWorld();//TO DO dGroup.setGameWorld(target); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/global/GameSign.java b/src/main/java/io/github/dre2n/dungeonsxl/global/GameSign.java index 24de87e9..f8adbdbb 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/global/GameSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/global/GameSign.java @@ -469,7 +469,7 @@ public class GameSign extends GlobalProtection { return false; } - if (plugin.getWorlds().getGameWorlds().size() >= plugin.getMainConfig().getMaxInstances()) { + if (plugin.getDWorlds().getGameWorlds().size() >= plugin.getMainConfig().getMaxInstances()) { MessageUtil.sendMessage(player, DMessages.ERROR_TOO_MANY_INSTANCES.getMessage()); return true; } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/listener/BlockListener.java b/src/main/java/io/github/dre2n/dungeonsxl/listener/BlockListener.java index 1fe0ddb2..0fb1b361 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/listener/BlockListener.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/listener/BlockListener.java @@ -34,8 +34,8 @@ import io.github.dre2n.dungeonsxl.player.DPermissions; import io.github.dre2n.dungeonsxl.player.DPlayers; import io.github.dre2n.dungeonsxl.sign.DSign; import io.github.dre2n.dungeonsxl.task.RedstoneEventTask; -import io.github.dre2n.dungeonsxl.world.EditWorld; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Block; @@ -91,15 +91,15 @@ public class BlockListener implements Listener { return; } - // EditWorld Signs - EditWorld editWorld = EditWorld.getByWorld(block.getWorld()); + // DEditWorld Signs + DEditWorld editWorld = DEditWorld.getByWorld(block.getWorld()); if (editWorld != null) { editWorld.getSigns().remove(event.getBlock()); return; } - // Deny GameWorld block breaking - GameWorld gameWorld = GameWorld.getByWorld(block.getWorld()); + // Deny DGameWorld block breaking + DGameWorld gameWorld = DGameWorld.getByWorld(block.getWorld()); if (gameWorld != null) { for (DSign dSign : gameWorld.getDSigns()) { if (dSign.getSign().equals(block)) { @@ -128,8 +128,8 @@ public class BlockListener implements Listener { public void onPlace(BlockPlaceEvent event) { Block block = event.getBlock(); - // Deny GameWorld Blocks - GameWorld gameWorld = GameWorld.getByWorld(block.getWorld()); + // Deny DGameWorld Blocks + DGameWorld gameWorld = DGameWorld.getByWorld(block.getWorld()); if (gameWorld == null) { return; } @@ -162,7 +162,7 @@ public class BlockListener implements Listener { Player player = event.getPlayer(); Block block = event.getBlock(); String[] lines = event.getLines(); - EditWorld editWorld = EditWorld.getByWorld(player.getWorld()); + DEditWorld editWorld = DEditWorld.getByWorld(player.getWorld()); // Group Signs if (editWorld == null) { @@ -251,13 +251,13 @@ public class BlockListener implements Listener { } // Check GameWorlds - GameWorld gameWorld = GameWorld.getByWorld(event.getBlock().getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(event.getBlock().getWorld()); if (gameWorld != null) { event.setCancelled(true); } // Check EditWorlds - EditWorld editWorld = EditWorld.getByWorld(event.getBlock().getWorld()); + DEditWorld editWorld = DEditWorld.getByWorld(event.getBlock().getWorld()); if (editWorld != null) { event.setCancelled(true); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/listener/EntityListener.java b/src/main/java/io/github/dre2n/dungeonsxl/listener/EntityListener.java index 2668483c..669c5398 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/listener/EntityListener.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/listener/EntityListener.java @@ -21,8 +21,8 @@ import io.github.dre2n.dungeonsxl.game.Game; import io.github.dre2n.dungeonsxl.mob.DMob; import io.github.dre2n.dungeonsxl.player.DGamePlayer; import io.github.dre2n.dungeonsxl.player.DGroup; -import io.github.dre2n.dungeonsxl.world.EditWorld; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.util.List; import org.bukkit.Material; import org.bukkit.World; @@ -52,7 +52,7 @@ public class EntityListener implements Listener { // Remove drops from breaking Signs @EventHandler(priority = EventPriority.HIGH) public void onItemSpawn(ItemSpawnEvent event) { - if (GameWorld.getByWorld(event.getLocation().getWorld()) != null) { + if (DGameWorld.getByWorld(event.getLocation().getWorld()) != null) { if (event.getEntity().getItemStack().getType() == Material.SIGN) { event.setCancelled(true); } @@ -63,8 +63,8 @@ public class EntityListener implements Listener { public void onCreatureSpawn(CreatureSpawnEvent event) { World world = event.getLocation().getWorld(); - EditWorld editWorld = EditWorld.getByWorld(world); - GameWorld gameWorld = GameWorld.getByWorld(world); + DEditWorld editWorld = DEditWorld.getByWorld(world); + DGameWorld gameWorld = DGameWorld.getByWorld(world); if (editWorld != null || gameWorld != null) { switch (event.getSpawnReason()) { @@ -83,7 +83,7 @@ public class EntityListener implements Listener { if (event.getEntity() instanceof LivingEntity) { LivingEntity entity = event.getEntity(); - GameWorld gameWorld = GameWorld.getByWorld(world); + DGameWorld gameWorld = DGameWorld.getByWorld(world); if (gameWorld != null) { if (gameWorld.isPlaying()) { DMob dMob = DMob.getByEntity(entity); @@ -98,7 +98,7 @@ public class EntityListener implements Listener { @EventHandler(priority = EventPriority.HIGH) public void onDamage(EntityDamageEvent event) { World world = event.getEntity().getWorld(); - GameWorld gameWorld = GameWorld.getByWorld(world); + DGameWorld gameWorld = DGameWorld.getByWorld(world); if (gameWorld == null) { return; @@ -138,7 +138,7 @@ public class EntityListener implements Listener { @EventHandler(priority = EventPriority.HIGH) public void onDamageByEntity(EntityDamageByEntityEvent event) { World world = event.getEntity().getWorld(); - GameWorld gameWorld = GameWorld.getByWorld(world); + DGameWorld gameWorld = DGameWorld.getByWorld(world); if (gameWorld == null) { return; @@ -223,7 +223,7 @@ public class EntityListener implements Listener { public void onFoodLevelChange(FoodLevelChangeEvent event) { World world = event.getEntity().getWorld(); - GameWorld gameWorld = GameWorld.getByWorld(world); + DGameWorld gameWorld = DGameWorld.getByWorld(world); if (gameWorld != null) { if (!gameWorld.isPlaying()) { event.setCancelled(true); @@ -234,7 +234,7 @@ public class EntityListener implements Listener { // Zombie/skeleton combustion from the sun. @EventHandler(priority = EventPriority.NORMAL) public void onCombust(EntityCombustEvent event) { - GameWorld gameWorld = GameWorld.getByWorld(event.getEntity().getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(event.getEntity().getWorld()); if (gameWorld != null) { event.setCancelled(true); } @@ -243,7 +243,7 @@ public class EntityListener implements Listener { // Allow Other combustion @EventHandler(priority = EventPriority.HIGH) public void onCombustByEntity(EntityCombustByEntityEvent event) { - GameWorld gameWorld = GameWorld.getByWorld(event.getEntity().getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(event.getEntity().getWorld()); if (gameWorld != null) { if (event.isCancelled()) { event.setCancelled(false); @@ -254,7 +254,7 @@ public class EntityListener implements Listener { // Explosions @EventHandler public void onExplode(EntityExplodeEvent event) { - GameWorld gameWorld = GameWorld.getByWorld(event.getEntity().getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(event.getEntity().getWorld()); if (gameWorld != null) { if (event.getEntity() instanceof LivingEntity) { diff --git a/src/main/java/io/github/dre2n/dungeonsxl/listener/HangingListener.java b/src/main/java/io/github/dre2n/dungeonsxl/listener/HangingListener.java index b15c0ce6..7ae81518 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/listener/HangingListener.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/listener/HangingListener.java @@ -16,7 +16,7 @@ */ package io.github.dre2n.dungeonsxl.listener; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.hanging.HangingBreakByEntityEvent; @@ -28,7 +28,7 @@ public class HangingListener implements Listener { @EventHandler public void onHangingBreakByEntity(HangingBreakByEntityEvent event) { - GameWorld gameWorld = GameWorld.getByWorld(event.getEntity().getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(event.getEntity().getWorld()); if (gameWorld != null) { event.setCancelled(true); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/listener/PlayerListener.java b/src/main/java/io/github/dre2n/dungeonsxl/listener/PlayerListener.java index 993e2d79..91430bc3 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/listener/PlayerListener.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/listener/PlayerListener.java @@ -42,8 +42,8 @@ import io.github.dre2n.dungeonsxl.sign.OpenDoorSign; import io.github.dre2n.dungeonsxl.task.RespawnTask; import io.github.dre2n.dungeonsxl.trigger.InteractTrigger; import io.github.dre2n.dungeonsxl.trigger.UseItemTrigger; -import io.github.dre2n.dungeonsxl.world.EditWorld; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.util.ArrayList; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -87,7 +87,7 @@ public class PlayerListener implements Listener { public void onDeath(PlayerDeathEvent event) { Player player = event.getEntity(); - GameWorld gameWorld = GameWorld.getByWorld(player.getLocation().getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(player.getLocation().getWorld()); if (gameWorld == null) { return; } @@ -149,7 +149,7 @@ public class PlayerListener implements Listener { if (clickedBlock != null) { // Block Enderchests - if (GameWorld.getByWorld(player.getWorld()) != null || EditWorld.getByWorld(player.getWorld()) != null) { + if (DGameWorld.getByWorld(player.getWorld()) != null || DEditWorld.getByWorld(player.getWorld()) != null) { if (event.getAction() != Action.LEFT_CLICK_BLOCK) { if (clickedBlock.getType() == Material.ENDER_CHEST) { if (!DPermissions.hasPermission(player, DPermissions.BYPASS)) { @@ -167,7 +167,7 @@ public class PlayerListener implements Listener { } // Block Dispensers - if (GameWorld.getByWorld(player.getWorld()) != null) { + if (DGameWorld.getByWorld(player.getWorld()) != null) { if (event.getAction() != Action.LEFT_CLICK_BLOCK) { if (clickedBlock.getType() == Material.DISPENSER) { if (!DPermissions.hasPermission(player, DPermissions.BYPASS)) { @@ -209,7 +209,7 @@ public class PlayerListener implements Listener { } // Copy/Paste a Sign and Block-info - if (EditWorld.getByWorld(player.getWorld()) != null) { + if (DEditWorld.getByWorld(player.getWorld()) != null) { if (event.getAction() == Action.RIGHT_CLICK_BLOCK) { if (item.getType() == Material.STICK) { DEditPlayer dPlayer = DEditPlayer.getByPlayer(player); @@ -222,7 +222,7 @@ public class PlayerListener implements Listener { } // Trigger UseItem Signs - GameWorld gameWorld = GameWorld.getByWorld(player.getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(player.getWorld()); if (gameWorld != null) { if (event.getAction() == Action.RIGHT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_AIR) { String name = null; @@ -272,8 +272,8 @@ public class PlayerListener implements Listener { DGamePlayer dPlayer = DGamePlayer.getByPlayer(player); if (dPlayer != null) { - // Check GameWorld Signs - GameWorld gameWorld = GameWorld.getByWorld(player.getWorld()); + // Check DGameWorld Signs + DGameWorld gameWorld = DGameWorld.getByWorld(player.getWorld()); if (gameWorld != null) { // Trigger InteractTrigger @@ -360,7 +360,7 @@ public class PlayerListener implements Listener { } if (dPlayer instanceof DEditPlayer) { - EditWorld editWorld = EditWorld.getByWorld(((DEditPlayer) dPlayer).getWorld()); + DEditWorld editWorld = DEditWorld.getByWorld(((DEditPlayer) dPlayer).getWorld()); if (editWorld == null) { return; } @@ -375,7 +375,7 @@ public class PlayerListener implements Listener { } else if (dPlayer instanceof DGamePlayer) { DGamePlayer gamePlayer = (DGamePlayer) dPlayer; - GameWorld gameWorld = GameWorld.getByWorld(gamePlayer.getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(gamePlayer.getWorld()); if (gameWorld == null) { return; @@ -497,7 +497,7 @@ public class PlayerListener implements Listener { target = dSavePlayer.getOldLocation(); } - if (EditWorld.getByWorld(player.getWorld()) != null || GameWorld.getByWorld(player.getWorld()) != null) { + if (DEditWorld.getByWorld(player.getWorld()) != null || DGameWorld.getByWorld(player.getWorld()) != null) { player.teleport(target); } } @@ -538,7 +538,7 @@ public class PlayerListener implements Listener { } if (dGroup.getGameWorld() == null) { - dGroup.setGameWorld(plugin.getWorlds().getResourceByName(DGroup.getByPlayer(player).getMapName()).instantiateAsGameWorld());// TO DO + dGroup.setGameWorld(plugin.getDWorlds().getResourceByName(DGroup.getByPlayer(player).getMapName()).instantiateAsGameWorld());// TO DO dGroup.getGameWorld().setTutorial(true); } @@ -578,7 +578,7 @@ public class PlayerListener implements Listener { continue; } - if (plugin.getWorlds().getGameWorlds().size() >= config.getMaxInstances()) { + if (plugin.getDWorlds().getGameWorlds().size() >= config.getMaxInstances()) { event.setResult(PlayerLoginEvent.Result.KICK_FULL); event.setKickMessage(DMessages.ERROR_TOO_MANY_TUTORIALS.getMessage()); } @@ -646,7 +646,7 @@ public class PlayerListener implements Listener { if (!plugin.getMainConfig().getOpenInventories() && !DPermissions.hasPermission(event.getPlayer(), DPermissions.INSECURE)) { World world = event.getPlayer().getWorld(); - if (event.getInventory().getType() != InventoryType.CREATIVE && EditWorld.getByWorld(world) != null) { + if (event.getInventory().getType() != InventoryType.CREATIVE && DEditWorld.getByWorld(world) != null) { event.setCancelled(true); } } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/listener/WorldListener.java b/src/main/java/io/github/dre2n/dungeonsxl/listener/WorldListener.java index e902336e..fb62ee1f 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/listener/WorldListener.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/listener/WorldListener.java @@ -16,8 +16,8 @@ */ package io.github.dre2n.dungeonsxl.listener; -import io.github.dre2n.dungeonsxl.world.EditWorld; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; @@ -31,7 +31,7 @@ public class WorldListener implements Listener { @EventHandler(priority = EventPriority.HIGH) public void onChunkUnload(ChunkUnloadEvent event) { - GameWorld gameWorld = GameWorld.getByWorld(event.getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(event.getWorld()); if (gameWorld != null) { if (gameWorld.getLoadedChunks().contains(event.getChunk())) { event.setCancelled(true); @@ -41,7 +41,7 @@ public class WorldListener implements Listener { @EventHandler(priority = EventPriority.HIGHEST) public void onWeatherChange(WeatherChangeEvent event) { - if (EditWorld.getByWorld(event.getWorld()) != null) { + if (DEditWorld.getByWorld(event.getWorld()) != null) { if (event.toWeatherState()) { event.setCancelled(true); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/mob/CitizensMobProvider.java b/src/main/java/io/github/dre2n/dungeonsxl/mob/CitizensMobProvider.java index 4e5ebe1d..aac46315 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/mob/CitizensMobProvider.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/mob/CitizensMobProvider.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.mob; import io.github.dre2n.commons.util.NumberUtil; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.util.HashSet; import java.util.Set; import net.citizensnpcs.api.CitizensAPI; @@ -84,7 +84,7 @@ public class CitizensMobProvider implements ExternalMobProvider { npc.spawn(location); spawnedNPCs.add(npc); - GameWorld gameWorld = GameWorld.getByWorld(location.getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(location.getWorld()); new DMob((LivingEntity) npc.getEntity(), gameWorld, null, mob); } } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/mob/DMob.java b/src/main/java/io/github/dre2n/dungeonsxl/mob/DMob.java index 5eb41673..71b6b52f 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/mob/DMob.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/mob/DMob.java @@ -21,7 +21,7 @@ import io.github.dre2n.dungeonsxl.event.dmob.DMobSpawnEvent; import io.github.dre2n.dungeonsxl.game.Game; import io.github.dre2n.dungeonsxl.trigger.MobTrigger; import io.github.dre2n.dungeonsxl.trigger.WaveTrigger; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.util.Random; import java.util.Set; import org.bukkit.Bukkit; @@ -41,7 +41,7 @@ public class DMob { private String trigger; - public DMob(LivingEntity entity, GameWorld gameWorld, DMobType type) { + public DMob(LivingEntity entity, DGameWorld gameWorld, DMobType type) { gameWorld.addDMob(this); this.entity = entity; @@ -64,7 +64,7 @@ public class DMob { } } - public DMob(LivingEntity entity, GameWorld gameWorld, DMobType type, String trigger) { + public DMob(LivingEntity entity, DGameWorld gameWorld, DMobType type, String trigger) { this(entity, gameWorld, type); this.trigger = trigger; } @@ -101,7 +101,7 @@ public class DMob { /* Actions */ public void onDeath(EntityDeathEvent event) { LivingEntity victim = event.getEntity(); - GameWorld gameWorld = GameWorld.getByWorld(victim.getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(victim.getWorld()); String name = null; if (gameWorld == null) { @@ -153,7 +153,7 @@ public class DMob { /* Statics */ public static DMob getByEntity(Entity entity) { - GameWorld gameWorld = GameWorld.getByWorld(entity.getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(entity.getWorld()); for (DMob dMob : gameWorld.getDMobs()) { if (dMob.entity == entity) { diff --git a/src/main/java/io/github/dre2n/dungeonsxl/mob/DMobType.java b/src/main/java/io/github/dre2n/dungeonsxl/mob/DMobType.java index 3b4a837d..7d9f98ed 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/mob/DMobType.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/mob/DMobType.java @@ -20,7 +20,7 @@ import io.github.dre2n.commons.util.EnumUtil; import io.github.dre2n.commons.util.NumberUtil; import io.github.dre2n.commons.util.messageutil.MessageUtil; import io.github.dre2n.dungeonsxl.config.DMessages; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.io.File; import java.util.Arrays; import java.util.HashMap; @@ -358,7 +358,7 @@ public class DMobType { } /* Actions */ - public void spawn(GameWorld gameWorld, Location loc) { + public void spawn(DGameWorld gameWorld, Location loc) { if (type == null) { return; } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/player/DEditPlayer.java b/src/main/java/io/github/dre2n/dungeonsxl/player/DEditPlayer.java index e3759f9c..78a5884e 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/player/DEditPlayer.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/player/DEditPlayer.java @@ -20,7 +20,7 @@ import io.github.dre2n.commons.util.messageutil.MessageUtil; import io.github.dre2n.commons.util.playerutil.PlayerUtil; import io.github.dre2n.dungeonsxl.config.DMessages; import io.github.dre2n.dungeonsxl.event.dplayer.DPlayerUpdateEvent; -import io.github.dre2n.dungeonsxl.world.EditWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; import java.util.concurrent.CopyOnWriteArrayList; import org.bukkit.ChatColor; import org.bukkit.GameMode; @@ -32,7 +32,7 @@ import org.bukkit.entity.Player; import org.bukkit.event.block.SignChangeEvent; /** - * Represents a player in an EditWorld. + * Represents a player in an DEditWorld. * * @author Daniel Saukel */ @@ -40,7 +40,7 @@ public class DEditPlayer extends DInstancePlayer { private String[] linesCopy; - public DEditPlayer(DGlobalPlayer player, EditWorld world) { + public DEditPlayer(DGlobalPlayer player, DEditWorld world) { this(player.getPlayer(), world.getWorld()); } @@ -50,7 +50,7 @@ public class DEditPlayer extends DInstancePlayer { player.setGameMode(GameMode.CREATIVE); clearPlayerData(); - Location teleport = EditWorld.getByWorld(world).getLobbyLocation(); + Location teleport = DEditWorld.getByWorld(world).getLobbyLocation(); if (teleport == null) { PlayerUtil.secureTeleport(player, world.getSpawnLocation()); } else { @@ -95,7 +95,7 @@ public class DEditPlayer extends DInstancePlayer { } /** - * Escape the EditWorld without saving. + * Escape the DEditWorld without saving. */ public void escape() { delete(); @@ -137,7 +137,7 @@ public class DEditPlayer extends DInstancePlayer { getSavePlayer().reset(false); - EditWorld editWorld = EditWorld.getByWorld(getWorld()); + DEditWorld editWorld = DEditWorld.getByWorld(getWorld()); if (editWorld != null) { editWorld.save(); } @@ -145,7 +145,7 @@ public class DEditPlayer extends DInstancePlayer { @Override public void sendMessage(String message) { - EditWorld editWorld = EditWorld.getByWorld(getWorld()); + DEditWorld editWorld = DEditWorld.getByWorld(getWorld()); editWorld.sendMessage(message); for (DGlobalPlayer player : plugin.getDPlayers().getDGlobalPlayers()) { @@ -162,7 +162,7 @@ public class DEditPlayer extends DInstancePlayer { boolean locationValid = true; Location teleportLocation = player.getLocation(); - EditWorld editWorld = EditWorld.getByWorld(getWorld()); + DEditWorld editWorld = DEditWorld.getByWorld(getWorld()); if (!getPlayer().getWorld().equals(getWorld())) { locationValid = false; diff --git a/src/main/java/io/github/dre2n/dungeonsxl/player/DGamePlayer.java b/src/main/java/io/github/dre2n/dungeonsxl/player/DGamePlayer.java index 3ab757f0..7799a3f0 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/player/DGamePlayer.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/player/DGamePlayer.java @@ -38,8 +38,8 @@ import io.github.dre2n.dungeonsxl.requirement.Requirement; import io.github.dre2n.dungeonsxl.reward.DLootInventory; import io.github.dre2n.dungeonsxl.reward.Reward; import io.github.dre2n.dungeonsxl.trigger.DistanceTrigger; -import io.github.dre2n.dungeonsxl.world.GameWorld; -import io.github.dre2n.dungeonsxl.world.ResourceWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; +import io.github.dre2n.dungeonsxl.world.DResourceWorld; import java.io.File; import java.util.concurrent.CopyOnWriteArrayList; import org.bukkit.ChatColor; @@ -56,7 +56,7 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.potion.PotionEffect; /** - * Represents a player in a GameWorld. + * Represents a player in a DGameWorld. * * @author Frank Baumann, Tobias Schmitz, Milan Albrecht, Daniel Saukel */ @@ -77,7 +77,7 @@ public class DGamePlayer extends DInstancePlayer { private int initialLives = -1; private int lives; - public DGamePlayer(Player player, GameWorld gameWorld) { + public DGamePlayer(Player player, DGameWorld gameWorld) { this(player, gameWorld.getWorld()); } @@ -103,7 +103,7 @@ public class DGamePlayer extends DInstancePlayer { initialLives = rules.getInitialLives(); lives = initialLives; - Location teleport = GameWorld.getByWorld(world).getLobbyLocation(); + Location teleport = DGameWorld.getByWorld(world).getLobbyLocation(); if (teleport == null) { PlayerUtil.secureTeleport(player, world.getSpawnLocation()); } else { @@ -129,7 +129,7 @@ public class DGamePlayer extends DInstancePlayer { return false; } - GameWorld gameWorld = dGroup.getGameWorld(); + DGameWorld gameWorld = dGroup.getGameWorld(); if (gameWorld == null) { return false; } @@ -392,7 +392,7 @@ public class DGamePlayer extends DInstancePlayer { dGroup.removePlayer(getPlayer(), message); } - GameWorld gameWorld = GameWorld.getByWorld(getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(getWorld()); Game game = Game.getByGameWorld(gameWorld); if (game != null) { if (finished) { @@ -639,7 +639,7 @@ public class DGamePlayer extends DInstancePlayer { * @param specifiedFloor * the name of the next floor */ - public void finishFloor(ResourceWorld specifiedFloor) { + public void finishFloor(DResourceWorld specifiedFloor) { MessageUtil.sendMessage(getPlayer(), DMessages.PLAYER_FINISHED_DUNGEON.getMessage()); finished = true; @@ -681,7 +681,7 @@ public class DGamePlayer extends DInstancePlayer { DungeonConfig dConfig = dGroup.getDungeon().getConfig(); int random = NumberUtil.generateRandomInt(0, dConfig.getFloors().size()); - ResourceWorld newFloor = dGroup.getUnplayedFloors().get(random); + DResourceWorld newFloor = dGroup.getUnplayedFloors().get(random); if (dConfig.getFloorCount() == dGroup.getFloorCount() - 1) { newFloor = dConfig.getEndFloor(); @@ -700,7 +700,7 @@ public class DGamePlayer extends DInstancePlayer { dGroup.removeUnplayedFloor(dGroup.getGameWorld().getResource(), false); dGroup.setMapName(newFloor.getName()); - GameWorld gameWorld = null; + DGameWorld gameWorld = null; if (newFloor != null) { gameWorld = newFloor.instantiateAsGameWorld(); } @@ -794,7 +794,7 @@ public class DGamePlayer extends DInstancePlayer { @Override public void sendMessage(String message) { - GameWorld gameWorld = GameWorld.getByWorld(getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(getWorld()); gameWorld.sendMessage(message); for (DGlobalPlayer player : plugin.getDPlayers().getDGlobalPlayers()) { @@ -820,7 +820,7 @@ public class DGamePlayer extends DInstancePlayer { boolean kick = false; boolean triggerAllInDistance = false; - GameWorld gameWorld = GameWorld.getByWorld(getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(getWorld()); if (!updateSecond) { if (!getPlayer().getWorld().equals(getWorld())) { diff --git a/src/main/java/io/github/dre2n/dungeonsxl/player/DGroup.java b/src/main/java/io/github/dre2n/dungeonsxl/player/DGroup.java index 246e00e4..e4720f12 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/player/DGroup.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/player/DGroup.java @@ -33,8 +33,8 @@ import io.github.dre2n.dungeonsxl.global.GroupSign; import io.github.dre2n.dungeonsxl.requirement.Requirement; import io.github.dre2n.dungeonsxl.reward.Reward; import io.github.dre2n.dungeonsxl.task.TimeIsRunningTask; -import io.github.dre2n.dungeonsxl.world.GameWorld; -import io.github.dre2n.dungeonsxl.world.ResourceWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; +import io.github.dre2n.dungeonsxl.world.DResourceWorld; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; @@ -59,13 +59,13 @@ public class DGroup { private Dungeon dungeon; private String dungeonName; private String mapName; - private List unplayedFloors = new ArrayList<>(); - private GameWorld gameWorld; + private List unplayedFloors = new ArrayList<>(); + private DGameWorld gameWorld; private boolean playing; private int floorCount; private List rewards = new ArrayList<>(); private BukkitTask timeIsRunningTask; - private ResourceWorld nextFloor; + private DResourceWorld nextFloor; public DGroup(Player player) { this("Group_" + plugin.getDGroups().size(), player); @@ -343,7 +343,7 @@ public class DGroup { /** * @return the gameWorld */ - public GameWorld getGameWorld() { + public DGameWorld getGameWorld() { return gameWorld; } @@ -351,7 +351,7 @@ public class DGroup { * @param gameWorld * the gameWorld to set */ - public void setGameWorld(GameWorld gameWorld) { + public void setGameWorld(DGameWorld gameWorld) { this.gameWorld = gameWorld; } @@ -422,7 +422,7 @@ public class DGroup { * the name to set */ public void setMapName(String name) { - if (plugin.getWorlds().exists(name)) { + if (plugin.getDWorlds().exists(name)) { mapName = name; } } @@ -430,7 +430,7 @@ public class DGroup { /** * @return the unplayed floors */ - public List getUnplayedFloors() { + public List getUnplayedFloors() { return unplayedFloors; } @@ -438,7 +438,7 @@ public class DGroup { * @param unplayedFloor * the unplayed floor to add */ - public void addUnplayedFloor(ResourceWorld unplayedFloor) { + public void addUnplayedFloor(DResourceWorld unplayedFloor) { unplayedFloors.add(unplayedFloor); } @@ -448,7 +448,7 @@ public class DGroup { * @param force * remove the floor even if removeWhenPlayed is disabled */ - public void removeUnplayedFloor(ResourceWorld unplayedFloor, boolean force) { + public void removeUnplayedFloor(DResourceWorld unplayedFloor, boolean force) { if (getDungeon().getConfig().getRemoveWhenPlayed() || force) { unplayedFloors.remove(unplayedFloor); } @@ -546,7 +546,7 @@ public class DGroup { /** * @return the next floor the group will enter */ - public ResourceWorld getNextFloor() { + public DResourceWorld getNextFloor() { return nextFloor; } @@ -554,7 +554,7 @@ public class DGroup { * @param floor * the next floor to set */ - public void setNextFloor(ResourceWorld floor) { + public void setNextFloor(DResourceWorld floor) { nextFloor = floor; } @@ -781,10 +781,10 @@ public class DGroup { /** * @param gameWorld - * the GameWorld to check - * @return a List of DGroups in this GameWorld + * the DGameWorld to check + * @return a List of DGroups in this DGameWorld */ - public static List getByGameWorld(GameWorld gameWorld) { + public static List getByGameWorld(DGameWorld gameWorld) { List dGroups = new ArrayList<>(); for (DGroup dGroup : plugin.getDGroups()) { if (dGroup.getGameWorld().equals(gameWorld)) { diff --git a/src/main/java/io/github/dre2n/dungeonsxl/reward/RewardChest.java b/src/main/java/io/github/dre2n/dungeonsxl/reward/RewardChest.java index 675ffcb0..e85f2443 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/reward/RewardChest.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/reward/RewardChest.java @@ -21,7 +21,7 @@ import io.github.dre2n.dungeonsxl.DungeonsXL; import io.github.dre2n.dungeonsxl.config.DMessages; import io.github.dre2n.dungeonsxl.player.DGamePlayer; import io.github.dre2n.dungeonsxl.player.DGroup; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import net.milkbowl.vault.item.ItemInfo; import net.milkbowl.vault.item.Items; import org.bukkit.Bukkit; @@ -43,11 +43,11 @@ public class RewardChest { // Variables private boolean used = false; private Chest chest; - private GameWorld gameWorld; + private DGameWorld gameWorld; private double moneyReward; private int levelReward; - public RewardChest(Block chest, GameWorld gameWorld, double moneyReward, int levelReward) { + public RewardChest(Block chest, DGameWorld gameWorld, double moneyReward, int levelReward) { if (!(chest.getState() instanceof Chest)) { return; } @@ -93,7 +93,7 @@ public class RewardChest { /** * @return the gameWorld */ - public GameWorld getGameWorld() { + public DGameWorld getGameWorld() { return gameWorld; } @@ -101,7 +101,7 @@ public class RewardChest { * @param gameWorld * the gameWorld to set */ - public void setGameWorld(GameWorld gameWorld) { + public void setGameWorld(DGameWorld gameWorld) { this.gameWorld = gameWorld; } @@ -227,7 +227,7 @@ public class RewardChest { public static void onOpenInventory(InventoryOpenEvent event) { InventoryView inventory = event.getView(); - GameWorld gameWorld = GameWorld.getByWorld(event.getPlayer().getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(event.getPlayer().getWorld()); if (gameWorld == null) { return; diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/BlockSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/BlockSign.java index a9341742..1351e43f 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/BlockSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/BlockSign.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.commons.util.NumberUtil; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -36,7 +36,7 @@ public class BlockSign extends DSign { private byte offBlockData = 0x0; private byte onBlockData = 0x0; - public BlockSign(Sign sign, String[] lines, GameWorld gameWorld) { + public BlockSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/CheckpointSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/CheckpointSign.java index 063f6f2d..d6e369e3 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/CheckpointSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/CheckpointSign.java @@ -19,7 +19,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.commons.util.messageutil.MessageUtil; import io.github.dre2n.dungeonsxl.config.DMessages; import io.github.dre2n.dungeonsxl.player.DGamePlayer; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.util.concurrent.CopyOnWriteArrayList; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -36,7 +36,7 @@ public class CheckpointSign extends DSign { private boolean initialized; private CopyOnWriteArrayList done = new CopyOnWriteArrayList<>(); - public CheckpointSign(Sign sign, String[] lines, GameWorld gameWorld) { + public CheckpointSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/ChestSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/ChestSign.java index cee4b114..cbdc08fa 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/ChestSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/ChestSign.java @@ -18,7 +18,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.commons.util.NumberUtil; import io.github.dre2n.dungeonsxl.reward.RewardChest; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -33,7 +33,7 @@ public class ChestSign extends DSign { private double moneyReward; private int levelReward; - public ChestSign(Sign sign, String[] lines, GameWorld gameWorld) { + public ChestSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/ChunkUpdaterSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/ChunkUpdaterSign.java index dc248490..83cf156a 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/ChunkUpdaterSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/ChunkUpdaterSign.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.commons.util.NumberUtil; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Chunk; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -29,7 +29,7 @@ public class ChunkUpdaterSign extends DSign { private DSignType type = DSignTypeDefault.CHUNK_UPDATER; - public ChunkUpdaterSign(Sign sign, String[] lines, GameWorld gameWorld) { + public ChunkUpdaterSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/ClassesSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/ClassesSign.java index 11601c1f..13eba0ff 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/ClassesSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/ClassesSign.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.dungeonsxl.player.DClass; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.ChatColor; import org.bukkit.block.Sign; @@ -30,7 +30,7 @@ public class ClassesSign extends DSign { private DClass dClass; - public ClassesSign(Sign sign, String[] lines, GameWorld gameWorld) { + public ClassesSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); dClass = plugin.getDClasses().getByName(sign.getLine(1)); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/CommandSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/CommandSign.java index 46b9d7d1..fcb85d19 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/CommandSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/CommandSign.java @@ -21,7 +21,7 @@ import io.github.dre2n.commandsxl.command.CCommand; import io.github.dre2n.commandsxl.command.CCommandExecutorTask; import io.github.dre2n.commons.util.NumberUtil; import io.github.dre2n.dungeonsxl.trigger.InteractTrigger; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -44,7 +44,7 @@ public class CommandSign extends DSign { private String executor; private boolean initialized; - public CommandSign(Sign sign, String[] lines, GameWorld gameWorld) { + public CommandSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/DMobSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/DMobSign.java index ce11502c..df42f7ac 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/DMobSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/DMobSign.java @@ -18,7 +18,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.commons.util.NumberUtil; import io.github.dre2n.dungeonsxl.task.MobSpawnTask; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Material; import org.bukkit.block.Sign; import org.bukkit.scheduler.BukkitTask; @@ -40,7 +40,7 @@ public class DMobSign extends DSign implements MobSign { private boolean active; private BukkitTask task; - public DMobSign(Sign sign, String[] lines, GameWorld gameWorld) { + public DMobSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/DSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/DSign.java index fb1549a4..f978b45b 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/DSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/DSign.java @@ -21,7 +21,7 @@ import io.github.dre2n.dungeonsxl.DungeonsXL; import io.github.dre2n.dungeonsxl.event.dsign.DSignRegistrationEvent; import io.github.dre2n.dungeonsxl.game.Game; import io.github.dre2n.dungeonsxl.trigger.Trigger; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.HashSet; @@ -38,12 +38,12 @@ public abstract class DSign { private Sign sign; protected String[] lines; - private GameWorld gameWorld; + private DGameWorld gameWorld; // List of Triggers private Set triggers = new HashSet<>(); - public DSign(Sign sign, String[] lines, GameWorld gameWorld) { + public DSign(Sign sign, String[] lines, DGameWorld gameWorld) { this.sign = sign; this.lines = lines; this.gameWorld = gameWorld; @@ -108,7 +108,7 @@ public abstract class DSign { /** * @return the gameWorld */ - public GameWorld getGameWorld() { + public DGameWorld getGameWorld() { return gameWorld; } @@ -185,11 +185,11 @@ public abstract class DSign { return !triggers.isEmpty(); } - public static DSign create(Sign sign, GameWorld gameWorld) { + public static DSign create(Sign sign, DGameWorld gameWorld) { return create(sign, sign.getLines(), gameWorld); } - public static DSign create(Sign sign, String[] lines, GameWorld gameWorld) { + public static DSign create(Sign sign, String[] lines, DGameWorld gameWorld) { DSign dSign = null; for (DSignType type : plugin.getDSigns().getDSigns()) { @@ -198,7 +198,7 @@ public abstract class DSign { } try { - Constructor constructor = type.getHandler().getConstructor(Sign.class, String[].class, GameWorld.class); + Constructor constructor = type.getHandler().getConstructor(Sign.class, String[].class, DGameWorld.class); dSign = constructor.newInstance(sign, lines, gameWorld); } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException exception) { diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/DropSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/DropSign.java index 25e32dec..8817bd53 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/DropSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/DropSign.java @@ -19,7 +19,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.caliburn.item.UniversalItem; import io.github.dre2n.commons.util.NumberUtil; import io.github.dre2n.dungeonsxl.task.DropItemTask; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -35,7 +35,7 @@ public class DropSign extends DSign { private ItemStack item; private double interval = -1; - public DropSign(Sign sign, String[] lines, GameWorld gameWorld) { + public DropSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/EndSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/EndSign.java index a9d8079b..239860fc 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/EndSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/EndSign.java @@ -18,7 +18,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.dungeonsxl.player.DGamePlayer; import io.github.dre2n.dungeonsxl.trigger.InteractTrigger; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -31,7 +31,7 @@ public class EndSign extends DSign { private DSignType type = DSignTypeDefault.END; - public EndSign(Sign sign, String[] lines, GameWorld gameWorld) { + public EndSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/ExternalMobSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/ExternalMobSign.java index 53011478..c3bdfd1d 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/ExternalMobSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/ExternalMobSign.java @@ -20,7 +20,7 @@ import io.github.dre2n.commons.util.NumberUtil; import io.github.dre2n.dungeonsxl.mob.ExternalMobPlugin; import io.github.dre2n.dungeonsxl.mob.ExternalMobProvider; import io.github.dre2n.dungeonsxl.task.ExternalMobSpawnTask; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.util.ArrayList; import java.util.List; import org.bukkit.Location; @@ -52,7 +52,7 @@ public class ExternalMobSign extends DSign implements MobSign { private LivingEntity externalMob; private List externalMobs = new ArrayList<>(); - public ExternalMobSign(Sign sign, String[] lines, GameWorld gameWorld) { + public ExternalMobSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/FloorSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/FloorSign.java index 7df50a06..496cbf97 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/FloorSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/FloorSign.java @@ -18,8 +18,8 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.dungeonsxl.player.DGamePlayer; import io.github.dre2n.dungeonsxl.trigger.InteractTrigger; -import io.github.dre2n.dungeonsxl.world.GameWorld; -import io.github.dre2n.dungeonsxl.world.ResourceWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; +import io.github.dre2n.dungeonsxl.world.DResourceWorld; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -32,16 +32,16 @@ public class FloorSign extends DSign { private DSignType type = DSignTypeDefault.FLOOR; - private ResourceWorld floor; + private DResourceWorld floor; - public FloorSign(Sign sign, String[] lines, GameWorld gameWorld) { + public FloorSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } /** * @return the next floor */ - public ResourceWorld getFloor() { + public DResourceWorld getFloor() { return floor; } @@ -49,7 +49,7 @@ public class FloorSign extends DSign { * @param floor * the floor to set */ - public void setFloor(ResourceWorld floor) { + public void setFloor(DResourceWorld floor) { this.floor = floor; } @@ -61,7 +61,7 @@ public class FloorSign extends DSign { @Override public void onInit() { if (!lines[1].isEmpty()) { - floor = plugin.getWorlds().getResourceByName(lines[1]); + floor = plugin.getDWorlds().getResourceByName(lines[1]); } if (!getTriggers().isEmpty()) { diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/HologramSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/HologramSign.java index 1ff47521..31fee962 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/HologramSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/HologramSign.java @@ -23,7 +23,7 @@ import io.github.dre2n.commons.compatibility.CompatibilityHandler; import io.github.dre2n.commons.compatibility.Version; import io.github.dre2n.commons.util.EnumUtil; import io.github.dre2n.commons.util.NumberUtil; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.Material; @@ -39,7 +39,7 @@ public class HologramSign extends DSign { private Hologram hologram; - public HologramSign(Sign sign, String[] lines, GameWorld gameWorld) { + public HologramSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/InteractSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/InteractSign.java index 5d8dad6f..5029d2f0 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/InteractSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/InteractSign.java @@ -19,8 +19,8 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.commons.util.NumberUtil; import io.github.dre2n.dungeonsxl.task.SignUpdateTask; import io.github.dre2n.dungeonsxl.trigger.InteractTrigger; -import io.github.dre2n.dungeonsxl.world.EditWorld; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.util.HashSet; import java.util.Set; import org.bukkit.ChatColor; @@ -35,14 +35,14 @@ public class InteractSign extends DSign { private DSignType type = DSignTypeDefault.INTERACT; - public InteractSign(Sign sign, String[] lines, GameWorld gameWorld) { + public InteractSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } @Override public boolean check() { Set used = new HashSet<>(); - for (Block block : EditWorld.getByWorld(getSign().getLocation().getWorld()).getSigns()) { + for (Block block : DEditWorld.getByWorld(getSign().getLocation().getWorld()).getSigns()) { if (block == null) { continue; } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/LeaveSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/LeaveSign.java index 68f879fc..c04bde0b 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/LeaveSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/LeaveSign.java @@ -19,7 +19,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.dungeonsxl.event.dplayer.DPlayerEscapeEvent; import io.github.dre2n.dungeonsxl.player.DGamePlayer; import io.github.dre2n.dungeonsxl.trigger.InteractTrigger; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -32,7 +32,7 @@ public class LeaveSign extends DSign { private DSignType type = DSignTypeDefault.LEAVE; - public LeaveSign(Sign sign, String[] lines, GameWorld gameWorld) { + public LeaveSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/LivesModifierSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/LivesModifierSign.java index 5c2e73c9..9772916d 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/LivesModifierSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/LivesModifierSign.java @@ -23,7 +23,7 @@ import io.github.dre2n.dungeonsxl.config.DMessages; import io.github.dre2n.dungeonsxl.game.Game; import io.github.dre2n.dungeonsxl.player.DGamePlayer; import io.github.dre2n.dungeonsxl.player.DGroup; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Material; import org.bukkit.block.Sign; import org.bukkit.entity.Player; @@ -44,7 +44,7 @@ public class LivesModifierSign extends DSign { private int lives; private Target target; - public LivesModifierSign(Sign sign, String[] lines, GameWorld gameWorld) { + public LivesModifierSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/LobbySign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/LobbySign.java index 8c830ed0..c01301ce 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/LobbySign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/LobbySign.java @@ -16,7 +16,7 @@ */ package io.github.dre2n.dungeonsxl.sign; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -27,7 +27,7 @@ public class LobbySign extends DSign { private DSignType type = DSignTypeDefault.LOBBY; - public LobbySign(Sign sign, String[] lines, GameWorld gameWorld) { + public LobbySign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/MessageSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/MessageSign.java index eefef108..2e6f774c 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/MessageSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/MessageSign.java @@ -18,7 +18,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.commons.util.NumberUtil; import io.github.dre2n.commons.util.messageutil.MessageUtil; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.util.concurrent.CopyOnWriteArrayList; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -36,7 +36,7 @@ public class MessageSign extends DSign { private boolean initialized; private CopyOnWriteArrayList done = new CopyOnWriteArrayList<>(); - public MessageSign(Sign sign, String[] lines, GameWorld gameWorld) { + public MessageSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/OpenDoorSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/OpenDoorSign.java index 6ecf4111..942b1272 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/OpenDoorSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/OpenDoorSign.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.commons.util.BlockUtil; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; @@ -33,7 +33,7 @@ public class OpenDoorSign extends DSign { private Block block; - public OpenDoorSign(Sign sign, String[] lines, GameWorld gameWorld) { + public OpenDoorSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } @@ -95,7 +95,7 @@ public class OpenDoorSign extends DSign { * true if the block is openable only with a sign */ public static boolean isProtected(Block block) { - GameWorld gameWorld = GameWorld.getByWorld(block.getWorld()); + DGameWorld gameWorld = DGameWorld.getByWorld(block.getWorld()); if (gameWorld != null) { for (DSign dSign : gameWorld.getDSigns(DSignTypeDefault.OPEN_DOOR)) { Block signBlock1 = ((OpenDoorSign) dSign).getBlock(); diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/PlaceSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/PlaceSign.java index 1668888c..a79527d6 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/PlaceSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/PlaceSign.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.dungeonsxl.game.GamePlaceableBlock; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -28,7 +28,7 @@ public class PlaceSign extends DSign { private DSignType type = DSignTypeDefault.PLACE; - public PlaceSign(Sign sign, String[] lines, GameWorld gameWorld) { + public PlaceSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/ReadySign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/ReadySign.java index 8b484a10..4be6b8ef 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/ReadySign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/ReadySign.java @@ -25,7 +25,7 @@ import io.github.dre2n.dungeonsxl.player.DGamePlayer; import io.github.dre2n.dungeonsxl.player.DGroup; import io.github.dre2n.dungeonsxl.trigger.InteractTrigger; import io.github.dre2n.dungeonsxl.util.ProgressBar; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -43,7 +43,7 @@ public class ReadySign extends DSign { private double autoStart = -1; private boolean triggered = false; - public ReadySign(Sign sign, String[] lines, GameWorld gameWorld) { + public ReadySign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/RedstoneSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/RedstoneSign.java index e82b08fd..e5ff08b8 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/RedstoneSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/RedstoneSign.java @@ -18,7 +18,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.commons.util.NumberUtil; import io.github.dre2n.dungeonsxl.task.DelayedPowerTask; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Sign; @@ -42,7 +42,7 @@ public class RedstoneSign extends DSign { private int repeat = 1; private int repeatsToDo = 1; - public RedstoneSign(Sign sign, String[] lines, GameWorld gameWorld) { + public RedstoneSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/ScriptSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/ScriptSign.java index 2df15f55..ae0f1c86 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/ScriptSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/ScriptSign.java @@ -16,7 +16,7 @@ */ package io.github.dre2n.dungeonsxl.sign; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -29,7 +29,7 @@ public class ScriptSign extends DSign { private String name; - public ScriptSign(Sign sign, String[] lines, GameWorld gameWorld) { + public ScriptSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); name = lines[1]; } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/SoundMessageSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/SoundMessageSign.java index e7307f1d..06a92083 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/SoundMessageSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/SoundMessageSign.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.commons.util.NumberUtil; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.util.concurrent.CopyOnWriteArrayList; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -35,7 +35,7 @@ public class SoundMessageSign extends DSign { private String msg; private CopyOnWriteArrayList done = new CopyOnWriteArrayList<>(); - public SoundMessageSign(Sign sign, String[] lines, GameWorld gameWorld) { + public SoundMessageSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/StartSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/StartSign.java index 1f435b10..77aafff9 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/StartSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/StartSign.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.commons.util.NumberUtil; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -30,7 +30,7 @@ public class StartSign extends DSign { private int id; - public StartSign(Sign sign, String[] lines, GameWorld gameWorld) { + public StartSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/TeleportSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/TeleportSign.java index 9117514b..f431b45a 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/TeleportSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/TeleportSign.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.commons.util.NumberUtil; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -32,7 +32,7 @@ public class TeleportSign extends DSign { private Location location; - public TeleportSign(Sign sign, String[] lines, GameWorld gameWorld) { + public TeleportSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/TriggerSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/TriggerSign.java index 52c919d1..e72e2eb4 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/TriggerSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/TriggerSign.java @@ -19,8 +19,8 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.commons.util.NumberUtil; import io.github.dre2n.dungeonsxl.task.SignUpdateTask; import io.github.dre2n.dungeonsxl.trigger.SignTrigger; -import io.github.dre2n.dungeonsxl.world.EditWorld; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.util.HashSet; import java.util.Set; import org.bukkit.Material; @@ -38,14 +38,14 @@ public class TriggerSign extends DSign { private int triggerId; private boolean initialized; - public TriggerSign(Sign sign, String[] lines, GameWorld gameWorld) { + public TriggerSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } @Override public boolean check() { Set used = new HashSet<>(); - for (Block block : EditWorld.getByWorld(getSign().getLocation().getWorld()).getSigns()) { + for (Block block : DEditWorld.getByWorld(getSign().getLocation().getWorld()).getSigns()) { if (block == null) { continue; } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/sign/WaveSign.java b/src/main/java/io/github/dre2n/dungeonsxl/sign/WaveSign.java index ca17eb99..b4239816 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/sign/WaveSign.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/sign/WaveSign.java @@ -18,7 +18,7 @@ package io.github.dre2n.dungeonsxl.sign; import io.github.dre2n.commons.util.NumberUtil; import io.github.dre2n.dungeonsxl.trigger.InteractTrigger; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.block.Sign; @@ -34,7 +34,7 @@ public class WaveSign extends DSign { private double mobCountIncreaseRate; private boolean teleport; - public WaveSign(Sign sign, String[] lines, GameWorld gameWorld) { + public WaveSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/task/DelayedPowerTask.java b/src/main/java/io/github/dre2n/dungeonsxl/task/DelayedPowerTask.java index 9520c78b..ff4a85e8 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/task/DelayedPowerTask.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/task/DelayedPowerTask.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.task; import io.github.dre2n.dungeonsxl.sign.RedstoneSign; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.scheduler.BukkitRunnable; /** @@ -35,7 +35,7 @@ public class DelayedPowerTask extends BukkitRunnable { @Override public void run() { - if (GameWorld.getByWorld(sign.getBlock().getWorld()) == null) { + if (DGameWorld.getByWorld(sign.getBlock().getWorld()) == null) { sign.getEnableTask().cancel(); sign.getDisableTask().cancel(); return; diff --git a/src/main/java/io/github/dre2n/dungeonsxl/task/ExternalMobSpawnTask.java b/src/main/java/io/github/dre2n/dungeonsxl/task/ExternalMobSpawnTask.java index 6440223f..e2b0f21c 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/task/ExternalMobSpawnTask.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/task/ExternalMobSpawnTask.java @@ -19,7 +19,7 @@ package io.github.dre2n.dungeonsxl.task; import io.github.dre2n.dungeonsxl.mob.DMob; import io.github.dre2n.dungeonsxl.mob.ExternalMobProvider; import io.github.dre2n.dungeonsxl.sign.ExternalMobSign; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.World; import org.bukkit.scheduler.BukkitRunnable; @@ -40,7 +40,7 @@ public class ExternalMobSpawnTask extends BukkitRunnable { public void run() { if (sign.getInterval() <= 0) { World world = sign.getSign().getWorld(); - GameWorld gameWorld = GameWorld.getByWorld(world); + DGameWorld gameWorld = DGameWorld.getByWorld(world); if (gameWorld != null) { sign.setSpawnLocation(sign.getSign().getLocation().add(0.5, 0, 0.5)); diff --git a/src/main/java/io/github/dre2n/dungeonsxl/task/LazyUpdateTask.java b/src/main/java/io/github/dre2n/dungeonsxl/task/LazyUpdateTask.java index ad2b2e6d..c65a777e 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/task/LazyUpdateTask.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/task/LazyUpdateTask.java @@ -18,7 +18,7 @@ package io.github.dre2n.dungeonsxl.task; import io.github.dre2n.dungeonsxl.DungeonsXL; import io.github.dre2n.dungeonsxl.player.DGamePlayer; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.scheduler.BukkitRunnable; /** @@ -30,7 +30,7 @@ public class LazyUpdateTask extends BukkitRunnable { @Override public void run() { - for (GameWorld gameWorld : plugin.getWorlds().getGameWorlds()) { + for (DGameWorld gameWorld : plugin.getDWorlds().getGameWorlds()) { gameWorld.update(); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/task/MobSpawnTask.java b/src/main/java/io/github/dre2n/dungeonsxl/task/MobSpawnTask.java index 3e89bdc3..ccc4de9d 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/task/MobSpawnTask.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/task/MobSpawnTask.java @@ -20,7 +20,7 @@ import io.github.dre2n.dungeonsxl.DungeonsXL; import io.github.dre2n.dungeonsxl.mob.DMob; import io.github.dre2n.dungeonsxl.mob.DMobType; import io.github.dre2n.dungeonsxl.sign.DMobSign; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.World; @@ -46,7 +46,7 @@ public class MobSpawnTask extends BukkitRunnable { public void run() { if (sign.getInterval() <= 0) { World world = sign.getSign().getWorld(); - GameWorld gameWorld = GameWorld.getByWorld(world); + DGameWorld gameWorld = DGameWorld.getByWorld(world); if (gameWorld != null) { Location spawnLoc = sign.getSign().getLocation().add(0.5, 0, 0.5); diff --git a/src/main/java/io/github/dre2n/dungeonsxl/task/RedstoneEventTask.java b/src/main/java/io/github/dre2n/dungeonsxl/task/RedstoneEventTask.java index 2b0a2904..c4ce6bd5 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/task/RedstoneEventTask.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/task/RedstoneEventTask.java @@ -18,7 +18,7 @@ package io.github.dre2n.dungeonsxl.task; import io.github.dre2n.dungeonsxl.DungeonsXL; import io.github.dre2n.dungeonsxl.trigger.RedstoneTrigger; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.block.Block; import org.bukkit.scheduler.BukkitRunnable; @@ -35,7 +35,7 @@ public class RedstoneEventTask extends BukkitRunnable { @Override public void run() { - for (GameWorld gameWorld : DungeonsXL.getInstance().getWorlds().getGameWorlds()) { + for (DGameWorld gameWorld : DungeonsXL.getInstance().getDWorlds().getGameWorlds()) { if (block.getWorld() == gameWorld.getWorld()) { RedstoneTrigger.updateAll(gameWorld); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/task/WorldUnloadTask.java b/src/main/java/io/github/dre2n/dungeonsxl/task/WorldUnloadTask.java index b3f8d0cb..3fc03f6e 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/task/WorldUnloadTask.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/task/WorldUnloadTask.java @@ -18,8 +18,8 @@ package io.github.dre2n.dungeonsxl.task; import io.github.dre2n.dungeonsxl.DungeonsXL; import io.github.dre2n.dungeonsxl.player.DGamePlayer; -import io.github.dre2n.dungeonsxl.world.EditWorld; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DEditWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.scheduler.BukkitRunnable; /** @@ -31,7 +31,7 @@ public class WorldUnloadTask extends BukkitRunnable { @Override public void run() { - for (GameWorld gameWorld : plugin.getWorlds().getGameWorlds()) { + for (DGameWorld gameWorld : plugin.getDWorlds().getGameWorlds()) { if (gameWorld.getWorld().getPlayers().isEmpty()) { if (DGamePlayer.getByWorld(gameWorld.getWorld()).isEmpty()) { gameWorld.delete(); @@ -39,7 +39,7 @@ public class WorldUnloadTask extends BukkitRunnable { } } - for (EditWorld editWorld : plugin.getWorlds().getEditWorlds()) { + for (DEditWorld editWorld : plugin.getDWorlds().getEditWorlds()) { if (editWorld.getWorld().getPlayers().isEmpty()) { editWorld.delete(true); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/trigger/DistanceTrigger.java b/src/main/java/io/github/dre2n/dungeonsxl/trigger/DistanceTrigger.java index f7b6e903..69d0f181 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/trigger/DistanceTrigger.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/trigger/DistanceTrigger.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.trigger; import io.github.dre2n.dungeonsxl.event.trigger.TriggerActionEvent; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Location; import org.bukkit.entity.Player; @@ -61,7 +61,7 @@ public class DistanceTrigger extends Trigger { } /* Statics */ - public static void triggerAllInDistance(Player player, GameWorld gameWorld) { + public static void triggerAllInDistance(Player player, DGameWorld gameWorld) { if (!player.getLocation().getWorld().equals(gameWorld.getWorld())) { return; } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/trigger/InteractTrigger.java b/src/main/java/io/github/dre2n/dungeonsxl/trigger/InteractTrigger.java index 4d99444d..5a3794e2 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/trigger/InteractTrigger.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/trigger/InteractTrigger.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.trigger; import io.github.dre2n.dungeonsxl.event.trigger.TriggerActionEvent; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.block.Block; import org.bukkit.entity.Player; @@ -55,7 +55,7 @@ public class InteractTrigger extends Trigger { } /* Statics */ - public static InteractTrigger getOrCreate(int id, GameWorld gameWorld) { + public static InteractTrigger getOrCreate(int id, DGameWorld gameWorld) { if (id == 0) { return null; } @@ -66,7 +66,7 @@ public class InteractTrigger extends Trigger { return new InteractTrigger(id, null); } - public static InteractTrigger getOrCreate(int id, Block block, GameWorld gameWorld) { + public static InteractTrigger getOrCreate(int id, Block block, DGameWorld gameWorld) { InteractTrigger trigger = getById(id, gameWorld); if (trigger != null) { trigger.interactBlock = block; @@ -75,7 +75,7 @@ public class InteractTrigger extends Trigger { return new InteractTrigger(id, block); } - public static InteractTrigger getByBlock(Block block, GameWorld gameWorld) { + public static InteractTrigger getByBlock(Block block, DGameWorld gameWorld) { for (Trigger uncasted : gameWorld.getTriggers(TriggerTypeDefault.INTERACT)) { InteractTrigger trigger = (InteractTrigger) uncasted; if (trigger.interactBlock != null) { @@ -87,7 +87,7 @@ public class InteractTrigger extends Trigger { return null; } - public static InteractTrigger getById(int id, GameWorld gameWorld) { + public static InteractTrigger getById(int id, DGameWorld gameWorld) { if (id != 0) { for (Trigger uncasted : gameWorld.getTriggers(TriggerTypeDefault.INTERACT)) { InteractTrigger trigger = (InteractTrigger) uncasted; diff --git a/src/main/java/io/github/dre2n/dungeonsxl/trigger/MobTrigger.java b/src/main/java/io/github/dre2n/dungeonsxl/trigger/MobTrigger.java index 374bbc6c..37cf0f4d 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/trigger/MobTrigger.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/trigger/MobTrigger.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.trigger; import io.github.dre2n.dungeonsxl.event.trigger.TriggerActionEvent; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; /** * @author Frank Baumann, Daniel Saukel @@ -50,7 +50,7 @@ public class MobTrigger extends Trigger { } /* Statics */ - public static MobTrigger getOrCreate(String name, GameWorld gameWorld) { + public static MobTrigger getOrCreate(String name, DGameWorld gameWorld) { MobTrigger trigger = getByName(name, gameWorld); if (trigger != null) { return trigger; @@ -58,7 +58,7 @@ public class MobTrigger extends Trigger { return new MobTrigger(name); } - public static MobTrigger getByName(String name, GameWorld gameWorld) { + public static MobTrigger getByName(String name, DGameWorld gameWorld) { for (Trigger uncasted : gameWorld.getTriggers(TriggerTypeDefault.MOB)) { MobTrigger trigger = (MobTrigger) uncasted; if (trigger.name.equalsIgnoreCase(name)) { diff --git a/src/main/java/io/github/dre2n/dungeonsxl/trigger/ProgressTrigger.java b/src/main/java/io/github/dre2n/dungeonsxl/trigger/ProgressTrigger.java index a4064b22..d66f2d80 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/trigger/ProgressTrigger.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/trigger/ProgressTrigger.java @@ -17,8 +17,8 @@ package io.github.dre2n.dungeonsxl.trigger; import io.github.dre2n.dungeonsxl.event.trigger.TriggerActionEvent; -import io.github.dre2n.dungeonsxl.world.GameWorld; -import io.github.dre2n.dungeonsxl.world.ResourceWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; +import io.github.dre2n.dungeonsxl.world.DResourceWorld; import java.util.HashSet; import java.util.Set; @@ -29,7 +29,7 @@ public class ProgressTrigger extends Trigger { private TriggerType type = TriggerTypeDefault.PROGRESS; - private ResourceWorld floor; + private DResourceWorld floor; private int floorCount; private int waveCount; @@ -38,7 +38,7 @@ public class ProgressTrigger extends Trigger { this.waveCount = waveCount; } - public ProgressTrigger(ResourceWorld floor) { + public ProgressTrigger(DResourceWorld floor) { this.floor = floor; } @@ -46,7 +46,7 @@ public class ProgressTrigger extends Trigger { /** * @return the specific floor that must be finished */ - public ResourceWorld getFloor() { + public DResourceWorld getFloor() { return floor; } @@ -54,7 +54,7 @@ public class ProgressTrigger extends Trigger { * @param floor * the specific floor to set */ - public void setFloor(ResourceWorld floor) { + public void setFloor(DResourceWorld floor) { this.floor = floor; } @@ -107,15 +107,15 @@ public class ProgressTrigger extends Trigger { } /* Statics */ - public static ProgressTrigger getOrCreate(int floorCount, int waveCount, GameWorld gameWorld) { + public static ProgressTrigger getOrCreate(int floorCount, int waveCount, DGameWorld gameWorld) { if (floorCount == 0 & waveCount == 0 || floorCount < 0 || waveCount < 0) { return null; } return new ProgressTrigger(floorCount, waveCount); } - public static ProgressTrigger getOrCreate(String floor, GameWorld gameWorld) { - ResourceWorld resource = plugin.getWorlds().getResourceByName(floor); + public static ProgressTrigger getOrCreate(String floor, DGameWorld gameWorld) { + DResourceWorld resource = plugin.getDWorlds().getResourceByName(floor); if (resource != null) { return new ProgressTrigger(resource); @@ -125,7 +125,7 @@ public class ProgressTrigger extends Trigger { } } - public static Set getByGameWorld(GameWorld gameWorld) { + public static Set getByGameWorld(DGameWorld gameWorld) { Set toReturn = new HashSet<>(); for (Trigger trigger : gameWorld.getTriggers(TriggerTypeDefault.PROGRESS)) { toReturn.add((ProgressTrigger) trigger); diff --git a/src/main/java/io/github/dre2n/dungeonsxl/trigger/RedstoneTrigger.java b/src/main/java/io/github/dre2n/dungeonsxl/trigger/RedstoneTrigger.java index bfdf38e3..b264bd88 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/trigger/RedstoneTrigger.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/trigger/RedstoneTrigger.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.trigger; import io.github.dre2n.dungeonsxl.event.trigger.TriggerActionEvent; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; @@ -62,7 +62,7 @@ public class RedstoneTrigger extends Trigger { } /* Statics */ - public static RedstoneTrigger getOrCreate(Sign sign, GameWorld gameWorld) { + public static RedstoneTrigger getOrCreate(Sign sign, DGameWorld gameWorld) { Block rtBlock = null; if (sign.getBlock().getType() == Material.WALL_SIGN) { switch (sign.getData().getData()) { @@ -96,7 +96,7 @@ public class RedstoneTrigger extends Trigger { return null; } - public static void updateAll(GameWorld gameWorld) { + public static void updateAll(DGameWorld gameWorld) { for (Trigger trigger : gameWorld.getTriggers(TriggerTypeDefault.REDSTONE)) { ((RedstoneTrigger) trigger).onTrigger(); } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/trigger/SignTrigger.java b/src/main/java/io/github/dre2n/dungeonsxl/trigger/SignTrigger.java index 15e52dbf..5dc11a55 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/trigger/SignTrigger.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/trigger/SignTrigger.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.trigger; import io.github.dre2n.dungeonsxl.event.trigger.TriggerActionEvent; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; /** * @author Frank Baumann, Daniel Saukel @@ -52,7 +52,7 @@ public class SignTrigger extends Trigger { } /* Statics */ - public static SignTrigger getOrCreate(int id, GameWorld gameWorld) { + public static SignTrigger getOrCreate(int id, DGameWorld gameWorld) { SignTrigger trigger = getById(id, gameWorld); if (trigger != null) { return trigger; @@ -60,7 +60,7 @@ public class SignTrigger extends Trigger { return new SignTrigger(id); } - public static SignTrigger getById(int id, GameWorld gameWorld) { + public static SignTrigger getById(int id, DGameWorld gameWorld) { for (Trigger uncasted : gameWorld.getTriggers(TriggerTypeDefault.SIGN)) { SignTrigger trigger = (SignTrigger) uncasted; if (trigger.stId == id) { diff --git a/src/main/java/io/github/dre2n/dungeonsxl/trigger/Trigger.java b/src/main/java/io/github/dre2n/dungeonsxl/trigger/Trigger.java index 66ada342..8f40a684 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/trigger/Trigger.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/trigger/Trigger.java @@ -21,7 +21,7 @@ import io.github.dre2n.commons.util.messageutil.MessageUtil; import io.github.dre2n.dungeonsxl.DungeonsXL; import io.github.dre2n.dungeonsxl.event.trigger.TriggerRegistrationEvent; import io.github.dre2n.dungeonsxl.sign.DSign; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashSet; @@ -113,11 +113,11 @@ public abstract class Trigger { } } - public void register(GameWorld gameWorld) { + public void register(DGameWorld gameWorld) { gameWorld.addTrigger(this); } - public void unregister(GameWorld gameWorld) { + public void unregister(DGameWorld gameWorld) { gameWorld.removeTrigger(this); } @@ -185,7 +185,7 @@ public abstract class Trigger { Method method; try { - method = type.getHandler().getDeclaredMethod("getOrCreate", String.class, GameWorld.class); + method = type.getHandler().getDeclaredMethod("getOrCreate", String.class, DGameWorld.class); trigger = (Trigger) method.invoke(value, dSign.getGameWorld()); } catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException exception) { diff --git a/src/main/java/io/github/dre2n/dungeonsxl/trigger/UseItemTrigger.java b/src/main/java/io/github/dre2n/dungeonsxl/trigger/UseItemTrigger.java index 05c5b63d..03750393 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/trigger/UseItemTrigger.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/trigger/UseItemTrigger.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.trigger; import io.github.dre2n.dungeonsxl.event.trigger.TriggerActionEvent; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.Material; import org.bukkit.entity.Player; @@ -58,7 +58,7 @@ public class UseItemTrigger extends Trigger { } /* Statics */ - public static UseItemTrigger getOrCreate(String name, GameWorld gameWorld) { + public static UseItemTrigger getOrCreate(String name, DGameWorld gameWorld) { UseItemTrigger trigger = getByName(name, gameWorld); if (trigger != null) { return trigger; @@ -66,7 +66,7 @@ public class UseItemTrigger extends Trigger { return new UseItemTrigger(name); } - public static UseItemTrigger getByName(String name, GameWorld gameWorld) { + public static UseItemTrigger getByName(String name, DGameWorld gameWorld) { for (Trigger uncasted : gameWorld.getTriggers(TriggerTypeDefault.USE_ITEM)) { UseItemTrigger trigger = (UseItemTrigger) uncasted; if (trigger.name.equalsIgnoreCase(name)) { diff --git a/src/main/java/io/github/dre2n/dungeonsxl/trigger/WaveTrigger.java b/src/main/java/io/github/dre2n/dungeonsxl/trigger/WaveTrigger.java index 1fc21c70..3c98461b 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/trigger/WaveTrigger.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/trigger/WaveTrigger.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.trigger; import io.github.dre2n.dungeonsxl.event.trigger.TriggerActionEvent; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.util.HashSet; import java.util.Set; @@ -68,14 +68,14 @@ public class WaveTrigger extends Trigger { } /* Statics */ - public static WaveTrigger getOrCreate(double mustKillRate, GameWorld gameWorld) { + public static WaveTrigger getOrCreate(double mustKillRate, DGameWorld gameWorld) { return new WaveTrigger(mustKillRate); } /** - * @return the WaveTriggers in the GameWorld + * @return the WaveTriggers in the DGameWorld */ - public static Set getByGameWorld(GameWorld gameWorld) { + public static Set getByGameWorld(DGameWorld gameWorld) { Set toReturn = new HashSet<>(); for (Trigger trigger : gameWorld.getTriggers()) { toReturn.add((WaveTrigger) trigger); diff --git a/src/main/java/io/github/dre2n/dungeonsxl/world/EditWorld.java b/src/main/java/io/github/dre2n/dungeonsxl/world/DEditWorld.java similarity index 88% rename from src/main/java/io/github/dre2n/dungeonsxl/world/EditWorld.java rename to src/main/java/io/github/dre2n/dungeonsxl/world/DEditWorld.java index 458e9ce6..0919e130 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/world/EditWorld.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/world/DEditWorld.java @@ -32,13 +32,13 @@ import org.bukkit.entity.Player; /** * @author Frank Baumann, Daniel Saukel */ -public class EditWorld extends InstanceWorld { +public class DEditWorld extends DInstanceWorld { - static Worlds worlds = plugin.getWorlds(); + static DWorlds worlds = plugin.getDWorlds(); private CopyOnWriteArrayList signs = new CopyOnWriteArrayList<>(); - EditWorld(ResourceWorld resourceWorld, File folder, World world, int id) { + DEditWorld(DResourceWorld resourceWorld, File folder, World world, int id) { super(resourceWorld, folder, world, id); } @@ -144,9 +144,9 @@ public class EditWorld extends InstanceWorld { * @param world * the instance * @return - * the EditWorld that represents the world + * the DEditWorld that represents the world */ - public static EditWorld getByWorld(World world) { + public static DEditWorld getByWorld(World world) { return getByName(world.getName()); } @@ -154,13 +154,13 @@ public class EditWorld extends InstanceWorld { * @param world * the instance name * @return - * the EditWorld that represents the world + * the DEditWorld that represents the world */ - public static EditWorld getByName(String name) { - InstanceWorld instance = worlds.getInstanceByName(name); + public static DEditWorld getByName(String name) { + DInstanceWorld instance = worlds.getInstanceByName(name); - if (instance instanceof EditWorld) { - return (EditWorld) instance; + if (instance instanceof DEditWorld) { + return (DEditWorld) instance; } else { return null; diff --git a/src/main/java/io/github/dre2n/dungeonsxl/world/GameWorld.java b/src/main/java/io/github/dre2n/dungeonsxl/world/DGameWorld.java similarity index 95% rename from src/main/java/io/github/dre2n/dungeonsxl/world/GameWorld.java rename to src/main/java/io/github/dre2n/dungeonsxl/world/DGameWorld.java index d5b45328..6b592958 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/world/GameWorld.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/world/DGameWorld.java @@ -52,7 +52,7 @@ import org.bukkit.inventory.ItemStack; /** * @author Frank Baumann, Milan Albrecht, Daniel Saukel */ -public class GameWorld extends InstanceWorld { +public class DGameWorld extends DInstanceWorld { // Variables private boolean tutorial; @@ -68,13 +68,13 @@ public class GameWorld extends InstanceWorld { private CopyOnWriteArrayList dSigns = new CopyOnWriteArrayList<>(); private CopyOnWriteArrayList triggers = new CopyOnWriteArrayList<>(); - GameWorld(ResourceWorld resourceWorld, File folder, World world, int id) { + DGameWorld(DResourceWorld resourceWorld, File folder, World world, int id) { super(resourceWorld, folder, world, id); } /** * @return - * the Game connected to the GameWorld + * the Game connected to the DGameWorld */ public Game getGame() { for (Game game : plugin.getGames()) { @@ -95,7 +95,7 @@ public class GameWorld extends InstanceWorld { /** * @param tutorial - * if the GameWorld is the tutorial + * if the DGameWorld is the tutorial */ public void setTutorial(boolean tutorial) { this.tutorial = tutorial; @@ -335,7 +335,7 @@ public class GameWorld extends InstanceWorld { } /** - * @return the Dungeon that contains the GameWorld + * @return the Dungeon that contains the DGameWorld */ public Dungeon getDungeon() { for (Dungeon dungeon : plugin.getDungeons().getDungeons()) { @@ -393,7 +393,7 @@ public class GameWorld extends InstanceWorld { return; } - plugin.getWorlds().getInstances().remove(this); + plugin.getDWorlds().getInstances().remove(this); plugin.getServer().unloadWorld(getWorld(), true); FileUtil.removeDirectory(getFolder()); @@ -434,11 +434,11 @@ public class GameWorld extends InstanceWorld { * @return * the EditWorld that represents the world */ - public static GameWorld getByWorld(World world) { - InstanceWorld instance = plugin.getWorlds().getInstanceByName(world.getName()); + public static DGameWorld getByWorld(World world) { + DInstanceWorld instance = plugin.getDWorlds().getInstanceByName(world.getName()); - if (instance instanceof GameWorld) { - return (GameWorld) instance; + if (instance instanceof DGameWorld) { + return (DGameWorld) instance; } else { return null; diff --git a/src/main/java/io/github/dre2n/dungeonsxl/world/InstanceWorld.java b/src/main/java/io/github/dre2n/dungeonsxl/world/DInstanceWorld.java similarity index 89% rename from src/main/java/io/github/dre2n/dungeonsxl/world/InstanceWorld.java rename to src/main/java/io/github/dre2n/dungeonsxl/world/DInstanceWorld.java index d271706f..d770f93f 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/world/InstanceWorld.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/world/DInstanceWorld.java @@ -28,21 +28,21 @@ import org.bukkit.World; /** * @author Daniel Saukel */ -public abstract class InstanceWorld { +public abstract class DInstanceWorld { protected static DungeonsXL plugin = DungeonsXL.getInstance(); - protected static Worlds worlds = plugin.getWorlds(); + protected static DWorlds worlds = plugin.getDWorlds(); public static String ID_FILE_PREFIX = ".id_"; - private ResourceWorld resourceWorld; + private DResourceWorld resourceWorld; private File folder; private World world; private File idFile; private int id; private Location lobby; - InstanceWorld(ResourceWorld resourceWorld, File folder, World world, int id) { + DInstanceWorld(DResourceWorld resourceWorld, File folder, World world, int id) { this.resourceWorld = resourceWorld; this.folder = folder; this.world = world; @@ -53,7 +53,7 @@ public abstract class InstanceWorld { /* Getters and setters */ /** - * @return the name of the ResourceWorld + * @return the name of the DResourceWorld */ public String getName() { return resourceWorld.getName(); @@ -67,9 +67,9 @@ public abstract class InstanceWorld { } /** - * @return the ResourceWorld of that this world is an instance + * @return the DResourceWorld of that this world is an instance */ - public ResourceWorld getResource() { + public DResourceWorld getResource() { return resourceWorld; } diff --git a/src/main/java/io/github/dre2n/dungeonsxl/world/ResourceWorld.java b/src/main/java/io/github/dre2n/dungeonsxl/world/DResourceWorld.java similarity index 84% rename from src/main/java/io/github/dre2n/dungeonsxl/world/ResourceWorld.java rename to src/main/java/io/github/dre2n/dungeonsxl/world/DResourceWorld.java index 1cc2aea9..ab637eef 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/world/ResourceWorld.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/world/DResourceWorld.java @@ -34,16 +34,16 @@ import org.bukkit.WorldType; * * @author Daniel Saukel */ -public class ResourceWorld { +public class DResourceWorld { DungeonsXL plugin = DungeonsXL.getInstance(); - Worlds worlds = plugin.getWorlds(); + DWorlds worlds = plugin.getDWorlds(); private File folder; private WorldConfig config; private SignData signData; - public ResourceWorld(String name) { + public DResourceWorld(String name) { folder = new File(DungeonsXL.MAPS, name); if (!folder.exists()) { folder.mkdir(); @@ -64,7 +64,7 @@ public class ResourceWorld { worlds.addResource(this); } - public ResourceWorld(File folder) { + public DResourceWorld(File folder) { this.folder = folder; File configFile = new File(folder, "config.yml"); @@ -144,7 +144,7 @@ public class ResourceWorld { DEditPlayer editPlayer = DEditPlayer.getByName(player.getName()); if (editPlayer != null) { - if (EditWorld.getByWorld(editPlayer.getWorld()).getResource() == this) { + if (DEditWorld.getByWorld(editPlayer.getWorld()).getResource() == this) { editPlayer.leave(); } } @@ -167,10 +167,10 @@ public class ResourceWorld { /* Actions */ /** * @param game - * whether the instance is a GameWorld + * whether the instance is a DGameWorld * @return an instance of this world */ - public InstanceWorld instantiate(boolean game) { + public DInstanceWorld instantiate(boolean game) { int id = worlds.generateId(); String name = worlds.generateName(game); File instanceFolder = new File(Bukkit.getWorldContainer(), name); @@ -182,15 +182,15 @@ public class ResourceWorld { World world = plugin.getServer().createWorld(WorldCreator.name(name)); - InstanceWorld instance = null; + DInstanceWorld instance = null; try { if (game) { - new GameWorld(this, instanceFolder, world, id); - signData.deserializeSigns((GameWorld) instance); + new DGameWorld(this, instanceFolder, world, id); + signData.deserializeSigns((DGameWorld) instance); } else { - new EditWorld(this, instanceFolder, world, id); - signData.deserializeSigns((EditWorld) instance); + new DEditWorld(this, instanceFolder, world, id); + signData.deserializeSigns((DEditWorld) instance); } } catch (IOException exception) { @@ -203,23 +203,23 @@ public class ResourceWorld { /** * @return an instance of this world */ - public EditWorld instantiateAsEditWorld() { - return (EditWorld) instantiate(false); + public DEditWorld instantiateAsEditWorld() { + return (DEditWorld) instantiate(false); } /** * @return an instance of this world */ - public GameWorld instantiateAsGameWorld() { - return (GameWorld) instantiate(true); + public DGameWorld instantiateAsGameWorld() { + return (DGameWorld) instantiate(true); } /** - * Generate a new ResourceWorld. + * Generate a new DResourceWorld. * - * @return the automatically created EditWorld instance + * @return the automatically created DEditWorld instance */ - public EditWorld generate() { + public DEditWorld generate() { String name = worlds.generateName(false); WorldCreator creator = WorldCreator.name(name); creator.type(WorldType.FLAT); @@ -236,7 +236,7 @@ public class ResourceWorld { File folder = new File(Bukkit.getWorldContainer(), name); World world = plugin.getServer().createWorld(creator); - EditWorld editWorld = new EditWorld(this, folder, world, id); + DEditWorld editWorld = new DEditWorld(this, folder, world, id); editWorld.generateIdFile(); return editWorld; diff --git a/src/main/java/io/github/dre2n/dungeonsxl/world/Worlds.java b/src/main/java/io/github/dre2n/dungeonsxl/world/DWorlds.java similarity index 70% rename from src/main/java/io/github/dre2n/dungeonsxl/world/Worlds.java rename to src/main/java/io/github/dre2n/dungeonsxl/world/DWorlds.java index 9ea1833d..62488a1d 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/world/Worlds.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/world/DWorlds.java @@ -27,25 +27,25 @@ import org.bukkit.Bukkit; /** * @author Daniel Saukel */ -public class Worlds { +public class DWorlds { - private Set resources; - private Set instances; + private Set resources; + private Set instances; - public Worlds(File folder) { + public DWorlds(File folder) { for (File file : folder.listFiles()) { if (file.isDirectory()) { - new ResourceWorld(file); + new DResourceWorld(file); } } } /* Getters and setters */ /** - * @return the ResourceWorld that has this name + * @return the DResourceWorld that has this name */ - public ResourceWorld getResourceByName(String name) { - for (ResourceWorld world : resources) { + public DResourceWorld getResourceByName(String name) { + for (DResourceWorld world : resources) { if (world.getName().equals(name)) { return world; } @@ -55,9 +55,9 @@ public class Worlds { } /** - * @return the InstanceWorld that has this name + * @return the DInstanceWorld that has this name */ - public InstanceWorld getInstanceByName(String name) { + public DInstanceWorld getInstanceByName(String name) { String[] splitted = name.split("_"); if (splitted.length != 3) { return null; @@ -67,10 +67,10 @@ public class Worlds { } /** - * @return the InstanceWorld that has this ID + * @return the DInstanceWorld that has this ID */ - public InstanceWorld getInstanceById(int id) { - for (InstanceWorld world : instances) { + public DInstanceWorld getInstanceById(int id) { + for (DInstanceWorld world : instances) { if (world.getId() == id) { return world; } @@ -82,57 +82,57 @@ public class Worlds { /** * @return the ResourceWorlds in the maps folder */ - public Set getResources() { + public Set getResources() { return resources; } /** * @param resource - * the ResourceWorld to add + * the DResourceWorld to add */ - public void addResource(ResourceWorld resource) { + public void addResource(DResourceWorld resource) { resources.add(resource); } /** * @param resource - * the ResourceWorld to remove + * the DResourceWorld to remove */ - public void removeResource(ResourceWorld resource) { + public void removeResource(DResourceWorld resource) { resources.remove(resource); } /** * @return the loaded InstanceWorlds in the world container */ - public Set getInstances() { + public Set getInstances() { return instances; } /** * @param instance - * the InstanceWorld to add + * the DInstanceWorld to add */ - public void addInstance(InstanceWorld instance) { + public void addInstance(DInstanceWorld instance) { instances.add(instance); } /** * @param instance - * the InstanceWorld to remove + * the DInstanceWorld to remove */ - public void removeInstance(InstanceWorld instance) { + public void removeInstance(DInstanceWorld instance) { instances.remove(instance); } /** * @return the loaded GameWorlds */ - public Set getGameWorlds() { - Set gameWorlds = new HashSet<>(); - for (InstanceWorld instance : instances) { - if (instance instanceof GameWorld) { - gameWorlds.add((GameWorld) instance); + public Set getGameWorlds() { + Set gameWorlds = new HashSet<>(); + for (DInstanceWorld instance : instances) { + if (instance instanceof DGameWorld) { + gameWorlds.add((DGameWorld) instance); } } return gameWorlds; @@ -141,11 +141,11 @@ public class Worlds { /** * @return the loaded EditWorlds */ - public Set getEditWorlds() { - Set editWorlds = new HashSet<>(); - for (InstanceWorld instance : instances) { - if (instance instanceof GameWorld) { - editWorlds.add((EditWorld) instance); + public Set getEditWorlds() { + Set editWorlds = new HashSet<>(); + for (DInstanceWorld instance : instances) { + if (instance instanceof DGameWorld) { + editWorlds.add((DEditWorld) instance); } } return editWorlds; @@ -158,13 +158,13 @@ public class Worlds { * if a map with this name exists */ public boolean exists(String name) { - for (ResourceWorld resource : resources) { + for (DResourceWorld resource : resources) { if (resource.getName().equalsIgnoreCase(name)) { return true; } } - for (InstanceWorld instance : instances) { + for (DInstanceWorld instance : instances) { if (instance.getFolder().getName().equalsIgnoreCase(name)) { return true; } @@ -200,7 +200,7 @@ public class Worlds { * Clean up all instances. */ public void deleteAllInstances() { - for (InstanceWorld instance : instances) { + for (DInstanceWorld instance : instances) { instance.delete(); } } @@ -209,7 +209,7 @@ public class Worlds { * Saves all EditWorlds. */ public void saveAll() { - for (EditWorld editWorld : getEditWorlds()) { + for (DEditWorld editWorld : getEditWorlds()) { editWorld.save(); } } @@ -219,7 +219,7 @@ public class Worlds { */ public int generateId() { int id = 0; - for (InstanceWorld instance : instances) { + for (DInstanceWorld instance : instances) { if (instance.getId() >= id) { id = instance.getId() + 1; } @@ -231,7 +231,7 @@ public class Worlds { * @return a name for the instance * * @param game - * whether the instance is a GameWorld + * whether the instance is a DGameWorld */ public String generateName(boolean game) { return "DXL_" + (game ? "Game" : "Edit") + "_" + generateId(); diff --git a/src/test/java/io/github/dre2n/dungeonsxl/sign/CustomSign.java b/src/test/java/io/github/dre2n/dungeonsxl/sign/CustomSign.java index 05636da9..9e6ce200 100644 --- a/src/test/java/io/github/dre2n/dungeonsxl/sign/CustomSign.java +++ b/src/test/java/io/github/dre2n/dungeonsxl/sign/CustomSign.java @@ -16,7 +16,7 @@ */ package io.github.dre2n.dungeonsxl.sign; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import org.bukkit.block.Sign; import org.bukkit.entity.Player; @@ -27,7 +27,7 @@ public class CustomSign extends DSign { private DSignType type = DSignTypeCustom.CUSTOM; - public CustomSign(Sign sign, String[] lines, GameWorld gameWorld) { + public CustomSign(Sign sign, String[] lines, DGameWorld gameWorld) { super(sign, lines, gameWorld); } diff --git a/src/test/java/io/github/dre2n/dungeonsxl/trigger/CustomTrigger.java b/src/test/java/io/github/dre2n/dungeonsxl/trigger/CustomTrigger.java index 2f72acc4..57bb5bf8 100644 --- a/src/test/java/io/github/dre2n/dungeonsxl/trigger/CustomTrigger.java +++ b/src/test/java/io/github/dre2n/dungeonsxl/trigger/CustomTrigger.java @@ -17,7 +17,7 @@ package io.github.dre2n.dungeonsxl.trigger; import io.github.dre2n.dungeonsxl.event.trigger.TriggerActionEvent; -import io.github.dre2n.dungeonsxl.world.GameWorld; +import io.github.dre2n.dungeonsxl.world.DGameWorld; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; @@ -28,7 +28,7 @@ import org.bukkit.entity.Player; */ public class CustomTrigger extends Trigger { - private static Map> triggers = new HashMap<>(); + private static Map> triggers = new HashMap<>(); private TriggerType type = TriggerTypeCustom.CUSTOM; @@ -55,7 +55,7 @@ public class CustomTrigger extends Trigger { } @Override - public void register(GameWorld gameWorld) { + public void register(DGameWorld gameWorld) { if (!hasTriggers(gameWorld)) { ArrayList list = new ArrayList<>(); list.add(this); @@ -67,7 +67,7 @@ public class CustomTrigger extends Trigger { } @Override - public void unregister(GameWorld gameWorld) { + public void unregister(DGameWorld gameWorld) { if (hasTriggers(gameWorld)) { triggers.get(gameWorld).remove(this); } @@ -78,7 +78,7 @@ public class CustomTrigger extends Trigger { return type; } - public static CustomTrigger getOrCreate(String value, GameWorld gameWorld) { + public static CustomTrigger getOrCreate(String value, DGameWorld gameWorld) { if (triggers.containsKey(gameWorld)) { for (CustomTrigger trigger : triggers.get(gameWorld)) { if (trigger.value.equals(value)) { @@ -90,7 +90,7 @@ public class CustomTrigger extends Trigger { return new CustomTrigger(value); } - public static boolean hasTriggers(GameWorld gameWorld) { + public static boolean hasTriggers(DGameWorld gameWorld) { return !triggers.isEmpty() && triggers.containsKey(gameWorld); }