From 72a941d38605df52c561812dbf2279206503f0f6 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sat, 11 Jan 2020 00:57:31 +0100 Subject: [PATCH 01/29] Update dependencies --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 39566dd8..6e933baf 100644 --- a/pom.xml +++ b/pom.xml @@ -25,13 +25,13 @@ de.erethon.commons commons-dist - 6.0 + 6.1 compile de.erethon caliburn - 0.5.5 + 1.0-SNAPSHOT compile From b11ff2d4a33b775bd91491ccc87387e1905f908b Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sat, 11 Jan 2020 01:40:04 +0100 Subject: [PATCH 02/29] Basic player API --- .../erethon/dungeonsxl/api/DungeonsAPI.java | 98 ++++++ .../dungeonsxl/api/player/EditPlayer.java | 56 +++ .../dungeonsxl/api/player/GamePlayer.java | 210 +++++++++++ .../dungeonsxl/api/player/GlobalPlayer.java | 131 +++++++ .../dungeonsxl/api/player/InstancePlayer.java | 42 +++ .../dungeonsxl/api/player/PlayerClass.java | 132 +++++++ .../dungeonsxl/api/player/PlayerGroup.java | 327 ++++++++++++++++++ .../de/erethon/dungeonsxl/util/DColor.java | 126 ------- 8 files changed, 996 insertions(+), 126 deletions(-) create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/player/EditPlayer.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/player/InstancePlayer.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerClass.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java delete mode 100644 api/src/main/java/de/erethon/dungeonsxl/util/DColor.java diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java new file mode 100644 index 00000000..a7696f17 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2012-2020 Frank Baumann + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.erethon.dungeonsxl.api; + +import de.erethon.commons.misc.Registry; +import de.erethon.dungeonsxl.api.dungeon.Dungeon; +import de.erethon.dungeonsxl.api.player.PlayerClass; +import de.erethon.dungeonsxl.api.player.PlayerGroup; +import de.erethon.dungeonsxl.api.sign.DungeonSignType; +import java.io.File; +import java.util.Collection; +import org.bukkit.entity.Player; + +/** + * @author Daniel Saukel + */ +public interface DungeonsAPI { + + static final File PLUGIN_ROOT = new File("plugins/DungeonsXL"); + static final File BACKUPS = new File(PLUGIN_ROOT, "backups"); + static final File LANGUAGES = new File(PLUGIN_ROOT, "languages"); + static final File MAPS = new File(PLUGIN_ROOT, "maps"); + static final File PLAYERS = new File(PLUGIN_ROOT, "players"); + static final File SCRIPTS = new File(PLUGIN_ROOT, "scripts"); + static final File ANNOUNCERS = new File(SCRIPTS, "announcers"); + static final File CLASSES = new File(SCRIPTS, "classes"); + static final File DUNGEONS = new File(SCRIPTS, "dungeons"); + static final File SIGNS = new File(SCRIPTS, "signs"); + + /** + * Returns a {@link Registry} of the loaded classes. + * + * @return a {@link Registry} of the loaded classes + */ + Registry getClassRegistry(); + + /* Object initialization */ + /** + * Creates a new group. + * + * @param leader the leader + * @return a new group + */ + PlayerGroup createGroup(Player leader); + + /** + * Creates a new group. + * + * @param leader the leader + * @param color the color that represents the group and sets the name + * @return a new group or null if values are invalid + */ + PlayerGroup createGroup(Player leader, PlayerGroup.Color color); + + /** + * Creates a new group. + * + * @param leader the leader + * @param name the group's name - must be unique + * @return a new group or null if values are invalid + */ + PlayerGroup createGroup(Player leader, String name); + + /** + * Creates a new group. + * + * @param leader the leader + * @param dungeon the dungeon to play + * @return a new group or null if values are invalid + */ + PlayerGroup createGroup(Player leader, Dungeon dungeon); + + /** + * Creates a new group. + * + * @param leader the leader + * @param members the group members with or without the leader + * @param name the name of the group + * @param dungeon the dungeon to play + * @return a new group or null if values are invalid + */ + PlayerGroup createGroup(Player leader, Collection members, String name, Dungeon dungeon); + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/EditPlayer.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/EditPlayer.java new file mode 100644 index 00000000..1b2a57ee --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/EditPlayer.java @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2012-2020 Frank Baumann + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.erethon.dungeonsxl.api.player; + +import de.erethon.dungeonsxl.api.world.EditWorld; + +/** + * Represents a player in an edit instance. + *

+ * All players in an edit world have one wrapper object that is an instance of EditPlayer. + * + * @author Daniel Saukel + */ +public interface EditPlayer extends InstancePlayer { + + /** + * Returns the {@link de.erethon.dungeonsxl.api.world.EditWorld} the player is editing. + * + * @return the {@link de.erethon.dungeonsxl.api.world.EditWorld} the player is editing + */ + EditWorld getEditWorld(); + + /** + * Returns the lines of a sign the player has copied with a stick tool in an array with the length of four. + * + * @return the lines of a sign the player has copied with a stick tool in an array with the length of four + */ + String[] getCopiedLines(); + + /** + * Sets the memorized sign lines. + * + * @param copiedLines the lines + */ + void setCopiedLines(String[] copiedLines); + + /** + * Makes the player leave the edit world without saving the progress. + */ + void escape(); + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java new file mode 100644 index 00000000..2ff84a93 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java @@ -0,0 +1,210 @@ +/* + * Copyright (C) 2012-2020 Frank Baumann + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.erethon.dungeonsxl.api.player; + +import org.bukkit.Location; + +/** + * Represents a player in a game dungeon instance. + *

+ * All players in a game world have one wrapper object that is an instance of GamePlayer. + * + * @author Daniel Saukel + */ +public interface GamePlayer extends InstancePlayer { + + /** + * Returns if the player is ready to start the game. + *

+ * This is usually achieved by triggering a ready sign. + * + * @return if the player is ready to start the game + */ + boolean isReady(); + + /** + * Returns if the player finished the game. + *

+ * This is usually achieved by triggering an end sign. + *

+ * It is used for both the end of a whole dungeon and the end of a floor. + * + * @return if the player finished the game + */ + boolean isFinished(); + + /** + * Sets if the player finished their game. + * + * @param finished if the player finished the game + */ + void setFinished(boolean finished); + + /** + * Returns the player's class or null if they have none. + * + * @return the player's class + */ + PlayerClass getPlayerClass(); + + /** + * Sets and applies the given class. + * + * @param playerClass the class + */ + void setPlayerClass(PlayerClass playerClass); + + /** + * Returns the location of the last checkpoint the player reached. + * + * @return the location of the last checkpoint the player reached + */ + Location getLastCheckpoint(); + + /** + * Sets the location of the last checkpoint the player reached. + *

+ * This is where the player respawns if they die and have -1 or >0 {@link #getLives() lives} left. + * + * @param checkpoint the checkpoint location + */ + void setLastCheckpoint(Location checkpoint); + + /** + * Returns the saved time millis from when the player went offline. + * + * @return the saved time millis from when the player went offline + */ + long getOfflineTimeMillis(); + + /** + * Sets the saved time millis from when the player went offline. + * + * @param time the time millis + */ + void setOfflineTimeMillis(long time); + + /** + * Returns the original amount of lives the player had in the current game or -1 if lives aren't used. + * + * @return the original amount of lives the player had in the current game or -1 if lives aren't used + */ + int getInitialLives(); + + /** + * Sets the original amount of lives the player had in the current game; -1 means lives aren't used. + * + * @param lives the amount of lives + */ + void setInitialLives(int lives); + + /** + * Returns the lives the player has left or -1 if per player lives aren't used. + * + * @return the lives the player has left or -1 if per player lives aren't used + */ + int getLives(); + + /** + * Sets the lives the player has left. + *

+ * This is not to be used if the dungeon uses group lives. + * + * @param lives the lives + */ + void setLives(int lives); + + /** + * Returns if the player is stealing another group's flag. + * + * @return if the player is stealing another group's flag + */ + boolean isStealingFlag(); + + /** + * Returns the group whose flag the player robbed; null if the player isn't stealing any. + * + * @return the group whose flag the player robbed; null if the player isn't stealing any + */ + PlayerGroup getRobbedGroup(); + + /** + * Sets the player to be stealing the team flag of the given group. + * + * @param group the group + */ + void setRobbedGroup(PlayerGroup group); + + /* Actions */ + /** + * Scores a point. + */ + void captureFlag(); + + /** + * Makes the player leave his group and dungeon. + *

+ * This sends default messages to the player. + */ + @Override + default void leave() { + leave(true); + } + + /** + * Makes the player leave his group and dungeon. + * + * @param sendMessages if default messages shall be sent to the player + */ + void leave(boolean sendMessages); + + /** + * Treats the player as if they lost their last life and kicks them from the dungeon. + */ + void kill(); + + /** + * Sets the player to be ready to start the dungeon game, like when a ready sign is triggered. + *

+ * If all other players in the group are already {@link #isReady() ready}, the game is started. + * + * @return if the game has been started. + */ + boolean ready(); + + /** + * Respawns the player. Also teleports DXL pets if there are any. + */ + void respawn(); + + /** + * The player finishs the current game. + *

+ * This sends default messages to the player. + */ + default void finish() { + finish(true); + } + + /** + * The player finishs the current game. + * + * @param sendMessages if default messages shall be sent to the player + */ + void finish(boolean sendMessages); + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java new file mode 100644 index 00000000..b5782975 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java @@ -0,0 +1,131 @@ +/* + * Copyright (C) 2012-2020 Frank Baumann + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.erethon.dungeonsxl.api.player; + +import de.erethon.commons.chat.MessageUtil; +import de.erethon.commons.player.PlayerWrapper; +import java.util.List; +import org.bukkit.Location; +import org.bukkit.inventory.ItemStack; + +/** + * Represents a player anywhere on the server. + *

+ * All players on the server, including the ones in dungeons, have one wrapper object that is an instance of GlobalPlayer. + * + * @author Daniel Saukel + */ +public interface GlobalPlayer extends PlayerWrapper { + + /** + * Returns the player's group. + * + * @return the player's group. + */ + PlayerGroup getGroup(); + + /** + * Returns if the player uses the built-in group chat. + * + * @return if the player uses the built-in group chat + */ + boolean isInGroupChat(); + + /** + * Sets if the player uses the built-in group chat. + * + * @param groupChat if the player shall use the built-in group chat + */ + void setInGroupChat(boolean groupChat); + + /** + * Returns if the player may read messages from the built-in group chat. + * + * @return if the player may read messages from the built-in group chat + */ + boolean isInChatSpyMode(); + + /** + * Sets if the player may read messages from the built-in group chat. + * + * @param chatSpyMode if the player may read messages from the built-in group chat + */ + void setInChatSpyMode(boolean chatSpyMode); + + /** + * Checks if the player has the given permission. + * + * @param permission the permission + * @return if the player has the given permission + */ + default boolean hasPermission(String permission) { + return getPlayer().hasPermission(permission); + } + + /** + * Returns the reward items a player collected in a dungeon game. + * + * @return the reward items a player collected in a dungeon game + */ + public List getRewardItems(); + + /** + * Returns if the player has any reward items left. + * + * @return if the player has any reward items left + */ + public boolean hasRewardItemsLeft(); + + /** + * Returns if the player is currently breaking a global protection (=using /dxl break). + * + * @return if the player is currently breaking a global protection (=using /dxl break) + */ + boolean isInBreakMode(); + + /** + * Sets the player into or out of break mode; see {@link #isInBreakMode()}. + * + * @param breakMode if the player may break global protections + */ + void setInBreakMode(boolean breakMode); + + /** + * Sends a message to the player. + * + * @param message the message to send + */ + default void sendMessage(String message) { + MessageUtil.sendMessage(getPlayer(), message); + } + + /** + * Respawns the player at his old position before he was in a dungeon. + * + * @param keepInventory if the saved status shall be reset + */ + void reset(boolean keepInventory); + + /** + * Respawns the player at his old position before he was in a dungeon. + * + * @param tpLoc the location where the player shall respawn + * @param keepInventory if the saved status shall be reset + */ + void reset(Location tpLoc, boolean keepInventory); + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/InstancePlayer.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/InstancePlayer.java new file mode 100644 index 00000000..1ba47148 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/InstancePlayer.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2012-2020 Frank Baumann + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.erethon.dungeonsxl.api.player; + +import org.bukkit.World; + +/** + * Represents a player in an instance. + *

+ * All players in a world instantiated by DungeonsXL, have one wrapper object that is an instance of InstancePlayer. + * + * @author Daniel Saukel + */ +public interface InstancePlayer extends GlobalPlayer { + + /** + * The world of the instance, where the player is supposed to be. + * + * @return the world of the instance + */ + World getWorld(); + + /** + * Makes the player leave his group and dungeon. + */ + void leave(); + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerClass.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerClass.java new file mode 100644 index 00000000..b0aba711 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerClass.java @@ -0,0 +1,132 @@ +/* + * Copyright (C) 2012-2020 Frank Baumann + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.erethon.dungeonsxl.api.player; + +import de.erethon.caliburn.CaliburnAPI; +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.inventory.ItemStack; + +/** + * Represents a class and a class script. + * + * @author Frank Baumann, Daniel Saukel + */ +public class PlayerClass { + + private String name; + + private List items = new ArrayList<>(); + private boolean dog; + + /** + * Creates a PlayerClass from a class YAML file. The name is taken from the file name. + * + * @param caliburn the CaliburnAPI instance + * @param file the class config file + */ + public PlayerClass(CaliburnAPI caliburn, File file) { + this(caliburn, file.getName().substring(0, file.getName().length() - 4), YamlConfiguration.loadConfiguration(file)); + } + + /** + * Creates a PlayerClass from the given class config. + * + * @param caliburn the CaliburnAPI instance + * @param name the class name + * @param config the config + */ + public PlayerClass(CaliburnAPI caliburn, String name, FileConfiguration config) { + this.name = name; + + if (config.contains("items")) { + items = caliburn.deserializeStackList(config, "items"); + } + + if (config.contains("dog")) { + dog = config.getBoolean("dog"); + } + } + + public PlayerClass(String name, List items, boolean dog) { + this.items = items; + this.name = name; + this.dog = dog; + } + + /** + * Returns the name of the class. + * + * @return the name of the class + */ + public String getName() { + return name; + } + + /** + * Returns the list of the items this class gives to a player. + * + * @return the list of the the items this class gives to a player + */ + public List getItems() { + return items; + } + + /** + * Adds the given item to this class. + * + * @param itemStack the ItemStack to add + */ + public void addItem(ItemStack itemStack) { + items.add(itemStack); + } + + /** + * Removes the given item from this class. + * + * @param itemStack the ItemStack to remove + */ + public void removeItem(ItemStack itemStack) { + items.remove(itemStack); + } + + /** + * Returns if the class gives the player a dog. + * + * @return if the class has a dog + * @deprecated More dynamic pet features might make this obsolete in the future. + */ + @Deprecated + public boolean hasDog() { + return dog; + } + + /** + * Sets if the class gives the player a dog. + * + * @param dog if the class shall give the player a dog + * @deprecated More dynamic pet features might make this obsolete in the future. + */ + @Deprecated + public void setDog(boolean dog) { + this.dog = dog; + } + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java new file mode 100644 index 00000000..cf1c4f4a --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java @@ -0,0 +1,327 @@ +/* + * Copyright (C) 2012-2020 Frank Baumann + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.erethon.dungeonsxl.api.player; + +import de.erethon.caliburn.item.ExItem; +import de.erethon.caliburn.item.VanillaItem; +import de.erethon.commons.compatibility.Version; +import de.erethon.commons.player.PlayerCollection; +import de.erethon.dungeonsxl.api.dungeon.Dungeon; +import de.erethon.dungeonsxl.api.world.GameWorld; +import org.bukkit.ChatColor; +import org.bukkit.DyeColor; +import org.bukkit.entity.Player; + +/** + * Represents a group of players provided by DungeonsXL. + * + * @author Daniel Saukel + */ +public interface PlayerGroup { + + /** + * Links different color types together. + */ + public enum Color { + + BLACK(ChatColor.BLACK, DyeColor.BLACK, VanillaItem.BLACK_WOOL), + DARK_GRAY(ChatColor.DARK_GRAY, DyeColor.GRAY, VanillaItem.GRAY_WOOL), + LIGHT_GRAY(ChatColor.GRAY, DyeColor.valueOf(Version.isAtLeast(Version.MC1_13) ? "LIGHT_GRAY" : "SILVER"), VanillaItem.LIGHT_GRAY_WOOL), + WHITE(ChatColor.WHITE, DyeColor.WHITE, VanillaItem.WHITE_WOOL), + DARK_GREEN(ChatColor.DARK_GREEN, DyeColor.GREEN, VanillaItem.GREEN_WOOL), + LIGHT_GREEN(ChatColor.GREEN, DyeColor.LIME, VanillaItem.LIME_WOOL), + CYAN(ChatColor.DARK_AQUA, DyeColor.CYAN, VanillaItem.CYAN_WOOL), + DARK_BLUE(ChatColor.DARK_BLUE, DyeColor.BLUE, VanillaItem.BLUE_WOOL), + LIGHT_BLUE(ChatColor.AQUA, DyeColor.LIGHT_BLUE, VanillaItem.LIGHT_BLUE_WOOL), + PURPLE(ChatColor.DARK_PURPLE, DyeColor.PURPLE, VanillaItem.PURPLE_WOOL), + MAGENTA(ChatColor.LIGHT_PURPLE, DyeColor.MAGENTA, VanillaItem.MAGENTA_WOOL), + DARK_RED(ChatColor.DARK_RED, DyeColor.BROWN, VanillaItem.BROWN_WOOL), + LIGHT_RED(ChatColor.RED, DyeColor.RED, VanillaItem.RED_WOOL), + ORANGE(ChatColor.GOLD, DyeColor.ORANGE, VanillaItem.ORANGE_WOOL), + YELLOW(ChatColor.YELLOW, DyeColor.YELLOW, VanillaItem.YELLOW_WOOL), + PINK(ChatColor.BLUE, DyeColor.PINK, VanillaItem.PINK_WOOL); + + private ChatColor chat; + private DyeColor dye; + private VanillaItem woolMaterial; + + Color(ChatColor chat, DyeColor dye, VanillaItem woolMaterial) { + this.chat = chat; + this.dye = dye; + this.woolMaterial = woolMaterial; + } + + /** + * Returns the ChatColor. + * + * @return the ChatColor + */ + public ChatColor getChatColor() { + return chat; + } + + /** + * Returns the DyeColor. + * + * @return the DyeColor + */ + public DyeColor getDyeColor() { + return dye; + } + + /** + * Returns the RGB value. + * + * @return the RGB value + */ + public int getRGBColor() { + return dye.getColor().asRGB(); + } + + /** + * Returns the wool material. + * + * @return the wool material + */ + public VanillaItem getWoolMaterial() { + return woolMaterial; + } + + /** + * Returns the GroupColor matching the ChatColor or null if none exists. + * + * @param color the ChatColor to check + * @return the GroupColor matching the ChatColor or null if none exists + */ + public static Color getByChatColor(ChatColor color) { + for (Color groupColor : values()) { + if (groupColor.chat == color) { + return groupColor; + } + } + return null; + } + + /** + * Returns the GroupColor matching the DyeColor or null if none exists. + * + * @param color the DyeColor to check + * @return the GroupColor matching the DyeColor or null if none exists. + */ + public static Color getByDyeColor(DyeColor color) { + for (Color groupColor : values()) { + if (groupColor.dye == color) { + return groupColor; + } + } + return null; + } + + /** + * Returns the GroupColor matching the wool material or null if none exists. + * + * @param wool the wool material to check + * @return the GroupColor matching the wool material or null if none exists + */ + public static Color getByWoolType(ExItem wool) { + for (Color groupColor : values()) { + if (groupColor.woolMaterial == wool) { + return groupColor; + } + } + return null; + } + + } + + /** + * Returns the ID. + * + * @return the ID + */ + int getId(); + + /** + * Returns the formatted name. + *

+ * This is the name used e.g. in messages. + * + * @return the formatted name + */ + String getName(); + + /** + * Returns the raw, unformatted name. + *

+ * This is the name used e.g. in command arguments. + * + * @return the raw, unformatted name + */ + String getRawName(); + + /** + * Sets the name. + * + * @param name the name + */ + void setName(String name); + + /** + * Sets the name to a default value taken from the color. + *

+ * In the default implementation, this is nameOfTheColor#{@link #getId()} + * + * @param color the color + */ + default void setName(Color color) { + setName(color.toString() + "#" + getId()); + } + + /** + * The player who has permission to manage the group. + * + * @return the player who has permission to manage the group + */ + Player getLeader(); + + /** + * Sets the leader to another group member. + * + * @param player the new leader + */ + void setLeader(Player player); + + /** + * Returns a PlayerCollection of the group members + * + * @return a PlayerCollection of the group members + */ + PlayerCollection getMembers(); + + /** + * Adds a player to the group. + *

+ * The default implemenation calls {@link #addPlayer(Player, boolean)} with messages set to true. + * + * @param player the player to add + */ + default void addPlayer(Player player) { + addPlayer(player, true); + } + + /** + * Adds a player to the group. + * + * @param player the player to add + * @param message if messages shall be sent + */ + void addPlayer(Player player, boolean message); + + /** + * Removes a player from the group. + *

+ * The default implemenation calls {@link #removePlayer(Player, boolean)} with messages set to true. + * + * @param player the player to add + */ + default void removePlayer(Player player) { + addPlayer(player, true); + } + + /** + * Removes a player from the group. + * + * @param player the player to add + * @param message if messages shall be sent + */ + void removePlayer(Player player, boolean message); + + /** + * Returns a PlayerCollection of the players who are invited to join the group but did not yet do so. + * + * @return a PlayerCollection of the players who are invited to join the group but did not yet do so + */ + PlayerCollection getInvitedPlayers(); + + /** + * Invites a player to join the group. + * + * @param player the player to invite + * @param message if messages shall be sent + */ + void addInvitedPlayer(Player player, boolean message); + + /** + * Removes an invitation priviously made for a player to join the group. + * + * @param player the player to uninvite + * @param message if messages shall be sent + */ + void removeInvitedPlayer(Player player, boolean message); + + /** + * Removes all invitations for players who are not online. + */ + void clearOfflineInvitedPlayers(); + + /** + * Returns the game world the group is in. + * + * @return the game world the group is in + */ + GameWorld getGameWorld(); + + /** + * Sets the game world the group is in. + * + * @param gameWorld the game world to set + */ + void setGameWorld(GameWorld gameWorld); + + /** + * Returns the dungeon the group is playing or has remembered to play next. + *

+ * The latter is for example used when a group is created by a group sign sothat a portal or the auto-join function knows where to send the group. + * + * @return the dungeon the group is playing or has remembered to play next + */ + Dungeon getDungeon(); + + /** + * Returns if the group is already playing its remembered {@link #getDungeon() dungeon}. + * + * @return if the group is already playing its remembered {@link #getDungeon() dungeon} + */ + boolean isPlaying(); + + /** + * Returns the amount of lives the group currently has left or -1 if group lives are not used. + * + * @return the amount of lives the group currently has left or -1 if group lives are not used + */ + int getLives(); + + /** + * Sets the amount of lives the group currently has left. + *

+ * The value must be >=0 or -1, which means unlimited lives. + * + * @param lives the amount of lives the group currently has left + */ + void setLives(int lives); + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/util/DColor.java b/api/src/main/java/de/erethon/dungeonsxl/util/DColor.java deleted file mode 100644 index a5a24826..00000000 --- a/api/src/main/java/de/erethon/dungeonsxl/util/DColor.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (C) 2012-2019 Frank Baumann - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package de.erethon.dungeonsxl.util; - -import de.erethon.caliburn.item.ExItem; -import de.erethon.caliburn.item.VanillaItem; -import de.erethon.commons.compatibility.Version; -import org.bukkit.ChatColor; -import org.bukkit.DyeColor; - -/** - * Links different color types together. - * - * @author Daniel Saukel - */ -public enum DColor { - - BLACK(ChatColor.BLACK, DyeColor.BLACK, VanillaItem.BLACK_WOOL), - DARK_GRAY(ChatColor.DARK_GRAY, DyeColor.GRAY, VanillaItem.GRAY_WOOL), - LIGHT_GRAY(ChatColor.GRAY, DyeColor.valueOf(Version.isAtLeast(Version.MC1_13) ? "LIGHT_GRAY" : "SILVER"), VanillaItem.LIGHT_GRAY_WOOL), - WHITE(ChatColor.WHITE, DyeColor.WHITE, VanillaItem.WHITE_WOOL), - DARK_GREEN(ChatColor.DARK_GREEN, DyeColor.GREEN, VanillaItem.GREEN_WOOL), - LIGHT_GREEN(ChatColor.GREEN, DyeColor.LIME, VanillaItem.LIME_WOOL), - CYAN(ChatColor.DARK_AQUA, DyeColor.CYAN, VanillaItem.CYAN_WOOL), - DARK_BLUE(ChatColor.DARK_BLUE, DyeColor.BLUE, VanillaItem.BLUE_WOOL), - LIGHT_BLUE(ChatColor.AQUA, DyeColor.LIGHT_BLUE, VanillaItem.LIGHT_BLUE_WOOL), - PURPLE(ChatColor.DARK_PURPLE, DyeColor.PURPLE, VanillaItem.PURPLE_WOOL), - MAGENTA(ChatColor.LIGHT_PURPLE, DyeColor.MAGENTA, VanillaItem.MAGENTA_WOOL), - DARK_RED(ChatColor.DARK_RED, DyeColor.BROWN, VanillaItem.BROWN_WOOL), - LIGHT_RED(ChatColor.RED, DyeColor.RED, VanillaItem.RED_WOOL), - ORANGE(ChatColor.GOLD, DyeColor.ORANGE, VanillaItem.ORANGE_WOOL), - YELLOW(ChatColor.YELLOW, DyeColor.YELLOW, VanillaItem.YELLOW_WOOL), - PINK(ChatColor.BLUE, DyeColor.PINK, VanillaItem.PINK_WOOL); - - private ChatColor chat; - private DyeColor dye; - private VanillaItem woolMaterial; - - DColor(ChatColor chat, DyeColor dye, VanillaItem woolMaterial) { - this.chat = chat; - this.dye = dye; - this.woolMaterial = woolMaterial; - } - - /** - * @return the ChatColor - */ - public ChatColor getChatColor() { - return chat; - } - - /** - * @return the DyeColor - */ - public DyeColor getDyeColor() { - return dye; - } - - /** - * @return the RGB value - */ - public int getRGBColor() { - return dye.getColor().asRGB(); - } - - /** - * @return the wool material - */ - public VanillaItem getWoolMaterial() { - return woolMaterial; - } - - /** - * @param color the ChatColor to check - * @return the matching DColor or null - */ - public static DColor getByChatColor(ChatColor color) { - for (DColor dColor : values()) { - if (dColor.chat == color) { - return dColor; - } - } - return null; - } - - /** - * @param color the DyeColor to check - * @return the matching DColor or null - */ - public static DColor getByDyeColor(DyeColor color) { - for (DColor dColor : values()) { - if (dColor.dye == color) { - return dColor; - } - } - return null; - } - - /** - * @param wool the wool item to check - * @return the matching DColor or null - */ - public static DColor getByWoolType(ExItem wool) { - for (DColor dColor : values()) { - if (dColor.woolMaterial == wool) { - return dColor; - } - } - return null; - } - -} From b5ab282297ae01cc3d86ec12044cf8fc77c15f14 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sun, 12 Jan 2020 15:58:45 +0100 Subject: [PATCH 03/29] The API is LGPL --- api/LICENSE | 165 ++++++++++++++++++ .../erethon/dungeonsxl/api/DungeonsAPI.java | 20 +-- .../dungeonsxl/api/player/EditPlayer.java | 20 +-- .../dungeonsxl/api/player/GamePlayer.java | 20 +-- .../dungeonsxl/api/player/GlobalPlayer.java | 20 +-- .../dungeonsxl/api/player/InstancePlayer.java | 20 +-- .../dungeonsxl/api/player/PlayerClass.java | 20 +-- .../dungeonsxl/api/player/PlayerGroup.java | 20 +-- 8 files changed, 228 insertions(+), 77 deletions(-) create mode 100644 api/LICENSE diff --git a/api/LICENSE b/api/LICENSE new file mode 100644 index 00000000..0a041280 --- /dev/null +++ b/api/LICENSE @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java index a7696f17..ba6ee457 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java @@ -1,18 +1,16 @@ /* - * Copyright (C) 2012-2020 Frank Baumann + * Copyright (C) 2014-2020 Daniel Saukel * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . */ package de.erethon.dungeonsxl.api; diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/EditPlayer.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/EditPlayer.java index 1b2a57ee..a7972c87 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/EditPlayer.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/EditPlayer.java @@ -1,18 +1,16 @@ /* - * Copyright (C) 2012-2020 Frank Baumann + * Copyright (C) 2014-2020 Daniel Saukel * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . */ package de.erethon.dungeonsxl.api.player; diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java index 2ff84a93..1108aceb 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java @@ -1,18 +1,16 @@ /* - * Copyright (C) 2012-2020 Frank Baumann + * Copyright (C) 2014-2020 Daniel Saukel * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . */ package de.erethon.dungeonsxl.api.player; diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java index b5782975..d17c4aa0 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java @@ -1,18 +1,16 @@ /* - * Copyright (C) 2012-2020 Frank Baumann + * Copyright (C) 2014-2020 Daniel Saukel * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . */ package de.erethon.dungeonsxl.api.player; diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/InstancePlayer.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/InstancePlayer.java index 1ba47148..01dc60ef 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/InstancePlayer.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/InstancePlayer.java @@ -1,18 +1,16 @@ /* - * Copyright (C) 2012-2020 Frank Baumann + * Copyright (C) 2014-2020 Daniel Saukel * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . */ package de.erethon.dungeonsxl.api.player; diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerClass.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerClass.java index b0aba711..00c8a9c6 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerClass.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerClass.java @@ -1,18 +1,16 @@ /* - * Copyright (C) 2012-2020 Frank Baumann + * Copyright (C) 2014-2020 Daniel Saukel * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . */ package de.erethon.dungeonsxl.api.player; diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java index cf1c4f4a..e034176e 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java @@ -1,18 +1,16 @@ /* - * Copyright (C) 2012-2020 Frank Baumann + * Copyright (C) 2014-2020 Daniel Saukel * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . */ package de.erethon.dungeonsxl.api.player; From 7e2153f5321bd236c8d67a891fcb8413ad99a82b Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sun, 12 Jan 2020 16:10:08 +0100 Subject: [PATCH 04/29] Adapter | API --- adapter/pom.xml | 26 +++++++++++++++++++ .../adapter/block/BlockAdapter.java | 6 ++--- bukkit_blockdata/pom.xml | 6 +++++ .../adapter/block/BlockAdapterBlockData.java | 6 ++--- bukkit_magicvalues/pom.xml | 6 +++++ .../block/BlockAdapterMagicValues.java | 6 ++--- core/pom.xml | 6 +++++ pom.xml | 1 + 8 files changed, 54 insertions(+), 9 deletions(-) create mode 100644 adapter/pom.xml rename {api => adapter}/src/main/java/de/erethon/dungeonsxl/adapter/block/BlockAdapter.java (87%) diff --git a/adapter/pom.xml b/adapter/pom.xml new file mode 100644 index 00000000..bf9ae6e9 --- /dev/null +++ b/adapter/pom.xml @@ -0,0 +1,26 @@ + + 4.0.0 + de.erethon.dungeonsxl + dungeonsxl-adapter + 0.18-SNAPSHOT + jar + + de.erethon.dungeonsxl + dungeonsxl-parent + 0.18-SNAPSHOT + + + + de.erethon.dungeonsxl + dungeonsxl-api + ${project.parent.version} + compile + + + org.spigotmc + spigot-api + ${spigotVersion.latest} + provided + + + diff --git a/api/src/main/java/de/erethon/dungeonsxl/adapter/block/BlockAdapter.java b/adapter/src/main/java/de/erethon/dungeonsxl/adapter/block/BlockAdapter.java similarity index 87% rename from api/src/main/java/de/erethon/dungeonsxl/adapter/block/BlockAdapter.java rename to adapter/src/main/java/de/erethon/dungeonsxl/adapter/block/BlockAdapter.java index f34d4ee1..0fa34b33 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/adapter/block/BlockAdapter.java +++ b/adapter/src/main/java/de/erethon/dungeonsxl/adapter/block/BlockAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ */ package de.erethon.dungeonsxl.adapter.block; -import de.erethon.dungeonsxl.util.DColor; +import de.erethon.dungeonsxl.api.player.PlayerGroup.Color; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; @@ -29,7 +29,7 @@ public interface BlockAdapter { void openDoor(Block block); - void setBlockWoolColor(Block block, DColor color); + void setBlockWoolColor(Block block, Color color); BlockFace getFacing(Block block); diff --git a/bukkit_blockdata/pom.xml b/bukkit_blockdata/pom.xml index 4ef19813..a28f4996 100644 --- a/bukkit_blockdata/pom.xml +++ b/bukkit_blockdata/pom.xml @@ -10,6 +10,12 @@ 0.18-SNAPSHOT + + de.erethon.dungeonsxl + dungeonsxl-adapter + ${project.parent.version} + compile + de.erethon.dungeonsxl dungeonsxl-api diff --git a/bukkit_blockdata/src/main/java/de/erethon/dungeonsxl/adapter/block/BlockAdapterBlockData.java b/bukkit_blockdata/src/main/java/de/erethon/dungeonsxl/adapter/block/BlockAdapterBlockData.java index dad65ace..b07d8dc5 100644 --- a/bukkit_blockdata/src/main/java/de/erethon/dungeonsxl/adapter/block/BlockAdapterBlockData.java +++ b/bukkit_blockdata/src/main/java/de/erethon/dungeonsxl/adapter/block/BlockAdapterBlockData.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ */ package de.erethon.dungeonsxl.adapter.block; -import de.erethon.dungeonsxl.util.DColor; +import de.erethon.dungeonsxl.api.player.PlayerGroup.Color; import org.bukkit.Axis; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; @@ -51,7 +51,7 @@ public class BlockAdapterBlockData implements BlockAdapter { } @Override - public void setBlockWoolColor(Block block, DColor color) { + public void setBlockWoolColor(Block block, Color color) { block.setType(color.getWoolMaterial().getMaterial()); } diff --git a/bukkit_magicvalues/pom.xml b/bukkit_magicvalues/pom.xml index c95a7afc..f25ed180 100644 --- a/bukkit_magicvalues/pom.xml +++ b/bukkit_magicvalues/pom.xml @@ -10,6 +10,12 @@ 0.18-SNAPSHOT + + de.erethon.dungeonsxl + dungeonsxl-adapter + ${project.parent.version} + compile + de.erethon.dungeonsxl dungeonsxl-api diff --git a/bukkit_magicvalues/src/main/java/de/erethon/dungeonsxl/adapter/block/BlockAdapterMagicValues.java b/bukkit_magicvalues/src/main/java/de/erethon/dungeonsxl/adapter/block/BlockAdapterMagicValues.java index 91e55fe3..d446d8a4 100644 --- a/bukkit_magicvalues/src/main/java/de/erethon/dungeonsxl/adapter/block/BlockAdapterMagicValues.java +++ b/bukkit_magicvalues/src/main/java/de/erethon/dungeonsxl/adapter/block/BlockAdapterMagicValues.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ */ package de.erethon.dungeonsxl.adapter.block; -import de.erethon.dungeonsxl.util.DColor; +import de.erethon.dungeonsxl.api.player.PlayerGroup.Color; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; @@ -45,7 +45,7 @@ public class BlockAdapterMagicValues implements BlockAdapter { } @Override - public void setBlockWoolColor(Block block, DColor color) { + public void setBlockWoolColor(Block block, Color color) { block.setTypeIdAndData(Material.WOOL.getId(), color.getDyeColor().getWoolData(), false); } diff --git a/core/pom.xml b/core/pom.xml index 1070f0dc..2a717c35 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -22,6 +22,12 @@ + + de.erethon.dungeonsxl + dungeonsxl-adapter + ${project.parent.version} + compile + de.erethon.dungeonsxl dungeonsxl-api diff --git a/pom.xml b/pom.xml index 6e933baf..91b2df67 100644 --- a/pom.xml +++ b/pom.xml @@ -8,6 +8,7 @@ https://dre2n.github.io Create custom dungeons and adventure maps with ease! + adapter api bukkit_blockdata bukkit_magicvalues From ab845b855738d3323f61471aa67d082770e6b29b Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Fri, 24 Jan 2020 17:27:19 +0100 Subject: [PATCH 05/29] Add some API / implementation difference notes --- .../main/java/de/erethon/dungeonsxl/api/player/EditPlayer.java | 1 + .../main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java | 1 + .../java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java | 3 +++ .../java/de/erethon/dungeonsxl/api/player/InstancePlayer.java | 1 + .../java/de/erethon/dungeonsxl/api/player/PlayerGroup.java | 2 ++ 5 files changed, 8 insertions(+) diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/EditPlayer.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/EditPlayer.java index a7972c87..f64abb61 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/EditPlayer.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/EditPlayer.java @@ -23,6 +23,7 @@ import de.erethon.dungeonsxl.api.world.EditWorld; * * @author Daniel Saukel */ +// Implementation-specific methods: g/s lines copy, poke public interface EditPlayer extends InstancePlayer { /** diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java index 1108aceb..61b350a5 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java @@ -23,6 +23,7 @@ import org.bukkit.Location; * * @author Daniel Saukel */ +// Implementation-specific methods: isInTestMode, setReady, [wolf, group tag, requirement, loot check methods], finishFloor public interface GamePlayer extends InstancePlayer { /** diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java index d17c4aa0..6718415a 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java @@ -27,6 +27,7 @@ import org.bukkit.inventory.ItemStack; * * @author Daniel Saukel */ +// Implementation-specific methods: getters and setters: data, portal, cached item, announcer, reward items; startTutorial public interface GlobalPlayer extends PlayerWrapper { /** @@ -104,6 +105,8 @@ public interface GlobalPlayer extends PlayerWrapper { /** * Sends a message to the player. + *

+ * Supports color codes. * * @param message the message to send */ diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/InstancePlayer.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/InstancePlayer.java index 01dc60ef..4811fbf7 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/InstancePlayer.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/InstancePlayer.java @@ -23,6 +23,7 @@ import org.bukkit.World; * * @author Daniel Saukel */ +// Implementation-specific methods: setWorld, clearPlayerData, delete, chat, update public interface InstancePlayer extends GlobalPlayer { /** diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java index e034176e..f415baf3 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java @@ -29,6 +29,8 @@ import org.bukkit.entity.Player; * * @author Daniel Saukel */ +// Implementation-specific methods: setDungeon, setPlaying, [color, unplayed floor, floor count, reward methods], isEmpty, isCustom, isFinished, teleport, +// finish, finishFloor, startGame, winGame, requirements methods public interface PlayerGroup { /** From 0f38b9c89925771c04447e62412e669a661c964b Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Fri, 24 Jan 2020 17:27:37 +0100 Subject: [PATCH 06/29] More PlayerGroup APIs --- .../dungeonsxl/api/player/PlayerGroup.java | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java index f415baf3..99997480 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java @@ -16,6 +16,7 @@ package de.erethon.dungeonsxl.api.player; import de.erethon.caliburn.item.ExItem; import de.erethon.caliburn.item.VanillaItem; +import de.erethon.commons.chat.MessageUtil; import de.erethon.commons.compatibility.Version; import de.erethon.commons.player.PlayerCollection; import de.erethon.dungeonsxl.api.dungeon.Dungeon; @@ -308,6 +309,22 @@ public interface PlayerGroup { */ boolean isPlaying(); + /** + * Returns the initial amount of lives or -1 if group lives are not used. + * + * @return the initial amount of lives or -1 if group lives are not used + */ + int getInitialLives(); + + /** + * Sets the initial amount of lives. + *

+ * The value must be >=0 or -1, which means unlimited lives. + * + * @param lives the new amount of lives known as the initial amount + */ + void setInitialLives(int lives); + /** * Returns the amount of lives the group currently has left or -1 if group lives are not used. * @@ -324,4 +341,32 @@ public interface PlayerGroup { */ void setLives(int lives); + /** + * Disbands the group. + */ + void delete(); + + /** + * Sends a message to all players in the group. + *

+ * Supports color codes. + * + * @param message the message to sent + * @param except Players who shall not receive the message + */ + default void sendMessage(String message, Player... except) { + members: + for (Player player : getMembers().getOnlinePlayers()) { + if (!player.isOnline()) { + continue; + } + for (Player nope : except) { + if (player == nope) { + continue members; + } + } + MessageUtil.sendMessage(player, message); + } + } + } From 43027ae8a99e187b126c1f2d7926250f57ae952d Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Fri, 24 Jan 2020 17:27:54 +0100 Subject: [PATCH 07/29] Generate JavaDoc on compilation --- api/pom.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/api/pom.xml b/api/pom.xml index 4e258f5d..fcb81e15 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -9,6 +9,24 @@ dungeonsxl-parent 0.18-SNAPSHOT + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + + attach-javadocs + install + + javadoc + + + + + + org.spigotmc From eb18ee9bce2424a7dcb2becfafc611bf0fe3db60 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Mon, 27 Jan 2020 01:31:54 +0100 Subject: [PATCH 08/29] Add dungeon sign API --- .../erethon/dungeonsxl/api/DungeonsAPI.java | 20 +- .../de/erethon/dungeonsxl/api/Trigger.java | 33 ++++ .../dungeonsxl/api/player/PlayerGroup.java | 2 +- .../dungeonsxl/api/sign/AbstractDSign.java | 113 ++++++++++++ .../erethon/dungeonsxl/api/sign/Button.java | 74 ++++++++ .../dungeonsxl/api/sign/Deactivatable.java | 86 +++++++++ .../dungeonsxl/api/sign/DungeonSign.java | 173 ++++++++++++++++++ .../erethon/dungeonsxl/api/sign/Passive.java | 39 ++++ .../erethon/dungeonsxl/api/sign/Rocker.java | 42 +++++ .../erethon/dungeonsxl/api/sign/Windup.java | 40 ++++ 10 files changed, 618 insertions(+), 4 deletions(-) create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/Trigger.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/sign/AbstractDSign.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/sign/Button.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/sign/Deactivatable.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/sign/DungeonSign.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/sign/Passive.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/sign/Rocker.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/sign/Windup.java diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java index ba6ee457..bca9a15a 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java @@ -15,18 +15,18 @@ package de.erethon.dungeonsxl.api; import de.erethon.commons.misc.Registry; -import de.erethon.dungeonsxl.api.dungeon.Dungeon; import de.erethon.dungeonsxl.api.player.PlayerClass; import de.erethon.dungeonsxl.api.player.PlayerGroup; -import de.erethon.dungeonsxl.api.sign.DungeonSignType; +import de.erethon.dungeonsxl.api.sign.DungeonSign; import java.io.File; import java.util.Collection; import org.bukkit.entity.Player; +import org.bukkit.plugin.Plugin; /** * @author Daniel Saukel */ -public interface DungeonsAPI { +public interface DungeonsAPI extends Plugin { static final File PLUGIN_ROOT = new File("plugins/DungeonsXL"); static final File BACKUPS = new File(PLUGIN_ROOT, "backups"); @@ -46,6 +46,20 @@ public interface DungeonsAPI { */ Registry getClassRegistry(); + /** + * Returns a {@link Registry} of the sign types. + * + * @return a {@link Registry} of the sign types + */ + Registry> getSignTypes(); + + /** + * Returns a {@link Registry} of the trigger types. + * + * @return a {@link Registry} of the trigger types + */ + Registry> getTriggerTypes(); + /* Object initialization */ /** * Creates a new group. diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/Trigger.java b/api/src/main/java/de/erethon/dungeonsxl/api/Trigger.java new file mode 100644 index 00000000..baa66f76 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/Trigger.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api; + +import org.bukkit.entity.Player; + +/** + * @deprecated stub + * + * @author Daniel Saukel + */ +@Deprecated +public interface Trigger { + + @Deprecated + boolean isTriggered(); + + @Deprecated + Player getPlayer(); + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java index 99997480..6e9007c4 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java @@ -19,7 +19,7 @@ import de.erethon.caliburn.item.VanillaItem; import de.erethon.commons.chat.MessageUtil; import de.erethon.commons.compatibility.Version; import de.erethon.commons.player.PlayerCollection; -import de.erethon.dungeonsxl.api.dungeon.Dungeon; +import de.erethon.dungeonsxl.api.Dungeon; import de.erethon.dungeonsxl.api.world.GameWorld; import org.bukkit.ChatColor; import org.bukkit.DyeColor; diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/AbstractDSign.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/AbstractDSign.java new file mode 100644 index 00000000..b03d0585 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/AbstractDSign.java @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.sign; + +import de.erethon.caliburn.item.VanillaItem; +import de.erethon.commons.chat.MessageUtil; +import de.erethon.dungeonsxl.api.DungeonsAPI; +import de.erethon.dungeonsxl.api.Trigger; +import de.erethon.dungeonsxl.api.world.GameWorld; +import java.util.HashSet; +import java.util.Set; +import org.bukkit.ChatColor; +import org.bukkit.block.Sign; + +/** + * Skeletal implementation of {@link DungeonSign}. + * + * @author Daniel Saukel + */ +public abstract class AbstractDSign implements DungeonSign { + + public static final String ERROR_0 = ChatColor.DARK_RED + "## ERROR ##"; + public static final String ERROR_1 = ChatColor.WHITE + "Please"; + public static final String ERROR_2 = ChatColor.WHITE + "contact an"; + public static final String ERROR_3 = ChatColor.WHITE + "Admin!"; + + protected DungeonsAPI api; + private Sign sign; + private String[] lines; + private GameWorld gameWorld; + private Set triggers = new HashSet<>(); + private boolean initialized; + private boolean erroneous; + + protected AbstractDSign(DungeonsAPI api, Sign sign, String[] lines, GameWorld gameWorld) { + this.api = api; + this.sign = sign; + this.lines = lines; + this.gameWorld = gameWorld; + } + + @Override + public Sign getSign() { + return sign; + } + + @Override + public String[] getLines() { + return lines; + } + + @Override + public GameWorld getGameWorld() { + return gameWorld; + } + + @Override + public Set getTriggers() { + return triggers; + } + + @Override + public void addTrigger(Trigger trigger) { + triggers.add(trigger); + } + + @Override + public void removeTrigger(Trigger trigger) { + triggers.remove(trigger); + } + + @Override + public boolean isInitialized() { + return initialized; + } + + @Override + public boolean setToAir() { + sign.getBlock().setType(VanillaItem.AIR.getMaterial()); + return true; + } + + @Override + public boolean isErroneous() { + return erroneous; + } + + @Override + public void markAsErroneous(String reason) { + erroneous = true; + sign.setLine(0, ERROR_0); + sign.setLine(1, ERROR_1); + sign.setLine(2, ERROR_2); + sign.setLine(3, ERROR_3); + sign.update(); + + MessageUtil.log(api, "&4A sign at &6" + sign.getX() + ", " + sign.getY() + ", " + sign.getZ() + "&4 is erroneous!"); + MessageUtil.log(api, getName() + ": " + reason); + } + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Button.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Button.java new file mode 100644 index 00000000..d27451ca --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Button.java @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.sign; + +import de.erethon.dungeonsxl.api.DungeonsAPI; +import de.erethon.dungeonsxl.api.Trigger; +import de.erethon.dungeonsxl.api.world.GameWorld; +import org.bukkit.block.Sign; +import org.bukkit.entity.Player; + +/** + * @author Daniel Saukel + */ +public abstract class Button extends AbstractDSign { + + protected Button(DungeonsAPI api, Sign sign, String[] lines, GameWorld gameWorld) { + super(api, sign, lines, gameWorld); + } + + public void push() { + getGameWorld().getPlayers().forEach(p -> push(p.getPlayer())); + } + + public boolean push(Player player) { + push(); + return true; + } + + @Override + public void update() { + if (isErroneous()) { + return; + } + + for (Trigger trigger : getTriggers()) { + if (!trigger.isTriggered()) { + return; + } + + if (trigger.getPlayer() == null) { + continue; + } + + if (push(trigger.getPlayer())) { + return; + } + } + + push(); + } + + /** + * This is the same as {@link #push(org.bukkit.entity.Player)}. + * + * @param player the player + */ + @Override + public void trigger(Player player) { + push(player); + } + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Deactivatable.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Deactivatable.java new file mode 100644 index 00000000..a751f461 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Deactivatable.java @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.sign; + +import de.erethon.commons.player.PlayerCollection; +import de.erethon.dungeonsxl.api.DungeonsAPI; +import de.erethon.dungeonsxl.api.Trigger; +import de.erethon.dungeonsxl.api.world.GameWorld; +import org.bukkit.block.Sign; +import org.bukkit.entity.Player; + +/** + * A {@link DungeonSign} that changes its state when triggered. + * + * @author Daniel Saukel + */ +public abstract class Deactivatable extends AbstractDSign { + + protected boolean active; + private PlayerCollection playersActivated = new PlayerCollection(); + + protected Deactivatable(DungeonsAPI api, Sign sign, String[] lines, GameWorld gameWorld) { + super(api, sign, lines, gameWorld); + } + + public void activate() { + active = true; + } + + public boolean activate(Player player) { + return playersActivated.add(player); + } + + public void deactivate() { + active = false; + } + + public boolean deactivate(Player player) { + return playersActivated.remove(player); + } + + public boolean isActive() { + return active; + } + + public boolean isActive(Player player) { + return playersActivated.contains(player); + } + + @Override + public void update() { + if (isErroneous()) { + return; + } + + for (Trigger trigger : getTriggers()) { + if (!trigger.isTriggered()) { + deactivate(); + return; + } + + if (trigger.getPlayer() == null) { + continue; + } + + if (activate(trigger.getPlayer())) { + return; + } + } + + activate(); + } + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/DungeonSign.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/DungeonSign.java new file mode 100644 index 00000000..78df378d --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/DungeonSign.java @@ -0,0 +1,173 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.sign; + +import de.erethon.dungeonsxl.api.Trigger; +import de.erethon.dungeonsxl.api.world.GameWorld; +import java.util.Set; +import org.bukkit.block.Sign; +import org.bukkit.entity.Player; + +/** + * Interface for all dungeon signs. + * + * @author Frank Baumann, Milan Albrecht, Daniel Saukel + */ +public interface DungeonSign { + + /** + * Returns the name to identify the sign. + * + * @return the name + */ + String getName(); + + /** + * Returns the permission node that is required to build a sign of this type. + * + * @return the build permission + */ + String getBuildPermission(); + + /** + * Returns if the sign gets initialized when the dungeon is loaded instead of when the game starts. + * + * @return if the sign gets initialized when the dungeon is loaded instead of when the game starts + */ + boolean isOnDungeonInit(); + + /** + * Returns if the sign block is breakable after the initialization. + * + * @return if the sign block is breakable after the initialization + */ + boolean isProtected(); + + /** + * Returns if the block type of the sign is set to air after the initialization. + * + * @return if the block type of the sign is set to air after the initialization + */ + boolean isSetToAir(); + + /** + * Returns the sign that represents event point. + * + * @return the sign that represents event point + */ + Sign getSign(); + + /** + * Returns the raw lines of this sign in an array with 4 elements. + * + * @return the raw lines of this sign in an array with 4 elements + */ + String[] getLines(); + + /** + * Returns the game world this sign is in; null if this is an edit world. + * + * @return the game world this sign is in; null if this is an edit world + */ + GameWorld getGameWorld(); + + /** + * Returns a Set of the triggers registered for this sign. + * + * @return a Set of the triggers registered for this sign + */ + Set getTriggers(); + + /** + * Returns if the sign has triggers. + * + * @return if the sign has triggers + */ + default boolean hasTriggers() { + return !getTriggers().isEmpty(); + } + + /** + * Adds a trigger to the sign. + * + * @param trigger the trigger + */ + void addTrigger(Trigger trigger); + + /** + * Attempts to remove a trigger from the sign. + * + * @param trigger the trigger + */ + void removeTrigger(Trigger trigger); + + /** + * Makes the sign listen for its triggers if it {@link #hasTriggers()}. + *

+ * {@link #trigger(org.bukkit.entity.Player)}s the sign if it does not have any triggers. + * (Note that some signs have interaction triggers by default, like ready signs). + */ + void initialize(); + + /** + * Returns if the sign is {@link #initialize()}d. + * + * @return if the sign is {@link #initialize()}d + */ + boolean isInitialized(); + + /** + * Triggers the sign. The effects are defined by the implementation. + * + * @param player the player that triggered the sign or null + */ + void trigger(Player player); + + /** + * Updates the sign. + */ + void update(); + + /** + * Sets the sign to air if it is not erroneous and if its type requires this. + * + * @return if the sign type was set to air + */ + boolean setToAir(); + + /** + * Returns if the sign is valid. + * + * @return if the sign is valid + */ + default boolean validate() { + return true; + } + + /** + * Returns if the sign is erroneous. + * + * @return if the sign is erroneous + */ + boolean isErroneous(); + + /** + * Set a placeholder to show that the sign is setup incorrectly. + * + * @param reason the reason why the sign is marked as erroneous + */ + void markAsErroneous(String reason); + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Passive.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Passive.java new file mode 100644 index 00000000..bee8a32f --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Passive.java @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.sign; + +import de.erethon.dungeonsxl.api.DungeonsAPI; +import de.erethon.dungeonsxl.api.world.GameWorld; +import org.bukkit.block.Sign; +import org.bukkit.entity.Player; + +/** + * @author Daniel Saukel + */ +public abstract class Passive extends AbstractDSign { + + protected Passive(DungeonsAPI api, Sign sign, String[] lines, GameWorld gameWorld) { + super(api, sign, lines, gameWorld); + } + + @Override + public final void update() { + } + + @Override + public final void trigger(Player player) { + } + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Rocker.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Rocker.java new file mode 100644 index 00000000..c20f368a --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Rocker.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.sign; + +import de.erethon.dungeonsxl.api.DungeonsAPI; +import de.erethon.dungeonsxl.api.world.GameWorld; +import org.bukkit.block.Sign; +import org.bukkit.entity.Player; + +/** + * A {@link Deactivatable} that, if triggered, and already activated, is deactivated. + * + * @author Daniel Saukel + */ +public abstract class Rocker extends Deactivatable { + + protected Rocker(DungeonsAPI api, Sign sign, String[] lines, GameWorld gameWorld) { + super(api, sign, lines, gameWorld); + } + + @Override + public void trigger(Player player) { + if (!isActive()) { + activate(player); + } else { + deactivate(); + } + } + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Windup.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Windup.java new file mode 100644 index 00000000..01404099 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Windup.java @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.sign; + +import de.erethon.dungeonsxl.api.DungeonsAPI; +import de.erethon.dungeonsxl.api.world.GameWorld; +import org.bukkit.block.Sign; + +/** + * @author Daniel Saukel + */ +public abstract class Windup extends Deactivatable { + + protected double interval = -1; + + protected Windup(DungeonsAPI api, Sign sign, String[] lines, GameWorld gameWorld) { + super(api, sign, lines, gameWorld); + } + + public double getIntervalSeconds() { + return interval; + } + + public long getIntervalTicks() { + return (long) (interval * 20L); + } + +} From da149bd51e8691e1e0764b0f507082dd23c35477 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Mon, 27 Jan 2020 01:35:38 +0100 Subject: [PATCH 09/29] Fix inconsistent method names --- api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java index bca9a15a..f0aa9c83 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java @@ -51,14 +51,14 @@ public interface DungeonsAPI extends Plugin { * * @return a {@link Registry} of the sign types */ - Registry> getSignTypes(); + Registry> getSignRegistry(); /** * Returns a {@link Registry} of the trigger types. * * @return a {@link Registry} of the trigger types */ - Registry> getTriggerTypes(); + Registry> getTriggerRegistry(); /* Object initialization */ /** From c5d95d1788efeafde91b31ad6b386ae4f4f900b0 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Mon, 27 Jan 2020 01:42:36 +0100 Subject: [PATCH 10/29] Add dungeon map API --- .../dungeonsxl/api/world/EditWorld.java | 52 +++++++ .../dungeonsxl/api/world/GameWorld.java | 82 +++++++++++ .../dungeonsxl/api/world/InstanceWorld.java | 132 ++++++++++++++++++ .../dungeonsxl/api/world/ResourceWorld.java | 97 +++++++++++++ 4 files changed, 363 insertions(+) create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/world/EditWorld.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/world/GameWorld.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/world/InstanceWorld.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/world/ResourceWorld.java diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/world/EditWorld.java b/api/src/main/java/de/erethon/dungeonsxl/api/world/EditWorld.java new file mode 100644 index 00000000..330b84de --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/world/EditWorld.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.world; + +import org.bukkit.block.Block; + +/** + * A raw resource world instance to edit the dungeon map. There is never more than one edit world per resource world. + *

+ * An edit world is not equal to a {@link de.erethon.dungeonsxl.api.dungeon.Dungeon}. + * + * @author Daniel Saukel + */ +public interface EditWorld extends InstanceWorld { + + /** + * Registers the block as a {@link de.erethon.dungeonsxl.api.sign.DungeonSign} sothat it can later be saved persistently. + * + * @param block a DungeonSign block + */ + void registerSign(Block block); + + /** + * Saves the sign data and overrides the resource with the changes. + */ + void save(); + + @Override + default void delete() { + delete(true); + } + + /** + * Deletes this edit instance. + * + * @param save whether this world should be {@link #save()}ed + */ + void delete(boolean save); + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/world/GameWorld.java b/api/src/main/java/de/erethon/dungeonsxl/api/world/GameWorld.java new file mode 100644 index 00000000..433322d0 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/world/GameWorld.java @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.world; + +import de.erethon.dungeonsxl.api.Dungeon; +import de.erethon.dungeonsxl.api.game.Game; +import org.bukkit.Location; + +/** + * A playable resource instance. There may be any amount of GameWorlds per {@link ResourceWorld}. + *

+ * A game world is not equal to a {@link de.erethon.dungeonsxl.api.Dungeon}. + * + * @author Daniel Saukel + */ +// Implementation-specific methods: [gameblock, secure objects, classes signs, mobs, triggers] methods, getMobCount(), setPlaying(), startGame(), listener methods +public interface GameWorld extends InstanceWorld { + + enum Type { + START_FLOOR, + END_FLOOR, + DEFAULT + } + + /** + * Returns the {@link Type} of this GameWorld. + * + * @return the {@link Type} of this GameWorld + */ + Type getType(); + + /** + * Sets the {@link Type} of this GameWorld. + * + * @param type the type + */ + void setType(Type type); + + /** + * Returns the game that is played in the game world. + * + * @return the game that is played in the game world + */ + Game getGame(); + + /** + * Returns the dungeon that the game world is part of. + *

+ * Note: While a {@link ResourceWorld} may be part of multiple dungeons, an instance is instantiated per game and thus has just one dungeon. + * + * @return the dungeon that the game world is part of + */ + Dungeon getDungeon(); + + /** + * Returns if the game has begun in the game world. + * + * @return if the game has begun in the game world + */ + boolean isPlaying(); + + /** + * Returns the start location of the world. This may be set by a start {@link de.erethon.dungeonsxl.api.sign.DungeonSign sign} or, if none exists, the + * Vanilla spawn location of the {@link #getWorld() world}. + * + * @return the start location of the world + */ + Location getStartLocation(); + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/world/InstanceWorld.java b/api/src/main/java/de/erethon/dungeonsxl/api/world/InstanceWorld.java new file mode 100644 index 00000000..3bb6508c --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/world/InstanceWorld.java @@ -0,0 +1,132 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.world; + +import de.erethon.dungeonsxl.api.player.InstancePlayer; +import de.erethon.dungeonsxl.api.sign.DungeonSign; +import java.io.File; +import java.util.Collection; +import org.bukkit.Location; +import org.bukkit.World; + +/** + * Super interface for worlds that are instantiated by DungeonsXL. + *

+ * An instance world is not equal to a {@link de.erethon.dungeonsxl.api.dungeon.Dungeon}. + * + * @author Daniel Saukel + */ +// Implementation-specific methods: getConfig, exists, setWeather +public interface InstanceWorld { + + /** + * Returns the name of the resource world of this instance. + *

+ * Use {@link #getWorld()#getName()} to get the name of the instantiated world (like e.g. DXL_Game_1). + * + * @return the name of the resource world of this instance + */ + String getName(); + + /** + * Returns the saved map this instance was loaded from. + * + * @return the saved map this instance was loaded from + */ + ResourceWorld getResource(); + + /** + * Returns the world folder. + * + * @return the world folder + */ + File getFolder(); + + /** + * Returns the wrapped Bukkit world. + * + * @return the wrapped Bukkit world + */ + World getWorld(); + + /** + * Returns the ID. This is usually the number in the map name. + * + * @return the ID + */ + int getId(); + + /** + * Returns a collection of the signs in this instance. + * + * @return a collection of the signs in this instance + */ + Collection getDungeonSigns(); + + /** + * Adds a dungeon sign to this instance. + * + * @param sign the sign + */ + void addDungeonSign(DungeonSign sign); + + /** + * Removes a dungeon sign from this instance. + * + * @param sign the sign + */ + void removeDungeonSign(DungeonSign sign); + + /** + * Returns the location of the lobby where players spawn by default when they are teleported into the dungeon. + * + * @return the location of the lobby where players spawn by default when they are teleported into the dungeon + */ + Location getLobbyLocation(); + + /** + * Sets the default spawn location of the instance. + *

+ * This is not persistent and does not create a lobby sign. + * + * @param location the location + */ + void setLobbyLocation(Location location); + + /** + * Returns the players in the instance. + * + * @return the players in the instance + */ + Collection getPlayers(); + + /** + * Sends a message to all players in the instance. + * + * @param message the message to send + */ + void sendMessage(String message); + + /** + * Makes all players leave the world. Attempts to let them leave properly if they are correct DInstancePlayers; teleports them to the spawn if they are not. + */ + void kickAllPlayers(); + + /** + * Deletes this instance. + */ + void delete(); + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/world/ResourceWorld.java b/api/src/main/java/de/erethon/dungeonsxl/api/world/ResourceWorld.java new file mode 100644 index 00000000..97e88d4d --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/world/ResourceWorld.java @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.world; + +import java.io.File; +import org.bukkit.OfflinePlayer; +import org.bukkit.World.Environment; + +/** + * A stored world that can be instantiated as an {@link EditWorld} or as a {@link GameWorld}. + *

+ * In the default implementation, these are saved under "plugins/DungeonsXL/maps/". + *

+ * A resource world is not equal to a {@link de.erethon.dungeonsxl.api.dungeon.Dungeon}. + * + * @author Daniel Saukel + */ +// Implementation-specific methods: getConfig, getSignData, generate +public interface ResourceWorld { + + /** + * Returns the name of this resource world. + *

+ * Equals {@link #getFolder()#getName()}. + * + * @return name of this resource world + */ + String getName(); + + /** + * Renames the resource world and its folder. + * + * @param name the new name + */ + void setName(String name); + + /** + * Returns the folder where this resource is stored. + * + * @return the folder where this resource is stored + */ + File getFolder(); + + /** + * Returns the environment of the world as defined in the config or {@link org.bukkit.World.Environment#NORMAL} if nothing is set. + * + * @return the environment of the world as defined in the config or {@link org.bukkit.World.Environment#NORMAL} if nothing is set + */ + Environment getWorldEnvironment(); + + /** + * Adds the player to the list of players that are invited to edit the resource. + * + * @param player the player + */ + void addInvitedPlayer(OfflinePlayer player); + + /** + * Returns if the player is invited to edit the resource. + * + * @param player the player + * @return if the player is invited to edit the resource + */ + boolean isInvitedPlayer(OfflinePlayer player); + + /** + * Creates a backup of the resource. + */ + void backup(); + + /** + * Returns the loaded edit instance of this world or generates a new one if none exists. + * + * @return the loaded edit instance of this world or generates a new one if none exists + */ + EditWorld getOrInstantiateEditWorld(); + + /** + * Returns a new game instance of this resource. + * + * @return a new game instance of this resource + */ + GameWorld instantiateGameWorld(); + +} From 0c089e65a622c22b32822d18fd611bf26c5cdc2e Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Mon, 27 Jan 2020 01:49:31 +0100 Subject: [PATCH 11/29] Add reward API --- .../erethon/dungeonsxl/api/DungeonsAPI.java | 7 ++++ .../de/erethon/dungeonsxl/api/Reward.java | 34 +++++++++++++++++++ .../dungeonsxl/api/player/PlayerGroup.java | 24 +++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/Reward.java diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java index f0aa9c83..b179905e 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java @@ -60,6 +60,13 @@ public interface DungeonsAPI extends Plugin { */ Registry> getTriggerRegistry(); + /** + * Returns a {@link Registry} of the reward types. + * + * @return a {@link Registry} of the reward types + */ + Registry> getRewardRegistry(); + /* Object initialization */ /** * Creates a new group. diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/Reward.java b/api/src/main/java/de/erethon/dungeonsxl/api/Reward.java new file mode 100644 index 00000000..eecd88c3 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/Reward.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api; + +import org.bukkit.entity.Player; + +/** + * Something players are given when they successfully finish a {@link de.erethon.dungeonsxl.api.Dungeon}. + *

+ * @see de.erethon.dungeonsxl.api.player.PlayerGroup#getRewards() + * @author Daniel Saukel + */ +public interface Reward { + + /** + * Gives the reward to the given player. + * + * @param player the player + */ + void giveTo(Player player); + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java index 6e9007c4..e2d44468 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java @@ -20,7 +20,10 @@ import de.erethon.commons.chat.MessageUtil; import de.erethon.commons.compatibility.Version; import de.erethon.commons.player.PlayerCollection; import de.erethon.dungeonsxl.api.Dungeon; +import de.erethon.dungeonsxl.api.Reward; import de.erethon.dungeonsxl.api.world.GameWorld; +import java.util.List; +import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.DyeColor; import org.bukkit.entity.Player; @@ -309,6 +312,27 @@ public interface PlayerGroup { */ boolean isPlaying(); + /** + * Returns the rewards that are memorized for the group. These are given when the game is finished. + * + * @return the rewards + */ + List getRewards(); + + /** + * Memorizes the given reward for the group. These are given when the game is finished. + * + * @param reward the reward + */ + void addReward(Reward reward); + + /** + * Removes the given reward. + * + * @param reward the reward + */ + void removeReward(Reward reward); + /** * Returns the initial amount of lives or -1 if group lives are not used. * From b9eb37713be63eb48d9d0f7851c57e05e0a6d803 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Mon, 27 Jan 2020 01:50:57 +0100 Subject: [PATCH 12/29] Fix comments --- .../java/de/erethon/dungeonsxl/api/player/PlayerGroup.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java index e2d44468..6df52e1f 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java @@ -23,7 +23,6 @@ import de.erethon.dungeonsxl.api.Dungeon; import de.erethon.dungeonsxl.api.Reward; import de.erethon.dungeonsxl.api.world.GameWorld; import java.util.List; -import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.DyeColor; import org.bukkit.entity.Player; @@ -33,7 +32,7 @@ import org.bukkit.entity.Player; * * @author Daniel Saukel */ -// Implementation-specific methods: setDungeon, setPlaying, [color, unplayed floor, floor count, reward methods], isEmpty, isCustom, isFinished, teleport, +// Implementation-specific methods: setDungeon, setPlaying, [color, unplayed floor, floor count methods], isEmpty, isCustom, isFinished, teleport, // finish, finishFloor, startGame, winGame, requirements methods public interface PlayerGroup { From b7ca245ff1f9ddb0aab97902bc34ace718ecf1f0 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Mon, 27 Jan 2020 02:10:37 +0100 Subject: [PATCH 13/29] Add dungeon mob API --- .../de/erethon/dungeonsxl/api/DungeonMob.java | 57 +++++++++++++++++++ .../erethon/dungeonsxl/api/DungeonsAPI.java | 54 ++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/DungeonMob.java diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonMob.java b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonMob.java new file mode 100644 index 00000000..288f0650 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonMob.java @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api; + +import de.erethon.caliburn.mob.ExMob; +import org.bukkit.entity.LivingEntity; + +/** + * Wrapper for a mob spawned in a dungeon. + * + * @author Daniel Saukel + */ +public interface DungeonMob { + + /** + * Returns the entity that is wrapped by this object. + * + * @return the entity that is wrapped by this object + */ + LivingEntity getEntity(); + + /** + * Returns the Caliburn representation of the mob or null if it is spawned by an external plugin. + * + * @return the Caliburn representation of the mob or null if it is spawned by an external plugin + */ + ExMob getType(); + + /** + * Returns if the mob is spawned by an external plugin. + * + * @return if the mob is spawned by an external plugin + */ + default boolean isExternalMob() { + return getType() == null; + } + + /** + * Returns the String used to identify this mob for example in the context of triggers. + * + * @return the String used to identify this mob for example in the context of triggers + */ + String getTriggerId(); + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java index b179905e..555a1cf7 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java @@ -14,12 +14,15 @@ */ package de.erethon.dungeonsxl.api; +import de.erethon.caliburn.mob.ExMob; import de.erethon.commons.misc.Registry; import de.erethon.dungeonsxl.api.player.PlayerClass; import de.erethon.dungeonsxl.api.player.PlayerGroup; import de.erethon.dungeonsxl.api.sign.DungeonSign; +import de.erethon.dungeonsxl.api.world.GameWorld; import java.io.File; import java.util.Collection; +import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; @@ -57,7 +60,9 @@ public interface DungeonsAPI extends Plugin { * Returns a {@link Registry} of the trigger types. * * @return a {@link Registry} of the trigger types + * @deprecated stub */ + @Deprecated Registry> getTriggerRegistry(); /** @@ -114,4 +119,53 @@ public interface DungeonsAPI extends Plugin { */ PlayerGroup createGroup(Player leader, Collection members, String name, Dungeon dungeon); + /** + * Wraps the given {@link LivingEntity} object in a {@link DungeonMob} object. + * + * @param entity the entity + * @param gameWorld the game world where the entity is + * @return the wrapped DungeonMob + */ + DungeonMob wrapEntity(LivingEntity entity, GameWorld gameWorld); + + /** + * Wraps the given {@link LivingEntity} object in a {@link DungeonMob} object. + * + * @param entity the entity + * @param gameWorld the game world where the entity is + * @param triggerId the identifier used in mob triggers + * @return the wrapped DungeonMob + */ + DungeonMob wrapEntity(LivingEntity entity, GameWorld gameWorld, String triggerId); + + /** + * Wraps the given {@link LivingEntity} object in a {@link DungeonMob} object. + * + * @param entity the entity + * @param gameWorld the game world where the entity is + * @param type the ExMob type of the entity + * @return the wrapped DungeonMob + */ + DungeonMob wrapEntity(LivingEntity entity, GameWorld gameWorld, ExMob type); + + /** + * Wraps the given {@link LivingEntity} object in a {@link DungeonMob} object. + * + * @param entity the entity + * @param gameWorld the game world where the entity is + * @param type the ExMob type of the entity + * @param triggerId the identifier used in mob triggers + * @return the wrapped DungeonMob + */ + DungeonMob wrapEntity(LivingEntity entity, GameWorld gameWorld, ExMob type, String triggerId); + + /* Getters */ + /** + * Returns an existing {@link DungeonMob} object that wraps the given {@link LivingEntity} object or null if none exists. + * + * @param entity the entity + * @return an existing {@link DungeonMob} object that wraps the given {@link LivingEntity} object or null if none exists + */ + DungeonMob getDungeonMob(LivingEntity entity); + } From 7dc4e9c02b2e6d48302ce8836ec99177a10cb16a Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Mon, 27 Jan 2020 02:23:23 +0100 Subject: [PATCH 14/29] Add requirement API (no group check methods yet) --- .../erethon/dungeonsxl/api/DungeonsAPI.java | 7 +++ .../erethon/dungeonsxl/api/Requirement.java | 50 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/Requirement.java diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java index 555a1cf7..7bd5d20f 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java @@ -65,6 +65,13 @@ public interface DungeonsAPI extends Plugin { @Deprecated Registry> getTriggerRegistry(); + /** + * Returns a {@link Registry} of the requirement types. + * + * @return a {@link Registry} of the requirement types + */ + Registry> getRequirementRegistry(); + /** * Returns a {@link Registry} of the reward types. * diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/Requirement.java b/api/src/main/java/de/erethon/dungeonsxl/api/Requirement.java new file mode 100644 index 00000000..37dc606c --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/Requirement.java @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api; + +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Player; + +/** + * Something a player needs to fulfill in order to be allowed to start the game (= trigger a ready sign). + * + * @author Daniel Saukel + */ +public interface Requirement { + + /** + * Sets up the requirement from the given requirements {@link de.erethon.dungeonsxl.api.game.GameRule} section. + * + * @param config the requirements config section + */ + void setup(ConfigurationSection config); + + /** + * Returns if the given player fulfills the requirements. If true, this lets him start the game (= trigger a ready sign). + * + * @param player the player + * @return if the given player fulfills the requirements + */ + boolean check(Player player); + + /** + * This is fired after the {@link #check(Player)} has been accepted. It demands the requirement from the given player. This may be empty for a "key" or may + * take something away for a "fee" requirement. + * + * @param player the player + */ + void demand(Player player); + +} From 7a5ad90524782d85e3e11b29b96cd17abd46f966 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Mon, 27 Jan 2020 19:50:22 +0100 Subject: [PATCH 15/29] Add ExternalMobProvider API --- .../dungeonsxl/api/{ => mob}/DungeonMob.java | 2 +- .../api/mob/ExternalMobProvider.java | 77 +++++++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) rename api/src/main/java/de/erethon/dungeonsxl/api/{ => mob}/DungeonMob.java (97%) create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/mob/ExternalMobProvider.java diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonMob.java b/api/src/main/java/de/erethon/dungeonsxl/api/mob/DungeonMob.java similarity index 97% rename from api/src/main/java/de/erethon/dungeonsxl/api/DungeonMob.java rename to api/src/main/java/de/erethon/dungeonsxl/api/mob/DungeonMob.java index 288f0650..62e01f8e 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonMob.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/mob/DungeonMob.java @@ -12,7 +12,7 @@ * You should have received a copy of the GNU Lesser General Public License along with * this program. If not, see . */ -package de.erethon.dungeonsxl.api; +package de.erethon.dungeonsxl.api.mob; import de.erethon.caliburn.mob.ExMob; import org.bukkit.entity.LivingEntity; diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/mob/ExternalMobProvider.java b/api/src/main/java/de/erethon/dungeonsxl/api/mob/ExternalMobProvider.java new file mode 100644 index 00000000..3a3a7837 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/mob/ExternalMobProvider.java @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.mob; + +import org.bukkit.Bukkit; +import org.bukkit.Location; + +/** + * Other plugins / libraries that can handle and spawn mobs. + * + * @author Daniel Saukel + */ +public interface ExternalMobProvider { + + /** + * Returns the identifier used on mob signs to spawn mobs from this provider. + * + * @return the identifier used on mob signs to spawn mobs from this provider + */ + String getIdentifier(); + + /** + * Returns the raw console spawn command of the provider. + *

+ * This method is necessary for the default implementation of {@link #getCommand(String, String, double, double, double)}. + * + * @return the raw console spawn command of the provider + */ + String getRawCommand(); + + /** + * Returns the console spawn command of the provider with values replaced to spawn the mob represented by the given String. + *

+ * The default implementation uses %mob%, %world%, %x%, %y% and %z% as placeholders and alternatively %block_x% etc. if values without decimals are needed. + *

+ * This method is used in the default implementation of {@link #summon(String, org.bukkit.Location)}. + * + * @param mob the mob identifier + * @param world the game world + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate + * @return the command with replaced variables + */ + default String getCommand(String mob, String world, double x, double y, double z) { + return getRawCommand().replace("%mob%", mob).replace("%world%", world) + .replace("%x%", String.valueOf(x)).replace("%y%", String.valueOf(y)).replace("%z%", String.valueOf(z)) + .replace("%block_x%", String.valueOf(Location.locToBlock(x))) + .replace("%block_y%", String.valueOf(Location.locToBlock(y))) + .replace("%block_z%", String.valueOf(Location.locToBlock(z))); + } + + /** + * Summons the mob. + *

+ * The default implementation requires {@link #getCommand(String, String, double, double, double)} to be implemented. + * + * @param mob the mob identifier + * @param location the location where the mob will be spawned + */ + default void summon(String mob, Location location) { + Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), getCommand(mob, location.getWorld().getName(), location.getX(), location.getY(), location.getZ())); + } + +} From f95f1b8972c82f1b5516b0b6b964b731ece91d37 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Mon, 27 Jan 2020 19:50:35 +0100 Subject: [PATCH 16/29] Add ExternalMobProvider registry --- .../main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java index 7bd5d20f..2b04fb41 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java @@ -79,6 +79,13 @@ public interface DungeonsAPI extends Plugin { */ Registry> getRewardRegistry(); + /** + * Returns a {@link Registry} of the external mob providers. + * + * @return a {@link Registry} of the external mob providers + */ + Registry getExternalMobProviderRegistry(); + /* Object initialization */ /** * Creates a new group. From 12603e9fa30f32a625656526e4fb16ef21941f47 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Mon, 27 Jan 2020 19:51:54 +0100 Subject: [PATCH 17/29] Add mob getters to GameWorld --- .../dungeonsxl/api/world/GameWorld.java | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/world/GameWorld.java b/api/src/main/java/de/erethon/dungeonsxl/api/world/GameWorld.java index 433322d0..c6637b6f 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/world/GameWorld.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/world/GameWorld.java @@ -14,14 +14,16 @@ */ package de.erethon.dungeonsxl.api.world; -import de.erethon.dungeonsxl.api.Dungeon; -import de.erethon.dungeonsxl.api.game.Game; +import de.erethon.dungeonsxl.api.dungeon.Dungeon; +import de.erethon.dungeonsxl.api.dungeon.Game; +import de.erethon.dungeonsxl.api.mob.DungeonMob; +import java.util.Collection; import org.bukkit.Location; /** * A playable resource instance. There may be any amount of GameWorlds per {@link ResourceWorld}. *

- * A game world is not equal to a {@link de.erethon.dungeonsxl.api.Dungeon}. + * A game world is not equal to a {@link de.erethon.dungeonsxl.api.dungeon.Dungeon}. * * @author Daniel Saukel */ @@ -64,6 +66,27 @@ public interface GameWorld extends InstanceWorld { */ Dungeon getDungeon(); + /** + * Returns the living dungeon mobs + * + * @return the living dungeon mobs + */ + Collection getMobs(); + + /** + * Registers the given dungeon mob + * + * @param mob the mob + */ + void addMob(DungeonMob mob); + + /** + * Unregisters the given dungeon mob + * + * @param mob the mob + */ + public void removeMob(DungeonMob mob); + /** * Returns if the game has begun in the game world. * From b0b413e89a6675be8e627c3737b0d86795c537f7 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Mon, 27 Jan 2020 19:52:18 +0100 Subject: [PATCH 18/29] Add map and instance registries --- .../de/erethon/dungeonsxl/api/DungeonsAPI.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java index 2b04fb41..ef78f1ba 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java @@ -79,6 +79,20 @@ public interface DungeonsAPI extends Plugin { */ Registry> getRewardRegistry(); + /** + * Returns a {@link Registry} of the resources worlds. + * + * @return a {@link Registry} of the resources worlds + */ + Registry getMapRegistry(); + + /** + * Returns a {@link Registry} of the instance worlds. + * + * @return a {@link Registry} of the instance worlds + */ + Registry getInstanceRegistry(); + /** * Returns a {@link Registry} of the external mob providers. * From 816baa9b61eafc21af650d1a45f4cbaba9338e98 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Mon, 27 Jan 2020 19:54:15 +0100 Subject: [PATCH 19/29] Game / Game rule API --- .../erethon/dungeonsxl/api/DungeonsAPI.java | 7 + .../de/erethon/dungeonsxl/api/Reward.java | 2 +- .../api/dungeon/CollectionGameRule.java | 40 +++ .../erethon/dungeonsxl/api/dungeon/Game.java | 165 +++++++++ .../dungeonsxl/api/dungeon/GameGoal.java | 49 +++ .../dungeonsxl/api/dungeon/GameRule.java | 320 ++++++++++++++++++ .../api/dungeon/GameRuleContainer.java | 79 +++++ .../dungeonsxl/api/dungeon/MapGameRule.java | 41 +++ .../dungeonsxl/api/player/GamePlayer.java | 1 - .../dungeonsxl/api/player/PlayerGroup.java | 11 +- 10 files changed, 711 insertions(+), 4 deletions(-) create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/dungeon/CollectionGameRule.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/dungeon/Game.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/dungeon/GameGoal.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/dungeon/GameRule.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/dungeon/GameRuleContainer.java create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/dungeon/MapGameRule.java diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java index ef78f1ba..000ff870 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java @@ -93,6 +93,13 @@ public interface DungeonsAPI extends Plugin { */ Registry getInstanceRegistry(); + /** + * Returns a {@link Registry} of the game rules. + * + * @return a {@link Registry} of the game rules + */ + Registry getGameRuleRegistry(); + /** * Returns a {@link Registry} of the external mob providers. * diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/Reward.java b/api/src/main/java/de/erethon/dungeonsxl/api/Reward.java index eecd88c3..82ab4afa 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/Reward.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/Reward.java @@ -17,7 +17,7 @@ package de.erethon.dungeonsxl.api; import org.bukkit.entity.Player; /** - * Something players are given when they successfully finish a {@link de.erethon.dungeonsxl.api.Dungeon}. + * Something players are given when they successfully finish a {@link de.erethon.dungeonsxl.api.game.Dungeon}. *

* @see de.erethon.dungeonsxl.api.player.PlayerGroup#getRewards() * @author Daniel Saukel diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/CollectionGameRule.java b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/CollectionGameRule.java new file mode 100644 index 00000000..1717ee32 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/CollectionGameRule.java @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.dungeon; + +import java.util.Collection; + +/** + * A {@link GameRule} where the value is a {@link java.util.Collection}. + * + * @param the type of the collection + * @param the type of the game rule value + * @author Daniel Saukel + */ +public class CollectionGameRule> extends GameRule { + + public CollectionGameRule(Class type, String key, V defaultValue) { + super(type, key, defaultValue); + } + + @Override + public void merge(GameRuleContainer overriding, GameRuleContainer subsidiary, GameRuleContainer writeTo) { + V write = writeTo.getState(this); + write.addAll(subsidiary.getState(this)); + write.addAll(overriding.getState(this)); + writeTo.setState(this, write); + } + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/Game.java b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/Game.java new file mode 100644 index 00000000..8befb0da --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/Game.java @@ -0,0 +1,165 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.dungeon; + +import de.erethon.commons.player.PlayerCollection; +import de.erethon.dungeonsxl.api.player.PlayerGroup; +import de.erethon.dungeonsxl.api.world.GameWorld; +import de.erethon.dungeonsxl.api.world.ResourceWorld; +import java.util.List; + +/** + * Handles the rules of playing in a dungeon. + *

+ * Tracks the progress of groups in a dungeon and handles their interaction with each other. + * + * @author Daniel Saukel + */ +// Implementation-specific methods: wave and kill counter methods +public interface Game { + + /** + * Returns if this is a tutorial game. + * + * @return if this is a tutorial game + */ + boolean isTutorial(); + + /** + * Sets if this is a tutorial game + * + * @param tutorial if this is a tutorial game + */ + void setTutorial(boolean tutorial); + + /** + * Returns a read-only List of the groups that are playing this game. + * + * @return a read-only List of the groups that are playing this game + */ + List getGroups(); + + /** + * Adds the given group to this game. + * + * @param group the group + */ + void addGroup(PlayerGroup group); + + /** + * Removes the given group from this game. + * + * @param group the group + */ + void removeGroup(PlayerGroup group); + + /** + * Returns if the group has started (=if the ready sign has been triggered). + * + * @return if the group has started + */ + boolean hasStarted(); + + /** + * Sets the status of the game to have started / not yet started. + * + * @param started if the game has started + */ + void setStarted(boolean started); + + /** + * Returns the game instance in which this game takes place. + * + * @return the game instance in which this game takes place + */ + GameWorld getWorld(); + + /** + * Sets the game instance in which this game takes place. + * + * @param gameWorld the game instance in which this game takes place + */ + void setWorld(GameWorld gameWorld); + + /** + * Returns the rules of the dungeon of this game. + *

+ * This is not necessarily represented 1:1 by a config file because it is usually merged together through {@link #setupRules()}. + * + * @return the rules of the dungeon of this game + */ + default GameRuleContainer getRules() { + return getDungeon().getRules(); + } + + /** + * Returns a read-only List of the remaining floors to play. + * + * @return a read-only List of the remaining floors to play + */ + List getUnplayedFloors(); + + /** + * Returns the amount of played floors in this game. + * + * @return the amount of played floors in this game + */ + int getFloorCount(); + + /** + * Returns the dungeon that "hosts" this game. + * + * @return the dungeon that "hosts" this game + */ + Dungeon getDungeon(); + + /** + * Returns the players playing the game. + * + * @return the players playing the game + */ + PlayerCollection getPlayers(); + + /** + * Returns true if there are no groups in this game; false if not. + * + * @return true if there are no groups in this game; false if not + */ + boolean isEmpty(); + + /** + * Deletes this game. + */ + void delete(); + + /** + * Returns true if all groups of the game have finished it; false if not. + * + * @return true if all groups of the game have finished it; false if not + */ + default boolean isFinished() { + return getGroups().stream().allMatch(PlayerGroup::isFinished); + } + + /** + * Sends a message to each player in each group. + * + * @param message the message. Supports color codes + */ + default void sendMessage(String message) { + getGroups().forEach(g -> g.sendMessage(message)); + } + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/GameGoal.java b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/GameGoal.java new file mode 100644 index 00000000..5b7102dd --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/GameGoal.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.dungeon; + +/** + * A game goal defines what the players have to do in order to finish the game. + * + * @author Daniel Saukel + */ +public enum GameGoal { + + /** + * The default goal. The game ends when the end is reached. + */ + END, + /** + * The game does not end. Instead, the goal is to survive as long as possible to beat a highscore. + */ + HIGHSCORE, + /** + * The game ends when a player dies and only one group is left. + */ + LAST_MAN_STANDING, + /** + * The game ends when a group reachs a specific score. + */ + REACH_SCORE, + /** + * The game ends after a specific time. The goal is to get the highest score until then. + */ + TIME_SCORE, + /** + * The game ends after a specific time. The goal is to survive until then. + */ + TIME_SURVIVAL; + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/GameRule.java b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/GameRule.java new file mode 100644 index 00000000..4db55881 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/GameRule.java @@ -0,0 +1,320 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.dungeon; + +import de.erethon.caliburn.CaliburnAPI; +import de.erethon.caliburn.item.ExItem; +import de.erethon.caliburn.mob.ExMob; +import de.erethon.caliburn.mob.VanillaMob; +import de.erethon.commons.misc.EnumUtil; +import de.erethon.dungeonsxl.api.DungeonsAPI; +import de.erethon.dungeonsxl.api.Requirement; +import de.erethon.dungeonsxl.api.Reward; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import org.bukkit.GameMode; +import org.bukkit.configuration.ConfigurationSection; + +/** + * Represents a game rule for a {@link Game}. + * + * @param the type of the game rule value + * @author Daniel Saukel + */ +// TODO: These values aren't properly fetched from config yet: values that involve Caliburn, requirements & rewards; maybe messages. +// Check special merging rules for damageProtectedEntities and interactionProtectedEntities. +public class GameRule { + + /** + * Shall players play the dungeon with their own items or do you want to use classes? + */ + public static final GameRule KEEP_INVENTORY_ON_ENTER = new GameRule<>(Boolean.class, "keepInventoryOnEnter", false); + /** + * Shall players keep their inventory when they leave the dungeon without succeeding? + */ + public static final GameRule KEEP_INVENTORY_ON_ESCAPE = new GameRule<>(Boolean.class, "keepInventoryOnEscape", false); + /** + * Shall players keep their inventory when they finish the dungeon? + */ + public static final GameRule KEEP_INVENTORY_ON_FINISH = new GameRule<>(Boolean.class, "keepInventoryOnFinish", false); + /** + * Shall players lose their items when they die (do not mix up this with "onEscape"!)? + */ + public static final GameRule KEEP_INVENTORY_ON_DEATH = new GameRule<>(Boolean.class, "keepInventoryOnDeath", true); + /** + * If the Lobby is disabled. This applies only to Dungeons that have to be solved alone and where there are no classes to choose from. + */ + public static final GameRule IS_LOBBY_DISABLED = new GameRule<>(Boolean.class, "isLobbyDisabled", false); + /** + * The game mode. + */ + public static final GameRule GAME_MODE = new GameRule<>(GameMode.class, "gameMode", GameMode.SURVIVAL); + /** + * If players may fly. + */ + public static final GameRule FLY = new GameRule<>(Boolean.class, "fly", false); + /** + * If players can build and destroy blocks in this world. + */ + public static final GameRule BREAK_BLOCKS = new GameRule<>(Boolean.class, "breakBlocks", false); + /** + * If players may destroy blocks they placed themselves. + */ + public static final GameRule BREAK_PLACED_BLOCKS = new GameRule<>(Boolean.class, "breakPlacedBlocks", false); + /** + * A whitelist of breakable blocks. breakBlocks is supposed to be set to "true" if this should be used. + */ + public static final GameRule>> BREAK_WHITELIST = new MapGameRule<>(Map.class, "breakWhitelist", null); + /** + * A list of all entity types that shall be protected from damage. If this is left out AND if breakBlocks is false, armor stands, paintings and item frames + * will be protected by default. If this is left out and if breakBlocks is true, nothing will be protected by default. + */ + public static final GameRule> DAMAGE_PROTECTED_ENTITIES = new CollectionGameRule<>(Set.class, "damageProtectedEntities", new HashSet<>(Arrays.asList( + VanillaMob.ARMOR_STAND, + VanillaMob.ITEM_FRAME, + VanillaMob.PAINTING + ))); + /** + * If this is left out AND if breakBlocks is false, armor stands and item frames will be protected by default. If this is left out and if breakBlocks is + * true, nothing will be protected by default. + */ + public static final GameRule> INTERACTION_PROTECTED_ENTITIES = new CollectionGameRule<>(Set.class, "interactionProtectedEntities", new HashSet<>(Arrays.asList( + VanillaMob.ARMOR_STAND, + VanillaMob.ITEM_FRAME + ))); + /** + * If blocks may be placed. + */ + public static final GameRule PLACE_BLOCKS = new GameRule<>(Boolean.class, "placeBlocks", false); + /** + * A whitelist of placeable blocks. placeBlocks is supposed to be set to "true" if this should be used. + */ + public static final GameRule> PLACE_WHITELIST = new CollectionGameRule<>(Set.class, "placeWhitelist", null); + /** + * If it should rain permanently in the dungeon. + *

+ * true = permanent rain; false = permanent sun; leaving this out = random weather like in vanilla Minecraft + */ + public static final GameRule RAIN = new GameRule<>(Boolean.class, "rain", null); + /** + * Thunderstorms. + * + * @see #RAIN + */ + public static final GameRule THUNDER = new GameRule<>(Boolean.class, "thunder", null); + /** + * The time ticks (to be used like in the vanilla /time command). + */ + public static final GameRule TIME = new GameRule<>(Long.class, "time", null); + /** + * PvP + */ + public static final GameRule PLAYER_VERSUS_PLAYER = new GameRule<>(Boolean.class, "playerVersusPlayer", false); + /** + * Friendly fire refers just to members of the same group. + */ + public static final GameRule FRIENDLY_FIRE = new GameRule<>(Boolean.class, "friendlyFire", false); + /** + * Amount of lives a player initially has when he enters a dungeon. + */ + public static final GameRule INITIAL_LIVES = new GameRule<>(Integer.class, "initialLives", -1); + /** + * Alternatively to {@link #INITIAL_LIVES player lives}, you can use group lives. + */ + public static final GameRule INITIAL_GROUP_LIVES = new GameRule<>(Integer.class, "initialGroupLives", -1); + /** + * Score used for capture the flag and similar game types. + */ + public static final GameRule INITIAL_SCORE = new GameRule<>(Integer.class, "initialScore", 3); + /** + * The amount of goals to score before the game ends. -1 = not used. + */ + public static final GameRule SCORE_GOAL = new GameRule<>(Integer.class, "scoreGoal", -1); + /** + * Time in hours when the game may be played again after it has been started. + */ + public static final GameRule TIME_TO_NEXT_PLAY_AFTER_START = new GameRule<>(Integer.class, "timeToNextPlayAfterStart", 0); + /** + * When the game may be played again after it has been finished. + */ + public static final GameRule TIME_TO_NEXT_PLAY_AFTER_FINISH = new GameRule<>(Integer.class, "timeToNextPlayAfterFinish", 0); + /** + * When loot may be taken away out of the dungeon again. + */ + public static final GameRule TIME_TO_NEXT_LOOT = new GameRule<>(Integer.class, "timeToNextLoot", 0); + /** + * The cooldown between two mob waves. + */ + public static final GameRule TIME_TO_NEXT_WAVE = new GameRule<>(Integer.class, "timeToNextWave", 10); + /** + * The time left to finish the game; -1 if no timer is used. + */ + public static final GameRule TIME_TO_FINISH = new GameRule<>(Integer.class, "timeToFinish", -1); + /** + * Time until a player is kicked out of a group after he leaves the server. + */ + public static final GameRule TIME_UNTIL_KICK_OFFLINE_PLAYER = new GameRule<>(Integer.class, "timeUntilKickOfflinePlayer", 0); + /** + * A list of requirements. Note that requirements will be ignored if the player has the dxl.ignorerequirements permission node. + */ + public static final GameRule> REQUIREMENTS = new CollectionGameRule<>(List.class, "requirements", new ArrayList<>()); + /** + * One of these Dungeons must be finished ("any" for any dungeon). + */ + public static final GameRule> MUST_FINISH_ONE = new CollectionGameRule<>(List.class, "mustFinishOne", null); + /** + * All of these Dungeons must be finished. If you do not want any, leave this empty. + */ + public static final GameRule> MUST_FINISH_ALL = new CollectionGameRule<>(List.class, "mustFinishAll", null); + /** + * This can be used to give rewards. The default implementation does not do this at the moment. + */ + public static final GameRule> REWARDS = new CollectionGameRule<>(List.class, "rewards", new ArrayList<>()); + /** + * These commands can be used by all players if they are in the dungeon. DXL commands like /dxl leavecan be used by default. + */ + public static final GameRule> GAME_COMMAND_WHITELIST = new CollectionGameRule<>(List.class, "gameCommandWhitelist", new ArrayList<>()); + /** + * A list of permissions players get while they play the game. The permissions get removed as soon as the player leaves the game. Requires Vault and a + * permissions plugin like PermissionsEx. + */ + public static final GameRule> GAME_PERMISSIONS = new CollectionGameRule<>(List.class, "gamePermissions", new ArrayList<>()); + /** + * Use this to replace the default ready / new floor message. If titles are deactivated in the main config, this is not going to work. + */ + public static final GameRule TITLE = new GameRule<>(String.class, "title", null); + /** + * Use this to replace the default ready / new floor message. If titles are deactivated in the main config, this is not going to work. + */ + public static final GameRule SUBTITLE = new GameRule<>(String.class, "subtitle", null); + /** + * Use this to replace the default ready / new floor message. If titles are deactivated in the main config, this is not going to work. + */ + public static final GameRule ACTION_BAR = new GameRule<>(String.class, "actionBar", null); + /** + * Use this to replace the default ready / new floor message. If titles are deactivated in the main config, this is not going to work. + */ + public static final GameRule CHAT = new GameRule<>(String.class, "chat", null); + /** + * Use this to replace the default ready / new floor message. If titles are deactivated in the main config, this is not going to work. + */ + public static final GameRule TITLE_FADE_IN = new GameRule<>(Integer.class, "titleFadeIn", 20); + /** + * Use this to replace the default ready / new floor message. If titles are deactivated in the main config, this is not going to work. + */ + public static final GameRule TITLE_FADE_OUT = new GameRule<>(Integer.class, "titleFadeOut", 20); + /** + * Use this to replace the default ready / new floor message. If titles are deactivated in the main config, this is not going to work. + */ + public static final GameRule TITLE_SHOW = new GameRule<>(Integer.class, "titleShow", 60); + /** + * Messages; also to be created with /dxl msg + */ + public static final GameRule> MESSAGES = new MapGameRule<>(Map.class, "msgs", new HashMap<>()); + /** + * Items you cannot drop or destroy. + */ + public static final GameRule> SECURE_OBJECTS = new CollectionGameRule<>(List.class, "secureObjects", new ArrayList<>()); + /** + * If group tags are used. + */ + public static final GameRule GROUP_TAG_ENABLED = new GameRule<>(Boolean.class, "groupTagEnabled", false); + + protected Class type; + private String key; + private V defaultValue; + + public GameRule(Class type, String key, V defaultValue) { + this.type = type; + this.key = key; + this.defaultValue = defaultValue; + } + + /** + * Returns the configuration key of the game rule. + * + * @return the configuration key of the game rule + */ + public String getKey() { + return key; + } + + /** + * Returns the value used if nothing is specified by a game rule provider. + * + * @return the value used if nothing is specified by a game rule provider + */ + public V getDefaultValue() { + return defaultValue; + } + + /** + * Returns if the given value is an instance of {@link V}. + * + * @param value the value + * @return if the given value is an instance of {@link V} + */ + public boolean isValidValue(Object value) { + return type.isInstance(value); + } + + /** + * Returns the state of the game rule fetched from the config. + *

+ * If the type of this game rule is an enum, Strings as config values that are the {@link Enum#name()} of an enum value are converted + * automatically. + * + * @param api the API instance + * @param caliburn the CaliburnAPI instance + * @param container the game rule container whose state is to be set + * @param config the config to fetch the value from + * @return the value + */ + public V fromConfig(DungeonsAPI api, CaliburnAPI caliburn, GameRuleContainer container, ConfigurationSection config) { + Object value = config.get(getKey()); + + if (Enum.class.isAssignableFrom(type)) { + if (!(value instanceof String)) { + return null; + } + value = EnumUtil.getEnumIgnoreCase((Class) type, (String) value); + } + + return isValidValue(value) ? (V) value : null; + } + + /** + * Compares the state attached to the game rule of two GameRuleContainers. + *

+ * This may be overriden if necessary, for example if the value is a {@link java.util.Collection} and the desired behavior is to merge the values instead of + * keeping the overriding one. + * + * @param overriding the state of this container will by default be copied to the "writeTo" container if it is not null + * @param subsidiary the state of this container will by default be copied to the "writeTo" container if the state of the "overriding" container is null + * @param writeTo the state of the game rule will be set to the one of either "overriding" or "subsidiary". This container may be == to one of the + * others. + */ + public void merge(GameRuleContainer overriding, GameRuleContainer subsidiary, GameRuleContainer writeTo) { + V overridingValue = overriding.getState(this); + V subsidiaryValue = subsidiary.getState(this); + writeTo.setState(this, overridingValue != null ? overridingValue : subsidiaryValue); + } + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/GameRuleContainer.java b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/GameRuleContainer.java new file mode 100644 index 00000000..d6d2fd52 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/GameRuleContainer.java @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.dungeon; + +import java.util.HashMap; +import java.util.Map; + +/** + * A container for {@link GameRule}s. + * + * @author Daniel Saukel + */ +public class GameRuleContainer { + + private Map, Object> rules = new HashMap<>(); + + /** + * Returns the state of the GameRule or UNDEFINED_STATE if it is not defined + * + * @param the type of the value of the rule + * @param rule the rule + * @return the state of the rule + */ + public V getState(GameRule rule) { + if (!rules.containsKey(rule)) { + return null; + } else { + return (V) rules.get(rule); + } + } + + /** + * Sets the state of the GameRule.Set it to null to remove the rule from the map sothat a subsidiary provider can set it. + * + * @param the type of the value of the rule + * @param rule the rule + * @param state the new state of the rule in this container + */ + public void setState(GameRule rule, V state) { + if (state == null) { + rules.remove(rule); + } else if (rule.isValidValue(state)) { + rules.put(rule, state); + } else { + throw new IllegalArgumentException("state is not a valid value for rule " + rule.getKey()); + } + } + + /** + * Removes the rule from the map sothat a subsidiary provider can set it. + * + * @param rule the GameRule to unset + */ + public void unsetState(GameRule rule) { + rules.remove(rule); + } + + /** + * Fills the values that are not yet set with values from a subsidiary container. + * + * @param subsidiary the GameRules that override the values that are null. + */ + public void merge(GameRuleContainer subsidiary) { + rules.entrySet().forEach(e -> e.getKey().merge(this, subsidiary, this)); + } + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/MapGameRule.java b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/MapGameRule.java new file mode 100644 index 00000000..0709d8b1 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/MapGameRule.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.dungeon; + +import java.util.Map; + +/** + * A {@link GameRule} where the value is a {@link java.util.Map}. + * + * @param the type of the map key + * @param the type of the map value + * @param the type of the game rule value + * @author Daniel Saukel + */ +public class MapGameRule> extends GameRule { + + public MapGameRule(Class type, String key, V defaultValue) { + super(type, key, defaultValue); + } + + @Override + public void merge(GameRuleContainer overriding, GameRuleContainer subsidiary, GameRuleContainer writeTo) { + V write = writeTo.getState(this); + write.putAll(subsidiary.getState(this)); + write.putAll(overriding.getState(this)); + writeTo.setState(this, write); + } + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java index 61b350a5..5241e5cc 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java @@ -148,7 +148,6 @@ public interface GamePlayer extends InstancePlayer { */ void setRobbedGroup(PlayerGroup group); - /* Actions */ /** * Scores a point. */ diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java index 6df52e1f..9bd0361f 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java @@ -19,8 +19,8 @@ import de.erethon.caliburn.item.VanillaItem; import de.erethon.commons.chat.MessageUtil; import de.erethon.commons.compatibility.Version; import de.erethon.commons.player.PlayerCollection; -import de.erethon.dungeonsxl.api.Dungeon; import de.erethon.dungeonsxl.api.Reward; +import de.erethon.dungeonsxl.api.dungeon.Dungeon; import de.erethon.dungeonsxl.api.world.GameWorld; import java.util.List; import org.bukkit.ChatColor; @@ -32,7 +32,7 @@ import org.bukkit.entity.Player; * * @author Daniel Saukel */ -// Implementation-specific methods: setDungeon, setPlaying, [color, unplayed floor, floor count methods], isEmpty, isCustom, isFinished, teleport, +// Implementation-specific methods: setDungeon, setPlaying, [color, unplayed floor, floor count methods], isEmpty, isCustom, teleport, // finish, finishFloor, startGame, winGame, requirements methods public interface PlayerGroup { @@ -364,6 +364,13 @@ public interface PlayerGroup { */ void setLives(int lives); + /** + * Returns true if all players of the group have finished the game; false if not. + * + * @return true if all players of the group have finished the game; false if not + */ + boolean isFinished(); + /** * Disbands the group. */ From 3a23101441d63f0a3d4ab9bae9493bc2bb3e17e5 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Mon, 27 Jan 2020 19:54:30 +0100 Subject: [PATCH 20/29] Add Dungeon API --- .../erethon/dungeonsxl/api/DungeonsAPI.java | 13 + .../dungeonsxl/api/dungeon/Dungeon.java | 224 ++++++++++++++++++ .../dungeonsxl/api/world/ResourceWorld.java | 8 + 3 files changed, 245 insertions(+) create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/dungeon/Dungeon.java diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java index 000ff870..e80de43b 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java @@ -16,10 +16,16 @@ package de.erethon.dungeonsxl.api; import de.erethon.caliburn.mob.ExMob; import de.erethon.commons.misc.Registry; +import de.erethon.dungeonsxl.api.dungeon.Dungeon; +import de.erethon.dungeonsxl.api.dungeon.GameRule; +import de.erethon.dungeonsxl.api.mob.DungeonMob; +import de.erethon.dungeonsxl.api.mob.ExternalMobProvider; import de.erethon.dungeonsxl.api.player.PlayerClass; import de.erethon.dungeonsxl.api.player.PlayerGroup; import de.erethon.dungeonsxl.api.sign.DungeonSign; import de.erethon.dungeonsxl.api.world.GameWorld; +import de.erethon.dungeonsxl.api.world.InstanceWorld; +import de.erethon.dungeonsxl.api.world.ResourceWorld; import java.io.File; import java.util.Collection; import org.bukkit.entity.LivingEntity; @@ -79,6 +85,13 @@ public interface DungeonsAPI extends Plugin { */ Registry> getRewardRegistry(); + /** + * Returns a {@link Registry} of the dungeons. + * + * @return a {@link Registry} of the dungeons + */ + Registry getDungeonRegistry(); + /** * Returns a {@link Registry} of the resources worlds. * diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/Dungeon.java b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/Dungeon.java new file mode 100644 index 00000000..a2b96a04 --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/Dungeon.java @@ -0,0 +1,224 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.dungeon; + +import de.erethon.dungeonsxl.api.world.ResourceWorld; +import java.util.List; + +/** + * A dungeon consists of floors and settings including its game rules. + *

+ * MFD = multiple floor dungeon; SFD = single floor dungeon. + * + * @author Daniel Saukel + */ +public interface Dungeon { + + /** + * Returns the name. + * + * @return the name + */ + String getName(); + + /** + * Sets the name to the given value. + * + * @param name the name + */ + void setName(String name); + + /** + * Returns if this dungeon has multiple floors. + * + * @return if this dungeon has multiple floors + */ + boolean isMultiFloor(); + + /** + * Returns the map to instantiate. + *

+ * This method is the same as {@link #getStartFloor()} but a bit more intuitive for SFDs. + * + * @return the map to instantiate + */ + default ResourceWorld getMap() { + return getStartFloor(); + } + + /** + * Returns the first floor of this dungeon. + * + * @return the first floor of this dungeon + */ + ResourceWorld getStartFloor(); + + /** + * Sets the first floor of this dungeon. + * + * @param startFloor the startFloor to set + */ + void setStartFloor(ResourceWorld startFloor); + + /** + * Returns the last floor of this dungeon or null if this is an SFD. + * + * @return the last floor of this dungeon or null if this is an SFD + */ + ResourceWorld getEndFloor(); + + /** + * Sets the last floor of this MFD. + * + * @param endFloor the last floor + */ + void setEndFloor(ResourceWorld endFloor); + + /** + * Returns a list of the floors without start and end floor. + * + * @return a list of the floors without start and end floor + */ + List getFloors(); + + /** + * Adds the given floor. + * + * @param resource the resource to add + */ + void addFloor(ResourceWorld resource); + + /** + * Removes the given floor. + * + * @param resource the resource to remove + */ + void removeFloor(ResourceWorld resource); + + /** + * Returns the amount of floors in this dungeon including start and end floor. + *

+ * This may be less than the size of {@link #getFloors()} + 2 if not all floors from the list are used. + * + * @return the amount of floors in this dungeon including start and end floor + */ + int getFloorCount(); + + /** + * Sets the amount of floors that shall be played. + * + * @param floorCount the amount of floors to set + */ + void setFloorCount(int floorCount); + + /** + * Returns if floors cannot be played once if floors are selected randomly from the list. + * + * @return the removeWhenPlayed if floors cannot be played once if floors are selected randomly from the list + */ + boolean getRemoveWhenPlayed(); + + /** + * Sets if floors cannot be played once if floors are selected randomly from the list. + * + * @param removeWhenPlayed if floors cannot be played once if floors are selected randomly from the list + */ + void setRemoveWhenPlayed(boolean removeWhenPlayed); + + /** + * The values from this game rule container will override all values of the game rule containers of the dungeon's maps. + * + * @return the override values + */ + GameRuleContainer getOverrideValues(); + + /** + * Sets the game rule container whose values override all values of the game rule containers of the dungeon's maps. + * + * @param rules the override values + */ + void setOverrideValues(GameRuleContainer rules); + + /** + * The values from this game rule container will be overriden by values of the game rule containers of the dungeon's maps. They will however still override + * the values from the main config. + * + * @return the default values + */ + GameRuleContainer getDefaultValues(); + + /** + * Sets the game rule container whose values will be overriden by values of the game rule containers of the dungeon's maps. They will however still override + * the values from the main config. + * + * @param rules the default values + */ + void setDefaultValues(GameRuleContainer rules); + + /** + * Returns true if the floor is either in the floors list or the start / end floor. + * + * @param resource the ResourceWorld to check + * @return true if the floor is either in the floors list or the start / end floor. + */ + default boolean containsFloor(ResourceWorld resource) { + return getFloors().contains(resource) || getStartFloor().equals(resource) || getEndFloor().equals(resource); + } + + /** + * Returns true if the floor is either in the floors list or the start / end floor. + * + * @param mapName the name of the map to check + * @return true if the floor is either in the floors list or the start / end floor. + */ + default boolean containsFloor(String mapName) { + for (ResourceWorld world : getFloors()) { + if (world.getName().equals(mapName)) { + return true; + } + } + return getStartFloor().getName().equals(mapName) || getEndFloor().getName().equals(mapName); + } + + /** + * Returns the rules of this game. + *

+ * This is not necessarily represented 1:1 by a config file because it is usually merged together through {@link #setupRules()}. + * + * @return the rules of this game + */ + GameRuleContainer getRules(); + + /** + * Sets the rules of the game. + * + * @param rules the rules + */ + void setRules(GameRuleContainer rules); + + /** + * Sets up the rules with the following priority: 1. Game type 2. Dungeon config: Override values 3. Floor config 4. Dungeon config: Default values 5. Main + * config: Default values 6. The default values + */ + void setupRules(); + + /** + * Returns false if there are errors in the setup; true if not. + * + * @return false if there are errors in the setup; true if not + */ + boolean isSetupCorrect(); + +} diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/world/ResourceWorld.java b/api/src/main/java/de/erethon/dungeonsxl/api/world/ResourceWorld.java index 97e88d4d..cbfb56df 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/world/ResourceWorld.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/world/ResourceWorld.java @@ -14,6 +14,7 @@ */ package de.erethon.dungeonsxl.api.world; +import de.erethon.dungeonsxl.api.dungeon.Dungeon; import java.io.File; import org.bukkit.OfflinePlayer; import org.bukkit.World.Environment; @@ -94,4 +95,11 @@ public interface ResourceWorld { */ GameWorld instantiateGameWorld(); + /** + * Returns the single floor dungeon of this resource. + * + * @return the single floor dungeon of this resource + */ + Dungeon getSingleFloorDungeon(); + } From 3ea441149060672d417378abf46fd6a25e02ef15 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Wed, 29 Jan 2020 00:36:58 +0100 Subject: [PATCH 21/29] Additional getters --- .../erethon/dungeonsxl/api/DungeonsAPI.java | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java index e80de43b..9a459e98 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java @@ -17,22 +17,27 @@ package de.erethon.dungeonsxl.api; import de.erethon.caliburn.mob.ExMob; import de.erethon.commons.misc.Registry; import de.erethon.dungeonsxl.api.dungeon.Dungeon; +import de.erethon.dungeonsxl.api.dungeon.Game; import de.erethon.dungeonsxl.api.dungeon.GameRule; import de.erethon.dungeonsxl.api.mob.DungeonMob; import de.erethon.dungeonsxl.api.mob.ExternalMobProvider; import de.erethon.dungeonsxl.api.player.PlayerClass; import de.erethon.dungeonsxl.api.player.PlayerGroup; import de.erethon.dungeonsxl.api.sign.DungeonSign; +import de.erethon.dungeonsxl.api.world.EditWorld; import de.erethon.dungeonsxl.api.world.GameWorld; import de.erethon.dungeonsxl.api.world.InstanceWorld; import de.erethon.dungeonsxl.api.world.ResourceWorld; import java.io.File; import java.util.Collection; +import org.bukkit.World; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; /** + * The API main interface. + * * @author Daniel Saukel */ public interface DungeonsAPI extends Plugin { @@ -216,4 +221,52 @@ public interface DungeonsAPI extends Plugin { */ DungeonMob getDungeonMob(LivingEntity entity); + /** + * Returns the game the given group plays. + * + * @param group the group + * @return the game the given group plays + */ + Game getGame(PlayerGroup group); + + /** + * Returns the game the given player plays. + * + * @param player the player + * @return the game the given player plays + */ + Game getGame(Player player); + + /** + * Returns the game played in the given instance world. + * + * @param world the instance world + * @return the game played in the given instance world + */ + Game getGame(World world); + + /** + * Returns the GameWorld that wraps the given instance world. + * + * @param world the instance world + * @return the GameWorld that wraps the given instance world + */ + GameWorld getGameWorld(World world); + + /** + * Returns the EditWorld that wraps the given instance world. + * + * @param world the instance world + * @return the EditWorld that wraps the given instance worl + */ + EditWorld getEditWorld(World world); + + /** + * Returns if the given world is an instance. + * + * @param world the world + * @return if the given world is an instance + */ + boolean isInstance(World world); + } From b5379674adb7ae09539e40e639996596afcb7283 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Wed, 29 Jan 2020 00:44:45 +0100 Subject: [PATCH 22/29] Add GroupAdapter API draft --- .../erethon/dungeonsxl/api/DungeonsAPI.java | 8 + .../dungeonsxl/api/player/GroupAdapter.java | 163 ++++++++++++++++++ 2 files changed, 171 insertions(+) create mode 100644 api/src/main/java/de/erethon/dungeonsxl/api/player/GroupAdapter.java diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java index 9a459e98..e5505ef8 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java @@ -21,6 +21,7 @@ import de.erethon.dungeonsxl.api.dungeon.Game; import de.erethon.dungeonsxl.api.dungeon.GameRule; import de.erethon.dungeonsxl.api.mob.DungeonMob; import de.erethon.dungeonsxl.api.mob.ExternalMobProvider; +import de.erethon.dungeonsxl.api.player.GroupAdapter; import de.erethon.dungeonsxl.api.player.PlayerClass; import de.erethon.dungeonsxl.api.player.PlayerGroup; import de.erethon.dungeonsxl.api.sign.DungeonSign; @@ -125,6 +126,13 @@ public interface DungeonsAPI extends Plugin { */ Registry getExternalMobProviderRegistry(); + /** + * Makes DungeonsXL track external group and synchronize them with its own groups. + * + * @param groupAdapter the group adapter to register + */ + void registerGroupAdapter(GroupAdapter groupAdapter); + /* Object initialization */ /** * Creates a new group. diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/GroupAdapter.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/GroupAdapter.java new file mode 100644 index 00000000..b07b4f5b --- /dev/null +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/GroupAdapter.java @@ -0,0 +1,163 @@ +/* + * Copyright (C) 2014-2020 Daniel Saukel + * + * This library is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNULesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package de.erethon.dungeonsxl.api.player; + +import org.bukkit.entity.Player; + +/** + * Implement and register in order to track a group. + * + * @param the external group object + * @author Daniel Saukel + */ +public abstract class GroupAdapter { + + /** + * How the implementation handles players. + */ + public enum Philosophy { + /** + * The group persists upon restarts. + *

+ * DungeonsXL under no circumstances creates persistent external groups. + */ + PERSISTENT, + /** + * The group continues to exist as long as the server is running, but does not persist upon restarts. + */ + RUNTIME, + /** + * Players are kicked from the group when they leave the server. + */ + ONLINE + } + + private Philosophy philosophy; + + /** + * @param philosophy the player handling philosophy + */ + protected GroupAdapter(Philosophy philosophy) { + this.philosophy = philosophy; + } + + /** + * Returns the player handling philosophy. + * + * @return the player handling philosophy + */ + public Philosophy getPhilosophy() { + return philosophy; + } + + /** + * Creates a dungeon group {@link #areCorresponding(PlayerGroup, Object) corresponding} with the external group. + * + * @param eGroup the external group + * @return a dungeon group {@link #areCorresponding(PlayerGroup, Object) corresponding} with the external group + */ + public abstract PlayerGroup createPlayerGroup(T eGroup); + + /** + * Creates an external group {@link #areCorresponding(PlayerGroup, Object) corresponding} with the dungeon + * group. + * + * @param dGroup the dungeon group + * @return an external group {@link #areCorresponding(PlayerGroup, Object) corresponding} with the dungeon group + */ + public abstract T createExternalGroup(PlayerGroup dGroup); + + /** + * Returns the dungeon group {@link #areCorresponding(PlayerGroup, Object) corresponding} with the external + * group or null of none exists. + * + * @param eGroup the external group + * @return the dungeon group {@link #areCorresponding(PlayerGroup, Object) corresponding} with the external + * group + */ + public abstract PlayerGroup getPlayerGroup(T eGroup); + + /** + * Returns the external group {@link #areCorresponding(PlayerGroup, Object) corresponding} with the dungeon + * group. + * + * @param dGroup the dungeon group + * @return the external group {@link #areCorresponding(PlayerGroup, Object) corresponding} with the dungeon + * group + */ + public abstract T getExternalGroup(PlayerGroup dGroup); + + /** + * Returns the dungeon group that mirrors the external group. + *

+ * Creates a dungeon group if none exists. + * + * @param eGroup the dungeon group + * @return the dungeon group that mirrors the dungeon group + */ + public PlayerGroup getOrCreatePlayerGroup(T eGroup) { + PlayerGroup dGroup = getPlayerGroup(eGroup); + if (dGroup == null) { + dGroup = createPlayerGroup(eGroup); + } + return dGroup; + } + + /** + * Returns the external group that mirrors the dungeon group. + *

+ * Creates an external group if none exists. + * + * @param dGroup the dungeon group + * @return the external group that mirrors the dungeon group + */ + public T getOrCreateExternalGroup(PlayerGroup dGroup) { + T eGroup = getExternalGroup(dGroup); + if (eGroup == null && getPhilosophy() != Philosophy.PERSISTENT) { + eGroup = createExternalGroup(dGroup); + } + return eGroup; + } + + /** + * Checks if two groups are corresponding. + *

+ * Corresponding groups are groups that should be regarded as one from the perspective of a player. + *

+ * Two null values are regarded as corresponding. + * + * @param dGroup the dungeon group + * @param eGroup the external group + * @return if the two groups are corresponding + */ + public abstract boolean areCorresponding(PlayerGroup dGroup, T eGroup); + + /** + * Ensures that the player is in {@link #areCorresponding(PlayerGroup, Object) corresponding} groups. + *

+ * If the player is in an external group but not in a corresponding dungeon group, they are added to the corresponding dungeon group. + * If no dungeon group exists, it is created automatically. Switching dungeon groups forces the player to leave their dungeon. + *

+ * If the player is in a dungeon group but not in an external group, the player is added to the corresponding external group if it exists. + * If no corresponding external group exists, a new one is only created if the {@link #getPhilosophy() philosophy} is either + * {@link Philosophy#RUNTIME} or {@link Philosophy#ONLINE}. + * + * @param player the player + */ + public void syncPlayer(Player player) { + throw new UnsupportedOperationException("TODO"); + } + +} From 0b48675735a849c9ae60f71b3db4770c7873c44d Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Wed, 29 Jan 2020 01:22:48 +0100 Subject: [PATCH 23/29] Add player cache --- .../erethon/dungeonsxl/api/DungeonsAPI.java | 49 +++++++++++-------- .../dungeonsxl/api/player/GlobalPlayer.java | 3 ++ 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java index e5505ef8..e20033cb 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java @@ -21,6 +21,7 @@ import de.erethon.dungeonsxl.api.dungeon.Game; import de.erethon.dungeonsxl.api.dungeon.GameRule; import de.erethon.dungeonsxl.api.mob.DungeonMob; import de.erethon.dungeonsxl.api.mob.ExternalMobProvider; +import de.erethon.dungeonsxl.api.player.GlobalPlayer; import de.erethon.dungeonsxl.api.player.GroupAdapter; import de.erethon.dungeonsxl.api.player.PlayerClass; import de.erethon.dungeonsxl.api.player.PlayerGroup; @@ -31,6 +32,7 @@ import de.erethon.dungeonsxl.api.world.InstanceWorld; import de.erethon.dungeonsxl.api.world.ResourceWorld; import java.io.File; import java.util.Collection; +import java.util.UUID; import org.bukkit.World; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; @@ -55,74 +57,81 @@ public interface DungeonsAPI extends Plugin { static final File SIGNS = new File(SCRIPTS, "signs"); /** - * Returns a {@link Registry} of the loaded classes. + * Returns a cache of player wrapper objects. * - * @return a {@link Registry} of the loaded classes + * @return a cache of player wrapper objects + */ + Registry getPlayerCache(); + + /** + * Returns a registry of the loaded classes. + * + * @return a registry of the loaded classes */ Registry getClassRegistry(); /** - * Returns a {@link Registry} of the sign types. + * Returns a registry of the sign types. * - * @return a {@link Registry} of the sign types + * @return a registry of the sign types */ Registry> getSignRegistry(); /** - * Returns a {@link Registry} of the trigger types. + * Returns a registry of the trigger types. * - * @return a {@link Registry} of the trigger types + * @return a registry of the trigger types * @deprecated stub */ @Deprecated Registry> getTriggerRegistry(); /** - * Returns a {@link Registry} of the requirement types. + * Returns a registry of the requirement types. * - * @return a {@link Registry} of the requirement types + * @return a registry of the requirement types */ Registry> getRequirementRegistry(); /** - * Returns a {@link Registry} of the reward types. + * Returns a registry of the reward types. * - * @return a {@link Registry} of the reward types + * @return a registry of the reward types */ Registry> getRewardRegistry(); /** - * Returns a {@link Registry} of the dungeons. + * Returns a registry of the dungeons. * - * @return a {@link Registry} of the dungeons + * @return a registry of the dungeons */ Registry getDungeonRegistry(); /** - * Returns a {@link Registry} of the resources worlds. + * Returns a registry of the resources worlds. * - * @return a {@link Registry} of the resources worlds + * @return a registry of the resources worlds */ Registry getMapRegistry(); /** - * Returns a {@link Registry} of the instance worlds. + * Returns a registry of the instance worlds. * - * @return a {@link Registry} of the instance worlds + * @return a registry of the instance worlds */ Registry getInstanceRegistry(); /** - * Returns a {@link Registry} of the game rules. + * Returns a registry of the game rules. * - * @return a {@link Registry} of the game rules + * @return a registry of the game rules */ Registry getGameRuleRegistry(); /** - * Returns a {@link Registry} of the external mob providers. + * Returns a registry of the external mob providers. * - * @return a {@link Registry} of the external mob providers + * @return a registry of the external mob providers */ Registry getExternalMobProviderRegistry(); diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java index 6718415a..8cf77047 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/GlobalPlayer.java @@ -24,6 +24,9 @@ import org.bukkit.inventory.ItemStack; * Represents a player anywhere on the server. *

* All players on the server, including the ones in dungeons, have one wrapper object that is an instance of GlobalPlayer. + *

+ * Do not cache this for the whole runtime (or use {@link de.erethon.commons.player.PlayerCollection}). The object may be deleted and replaced with an object of + * the appropriate type when the player enters or leaves an instance. * * @author Daniel Saukel */ From 0fe56fdf611e3c90af836df4dc03af790116f693 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Wed, 29 Jan 2020 01:42:28 +0100 Subject: [PATCH 24/29] Add Javadoc sign type descriptions --- api/src/main/java/de/erethon/dungeonsxl/api/sign/Button.java | 4 ++++ .../main/java/de/erethon/dungeonsxl/api/sign/Passive.java | 2 ++ api/src/main/java/de/erethon/dungeonsxl/api/sign/Rocker.java | 5 ++++- api/src/main/java/de/erethon/dungeonsxl/api/sign/Windup.java | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Button.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Button.java index d27451ca..de5e1e07 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Button.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Button.java @@ -21,6 +21,10 @@ import org.bukkit.block.Sign; import org.bukkit.entity.Player; /** + * A sign that performs a specific action every time it is triggered. + *

+ * For example, a classes sign with the default interact trigger sets your class every time you punch it. + * * @author Daniel Saukel */ public abstract class Button extends AbstractDSign { diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Passive.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Passive.java index bee8a32f..4615643d 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Passive.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Passive.java @@ -20,6 +20,8 @@ import org.bukkit.block.Sign; import org.bukkit.entity.Player; /** + * A sign that does not do anything on its own. Its function is mostly to mark locations or blocks, like lobby or bed signs. + * * @author Daniel Saukel */ public abstract class Passive extends AbstractDSign { diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Rocker.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Rocker.java index c20f368a..7def67f3 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Rocker.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Rocker.java @@ -20,7 +20,10 @@ import org.bukkit.block.Sign; import org.bukkit.entity.Player; /** - * A {@link Deactivatable} that, if triggered, and already activated, is deactivated. + * A sign that has a deactivated and an activated state and can switch between these two. + *

+ * For example, if a door sign is activated, the door opens - if it is deactivated, the door closes. The state may be set for the whole game world or for the + * player who triggered the sign depending on the context. * * @author Daniel Saukel */ diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Windup.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Windup.java index 01404099..7a77ab0d 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Windup.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Windup.java @@ -19,6 +19,9 @@ import de.erethon.dungeonsxl.api.world.GameWorld; import org.bukkit.block.Sign; /** + * A sign with an attached task that does actions in a set interval n times, like a mob sign that spawns n mobs. It is similar to a {@link Rocker} + * as it expires (=is deactivated). + * * @author Daniel Saukel */ public abstract class Windup extends Deactivatable { From a817ba41bad86ca31769d0eae44527736c2cf5f9 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Wed, 29 Jan 2020 02:06:48 +0100 Subject: [PATCH 25/29] Fix Javadoc syntax errors --- api/src/main/java/de/erethon/dungeonsxl/api/Requirement.java | 2 +- api/src/main/java/de/erethon/dungeonsxl/api/Reward.java | 2 +- api/src/main/java/de/erethon/dungeonsxl/api/dungeon/Game.java | 2 +- .../java/de/erethon/dungeonsxl/api/player/GamePlayer.java | 2 +- .../java/de/erethon/dungeonsxl/api/player/PlayerGroup.java | 4 ++-- .../java/de/erethon/dungeonsxl/api/world/InstanceWorld.java | 2 +- .../java/de/erethon/dungeonsxl/api/world/ResourceWorld.java | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/Requirement.java b/api/src/main/java/de/erethon/dungeonsxl/api/Requirement.java index 37dc606c..629ebdba 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/Requirement.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/Requirement.java @@ -25,7 +25,7 @@ import org.bukkit.entity.Player; public interface Requirement { /** - * Sets up the requirement from the given requirements {@link de.erethon.dungeonsxl.api.game.GameRule} section. + * Sets up the requirement from the given requirements {@link de.erethon.dungeonsxl.api.dungeon.GameRule} section. * * @param config the requirements config section */ diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/Reward.java b/api/src/main/java/de/erethon/dungeonsxl/api/Reward.java index 82ab4afa..f5beb88b 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/Reward.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/Reward.java @@ -17,7 +17,7 @@ package de.erethon.dungeonsxl.api; import org.bukkit.entity.Player; /** - * Something players are given when they successfully finish a {@link de.erethon.dungeonsxl.api.game.Dungeon}. + * Something players are given when they successfully finish a {@link de.erethon.dungeonsxl.api.dungeon.Dungeon}. *

* @see de.erethon.dungeonsxl.api.player.PlayerGroup#getRewards() * @author Daniel Saukel diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/Game.java b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/Game.java index 8befb0da..cd0ec04d 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/Game.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/Game.java @@ -96,7 +96,7 @@ public interface Game { /** * Returns the rules of the dungeon of this game. *

- * This is not necessarily represented 1:1 by a config file because it is usually merged together through {@link #setupRules()}. + * This is not necessarily represented 1:1 by a config file because it is usually merged together through {@link Dungeon#setupRules()}. * * @return the rules of the dungeon of this game */ diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java index 5241e5cc..79cd5074 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/GamePlayer.java @@ -77,7 +77,7 @@ public interface GamePlayer extends InstancePlayer { /** * Sets the location of the last checkpoint the player reached. *

- * This is where the player respawns if they die and have -1 or >0 {@link #getLives() lives} left. + * This is where the player respawns if they die and have -1 or >0 {@link #getLives() lives} left. * * @param checkpoint the checkpoint location */ diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java index 9bd0361f..e1ada5f3 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/player/PlayerGroup.java @@ -342,7 +342,7 @@ public interface PlayerGroup { /** * Sets the initial amount of lives. *

- * The value must be >=0 or -1, which means unlimited lives. + * The value must be >=0 or -1, which means unlimited lives. * * @param lives the new amount of lives known as the initial amount */ @@ -358,7 +358,7 @@ public interface PlayerGroup { /** * Sets the amount of lives the group currently has left. *

- * The value must be >=0 or -1, which means unlimited lives. + * The value must be >=0 or -1, which means unlimited lives. * * @param lives the amount of lives the group currently has left */ diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/world/InstanceWorld.java b/api/src/main/java/de/erethon/dungeonsxl/api/world/InstanceWorld.java index 3bb6508c..02c86776 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/world/InstanceWorld.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/world/InstanceWorld.java @@ -34,7 +34,7 @@ public interface InstanceWorld { /** * Returns the name of the resource world of this instance. *

- * Use {@link #getWorld()#getName()} to get the name of the instantiated world (like e.g. DXL_Game_1). + * Use {@link #getWorld()}{@link org.bukkit.World#getName() #getName()} to get the name of the instantiated world (like e.g. DXL_Game_1). * * @return the name of the resource world of this instance */ diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/world/ResourceWorld.java b/api/src/main/java/de/erethon/dungeonsxl/api/world/ResourceWorld.java index cbfb56df..905d8db0 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/world/ResourceWorld.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/world/ResourceWorld.java @@ -34,7 +34,7 @@ public interface ResourceWorld { /** * Returns the name of this resource world. *

- * Equals {@link #getFolder()#getName()}. + * Equals {@link #getFolder()}{@link File#getName() #getName()}. * * @return name of this resource world */ From c20e090914bd02e30ce2df4acaccdbe9ab2492bf Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Wed, 29 Jan 2020 19:08:12 +0100 Subject: [PATCH 26/29] Add more sign Javadocs --- .../erethon/dungeonsxl/api/sign/Button.java | 26 ++++++++++++- .../dungeonsxl/api/sign/Deactivatable.java | 37 ++++++++++++++++++- .../dungeonsxl/api/sign/DungeonSign.java | 7 +++- .../erethon/dungeonsxl/api/sign/Passive.java | 8 ++++ .../erethon/dungeonsxl/api/sign/Rocker.java | 5 +++ 5 files changed, 79 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Button.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Button.java index de5e1e07..71cbf787 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Button.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Button.java @@ -21,7 +21,8 @@ import org.bukkit.block.Sign; import org.bukkit.entity.Player; /** - * A sign that performs a specific action every time it is triggered. + * A sign that performs a specific action every time it is triggered. It can have, but typically does not have a state. Consider using {@link Deactivatable) for + * sign that change themselves when they are triggered. *

* For example, a classes sign with the default interact trigger sets your class every time you punch it. * @@ -33,10 +34,31 @@ public abstract class Button extends AbstractDSign { super(api, sign, lines, gameWorld); } + /** + * When the sign is triggered without one particular player being the cause. + *

+ * Note that the default implementation of {@link #push(org.bukkit.entity.Player)} assumes that the sign does not need player specific behavior and + * simply calls this method, while the default implementation of this method assumes that the sign should perform {@link #push(org.bukkit.entity.Player)} + * for each player in the game world. This leaves a button sign with a stackoverflow if not one of both methods at least is overriden. Consider using a + * {@link Passive} sign instead if you need a sign that simply marks places and ignores being triggered. + */ public void push() { getGameWorld().getPlayers().forEach(p -> push(p.getPlayer())); } + /** + * When the sign is triggered. + *

+ * This is the default {@link #trigger(org.bukkit.entity.Player)} behavior. + *

+ * Note that the default implementation of this method assumes that the sign does not need player specific behavior and simply calls {@link #push()}, + * while the default implementation of {@link #push()} assumes that the sign should perform {@link #push(org.bukkit.entity.Player)} for each player in the + * game world. This leaves a button sign with a stackoverflow if not one of both methods at least is overriden. Consider using a {@link Passive} sign + * instead if you need a sign that simply marks places and ignores being triggered. + * + * @param player the player who triggered the sign + * @return if the action is done successfully + */ public boolean push(Player player) { push(); return true; @@ -68,7 +90,7 @@ public abstract class Button extends AbstractDSign { /** * This is the same as {@link #push(org.bukkit.entity.Player)}. * - * @param player the player + * @param player the player who triggered the sign or null if no one in particular triggered it */ @Override public void trigger(Player player) { diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Deactivatable.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Deactivatable.java index a751f461..7a8cb479 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Deactivatable.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Deactivatable.java @@ -23,7 +23,7 @@ import org.bukkit.entity.Player; /** * A {@link DungeonSign} that changes its state when triggered. - * + * * @author Daniel Saukel */ public abstract class Deactivatable extends AbstractDSign { @@ -35,26 +35,61 @@ public abstract class Deactivatable extends AbstractDSign { super(api, sign, lines, gameWorld); } + /** + * Sets the state to active. + *

+ * This might not be meaningful if the sign uses {@link #activate(org.bukkit.entity.Player)}. + */ public void activate() { active = true; } + /** + * Sets the state to active for the given player. + * + * @param player the player + * @return if the action was successful + */ public boolean activate(Player player) { return playersActivated.add(player); } + /** + * Sets the state to inactive. + *

+ * This might not be meaningful if the sign uses {@link #deactivate(org.bukkit.entity.Player)}. + */ public void deactivate() { active = false; } + /** + * Sets the state to inactive for the given player. + * + * @param player the player + * @return if the action was successful + */ public boolean deactivate(Player player) { return playersActivated.remove(player); } + /** + * Returns if the sign is currently in its activated state. + *

+ * This might not be meaningful if the sign uses {@link #isActive(org.bukkit.entity.Player)}. + * + * @return if the sign is currently in its activated state + */ public boolean isActive() { return active; } + /** + * Returns if the sign is activated for the given player. + * + * @param player the player + * @return if the sign is activated for the given player + */ public boolean isActive(Player player) { return playersActivated.contains(player); } diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/DungeonSign.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/DungeonSign.java index 78df378d..35a10d5d 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/sign/DungeonSign.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/DungeonSign.java @@ -131,7 +131,7 @@ public interface DungeonSign { /** * Triggers the sign. The effects are defined by the implementation. * - * @param player the player that triggered the sign or null + * @param player the player who triggered the sign or null if no one in particular triggered it */ void trigger(Player player); @@ -142,6 +142,9 @@ public interface DungeonSign { /** * Sets the sign to air if it is not erroneous and if its type requires this. + *

+ * Signs are usually to be set to air upon initialization, but this is not done automatically because some signs need different behavior. Script signs for + * example are not set to air because this would override whatever a block sign in its script does. * * @return if the sign type was set to air */ @@ -149,6 +152,8 @@ public interface DungeonSign { /** * Returns if the sign is valid. + *

+ * A sign is invalid when it lacks needed parameters or if illegal arguments have been entered. * * @return if the sign is valid */ diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Passive.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Passive.java index 4615643d..b407bf6f 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Passive.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Passive.java @@ -30,10 +30,18 @@ public abstract class Passive extends AbstractDSign { super(api, sign, lines, gameWorld); } + /** + * Does nothing. + */ @Override public final void update() { } + /** + * Does nothing. + * + * @param player unused + */ @Override public final void trigger(Player player) { } diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Rocker.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Rocker.java index 7def67f3..ca31ec71 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Rocker.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Rocker.java @@ -33,6 +33,11 @@ public abstract class Rocker extends Deactivatable { super(api, sign, lines, gameWorld); } + /** + * Activates the sign if it is not yet active and deactivates it if it is already active. + * + * @param player the player who triggered the sign or null if no one in particular triggered it + */ @Override public void trigger(Player player) { if (!isActive()) { From b1342a8d76bf5060055c4d119aaad3041469505e Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sat, 1 Feb 2020 22:19:59 +0100 Subject: [PATCH 27/29] Add Javadoc comments, n&k to windup signs --- .../erethon/dungeonsxl/api/sign/Windup.java | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Windup.java b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Windup.java index 7a77ab0d..38f77dc4 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/sign/Windup.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/sign/Windup.java @@ -19,23 +19,41 @@ import de.erethon.dungeonsxl.api.world.GameWorld; import org.bukkit.block.Sign; /** - * A sign with an attached task that does actions in a set interval n times, like a mob sign that spawns n mobs. It is similar to a {@link Rocker} - * as it expires (=is deactivated). + * A sign with an attached task that does actions in a set interval {@link #n} times, like a mob sign that spawns {@link #n} mobs. It is similar to a + * {@link Rocker} as it expires (=is deactivated). * * @author Daniel Saukel */ public abstract class Windup extends Deactivatable { protected double interval = -1; + /** + * How many times the task is supposed to be executed (unless it is cancelled). + */ + protected int n; + /** + * How many times the task has been executed. + */ + protected int k; protected Windup(DungeonsAPI api, Sign sign, String[] lines, GameWorld gameWorld) { super(api, sign, lines, gameWorld); } + /** + * Returns the task interval in seconds. + * + * @return the task interval + */ public double getIntervalSeconds() { return interval; } + /** + * Returns the task interval in seconds. + * + * @return the task interval + */ public long getIntervalTicks() { return (long) (interval * 20L); } From d8b4b4e64e52bbaee2b6b6c4e7345c6b60f88ac7 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sat, 1 Feb 2020 22:20:10 +0100 Subject: [PATCH 28/29] Bump Commons dependency --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 91b2df67..330507bc 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ de.erethon.commons commons-dist - 6.1 + 6.1.1 compile From ea8da5f2e35aa6f16a9b487009ba92b88fde9e09 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sun, 2 Feb 2020 03:03:29 +0100 Subject: [PATCH 29/29] Update to Commons 6.1.1; fixed broken API module references --- README.md | 3 +- core/pom.xml | 1 + .../de/erethon/dungeonsxl/DungeonsXL.java | 13 +- .../dungeonsxl/announcer/Announcer.java | 8 +- .../dungeonsxl/announcer/AnnouncerCache.java | 2 +- .../announcer/AnnouncerListener.java | 2 +- .../announcer/AnnouncerStartGameTask.java | 2 +- .../dungeonsxl/announcer/AnnouncerTask.java | 2 +- .../dungeonsxl/command/BreakCommand.java | 4 +- .../dungeonsxl/command/ChatCommand.java | 4 +- .../dungeonsxl/command/ChatSpyCommand.java | 6 +- .../dungeonsxl/command/CreateCommand.java | 18 +- .../erethon/dungeonsxl/command/DCommand.java | 2 +- .../dungeonsxl/command/DCommandCache.java | 2 +- .../dungeonsxl/command/DeleteCommand.java | 4 +- .../command/DungeonItemCommand.java | 12 +- .../dungeonsxl/command/EditCommand.java | 9 +- .../dungeonsxl/command/EnterCommand.java | 6 +- .../dungeonsxl/command/EscapeCommand.java | 4 +- .../dungeonsxl/command/GameCommand.java | 4 +- .../dungeonsxl/command/GroupCommand.java | 19 +- .../dungeonsxl/command/HelpCommand.java | 4 +- .../dungeonsxl/command/ImportCommand.java | 8 +- .../dungeonsxl/command/InviteCommand.java | 6 +- .../dungeonsxl/command/JoinCommand.java | 4 +- .../dungeonsxl/command/KickCommand.java | 4 +- .../dungeonsxl/command/LeaveCommand.java | 4 +- .../dungeonsxl/command/ListCommand.java | 4 +- .../dungeonsxl/command/LivesCommand.java | 4 +- .../dungeonsxl/command/MainCommand.java | 6 +- .../dungeonsxl/command/MsgCommand.java | 4 +- .../dungeonsxl/command/PlayCommand.java | 8 +- .../dungeonsxl/command/PortalCommand.java | 4 +- .../dungeonsxl/command/ReloadCommand.java | 6 +- .../dungeonsxl/command/RenameCommand.java | 4 +- .../command/ResourcePackCommand.java | 4 +- .../dungeonsxl/command/SaveCommand.java | 4 +- .../dungeonsxl/command/StatusCommand.java | 4 +- .../dungeonsxl/command/TestCommand.java | 6 +- .../dungeonsxl/command/UninviteCommand.java | 6 +- .../erethon/dungeonsxl/config/DMessage.java | 456 ++++++++---------- .../erethon/dungeonsxl/config/MainConfig.java | 25 +- .../erethon/dungeonsxl/dungeon/Dungeon.java | 2 +- .../dungeonsxl/dungeon/DungeonCache.java | 6 +- .../dungeonsxl/dungeon/DungeonConfig.java | 2 +- .../dungeonsxl/event/DataReloadEvent.java | 2 +- .../event/dgroup/DGroupCreateEvent.java | 2 +- .../event/dgroup/DGroupDisbandEvent.java | 2 +- .../dungeonsxl/event/dgroup/DGroupEvent.java | 2 +- .../dgroup/DGroupFinishDungeonEvent.java | 2 +- .../event/dgroup/DGroupFinishFloorEvent.java | 2 +- .../event/dgroup/DGroupScoreEvent.java | 2 +- .../event/dgroup/DGroupStartFloorEvent.java | 2 +- .../dungeonsxl/event/dmob/DMobDeathEvent.java | 2 +- .../dungeonsxl/event/dmob/DMobEvent.java | 2 +- .../dungeonsxl/event/dmob/DMobSpawnEvent.java | 2 +- .../event/dplayer/DPlayerEvent.java | 2 +- .../event/dplayer/DPlayerJoinDGroupEvent.java | 2 +- .../event/dplayer/DPlayerKickEvent.java | 2 +- .../dplayer/DPlayerLeaveDGroupEvent.java | 2 +- .../instance/DInstancePlayerEvent.java | 2 +- .../instance/DInstancePlayerUpdateEvent.java | 2 +- .../instance/edit/DEditPlayerEscapeEvent.java | 2 +- .../instance/edit/DEditPlayerEvent.java | 2 +- .../instance/game/DGamePlayerDeathEvent.java | 2 +- .../instance/game/DGamePlayerEscapeEvent.java | 2 +- .../instance/game/DGamePlayerEvent.java | 2 +- .../instance/game/DGamePlayerFinishEvent.java | 2 +- .../instance/game/DGamePlayerRewardEvent.java | 2 +- .../dungeonsxl/event/dsign/DSignEvent.java | 2 +- .../event/dsign/DSignRegistrationEvent.java | 2 +- .../event/editworld/EditWorldEvent.java | 2 +- .../editworld/EditWorldGenerateEvent.java | 2 +- .../event/editworld/EditWorldLoadEvent.java | 2 +- .../event/editworld/EditWorldSaveEvent.java | 2 +- .../event/editworld/EditWorldUnloadEvent.java | 2 +- .../event/gameworld/GameWorldEvent.java | 2 +- .../event/gameworld/GameWorldLoadEvent.java | 2 +- .../gameworld/GameWorldStartGameEvent.java | 2 +- .../event/gameworld/GameWorldUnloadEvent.java | 2 +- .../requirement/RequirementCheckEvent.java | 2 +- .../requirement/RequirementDemandEvent.java | 2 +- .../event/requirement/RequirementEvent.java | 2 +- .../RequirementRegistrationEvent.java | 2 +- .../event/reward/RewardAdditionEvent.java | 2 +- .../dungeonsxl/event/reward/RewardEvent.java | 2 +- .../event/reward/RewardRegistrationEvent.java | 2 +- .../event/trigger/TriggerActionEvent.java | 2 +- .../event/trigger/TriggerEvent.java | 2 +- .../trigger/TriggerRegistrationEvent.java | 2 +- .../java/de/erethon/dungeonsxl/game/Game.java | 2 +- .../de/erethon/dungeonsxl/game/GameGoal.java | 2 +- .../dungeonsxl/game/GameRuleProvider.java | 2 +- .../de/erethon/dungeonsxl/game/GameType.java | 2 +- .../dungeonsxl/game/GameTypeCache.java | 2 +- .../dungeonsxl/game/GameTypeDefault.java | 2 +- .../de/erethon/dungeonsxl/global/DPortal.java | 4 +- .../erethon/dungeonsxl/global/GameSign.java | 4 +- .../erethon/dungeonsxl/global/GlobalData.java | 2 +- .../dungeonsxl/global/GlobalProtection.java | 2 +- .../global/GlobalProtectionCache.java | 2 +- .../global/GlobalProtectionListener.java | 2 +- .../erethon/dungeonsxl/global/GroupSign.java | 2 +- .../erethon/dungeonsxl/global/JoinSign.java | 2 +- .../erethon/dungeonsxl/global/LeaveSign.java | 2 +- .../dungeonsxl/global/UnloadedProtection.java | 2 +- .../dungeonsxl/mob/CitizensMobProvider.java | 2 +- .../mob/CustomExternalMobProvider.java | 2 +- .../java/de/erethon/dungeonsxl/mob/DMob.java | 2 +- .../erethon/dungeonsxl/mob/DMobListener.java | 2 +- .../de/erethon/dungeonsxl/mob/DMobType.java | 5 +- .../erethon/dungeonsxl/mob/DNPCRegistry.java | 2 +- .../dungeonsxl/mob/ExternalMobPlugin.java | 2 +- .../dungeonsxl/mob/ExternalMobProvider.java | 2 +- .../mob/ExternalMobProviderCache.java | 2 +- .../de/erethon/dungeonsxl/player/DClass.java | 2 +- .../dungeonsxl/player/DClassCache.java | 2 +- .../dungeonsxl/player/DEditPlayer.java | 2 +- .../dungeonsxl/player/DGamePlayer.java | 4 +- .../dungeonsxl/player/DGlobalPlayer.java | 6 +- .../de/erethon/dungeonsxl/player/DGroup.java | 20 +- .../erethon/dungeonsxl/player/DGroupTag.java | 2 +- .../dungeonsxl/player/DInstancePlayer.java | 2 +- .../dungeonsxl/player/DPermission.java | 2 +- .../dungeonsxl/player/DPlayerCache.java | 2 +- .../dungeonsxl/player/DPlayerData.java | 5 +- .../dungeonsxl/player/DPlayerListener.java | 4 +- .../dungeonsxl/player/RespawnTask.java | 2 +- .../dungeonsxl/player/SecureModeTask.java | 2 +- .../dungeonsxl/player/TimeIsRunningTask.java | 2 +- .../requirement/FeeLevelRequirement.java | 2 +- .../requirement/FeeMoneyRequirement.java | 2 +- .../ForbiddenItemsRequirement.java | 2 +- .../requirement/GroupSizeRequirement.java | 2 +- .../requirement/KeyItemsRequirement.java | 2 +- .../requirement/PermissionRequirement.java | 2 +- .../dungeonsxl/requirement/Requirement.java | 2 +- .../requirement/RequirementType.java | 2 +- .../requirement/RequirementTypeCache.java | 2 +- .../requirement/RequirementTypeDefault.java | 2 +- .../erethon/dungeonsxl/reward/ItemReward.java | 2 +- .../dungeonsxl/reward/LevelReward.java | 2 +- .../dungeonsxl/reward/MoneyReward.java | 2 +- .../de/erethon/dungeonsxl/reward/Reward.java | 2 +- .../dungeonsxl/reward/RewardListener.java | 2 +- .../erethon/dungeonsxl/reward/RewardType.java | 2 +- .../dungeonsxl/reward/RewardTypeCache.java | 2 +- .../dungeonsxl/reward/RewardTypeDefault.java | 2 +- .../de/erethon/dungeonsxl/sign/BedSign.java | 2 +- .../de/erethon/dungeonsxl/sign/BlockSign.java | 2 +- .../erethon/dungeonsxl/sign/BossShopSign.java | 2 +- .../dungeonsxl/sign/CheckpointSign.java | 2 +- .../de/erethon/dungeonsxl/sign/ChestSign.java | 2 +- .../erethon/dungeonsxl/sign/CommandSign.java | 2 +- .../de/erethon/dungeonsxl/sign/DSign.java | 5 +- .../dungeonsxl/sign/DSignListener.java | 2 +- .../de/erethon/dungeonsxl/sign/DSignType.java | 2 +- .../dungeonsxl/sign/DSignTypeCache.java | 2 +- .../dungeonsxl/sign/DSignTypeDefault.java | 2 +- .../dungeonsxl/sign/DelayedPowerTask.java | 2 +- .../de/erethon/dungeonsxl/sign/DropSign.java | 2 +- .../dungeonsxl/sign/DungeonChestSign.java | 2 +- .../de/erethon/dungeonsxl/sign/EndSign.java | 2 +- .../de/erethon/dungeonsxl/sign/FlagSign.java | 2 +- .../erethon/dungeonsxl/sign/InteractSign.java | 2 +- .../de/erethon/dungeonsxl/sign/LeaveSign.java | 2 +- .../dungeonsxl/sign/LivesModifierSign.java | 2 +- .../erethon/dungeonsxl/sign/LocationSign.java | 2 +- .../de/erethon/dungeonsxl/sign/MobSign.java | 2 +- .../erethon/dungeonsxl/sign/MobSpawnTask.java | 2 +- .../de/erethon/dungeonsxl/sign/NoteSign.java | 2 +- .../erethon/dungeonsxl/sign/OpenDoorSign.java | 2 +- .../dungeonsxl/sign/PerPlayerSign.java | 2 +- .../de/erethon/dungeonsxl/sign/PlaceSign.java | 2 +- .../dungeonsxl/sign/ProtectionSign.java | 2 +- .../erethon/dungeonsxl/sign/RedstoneSign.java | 2 +- .../dungeonsxl/sign/ResourcePackSign.java | 2 +- .../dungeonsxl/sign/RewardChestSign.java | 2 +- .../erethon/dungeonsxl/sign/ScriptSign.java | 2 +- .../erethon/dungeonsxl/sign/SignScript.java | 2 +- .../dungeonsxl/sign/SignScriptCache.java | 2 +- .../dungeonsxl/sign/SignUpdateTask.java | 2 +- .../erethon/dungeonsxl/sign/TeleportSign.java | 2 +- .../erethon/dungeonsxl/sign/TriggerSign.java | 2 +- .../de/erethon/dungeonsxl/sign/WaveSign.java | 2 +- .../dungeonsxl/sign/lobby/ClassesSign.java | 2 +- .../dungeonsxl/sign/lobby/LobbySign.java | 2 +- .../dungeonsxl/sign/lobby/ReadySign.java | 2 +- .../dungeonsxl/sign/lobby/StartSign.java | 2 +- .../sign/message/ActionBarSign.java | 2 +- .../dungeonsxl/sign/message/HologramSign.java | 2 +- .../dungeonsxl/sign/message/MessageSign.java | 2 +- .../sign/message/SoundMessageSign.java | 2 +- .../dungeonsxl/sign/message/TitleSign.java | 2 +- .../dungeonsxl/trigger/DistanceTrigger.java | 2 +- .../dungeonsxl/trigger/FortuneTrigger.java | 2 +- .../dungeonsxl/trigger/InteractTrigger.java | 2 +- .../dungeonsxl/trigger/MobTrigger.java | 2 +- .../dungeonsxl/trigger/ProgressTrigger.java | 2 +- .../dungeonsxl/trigger/RedstoneTrigger.java | 2 +- .../dungeonsxl/trigger/SignTrigger.java | 2 +- .../erethon/dungeonsxl/trigger/Trigger.java | 2 +- .../dungeonsxl/trigger/TriggerListener.java | 2 +- .../dungeonsxl/trigger/TriggerType.java | 2 +- .../dungeonsxl/trigger/TriggerTypeCache.java | 2 +- .../trigger/TriggerTypeDefault.java | 2 +- .../dungeonsxl/trigger/UseItemTrigger.java | 2 +- .../dungeonsxl/trigger/WaveTrigger.java | 2 +- .../de/erethon/dungeonsxl/util/GUIUtil.java | 2 +- .../de/erethon/dungeonsxl/util/LWCUtil.java | 2 +- .../dungeonsxl/util/MagicValueUtil.java | 2 +- .../de/erethon/dungeonsxl/util/NBTUtil.java | 2 +- .../erethon/dungeonsxl/util/ParsingUtil.java | 2 +- .../dungeonsxl/util/PlaceholderUtil.java | 2 +- .../erethon/dungeonsxl/util/ProgressBar.java | 2 +- .../dungeonsxl/util/ReflectionUtil.java | 2 +- .../erethon/dungeonsxl/world/DEditWorld.java | 2 +- .../erethon/dungeonsxl/world/DGameWorld.java | 2 +- .../dungeonsxl/world/DInstanceWorld.java | 2 +- .../dungeonsxl/world/DResourceWorld.java | 2 +- .../erethon/dungeonsxl/world/DWorldCache.java | 2 +- .../dungeonsxl/world/DWorldListener.java | 2 +- .../dungeonsxl/world/LWCIntegration.java | 2 +- .../de/erethon/dungeonsxl/world/SignData.java | 2 +- .../erethon/dungeonsxl/world/WorldConfig.java | 2 +- .../dungeonsxl/world/WorldUnloadTask.java | 2 +- .../dungeonsxl/world/block/GameBlock.java | 2 +- .../dungeonsxl/world/block/LockedDoor.java | 2 +- .../dungeonsxl/world/block/MultiBlock.java | 2 +- .../world/block/PlaceableBlock.java | 2 +- .../world/block/ProtectedBlock.java | 2 +- .../dungeonsxl/world/block/RewardChest.java | 2 +- .../dungeonsxl/world/block/TeamBed.java | 2 +- .../dungeonsxl/world/block/TeamBlock.java | 2 +- .../dungeonsxl/world/block/TeamFlag.java | 2 +- core/src/main/resources/languages/english.yml | 232 +++++++++ dist/pom.xml | 20 + pom.xml | 4 +- 238 files changed, 778 insertions(+), 609 deletions(-) create mode 100644 core/src/main/resources/languages/english.yml diff --git a/README.md b/README.md index b53b2aa1..70b76892 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ If you want to learn how to use DungeonsXL step by step, please have a look at t ## Compatibility ### Server -DungeonsXL works with Spigot 1.8 and higher. However, support for 1.14 / 1.13 has a higher priority than support for 1.8-1.12. Old builds that support older versions are unusable for production environments. See [here](../../wiki/legacy-support) for detailed information. DungeonsXL only works with Spigot and does not support CraftBukkit builds. +DungeonsXL works with Spigot 1.8 and higher. However, support for 1.15 / 1.14 / 1.13 has a higher priority than support for 1.8-1.12. Old builds that support older versions are unusable for production environments. See [here](../../wiki/legacy-support) for detailed information. DungeonsXL only works with Spigot and does not support CraftBukkit builds. ### Building information and dependencies Building DungeonsXL from source requires [Apache Maven](https://maven.apache.org/). @@ -67,7 +67,6 @@ Make sure that your server uses Java 8 or higher. Supported. ### Known incompatibilities -* Towny * Corpses * PerWorldInventory diff --git a/core/pom.xml b/core/pom.xml index 2a717c35..4518b058 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -17,6 +17,7 @@ src/main/resources/ plugin.yml + languages/* diff --git a/core/src/main/java/de/erethon/dungeonsxl/DungeonsXL.java b/core/src/main/java/de/erethon/dungeonsxl/DungeonsXL.java index 0064cbb7..b189f97b 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/DungeonsXL.java +++ b/core/src/main/java/de/erethon/dungeonsxl/DungeonsXL.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,7 +20,6 @@ import de.erethon.caliburn.CaliburnAPI; import de.erethon.caliburn.loottable.LootTable; import de.erethon.commons.compatibility.Internals; import de.erethon.commons.compatibility.Version; -import de.erethon.commons.config.MessageConfig; import de.erethon.commons.javaplugin.DREPlugin; import de.erethon.commons.javaplugin.DREPluginSettings; import de.erethon.commons.misc.FileUtil; @@ -30,7 +29,6 @@ import de.erethon.dungeonsxl.adapter.block.BlockAdapterBlockData; import de.erethon.dungeonsxl.adapter.block.BlockAdapterMagicValues; import de.erethon.dungeonsxl.announcer.AnnouncerCache; import de.erethon.dungeonsxl.command.DCommandCache; -import de.erethon.dungeonsxl.config.DMessage; import de.erethon.dungeonsxl.config.MainConfig; import de.erethon.dungeonsxl.dungeon.DungeonCache; import de.erethon.dungeonsxl.game.Game; @@ -78,7 +76,6 @@ public class DungeonsXL extends DREPlugin { public static final String[] EXCLUDED_FILES = {"config.yml", "uid.dat", "DXLData.data", "data"}; public static File BACKUPS; - public static File LANGUAGES; public static File MAPS; public static File PLAYERS; public static File SCRIPTS; @@ -143,7 +140,6 @@ public class DungeonsXL extends DREPlugin { @Override public void onDisable() { saveData(); - messageConfig.save(); dGroups.clear(); dWorlds.deleteAllInstances(); HandlerList.unregisterAll(this); @@ -161,11 +157,6 @@ public class DungeonsXL extends DREPlugin { BACKUPS.mkdir(); } - LANGUAGES = new File(getDataFolder(), "languages"); - if (!LANGUAGES.exists()) { - LANGUAGES.mkdir(); - } - MAPS = new File(getDataFolder(), "maps"); if (!MAPS.exists()) { MAPS.mkdir(); @@ -213,9 +204,7 @@ public class DungeonsXL extends DREPlugin { } public void loadConfig() { - messageConfig = new MessageConfig(DMessage.class, new File(LANGUAGES, "english.yml")); mainConfig = new MainConfig(this, new File(getDataFolder(), "config.yml")); - messageConfig = new MessageConfig(DMessage.class, new File(LANGUAGES, mainConfig.getLanguage() + ".yml")); } public void createCaches() { diff --git a/core/src/main/java/de/erethon/dungeonsxl/announcer/Announcer.java b/core/src/main/java/de/erethon/dungeonsxl/announcer/Announcer.java index 1dcc666b..c22683a2 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/announcer/Announcer.java +++ b/core/src/main/java/de/erethon/dungeonsxl/announcer/Announcer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,11 +19,11 @@ package de.erethon.dungeonsxl.announcer; import de.erethon.commons.chat.DefaultFontInfo; import de.erethon.commons.chat.MessageUtil; import de.erethon.dungeonsxl.DungeonsXL; +import de.erethon.dungeonsxl.api.player.PlayerGroup.Color; import de.erethon.dungeonsxl.config.DMessage; import de.erethon.dungeonsxl.dungeon.Dungeon; import de.erethon.dungeonsxl.event.dgroup.DGroupCreateEvent; import de.erethon.dungeonsxl.player.DGroup; -import de.erethon.dungeonsxl.util.DColor; import de.erethon.dungeonsxl.util.GUIUtil; import java.io.File; import java.util.ArrayList; @@ -350,7 +350,7 @@ public class Announcer { public void clickGroupButton(Player player, ItemStack button) { DGroup dGroup = getDGroupByButton(button); DGroup pGroup = DGroup.getByPlayer(player); - DColor color = DColor.getByWoolType(plugin.getCaliburn().getExItem(button)); + Color color = Color.getByWoolType(plugin.getCaliburn().getExItem(button)); for (DGroup group : dGroups) { if (dGroups.contains(pGroup) && pGroup != null && pGroup.isCustom() && pGroup.getCaptain() == player) { @@ -422,7 +422,7 @@ public class Announcer { boolean full = playerCount >= maxPlayersPerGroup; - DColor color = plugin.getMainConfig().getGroupColorPriority(groupCount); + Color color = plugin.getMainConfig().getGroupColorPriority(groupCount); ItemStack button = color.getWoolMaterial().toItemStack(); ItemMeta meta = button.getItemMeta(); meta.setDisplayName(name + (full ? ChatColor.DARK_RED : ChatColor.GREEN) + " [" + playerCount + "/" + maxPlayersPerGroup + "]"); diff --git a/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerCache.java b/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerCache.java index 01153458..686a4866 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerCache.java +++ b/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerCache.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerListener.java b/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerListener.java index 41360c3a..37a57f86 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerListener.java +++ b/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerListener.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerStartGameTask.java b/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerStartGameTask.java index c5c8958b..94caff6a 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerStartGameTask.java +++ b/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerStartGameTask.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerTask.java b/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerTask.java index 83ecbcb5..7f32c36c 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerTask.java +++ b/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerTask.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/BreakCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/BreakCommand.java index 922bc943..e86ad19b 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/BreakCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/BreakCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,7 +34,7 @@ public class BreakCommand extends DCommand { setCommand("break"); setMinArgs(0); setMaxArgs(0); - setHelp(DMessage.HELP_CMD_BREAK.getMessage()); + setHelp(DMessage.CMD_BREAK_HELP.getMessage()); setPermission(DPermission.BREAK.getNode()); setPlayerCommand(true); } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/ChatCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/ChatCommand.java index 9f30c9a9..d1fa28ac 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/ChatCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/ChatCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,7 +36,7 @@ public class ChatCommand extends DCommand { setCommand("chat"); setMinArgs(0); setMaxArgs(0); - setHelp(DMessage.HELP_CMD_CHAT.getMessage()); + setHelp(DMessage.CMD_CHAT_HELP.getMessage()); setPermission(DPermission.CHAT.getNode()); setPlayerCommand(true); } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/ChatSpyCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/ChatSpyCommand.java index c14e64fa..126894e7 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/ChatSpyCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/ChatSpyCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,7 +34,7 @@ public class ChatSpyCommand extends DCommand { setCommand("chatSpy"); setMinArgs(0); setMaxArgs(0); - setHelp(DMessage.HELP_CMD_CHATSPY.getMessage()); + setHelp(DMessage.CMD_CHATSPY_HELP.getMessage()); setPermission(DPermission.CHAT_SPY.getNode()); setPlayerCommand(true); } @@ -45,7 +45,7 @@ public class ChatSpyCommand extends DCommand { DGlobalPlayer dPlayer = dPlayers.getByPlayer(player); dPlayer.setInChatSpyMode(!dPlayer.isInChatSpyMode()); - MessageUtil.sendMessage(player, (dPlayer.isInChatSpyMode() ? DMessage.CMD_CHATSPY_START : DMessage.CMD_CHATSPY_STOPPED).getMessage()); + MessageUtil.sendMessage(player, (dPlayer.isInChatSpyMode() ? DMessage.CMD_CHATSPY_STARTED : DMessage.CMD_CHATSPY_STOPPED).getMessage()); } } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/CreateCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/CreateCommand.java index 79383b6f..6975d26e 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/CreateCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/CreateCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,7 +39,7 @@ public class CreateCommand extends DCommand { setMinArgs(1); setMaxArgs(1); setCommand("create"); - setHelp(DMessage.HELP_CMD_CREATE.getMessage()); + setHelp(DMessage.CMD_CREATE_HELP.getMessage()); setPermission(DPermission.CREATE.getNode()); setPlayerCommand(true); setConsoleCommand(true); @@ -55,14 +55,14 @@ public class CreateCommand extends DCommand { } if (name.length() > 15) { - MessageUtil.sendMessage(sender, DMessage.ERROR_NAME_TO_LONG.getMessage()); + MessageUtil.sendMessage(sender, DMessage.ERROR_NAME_TOO_LONG.getMessage()); return; } if (sender instanceof ConsoleCommandSender) { // Msg create - MessageUtil.log(plugin, DMessage.LOG_NEW_MAP.getMessage()); - MessageUtil.log(plugin, DMessage.LOG_GENERATE_NEW_WORLD.getMessage()); + MessageUtil.log(plugin, "&6Creating new map."); + MessageUtil.log(plugin, "&6Generating new world..."); // Create World DResourceWorld resource = new DResourceWorld(plugin, name); @@ -72,7 +72,7 @@ public class CreateCommand extends DCommand { editWorld.delete(); // MSG Done - MessageUtil.log(plugin, DMessage.LOG_WORLD_GENERATION_FINISHED.getMessage()); + MessageUtil.log(plugin, "&6World generation finished."); } else if (sender instanceof Player) { Player player = (Player) sender; @@ -83,8 +83,8 @@ public class CreateCommand extends DCommand { } // Msg create - MessageUtil.log(plugin, DMessage.LOG_NEW_MAP.getMessage()); - MessageUtil.log(plugin, DMessage.LOG_GENERATE_NEW_WORLD.getMessage()); + MessageUtil.log(plugin, "&6Creating new map."); + MessageUtil.log(plugin, "&6Generating new world..."); // Create World DResourceWorld resource = new DResourceWorld(plugin, name); @@ -92,7 +92,7 @@ public class CreateCommand extends DCommand { DEditWorld editWorld = resource.generate(); // MSG Done - MessageUtil.log(plugin, DMessage.LOG_WORLD_GENERATION_FINISHED.getMessage()); + MessageUtil.log(plugin, "&6World generation finished."); // Tp Player new DEditPlayer(plugin, player, editWorld); diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/DCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/DCommand.java index a274b75e..b1719c6d 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/DCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/DCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/DCommandCache.java b/core/src/main/java/de/erethon/dungeonsxl/command/DCommandCache.java index b0150cee..39c1689a 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/DCommandCache.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/DCommandCache.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/DeleteCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/DeleteCommand.java index e4cc63dd..eb09f8eb 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/DeleteCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/DeleteCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,7 +39,7 @@ public class DeleteCommand extends DCommand { setCommand("delete"); setMinArgs(1); setMaxArgs(2); - setHelp(DMessage.HELP_CMD_DELETE.getMessage()); + setHelp(DMessage.CMD_DELETE_HELP.getMessage()); setPermission(DPermission.DELETE.getNode()); setPlayerCommand(true); setConsoleCommand(true); diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/DungeonItemCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/DungeonItemCommand.java index 67211aa0..286ef9a7 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/DungeonItemCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/DungeonItemCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,7 +37,7 @@ public class DungeonItemCommand extends DCommand { setAliases("di"); setMinArgs(0); setMaxArgs(1); - setHelp(DMessage.HELP_CMD_DUNGEON_ITEM.getMessage()); + setHelp(DMessage.CMD_DUNGEON_ITEM_HELP.getMessage()); setPermission(DPermission.DUNGEON_ITEM.getNode()); setPlayerCommand(true); setConsoleCommand(false); @@ -63,7 +63,7 @@ public class DungeonItemCommand extends DCommand { NBTUtil.addBoolean(tag, NBTUtil.DUNGEON_ITEM_KEY, true); inv.setItemInHand(NBTUtil.setTag(bukkitStack, tag)); MessageUtil.sendMessage(sender, DMessage.CMD_DUNGEON_ITEM_SET_DUNGEON.getMessage()); - MessageUtil.sendMessage(sender, DMessage.HELP_DUNGEON_ITEM.getMessage()); + MessageUtil.sendMessage(sender, DMessage.CMD_DUNGEON_ITEM_DUNGEON_ITEM_HELP.getMessage()); } else if (action.equalsIgnoreCase("false")) { if (tag != null) { @@ -71,15 +71,15 @@ public class DungeonItemCommand extends DCommand { inv.setItemInHand(NBTUtil.setTag(bukkitStack, tag)); } MessageUtil.sendMessage(sender, DMessage.CMD_DUNGEON_ITEM_SET_GLOBAL.getMessage()); - MessageUtil.sendMessage(sender, DMessage.HELP_GLOBAL_ITEM.getMessage()); + MessageUtil.sendMessage(sender, DMessage.CMD_DUNGEON_ITEM_GLOBAL_ITEM_HELP.getMessage()); } else { if (tag != null && NBTUtil.hasKey(tag, NBTUtil.DUNGEON_ITEM_KEY)) { MessageUtil.sendMessage(sender, DMessage.CMD_DUNGEON_ITEM_INFO_DUNGEON.getMessage()); - MessageUtil.sendMessage(sender, DMessage.HELP_DUNGEON_ITEM.getMessage()); + MessageUtil.sendMessage(sender, DMessage.CMD_DUNGEON_ITEM_DUNGEON_ITEM_HELP.getMessage()); } else { MessageUtil.sendMessage(sender, DMessage.CMD_DUNGEON_ITEM_INFO_GLOBAL.getMessage()); - MessageUtil.sendMessage(sender, DMessage.HELP_GLOBAL_ITEM.getMessage()); + MessageUtil.sendMessage(sender, DMessage.CMD_DUNGEON_ITEM_GLOBAL_ITEM_HELP.getMessage()); } } } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/EditCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/EditCommand.java index 0b7389ba..4ae5afd8 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/EditCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/EditCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,6 +17,7 @@ package de.erethon.dungeonsxl.command; import de.erethon.commons.chat.MessageUtil; +import de.erethon.commons.config.CommonMessage; import de.erethon.dungeonsxl.DungeonsXL; import de.erethon.dungeonsxl.config.DMessage; import de.erethon.dungeonsxl.player.DEditPlayer; @@ -39,7 +40,7 @@ public class EditCommand extends DCommand { setCommand("edit"); setMinArgs(1); setMaxArgs(1); - setHelp(DMessage.HELP_CMD_EDIT.getMessage()); + setHelp(DMessage.CMD_EDIT_HELP.getMessage()); setPlayerCommand(true); } @@ -49,7 +50,7 @@ public class EditCommand extends DCommand { String mapName = args[1]; if (!instances.exists(mapName)) { - MessageUtil.sendMessage(player, DMessage.ERROR_DUNGEON_NOT_EXIST.getMessage(mapName)); + MessageUtil.sendMessage(player, DMessage.ERROR_NO_SUCH_DUNGEON.getMessage(mapName)); return; } @@ -60,7 +61,7 @@ public class EditCommand extends DCommand { } if (!resource.isInvitedPlayer(player) && !DPermission.hasPermission(player, DPermission.EDIT)) { - MessageUtil.sendMessage(player, DMessage.ERROR_NO_PERMISSIONS.getMessage()); + MessageUtil.sendMessage(player, CommonMessage.CMD_NO_PERMISSION.getMessage()); return; } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/EnterCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/EnterCommand.java index 38e69c4e..d454014c 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/EnterCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/EnterCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,7 +37,7 @@ public class EnterCommand extends DCommand { setMinArgs(1); setMaxArgs(2); setCommand("enter"); - setHelp(DMessage.HELP_CMD_ENTER.getMessage()); + setHelp(DMessage.CMD_ENTER_HELP.getMessage()); setPermission(DPermission.ENTER.getNode()); setPlayerCommand(true); } @@ -78,7 +78,7 @@ public class EnterCommand extends DCommand { } if (joining.getCaptain() != captain && !DPermission.hasPermission(sender, DPermission.BYPASS)) { - MessageUtil.sendMessage(sender, DMessage.ERROR_NOT_CAPTAIN.getMessage()); + MessageUtil.sendMessage(sender, DMessage.ERROR_NOT_LEADER.getMessage()); return; } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/EscapeCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/EscapeCommand.java index 6e952a08..ae126b54 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/EscapeCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/EscapeCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,7 +37,7 @@ public class EscapeCommand extends DCommand { setCommand("escape"); setMinArgs(0); setMaxArgs(0); - setHelp(DMessage.HELP_CMD_ESCAPE.getMessage()); + setHelp(DMessage.CMD_ESCAPE_HELP.getMessage()); setPermission(DPermission.ESCAPE.getNode()); setPlayerCommand(true); } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/GameCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/GameCommand.java index ed9cfe1e..9c18d4bd 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/GameCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/GameCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,7 +36,7 @@ public class GameCommand extends DCommand { setCommand("game"); setMinArgs(0); setMaxArgs(0); - setHelp(DMessage.HELP_CMD_GAME.getMessage()); + setHelp(DMessage.CMD_GAME_HELP.getMessage()); setPermission(DPermission.GAME.getNode()); setPlayerCommand(true); } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/GroupCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/GroupCommand.java index c1984bd2..1c7e72cf 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/GroupCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/GroupCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,7 +39,7 @@ public class GroupCommand extends DCommand { setCommand("group"); setMinArgs(0); setMaxArgs(2); - setHelp(DMessage.HELP_CMD_GROUP.getMessage()); + setHelp(DMessage.CMD_GROUP_HELP_MAIN.getMessage()); setPermission(DPermission.GROUP.getNode()); setPlayerCommand(true); } @@ -272,19 +272,18 @@ public class GroupCommand extends DCommand { switch (page) { default: MessageUtil.sendCenteredMessage(sender, "&4&l[ &61-5 &4/ &67 &4| &61 &4&l]"); - MessageUtil.sendMessage(sender, "&bcreate" + "&7 - " + DMessage.HELP_CMD_GROUP_CREATE.getMessage()); - MessageUtil.sendMessage(sender, "&bdisband" + "&7 - " + DMessage.HELP_CMD_GROUP_DISBAND.getMessage()); - MessageUtil.sendMessage(sender, "&binvite" + "&7 - " + DMessage.HELP_CMD_GROUP_INVITE.getMessage()); - MessageUtil.sendMessage(sender, "&buninvite" + "&7 - " + DMessage.HELP_CMD_GROUP_UNINVITE.getMessage()); - MessageUtil.sendMessage(sender, "&bjoin" + "&7 - " + DMessage.HELP_CMD_GROUP_JOIN.getMessage()); + MessageUtil.sendMessage(sender, "&bcreate" + "&7 - " + DMessage.CMD_GROUP_HELP_CREATE.getMessage()); + MessageUtil.sendMessage(sender, "&bdisband" + "&7 - " + DMessage.CMD_GROUP_HELP_DISBAND.getMessage()); + MessageUtil.sendMessage(sender, "&binvite" + "&7 - " + DMessage.CMD_GROUP_HELP_INVITE.getMessage()); + MessageUtil.sendMessage(sender, "&buninvite" + "&7 - " + DMessage.CMD_GROUP_HELP_UNINVITE.getMessage()); + MessageUtil.sendMessage(sender, "&bjoin" + "&7 - " + DMessage.CMD_GROUP_HELP_JOIN.getMessage()); break; case "2": MessageUtil.sendCenteredMessage(sender, "&4&l[ &66-10 &4/ &67 &4| &62 &4&l]"); - MessageUtil.sendMessage(sender, "&bkick" + "&7 - " + DMessage.HELP_CMD_GROUP_KICK.getMessage()); - MessageUtil.sendMessage(sender, "&bshow" + "&7 - " + DMessage.HELP_CMD_GROUP_SHOW.getMessage()); + MessageUtil.sendMessage(sender, "&bkick" + "&7 - " + DMessage.CMD_GROUP_HELP_KICK.getMessage()); + MessageUtil.sendMessage(sender, "&bshow" + "&7 - " + DMessage.CMD_GROUP_HELP_SHOW.getMessage()); break; } - } } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/HelpCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/HelpCommand.java index a5f15a21..0d1be7d0 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/HelpCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/HelpCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,7 +36,7 @@ public class HelpCommand extends DCommand { setCommand("help"); setMinArgs(0); setMaxArgs(1); - setHelp(DMessage.HELP_CMD_HELP.getMessage()); + setHelp(DMessage.CMD_HELP_HELP.getMessage()); setPermission(DPermission.HELP.getNode()); setPlayerCommand(true); setConsoleCommand(true); diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/ImportCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/ImportCommand.java index e9861f6b..d4f2bc5a 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/ImportCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/ImportCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,7 +38,7 @@ public class ImportCommand extends DCommand { setMinArgs(1); setMaxArgs(1); setCommand("import"); - setHelp(DMessage.HELP_CMD_IMPORT.getMessage()); + setHelp(DMessage.CMD_IMPORT_HELP.getMessage()); setPermission(DPermission.IMPORT.getNode()); setPlayerCommand(true); setConsoleCommand(true); @@ -64,8 +64,8 @@ public class ImportCommand extends DCommand { world.save(); } - MessageUtil.log(plugin, DMessage.LOG_NEW_MAP.getMessage()); - MessageUtil.log(plugin, DMessage.LOG_IMPORT_WORLD.getMessage()); + MessageUtil.log(plugin, "&6Creating new map."); + MessageUtil.log(plugin, "&6Importing world..."); FileUtil.copyDir(source, target, "playerdata", "stats"); diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/InviteCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/InviteCommand.java index 1e3b6f81..400a364d 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/InviteCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/InviteCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,7 +35,7 @@ public class InviteCommand extends DCommand { setMinArgs(2); setMaxArgs(2); setCommand("invite"); - setHelp(DMessage.HELP_CMD_INVITE.getMessage()); + setHelp(DMessage.CMD_INVITE_HELP.getMessage()); setPermission(DPermission.INVITE.getNode()); setPlayerCommand(true); setConsoleCommand(true); @@ -56,7 +56,7 @@ public class InviteCommand extends DCommand { } } else { - MessageUtil.sendMessage(sender, DMessage.ERROR_DUNGEON_NOT_EXIST.getMessage(args[2])); + MessageUtil.sendMessage(sender, DMessage.ERROR_NO_SUCH_MAP.getMessage(args[2])); } } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/JoinCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/JoinCommand.java index 2896f980..bc8df4fc 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/JoinCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/JoinCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,7 +36,7 @@ public class JoinCommand extends DCommand { setCommand("join"); setMinArgs(1); setMaxArgs(1); - setHelp(DMessage.HELP_CMD_JOIN.getMessage()); + setHelp(DMessage.CMD_JOIN_HELP.getMessage()); setPermission(DPermission.JOIN.getNode()); setPlayerCommand(true); } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/KickCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/KickCommand.java index f1a5f937..37dbfa6e 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/KickCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/KickCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,7 +34,7 @@ public class KickCommand extends DCommand { setCommand("kick"); setMinArgs(1); setMaxArgs(1); - setHelp(DMessage.HELP_CMD_KICK.getMessage()); + setHelp(DMessage.CMD_KICK_HELP.getMessage()); setPermission(DPermission.KICK.getNode()); setPlayerCommand(true); setConsoleCommand(true); diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/LeaveCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/LeaveCommand.java index 3dfab204..096db441 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/LeaveCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/LeaveCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,7 +42,7 @@ public class LeaveCommand extends DCommand { setCommand("leave"); setMinArgs(0); setMaxArgs(0); - setHelp(DMessage.HELP_CMD_LEAVE.getMessage()); + setHelp(DMessage.CMD_LEAVE_HELP.getMessage()); setPermission(DPermission.LEAVE.getNode()); setPlayerCommand(true); } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/ListCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/ListCommand.java index 5fb51683..b6e3d17c 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/ListCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/ListCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,7 +42,7 @@ public class ListCommand extends DCommand { setCommand("list"); setMinArgs(0); setMaxArgs(3); - setHelp(DMessage.HELP_CMD_LIST.getMessage()); + setHelp(DMessage.CMD_LIST_HELP.getMessage()); setPermission(DPermission.LIST.getNode()); setPlayerCommand(true); setConsoleCommand(true); diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/LivesCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/LivesCommand.java index 72fd0d4c..9f9ed4fc 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/LivesCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/LivesCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,7 +38,7 @@ public class LivesCommand extends DCommand { setCommand("lives"); setMinArgs(0); setMaxArgs(1); - setHelp(DMessage.HELP_CMD_LIVES.getMessage()); + setHelp(DMessage.CMD_LIVES_HELP.getMessage()); setPermission(DPermission.LIVES.getNode()); setPlayerCommand(true); setConsoleCommand(true); diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/MainCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/MainCommand.java index acb68736..d4415ce4 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/MainCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/MainCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,7 +35,7 @@ public class MainCommand extends DCommand { public MainCommand(DungeonsXL plugin) { super(plugin); setCommand("main"); - setHelp(DMessage.HELP_CMD_MAIN.getMessage()); + setHelp(DMessage.CMD_MAIN_HELP.getMessage()); setPermission(DPermission.MAIN.getNode()); setPlayerCommand(true); setConsoleCommand(true); @@ -68,7 +68,7 @@ public class MainCommand extends DCommand { MessageUtil.sendCenteredMessage(sender, DMessage.CMD_MAIN_LOADED.getMessage(String.valueOf(maps), String.valueOf(dungeons), String.valueOf(loaded), String.valueOf(players))); MessageUtil.sendCenteredMessage(sender, DMessage.CMD_MAIN_COMPATIBILITY.getMessage(String.valueOf(internals), vault, itemsxl)); MessageUtil.sendCenteredMessage(sender, DMessage.CMD_MAIN_HELP.getMessage()); - MessageUtil.sendCenteredMessage(sender, "&7\u00a92012-2019 Frank Baumann & contributors; lcsd. under GPLv3."); + MessageUtil.sendCenteredMessage(sender, "&7\u00a92012-2020 Frank Baumann & contributors; lcsd. under GPLv3."); } } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/MsgCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/MsgCommand.java index 487982e9..1c09a544 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/MsgCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/MsgCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,7 +36,7 @@ public class MsgCommand extends DCommand { setMinArgs(-1); setMaxArgs(-1); setCommand("msg"); - setHelp(DMessage.HELP_CMD_MSG.getMessage()); + setHelp(DMessage.CMD_MSG_HELP.getMessage()); setPermission(DPermission.MESSAGE.getNode()); setPlayerCommand(true); } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/PlayCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/PlayCommand.java index 6aa8e6ce..8acee4df 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/PlayCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/PlayCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -43,7 +43,7 @@ public class PlayCommand extends DCommand { setCommand("play"); setMinArgs(1); setMaxArgs(1); - setHelp(DMessage.HELP_CMD_PLAY.getMessage()); + setHelp(DMessage.CMD_PLAY_HELP.getMessage()); setPermission(DPermission.PLAY.getNode()); setPlayerCommand(true); setConsoleCommand(false); @@ -64,7 +64,7 @@ public class PlayCommand extends DCommand { if (resource != null) { dungeon = new Dungeon(plugin, resource); } else { - MessageUtil.sendMessage(player, DMessage.ERROR_DUNGEON_NOT_EXIST.getMessage(args[1])); + MessageUtil.sendMessage(player, DMessage.ERROR_NO_SUCH_DUNGEON.getMessage(args[1])); return; } } @@ -83,7 +83,7 @@ public class PlayCommand extends DCommand { } } if (!dGroup.getCaptain().equals(player) && !DPermission.hasPermission(player, DPermission.BYPASS)) { - MessageUtil.sendMessage(player, DMessage.ERROR_NOT_CAPTAIN.getMessage()); + MessageUtil.sendMessage(player, DMessage.ERROR_NOT_LEADER.getMessage()); return; } dGroup.setDungeon(dungeon); diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/PortalCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/PortalCommand.java index 0db0af63..3b934e69 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/PortalCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/PortalCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,7 +41,7 @@ public class PortalCommand extends DCommand { setCommand("portal"); setMinArgs(0); setMaxArgs(1); - setHelp(DMessage.HELP_CMD_PORTAL.getMessage()); + setHelp(DMessage.CMD_PORTAL_HELP.getMessage()); setPermission(DPermission.PORTAL.getNode()); setPlayerCommand(true); } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/ReloadCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/ReloadCommand.java index 3812fc49..84d50233 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/ReloadCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/ReloadCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -43,7 +43,7 @@ public class ReloadCommand extends DCommand { setCommand("reload"); setMinArgs(0); setMaxArgs(1); - setHelp(DMessage.HELP_CMD_RELOAD.getMessage()); + setHelp(DMessage.CMD_RELOAD_HELP.getMessage()); setPermission(DPermission.RELOAD.getNode()); setPlayerCommand(true); setConsoleCommand(true); @@ -96,7 +96,7 @@ public class ReloadCommand extends DCommand { plugin.loadData(); MessageUtil.sendPluginTag(sender, plugin); - MessageUtil.sendCenteredMessage(sender, DMessage.CMD_RELOAD_DONE.getMessage()); + MessageUtil.sendCenteredMessage(sender, DMessage.CMD_RELOAD_SUCCESS.getMessage()); MessageUtil.sendCenteredMessage(sender, DMessage.CMD_MAIN_LOADED.getMessage(String.valueOf(maps), String.valueOf(dungeons), String.valueOf(loaded), String.valueOf(players))); MessageUtil.sendCenteredMessage(sender, DMessage.CMD_MAIN_COMPATIBILITY.getMessage(String.valueOf(internals), vault, ixl)); } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/RenameCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/RenameCommand.java index 2075a64e..cd9e73e4 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/RenameCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/RenameCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,7 +42,7 @@ public class RenameCommand extends DCommand { setCommand("rename"); setMinArgs(2); setMaxArgs(2); - setHelp(DMessage.HELP_CMD_RENAME.getMessage()); + setHelp(DMessage.CMD_RENAME_HELP.getMessage()); setPermission(DPermission.RENAME.getNode()); setPlayerCommand(true); setConsoleCommand(true); diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/ResourcePackCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/ResourcePackCommand.java index 9330873a..a9dde5be 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/ResourcePackCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/ResourcePackCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ public class ResourcePackCommand extends DCommand { setCommand("resourcepack"); setMinArgs(1); setMaxArgs(1); - setHelp(DMessage.HELP_CMD_RESOURCE_PACK.getMessage()); + setHelp(DMessage.CMD_RESOURCE_PACK_HELP.getMessage()); setPermission(DPermission.RESOURCE_PACK.getNode()); setPlayerCommand(true); } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/SaveCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/SaveCommand.java index 1628b4fa..b66523b3 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/SaveCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/SaveCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,7 +35,7 @@ public class SaveCommand extends DCommand { setCommand("save"); setMinArgs(0); setMaxArgs(0); - setHelp(DMessage.HELP_CMD_SAVE.getMessage()); + setHelp(DMessage.CMD_SAVE_HELP.getMessage()); setPermission(DPermission.SAVE.getNode()); setPlayerCommand(true); } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/StatusCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/StatusCommand.java index a2feca73..239fcc1f 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/StatusCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/StatusCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -43,7 +43,7 @@ public class StatusCommand extends DCommand { setCommand("status"); setMinArgs(0); setMaxArgs(0); - setHelp(DMessage.HELP_CMD_STATUS.getMessage()); + setHelp(DMessage.CMD_STATUS_HELP.getMessage()); setPermission(DPermission.STATUS.getNode()); setPlayerCommand(true); setConsoleCommand(true); diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/TestCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/TestCommand.java index eaa1e9ce..b9891129 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/TestCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/TestCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,7 +42,7 @@ public class TestCommand extends DCommand { setCommand("test"); setMinArgs(0); setMaxArgs(0); - setHelp(DMessage.HELP_CMD_TEST.getMessage()); + setHelp(DMessage.CMD_TEST_HELP.getMessage()); setPermission(DPermission.TEST.getNode()); setPlayerCommand(true); setConsoleCommand(false); @@ -61,7 +61,7 @@ public class TestCommand extends DCommand { } if (!dGroup.getCaptain().equals(player) && !DPermission.hasPermission(player, DPermission.BYPASS)) { - MessageUtil.sendMessage(sender, DMessage.ERROR_NOT_CAPTAIN.getMessage()); + MessageUtil.sendMessage(sender, DMessage.ERROR_NOT_LEADER.getMessage()); return; } diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/UninviteCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/UninviteCommand.java index 076e32cb..f8078a33 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/UninviteCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/UninviteCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,7 +35,7 @@ public class UninviteCommand extends DCommand { setCommand("uninvite"); setMinArgs(2); setMaxArgs(2); - setHelp(DMessage.HELP_CMD_UNINVITE.getMessage()); + setHelp(DMessage.CMD_UNINVITE_HELP.getMessage()); setPermission(DPermission.UNINVITE.getNode()); setPlayerCommand(true); setConsoleCommand(true); @@ -45,7 +45,7 @@ public class UninviteCommand extends DCommand { public void onExecute(String[] args, CommandSender sender) { DResourceWorld resource = instances.getResourceByName(args[2]); if (resource == null) { - MessageUtil.sendMessage(sender, DMessage.ERROR_DUNGEON_NOT_EXIST.getMessage(args[2])); + MessageUtil.sendMessage(sender, DMessage.ERROR_NO_SUCH_MAP.getMessage(args[2])); return; } diff --git a/core/src/main/java/de/erethon/dungeonsxl/config/DMessage.java b/core/src/main/java/de/erethon/dungeonsxl/config/DMessage.java index e017e82a..fd74db3e 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/config/DMessage.java +++ b/core/src/main/java/de/erethon/dungeonsxl/config/DMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,8 +17,6 @@ package de.erethon.dungeonsxl.config; import de.erethon.commons.config.Message; -import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.configuration.file.YamlConfiguration; /** * An enumeration of all messages. The values are fetched from the language file. @@ -27,271 +25,203 @@ import org.bukkit.configuration.file.YamlConfiguration; */ public enum DMessage implements Message { - ANNOUNCER_CLICK("Announcer_Click", "&4&l=> &6CLICK HERE TO JOIN &4&l<="), - CMD_BREAK_PROTECTED_MODE("Cmd_Break_ProtectedMode", "&6You may not break blocks protected by DungeonsXL anymore."), - CMD_BREAK_BREAK_MODE("Cmd_Break_BreakMode", "&6You may break a block protected by DungeonsXL."), - CMD_CHAT_DUNGEON_CHAT("Cmd_Chat_DungeonChat", "&6You have entered the dungeon chat"), - CMD_CHAT_NORMAL_CHAT("Cmd_Chat_NormalChat", "&6You are now in the public chat"), - CMD_CHATSPY_STOPPED("Cmd_Chatspy_Stopped", "&6You stopped to spy the dungeon chat."), - CMD_CHATSPY_START("Cmd_Chatspy_Start", "&6You started to spy the dungeon chat."), - CMD_DELETE_BACKUPS("Cmd_Delete_Backups", "&6Do you wish to delete all saved backups as well?"), - CMD_DELETE_SUCCESS("Cmd_Delete_Success", "&6Successfully deleted the map &4&v1&6."), - CMD_DUNGEON_ITEM_INFO_DUNGEON("Cmd_DungeonItem_Info_Dungeon", "&6This item is a &4dungeon item&6."), - CMD_DUNGEON_ITEM_INFO_GLOBAL("Cmd_DungeonItem_Info_Global", "&6This item is a &4global item&6."), - CMD_DUNGEON_ITEM_SET_DUNGEON("Cmd_DungeonItem_Set_Dungeon", "&6Successfully made this item a &4dungeon item&6."), - CMD_DUNGEON_ITEM_SET_GLOBAL("Cmd_DungeonItem_Set_Global", "&6Successfully made this item a &4global item&6."), - CMD_ENTER_SUCCESS("Cmd_Enter", "&6The group &4&v1 &6successfully entered the game of the group &4&v2&6."), - CMD_IMPORT_SUCCESS("Cmd_Import", "&6Successfully imported the world &4&v1&6."), - CMD_INVITE_SUCCESS("Cmd_Invite_Success", "&6Player &4&v1&6 was successfully invited to edit the map &4&v2&6."), - CMD_KICK_SUCCESS("Cmd_Kick_Success", "&6Successfully attempted to kick &4&v1&6."), - CMD_LEAVE_SUCCESS("Cmd_Leave_Success", "&6You have successfully left your group!"), - CMD_LIVES_GROUP("Cmd_Lives_Group", "&4&v1 &6have &4&v2 &6lives left."), - CMD_LIVES_PLAYER("Cmd_Lives_Player", "&4&v1 &6has &4&v2 &6lives left."), - CMD_MAIN_WELCOME("Cmd_Main_Welcome", "&7Welcome to &4Dungeons&fXL"), - CMD_MAIN_LOADED("Cmd_Main_Loaded", "&eMaps: &o[&v1] &eDungeons: &o[&v2] &eLoaded: &o[&v3] &ePlayers: &o[&v4]"), - CMD_MAIN_COMPATIBILITY("Cmd_Main_Compatibility", "&eInternals: &o[&v1] &eVault: &o[&v2] &eItemsXL: &o[&v3]"), - CMD_MAIN_HELP("Cmd_Main_Help", "&7Type in &o/dxl help&r&7 for further information."), - CMD_MSG_ADDED("Cmd_Msg_Added", "&6New Messages (&4&v1&6) added!"), - CMD_MSG_UPDATED("Cmd_Msg_Updated", "&6Messages (&4&v1&6) updated!"), - CMD_RELOAD_DONE("Cmd_Reload_Done", "&7Successfully reloaded DungeonsXL."), - CMD_RELOAD_PLAYERS("Cmd_Reload_Players", "&4Warning: If you reload the plugin, all players will get kicked out of their game."), - CMD_RENAME_SUCCESS("Cmd_Rename_Success", "&6Successfully renamed the map &4&v1&6 to &4&v2&6."), - CMD_SAVE_SUCCESS("Cmd_Save_Success", "&6Map saved!"), - CMD_UNINVITE_SUCCESS("Cmd_Uninvite_Success", "&4&v1&6's permission to edit the map &4&v2&6 has been removed successfully."), - ERROR_BED("Error_Bed", "&4You cannot use a bed while in a dungeon!"), - ERROR_CHEST_IS_OPENED("Error_ChestIsOpened", "&4This chest has already been opened."), - ERROR_CMD("Error_Cmd", "&4Commands are not allowed while in a dungeon!"), - ERROR_CMD_NOT_EXIST_1("Error_CmdNotExist1", "&4Command &6&v1&4 does not exist!"), - ERROR_CMD_NOT_EXIST_2("Error_CmdNotExist2", "&4Please enter &6/dxl help&4 for help!"), - ERROR_COOLDOWN("Error_Cooldown", "&4You can only enter this dungeon every &6&v1&4 hours!"), - ERROR_DISPENSER("Error_Dispenser", "&4You cannot access this dispenser!"), - ERROR_DROP("Error_Drop", "&4You cannot drop safe items"), - ERROR_DUNGEON_NOT_EXIST("Error_DungeonNotExist", "&4This dungeon does not exist."), - ERROR_ENDERCHEST("Error_Enderchest", "&4You cannot use an enderchest while in a dungeon!"), - ERROR_IN_GROUP("Error_InGroup", "&4The player &6&v1&4 is already member of a group."), - ERROR_JOIN_GROUP("Error_JoinGroup", "&4You have to join a group first!"), - ERROR_LEAVE_DUNGEON("Error_LeaveDungeon", "&4You have to leave your current dungeon first!"), - ERROR_LEAVE_GAME("Error_LeaveGame", "&4You have to leave your current game first!"), - ERROR_LEAVE_GROUP("Error_LeaveGroup", "&4You have to leave your group first!"), - ERROR_MSG_ID_NOT_EXIST("Error_MsgIdNotExist", "&4Messages with Id &6&v1&4 does not exist!"), - ERROR_MSG_FORMAT("Error_MsgFormat", "&4Please use &6\" &4to mark the beginning and the end of the message!"), - ERROR_MSG_NO_INT("Error_MsgNoInt", "&4The argument [id] has to include a number!"), - ERROR_NAME_IN_USE("Error_NameInUse", "&4The name &6&v1 &4is already in use."), - ERROR_NAME_TO_LONG("Error_NameToLong", "&4The name may not be longer than 15 characters!"), - ERROR_NO_CONSOLE_COMMAND("Error_NoConsoleCommand", "&6/dxl &v1&4 cannot be executed as console!"), - ERROR_NO_GAME("Error_NoGame", "&4You currently do not take part in a game."), - ERROR_NO_ITEM_IN_MAIN_HAND("Error_NoItemInMainHand", "&4You do not have an item in your main hand."), - ERROR_NO_LEAVE_IN_TUTORIAL("Error_NoLeaveInTutorial", "&4You cannot use this command in the tutorial!"), - ERROR_NO_PERMISSIONS("Error_NoPermissions", "&4You do not have permission to do this!"), - ERROR_NO_PLAYER_COMMAND("Error_NoPlayerCommand", "&6/dxl &v1&4 cannot be executed as player!"), - ERROR_NO_PROTECTED_BLOCK("Error_NoDXLBlock", "&4This is not a block protected by DungeonsXL!"), - ERROR_NO_REWARDS_LEFT("Error_NoRewardsLeft", "&4You do not have any item rewards left."), - ERROR_NO_REWARDS_TIME("error.noRewardsTime", "&4You cannot receive rewards before &6&v1&4."), - ERROR_SELF_NOT_IN_GROUP("Error_SelfNoGroup", "&4You are not in any group."), - ERROR_NO_SUCH_GROUP("Error_NoSuchGroup", "&4The group &6&v1&4 does not exist!"), - ERROR_NO_SUCH_MAP("Error_NoSuchMap", "&4The world &6&v1&4 does not exist!"), - ERROR_NO_SUCH_PLAYER("Error_NoSuchPlayer", "&4The player &6&v1&4 does not exist!"), - ERROR_NO_SUCH_RESOURCE_PACK("Error_NoSuchResourcePack", "&4The resource pack &6&v1 &4is not registered in the main configuration file!"), - ERROR_NO_SUCH_SHOP("Error_NoSuchShop", "&4Shop &v1 &4not found..."), - ERROR_NOT_CAPTAIN("Error_NotCaptain", "&4You are not the captain of your group!"), - ERROR_NOT_IN_DUNGEON("Error_NotInDungeon", "&4You are not in a dungeon!"), - ERROR_NOT_IN_GAME("Error_NotInGame", "&4The group &6&v1&4 is not member of a game."), - ERROR_NOT_IN_GROUP("Error_NotInGroup", "&4The player &6&v1&4 is not member of the group &6&v2&v4."), - ERROR_NOT_INVITED("Error_NotInvited", "&4You are not invited to the group &6&v1&4."), - ERROR_NOT_SAVED("Error_NotSaved", "&4The map &6&v1&4 has not been saved to the &6DungeonsXL/maps/ &4folder yet!"), - ERROR_BLOCK_OWN_TEAM("Error_BlockOwnTeam", "&4This block belongs to your own group."), - ERROR_READY("Error_Ready", "&4Choose your class first!"), - ERROR_REQUIREMENTS("Error_Requirements", "&4You don't fulfill the requirements for this dungeon!"), - ERROR_SIGN_WRONG_FORMAT("Error_SignWrongFormat", "&4The sign is not written correctly!"), - ERROR_TOO_MANY_INSTANCES("Error_TooManyInstances", "&4There are currently too many maps instantiated. Try it again in a few minutes!"), - ERROR_TOO_MANY_TUTORIALS("Error_TooManyTutorials", "&4There are currently too many tutorials running. Try it again in a few minutes!"), - ERROR_TUTORIAL_NOT_EXIST("Error_TutorialNotExist", "&4Tutorial dungeon does not exist!"), - HELP_CMD_BREAK("Help_Cmd_Break", "/dxl break - Break a block protected by DungeonsXL"), - HELP_CMD_CHAT("Help_Cmd_Chat", "/dxl chat - Change the chat mode"), - HELP_CMD_CHATSPY("Help_Cmd_Chatspy", "/dxl chatspy - Dis/enables the spymode"), - HELP_CMD_CREATE("Help_Cmd_Create", "/dxl create [name] - Creates a new dungeon map"), - HELP_CMD_DELETE("Help_Cmd_Delete", "/dxl delete [name] - Deletes a dungeon map"), - HELP_CMD_DUNGEON_ITEM("Help_Cmd_DungeonItem", "/dxl dungeonItem [true|false|info] - Sets the item stack in the player's hand to be one that cannot be taken out of a dungeon"), - HELP_CMD_EDIT("Help_Cmd_Edit", "/dxl edit [map] - Edit an existing dungeon map"), - HELP_CMD_ENTER("Help_Cmd_Enter", "/dxl enter ([joining group]) [target group] - Let the joining group enter the game of the target group"), - HELP_CMD_ESCAPE("Help_Cmd_Escape", "/dxl escape - Leaves the current edit world without saving"), - HELP_CMD_GAME("Help_Cmd_Game", "/dxl game - Shows information about the current game session"), - HELP_CMD_GROUP("Help_Cmd_Group", "/dxl group - Shows group command help"), - HELP_CMD_GROUP_CREATE("Help_Cmd_GroupCreate", "/dxl group create [group] - Creates a new group"), - HELP_CMD_GROUP_DISBAND("Help_Cmd_GroupDisband", "/dxl group disband ([group]) - Disbands a group"), - HELP_CMD_GROUP_INVITE("Help_Cmd_GroupInvite", "/dxl group invite [player]- Invites someone to your group"), - HELP_CMD_GROUP_UNINVITE("Help_Cmd_GroupUninvite", "/dxl group uninvite [player] - Takes back an invitation to your group"), - HELP_CMD_GROUP_JOIN("Help_Cmd_GroupJoin", "/dxl group join [group]- Join a group"), - HELP_CMD_GROUP_KICK("Help_Cmd_GroupKick", "/dxl group kick [player] - Kicks a player"), - HELP_CMD_GROUP_SHOW("Help_Cmd_GroupShow", "/dxl group show [group] - Shows a group"), - HELP_CMD_HELP("Help_Cmd_Help", "/dxl help [page] - Shows the help page"), - HELP_CMD_IMPORT("Help_Cmd_Import", "/dxl import [world] - Imports a world from the world container as a dungeon map"), - HELP_CMD_INVITE("Help_Cmd_Invite", "/dxl invite [player] [dungeon] - Invite a player to edit a dungeon"), - HELP_CMD_JOIN("Help_Cmd_Join", "/dxl join [announcement] - Opens the GUI to join a group in an upcoming game"), - HELP_CMD_KICK("Help_Cmd_Kick", "/dxl kick [player] - Kicks the player out of his group and dungeon"), - HELP_CMD_LEAVE("Help_Cmd_Leave", "/dxl leave - Leaves the current group and dungeon or edit world"), - HELP_CMD_LIST("Help_Cmd_List", "/dxl list ([dungeon|map|loaded]) ([dungeon]) - Lists all dungeons"), - HELP_CMD_LIVES("Help_Cmd_Lives", "/dxl lives [player] - Shows the lives a player has left"), - HELP_CMD_MAIN("Help_Cmd_Main", "/dxl - General status information"), - HELP_CMD_MSG("Help_Cmd_Msg", "/dxl msg [id] '[msg]' - Show or edit a message"), - HELP_CMD_PLAY("Help_Cmd_Play", "/dxl play [name] - Allows the player to play a dungeon without a portal"), - HELP_CMD_PORTAL("Help_Cmd_Portal", "/dxl portal ([material=portal])- Creates a portal that leads into a dungeon"), - HELP_CMD_RELOAD("Help_Cmd_Reload", "/dxl reload - Reloads the plugin"), - HELP_CMD_RENAME("Help_Cmd_Rename", "/dxl rename [old name] [new name] - Changes the name of a map to the new one. This command does NOT break dungeons that include this map."), - HELP_CMD_REWARDS("Help_Cmd_Rewards", "/dxl rewards - Gives all left item rewards to the player"), - HELP_CMD_RESOURCE_PACK("Help_Cmd_ResourcePack", "/dxl resourcepack [ID] - Downloads a resourcepack registered in the main configuration file; use 'reset' to reset"), - HELP_CMD_SAVE("Help_Cmd_Save", "/dxl save - Saves the current dungeon"), - HELP_CMD_STATUS("Help_Cmd_Status", "/dxl status - Shows the technical status of DungeonsXL"), - HELP_CMD_SETTINGS("Help_Cmd_Settings", "/dxl settings ([edit|global|player])- Opens the settings menu"), - HELP_CMD_TEST("Help_Cmd_Test", "/dxl test - Starts the game in test mode"), - HELP_CMD_UNINVITE("Help_Cmd_Uninvite", "/dxl uninvite [player] [dungeon] - Uninvite a player to edit a dungeon"), - HELP_DUNGEON_ITEM("Help_DungeonItem", "&6After finishing a game, &4dungeon items &6are removed from the player's inventory even if the respective dungeon setup in general allows to keep it."), - HELP_GLOBAL_ITEM("Help_GlobalItem", "&6After finishing a game, &4global items &6can be taken out of dungeons if the respective dungeon setup in general allows to keep the inventory."), - GROUP_BED_DESTROYED("Group_BedDestroyed", "&6The bed of the group &4&v1 &6has been destroyed by &4&v2&6!"), - GROUP_CONGRATS("Group_Congrats", "&6Congratulations!"), - GROUP_CONGRATS_SUB("Group_CongratsSub", "&l&4Your group &v1 &4won the match!"), - GROUP_CREATED("Group_Created", "&4&v1&6 created the group &4&v2&6!"), - GROUP_DEATH("Group_Death", "&4&v1 &6died. &4&v2 &6have &4&v3 &6lives left."), - GROUP_DEATH_KICK("Group_DeathKick", "&4&v1 &6was kicked because &4&v2 &6have no lives left."), - GROUP_DEFEATED("Group_Defeated", "&4The group &4v1 &6is defeated because it lost its last score point."), - GROUP_DISBANDED("Group_Disbanded", "&4&v1&6 disbanded the group &4&v2&6."), - GROUP_FLAG_CAPTURED("Group_FlagCaptured", "&4&v1&6 has captured the flag of the group &4&v2&6!"), - GROUP_FLAG_LOST("Group_FlagLost", "&4&v1&6 died and lost &4&v2&6's flag."), - GROUP_FLAG_STEALING("Group_FlagStealing", "&4&v1&6 is stealing the flag of the group &4&v2&6!"), - GROUP_INVITED_PLAYER("Group_InvitedPlayer", "&4&v1&6 invited the player &4&v2&6 to the group &4&v3&6."), - GROUP_JOINED_GAME("Group_JoinedGame", "&6Your group successfully joined the game."), - GROUP_KILLED("Group_Killed", "&4&v1 &6was killed by &4&v2&6. &4&v3&6 have &4&v4 &6lives left."), - GROUP_KILLED_KICK("Group_KilledKick", "&4&v1&6 was killed by &4&v2&6. &4&v3 have no lives left."), - GROUP_LIVES_ADDED("Group_LivesAdded", "&6Your group received a bonus of &4&v1&6 lives."), - GROUP_LIVES_REMOVED("Group_LivesRemoved", "&6Your group lost &4&v1&6 lives!"), - GROUP_UNINVITED_PLAYER("Group_UninvitedPlayer", "&4&v1&6 took back the invitation for &4&v2&6 to the group &4&v3&6."), - GROUP_KICKED_PLAYER("Group_KickedPlayer", "&4&v1&6 kicked the player &4&v2&6 from the group &4&v3&6."), - GROUP_PLAYER_JOINED("Group_PlayerJoined", "&6Player &4&v1&6 has joined the group!"), - GROUP_REWARD_CHEST("group.rewardChest", "&6Your group has found a reward chest."), - GROUP_WAVE_FINISHED("Group_WaveFinished", "&6Your group finished wave no. &4&v1&6. The next one is going to start in &4&v2&6 seconds."), - LOG_ERROR_DUNGEON_SETUP("Log_Error_DungeonSetup", "&4The setup of dungeon &6&v1&4 is incorrect. See https://github.com/DRE2N/DungeonsXL/wiki/dungeon-configuration for reference."), - LOG_ERROR_MOB_ENCHANTMENT("Log_Error_MobEnchantment", "&4An error occurred while loading mob.yml: Enchantment &6&v1&4 doesn't exist!"), - LOG_ERROR_MOBTYPE("Log_Error_MobType", "&4Error at loading mob.yml: Mob &6&v1&4 doesn't exist!"), - LOG_ERROR_NO_CONSOLE_COMMAND("Log_Error_NoConsoleCommand", "&6/dxl &v1&4 can not be executed as console!"), - LOG_ERROR_SIGN_SETUP("Log_Error_SignSetup", "&4A sign at &6&v1&4 is erroneous!"), - LOG_GENERATE_NEW_WORLD("Log_GenerateNewWorld", "&6Generating new world..."), - LOG_IMPORT_WORLD("Log_ImportWorld", "&6Importing world..."), - LOG_KILLED_CORRUPTED_PLAYER("Log_KilledCorruptedPlayer", "&4Killed player &6&v1 &4because the data to restore his main inventory is corrupted :("), - LOG_NEW_MAP("Log_NewDungeon", "&6Creating new map."), - LOG_NEW_PLAYER_DATA("Log_NewPlayerData", "&6A new player data file has been created and saved as &v1."), - LOG_WORLD_GENERATION_FINISHED("Log_WorldGenerationFinished", "&6World generation finished!"), - MISC_NEXT_PAGE("Misc_NextPage", "&6&lNEXT PAGE"), - MISC_NO("Misc_No", "&4[ NO ]"), - MISC_OKAY("Misc_Okay", "&a[ OK ]"), - MISC_PREVIOUS_PAGE("Misc_PreviousPage", "&6&lPREVIOUS PAGE"), - MISC_UNLIMITED("Misc_Unlimited", "unlimited"), - MISC_YES("Misc_Yes", "&a[ YES ]"), - PLAYER_BLOCK_INFO("Player_BlockInfo", "&6Block ID: &2&v1"), - PLAYER_CHECKPOINT_REACHED("Player_CheckpointReached", "&6Checkpoint reached!"), - PLAYER_DEATH("Player_Death", "&4&v1 &6died and has &4&v2 &6lives left."), - PLAYER_DEATH_KICK("Player_DeathKick", "&2&v1 &6lost his last life and was kicked."), - PLAYER_FINISHED_DUNGEON("Player_FinishedDungeon", "&6You successfully finished the dungeon!"), - PLAYER_FINISHED_FLOOR("Player_Finished_Floor", "&6You successfully finished the floor."), - PLAYER_INVITED("Player_Invited", "&4&v1&6 invited you to the group &4&v2&6."), - PLAYER_UNINVITED("Player_Uninvited", "&4&v1&6 took back your invitation to the group &4&v2&6."), - PLAYER_JOIN_GROUP("Player_JoinGroup", "&6You successfully joined the group!"), - PLAYER_KICKED("Player_Kicked", "&4You have been kicked out of the group &6&v1&4."), - PLAYER_KILLED("Player_Killed", "&4&v1 &6was killed by &4&v2 &6and has &4&v3 &6lives left."), - PLAYER_KILLED_KICK("Player_KilledKick", "&4&v1&6 was killed by &4&v2 &6and lost his last life."), - PLAYER_LEAVE_GROUP("Player_LeaveGroup", "&6You have successfully left your group!"), - PLAYER_LEFT_GROUP("Player_LeftGroup", "&6Player &4&v1&6 has left the Group!"), - PLAYER_LIVES_ADDED("Player_LivesAdded", "&6Received a bonus of &4&v1&6 lives."), - PLAYER_LIVES_REMOVED("Player_LivesRemoved", "&6You lost &4&v1&6 lives!"), - PLAYER_LOOT_ADDED("Player_LootAdded", "&4&v1&6 have been added to your reward inventory!"), - PLAYER_NEW_CAPTAIN("Player_NewCaptain", "&6You are now the new captain of your group."), - PLAYER_OFFLINE("Player_Offline", "&Player &4&v1&6 went offline. In &4&v2&6 seconds he will autmatically be kicked from the dungeon!"), - PLAYER_OFFLINE_NEVER("Player_OfflineNever", "&6The player &4&v1&6 went offline. He will &4not&6 be kicked from the dungeon automatically!"), - PLAYER_PORTAL_ABORT("Player_PortalAbort", "&6Portal creation cancelled!"), - PLAYER_PORTAL_INTRODUCTION("Player_PortalIntroduction", "&6Click the two edges of the portal with the wooden sword!"), - PLAYER_PORTAL_CREATED("Player_PortalCreated", "&6Portal created!"), - PLAYER_PORTAL_PROGRESS("Player_PortalProgress", "&6First edge successfully marked. You may now click at the other edge."), - PLAYER_PROTECTED_BLOCK_DELETED("Player_ProtectedBlockDeleted", "&6Successfully removed the protection."), - PLAYER_READY("Player_Ready", "&6You are now ready to start the dungeon."), - PLAYER_SIGN_CREATED("Player_SignCreated", "&6Successfully created a dungeon sign."), - PLAYER_SIGN_COPIED("Player_SignCopied", "&6Sign data copied."), - PLAYER_TIME_LEFT("Player_TimeLeft", "&v1You have &6&v2 &v1seconds left to finish the dungeon!"), - PLAYER_TIME_KICK("Player_TimeKick", "&2&v1&6's time expired."), - PLAYER_TREASURES("Player_Treasures", "&1Treasures"), - PLAYER_WAIT_FOR_OTHER_PLAYERS("Player_WaitForOtherPlayers", "&6Waiting for team members..."), - REQUIREMENT_FEE("Requirement_Fee", "&6You have been charged &4&v1 &6for entering the dungeon."), - REWARD_GENERAL("Reward_General", "&6You received &4&v1 &6for finishing the dungeon."), - SETTINGS_ANNOUNCEMENTS_1("Settings_Announcements1", "&fToggles personal"), - SETTINGS_ANNOUNCEMENTS_2("Settings_Announcements2", "&fgame announcements."), - SETTINGS_BREAK_1("Settings_Break1", "&fAllows you to break blocks"), - SETTINGS_BREAK_2("Settings_Break2", "&fprotected by DungeonsXL."), - SETTINGS_CHAT_SPY1("Settings_ChatSpy1", "&fAllows you to receive"), - SETTINGS_CHAT_SPY2("Settings_ChatSpy2", "&fall dungeon chat messages."), - SETTINGS_TITLE("Settings_Title", "&4Settings: &o"), - SETTINGS_TITLE_EDIT("Settings_Title_Edit", "Dungeon Setup"), - SETTINGS_TITLE_GLOBAL("Settings_Title_Global", "Global Configuration"), - SETTINGS_TITLE_PLAYER("Settings_Title_Player", "Player"), - SIGN_END("sign.end", "&2END"), - SIGN_FLOOR_1("sign.floor.1", "&2ENTER"), - SIGN_FLOOR_2("sign.floor.2", "&2NEXT FLOOR"), - SIGN_GLOBAL_FULL("sign.global.full", "&4FULL"), - SIGN_GLOBAL_IS_PLAYING("sign.global.isPlaying", "&4IS PLAYING"), - SIGN_GLOBAL_JOIN_GAME("sign.global.joinGame", "&2JOIN GAME"), - SIGN_GLOBAL_JOIN_GROUP("sign.global.joinGroup", "&2JOIN GROUP"), - SIGN_GLOBAL_NEW_GAME("sign.global.newGame", "&2NEW GAME"), - SIGN_GLOBAL_NEW_GROUP("sign.global.newGroup", "&2NEW GROUP"), - SIGN_LEAVE("sign.leave", "&2LEAVE"), - SIGN_READY("sign.ready", "&2READY"), - SIGN_RESOURCE_PACK("sign.resourcePack", "&2DOWNLOAD"), - SIGN_WAVE_1("sign.wave.1", "&2START"), - SIGN_WAVE_2("sign.wave.2", "&2NEXT WAVE"); + ANNOUNCER_CLICK("announcer.click"), + CMD_BREAK_BREAK_MODE("cmd.break.breakMode"), + CMD_BREAK_HELP("cmd.break.help"), + CMD_BREAK_PROTECTED_MODE("cmd.break.protectedMode"), + CMD_CHAT_HELP("cmd.chat.help"), + CMD_CHAT_DUNGEON_CHAT("cmd.chat.dungeonChat"), + CMD_CHAT_NORMAL_CHAT("cmd.chat.normalChat"), + CMD_CHATSPY_HELP("cmd.chatspy.help"), + CMD_CHATSPY_STOPPED("cmd.chatspy.stopped"), + CMD_CHATSPY_STARTED("cmd.chatspy.started"), + CMD_CREATE_HELP("cmd.create.help"), + CMD_DELETE_BACKUPS("cmd.delete.backups"), + CMD_DELETE_HELP("cmd.delete.help"), + CMD_DELETE_SUCCESS("cmd.delete.success"), + CMD_DUNGEON_ITEM_HELP("cmd.dungeonItem.help"), + CMD_DUNGEON_ITEM_DUNGEON_ITEM_HELP("cmd.dungeonItem.dungeonItemHelp"), + CMD_DUNGEON_ITEM_GLOBAL_ITEM_HELP("cmd.dungeonItem.globalItemHelp"), + CMD_DUNGEON_ITEM_INFO_DUNGEON("cmd.dungeonItem.info.dungeon"), + CMD_DUNGEON_ITEM_INFO_GLOBAL("cmd.dungeonItem.info.global"), + CMD_DUNGEON_ITEM_SET_DUNGEON("cmd.dungeonItem.set.dungeon"), + CMD_DUNGEON_ITEM_SET_GLOBAL("cmd.dungeonItem.set.global"), + CMD_EDIT_HELP("cmd.edit.help"), + CMD_ENTER_HELP("cmd.enter.help"), + CMD_ENTER_SUCCESS("cmd.enter.success"), + CMD_ESCAPE_HELP("cmd.escape.help"), + CMD_GAME_HELP("cmd.game.help"), + CMD_GROUP_HELP_MAIN("cmd.group.help.main"), + CMD_GROUP_HELP_CREATE("cmd.group.help.create"), + CMD_GROUP_HELP_DISBAND("cmd.group.help.disband"), + CMD_GROUP_HELP_INVITE("cmd.group.help.invite"), + CMD_GROUP_HELP_JOIN("cmd.group.help.join"), + CMD_GROUP_HELP_KICK("cmd.group.help.kick"), + CMD_GROUP_HELP_SHOW("cmd.group.help.show"), + CMD_GROUP_HELP_UNINVITE("cmd.group.help.uninvite"), + CMD_HELP_HELP("cmd.help.help"), + CMD_IMPORT_HELP("cmd.import.help"), + CMD_IMPORT_SUCCESS("cmd.import.success"), + CMD_INVITE_HELP("cmd.invite.help"), + CMD_INVITE_SUCCESS("cmd.invite.success"), + CMD_JOIN_HELP("cmd.join.help"), + CMD_KICK_HELP("cmd.kick.help"), + CMD_KICK_SUCCESS("cmd.kick.success"), + CMD_LEAVE_HELP("cmd.leave.help"), + CMD_LEAVE_SUCCESS("cmd.leave.success"), + CMD_LIST_HELP("cmd.list.help"), + CMD_LIVES_GROUP("cmd.lives.group"), + CMD_LIVES_HELP("cmd.lives.help"), + CMD_LIVES_PLAYER("cmd.lives.player"), + CMD_MAIN_WELCOME("cmd.main.welcome"), + CMD_MAIN_LOADED("cmd.main.loaded"), + CMD_MAIN_COMPATIBILITY("cmd.main.compatibility"), + CMD_MAIN_HELP("cmd.main.help"), + CMD_MAIN_HELP_INFO("cmd.main.helpInfo"), + CMD_MSG_ADDED("cmd.msg.added"), + CMD_MSG_HELP("cmd.msg.help"), + CMD_MSG_UPDATED("cmd.msg.updated"), + CMD_PORTAL_HELP("cmd.portal.help"), + CMD_PLAY_HELP("cmd.play.help"), + CMD_RELOAD_HELP("cmd.reload.help"), + CMD_RELOAD_SUCCESS("cmd.reload.success"), + CMD_RELOAD_PLAYERS("cmd.reload.players"), + CMD_RENAME_HELP("cmd.rename.help"), + CMD_RENAME_SUCCESS("cmd.rename.success"), + CMD_RESOURCE_PACK_HELP("cmd.resourcePack.help"), + CMD_SAVE_HELP("cmd.save.help"), + CMD_SAVE_SUCCESS("cmd.save.success"), + CMD_STATUS_HELP("cmd.status.help"), + CMD_TEST_HELP("cmd.test.help"), + CMD_UNINVITE_HELP("cmd.uninvite.help"), + CMD_UNINVITE_SUCCESS("cmd.uninvite.success"), + ERROR_BED("error.bed"), + ERROR_CHEST_IS_OPENED("error.chestIsOpened"), + ERROR_CMD("error.cmd"), + ERROR_COOLDOWN("error.cooldown"), + ERROR_DISPENSER("error.dispenser"), + ERROR_DROP("error.drop"), + ERROR_ENDERCHEST("error.enderchest"), + ERROR_IN_GROUP("error.inGroup"), + ERROR_JOIN_GROUP("error.joinGroup"), + ERROR_LEAVE_DUNGEON("error.leaveDungeon"), + ERROR_LEAVE_GAME("error.leaveGame"), + ERROR_LEAVE_GROUP("error.leaveGroup"), + ERROR_MSG_ID_NOT_EXIST("error.msgIdDoesNotExist"), + ERROR_MSG_FORMAT("error.msgFormat"), + ERROR_MSG_NO_INT("error.msgNoInt"), + ERROR_NAME_IN_USE("error.nameInUse"), + ERROR_NAME_TOO_LONG("error.nameTooLong"), + ERROR_NO_GAME("error.noGame"), + ERROR_NO_ITEM_IN_MAIN_HAND("error.noItemInMainHand"), + ERROR_NO_LEAVE_IN_TUTORIAL("error.noLeaveInTutorial"), + ERROR_NO_PERMISSIONS("error.noPermissions"), + ERROR_NO_PROTECTED_BLOCK("error.noProtectedBlock"), + ERROR_NO_REWARDS_TIME("error.noRewardsTime"), + ERROR_NO_SUCH_DUNGEON("error.noSuchDungeon"), + ERROR_NO_SUCH_GROUP("error.noSuchGroup"), + ERROR_NO_SUCH_MAP("error.noSuchMap"), + ERROR_NO_SUCH_PLAYER("error.noSuchPlayer"), + ERROR_NO_SUCH_RESOURCE_PACK("error.noSuchResourcePack"), + ERROR_NO_SUCH_SHOP("error.noSuchShop"), + ERROR_NOT_IN_DUNGEON("error.notInDungeon"), + ERROR_NOT_IN_GAME("error.notInGame"), + ERROR_NOT_IN_GROUP("error.notInGroup"), + ERROR_NOT_INVITED("error.notInvited"), + ERROR_NOT_LEADER("error.notLeader"), + ERROR_NOT_SAVED("error.notSaved"), + ERROR_BLOCK_OWN_TEAM("error.blockOwnTeam"), + ERROR_READY("error.ready"), + ERROR_REQUIREMENTS("error.requirements"), + ERROR_SELF_NOT_IN_GROUP("error.selfNotInGroup"), + ERROR_SIGN_WRONG_FORMAT("error.signWrongFormat"), + ERROR_TOO_MANY_INSTANCES("error.tooManyInstances"), + ERROR_TOO_MANY_TUTORIALS("error.tooManyTutorials"), + ERROR_TUTORIAL_DOES_NOT_EXIST("error.tutorialDoesNotExist"), + GROUP_BED_DESTROYED("group.bedDestroyed"), + GROUP_CONGRATS("group.congrats"), + GROUP_CONGRATS_SUB("group.congratsSub"), + GROUP_CREATED("group.create"), + GROUP_DEATH("group.death"), + GROUP_DEATH_KICK("group.deathKick"), + GROUP_DEFEATED("group.defeated"), + GROUP_DISBANDED("group.disbanded"), + GROUP_FLAG_CAPTURED("group.flagCaptured"), + GROUP_FLAG_LOST("group.flagLost"), + GROUP_FLAG_STEALING("group.flagStealing"), + GROUP_INVITED_PLAYER("group.invitedPlayer"), + GROUP_JOINED_GAME("group.joinedGame"), + GROUP_KILLED("group.killed"), + GROUP_KILLED_KICK("group.killedKick"), + GROUP_LIVES_ADDED("group.livesAdded"), + GROUP_LIVES_REMOVED("group.livesRemoved"), + GROUP_KICKED_PLAYER("group.kickedPlayer"), + GROUP_PLAYER_JOINED("group.playerJoined"), + GROUP_REWARD_CHEST("group.rewardChest"), + GROUP_UNINVITED_PLAYER("group.uninvitedPlayer"), + GROUP_WAVE_FINISHED("group.waveFinished"), + MISC_NO("misc.no"), + MISC_OKAY("misc.okay"), + MISC_UNLIMITED("misc.unlimited"), + MISC_YES("misc.yes"), + PLAYER_BLOCK_INFO("player.blockInfo"), + PLAYER_CHECKPOINT_REACHED("player.checkpointReached"), + PLAYER_DEATH("player.death"), + PLAYER_DEATH_KICK("player.deathKick"), + PLAYER_FINISHED_DUNGEON("player.finishedDungeon"), + PLAYER_FINISHED_FLOOR("player.finished_Floor"), + PLAYER_INVITED("player.invited"), + PLAYER_UNINVITED("player.uninvited"), + PLAYER_JOIN_GROUP("player.joinGroup"), + PLAYER_KICKED("player.kicked"), + PLAYER_KILLED("player.killed"), + PLAYER_KILLED_KICK("player.killedKick"), + PLAYER_LEAVE_GROUP("player.leaveGroup"), + PLAYER_LEFT_GROUP("player.leftGroup"), + PLAYER_LIVES_ADDED("player.livesAdded"), + PLAYER_LIVES_REMOVED("player.livesRemoved"), + PLAYER_LOOT_ADDED("player.lootAdded"), + PLAYER_NEW_LEADER("player.newLeader"), + PLAYER_OFFLINE("player.offline"), + PLAYER_OFFLINE_NEVER("player.offlineNever"), + PLAYER_PORTAL_ABORT("player.portalAbort"), + PLAYER_PORTAL_INTRODUCTION("player.portalIntroduction"), + PLAYER_PORTAL_CREATED("player.portalCreated"), + PLAYER_PORTAL_PROGRESS("player.portalProgress"), + PLAYER_PROTECTED_BLOCK_DELETED("player.protectedBlockDeleted"), + PLAYER_READY("player.ready"), + PLAYER_SIGN_CREATED("player.signCreated"), + PLAYER_SIGN_COPIED("player.signCopied"), + PLAYER_TIME_LEFT("player.timeLeft"), + PLAYER_TIME_KICK("player.timeKick"), + PLAYER_TREASURES("player.treasures"), + PLAYER_WAIT_FOR_OTHER_PLAYERS("player.waitForOtherPlayers"), + REQUIREMENT_FEE("requirement.fee"), + REWARD_GENERAL("reward.general"), + SIGN_END("sign.end"), + SIGN_FLOOR_1("sign.floor.1"), + SIGN_FLOOR_2("sign.floor.2"), + SIGN_GLOBAL_FULL("sign.global.full"), + SIGN_GLOBAL_IS_PLAYING("sign.global.isPlaying"), + SIGN_GLOBAL_JOIN_GAME("sign.global.joinGame"), + SIGN_GLOBAL_JOIN_GROUP("sign.global.joinGroup"), + SIGN_GLOBAL_NEW_GAME("sign.global.newGame"), + SIGN_GLOBAL_NEW_GROUP("sign.global.newGroup"), + SIGN_LEAVE("sign.leave"), + SIGN_READY("sign.ready"), + SIGN_RESOURCE_PACK("sign.resourcePack"), + SIGN_WAVE_1("sign.wave.1"), + SIGN_WAVE_2("sign.wave.2"); - private String identifier; - private String message; + private String path; - DMessage(String identifier, String message) { - this.identifier = identifier; - this.message = message; - } - - /* Getters and setters */ - @Override - public String getIdentifier() { - return identifier; + DMessage(String path) { + this.path = path; } @Override - public String getRaw() { - return message; - } - - @Override - public void setMessage(String message) { - this.message = message; - } - - /* Statics */ - /** - * @param identifier the identifier to set - * @return the message - */ - public static Message getByIdentifier(String identifier) { - for (Message message : values()) { - if (message.getIdentifier().equals(identifier)) { - return message; - } - } - return null; - } - - /** - * @return a FileConfiguration containing all messages - */ - public static FileConfiguration toConfig() { - FileConfiguration config = new YamlConfiguration(); - for (DMessage message : values()) { - config.set(message.getIdentifier(), message.message); - } - return config; + public String getPath() { + return path; } } diff --git a/core/src/main/java/de/erethon/dungeonsxl/config/MainConfig.java b/core/src/main/java/de/erethon/dungeonsxl/config/MainConfig.java index 809105f2..3d32ac0e 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/config/MainConfig.java +++ b/core/src/main/java/de/erethon/dungeonsxl/config/MainConfig.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,9 +19,9 @@ package de.erethon.dungeonsxl.config; import de.erethon.commons.config.DREConfig; import de.erethon.commons.misc.EnumUtil; import de.erethon.dungeonsxl.DungeonsXL; +import de.erethon.dungeonsxl.api.player.PlayerGroup.Color; +import static de.erethon.dungeonsxl.api.player.PlayerGroup.Color.*; import de.erethon.dungeonsxl.dungeon.Dungeon; -import de.erethon.dungeonsxl.util.DColor; -import static de.erethon.dungeonsxl.util.DColor.*; import de.erethon.dungeonsxl.world.WorldConfig; import java.io.File; import java.io.IOException; @@ -68,7 +68,7 @@ public class MainConfig extends DREConfig { private String tutorialEndGroup = "player"; /* Announcers */ - private List groupColorPriority = new ArrayList<>(Arrays.asList( + private List groupColorPriority = new ArrayList<>(Arrays.asList( DARK_BLUE, LIGHT_RED, YELLOW, @@ -281,7 +281,7 @@ public class MainConfig extends DREConfig { /** * @return the group colors */ - public List getGroupColorPriority() { + public List getGroupColorPriority() { return groupColorPriority; } @@ -289,14 +289,14 @@ public class MainConfig extends DREConfig { * @param count the group count * @return the group color for the count */ - public DColor getGroupColorPriority(int count) { - return (count < groupColorPriority.size() && count >= 0) ? groupColorPriority.get(count) : DColor.WHITE; + public Color getGroupColorPriority(int count) { + return (count < groupColorPriority.size() && count >= 0) ? groupColorPriority.get(count) : Color.WHITE; } /** * @param colors the colors to set */ - public void setGroupColorPriority(List colors) { + public void setGroupColorPriority(List colors) { groupColorPriority = colors; } @@ -510,7 +510,7 @@ public class MainConfig extends DREConfig { if (!config.contains("groupColorPriority")) { ArrayList strings = new ArrayList<>(); - for (DColor color : groupColorPriority) { + for (Color color : groupColorPriority) { strings.add(color.toString()); } config.set("groupColorPriority", strings); @@ -579,6 +579,7 @@ public class MainConfig extends DREConfig { @Override public void load() { language = config.getString("language", language); + plugin.getMessageHandler().setDefaultLanguage(language); enableEconomy = config.getBoolean("enableEconomy", enableEconomy); chatEnabled = config.getBoolean("chatEnabled", chatEnabled); chatFormatEdit = config.getString("chatFormat.edit", chatFormatEdit); @@ -593,7 +594,7 @@ public class MainConfig extends DREConfig { if (config.getStringList("groupColorPriority").size() < 14) { ArrayList strings = new ArrayList<>(); - for (DColor color : groupColorPriority) { + for (Color color : groupColorPriority) { strings.add(color.toString()); } config.set("groupColorPriority", strings); @@ -605,8 +606,8 @@ public class MainConfig extends DREConfig { } else { groupColorPriority.clear(); for (String color : config.getStringList("groupColorPriority")) { - DColor dColor = EnumUtil.getEnum(DColor.class, color); - if (dColor != null && dColor != DColor.WHITE) { + Color dColor = EnumUtil.getEnum(Color.class, color); + if (dColor != null && dColor != Color.WHITE) { groupColorPriority.add(dColor); } } diff --git a/core/src/main/java/de/erethon/dungeonsxl/dungeon/Dungeon.java b/core/src/main/java/de/erethon/dungeonsxl/dungeon/Dungeon.java index b81ffb72..b4de713f 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/dungeon/Dungeon.java +++ b/core/src/main/java/de/erethon/dungeonsxl/dungeon/Dungeon.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/dungeon/DungeonCache.java b/core/src/main/java/de/erethon/dungeonsxl/dungeon/DungeonCache.java index eec4ec5e..97320fec 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/dungeon/DungeonCache.java +++ b/core/src/main/java/de/erethon/dungeonsxl/dungeon/DungeonCache.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,7 +18,6 @@ package de.erethon.dungeonsxl.dungeon; import de.erethon.commons.chat.MessageUtil; import de.erethon.dungeonsxl.DungeonsXL; -import de.erethon.dungeonsxl.config.DMessage; import de.erethon.dungeonsxl.world.DResourceWorld; import java.io.File; import java.util.ArrayList; @@ -51,7 +50,8 @@ public class DungeonCache { dungeons.add(dungeon); } else { - MessageUtil.log(DMessage.LOG_ERROR_DUNGEON_SETUP.getMessage(file.getName())); + MessageUtil.log(plugin, "&4The setup of dungeon &6" + file.getName() + + "&4 is incorrect. See https://github.com/DRE2N/DungeonsXL/wiki/dungeon-configuration for reference."); } } } diff --git a/core/src/main/java/de/erethon/dungeonsxl/dungeon/DungeonConfig.java b/core/src/main/java/de/erethon/dungeonsxl/dungeon/DungeonConfig.java index 902ff918..5dcaaab5 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/dungeon/DungeonConfig.java +++ b/core/src/main/java/de/erethon/dungeonsxl/dungeon/DungeonConfig.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/DataReloadEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/DataReloadEvent.java index 85a8ecd0..46a2cc44 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/DataReloadEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/DataReloadEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupCreateEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupCreateEvent.java index a9cbdf64..910e9e8e 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupCreateEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupCreateEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupDisbandEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupDisbandEvent.java index c75483fe..2e564f90 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupDisbandEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupDisbandEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupEvent.java index 1df8131c..a01c3a9d 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupFinishDungeonEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupFinishDungeonEvent.java index f18fdd04..426f7477 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupFinishDungeonEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupFinishDungeonEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupFinishFloorEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupFinishFloorEvent.java index 4afa0ce8..79d95206 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupFinishFloorEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupFinishFloorEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupScoreEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupScoreEvent.java index 22971283..7b5c54f7 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupScoreEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupScoreEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupStartFloorEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupStartFloorEvent.java index 2acab708..244320cd 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupStartFloorEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dgroup/DGroupStartFloorEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dmob/DMobDeathEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dmob/DMobDeathEvent.java index 2a3c616b..219acd57 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dmob/DMobDeathEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dmob/DMobDeathEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dmob/DMobEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dmob/DMobEvent.java index 6ad2b566..29b8a263 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dmob/DMobEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dmob/DMobEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dmob/DMobSpawnEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dmob/DMobSpawnEvent.java index cb8f49e1..5713d9cb 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dmob/DMobSpawnEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dmob/DMobSpawnEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/DPlayerEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/DPlayerEvent.java index 154604bf..560d04db 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/DPlayerEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/DPlayerEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/DPlayerJoinDGroupEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/DPlayerJoinDGroupEvent.java index fee317da..bfbd289e 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/DPlayerJoinDGroupEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/DPlayerJoinDGroupEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/DPlayerKickEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/DPlayerKickEvent.java index bc7fc84a..145ede46 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/DPlayerKickEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/DPlayerKickEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/DPlayerLeaveDGroupEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/DPlayerLeaveDGroupEvent.java index 5402e51a..a7e987ee 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/DPlayerLeaveDGroupEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/DPlayerLeaveDGroupEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/DInstancePlayerEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/DInstancePlayerEvent.java index 1979ab68..9af8c95b 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/DInstancePlayerEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/DInstancePlayerEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/DInstancePlayerUpdateEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/DInstancePlayerUpdateEvent.java index d6f20631..addd3492 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/DInstancePlayerUpdateEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/DInstancePlayerUpdateEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/edit/DEditPlayerEscapeEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/edit/DEditPlayerEscapeEvent.java index 9ec1ab35..12b992e2 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/edit/DEditPlayerEscapeEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/edit/DEditPlayerEscapeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/edit/DEditPlayerEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/edit/DEditPlayerEvent.java index 8ad5c16b..a2b5794a 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/edit/DEditPlayerEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/edit/DEditPlayerEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerDeathEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerDeathEvent.java index 260126ac..d92712d7 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerDeathEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerDeathEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerEscapeEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerEscapeEvent.java index 02a844ff..bd7d85b1 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerEscapeEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerEscapeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerEvent.java index c43fff8a..76a5df86 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerFinishEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerFinishEvent.java index 3f876c3b..b2491197 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerFinishEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerFinishEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerRewardEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerRewardEvent.java index fca20608..36228384 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerRewardEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dplayer/instance/game/DGamePlayerRewardEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dsign/DSignEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dsign/DSignEvent.java index d72df269..84946221 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dsign/DSignEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dsign/DSignEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/dsign/DSignRegistrationEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/dsign/DSignRegistrationEvent.java index 82b72b40..4320c7f6 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/dsign/DSignRegistrationEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/dsign/DSignRegistrationEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldEvent.java index 4072ef18..c1ddd47f 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldGenerateEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldGenerateEvent.java index 4e53e5c9..a3391e41 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldGenerateEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldGenerateEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldLoadEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldLoadEvent.java index 5e21524c..458516f9 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldLoadEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldLoadEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldSaveEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldSaveEvent.java index 1e418ec7..e0703f5d 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldSaveEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldSaveEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldUnloadEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldUnloadEvent.java index 82de2cfa..cbe32461 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldUnloadEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/editworld/EditWorldUnloadEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/gameworld/GameWorldEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/gameworld/GameWorldEvent.java index 641a6705..84366416 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/gameworld/GameWorldEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/gameworld/GameWorldEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/gameworld/GameWorldLoadEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/gameworld/GameWorldLoadEvent.java index 5d2a0606..0d562bb9 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/gameworld/GameWorldLoadEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/gameworld/GameWorldLoadEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/gameworld/GameWorldStartGameEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/gameworld/GameWorldStartGameEvent.java index 44825da5..3c2f789b 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/gameworld/GameWorldStartGameEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/gameworld/GameWorldStartGameEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/gameworld/GameWorldUnloadEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/gameworld/GameWorldUnloadEvent.java index 5a34c0c2..e2741281 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/gameworld/GameWorldUnloadEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/gameworld/GameWorldUnloadEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/requirement/RequirementCheckEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/requirement/RequirementCheckEvent.java index ec930c4e..3eea08a1 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/requirement/RequirementCheckEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/requirement/RequirementCheckEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/requirement/RequirementDemandEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/requirement/RequirementDemandEvent.java index 8c09ced0..8ac433e5 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/requirement/RequirementDemandEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/requirement/RequirementDemandEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/requirement/RequirementEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/requirement/RequirementEvent.java index 52dd7ce7..1ef707df 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/requirement/RequirementEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/requirement/RequirementEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/requirement/RequirementRegistrationEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/requirement/RequirementRegistrationEvent.java index f0c0ff0b..67218aa7 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/requirement/RequirementRegistrationEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/requirement/RequirementRegistrationEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/reward/RewardAdditionEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/reward/RewardAdditionEvent.java index 54a15417..4d8497cb 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/reward/RewardAdditionEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/reward/RewardAdditionEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/reward/RewardEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/reward/RewardEvent.java index bc5fa0c7..9ccf7fa0 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/reward/RewardEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/reward/RewardEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/reward/RewardRegistrationEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/reward/RewardRegistrationEvent.java index 2e722862..a3bbf517 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/reward/RewardRegistrationEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/reward/RewardRegistrationEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/trigger/TriggerActionEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/trigger/TriggerActionEvent.java index 8a1886d6..459da286 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/trigger/TriggerActionEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/trigger/TriggerActionEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/trigger/TriggerEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/trigger/TriggerEvent.java index d9887bca..c9ce3910 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/trigger/TriggerEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/trigger/TriggerEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/event/trigger/TriggerRegistrationEvent.java b/core/src/main/java/de/erethon/dungeonsxl/event/trigger/TriggerRegistrationEvent.java index b2901518..b9f1d4da 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/event/trigger/TriggerRegistrationEvent.java +++ b/core/src/main/java/de/erethon/dungeonsxl/event/trigger/TriggerRegistrationEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/game/Game.java b/core/src/main/java/de/erethon/dungeonsxl/game/Game.java index 0fc1a6f5..2a0825bf 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/game/Game.java +++ b/core/src/main/java/de/erethon/dungeonsxl/game/Game.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/game/GameGoal.java b/core/src/main/java/de/erethon/dungeonsxl/game/GameGoal.java index ddeb596f..60fc85a2 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/game/GameGoal.java +++ b/core/src/main/java/de/erethon/dungeonsxl/game/GameGoal.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/game/GameRuleProvider.java b/core/src/main/java/de/erethon/dungeonsxl/game/GameRuleProvider.java index 0a2c09d1..b6400a54 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/game/GameRuleProvider.java +++ b/core/src/main/java/de/erethon/dungeonsxl/game/GameRuleProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/game/GameType.java b/core/src/main/java/de/erethon/dungeonsxl/game/GameType.java index ba4a191d..7cebfb79 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/game/GameType.java +++ b/core/src/main/java/de/erethon/dungeonsxl/game/GameType.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/game/GameTypeCache.java b/core/src/main/java/de/erethon/dungeonsxl/game/GameTypeCache.java index e6458739..da478b9b 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/game/GameTypeCache.java +++ b/core/src/main/java/de/erethon/dungeonsxl/game/GameTypeCache.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/game/GameTypeDefault.java b/core/src/main/java/de/erethon/dungeonsxl/game/GameTypeDefault.java index e64553d4..f562fc5b 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/game/GameTypeDefault.java +++ b/core/src/main/java/de/erethon/dungeonsxl/game/GameTypeDefault.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/global/DPortal.java b/core/src/main/java/de/erethon/dungeonsxl/global/DPortal.java index 132b41f7..f05ce74b 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/global/DPortal.java +++ b/core/src/main/java/de/erethon/dungeonsxl/global/DPortal.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -246,7 +246,7 @@ public class DPortal extends GlobalProtection { } if (target == null) { - MessageUtil.sendMessage(player, DMessage.ERROR_DUNGEON_NOT_EXIST.getMessage()); + MessageUtil.sendMessage(player, DMessage.ERROR_NO_SUCH_DUNGEON.getMessage()); return; } diff --git a/core/src/main/java/de/erethon/dungeonsxl/global/GameSign.java b/core/src/main/java/de/erethon/dungeonsxl/global/GameSign.java index ac5e3fa7..857f1f00 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/global/GameSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/global/GameSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -129,7 +129,7 @@ public class GameSign extends JoinSign { return; } if (!dGroup.getCaptain().equals(player)) { - MessageUtil.sendMessage(player, DMessage.ERROR_NOT_CAPTAIN.getMessage()); + MessageUtil.sendMessage(player, DMessage.ERROR_NOT_LEADER.getMessage()); return; } diff --git a/core/src/main/java/de/erethon/dungeonsxl/global/GlobalData.java b/core/src/main/java/de/erethon/dungeonsxl/global/GlobalData.java index ee207116..321b51bd 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/global/GlobalData.java +++ b/core/src/main/java/de/erethon/dungeonsxl/global/GlobalData.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/global/GlobalProtection.java b/core/src/main/java/de/erethon/dungeonsxl/global/GlobalProtection.java index 0bbabbf6..babed504 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/global/GlobalProtection.java +++ b/core/src/main/java/de/erethon/dungeonsxl/global/GlobalProtection.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/global/GlobalProtectionCache.java b/core/src/main/java/de/erethon/dungeonsxl/global/GlobalProtectionCache.java index 7e921fe0..90356ef6 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/global/GlobalProtectionCache.java +++ b/core/src/main/java/de/erethon/dungeonsxl/global/GlobalProtectionCache.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/global/GlobalProtectionListener.java b/core/src/main/java/de/erethon/dungeonsxl/global/GlobalProtectionListener.java index 7197ab47..ae62d899 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/global/GlobalProtectionListener.java +++ b/core/src/main/java/de/erethon/dungeonsxl/global/GlobalProtectionListener.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/global/GroupSign.java b/core/src/main/java/de/erethon/dungeonsxl/global/GroupSign.java index 8f1232aa..d3c8c0cd 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/global/GroupSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/global/GroupSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/global/JoinSign.java b/core/src/main/java/de/erethon/dungeonsxl/global/JoinSign.java index 00bcf6d5..bc0acf5d 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/global/JoinSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/global/JoinSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/global/LeaveSign.java b/core/src/main/java/de/erethon/dungeonsxl/global/LeaveSign.java index 9abdc04e..ef13ca31 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/global/LeaveSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/global/LeaveSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/global/UnloadedProtection.java b/core/src/main/java/de/erethon/dungeonsxl/global/UnloadedProtection.java index 909e36ac..4a286c80 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/global/UnloadedProtection.java +++ b/core/src/main/java/de/erethon/dungeonsxl/global/UnloadedProtection.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/mob/CitizensMobProvider.java b/core/src/main/java/de/erethon/dungeonsxl/mob/CitizensMobProvider.java index 0d3f7db1..3887ebbd 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/mob/CitizensMobProvider.java +++ b/core/src/main/java/de/erethon/dungeonsxl/mob/CitizensMobProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/mob/CustomExternalMobProvider.java b/core/src/main/java/de/erethon/dungeonsxl/mob/CustomExternalMobProvider.java index b250c9fb..f693c192 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/mob/CustomExternalMobProvider.java +++ b/core/src/main/java/de/erethon/dungeonsxl/mob/CustomExternalMobProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/mob/DMob.java b/core/src/main/java/de/erethon/dungeonsxl/mob/DMob.java index 3b139423..ccf9223d 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/mob/DMob.java +++ b/core/src/main/java/de/erethon/dungeonsxl/mob/DMob.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/mob/DMobListener.java b/core/src/main/java/de/erethon/dungeonsxl/mob/DMobListener.java index 5b89b3de..12b99767 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/mob/DMobListener.java +++ b/core/src/main/java/de/erethon/dungeonsxl/mob/DMobListener.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/mob/DMobType.java b/core/src/main/java/de/erethon/dungeonsxl/mob/DMobType.java index aedc0910..a01efc16 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/mob/DMobType.java +++ b/core/src/main/java/de/erethon/dungeonsxl/mob/DMobType.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,7 +23,6 @@ import de.erethon.commons.chat.MessageUtil; import de.erethon.commons.misc.EnumUtil; import de.erethon.commons.misc.NumberUtil; import de.erethon.dungeonsxl.DungeonsXL; -import de.erethon.dungeonsxl.config.DMessage; import de.erethon.dungeonsxl.world.DGameWorld; import java.io.File; import java.util.Arrays; @@ -163,7 +162,7 @@ public class DMobType extends ExMob { itemMeta.addEnchant(Enchantment.getByName(splittedEnchantment[0].toUpperCase()), 1, true); } } else { - MessageUtil.log(DMessage.LOG_ERROR_MOB_ENCHANTMENT.getMessage(splittedEnchantment[0])); + MessageUtil.log("&4An error occurred while loading mob.yml: Enchantment &6" + splittedEnchantment[0] + "&4 doesn''t exist!"); } } } diff --git a/core/src/main/java/de/erethon/dungeonsxl/mob/DNPCRegistry.java b/core/src/main/java/de/erethon/dungeonsxl/mob/DNPCRegistry.java index f4d4906c..2e311b86 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/mob/DNPCRegistry.java +++ b/core/src/main/java/de/erethon/dungeonsxl/mob/DNPCRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/mob/ExternalMobPlugin.java b/core/src/main/java/de/erethon/dungeonsxl/mob/ExternalMobPlugin.java index 0c5b0241..4cb4b95c 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/mob/ExternalMobPlugin.java +++ b/core/src/main/java/de/erethon/dungeonsxl/mob/ExternalMobPlugin.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/mob/ExternalMobProvider.java b/core/src/main/java/de/erethon/dungeonsxl/mob/ExternalMobProvider.java index 8c5aba4c..d9f2451e 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/mob/ExternalMobProvider.java +++ b/core/src/main/java/de/erethon/dungeonsxl/mob/ExternalMobProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/mob/ExternalMobProviderCache.java b/core/src/main/java/de/erethon/dungeonsxl/mob/ExternalMobProviderCache.java index bbe7bb53..0346c731 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/mob/ExternalMobProviderCache.java +++ b/core/src/main/java/de/erethon/dungeonsxl/mob/ExternalMobProviderCache.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/player/DClass.java b/core/src/main/java/de/erethon/dungeonsxl/player/DClass.java index 938cacb6..e7d59b44 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/player/DClass.java +++ b/core/src/main/java/de/erethon/dungeonsxl/player/DClass.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/player/DClassCache.java b/core/src/main/java/de/erethon/dungeonsxl/player/DClassCache.java index 4a8443ea..6379c7e7 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/player/DClassCache.java +++ b/core/src/main/java/de/erethon/dungeonsxl/player/DClassCache.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/player/DEditPlayer.java b/core/src/main/java/de/erethon/dungeonsxl/player/DEditPlayer.java index e00b352b..b2a46639 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/player/DEditPlayer.java +++ b/core/src/main/java/de/erethon/dungeonsxl/player/DEditPlayer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/player/DGamePlayer.java b/core/src/main/java/de/erethon/dungeonsxl/player/DGamePlayer.java index 09d0d9ce..569716e0 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/player/DGamePlayer.java +++ b/core/src/main/java/de/erethon/dungeonsxl/player/DGamePlayer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -540,7 +540,7 @@ public class DGamePlayer extends DInstancePlayer { } dGroup.setCaptain(newCaptain); if (message) { - MessageUtil.sendMessage(newCaptain, DMessage.PLAYER_NEW_CAPTAIN.getMessage()); + MessageUtil.sendMessage(newCaptain, DMessage.PLAYER_NEW_LEADER.getMessage()); } // ...*flies away* } diff --git a/core/src/main/java/de/erethon/dungeonsxl/player/DGlobalPlayer.java b/core/src/main/java/de/erethon/dungeonsxl/player/DGlobalPlayer.java index 9b4aed3f..9636ae55 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/player/DGlobalPlayer.java +++ b/core/src/main/java/de/erethon/dungeonsxl/player/DGlobalPlayer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -344,7 +344,7 @@ public class DGlobalPlayer implements PlayerWrapper { } catch (NullPointerException exception) { exception.printStackTrace(); player.setHealth(0); - MessageUtil.log(plugin, DMessage.LOG_KILLED_CORRUPTED_PLAYER.getMessage(player.getName())); + MessageUtil.log(plugin, "&4Killed player &6" + player.getName() + "&4 because the data to restore his main inventory is corrupted :("); } data.clearPlayerState(); @@ -356,7 +356,7 @@ public class DGlobalPlayer implements PlayerWrapper { public void startTutorial() { Dungeon dungeon = plugin.getMainConfig().getTutorialDungeon(); if (dungeon == null) { - MessageUtil.sendMessage(player, DMessage.ERROR_TUTORIAL_NOT_EXIST.getMessage()); + MessageUtil.sendMessage(player, DMessage.ERROR_TUTORIAL_DOES_NOT_EXIST.getMessage()); return; } diff --git a/core/src/main/java/de/erethon/dungeonsxl/player/DGroup.java b/core/src/main/java/de/erethon/dungeonsxl/player/DGroup.java index 61b76f0b..19f517bd 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/player/DGroup.java +++ b/core/src/main/java/de/erethon/dungeonsxl/player/DGroup.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ package de.erethon.dungeonsxl.player; import de.erethon.commons.chat.MessageUtil; import de.erethon.commons.player.PlayerCollection; import de.erethon.dungeonsxl.DungeonsXL; +import de.erethon.dungeonsxl.api.player.PlayerGroup.Color; import de.erethon.dungeonsxl.config.DMessage; import de.erethon.dungeonsxl.dungeon.Dungeon; import de.erethon.dungeonsxl.dungeon.DungeonConfig; @@ -33,7 +34,6 @@ import de.erethon.dungeonsxl.game.Game; import de.erethon.dungeonsxl.game.GameRuleProvider; import de.erethon.dungeonsxl.requirement.Requirement; import de.erethon.dungeonsxl.reward.Reward; -import de.erethon.dungeonsxl.util.DColor; import de.erethon.dungeonsxl.world.DGameWorld; import de.erethon.dungeonsxl.world.DResourceWorld; import java.util.ArrayList; @@ -73,7 +73,7 @@ public class DGroup { private List rewards = new ArrayList<>(); private BukkitTask timeIsRunningTask; private DResourceWorld nextFloor; - private DColor color; + private Color color; private int score = 0; private int initialLives = -1; private int lives = -1; @@ -82,7 +82,7 @@ public class DGroup { this(plugin, "Group#" + counter, player); } - public DGroup(DungeonsXL plugin, Player player, DColor color) { + public DGroup(DungeonsXL plugin, Player player, Color color) { this(plugin, color.toString() + "#" + counter, player); } @@ -170,7 +170,7 @@ public class DGroup { /** * @param color the color to fetch the name from */ - public void setName(DColor color) { + public void setName(Color color) { name = color.toString() + "#" + id; } @@ -554,18 +554,18 @@ public class DGroup { /** * @return the color that represents this group */ - public DColor getDColor() { + public Color getDColor() { if (color != null) { return color; } else { - return DColor.WHITE; + return Color.WHITE; } } /** * @param color the group color to set */ - public void setDColor(DColor color) { + public void setDColor(Color color) { this.color = color; } @@ -626,7 +626,7 @@ public class DGroup { /* Actions */ public boolean teleport() { if (dungeon == null || dungeon.getMap() == null) { - sendMessage(DMessage.ERROR_DUNGEON_NOT_EXIST.getMessage()); + sendMessage(DMessage.ERROR_NO_SUCH_DUNGEON.getMessage()); return false; } @@ -661,7 +661,7 @@ public class DGroup { } if (target == null) { - sendMessage(DMessage.ERROR_DUNGEON_NOT_EXIST.getMessage()); + sendMessage(DMessage.ERROR_NO_SUCH_DUNGEON.getMessage()); return false; } diff --git a/core/src/main/java/de/erethon/dungeonsxl/player/DGroupTag.java b/core/src/main/java/de/erethon/dungeonsxl/player/DGroupTag.java index 9c53befe..da300c39 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/player/DGroupTag.java +++ b/core/src/main/java/de/erethon/dungeonsxl/player/DGroupTag.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/player/DInstancePlayer.java b/core/src/main/java/de/erethon/dungeonsxl/player/DInstancePlayer.java index da7511e1..eaf85579 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/player/DInstancePlayer.java +++ b/core/src/main/java/de/erethon/dungeonsxl/player/DInstancePlayer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/player/DPermission.java b/core/src/main/java/de/erethon/dungeonsxl/player/DPermission.java index 3c0c7fba..8fe795d5 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/player/DPermission.java +++ b/core/src/main/java/de/erethon/dungeonsxl/player/DPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/player/DPlayerCache.java b/core/src/main/java/de/erethon/dungeonsxl/player/DPlayerCache.java index 527f7450..e0fc3451 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/player/DPlayerCache.java +++ b/core/src/main/java/de/erethon/dungeonsxl/player/DPlayerCache.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/player/DPlayerData.java b/core/src/main/java/de/erethon/dungeonsxl/player/DPlayerData.java index b558884a..ee12ec8a 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/player/DPlayerData.java +++ b/core/src/main/java/de/erethon/dungeonsxl/player/DPlayerData.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,7 +21,6 @@ import de.erethon.commons.compatibility.Internals; import de.erethon.commons.config.DREConfig; import de.erethon.commons.javaplugin.DREPlugin; import de.erethon.commons.misc.EnumUtil; -import de.erethon.dungeonsxl.config.DMessage; import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -463,7 +462,7 @@ public class DPlayerData extends DREConfig { if (!file.exists()) { try { file.createNewFile(); - MessageUtil.log(DREPlugin.getInstance(), DMessage.LOG_NEW_PLAYER_DATA.getMessage(file.getName())); + MessageUtil.log(DREPlugin.getInstance(), "&6A new player data file has been created and saved as " + file.getName()); } catch (IOException exception) { } } diff --git a/core/src/main/java/de/erethon/dungeonsxl/player/DPlayerListener.java b/core/src/main/java/de/erethon/dungeonsxl/player/DPlayerListener.java index c7d5a442..3ab53534 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/player/DPlayerListener.java +++ b/core/src/main/java/de/erethon/dungeonsxl/player/DPlayerListener.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -511,7 +511,7 @@ public class DPlayerListener implements Listener { if (worlds.getInstanceByWorld(toWorld) != null) { dPlayer.sendMessage(DMessage.ERROR_JOIN_GROUP.getMessage()); - dPlayer.sendMessage(ChatColor.GOLD + DMessage.HELP_CMD_ENTER.getMessage()); + dPlayer.sendMessage(ChatColor.GOLD + DMessage.CMD_ENTER_HELP.getMessage()); event.setCancelled(true); } } diff --git a/core/src/main/java/de/erethon/dungeonsxl/player/RespawnTask.java b/core/src/main/java/de/erethon/dungeonsxl/player/RespawnTask.java index 94a0823c..ea969b20 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/player/RespawnTask.java +++ b/core/src/main/java/de/erethon/dungeonsxl/player/RespawnTask.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/player/SecureModeTask.java b/core/src/main/java/de/erethon/dungeonsxl/player/SecureModeTask.java index 7746d4fc..1d5d6013 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/player/SecureModeTask.java +++ b/core/src/main/java/de/erethon/dungeonsxl/player/SecureModeTask.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/player/TimeIsRunningTask.java b/core/src/main/java/de/erethon/dungeonsxl/player/TimeIsRunningTask.java index d8930a8f..08511885 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/player/TimeIsRunningTask.java +++ b/core/src/main/java/de/erethon/dungeonsxl/player/TimeIsRunningTask.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/requirement/FeeLevelRequirement.java b/core/src/main/java/de/erethon/dungeonsxl/requirement/FeeLevelRequirement.java index 5d5ce667..f6123968 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/requirement/FeeLevelRequirement.java +++ b/core/src/main/java/de/erethon/dungeonsxl/requirement/FeeLevelRequirement.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/requirement/FeeMoneyRequirement.java b/core/src/main/java/de/erethon/dungeonsxl/requirement/FeeMoneyRequirement.java index beafb1b6..fd992c5c 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/requirement/FeeMoneyRequirement.java +++ b/core/src/main/java/de/erethon/dungeonsxl/requirement/FeeMoneyRequirement.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/requirement/ForbiddenItemsRequirement.java b/core/src/main/java/de/erethon/dungeonsxl/requirement/ForbiddenItemsRequirement.java index 5263ec21..f26b25d0 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/requirement/ForbiddenItemsRequirement.java +++ b/core/src/main/java/de/erethon/dungeonsxl/requirement/ForbiddenItemsRequirement.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/requirement/GroupSizeRequirement.java b/core/src/main/java/de/erethon/dungeonsxl/requirement/GroupSizeRequirement.java index 6af44fc8..99e3bae1 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/requirement/GroupSizeRequirement.java +++ b/core/src/main/java/de/erethon/dungeonsxl/requirement/GroupSizeRequirement.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/requirement/KeyItemsRequirement.java b/core/src/main/java/de/erethon/dungeonsxl/requirement/KeyItemsRequirement.java index c7d46426..7e3da6e3 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/requirement/KeyItemsRequirement.java +++ b/core/src/main/java/de/erethon/dungeonsxl/requirement/KeyItemsRequirement.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/requirement/PermissionRequirement.java b/core/src/main/java/de/erethon/dungeonsxl/requirement/PermissionRequirement.java index d9aaa6bd..53c4d234 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/requirement/PermissionRequirement.java +++ b/core/src/main/java/de/erethon/dungeonsxl/requirement/PermissionRequirement.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/requirement/Requirement.java b/core/src/main/java/de/erethon/dungeonsxl/requirement/Requirement.java index b9138ae4..e65ee614 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/requirement/Requirement.java +++ b/core/src/main/java/de/erethon/dungeonsxl/requirement/Requirement.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/requirement/RequirementType.java b/core/src/main/java/de/erethon/dungeonsxl/requirement/RequirementType.java index b8b84e38..294e36d4 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/requirement/RequirementType.java +++ b/core/src/main/java/de/erethon/dungeonsxl/requirement/RequirementType.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/requirement/RequirementTypeCache.java b/core/src/main/java/de/erethon/dungeonsxl/requirement/RequirementTypeCache.java index 34ae11ce..d6bdf07c 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/requirement/RequirementTypeCache.java +++ b/core/src/main/java/de/erethon/dungeonsxl/requirement/RequirementTypeCache.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/requirement/RequirementTypeDefault.java b/core/src/main/java/de/erethon/dungeonsxl/requirement/RequirementTypeDefault.java index e767fc7d..16a23ed3 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/requirement/RequirementTypeDefault.java +++ b/core/src/main/java/de/erethon/dungeonsxl/requirement/RequirementTypeDefault.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/reward/ItemReward.java b/core/src/main/java/de/erethon/dungeonsxl/reward/ItemReward.java index 2eeb1dc9..98d9b621 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/reward/ItemReward.java +++ b/core/src/main/java/de/erethon/dungeonsxl/reward/ItemReward.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/reward/LevelReward.java b/core/src/main/java/de/erethon/dungeonsxl/reward/LevelReward.java index adb57824..d79f7239 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/reward/LevelReward.java +++ b/core/src/main/java/de/erethon/dungeonsxl/reward/LevelReward.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/reward/MoneyReward.java b/core/src/main/java/de/erethon/dungeonsxl/reward/MoneyReward.java index 5e9d2362..44af3afd 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/reward/MoneyReward.java +++ b/core/src/main/java/de/erethon/dungeonsxl/reward/MoneyReward.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/reward/Reward.java b/core/src/main/java/de/erethon/dungeonsxl/reward/Reward.java index d8c15dcf..dfcbf508 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/reward/Reward.java +++ b/core/src/main/java/de/erethon/dungeonsxl/reward/Reward.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/reward/RewardListener.java b/core/src/main/java/de/erethon/dungeonsxl/reward/RewardListener.java index 211ebeeb..0ab64a21 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/reward/RewardListener.java +++ b/core/src/main/java/de/erethon/dungeonsxl/reward/RewardListener.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/reward/RewardType.java b/core/src/main/java/de/erethon/dungeonsxl/reward/RewardType.java index e2a14af3..b792c480 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/reward/RewardType.java +++ b/core/src/main/java/de/erethon/dungeonsxl/reward/RewardType.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/reward/RewardTypeCache.java b/core/src/main/java/de/erethon/dungeonsxl/reward/RewardTypeCache.java index 963ff4ed..2ac45d44 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/reward/RewardTypeCache.java +++ b/core/src/main/java/de/erethon/dungeonsxl/reward/RewardTypeCache.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/reward/RewardTypeDefault.java b/core/src/main/java/de/erethon/dungeonsxl/reward/RewardTypeDefault.java index 3897a182..9a7bdad6 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/reward/RewardTypeDefault.java +++ b/core/src/main/java/de/erethon/dungeonsxl/reward/RewardTypeDefault.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/BedSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/BedSign.java index 84c31fe3..af942f7c 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/BedSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/BedSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/BlockSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/BlockSign.java index 61043095..567de02a 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/BlockSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/BlockSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/BossShopSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/BossShopSign.java index 9c5c0b48..6e6c5046 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/BossShopSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/BossShopSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/CheckpointSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/CheckpointSign.java index 4a56aacb..b28f40b1 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/CheckpointSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/CheckpointSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/ChestSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/ChestSign.java index 7149932d..47e80756 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/ChestSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/ChestSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/CommandSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/CommandSign.java index 91196178..1d33be31 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/CommandSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/CommandSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/DSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/DSign.java index f4d9a4ba..b8c28488 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/DSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/DSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,7 +18,6 @@ package de.erethon.dungeonsxl.sign; import de.erethon.commons.chat.MessageUtil; import de.erethon.dungeonsxl.DungeonsXL; -import de.erethon.dungeonsxl.config.DMessage; import de.erethon.dungeonsxl.event.dsign.DSignRegistrationEvent; import de.erethon.dungeonsxl.game.Game; import de.erethon.dungeonsxl.trigger.Trigger; @@ -218,7 +217,7 @@ public abstract class DSign { sign.setLine(3, ERROR_3); sign.update(); - MessageUtil.log(plugin, DMessage.LOG_ERROR_SIGN_SETUP.getMessage(sign.getX() + ", " + sign.getY() + ", " + sign.getZ())); + MessageUtil.log(plugin, "&4A sign at &6" + sign.getX() + ", " + sign.getY() + ", " + sign.getZ() + "&4 is erroneous!"); MessageUtil.log(plugin, getType().getName() + ": " + reason); } diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/DSignListener.java b/core/src/main/java/de/erethon/dungeonsxl/sign/DSignListener.java index da212ba6..7681d89a 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/DSignListener.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/DSignListener.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/DSignType.java b/core/src/main/java/de/erethon/dungeonsxl/sign/DSignType.java index ff41c912..dbf46c1a 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/DSignType.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/DSignType.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/DSignTypeCache.java b/core/src/main/java/de/erethon/dungeonsxl/sign/DSignTypeCache.java index 3dd26cc7..4ebef2f3 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/DSignTypeCache.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/DSignTypeCache.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/DSignTypeDefault.java b/core/src/main/java/de/erethon/dungeonsxl/sign/DSignTypeDefault.java index d86f9807..f5693667 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/DSignTypeDefault.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/DSignTypeDefault.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/DelayedPowerTask.java b/core/src/main/java/de/erethon/dungeonsxl/sign/DelayedPowerTask.java index 9b5601d6..e404869f 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/DelayedPowerTask.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/DelayedPowerTask.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/DropSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/DropSign.java index 362dbf19..ab89f533 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/DropSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/DropSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/DungeonChestSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/DungeonChestSign.java index aec2cc39..3cab6820 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/DungeonChestSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/DungeonChestSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/EndSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/EndSign.java index 64804922..85391734 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/EndSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/EndSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/FlagSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/FlagSign.java index 5cb5f99b..e0f62070 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/FlagSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/FlagSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/InteractSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/InteractSign.java index 86023fab..df387fde 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/InteractSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/InteractSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/LeaveSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/LeaveSign.java index 9b9c3782..42a7ce36 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/LeaveSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/LeaveSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/LivesModifierSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/LivesModifierSign.java index 3fdb0f48..886ca3df 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/LivesModifierSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/LivesModifierSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/LocationSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/LocationSign.java index 0d79e99b..c6c2e61c 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/LocationSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/LocationSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/MobSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/MobSign.java index f264e835..ab47c7ac 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/MobSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/MobSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/MobSpawnTask.java b/core/src/main/java/de/erethon/dungeonsxl/sign/MobSpawnTask.java index ec006d51..6fb7aa2a 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/MobSpawnTask.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/MobSpawnTask.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/NoteSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/NoteSign.java index 2f075231..65916d21 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/NoteSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/NoteSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/OpenDoorSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/OpenDoorSign.java index da2f7e4b..36eedb96 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/OpenDoorSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/OpenDoorSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/PerPlayerSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/PerPlayerSign.java index 486d9b5a..59df5572 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/PerPlayerSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/PerPlayerSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/PlaceSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/PlaceSign.java index 5f80e0b4..e0f41b34 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/PlaceSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/PlaceSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/ProtectionSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/ProtectionSign.java index fcc90b36..5277b964 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/ProtectionSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/ProtectionSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/RedstoneSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/RedstoneSign.java index 7aece0ff..a9028f29 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/RedstoneSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/RedstoneSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/ResourcePackSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/ResourcePackSign.java index 47c3eea8..17b9bae1 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/ResourcePackSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/ResourcePackSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/RewardChestSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/RewardChestSign.java index 93a18479..fbaff2eb 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/RewardChestSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/RewardChestSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/ScriptSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/ScriptSign.java index eea71b36..cc07557d 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/ScriptSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/ScriptSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/SignScript.java b/core/src/main/java/de/erethon/dungeonsxl/sign/SignScript.java index 12085e2f..38abcf4a 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/SignScript.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/SignScript.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/SignScriptCache.java b/core/src/main/java/de/erethon/dungeonsxl/sign/SignScriptCache.java index fa272732..119e9fcb 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/SignScriptCache.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/SignScriptCache.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/SignUpdateTask.java b/core/src/main/java/de/erethon/dungeonsxl/sign/SignUpdateTask.java index ee3313e4..8d2f0e24 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/SignUpdateTask.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/SignUpdateTask.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/TeleportSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/TeleportSign.java index 5e16a01b..12ad846c 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/TeleportSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/TeleportSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/TriggerSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/TriggerSign.java index 72a8a0ee..34ab7b17 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/TriggerSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/TriggerSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/WaveSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/WaveSign.java index 0b916651..aad86eca 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/WaveSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/WaveSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/lobby/ClassesSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/lobby/ClassesSign.java index 0528f698..c1602323 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/lobby/ClassesSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/lobby/ClassesSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/lobby/LobbySign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/lobby/LobbySign.java index 68a8d8ae..65e56b95 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/lobby/LobbySign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/lobby/LobbySign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/lobby/ReadySign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/lobby/ReadySign.java index 1e5f0d4f..ee9b2c11 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/lobby/ReadySign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/lobby/ReadySign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/lobby/StartSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/lobby/StartSign.java index 18914cae..6c8b9d5d 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/lobby/StartSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/lobby/StartSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/message/ActionBarSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/message/ActionBarSign.java index 92967c37..96a55e02 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/message/ActionBarSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/message/ActionBarSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/message/HologramSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/message/HologramSign.java index d682b4e9..1191f37b 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/message/HologramSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/message/HologramSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/message/MessageSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/message/MessageSign.java index 553408f4..42c5b76b 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/message/MessageSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/message/MessageSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/message/SoundMessageSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/message/SoundMessageSign.java index 8c986cb2..9cb437ef 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/message/SoundMessageSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/message/SoundMessageSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/message/TitleSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/message/TitleSign.java index 0358db83..54361ea3 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/message/TitleSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/message/TitleSign.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/trigger/DistanceTrigger.java b/core/src/main/java/de/erethon/dungeonsxl/trigger/DistanceTrigger.java index 1223cd93..5715684c 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/trigger/DistanceTrigger.java +++ b/core/src/main/java/de/erethon/dungeonsxl/trigger/DistanceTrigger.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/trigger/FortuneTrigger.java b/core/src/main/java/de/erethon/dungeonsxl/trigger/FortuneTrigger.java index 96563337..8e0716e3 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/trigger/FortuneTrigger.java +++ b/core/src/main/java/de/erethon/dungeonsxl/trigger/FortuneTrigger.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/trigger/InteractTrigger.java b/core/src/main/java/de/erethon/dungeonsxl/trigger/InteractTrigger.java index 995bba5c..ef6dec66 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/trigger/InteractTrigger.java +++ b/core/src/main/java/de/erethon/dungeonsxl/trigger/InteractTrigger.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/trigger/MobTrigger.java b/core/src/main/java/de/erethon/dungeonsxl/trigger/MobTrigger.java index 05135a73..b2e55104 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/trigger/MobTrigger.java +++ b/core/src/main/java/de/erethon/dungeonsxl/trigger/MobTrigger.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/trigger/ProgressTrigger.java b/core/src/main/java/de/erethon/dungeonsxl/trigger/ProgressTrigger.java index 68f0a7b1..963234ef 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/trigger/ProgressTrigger.java +++ b/core/src/main/java/de/erethon/dungeonsxl/trigger/ProgressTrigger.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/trigger/RedstoneTrigger.java b/core/src/main/java/de/erethon/dungeonsxl/trigger/RedstoneTrigger.java index 1e80df17..852c4ab8 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/trigger/RedstoneTrigger.java +++ b/core/src/main/java/de/erethon/dungeonsxl/trigger/RedstoneTrigger.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/trigger/SignTrigger.java b/core/src/main/java/de/erethon/dungeonsxl/trigger/SignTrigger.java index 07d5ece9..6c280724 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/trigger/SignTrigger.java +++ b/core/src/main/java/de/erethon/dungeonsxl/trigger/SignTrigger.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/trigger/Trigger.java b/core/src/main/java/de/erethon/dungeonsxl/trigger/Trigger.java index 4a7ea8f6..2a87cd90 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/trigger/Trigger.java +++ b/core/src/main/java/de/erethon/dungeonsxl/trigger/Trigger.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/trigger/TriggerListener.java b/core/src/main/java/de/erethon/dungeonsxl/trigger/TriggerListener.java index a35628c8..7c7f99cb 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/trigger/TriggerListener.java +++ b/core/src/main/java/de/erethon/dungeonsxl/trigger/TriggerListener.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/trigger/TriggerType.java b/core/src/main/java/de/erethon/dungeonsxl/trigger/TriggerType.java index 32c64aa3..ea055974 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/trigger/TriggerType.java +++ b/core/src/main/java/de/erethon/dungeonsxl/trigger/TriggerType.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/trigger/TriggerTypeCache.java b/core/src/main/java/de/erethon/dungeonsxl/trigger/TriggerTypeCache.java index 2bac0b13..43ab04d3 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/trigger/TriggerTypeCache.java +++ b/core/src/main/java/de/erethon/dungeonsxl/trigger/TriggerTypeCache.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/trigger/TriggerTypeDefault.java b/core/src/main/java/de/erethon/dungeonsxl/trigger/TriggerTypeDefault.java index 383fde05..561f21f7 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/trigger/TriggerTypeDefault.java +++ b/core/src/main/java/de/erethon/dungeonsxl/trigger/TriggerTypeDefault.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/trigger/UseItemTrigger.java b/core/src/main/java/de/erethon/dungeonsxl/trigger/UseItemTrigger.java index af335c8d..ce48fd0d 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/trigger/UseItemTrigger.java +++ b/core/src/main/java/de/erethon/dungeonsxl/trigger/UseItemTrigger.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/trigger/WaveTrigger.java b/core/src/main/java/de/erethon/dungeonsxl/trigger/WaveTrigger.java index 4d6c611a..7b67799f 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/trigger/WaveTrigger.java +++ b/core/src/main/java/de/erethon/dungeonsxl/trigger/WaveTrigger.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/util/GUIUtil.java b/core/src/main/java/de/erethon/dungeonsxl/util/GUIUtil.java index 7bbf1eca..d0d18ef0 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/util/GUIUtil.java +++ b/core/src/main/java/de/erethon/dungeonsxl/util/GUIUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/util/LWCUtil.java b/core/src/main/java/de/erethon/dungeonsxl/util/LWCUtil.java index ac32df27..f929207e 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/util/LWCUtil.java +++ b/core/src/main/java/de/erethon/dungeonsxl/util/LWCUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/util/MagicValueUtil.java b/core/src/main/java/de/erethon/dungeonsxl/util/MagicValueUtil.java index 95d2c6c9..8c6a065a 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/util/MagicValueUtil.java +++ b/core/src/main/java/de/erethon/dungeonsxl/util/MagicValueUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/util/NBTUtil.java b/core/src/main/java/de/erethon/dungeonsxl/util/NBTUtil.java index 943a07a9..23e4f103 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/util/NBTUtil.java +++ b/core/src/main/java/de/erethon/dungeonsxl/util/NBTUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/util/ParsingUtil.java b/core/src/main/java/de/erethon/dungeonsxl/util/ParsingUtil.java index e3213f00..d791b0a0 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/util/ParsingUtil.java +++ b/core/src/main/java/de/erethon/dungeonsxl/util/ParsingUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/util/PlaceholderUtil.java b/core/src/main/java/de/erethon/dungeonsxl/util/PlaceholderUtil.java index 54b4af66..7f6af919 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/util/PlaceholderUtil.java +++ b/core/src/main/java/de/erethon/dungeonsxl/util/PlaceholderUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/util/ProgressBar.java b/core/src/main/java/de/erethon/dungeonsxl/util/ProgressBar.java index 5617d1f2..43812011 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/util/ProgressBar.java +++ b/core/src/main/java/de/erethon/dungeonsxl/util/ProgressBar.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/util/ReflectionUtil.java b/core/src/main/java/de/erethon/dungeonsxl/util/ReflectionUtil.java index b37ad9bc..2a71380a 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/util/ReflectionUtil.java +++ b/core/src/main/java/de/erethon/dungeonsxl/util/ReflectionUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/DEditWorld.java b/core/src/main/java/de/erethon/dungeonsxl/world/DEditWorld.java index 08e6d4b3..7a6e7ae7 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/DEditWorld.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/DEditWorld.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/DGameWorld.java b/core/src/main/java/de/erethon/dungeonsxl/world/DGameWorld.java index b703fada..2477ff96 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/DGameWorld.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/DGameWorld.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/DInstanceWorld.java b/core/src/main/java/de/erethon/dungeonsxl/world/DInstanceWorld.java index 5cf22bbf..7f4cab57 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/DInstanceWorld.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/DInstanceWorld.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/DResourceWorld.java b/core/src/main/java/de/erethon/dungeonsxl/world/DResourceWorld.java index 24e3c8bc..9170de61 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/DResourceWorld.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/DResourceWorld.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/DWorldCache.java b/core/src/main/java/de/erethon/dungeonsxl/world/DWorldCache.java index 6de705b8..16565ed9 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/DWorldCache.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/DWorldCache.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/DWorldListener.java b/core/src/main/java/de/erethon/dungeonsxl/world/DWorldListener.java index 961e4289..51454954 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/DWorldListener.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/DWorldListener.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/LWCIntegration.java b/core/src/main/java/de/erethon/dungeonsxl/world/LWCIntegration.java index a34b316f..2dee21a8 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/LWCIntegration.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/LWCIntegration.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/SignData.java b/core/src/main/java/de/erethon/dungeonsxl/world/SignData.java index ffbbbc4d..30848ce8 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/SignData.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/SignData.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/WorldConfig.java b/core/src/main/java/de/erethon/dungeonsxl/world/WorldConfig.java index 6d78e011..9c823291 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/WorldConfig.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/WorldConfig.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/WorldUnloadTask.java b/core/src/main/java/de/erethon/dungeonsxl/world/WorldUnloadTask.java index c7c7cbfd..d9e36c41 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/WorldUnloadTask.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/WorldUnloadTask.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/block/GameBlock.java b/core/src/main/java/de/erethon/dungeonsxl/world/block/GameBlock.java index 39e61799..617425a9 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/block/GameBlock.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/block/GameBlock.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/block/LockedDoor.java b/core/src/main/java/de/erethon/dungeonsxl/world/block/LockedDoor.java index d1343b53..45cc0fc7 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/block/LockedDoor.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/block/LockedDoor.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/block/MultiBlock.java b/core/src/main/java/de/erethon/dungeonsxl/world/block/MultiBlock.java index 4f8ca35a..0f4c7790 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/block/MultiBlock.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/block/MultiBlock.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/block/PlaceableBlock.java b/core/src/main/java/de/erethon/dungeonsxl/world/block/PlaceableBlock.java index 5332169d..ceaf4a7f 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/block/PlaceableBlock.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/block/PlaceableBlock.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/block/ProtectedBlock.java b/core/src/main/java/de/erethon/dungeonsxl/world/block/ProtectedBlock.java index ff9dd261..c0539dfc 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/block/ProtectedBlock.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/block/ProtectedBlock.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/block/RewardChest.java b/core/src/main/java/de/erethon/dungeonsxl/world/block/RewardChest.java index 11ca09c7..ea4a2e03 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/block/RewardChest.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/block/RewardChest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/block/TeamBed.java b/core/src/main/java/de/erethon/dungeonsxl/world/block/TeamBed.java index 9f1d42ef..eb19cfa3 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/block/TeamBed.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/block/TeamBed.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/block/TeamBlock.java b/core/src/main/java/de/erethon/dungeonsxl/world/block/TeamBlock.java index 0c65b7c7..edabb4e6 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/block/TeamBlock.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/block/TeamBlock.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/block/TeamFlag.java b/core/src/main/java/de/erethon/dungeonsxl/world/block/TeamFlag.java index c073d030..46c126c6 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/block/TeamFlag.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/block/TeamFlag.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2019 Frank Baumann + * Copyright (C) 2012-2020 Frank Baumann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/core/src/main/resources/languages/english.yml b/core/src/main/resources/languages/english.yml new file mode 100644 index 00000000..5d4884ac --- /dev/null +++ b/core/src/main/resources/languages/english.yml @@ -0,0 +1,232 @@ +announcer: + click: '&4&l=> &6CLICK HERE TO JOIN &4&l<=' +cmd: + break: + breakMode: '&6You may break a block protected by DungeonsXL.' + help: /dxl break - Break a block protected by DungeonsXL + protectedMode: '&6You may not break blocks protected by DungeonsXL anymore.' + chat: + dungeonChat: '&6You have entered the dungeon chat' + help: /dxl chat - Change the chat mode + normalChat: '&6You are now in the public chat' + chatspy: + help: /dxl chatspy - Dis/enables the spymode + stopped: '&6You stopped to spy the dungeon chat.' + started: '&6You started to spy the dungeon chat.' + create: + help: /dxl create [name] - Creates a new dungeon map + delete: + backups: '&6Do you wish to delete all saved backups as well?' + help: /dxl delete [name] - Deletes a dungeon map + success: '&6Successfully deleted the map &4&v1&6.' + dungeonItem: + dungeonItemHelp: '&6After finishing a game, &4dungeon items &6are removed from the player''s inventory even if the respective dungeon setup in general allows to keep it.' + globalItemHelp: '&6After finishing a game, &4global items &6can be taken out of dungeons if the respective dungeon setup in general allows to keep the inventory.' + help: /dxl dungeonItem [true|false|info] - Sets the item stack in the player's hand to be one that cannot be taken out of a dungeon + info: + dungeon: '&6This item is a &4dungeon item&6.' + global: '&6This item is a &4global item&6.' + set: + dungeon: '&6Successfully made this item a &4dungeon item&6.' + global: '&6Successfully made this item a &4global item&6.' + edit: + help: /dxl edit [map] - Edit an existing dungeon map + enter: + help: /dxl enter ([joining group]) [target group] - Let the joining group enter the game of the target group + success: '&6The group &4&v1 &6successfully entered the game of the group &4&v2&6.' + escape: + help: /dxl escape - Leaves the current edit world without saving + game: + help: /dxl game - Shows information about the current game session + group: + help: + create: /dxl group create [group] - Creates a new group + disband: /dxl group disband ([group]) - Disbands a group + invite: /dxl group invite [player]- Invites someone to your group + join: /dxl group join [group]- Join a group + kick: /dxl group kick [player] - Kicks a player + main: /dxl group - Shows group command help + show: /dxl group show [group] - Shows a group + uninvite: /dxl group uninvite [player] - Takes back an invitation to your group + help: + help: /dxl help [page] - Shows the help page + import: + help: /dxl import [world] - Imports a world from the world container as a dungeon map + success: '&6Successfully imported the world &4&v1&6.' + invite: + help: /dxl invite [player] [dungeon] - Invite a player to edit a dungeon + success: '&6Player &4&v1&6 was successfully invited to edit the map &4&v2&6.' + join: + help: /dxl join [announcement] - Opens the GUI to join a group in an upcoming game + kick: + help: /dxl kick [player] - Kicks the player out of his group and dungeon + success: '&6Successfully attempted to kick &4&v1&6.' + leave: + help: /dxl leave - Leaves the current group and dungeon or edit world + success: '&6You have successfully left your group!' + list: + help: /dxl list ([dungeon|map|loaded]) ([dungeon]) - Lists all dungeons + lives: + group: '&4&v1 &6have &4&v2 &6lives left.' + help: /dxl lives [player] - Shows the lives a player has left + player: '&4&v1 &6has &4&v2 &6lives left.' + main: + compatibility: '&eInternals: &o[&v1] &eVault: &o[&v2] &eItemsXL: &o[&v3]' + help: /dxl - General status information + helpInfo: '&7Type in &o/dxl help&r&7 for further information.' + loaded: '&eMaps: &o[&v1] &eDungeons: &o[&v2] &eLoaded: &o[&v3] &ePlayers: &o[&v4]' + welcome: '&7Welcome to &4Dungeons&fXL' + msg: + added: '&6New Messages (&4&v1&6) added!' + help: /dxl msg [id] '[msg]' - Show or edit a message + updated: '&6Messages (&4&v1&6) updated!' + play: + help: /dxl play [name] - Allows the player to play a dungeon without a portal + portal: + help: /dxl portal ([material=portal])- Creates a portal that leads into a dungeon + reload: + help: /dxl reload - Reloads the plugin + players: '&4Warning: If you reload the plugin, all players will be kicked out of their game.' + success: '&7Successfully reloaded DungeonsXL.' + rename: + help: /dxl rename [old name] [new name] - Changes the name of a map to the new one. This command does NOT break dungeons that include this map. + success: '&6Successfully renamed the map &4&v1&6 to &4&v2&6.' + resourcePack: + help: /dxl resourcepack [ID] - Downloads a resourcepack registered in the main configuration file; use 'reset' to reset + save: + help: /dxl save - Saves the current dungeon + success: '&6Map saved!' + status: + help: /dxl status - Shows the technical status of DungeonsXL + test: + help: /dxl test - Starts the game in test mode + uninvite: + help: /dxl uninvite [player] [dungeon] - Uninvite a player to edit a dungeon + success: '&4&v1&6''s permission to edit the map &4&v2&6 has been removed successfully.' +error: + bed: '&4You cannot use a bed while in a dungeon!' + chestIsOpened: '&4This chest has already been opened.' + cmd: '&4Commands are not allowed while in a dungeon!' + cooldown: '&4You can only enter this dungeon every &6&v1&4 hours!' + dispenser: '&4You cannot access this dispenser!' + drop: '&4You cannot drop safe items' + enderchest: '&4You cannot use an enderchest while in a dungeon!' + inGroup: '&4The player &6&v1&4 is already member of a group.' + joinGroup: '&4You have to join a group first!' + leaveDungeon: '&4You have to leave your current dungeon first!' + leaveGame: '&4You have to leave your current game first!' + leaveGroup: '&4You have to leave your group first!' + msgIdDoesNotExist: '&4Messages with Id &6&v1&4 does not exist!' + msgFormat: '&4Please use &6" &4to mark the beginning and the end of the message!' + msgNoInt: '&4The argument [id] has to include a number!' + nameInUse: '&4The name &6&v1 &4is already in use.' + nameTooLong: '&4The name may not be longer than 15 characters!' + noGame: '&4You currently do not take part in a game.' + noItemInMainHand: '&4You do not have an item in your main hand.' + noLeaveInTutorial: '&4You cannot use this command in the tutorial!' + noPermissions: '&4You do not have permission to do this!' + noProtectedBlock: '&4This is not a block protected by DungeonsXL!' + noRewardsTime: '&4You cannot receive rewards before &6&v1&4.' + noSuchDungeon: '&4This dungeon does not exist.' + noSuchGroup: '&4The group &6&v1&4 does not exist!' + noSuchMap: '&4The world &6&v1&4 does not exist!' + noSuchPlayer: '&4The player &6&v1&4 does not exist!' + noSuchResourcePack: '&4The resource pack &6&v1 &4is not registered in the main configuration file!' + noSuchShop: '&4Shop &v1 &4not found...' + notInDungeon: '&4You are not in a dungeon!' + notInGame: '&4The group &6&v1&4 is not member of a game.' + notInGroup: '&4The player &6&v1&4 is not member of the group &6&v2&v4.' + notInvited: '&4You are not invited to the group &6&v1&4.' + notLeader: '&4You are not the captain of your group!' + notSaved: '&4The map &6&v1&4 has not been saved to the &6DungeonsXL/maps/ &4folder yet!' + blockOwnTeam: '&4This block belongs to your own group.' + ready: '&4Choose your class first!' + requirements: '&4You don''t fulfill the requirements for this dungeon!' + selfNotInGroup: '&4You are not in any group.' + signWrongFormat: '&4The sign is not written correctly!' + tooManyInstances: '&4There are currently too many maps instantiated. Try it again in a few minutes!' + tooManyTutorials: '&4There are currently too many tutorials running. Try it again in a few minutes!' + tutorialDoesNotExist: '&4Tutorial dungeon does not exist!' +group: + bedDestroyed: '&6The bed of the group &4&v1 &6has been destroyed by &4&v2&6!' + congrats: '&6Congratulations!' + congratsSub: '&l&4Your group &v1 &4won the match!' + created: '&4&v1&6 created the group &4&v2&6!' + death: '&4&v1 &6died. &4&v2 &6have &4&v3 &6lives left.' + deathKick: '&4&v1 &6was kicked because &4&v2 &6have no lives left.' + defeated: '&4The group &4v1 &6is defeated because it lost its last score point.' + disbanded: '&4&v1&6 disbanded the group &4&v2&6.' + flagCaptured: '&4&v1&6 has captured the flag of the group &4&v2&6!' + flagLost: '&4&v1&6 died and lost &4&v2&6''s flag.' + flagStealing: '&4&v1&6 is stealing the flag of the group &4&v2&6!' + invitedPlayer: '&4&v1&6 invited the player &4&v2&6 to the group &4&v3&6.' + joinedGame: '&6Your group successfully joined the game.' + killed: '&4&v1 &6was killed by &4&v2&6. &4&v3&6 have &4&v4 &6lives left.' + killedKick: '&4&v1&6 was killed by &4&v2&6. &4&v3 have no lives left.' + livesAdded: '&6Your group received a bonus of &4&v1&6 lives.' + livesRemoved: '&6Your group lost &4&v1&6 lives!' + kickedPlayer: '&4&v1&6 kicked the player &4&v2&6 from the group &4&v3&6.' + playerJoined: '&6Player &4&v1&6 has joined the group!' + rewardChest: '&6Your group has found a reward chest.' + uninvitedPlayer: '&4&v1&6 took back the invitation for &4&v2&6 to the group &4&v3&6.' + waveFinished: '&6Your group finished wave no. &4&v1&6. The next one is going to start in &4&v2&6 seconds.' +misc: + no: '&4[ NO ]' + okay: '&a[ OK ]' + unlimited: unlimited + yes: '&a[ YES ]' +player: + blockInfo: '&6Block ID: &2&v1' + checkpointReached: '&6Checkpoint reached!' + death: '&4&v1 &6died and has &4&v2 &6lives left.' + deathKick: '&2&v1 &6lost his last life and was kicked.' + finishedDungeon: '&6You successfully finished the dungeon!' + finished_Floor: '&6You successfully finished the floor.' + invited: '&4&v1&6 invited you to the group &4&v2&6.' + uninvited: '&4&v1&6 took back your invitation to the group &4&v2&6.' + joinGroup: '&6You successfully joined the group!' + kicked: '&4You have been kicked out of the group &6&v1&4.' + killed: '&4&v1 &6was killed by &4&v2 &6and has &4&v3 &6lives left.' + killedKick: '&4&v1&6 was killed by &4&v2 &6and lost his last life.' + leaveGroup: '&6You have successfully left your group!' + leftGroup: '&6Player &4&v1&6 has left the Group!' + livesAdded: '&6Received a bonus of &4&v1&6 lives.' + livesRemoved: '&6You lost &4&v1&6 lives!' + lootAdded: '&4&v1&6 have been added to your reward inventory!' + newLeader: '&6You are now the new captain of your group.' + offline: '&Player &4&v1&6 went offline. In &4&v2&6 seconds he will autmatically be kicked from the dungeon!' + offlineNever: '&6The player &4&v1&6 went offline. He will &4not&6 be kicked from the dungeon automatically!' + portalAbort: '&6Portal creation cancelled!' + portalIntroduction: '&6Click the two edges of the portal with the wooden sword!' + portalCreated: '&6Portal created!' + portalProgress: '&6First edge successfully marked. You may now click at the other edge.' + protectedBlockDeleted: '&6Successfully removed the protection.' + ready: '&6You are now ready to start the dungeon.' + signCreated: '&6Successfully created a dungeon sign.' + signCopied: '&6Sign data copied.' + timeLeft: '&v1You have &6&v2 &v1seconds left to finish the dungeon!' + timeKick: '&2&v1&6''s time expired.' + treasures: '&1Treasures' + waitForOtherPlayers: '&6Waiting for team members...' +requirement: + fee: '&6You have been charged &4&v1 &6for entering the dungeon.' +reward: + general: '&6You received &4&v1 &6for finishing the dungeon.' +sign: + end: '&2END' + floor: + '1': '&2ENTER' + '2': '&2NEXT FLOOR' + global: + full: '&4FULL' + isPlaying: '&4IS PLAYING' + joinGame: '&2JOIN GAME' + joinGroup: '&2JOIN GROUP' + newGame: '&2NEW GAME' + newGroup: '&2NEW GROUP' + leave: '&2LEAVE' + ready: '&2READY' + resourcePack: '&2DOWNLOAD' + wave: + '1': '&2START' + '2': '&2NEXT WAVE' diff --git a/dist/pom.xml b/dist/pom.xml index 79bf1d5d..3a07a02b 100644 --- a/dist/pom.xml +++ b/dist/pom.xml @@ -52,6 +52,26 @@ + + de.erethon.dungeonsxl + dungeonsxl-adapter + ${project.parent.version} + + + de.erethon.dungeonsxl + dungeonsxl-api + ${project.parent.version} + + + de.erethon.dungeonsxl + dungeonsxl-bukkit_blockdata + ${project.parent.version} + + + de.erethon.dungeonsxl + dungeonsxl-bukkit_magicvalues + ${project.parent.version} + de.erethon.dungeonsxl dungeonsxl-core diff --git a/pom.xml b/pom.xml index 330507bc..4f429f6d 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ UTF-8 1.8 1.8 - 1.14.4-R0.1-SNAPSHOT + 1.15.2-R0.1-SNAPSHOT @@ -32,7 +32,7 @@ de.erethon caliburn - 1.0-SNAPSHOT + 0.5.5 compile