mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-28 13:36:33 +01:00
Javadoc fixes
This commit is contained in:
parent
ffe73d777c
commit
272be6b392
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>de.erethon</groupId>
|
||||
<artifactId>dungeonsxl</artifactId>
|
||||
<version>0.16</version>
|
||||
<version>0.16.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>DungeonsXL</name>
|
||||
<url>https://dre2n.github.io</url>
|
||||
|
@ -56,8 +56,7 @@ import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
/**
|
||||
* The main class of DungeonsXL.
|
||||
* It contains several important instances and the actions when the plugin is enabled / disabled.
|
||||
* The main class of DungeonsXL. It contains several important instances and the actions when the plugin is enabled / disabled.
|
||||
*
|
||||
* @author Frank Baumann, Tobias Schmitz, Daniel Saukel
|
||||
*/
|
||||
@ -282,6 +281,8 @@ public class DungeonsXL extends DREPlugin {
|
||||
|
||||
/**
|
||||
* load / reload a new instance of GlobalData
|
||||
*
|
||||
* @param file the file to load from
|
||||
*/
|
||||
public void loadGlobalData(File file) {
|
||||
globalData = new GlobalData(file);
|
||||
@ -296,6 +297,8 @@ public class DungeonsXL extends DREPlugin {
|
||||
|
||||
/**
|
||||
* load / reload a new instance of MainConfig
|
||||
*
|
||||
* @param file the file to load from
|
||||
*/
|
||||
public void loadMainConfig(File file) {
|
||||
mainConfig = new MainConfig(file);
|
||||
@ -303,6 +306,8 @@ public class DungeonsXL extends DREPlugin {
|
||||
|
||||
/**
|
||||
* load / reload a new instance of MessageConfig
|
||||
*
|
||||
* @param file the file to load from
|
||||
*/
|
||||
public void loadMessageConfig(File file) {
|
||||
messageConfig = new MessageConfig(DMessage.class, file);
|
||||
@ -403,9 +408,11 @@ public class DungeonsXL extends DREPlugin {
|
||||
|
||||
/**
|
||||
* load / reload a new instance of DungeonCache
|
||||
*
|
||||
* @param folder the folder to load from
|
||||
*/
|
||||
public void loadDungeons(File file) {
|
||||
dungeons = new DungeonCache(file);
|
||||
public void loadDungeons(File folder) {
|
||||
dungeons = new DungeonCache(folder);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -459,9 +466,11 @@ public class DungeonsXL extends DREPlugin {
|
||||
|
||||
/**
|
||||
* load / reload a new instance of AnnouncerCache
|
||||
*
|
||||
* @param folder the folder to load from
|
||||
*/
|
||||
public void loadAnnouncers(File file) {
|
||||
announcers = new AnnouncerCache(file);
|
||||
public void loadAnnouncers(File folder) {
|
||||
announcers = new AnnouncerCache(folder);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -473,26 +482,32 @@ public class DungeonsXL extends DREPlugin {
|
||||
|
||||
/**
|
||||
* load / reload a new instance of DClasseCache
|
||||
*
|
||||
* @param folder the folder to load from
|
||||
*/
|
||||
public void loadDClasses(File file) {
|
||||
dClasses = new DClassCache(file);
|
||||
public void loadDClasses(File folder) {
|
||||
dClasses = new DClassCache(folder);
|
||||
}
|
||||
|
||||
/**
|
||||
* load / reload loot tables
|
||||
*
|
||||
* @param folder the folder to load from
|
||||
*/
|
||||
public void loadLootTables(File file) {
|
||||
for (File script : FileUtil.getFilesForFolder(file)) {
|
||||
public void loadLootTables(File folder) {
|
||||
for (File script : FileUtil.getFilesForFolder(folder)) {
|
||||
new LootTable(caliburn, script);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* load / reload DMob types
|
||||
*
|
||||
* @param folder the folder to load from
|
||||
*/
|
||||
public void loadMobs(File file) {
|
||||
if (file.isDirectory()) {
|
||||
for (File script : FileUtil.getFilesForFolder(file)) {
|
||||
public void loadMobs(File folder) {
|
||||
if (folder.isDirectory()) {
|
||||
for (File script : FileUtil.getFilesForFolder(folder)) {
|
||||
caliburn.getExMobs().add(new DMobType(script));
|
||||
}
|
||||
}
|
||||
@ -508,9 +523,11 @@ public class DungeonsXL extends DREPlugin {
|
||||
|
||||
/**
|
||||
* load / reload a new instance of SignScriptCache
|
||||
*
|
||||
* @param folder the folder to load from
|
||||
*/
|
||||
public void loadSignScripts(File file) {
|
||||
signScripts = new SignScriptCache(file);
|
||||
public void loadSignScripts(File folder) {
|
||||
signScripts = new SignScriptCache(folder);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -522,6 +539,8 @@ public class DungeonsXL extends DREPlugin {
|
||||
|
||||
/**
|
||||
* load / reload a new instance of DWorldCache
|
||||
*
|
||||
* @param folder the folder to load from
|
||||
*/
|
||||
public void loadDWorlds(File folder) {
|
||||
dWorlds = new DWorldCache(MAPS);
|
||||
|
@ -73,18 +73,15 @@ public class Announcer {
|
||||
private AnnouncerStartGameTask startTask;
|
||||
|
||||
/**
|
||||
* @param file
|
||||
* the script file
|
||||
* @param file the script file
|
||||
*/
|
||||
public Announcer(File file) {
|
||||
this(file.getName().substring(0, file.getName().length() - 4), YamlConfiguration.loadConfiguration(file));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* the name of the Announcer
|
||||
* @param config
|
||||
* the config that stores the information
|
||||
* @param name the name of the Announcer
|
||||
* @param config the config that stores the information
|
||||
*/
|
||||
public Announcer(String name, FileConfiguration config) {
|
||||
this.name = name;
|
||||
@ -115,20 +112,13 @@ public class Announcer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* the name of the Announcer
|
||||
* @param description
|
||||
* the description messages
|
||||
* @param worlds
|
||||
* the names of the worlds where the announcement will be seen or null to broadcast it to all worlds
|
||||
* @param identifier
|
||||
* the dungeon identifier
|
||||
* @param multiFloor
|
||||
* if the identifier refers to an MFD (true) or an SFD (false)
|
||||
* @param maxGroupsPerGame
|
||||
* the amount of groups in one game
|
||||
* @param maxPlayersPerGame
|
||||
* the amount of players in one group
|
||||
* @param name the name of the Announcer
|
||||
* @param description the description messages
|
||||
* @param worlds the names of the worlds where the announcement will be seen or null to broadcast it to all worlds
|
||||
* @param identifier the dungeon identifier
|
||||
* @param multiFloor if the identifier refers to an MFD (true) or an SFD (false)
|
||||
* @param maxGroupsPerGame the amount of groups in one game
|
||||
* @param maxPlayersPerGroup the amount of players in one group
|
||||
*/
|
||||
public Announcer(String name, List<String> description, List<String> worlds, String identifier, boolean multiFloor, short maxGroupsPerGame, int maxPlayersPerGroup) {
|
||||
this.name = name;
|
||||
@ -168,8 +158,7 @@ public class Announcer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param description
|
||||
* the description to set
|
||||
* @param description the description to set
|
||||
*/
|
||||
public void setDescription(List<String> description) {
|
||||
this.description = description;
|
||||
@ -183,8 +172,7 @@ public class Announcer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param worlds
|
||||
* the worlds to set
|
||||
* @param worlds the worlds to set
|
||||
*/
|
||||
public void setWorlds(List<String> worlds) {
|
||||
this.worlds = worlds;
|
||||
@ -198,8 +186,7 @@ public class Announcer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dungeonName
|
||||
* the name of the dungeon to set
|
||||
* @param dungeonName the name of the dungeon to set
|
||||
*/
|
||||
public void setDungeonName(String dungeonName) {
|
||||
this.dungeonName = dungeonName;
|
||||
@ -213,8 +200,7 @@ public class Announcer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mapName
|
||||
* the name of the map to set
|
||||
* @param mapName the name of the map to set
|
||||
*/
|
||||
public void setMapName(String mapName) {
|
||||
this.mapName = mapName;
|
||||
@ -228,8 +214,7 @@ public class Announcer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param amount
|
||||
* the amount to set
|
||||
* @param amount the amount to set
|
||||
*/
|
||||
public void setMinGroupsPerGame(int amount) {
|
||||
minGroupsPerGame = amount;
|
||||
@ -243,8 +228,7 @@ public class Announcer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param amount
|
||||
* the amount to set
|
||||
* @param amount the amount to set
|
||||
*/
|
||||
public void setMinPlayersPerGroup(int amount) {
|
||||
minPlayersPerGroup = amount;
|
||||
@ -258,8 +242,7 @@ public class Announcer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param amount
|
||||
* the amount to set
|
||||
* @param amount the amount to set
|
||||
*/
|
||||
public void setMaxGroupsPerGame(short amount) {
|
||||
maxGroupsPerGame = amount;
|
||||
@ -287,8 +270,7 @@ public class Announcer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param amount
|
||||
* the amount to set
|
||||
* @param amount the amount to set
|
||||
*/
|
||||
public void setMaxPlayersPerGroup(int amount) {
|
||||
maxPlayersPerGroup = amount;
|
||||
@ -325,6 +307,8 @@ public class Announcer {
|
||||
|
||||
/**
|
||||
* Sends the announcement
|
||||
*
|
||||
* @param player the player
|
||||
*/
|
||||
public void send(Player player) {
|
||||
for (String message : description) {
|
||||
@ -352,6 +336,8 @@ public class Announcer {
|
||||
|
||||
/**
|
||||
* Shows the group selection GUI
|
||||
*
|
||||
* @param player the player
|
||||
*/
|
||||
public void showGUI(Player player) {
|
||||
updateButtons();
|
||||
@ -361,8 +347,8 @@ public class Announcer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param button
|
||||
* the clicked button
|
||||
* @param player the player
|
||||
* @param button the clicked button
|
||||
*/
|
||||
public void clickGroupButton(Player player, ItemStack button) {
|
||||
DGroup dGroup = getDGroupByButton(button);
|
||||
@ -452,8 +438,7 @@ public class Announcer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param button
|
||||
* the button
|
||||
* @param button the button
|
||||
* @return the matching DGroup
|
||||
*/
|
||||
public DGroup getDGroupByButton(ItemStack button) {
|
||||
|
@ -50,6 +50,7 @@ public class AnnouncerCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name the name
|
||||
* @return the announcer that has the name
|
||||
*/
|
||||
public Announcer getByName(String name) {
|
||||
@ -63,6 +64,7 @@ public class AnnouncerCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param gui the gui
|
||||
* @return the announcer that has the GUI
|
||||
*/
|
||||
public Announcer getByGUI(Inventory gui) {
|
||||
@ -83,16 +85,14 @@ public class AnnouncerCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param announcer
|
||||
* the Announcer to add
|
||||
* @param announcer the Announcer to add
|
||||
*/
|
||||
public void addAnnouncer(Announcer announcer) {
|
||||
announcers.add(announcer);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param announcer
|
||||
* the Announcer to remove
|
||||
* @param announcer the Announcer to remove
|
||||
*/
|
||||
public void removeAnnouncer(Announcer announcer) {
|
||||
announcers.remove(announcer);
|
||||
@ -107,6 +107,8 @@ public class AnnouncerCache {
|
||||
|
||||
/**
|
||||
* start a new AnnouncerTask
|
||||
*
|
||||
* @param period the period ticks
|
||||
*/
|
||||
public void startAnnouncerTask(long period) {
|
||||
if (!announcers.isEmpty()) {
|
||||
|
@ -21,8 +21,7 @@ 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.
|
||||
* An enumeration of all messages. The values are fetched from the language file.
|
||||
*
|
||||
* @author Daniel Saukel
|
||||
*/
|
||||
@ -263,8 +262,8 @@ public enum DMessage implements Message {
|
||||
|
||||
/* Statics */
|
||||
/**
|
||||
* @param identifier
|
||||
* the identifier to set
|
||||
* @param identifier the identifier to set
|
||||
* @return the message
|
||||
*/
|
||||
public static Message getByIdentifier(String identifier) {
|
||||
for (Message message : values()) {
|
||||
|
@ -124,8 +124,7 @@ public class MainConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param language
|
||||
* the language to set
|
||||
* @param language the language to set
|
||||
*/
|
||||
public void setLanguage(String language) {
|
||||
this.language = language;
|
||||
@ -139,72 +138,63 @@ public class MainConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param enabled
|
||||
* if DungeonsXL should use economy features provided by Vault
|
||||
* @param enabled if DungeonsXL should use economy features provided by Vault
|
||||
*/
|
||||
public void setEconomyEnabled(boolean enabled) {
|
||||
enableEconomy = enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* if the dungeon chat is enabled
|
||||
* @return if the dungeon chat is enabled
|
||||
*/
|
||||
public boolean isChatEnabled() {
|
||||
return chatEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param enabled
|
||||
* if the dungeon chat is enabled
|
||||
* @param enabled if the dungeon chat is enabled
|
||||
*/
|
||||
public void setChatEnabled(boolean enabled) {
|
||||
chatEnabled = enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* the game chat format
|
||||
* @return the game chat format
|
||||
*/
|
||||
public String getChatFormatGame() {
|
||||
return chatFormatGame;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string
|
||||
* the game chat format to set
|
||||
* @param string the game chat format to set
|
||||
*/
|
||||
public void setChatFormatGame(String string) {
|
||||
chatFormatGame = string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* the group chat format
|
||||
* @return the group chat format
|
||||
*/
|
||||
public String getChatFormatGroup() {
|
||||
return chatFormatGroup;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string
|
||||
* the group chat format to set
|
||||
* @param string the group chat format to set
|
||||
*/
|
||||
public void setChatFormatGroup(String string) {
|
||||
chatFormatGroup = string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* the chat spy format
|
||||
* @return the chat spy format
|
||||
*/
|
||||
public String getChatFormatSpy() {
|
||||
return chatFormatSpy;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string
|
||||
* the chat spy format to set
|
||||
* @param string the chat spy format to set
|
||||
*/
|
||||
public void setChatFormatSpy(String string) {
|
||||
chatFormatSpy = string;
|
||||
@ -218,8 +208,7 @@ public class MainConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param activated
|
||||
* if new players start in a tutorial
|
||||
* @param activated if new players start in a tutorial
|
||||
*/
|
||||
public void setTutorialActivated(boolean activated) {
|
||||
tutorialActivated = activated;
|
||||
@ -233,8 +222,7 @@ public class MainConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dungeon
|
||||
* the tutorial dungeon to set
|
||||
* @param dungeon the tutorial dungeon to set
|
||||
*/
|
||||
public void setTutorialDungeon(String dungeon) {
|
||||
tutorialDungeon = dungeon;
|
||||
@ -248,8 +236,7 @@ public class MainConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param group
|
||||
* the group the player gets when he plays the tutorial
|
||||
* @param group the group the player gets when he plays the tutorial
|
||||
*/
|
||||
public void setTutorialStartGroup(String group) {
|
||||
tutorialStartGroup = group;
|
||||
@ -263,8 +250,7 @@ public class MainConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param group
|
||||
* the group the player gets when he finshs the tutorial
|
||||
* @param group the group the player gets when he finshs the tutorial
|
||||
*/
|
||||
public void setTutorialEndGroup(String group) {
|
||||
tutorialEndGroup = group;
|
||||
@ -278,8 +264,7 @@ public class MainConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param colors
|
||||
* the colors to set
|
||||
* @param colors the colors to set
|
||||
*/
|
||||
public void setGroupColorPriority(List<DColor> colors) {
|
||||
groupColorPriority = colors;
|
||||
@ -293,25 +278,21 @@ public class MainConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param interval
|
||||
* the interval to set
|
||||
* @param interval the interval to set
|
||||
*/
|
||||
public void setAnnouncementInterval(double interval) {
|
||||
announcementInterval = interval;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* false if death messages shall be sent to players who are not in the dungeon,
|
||||
* true if not
|
||||
* @return false if death messages shall be sent to players who are not in the dungeon, true if not
|
||||
*/
|
||||
public boolean areGlobalDeathMessagesDisabled() {
|
||||
return globalDeathMessagesDisabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param disabled
|
||||
* set if death messages shall be sent to players who are not in the dungeon
|
||||
* @param disabled set if death messages shall be sent to players who are not in the dungeon
|
||||
*/
|
||||
public void setGlobalDeathMessagesDisabled(boolean disabled) {
|
||||
globalDeathMessagesDisabled = false;
|
||||
@ -325,8 +306,7 @@ public class MainConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param enabled
|
||||
* if the floor title shall be sent
|
||||
* @param enabled if the floor title shall be sent
|
||||
*/
|
||||
public void setSendFloorTitleEnabled(boolean enabled) {
|
||||
sendFloorTitle = enabled;
|
||||
@ -354,8 +334,7 @@ public class MainConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param maxInstances
|
||||
* the maximum amount of worlds to instantiate at once
|
||||
* @param maxInstances the maximum amount of worlds to instantiate at once
|
||||
*/
|
||||
public void setMaxInstances(int maxInstances) {
|
||||
this.maxInstances = maxInstances;
|
||||
@ -369,8 +348,7 @@ public class MainConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param enabled
|
||||
* if the performance tweaks are enabled
|
||||
* @param enabled if the performance tweaks are enabled
|
||||
*/
|
||||
public void setTweaksEnabled(boolean enabled) {
|
||||
tweaksEnabled = enabled;
|
||||
@ -384,8 +362,7 @@ public class MainConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param enabled
|
||||
* if the secure mode is enabled
|
||||
* @param enabled if the secure mode is enabled
|
||||
*/
|
||||
public void setSecureModeEnabled(boolean enabled) {
|
||||
secureModeEnabled = enabled;
|
||||
@ -399,8 +376,7 @@ public class MainConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param openInventories
|
||||
* if inventories can be opened in edit mode
|
||||
* @param openInventories if inventories can be opened in edit mode
|
||||
*/
|
||||
public void setOpenInventories(boolean openInventories) {
|
||||
this.openInventories = openInventories;
|
||||
@ -414,8 +390,7 @@ public class MainConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dropItems
|
||||
* if items may be dropped in edit mode
|
||||
* @param dropItems if items may be dropped in edit mode
|
||||
*/
|
||||
public void setDropItems(boolean dropItems) {
|
||||
this.dropItems = dropItems;
|
||||
@ -429,8 +404,7 @@ public class MainConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param interval
|
||||
* the interval for the check task
|
||||
* @param interval the interval for the check task
|
||||
*/
|
||||
public void setSecureModeCheckInterval(double interval) {
|
||||
secureModeCheckInterval = interval;
|
||||
@ -451,8 +425,7 @@ public class MainConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mode
|
||||
* the BackupMode to set
|
||||
* @param mode the BackupMode to set
|
||||
*/
|
||||
public void setBackupMode(BackupMode mode) {
|
||||
backupMode = mode;
|
||||
|
@ -24,9 +24,8 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Represents a dungeon.
|
||||
* While multi floor dungeon scripts are represented by {@link de.erethon.dungeonsxl.config.DungeonConfig},
|
||||
* single floor dungeons also get a dungeon object without a config file as a placeholder.
|
||||
* Represents a dungeon. While multi floor dungeon scripts are represented by {@link de.erethon.dungeonsxl.config.DungeonConfig}, single floor dungeons also get
|
||||
* a dungeon object without a config file as a placeholder.
|
||||
*
|
||||
* @author Daniel Saukel
|
||||
*/
|
||||
@ -38,6 +37,8 @@ public class Dungeon {
|
||||
|
||||
/**
|
||||
* Real dungeon
|
||||
*
|
||||
* @param file the file to load from
|
||||
*/
|
||||
public Dungeon(File file) {
|
||||
name = file.getName().replaceAll(".yml", "");
|
||||
@ -47,6 +48,8 @@ public class Dungeon {
|
||||
|
||||
/**
|
||||
* Artificial dungeon
|
||||
*
|
||||
* @param resource the only resource world
|
||||
*/
|
||||
public Dungeon(DResourceWorld resource) {
|
||||
name = resource.getName();
|
||||
@ -61,8 +64,7 @@ public class Dungeon {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* the name to set
|
||||
* @param name the name to set
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
@ -83,8 +85,7 @@ public class Dungeon {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* the floors of the dungeon
|
||||
* @return the floors of the dungeon
|
||||
*/
|
||||
public List<DResourceWorld> getFloors() {
|
||||
if (isMultiFloor()) {
|
||||
@ -95,16 +96,14 @@ public class Dungeon {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* the SFD map / start floor
|
||||
* @return the SFD map / start floor
|
||||
*/
|
||||
public DResourceWorld getMap() {
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param map
|
||||
* the SFD map / start floor to set
|
||||
* @param map the SFD map / start floor to set
|
||||
*/
|
||||
public void setMap(DResourceWorld map) {
|
||||
this.map = map;
|
||||
@ -124,10 +123,8 @@ public class Dungeon {
|
||||
|
||||
/* Statics */
|
||||
/**
|
||||
* @param name
|
||||
* the name of the dungeon
|
||||
* @return
|
||||
* the file. Might not exist
|
||||
* @param name the name of the dungeon
|
||||
* @return the file. Might not exist
|
||||
*/
|
||||
public static File getFileFromName(String name) {
|
||||
return new File(DungeonsXL.DUNGEONS, name + ".yml");
|
||||
|
@ -49,8 +49,7 @@ public class DungeonCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* the name of the Dungeon
|
||||
* @param name the name of the Dungeon
|
||||
* @return the Dungeon that has the name
|
||||
*/
|
||||
public Dungeon getByName(String name) {
|
||||
@ -71,8 +70,7 @@ public class DungeonCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* the name of the Dungeon
|
||||
* @param name the name of the Dungeon
|
||||
* @return the Dungeon that has the name
|
||||
*/
|
||||
public Dungeon loadDungeon(String name) {
|
||||
@ -82,16 +80,14 @@ public class DungeonCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dungeon
|
||||
* the dungeon to add
|
||||
* @param dungeon the dungeon to add
|
||||
*/
|
||||
public void addDungeon(Dungeon dungeon) {
|
||||
dungeons.add(dungeon);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dungeon
|
||||
* the dungeon to remove
|
||||
* @param dungeon the dungeon to remove
|
||||
*/
|
||||
public void removeDungeon(Dungeon dungeon) {
|
||||
dungeons.remove(dungeon);
|
||||
|
@ -61,8 +61,7 @@ public class DungeonConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param startFloor
|
||||
* the startFloor to set
|
||||
* @param startFloor the startFloor to set
|
||||
*/
|
||||
public void setStartFloor(DResourceWorld startFloor) {
|
||||
this.startFloor = startFloor;
|
||||
@ -76,8 +75,7 @@ public class DungeonConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param endFloor
|
||||
* the endFloor to set
|
||||
* @param endFloor the endFloor to set
|
||||
*/
|
||||
public void setEndFloor(DResourceWorld endFloor) {
|
||||
this.endFloor = endFloor;
|
||||
@ -91,16 +89,14 @@ public class DungeonConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param resource
|
||||
* the resource to add
|
||||
* @param resource the resource to add
|
||||
*/
|
||||
public void addFloor(DResourceWorld resource) {
|
||||
floors.add(resource);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param resource
|
||||
* the resource to remove
|
||||
* @param resource the resource to remove
|
||||
*/
|
||||
public void removeFloor(DResourceWorld resource) {
|
||||
floors.remove(resource);
|
||||
@ -114,8 +110,7 @@ public class DungeonConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param floorCount
|
||||
* the floorCount to set
|
||||
* @param floorCount the floorCount to set
|
||||
*/
|
||||
public void setFloorCount(int floorCount) {
|
||||
this.floorCount = floorCount;
|
||||
@ -129,16 +124,14 @@ public class DungeonConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param removeWhenPlayed
|
||||
* the removeWhenPlayed to set
|
||||
* @param removeWhenPlayed the removeWhenPlayed to set
|
||||
*/
|
||||
public void setRemoveWhenPlayed(boolean removeWhenPlayed) {
|
||||
this.removeWhenPlayed = removeWhenPlayed;
|
||||
}
|
||||
|
||||
/**
|
||||
* The values from this WorldConfig will override all values of the
|
||||
* WorldConfigs of inherited maps.
|
||||
* The values from this WorldConfig will override all values of the WorldConfigs of inherited maps.
|
||||
*
|
||||
* @return the override values
|
||||
*/
|
||||
@ -147,17 +140,15 @@ public class DungeonConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param worldConfig
|
||||
* the WorldConfig to set
|
||||
* @param worldConfig the WorldConfig to set
|
||||
*/
|
||||
public void setOverrideValues(WorldConfig worldConfig) {
|
||||
overrideValues = worldConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* The values from this WorldConfig will get overriden by values of the
|
||||
* WorldConfigs of inherited maps.
|
||||
* They will still override the values from the main config, though.
|
||||
* The values from this WorldConfig will get overriden by values of the WorldConfigs of inherited maps. They will still override the values from the main
|
||||
* config, though.
|
||||
*
|
||||
* @return the default values
|
||||
*/
|
||||
@ -166,16 +157,14 @@ public class DungeonConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param worldConfig
|
||||
* the WorldConfig to set
|
||||
* @param worldConfig the WorldConfig to set
|
||||
*/
|
||||
public void setDefaultValues(WorldConfig worldConfig) {
|
||||
defaultValues = worldConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param resource
|
||||
* the DResourceWorld to check
|
||||
* @param resource the DResourceWorld to check
|
||||
* @return true if the floor is either in the list or the start / end floor.
|
||||
*/
|
||||
public boolean containsFloor(DResourceWorld resource) {
|
||||
@ -183,8 +172,7 @@ public class DungeonConfig extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mapName
|
||||
* the name of the map to check
|
||||
* @param mapName the name of the map to check
|
||||
* @return true if the floor is either in the list or the start / end floor.
|
||||
*/
|
||||
public boolean containsFloor(String mapName) {
|
||||
|
@ -56,8 +56,7 @@ public class DGroupCreateEvent extends DGroupEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param creator
|
||||
* the creator to set
|
||||
* @param creator the creator to set
|
||||
*/
|
||||
public void setCreator(Player creator) {
|
||||
this.creator = creator;
|
||||
@ -71,8 +70,7 @@ public class DGroupCreateEvent extends DGroupEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cause
|
||||
* the cause to set
|
||||
* @param cause the cause to set
|
||||
*/
|
||||
public void setCause(Cause cause) {
|
||||
this.cause = cause;
|
||||
|
@ -62,8 +62,7 @@ public class DGroupDisbandEvent extends DGroupEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param disbander
|
||||
* the disbander to set
|
||||
* @param disbander the disbander to set
|
||||
*/
|
||||
public void setDisbander(Player disbander) {
|
||||
this.disbander = disbander;
|
||||
@ -77,8 +76,7 @@ public class DGroupDisbandEvent extends DGroupEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cause
|
||||
* the cause to set
|
||||
* @param cause the cause to set
|
||||
*/
|
||||
public void setCause(Cause cause) {
|
||||
this.cause = cause;
|
||||
|
@ -38,8 +38,7 @@ public abstract class DGroupEvent extends Event {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dGroup
|
||||
* the dGroup to set
|
||||
* @param dGroup the dGroup to set
|
||||
*/
|
||||
public void setDGroup(DGroup dGroup) {
|
||||
this.dGroup = dGroup;
|
||||
|
@ -44,8 +44,7 @@ public class DGroupFinishDungeonEvent extends DGroupEvent implements Cancellable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dungeon
|
||||
* the dungeon to set
|
||||
* @param dungeon the dungeon to set
|
||||
*/
|
||||
public void setDisbander(Dungeon dungeon) {
|
||||
this.dungeon = dungeon;
|
||||
|
@ -47,8 +47,7 @@ public class DGroupFinishFloorEvent extends DGroupEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param finished
|
||||
* the name of the DGameWorld to set
|
||||
* @param finished the name of the DGameWorld to set
|
||||
*/
|
||||
public void setFinished(DGameWorld finished) {
|
||||
this.finished = finished;
|
||||
@ -62,8 +61,7 @@ public class DGroupFinishFloorEvent extends DGroupEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param next
|
||||
* the resource to set
|
||||
* @param next the resource to set
|
||||
*/
|
||||
public void setNext(DResourceWorld next) {
|
||||
this.next = next;
|
||||
|
@ -48,16 +48,14 @@ public class DGroupRewardEvent extends DGroupEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reward
|
||||
* the reward to add
|
||||
* @param reward the reward to add
|
||||
*/
|
||||
public void addRewards(Reward reward) {
|
||||
rewards.add(reward);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reward
|
||||
* the reward to remove
|
||||
* @param reward the reward to remove
|
||||
*/
|
||||
public void removeRewards(Reward reward) {
|
||||
rewards.remove(reward);
|
||||
@ -71,16 +69,14 @@ public class DGroupRewardEvent extends DGroupEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* the player to add
|
||||
* @param player the player to add
|
||||
*/
|
||||
public void addExcludedPlayer(Player player) {
|
||||
excludedPlayers.add(player);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* the player to remove
|
||||
* @param player the player to remove
|
||||
*/
|
||||
public void removeExcludedPlayer(Player player) {
|
||||
excludedPlayers.remove(player);
|
||||
|
@ -46,8 +46,7 @@ public class DGroupScoreEvent extends DGroupEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param scorer
|
||||
* the scoerer to set
|
||||
* @param scorer the scoerer to set
|
||||
*/
|
||||
public void setCreator(Player scorer) {
|
||||
this.scorer = scorer;
|
||||
@ -61,8 +60,7 @@ public class DGroupScoreEvent extends DGroupEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param loserGroup
|
||||
* the group that lost a score to the scorers to set
|
||||
* @param loserGroup the group that lost a score to the scorers to set
|
||||
*/
|
||||
public void setLoserGroup(DGroup loserGroup) {
|
||||
this.loserGroup = loserGroup;
|
||||
|
@ -44,8 +44,7 @@ public class DGroupStartFloorEvent extends DGroupEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param gameWorld
|
||||
* the gameWorld to set
|
||||
* @param gameWorld the gameWorld to set
|
||||
*/
|
||||
public void setGameWorld(DGameWorld gameWorld) {
|
||||
this.gameWorld = gameWorld;
|
||||
|
@ -44,8 +44,7 @@ public class DMobDeathEvent extends DMobEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bukkitEvent
|
||||
* the bukkitEvent to set
|
||||
* @param bukkitEvent the bukkitEvent to set
|
||||
*/
|
||||
public void setBukkitEvent(EntityDeathEvent bukkitEvent) {
|
||||
this.bukkitEvent = bukkitEvent;
|
||||
|
@ -38,8 +38,7 @@ public abstract class DMobEvent extends Event {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dMob
|
||||
* the dMob to set
|
||||
* @param dMob the dMob to set
|
||||
*/
|
||||
public void setDMob(DMob dMob) {
|
||||
this.dMob = dMob;
|
||||
|
@ -38,8 +38,7 @@ public abstract class DPlayerEvent extends Event {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dPlayer
|
||||
* the dPlayer to set
|
||||
* @param dPlayer the dPlayer to set
|
||||
*/
|
||||
public void setDPlayer(DGlobalPlayer dPlayer) {
|
||||
this.dPlayer = dPlayer;
|
||||
|
@ -53,8 +53,7 @@ public class DPlayerKickEvent extends DPlayerEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cause
|
||||
* the cause to set
|
||||
* @param cause the cause to set
|
||||
*/
|
||||
public void setCause(Cause cause) {
|
||||
this.cause = cause;
|
||||
|
@ -53,8 +53,7 @@ public class DInstancePlayerUpdateEvent extends DInstancePlayerEvent implements
|
||||
}
|
||||
|
||||
/**
|
||||
* @param locationValid
|
||||
* set if the location is valid
|
||||
* @param locationValid set if the location is valid
|
||||
*/
|
||||
public void setLocationValid(boolean locationValid) {
|
||||
this.locationValid = locationValid;
|
||||
@ -68,8 +67,7 @@ public class DInstancePlayerUpdateEvent extends DInstancePlayerEvent implements
|
||||
}
|
||||
|
||||
/**
|
||||
* @param teleportWolf
|
||||
* set if the wolf gets teleported
|
||||
* @param teleportWolf set if the wolf gets teleported
|
||||
*/
|
||||
public void setTeleportWolf(boolean teleportWolf) {
|
||||
this.teleportWolf = teleportWolf;
|
||||
@ -83,8 +81,7 @@ public class DInstancePlayerUpdateEvent extends DInstancePlayerEvent implements
|
||||
}
|
||||
|
||||
/**
|
||||
* @param respawnInventory
|
||||
* respawn the player's old inventory on this update?
|
||||
* @param respawnInventory respawn the player's old inventory on this update?
|
||||
*/
|
||||
public void setRespawnInventory(boolean respawnInventory) {
|
||||
this.respawnInventory = respawnInventory;
|
||||
@ -105,8 +102,7 @@ public class DInstancePlayerUpdateEvent extends DInstancePlayerEvent implements
|
||||
}
|
||||
|
||||
/**
|
||||
* @param kick
|
||||
* if the player gets kicked from the dungeon
|
||||
* @param kick if the player gets kicked from the dungeon
|
||||
*/
|
||||
public void setKick(boolean kick) {
|
||||
this.kick = kick;
|
||||
@ -120,8 +116,7 @@ public class DInstancePlayerUpdateEvent extends DInstancePlayerEvent implements
|
||||
}
|
||||
|
||||
/**
|
||||
* @param triggerAllInDistance
|
||||
* the triggerAllInDistance to set
|
||||
* @param triggerAllInDistance the triggerAllInDistance to set
|
||||
*/
|
||||
public void setTriggerAllInDistance(boolean triggerAllInDistance) {
|
||||
this.triggerAllInDistance = triggerAllInDistance;
|
||||
|
@ -46,8 +46,7 @@ public class DGamePlayerDeathEvent extends DGamePlayerEvent implements Cancellab
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bukkitEvent
|
||||
* the bukkitEvent to set
|
||||
* @param bukkitEvent the bukkitEvent to set
|
||||
*/
|
||||
public void setBukkitEvent(PlayerDeathEvent bukkitEvent) {
|
||||
this.bukkitEvent = bukkitEvent;
|
||||
@ -61,8 +60,7 @@ public class DGamePlayerDeathEvent extends DGamePlayerEvent implements Cancellab
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lostLives
|
||||
* the lostLives to set
|
||||
* @param lostLives the lostLives to set
|
||||
*/
|
||||
public void setLostLives(int lostLives) {
|
||||
this.lostLives = lostLives;
|
||||
|
@ -43,8 +43,7 @@ public class DGamePlayerFinishEvent extends DGamePlayerEvent implements Cancella
|
||||
}
|
||||
|
||||
/**
|
||||
* @param hasToWait
|
||||
* the hasToWait to set
|
||||
* @param hasToWait the hasToWait to set
|
||||
*/
|
||||
public void setHasToWait(boolean hasToWait) {
|
||||
this.hasToWait = hasToWait;
|
||||
|
@ -38,8 +38,7 @@ public abstract class DSignEvent extends Event {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dSign
|
||||
* the dSign to set
|
||||
* @param dSign the dSign to set
|
||||
*/
|
||||
public void setDSign(DSign dSign) {
|
||||
this.dSign = dSign;
|
||||
|
@ -47,8 +47,7 @@ public class DSignRegistrationEvent extends DSignEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sign
|
||||
* the sign to set
|
||||
* @param sign the sign to set
|
||||
*/
|
||||
public void setSign(Sign sign) {
|
||||
this.sign = sign;
|
||||
@ -62,8 +61,7 @@ public class DSignRegistrationEvent extends DSignEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param gameWorld
|
||||
* the gameWorld to set
|
||||
* @param gameWorld the gameWorld to set
|
||||
*/
|
||||
public void setGameWorld(DGameWorld gameWorld) {
|
||||
this.gameWorld = gameWorld;
|
||||
|
@ -38,8 +38,7 @@ public abstract class EditWorldEvent extends Event {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param editWorld
|
||||
* the editWorld to set
|
||||
* @param editWorld the editWorld to set
|
||||
*/
|
||||
public void setEditWorld(DEditWorld editWorld) {
|
||||
this.editWorld = editWorld;
|
||||
|
@ -42,8 +42,7 @@ public class EditWorldLoadEvent extends Event implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* the name to set
|
||||
* @param name the name to set
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
|
@ -43,8 +43,7 @@ public class EditWorldUnloadEvent extends EditWorldEvent implements Cancellable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param save
|
||||
* the save to set
|
||||
* @param save the save to set
|
||||
*/
|
||||
public void setSave(boolean save) {
|
||||
this.save = save;
|
||||
|
@ -38,8 +38,7 @@ public abstract class GameWorldEvent extends Event {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param gameWorld
|
||||
* the gameWorld to set
|
||||
* @param gameWorld the gameWorld to set
|
||||
*/
|
||||
public void setGameWorld(DGameWorld gameWorld) {
|
||||
this.gameWorld = gameWorld;
|
||||
|
@ -42,8 +42,7 @@ public class GameWorldLoadEvent extends Event implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* the name to set
|
||||
* @param name the name to set
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
|
@ -44,8 +44,7 @@ public class GameWorldStartGameEvent extends GameWorldEvent implements Cancellab
|
||||
}
|
||||
|
||||
/**
|
||||
* @param game
|
||||
* the game to set
|
||||
* @param game the game to set
|
||||
*/
|
||||
public void setGame(Game game) {
|
||||
this.game = game;
|
||||
|
@ -44,8 +44,7 @@ public class RequirementCheckEvent extends RequirementEvent implements Cancellab
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* the player to set
|
||||
* @param player the player to set
|
||||
*/
|
||||
public void setPlayer(Player player) {
|
||||
this.player = player;
|
||||
|
@ -44,8 +44,7 @@ public class RequirementDemandEvent extends RequirementEvent implements Cancella
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* the player to set
|
||||
* @param player the player to set
|
||||
*/
|
||||
public void setPlayer(Player player) {
|
||||
this.player = player;
|
||||
|
@ -39,8 +39,7 @@ public abstract class RequirementEvent extends Event {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param requirement
|
||||
* the requirement to set
|
||||
* @param requirement the requirement to set
|
||||
*/
|
||||
public void setRequirement(Requirement requirement) {
|
||||
this.requirement = requirement;
|
||||
|
@ -44,8 +44,7 @@ public class RewardAdditionEvent extends RewardEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dGroup
|
||||
* the dGroup to set
|
||||
* @param dGroup the dGroup to set
|
||||
*/
|
||||
public void setDGroup(DGroup dGroup) {
|
||||
this.dGroup = dGroup;
|
||||
|
@ -38,8 +38,7 @@ public abstract class RewardEvent extends Event {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reward
|
||||
* the reward to set
|
||||
* @param reward the reward to set
|
||||
*/
|
||||
public void setReward(Reward reward) {
|
||||
this.reward = reward;
|
||||
|
@ -33,8 +33,7 @@ public class TriggerRegistrationEvent extends TriggerEvent implements Cancellabl
|
||||
}
|
||||
|
||||
/**
|
||||
* @param trigger
|
||||
* the trigger to set
|
||||
* @param trigger the trigger to set
|
||||
*/
|
||||
public void setTrigger(Trigger trigger) {
|
||||
this.trigger = trigger;
|
||||
|
@ -41,8 +41,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
/**
|
||||
* Game mostly stores for which purposes and how a {@link de.erethon.dungeonsxl.dungeon.Dungeon} is used,
|
||||
* the player groups and the progress.
|
||||
* Game mostly stores for which purposes and how a {@link de.erethon.dungeonsxl.dungeon.Dungeon} is used, the player groups and the progress.
|
||||
*
|
||||
* @author Daniel Saukel
|
||||
*/
|
||||
@ -135,8 +134,7 @@ public class Game {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tutorial
|
||||
* if the DGameWorld is the tutorial
|
||||
* @param tutorial if the DGameWorld is the tutorial
|
||||
*/
|
||||
public void setTutorial(boolean tutorial) {
|
||||
this.tutorial = tutorial;
|
||||
@ -150,8 +148,7 @@ public class Game {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dGroup
|
||||
* the dGroups to add
|
||||
* @param dGroup the dGroups to add
|
||||
*/
|
||||
public void addDGroup(DGroup dGroup) {
|
||||
dGroups.add(dGroup);
|
||||
@ -162,8 +159,7 @@ public class Game {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dGroup
|
||||
* the dGroups to remove
|
||||
* @param dGroup the dGroups to remove
|
||||
*/
|
||||
public void removeDGroup(DGroup dGroup) {
|
||||
dGroups.remove(dGroup);
|
||||
@ -181,8 +177,7 @@ public class Game {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param started
|
||||
* set if the Game has started yet
|
||||
* @param started set if the Game has started yet
|
||||
*/
|
||||
public void setStarted(boolean started) {
|
||||
this.started = started;
|
||||
@ -196,8 +191,7 @@ public class Game {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* the type to set
|
||||
* @param type the type to set
|
||||
*/
|
||||
public void setType(GameType type) {
|
||||
this.type = type;
|
||||
@ -211,8 +205,7 @@ public class Game {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param world
|
||||
* the DGameWorld to connect to the Game
|
||||
* @param world the DGameWorld to connect to the Game
|
||||
*/
|
||||
public void setWorld(DGameWorld world) {
|
||||
this.world = world;
|
||||
@ -226,21 +219,15 @@ public class Game {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rules
|
||||
* the GameRules to set
|
||||
* @param rules the GameRules to set
|
||||
*/
|
||||
public void setRules(GameRuleProvider rules) {
|
||||
this.rules = rules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetchs 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
|
||||
* Fetchs 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
|
||||
*/
|
||||
public void fetchRules() {
|
||||
DungeonConfig dungeonConfig = null;
|
||||
@ -316,8 +303,7 @@ public class Game {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param waveCount
|
||||
* the waveCount to set
|
||||
* @param waveCount the waveCount to set
|
||||
*/
|
||||
public void setWaveCount(int waveCount) {
|
||||
this.waveCount = waveCount;
|
||||
@ -346,8 +332,7 @@ public class Game {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param killer
|
||||
* the killer; null if the killer is not a player
|
||||
* @param killer the killer; null if the killer is not a player
|
||||
*/
|
||||
public void addKill(String killer) {
|
||||
if (killer == null) {
|
||||
@ -406,10 +391,8 @@ public class Game {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mobCountIncreaseRate
|
||||
* the new mob count will be increased by this rate
|
||||
* @param teleport
|
||||
* whether or not to teleport the players to the start location
|
||||
* @param mobCountIncreaseRate the new mob count will be increased by this rate
|
||||
* @param teleport whether or not to teleport the players to the start location
|
||||
*/
|
||||
public void finishWave(final double mobCountIncreaseRate, final boolean teleport) {
|
||||
waveCount++;
|
||||
|
@ -24,13 +24,11 @@ package de.erethon.dungeonsxl.game;
|
||||
public enum GameGoal {
|
||||
|
||||
/**
|
||||
* The default goal.
|
||||
* The game ends when the end is reached.
|
||||
* 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.
|
||||
* The game does not end. Instead, the goal is to survive as long as possible to beat a highscore.
|
||||
*/
|
||||
HIGHSCORE,
|
||||
/**
|
||||
@ -42,13 +40,11 @@ public enum GameGoal {
|
||||
*/
|
||||
REACH_SCORE,
|
||||
/**
|
||||
* The game ends after a specific time.
|
||||
* The goal is to get the highest score until then.
|
||||
* 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.
|
||||
* The game ends after a specific time. The goal is to survive until then.
|
||||
*/
|
||||
TIME_SURVIVAL;
|
||||
|
||||
|
@ -261,50 +261,42 @@ public class GameRuleProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* if it's raining permanently in this dungeon,
|
||||
* null if random
|
||||
* @return if it's raining permanently in this dungeon, null if random
|
||||
*/
|
||||
public Boolean isRaining() {
|
||||
return rain;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rain
|
||||
* set if it's raining permanently in this dungeon
|
||||
* @param rain set if it's raining permanently in this dungeon
|
||||
*/
|
||||
public void setRaining(Boolean rain) {
|
||||
this.rain = rain;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* You've been... THUNDERSTRUCK!
|
||||
* @return You've been... THUNDERSTRUCK!
|
||||
*/
|
||||
public Boolean isThundering() {
|
||||
return thunder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param thunder
|
||||
* You've been... THUNDERSTRUCK!
|
||||
* @param thunder You've been... THUNDERSTRUCK!
|
||||
*/
|
||||
public void setThundering(Boolean thunder) {
|
||||
this.thunder = thunder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* the locked day time in this dungeon,
|
||||
* null if not locked
|
||||
* @return the locked day time in this dungeon, null if not locked
|
||||
*/
|
||||
public Long getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param time
|
||||
* the locked day time to set
|
||||
* @param time the locked day time to set
|
||||
*/
|
||||
public void setTime(Long time) {
|
||||
this.time = time;
|
||||
@ -432,8 +424,7 @@ public class GameRuleProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return all maps needed to be finished to play this map and a collection of maps of which at
|
||||
* least one has to be finished
|
||||
* @return all maps needed to be finished to play this map and a collection of maps of which at least one has to be finished
|
||||
*/
|
||||
public List<String> getFinished() {
|
||||
if (finishedAll == null) {
|
||||
@ -489,8 +480,7 @@ public class GameRuleProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param text
|
||||
* the text to set
|
||||
* @param text the text to set
|
||||
*/
|
||||
public void setTitle(String text) {
|
||||
title = text;
|
||||
@ -504,8 +494,7 @@ public class GameRuleProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param text
|
||||
* the text to set
|
||||
* @param text the text to set
|
||||
*/
|
||||
public void setSubTitle(String text) {
|
||||
subtitle = text;
|
||||
@ -519,8 +508,7 @@ public class GameRuleProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param text
|
||||
* the text to set
|
||||
* @param text the text to set
|
||||
*/
|
||||
public void setActionBar(String text) {
|
||||
actionBar = text;
|
||||
@ -534,8 +522,7 @@ public class GameRuleProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param text
|
||||
* the text to set
|
||||
* @param text the text to set
|
||||
*/
|
||||
public void setChatText(String text) {
|
||||
chat = text;
|
||||
@ -549,8 +536,7 @@ public class GameRuleProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param time
|
||||
* the time to set
|
||||
* @param time the time to set
|
||||
*/
|
||||
public void setTitleFadeIn(int time) {
|
||||
titleFadeIn = time;
|
||||
@ -564,8 +550,7 @@ public class GameRuleProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param time
|
||||
* the time to set
|
||||
* @param time the time to set
|
||||
*/
|
||||
public void setTitleFadeOut(int time) {
|
||||
titleFadeOut = time;
|
||||
@ -579,8 +564,7 @@ public class GameRuleProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param time
|
||||
* the time to set
|
||||
* @param time the time to set
|
||||
*/
|
||||
public void setTitleShow(int time) {
|
||||
titleShow = time;
|
||||
@ -588,8 +572,8 @@ public class GameRuleProvider {
|
||||
|
||||
// Misc
|
||||
/**
|
||||
* @param id
|
||||
* the id of the message
|
||||
* @param id the id of the message
|
||||
* @return the message
|
||||
*/
|
||||
public String getMessage(int id) {
|
||||
if (msgs == null) {
|
||||
@ -599,10 +583,8 @@ public class GameRuleProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
* the ID of the message
|
||||
* @param msg
|
||||
* the message to set
|
||||
* @param id the ID of the message
|
||||
* @param msg the message to set
|
||||
*/
|
||||
public void setMessage(int id, String msg) {
|
||||
if (msgs == null) {
|
||||
@ -622,9 +604,7 @@ public class GameRuleProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* if the group tag is enabled.
|
||||
* Returns false if HolographicDisplays isn't loaded
|
||||
* @return if the group tag is enabled. Returns false if HolographicDisplays isn't loaded
|
||||
*/
|
||||
public boolean isGroupTagEnabled() {
|
||||
if (!Bukkit.getPluginManager().isPluginEnabled("HolographicDisplays")) {
|
||||
@ -635,8 +615,7 @@ public class GameRuleProvider {
|
||||
|
||||
/* Actions */
|
||||
/**
|
||||
* @param defaultValues
|
||||
* the GameType that overrides the values that are null.
|
||||
* @param defaultValues the GameType that overrides the values that are null.
|
||||
*/
|
||||
public void apply(GameType defaultValues) {
|
||||
if (playerVersusPlayer == null) {
|
||||
@ -675,8 +654,7 @@ public class GameRuleProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param defaultValues
|
||||
* the GameRules that override the values that are null.
|
||||
* @param defaultValues the GameRules that override the values that are null.
|
||||
*/
|
||||
public void apply(GameRuleProvider defaultValues) {
|
||||
/* keepInventory */
|
||||
|
@ -31,8 +31,7 @@ public interface GameType {
|
||||
public String getDisplayName();
|
||||
|
||||
/**
|
||||
* @param displayName
|
||||
* the displayName to set
|
||||
* @param displayName the displayName to set
|
||||
*/
|
||||
public void setDisplayName(String displayName);
|
||||
|
||||
@ -42,8 +41,7 @@ public interface GameType {
|
||||
public String getSignName();
|
||||
|
||||
/**
|
||||
* @param signName
|
||||
* the signName to set
|
||||
* @param signName the signName to set
|
||||
*/
|
||||
public void setSignName(String signName);
|
||||
|
||||
@ -53,8 +51,7 @@ public interface GameType {
|
||||
public GameGoal getGameGoal();
|
||||
|
||||
/**
|
||||
* @param gameGoal
|
||||
* the goal of the game to set
|
||||
* @param gameGoal the goal of the game to set
|
||||
*/
|
||||
public void setGameGoal(GameGoal gameGoal);
|
||||
|
||||
@ -64,8 +61,7 @@ public interface GameType {
|
||||
public Boolean isPlayerVersusPlayer();
|
||||
|
||||
/**
|
||||
* @param playerVersusPlayer
|
||||
* the playerVersusPlayer to set
|
||||
* @param playerVersusPlayer the playerVersusPlayer to set
|
||||
*/
|
||||
public void setPlayerVersusPlayer(Boolean playerVersusPlayer);
|
||||
|
||||
@ -75,8 +71,7 @@ public interface GameType {
|
||||
public Boolean isFriendlyFire();
|
||||
|
||||
/**
|
||||
* @param friendlyFire
|
||||
* the friendlyFire to set
|
||||
* @param friendlyFire the friendlyFire to set
|
||||
*/
|
||||
public void setFriendlyFire(Boolean friendlyFire);
|
||||
|
||||
@ -86,8 +81,7 @@ public interface GameType {
|
||||
public Boolean hasRewards();
|
||||
|
||||
/**
|
||||
* @param rewards
|
||||
* enable / disable rewards
|
||||
* @param rewards enable / disable rewards
|
||||
*/
|
||||
public void setRewards(Boolean rewards);
|
||||
|
||||
@ -97,8 +91,7 @@ public interface GameType {
|
||||
public Boolean getShowTime();
|
||||
|
||||
/**
|
||||
* @param showTime
|
||||
* set if players shall see how long they play
|
||||
* @param showTime set if players shall see how long they play
|
||||
*/
|
||||
public void setShowTime(Boolean showTime);
|
||||
|
||||
@ -108,8 +101,7 @@ public interface GameType {
|
||||
public Boolean canBreakBlocks();
|
||||
|
||||
/**
|
||||
* @param breakBlocks
|
||||
* if blocks may be destroyed
|
||||
* @param breakBlocks if blocks may be destroyed
|
||||
*/
|
||||
public void setBreakBlocks(Boolean breakBlocks);
|
||||
|
||||
@ -119,8 +111,7 @@ public interface GameType {
|
||||
public Boolean canBreakPlacedBlocks();
|
||||
|
||||
/**
|
||||
* @param breakPlacedBlocks
|
||||
* if placed blocks may be destroyed
|
||||
* @param breakPlacedBlocks if placed blocks may be destroyed
|
||||
*/
|
||||
public void setBreakPlacedBlocks(Boolean breakPlacedBlocks);
|
||||
|
||||
@ -130,8 +121,7 @@ public interface GameType {
|
||||
public Boolean canPlaceBlocks();
|
||||
|
||||
/**
|
||||
* @param placeBlocks
|
||||
* if blocks may be placed
|
||||
* @param placeBlocks if blocks may be placed
|
||||
*/
|
||||
public void setPlaceBlocks(Boolean placeBlocks);
|
||||
|
||||
@ -141,8 +131,7 @@ public interface GameType {
|
||||
public GameMode getGameMode();
|
||||
|
||||
/**
|
||||
* @param gameMode
|
||||
* the gameMode to set
|
||||
* @param gameMode the gameMode to set
|
||||
*/
|
||||
public void setGameMode(GameMode gameMode);
|
||||
|
||||
@ -152,8 +141,7 @@ public interface GameType {
|
||||
public Boolean hasLives();
|
||||
|
||||
/**
|
||||
* @param lives
|
||||
* set if the gametype uses player lives
|
||||
* @param lives set if the gametype uses player lives
|
||||
*/
|
||||
public void setLives(Boolean lives);
|
||||
|
||||
|
@ -47,6 +47,7 @@ public class GameTypeCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name the name to check
|
||||
* @return the game type which has the enum value name
|
||||
*/
|
||||
public GameType getByName(String name) {
|
||||
@ -60,6 +61,7 @@ public class GameTypeCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sign the sign to check
|
||||
* @return the game type which has the enum value sign text in the second line of the sign
|
||||
*/
|
||||
public GameType getBySign(DSign sign) {
|
||||
@ -82,16 +84,14 @@ public class GameTypeCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* the game type to add
|
||||
* @param type the game type to add
|
||||
*/
|
||||
public void addGameType(GameType type) {
|
||||
types.add(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param game
|
||||
* the game to remove
|
||||
* @param type the game type to remove
|
||||
*/
|
||||
public void removeGameType(GameType type) {
|
||||
types.remove(type);
|
||||
|
@ -81,8 +81,7 @@ public class DPortal extends GlobalProtection {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param block1
|
||||
* the block1 to set
|
||||
* @param block1 the block1 to set
|
||||
*/
|
||||
public void setBlock1(Block block1) {
|
||||
this.block1 = block1;
|
||||
@ -96,8 +95,7 @@ public class DPortal extends GlobalProtection {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param block2
|
||||
* the block2 to set
|
||||
* @param block2 the block2 to set
|
||||
*/
|
||||
public void setBlock2(Block block2) {
|
||||
this.block2 = block2;
|
||||
@ -111,8 +109,7 @@ public class DPortal extends GlobalProtection {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param active
|
||||
* set the DPortal active
|
||||
* @param active set the DPortal active
|
||||
*/
|
||||
public void setActive(boolean active) {
|
||||
this.active = active;
|
||||
@ -120,6 +117,8 @@ public class DPortal extends GlobalProtection {
|
||||
|
||||
/**
|
||||
* Create a new DPortal
|
||||
*
|
||||
* @param player the creator
|
||||
*/
|
||||
public void create(DGlobalPlayer player) {
|
||||
if (block1 == null || block2 == null) {
|
||||
@ -188,8 +187,7 @@ public class DPortal extends GlobalProtection {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* the player to teleport into his dungeon
|
||||
* @param player the player to teleport into his dungeon
|
||||
*/
|
||||
public void teleport(Player player) {
|
||||
DGroup dGroup = DGroup.getByPlayer(player);
|
||||
@ -330,16 +328,16 @@ public class DPortal extends GlobalProtection {
|
||||
|
||||
/* Statics */
|
||||
/**
|
||||
* @param location
|
||||
* a location covered by the returned portal
|
||||
* @param location a location covered by the returned portal
|
||||
* @return the portal at the location, null if there is none
|
||||
*/
|
||||
public static DPortal getByLocation(Location location) {
|
||||
return getByBlock(location.getBlock());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param block
|
||||
* a block covered by the returned portal
|
||||
* @param block a block covered by the returned portal
|
||||
* @return the portal that the block belongs to, null if it belongs to none
|
||||
*/
|
||||
public static DPortal getByBlock(Block block) {
|
||||
for (GlobalProtection protection : DungeonsXL.getInstance().getGlobalProtections().getProtections(DPortal.class)) {
|
||||
|
@ -50,16 +50,14 @@ public class GameSign extends JoinSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* the attached game
|
||||
* @return the attached game
|
||||
*/
|
||||
public Game getGame() {
|
||||
return game;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param game
|
||||
* the game to set
|
||||
* @param game the game to set
|
||||
*/
|
||||
public void setGame(Game game) {
|
||||
this.game = game;
|
||||
@ -172,8 +170,8 @@ public class GameSign extends JoinSign {
|
||||
|
||||
/* Statics */
|
||||
/**
|
||||
* @param block
|
||||
* a block which is protected by the returned GameSign
|
||||
* @param block a block which is protected by the returned GameSign
|
||||
* @return the game sign the block belongs to, null if it belongs to none
|
||||
*/
|
||||
public static GameSign getByBlock(Block block) {
|
||||
if (!Category.SIGNS.containsBlock(block)) {
|
||||
@ -192,8 +190,8 @@ public class GameSign extends JoinSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param game
|
||||
* the game to check
|
||||
* @param game the game to check
|
||||
* @return the game that this sign creates
|
||||
*/
|
||||
public static GameSign getByGame(Game game) {
|
||||
for (GlobalProtection protection : DungeonsXL.getInstance().getGlobalProtections().getProtections(GameSign.class)) {
|
||||
|
@ -55,8 +55,7 @@ public abstract class GlobalProtection {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param world
|
||||
* the world to set
|
||||
* @param world the world to set
|
||||
*/
|
||||
public void setWorld(World world) {
|
||||
this.world = world;
|
||||
@ -85,8 +84,7 @@ public abstract class GlobalProtection {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param file
|
||||
* the file to save the protection to
|
||||
* @param file the file to save the protection to
|
||||
*/
|
||||
public void save(File file) {
|
||||
save(YamlConfiguration.loadConfiguration(file));
|
||||
@ -107,8 +105,7 @@ public abstract class GlobalProtection {
|
||||
|
||||
/* Abstracts */
|
||||
/**
|
||||
* @param config
|
||||
* the config to save the protection to
|
||||
* @param config the config to save the protection to
|
||||
*/
|
||||
public abstract void save(FileConfiguration config);
|
||||
|
||||
|
@ -45,6 +45,7 @@ public class GlobalProtectionCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param location the location to check
|
||||
* @return the protection which covers this location
|
||||
*/
|
||||
public GlobalProtection getByLocation(Location location) {
|
||||
@ -52,6 +53,7 @@ public class GlobalProtectionCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param block the block to check
|
||||
* @return the protection which covers this block
|
||||
*/
|
||||
public GlobalProtection getByBlock(Block block) {
|
||||
@ -72,8 +74,8 @@ public class GlobalProtectionCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* All protections which are an instance of it will be returned.
|
||||
* @param type All protections which are an instance of it will be returned.
|
||||
* @return the protections of the type
|
||||
*/
|
||||
public Set<GlobalProtection> getProtections(Class<? extends GlobalProtection> type) {
|
||||
Set<GlobalProtection> protectionsOfType = new HashSet<>();
|
||||
@ -86,16 +88,14 @@ public class GlobalProtectionCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param protection
|
||||
* the protection type to add
|
||||
* @param protection the protection type to add
|
||||
*/
|
||||
public void addProtection(GlobalProtection protection) {
|
||||
protections.add(protection);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param protection
|
||||
* the protection to remove
|
||||
* @param protection the protection to remove
|
||||
*/
|
||||
public void removeProtection(GlobalProtection protection) {
|
||||
protections.remove(protection);
|
||||
@ -109,16 +109,14 @@ public class GlobalProtectionCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param file
|
||||
* the file to save all protections to
|
||||
* @param file the file to save all protections to
|
||||
*/
|
||||
public void saveAll(File file) {
|
||||
saveAll(YamlConfiguration.loadConfiguration(file));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param config
|
||||
* the config to save all protections to
|
||||
* @param config the config to save all protections to
|
||||
*/
|
||||
public void saveAll(FileConfiguration config) {
|
||||
config.set("protections", null);
|
||||
@ -130,10 +128,8 @@ public class GlobalProtectionCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* Each type is stored seperately.
|
||||
* @param world
|
||||
* Each world has its own IDs.
|
||||
* @param type Each type is stored seperately.
|
||||
* @param world Each world has its own IDs.
|
||||
* @return an unused ID number for a new protection
|
||||
*/
|
||||
public int generateId(Class<? extends GlobalProtection> type, World world) {
|
||||
@ -147,8 +143,8 @@ public class GlobalProtectionCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param block
|
||||
* the block to check
|
||||
* @param block the block to check
|
||||
* @return if the block is protected by a GlobalProtection
|
||||
*/
|
||||
public boolean isProtectedBlock(Block block) {
|
||||
for (GlobalProtection protection : protections) {
|
||||
|
@ -51,16 +51,14 @@ public class GroupSign extends JoinSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* the attached group
|
||||
* @return the attached group
|
||||
*/
|
||||
public DGroup getGroup() {
|
||||
return group;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param group
|
||||
* the group to set
|
||||
* @param group the group to set
|
||||
*/
|
||||
public void setGroup(DGroup group) {
|
||||
this.group = group;
|
||||
@ -162,8 +160,8 @@ public class GroupSign extends JoinSign {
|
||||
|
||||
/* Statics */
|
||||
/**
|
||||
* @param block
|
||||
* a block which is protected by the returned GroupSign
|
||||
* @param block a block which is protected by the returned GroupSign
|
||||
* @return the group sign the block belongs to, null if it belongs to none
|
||||
*/
|
||||
public static GroupSign getByBlock(Block block) {
|
||||
if (!Category.SIGNS.containsBlock(block)) {
|
||||
|
@ -57,32 +57,28 @@ public class JoinSign extends GlobalProtection {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* the dungeon
|
||||
* @return the dungeon
|
||||
*/
|
||||
public Dungeon getDungeon() {
|
||||
return dungeon;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dungeon
|
||||
* the dungeon to set
|
||||
* @param dungeon the dungeon to set
|
||||
*/
|
||||
public void setDungeon(Dungeon dungeon) {
|
||||
this.dungeon = dungeon;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* the maximum element count per sign
|
||||
* @return the maximum element count per sign
|
||||
*/
|
||||
public int getMaxElements() {
|
||||
return maxElements;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param maxElements
|
||||
* the maximum element count per sign
|
||||
* @param maxElements the maximum element count per sign
|
||||
*/
|
||||
public void setMaxElements(int maxElements) {
|
||||
this.maxElements = maxElements;
|
||||
|
@ -99,8 +99,8 @@ public class LeaveSign extends GlobalProtection {
|
||||
|
||||
/* Statics */
|
||||
/**
|
||||
* @param block
|
||||
* a block which is protected by the returned LeaveSign
|
||||
* @param block a block which is protected by the returned LeaveSign
|
||||
* @return the leave sign the block belongs to, null if it belongs to none
|
||||
*/
|
||||
public static LeaveSign getByBlock(Block block) {
|
||||
for (GlobalProtection protection : DungeonsXL.getInstance().getGlobalProtections().getProtections(LeaveSign.class)) {
|
||||
|
@ -55,16 +55,14 @@ public class CitizensMobProvider implements ExternalMobProvider, Listener {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param npc
|
||||
* the NPC to add
|
||||
* @param npc the NPC to add
|
||||
*/
|
||||
public void addSpawnedNPC(NPC npc) {
|
||||
spawnedNPCs.add(npc);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param npc
|
||||
* the NPC to remove
|
||||
* @param npc the NPC to remove
|
||||
*/
|
||||
public void removeSpawnedNPC(NPC npc) {
|
||||
spawnedNPCs.remove(npc);
|
||||
|
@ -70,18 +70,15 @@ public class DMobType extends ExMob {
|
||||
private String ocelotType = null;
|
||||
|
||||
/**
|
||||
* @param file
|
||||
* the script file
|
||||
* @param file the script file
|
||||
*/
|
||||
public DMobType(File file) {
|
||||
this(file.getName().substring(0, file.getName().length() - 4), YamlConfiguration.loadConfiguration(file));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* the name of the DMobType
|
||||
* @param config
|
||||
* the config that stores the information
|
||||
* @param name the name of the DMobType
|
||||
* @param config the config that stores the information
|
||||
*/
|
||||
public DMobType(String name, FileConfiguration config) {
|
||||
this.name = name;
|
||||
@ -190,10 +187,8 @@ public class DMobType extends ExMob {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* the name of the DMobType
|
||||
* @param type
|
||||
* the EntityType of the mob
|
||||
* @param name the name of the DMobType
|
||||
* @param type the EntityType of the mob
|
||||
*/
|
||||
public DMobType(String name, EntityType type) {
|
||||
this.name = name;
|
||||
@ -209,8 +204,7 @@ public class DMobType extends ExMob {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* the name to set
|
||||
* @param name the name to set
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
@ -224,8 +218,7 @@ public class DMobType extends ExMob {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* the type to set
|
||||
* @param type the type to set
|
||||
*/
|
||||
public void setType(EntityType type) {
|
||||
this.type = type;
|
||||
@ -239,8 +232,7 @@ public class DMobType extends ExMob {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param maxHealth
|
||||
* the maxHealth to set
|
||||
* @param maxHealth the maxHealth to set
|
||||
*/
|
||||
public void setMaxHealth(int maxHealth) {
|
||||
this.maxHealth = maxHealth;
|
||||
@ -254,8 +246,7 @@ public class DMobType extends ExMob {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param itemHand
|
||||
* the itemHand to set
|
||||
* @param itemHand the itemHand to set
|
||||
*/
|
||||
public void setitemHand(ItemStack itemHand) {
|
||||
this.itemHand = itemHand;
|
||||
@ -269,8 +260,7 @@ public class DMobType extends ExMob {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param itemHelmet
|
||||
* the itemHelmet to set
|
||||
* @param itemHelmet the itemHelmet to set
|
||||
*/
|
||||
public void setitemHelmet(ItemStack itemHelmet) {
|
||||
this.itemHelmet = itemHelmet;
|
||||
@ -284,8 +274,7 @@ public class DMobType extends ExMob {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param itemChestplate
|
||||
* the itemChestplate to set
|
||||
* @param itemChestplate the itemChestplate to set
|
||||
*/
|
||||
public void setitemChestplate(ItemStack itemChestplate) {
|
||||
this.itemChestplate = itemChestplate;
|
||||
@ -299,8 +288,7 @@ public class DMobType extends ExMob {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param itemLeggings
|
||||
* the itemLeggings to set
|
||||
* @param itemLeggings the itemLeggings to set
|
||||
*/
|
||||
public void setitemLeggings(ItemStack itemLeggings) {
|
||||
this.itemLeggings = itemLeggings;
|
||||
@ -314,8 +302,7 @@ public class DMobType extends ExMob {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param itemBoots
|
||||
* the itemBoots to set
|
||||
* @param itemBoots the itemBoots to set
|
||||
*/
|
||||
public void setitemBoots(ItemStack itemBoots) {
|
||||
this.itemBoots = itemBoots;
|
||||
@ -329,8 +316,7 @@ public class DMobType extends ExMob {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param drops
|
||||
* the drops to set
|
||||
* @param drops the drops to set
|
||||
*/
|
||||
public void setDrops(Map<ItemStack, Integer> drops) {
|
||||
this.drops = drops;
|
||||
@ -344,8 +330,7 @@ public class DMobType extends ExMob {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param witherSkeleton
|
||||
* set if the skeleton is a wither skeleton
|
||||
* @param witherSkeleton set if the skeleton is a wither skeleton
|
||||
*/
|
||||
public void setWitherSkeleton(boolean witherSkeleton) {
|
||||
this.witherSkeleton = witherSkeleton;
|
||||
@ -359,8 +344,7 @@ public class DMobType extends ExMob {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ocelotType
|
||||
* the ocelotType to set
|
||||
* @param ocelotType the ocelotType to set
|
||||
*/
|
||||
public void setOcelotType(String ocelotType) {
|
||||
this.ocelotType = ocelotType;
|
||||
|
@ -125,10 +125,8 @@ public class DNPCRegistry implements NPCRegistry {
|
||||
/**
|
||||
* Clones an NPC without spamming the config.
|
||||
*
|
||||
* @param npc
|
||||
* the NPC to clone
|
||||
* @return
|
||||
* a clone of the NPC
|
||||
* @param npc the NPC to clone
|
||||
* @return a clone of the NPC
|
||||
*/
|
||||
public NPC createTransientClone(AbstractNPC npc) {
|
||||
NPC copy = createNPC(npc.getTrait(MobType.class).getType(), npc.getFullName());
|
||||
|
@ -36,25 +36,18 @@ public interface ExternalMobProvider {
|
||||
public String getRawCommand();
|
||||
|
||||
/**
|
||||
* @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
|
||||
* @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
|
||||
*/
|
||||
public String getCommand(String mob, String world, double x, double y, double z);
|
||||
|
||||
/**
|
||||
* @param mob
|
||||
* the mob identifier
|
||||
* @param location
|
||||
* the location where the mob will be spawned
|
||||
* @param mob the mob identifier
|
||||
* @param location the location where the mob will be spawned
|
||||
*/
|
||||
public void summon(String mob, Location location);
|
||||
|
||||
|
@ -53,8 +53,8 @@ public class ExternalMobProviderCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param identifier
|
||||
* the identifier for ExternalMob signs
|
||||
* @param identifier the identifier to check
|
||||
* @return the ExternalMobProvider represented by the identifier
|
||||
*/
|
||||
public ExternalMobProvider getByIdentifier(String identifier) {
|
||||
for (ExternalMobProvider provider : providers) {
|
||||
@ -87,16 +87,14 @@ public class ExternalMobProviderCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param provider
|
||||
* the provider to register
|
||||
* @param provider the provider to register
|
||||
*/
|
||||
public void addExternalMobProvider(ExternalMobProvider provider) {
|
||||
providers.add(provider);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param provider
|
||||
* the provider to unregister
|
||||
* @param provider the provider to unregister
|
||||
*/
|
||||
public void removeExternalMobProvider(ExternalMobProvider provider) {
|
||||
providers.remove(provider);
|
||||
|
@ -77,16 +77,14 @@ public class DClass {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param itemStack
|
||||
* the ItemStack to add
|
||||
* @param itemStack the ItemStack to add
|
||||
*/
|
||||
public void addItem(ItemStack itemStack) {
|
||||
items.add(itemStack);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param itemStack
|
||||
* the ItemStack to remove
|
||||
* @param itemStack the ItemStack to remove
|
||||
*/
|
||||
public void removeItem(ItemStack itemStack) {
|
||||
items.remove(itemStack);
|
||||
@ -100,8 +98,7 @@ public class DClass {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dog
|
||||
* set if the class has a dog
|
||||
* @param dog set if the class has a dog
|
||||
*/
|
||||
public void setDog(boolean dog) {
|
||||
this.dog = dog;
|
||||
|
@ -39,6 +39,7 @@ public class DClassCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name the name to check
|
||||
* @return the dClass that has the name
|
||||
*/
|
||||
public DClass getByName(String name) {
|
||||
@ -59,16 +60,14 @@ public class DClassCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dClass
|
||||
* the DClass to add
|
||||
* @param dClass the DClass to add
|
||||
*/
|
||||
public void addDClass(DClass dClass) {
|
||||
dClasses.add(dClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dClass
|
||||
* the DClass to remove
|
||||
* @param dClass the DClass to remove
|
||||
*/
|
||||
public void removeDClass(DClass dClass) {
|
||||
dClasses.remove(dClass);
|
||||
|
@ -73,10 +73,8 @@ public class DEditPlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* the represented Player
|
||||
* @param editWorld
|
||||
* the player's EditWorld
|
||||
* @param player the represented Player
|
||||
* @param editWorld the player's EditWorld
|
||||
*/
|
||||
public static void create(Player player, DEditWorld editWorld) {
|
||||
new CreateDInstancePlayerTask(player, editWorld).runTaskTimer(DungeonsXL.getInstance(), 0L, 5L);
|
||||
@ -91,8 +89,7 @@ public class DEditPlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param linesCopy
|
||||
* the linesCopy to set
|
||||
* @param linesCopy the linesCopy to set
|
||||
*/
|
||||
public void setLinesCopy(String[] linesCopy) {
|
||||
this.linesCopy = linesCopy;
|
||||
|
@ -112,23 +112,17 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* the represented Player
|
||||
* @param gameWorld
|
||||
* the player's GameWorld
|
||||
* @param player the represented Player
|
||||
* @param gameWorld the player's GameWorld
|
||||
*/
|
||||
public static void create(Player player, DGameWorld gameWorld) {
|
||||
create(player, gameWorld, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* the represented Player
|
||||
* @param gameWorld
|
||||
* the player's GameWorld
|
||||
* @param ready
|
||||
* Any GameType if the player will be ready from the beginning
|
||||
* null if the player will not be ready from the beginning
|
||||
* @param player the represented Player
|
||||
* @param gameWorld the player's GameWorld
|
||||
* @param ready Any GameType if the player will be ready from the beginning null if the player will not be ready from the beginning
|
||||
*/
|
||||
public static void create(Player player, DGameWorld gameWorld, GameType ready) {
|
||||
new CreateDInstancePlayerTask(player, gameWorld, ready).runTaskTimer(DungeonsXL.getInstance(), 0L, 5L);
|
||||
@ -155,8 +149,7 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* the player to set
|
||||
* @param player the player to set
|
||||
*/
|
||||
public void setPlayer(Player player) {
|
||||
this.player = player;
|
||||
@ -196,8 +189,7 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ready
|
||||
* If the player is ready to play the dungeon
|
||||
* @param ready If the player is ready to play the dungeon
|
||||
*/
|
||||
public void setReady(boolean ready) {
|
||||
this.ready = ready;
|
||||
@ -211,8 +203,7 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param finished
|
||||
* the finished to set
|
||||
* @param finished the finished to set
|
||||
*/
|
||||
public void setFinished(boolean finished) {
|
||||
this.finished = finished;
|
||||
@ -226,8 +217,7 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dClass
|
||||
* the dClass to set
|
||||
* @param className the name of the class to set
|
||||
*/
|
||||
public void setDClass(String className) {
|
||||
Game game = Game.getByWorld(getPlayer().getWorld());
|
||||
@ -303,8 +293,7 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param checkpoint
|
||||
* the checkpoint to set
|
||||
* @param checkpoint the checkpoint to set
|
||||
*/
|
||||
public void setCheckpoint(Location checkpoint) {
|
||||
this.checkpoint = checkpoint;
|
||||
@ -318,8 +307,7 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param wolf
|
||||
* the wolf to set
|
||||
* @param wolf the wolf to set
|
||||
*/
|
||||
public void setWolf(Wolf wolf) {
|
||||
this.wolf = wolf;
|
||||
@ -333,8 +321,7 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param wolfRespawnTime
|
||||
* the wolfRespawnTime to set
|
||||
* @param wolfRespawnTime the wolfRespawnTime to set
|
||||
*/
|
||||
public void setWolfRespawnTime(int wolfRespawnTime) {
|
||||
this.wolfRespawnTime = wolfRespawnTime;
|
||||
@ -348,8 +335,7 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param offlineTime
|
||||
* the offlineTime to set
|
||||
* @param offlineTime the offlineTime to set
|
||||
*/
|
||||
public void setOfflineTime(long offlineTime) {
|
||||
this.offlineTime = offlineTime;
|
||||
@ -363,8 +349,7 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param initialLives
|
||||
* the initialLives to set
|
||||
* @param initialLives the initialLives to set
|
||||
*/
|
||||
public void setInitialLives(int initialLives) {
|
||||
this.initialLives = initialLives;
|
||||
@ -378,8 +363,7 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lives
|
||||
* the lives to set
|
||||
* @param lives the lives to set
|
||||
*/
|
||||
public void setLives(int lives) {
|
||||
this.lives = lives;
|
||||
@ -400,8 +384,7 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dGroup
|
||||
* the group whose flag is stolen
|
||||
* @param dGroup the group whose flag is stolen
|
||||
*/
|
||||
public void setRobbedGroup(DGroup dGroup) {
|
||||
if (dGroup != null) {
|
||||
@ -413,16 +396,14 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* the player's group tag
|
||||
* @return the player's group tag
|
||||
*/
|
||||
public DGroupTag getDGroupTag() {
|
||||
return groupTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* the player's group tag
|
||||
* Creates a new group tag for the player.
|
||||
*/
|
||||
public void initDGroupTag() {
|
||||
groupTag = new DGroupTag(this);
|
||||
@ -470,8 +451,7 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param message
|
||||
* if messages should be sent
|
||||
* @param message if messages should be sent
|
||||
*/
|
||||
public void leave(boolean message) {
|
||||
Game game = Game.getByWorld(getWorld());
|
||||
@ -761,8 +741,7 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
/**
|
||||
* The DGamePlayer finishs the current floor.
|
||||
*
|
||||
* @param specifiedFloor
|
||||
* the name of the next floor
|
||||
* @param specifiedFloor the name of the next floor
|
||||
*/
|
||||
public void finishFloor(DResourceWorld specifiedFloor) {
|
||||
if (!dGroup.getDungeon().isMultiFloor()) {
|
||||
@ -803,8 +782,7 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param message
|
||||
* if messages should be sent
|
||||
* @param message if messages should be sent
|
||||
*/
|
||||
public void finish(boolean message) {
|
||||
if (message) {
|
||||
|
@ -116,6 +116,8 @@ public class DGlobalPlayer implements PlayerWrapper {
|
||||
|
||||
/**
|
||||
* Load / reload a new instance of DPlayerData
|
||||
*
|
||||
* @param file the file to load from
|
||||
*/
|
||||
public void loadPlayerData(File file) {
|
||||
data = new DPlayerData(file);
|
||||
@ -129,8 +131,7 @@ public class DGlobalPlayer implements PlayerWrapper {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param breakMode
|
||||
* sets if the player is in break mode
|
||||
* @param breakMode sets if the player is in break mode
|
||||
*/
|
||||
public void setInBreakMode(boolean breakMode) {
|
||||
this.breakMode = breakMode;
|
||||
@ -147,8 +148,7 @@ public class DGlobalPlayer implements PlayerWrapper {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param groupChat
|
||||
* set if the player is in group chat
|
||||
* @param groupChat set if the player is in group chat
|
||||
*/
|
||||
public void setInGroupChat(boolean groupChat) {
|
||||
this.groupChat = groupChat;
|
||||
@ -165,8 +165,7 @@ public class DGlobalPlayer implements PlayerWrapper {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param chatSpyMode
|
||||
* sets if the player is in chat spy mode
|
||||
* @param chatSpyMode sets if the player is in chat spy mode
|
||||
*/
|
||||
public void setInChatSpyMode(boolean chatSpyMode) {
|
||||
this.chatSpyMode = chatSpyMode;
|
||||
@ -187,8 +186,7 @@ public class DGlobalPlayer implements PlayerWrapper {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dPortal
|
||||
* the portal to create
|
||||
* @param dPortal the portal to create
|
||||
*/
|
||||
public void setCreatingPortal(DPortal dPortal) {
|
||||
creatingPortal = dPortal;
|
||||
@ -202,8 +200,7 @@ public class DGlobalPlayer implements PlayerWrapper {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param item
|
||||
* the cached item to set
|
||||
* @param item the cached item to set
|
||||
*/
|
||||
public void setCachedItem(ItemStack item) {
|
||||
cachedItem = item;
|
||||
@ -217,8 +214,7 @@ public class DGlobalPlayer implements PlayerWrapper {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param enabled
|
||||
* set if the players receives announcer messages
|
||||
* @param enabled set if the players receives announcer messages
|
||||
*/
|
||||
public void setAnnouncerEnabled(boolean enabled) {
|
||||
announcerEnabled = enabled;
|
||||
@ -232,8 +228,7 @@ public class DGlobalPlayer implements PlayerWrapper {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param respawnInventory
|
||||
* the respawnInventory to set
|
||||
* @param respawnInventory the respawnInventory to set
|
||||
*/
|
||||
public void setRespawnInventory(ItemStack[] respawnInventory) {
|
||||
this.respawnInventory = respawnInventory;
|
||||
@ -261,16 +256,14 @@ public class DGlobalPlayer implements PlayerWrapper {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param respawnArmor
|
||||
* the respawnArmor to set
|
||||
* @param respawnArmor the respawnArmor to set
|
||||
*/
|
||||
public void setRespawnArmor(ItemStack[] respawnArmor) {
|
||||
this.respawnArmor = respawnArmor;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param permission
|
||||
* the permission to check
|
||||
* @param permission the permission to check
|
||||
* @return if the player has the permission
|
||||
*/
|
||||
public boolean hasPermission(DPermission permission) {
|
||||
@ -292,16 +285,14 @@ public class DGlobalPlayer implements PlayerWrapper {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rewardItems
|
||||
* the reward items to set
|
||||
* @param rewardItems the reward items to set
|
||||
*/
|
||||
public void setRewardItems(List<ItemStack> rewardItems) {
|
||||
this.rewardItems = rewardItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param permission
|
||||
* the permission to check
|
||||
* @param permission the permission to check
|
||||
* @return if the player has the permission
|
||||
*/
|
||||
public boolean hasPermission(String permission) {
|
||||
@ -312,8 +303,7 @@ public class DGlobalPlayer implements PlayerWrapper {
|
||||
/**
|
||||
* Sends a message to the player
|
||||
*
|
||||
* @param message
|
||||
* the message to send
|
||||
* @param message the message to send
|
||||
*/
|
||||
public void sendMessage(String message) {
|
||||
MessageUtil.sendMessage(player, message);
|
||||
@ -321,6 +311,8 @@ public class DGlobalPlayer implements PlayerWrapper {
|
||||
|
||||
/**
|
||||
* Respawns the player at his old position before he was in a dungeon
|
||||
*
|
||||
* @param keepInventory if the inventory shall be reset
|
||||
*/
|
||||
public void reset(boolean keepInventory) {
|
||||
final Location tpLoc = data.getOldLocation().getWorld() != null ? data.getOldLocation() : Bukkit.getWorlds().get(0).getSpawnLocation();
|
||||
|
@ -185,16 +185,14 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* the name to set
|
||||
* @param name the name to set
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* the name to set
|
||||
* @param color the color to fetch the name from
|
||||
*/
|
||||
public void setName(DColor color) {
|
||||
name = color.toString().replace("_", " ");
|
||||
@ -208,8 +206,7 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param captain
|
||||
* the captain to set
|
||||
* @param captain the captain to set
|
||||
*/
|
||||
public void setCaptain(Player captain) {
|
||||
this.captain = captain;
|
||||
@ -223,7 +220,7 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the players as a Set<DGlobalPlayer>
|
||||
* @return the players as a Set<DGlobalPlayer>
|
||||
*/
|
||||
public Set<DGlobalPlayer> getDGlobalPlayers() {
|
||||
Set<DGlobalPlayer> players = new HashSet<>();
|
||||
@ -234,7 +231,7 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the players as a Set<DGamePlayer>
|
||||
* @return the players as a Set<DGamePlayer>
|
||||
*/
|
||||
public Set<DGamePlayer> getDGamePlayers() {
|
||||
Set<DGamePlayer> players = new HashSet<>();
|
||||
@ -250,18 +247,15 @@ public class DGroup {
|
||||
/**
|
||||
* Sends messages by default.
|
||||
*
|
||||
* @param player
|
||||
* the player to add
|
||||
* @param player the player to add
|
||||
*/
|
||||
public void addPlayer(Player player) {
|
||||
addPlayer(player, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* the player to add
|
||||
* @param message
|
||||
* if messages should be sent
|
||||
* @param player the player to add
|
||||
* @param message if messages should be sent
|
||||
*/
|
||||
public void addPlayer(Player player, boolean message) {
|
||||
DPlayerJoinDGroupEvent event = new DPlayerJoinDGroupEvent(DGamePlayer.getByPlayer(player), false, this);
|
||||
@ -280,18 +274,15 @@ public class DGroup {
|
||||
/**
|
||||
* Sends messages by default.
|
||||
*
|
||||
* @param player
|
||||
* the player to remove
|
||||
* @param player the player to remove
|
||||
*/
|
||||
public void removePlayer(Player player) {
|
||||
removePlayer(player, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* the player to remove
|
||||
* @param message
|
||||
* if messages should be sent
|
||||
* @param player the player to remove
|
||||
* @param message if messages should be sent
|
||||
*/
|
||||
public void removePlayer(Player player, boolean message) {
|
||||
players.remove(player.getUniqueId());
|
||||
@ -319,8 +310,8 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* the player to add
|
||||
* @param player the player to add
|
||||
* @param silent if messages shall be sent
|
||||
*/
|
||||
public void addInvitedPlayer(Player player, boolean silent) {
|
||||
if (player == null) {
|
||||
@ -348,8 +339,8 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* the player to remove
|
||||
* @param player the player to remove
|
||||
* @param silent if messages shall be sent
|
||||
*/
|
||||
public void removeInvitedPlayer(Player player, boolean silent) {
|
||||
if (player == null) {
|
||||
@ -398,8 +389,7 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param gameWorld
|
||||
* the gameWorld to set
|
||||
* @param gameWorld the gameWorld to set
|
||||
*/
|
||||
public void setGameWorld(DGameWorld gameWorld) {
|
||||
this.gameWorld = gameWorld;
|
||||
@ -415,8 +405,7 @@ public class DGroup {
|
||||
/**
|
||||
* Sets up all dungeon-related fields.
|
||||
*
|
||||
* @param dungeon
|
||||
* the dungeon to set
|
||||
* @param dungeon the dungeon to set
|
||||
*/
|
||||
public void setDungeon(Dungeon dungeon) {
|
||||
this.dungeon = dungeon;
|
||||
@ -428,8 +417,8 @@ public class DGroup {
|
||||
/**
|
||||
* Sets up all dungeon-related fields.
|
||||
*
|
||||
* @param name
|
||||
* the name of the dungeon
|
||||
* @param name the name of the dungeon
|
||||
* @return if the action was successful
|
||||
*/
|
||||
public boolean setDungeon(String name) {
|
||||
dungeon = plugin.getDungeons().getByName(name);
|
||||
@ -472,18 +461,15 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param unplayedFloor
|
||||
* the unplayed floor to add
|
||||
* @param unplayedFloor the unplayed floor to add
|
||||
*/
|
||||
public void addUnplayedFloor(DResourceWorld unplayedFloor) {
|
||||
unplayedFloors.add(unplayedFloor);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param unplayedFloor
|
||||
* the unplayed floor to remove
|
||||
* @param force
|
||||
* remove the floor even if removeWhenPlayed is disabled
|
||||
* @param unplayedFloor the unplayed floor to remove
|
||||
* @param force remove the floor even if removeWhenPlayed is disabled
|
||||
*/
|
||||
public void removeUnplayedFloor(DResourceWorld unplayedFloor, boolean force) {
|
||||
if (getDungeon().getConfig().getRemoveWhenPlayed() || force) {
|
||||
@ -499,8 +485,7 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param playing
|
||||
* set if the group is playing
|
||||
* @param playing set if the group is playing
|
||||
*/
|
||||
public void setPlaying(boolean playing) {
|
||||
this.playing = playing;
|
||||
@ -514,8 +499,7 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param floorCount
|
||||
* the floorCount to set
|
||||
* @param floorCount the floorCount to set
|
||||
*/
|
||||
public void setFloorCount(int floorCount) {
|
||||
this.floorCount = floorCount;
|
||||
@ -529,8 +513,7 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reward
|
||||
* the rewards to add
|
||||
* @param reward the rewards to add
|
||||
*/
|
||||
public void addReward(Reward reward) {
|
||||
RewardAdditionEvent event = new RewardAdditionEvent(reward, this);
|
||||
@ -544,8 +527,7 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reward
|
||||
* the rewards to remove
|
||||
* @param reward the rewards to remove
|
||||
*/
|
||||
public void removeReward(Reward reward) {
|
||||
rewards.remove(reward);
|
||||
@ -559,8 +541,7 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param task
|
||||
* the task to set
|
||||
* @param task the task to set
|
||||
*/
|
||||
public void setTimeIsRunningTask(BukkitTask task) {
|
||||
this.timeIsRunningTask = task;
|
||||
@ -588,8 +569,7 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param floor
|
||||
* the next floor to set
|
||||
* @param floor the next floor to set
|
||||
*/
|
||||
public void setNextFloor(DResourceWorld floor) {
|
||||
nextFloor = floor;
|
||||
@ -621,8 +601,7 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param score
|
||||
* the score to set
|
||||
* @param score the score to set
|
||||
*/
|
||||
public void setScore(int score) {
|
||||
this.score = score;
|
||||
@ -636,8 +615,7 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param initialLives
|
||||
* the initial group lives to set
|
||||
* @param initialLives the initial group lives to set
|
||||
*/
|
||||
public void setInitialLives(int initialLives) {
|
||||
this.initialLives = initialLives;
|
||||
@ -651,8 +629,7 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lives
|
||||
* the group lives to set
|
||||
* @param lives the group lives to set
|
||||
*/
|
||||
public void setLives(int lives) {
|
||||
this.lives = lives;
|
||||
@ -697,8 +674,7 @@ public class DGroup {
|
||||
/**
|
||||
* The group finishs the current floor.
|
||||
*
|
||||
* @param specifiedFloor
|
||||
* the name of the next floor
|
||||
* @param specifiedFloor the name of the next floor
|
||||
*/
|
||||
public void finishFloor(DResourceWorld specifiedFloor) {
|
||||
DungeonConfig dConfig = dungeon.getConfig();
|
||||
@ -924,7 +900,9 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a message to all players in the group
|
||||
* Sends a message to all players in the group.
|
||||
*
|
||||
* @param message the message to send
|
||||
*/
|
||||
public void sendMessage(String message) {
|
||||
for (Player player : players.getOnlinePlayers()) {
|
||||
@ -935,10 +913,10 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a message to all players in the group
|
||||
* Sends a message to all players in the group.
|
||||
*
|
||||
* @param except
|
||||
* Players who do not receive the message
|
||||
* @param message the message to sent
|
||||
* @param except Players who shall not receive the message
|
||||
*/
|
||||
public void sendMessage(String message, Player... except) {
|
||||
HashSet<Player> exceptSet = new HashSet<>(Arrays.asList(except));
|
||||
@ -979,8 +957,7 @@ public class DGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param gameWorld
|
||||
* the DGameWorld to check
|
||||
* @param gameWorld the DGameWorld to check
|
||||
* @return a List of DGroups in this DGameWorld
|
||||
*/
|
||||
public static List<DGroup> getByGameWorld(DGameWorld gameWorld) {
|
||||
|
@ -42,16 +42,14 @@ public abstract class DInstancePlayer extends DGlobalPlayer {
|
||||
|
||||
/* Getters and setters */
|
||||
/**
|
||||
* @return
|
||||
* the instance
|
||||
* @return the instance
|
||||
*/
|
||||
public World getWorld() {
|
||||
return world;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param world
|
||||
* the instance to set
|
||||
* @param instance the instance to set
|
||||
*/
|
||||
public void setWorld(World instance) {
|
||||
world = instance;
|
||||
@ -96,8 +94,7 @@ public abstract class DInstancePlayer extends DGlobalPlayer {
|
||||
/**
|
||||
* Makes the player send a message to the world.
|
||||
*
|
||||
* @param message
|
||||
* the message to send
|
||||
* @param message the message to send
|
||||
*/
|
||||
public void chat(String message) {
|
||||
DInstanceWorld instance = plugin.getDWorlds().getInstanceByWorld(world);
|
||||
@ -124,9 +121,7 @@ public abstract class DInstancePlayer extends DGlobalPlayer {
|
||||
/**
|
||||
* Repeating checks for the player.
|
||||
*
|
||||
* @param updateSecond
|
||||
* Not all checks have to be done as often as others;
|
||||
* some are just done in "update seconds".
|
||||
* @param updateSecond Not all checks have to be done as often as others; some are just done in "update seconds".
|
||||
*/
|
||||
public abstract void update(boolean updateSecond);
|
||||
|
||||
|
@ -137,10 +137,8 @@ public enum DPermission {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param node
|
||||
* the node String, with or without "dxl."
|
||||
* @return
|
||||
* the DPermission value
|
||||
* @param node the node String, with or without "dxl."
|
||||
* @return the DPermission value
|
||||
*/
|
||||
public static DPermission getByNode(String node) {
|
||||
for (DPermission permission : values()) {
|
||||
@ -153,8 +151,8 @@ public enum DPermission {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param permission
|
||||
* the permission to check
|
||||
* @param sender the CommandSender
|
||||
* @param permission the permission to check
|
||||
* @return if the player has the permission
|
||||
*/
|
||||
public static boolean hasPermission(CommandSender sender, DPermission permission) {
|
||||
@ -172,8 +170,8 @@ public enum DPermission {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param permission
|
||||
* the permission to check
|
||||
* @param sender the CommandSender
|
||||
* @param permission the permission to check
|
||||
* @return if the player has the permission
|
||||
*/
|
||||
public static boolean hasPermission(CommandSender sender, String permission) {
|
||||
|
@ -53,6 +53,7 @@ public class DPlayerCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player the player to check
|
||||
* @return the DGlobalPlayer which represents the player
|
||||
*/
|
||||
public DGlobalPlayer getByPlayer(Player player) {
|
||||
@ -65,6 +66,7 @@ public class DPlayerCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param uuid the unique ID to check
|
||||
* @return the DGlobalPlayer which represents the player with this UUID
|
||||
*/
|
||||
public DGlobalPlayer getByUniqueId(UUID uuid) {
|
||||
@ -123,8 +125,7 @@ public class DPlayerCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* an instance of DGlobalPlayer to add
|
||||
* @param player an instance of DGlobalPlayer to add
|
||||
*/
|
||||
public void addPlayer(DGlobalPlayer player) {
|
||||
removePlayer(player);
|
||||
@ -132,8 +133,7 @@ public class DPlayerCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* an instance of DGlobalPlayer to remove
|
||||
* @param player an instance of DGlobalPlayer to remove
|
||||
*/
|
||||
public void removePlayer(DGlobalPlayer player) {
|
||||
for (DGlobalPlayer dGlobalPlayer : dGlobalPlayers) {
|
||||
@ -153,11 +153,9 @@ public class DPlayerCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if an old DGamePlayer instance of the user exists.
|
||||
* If yes, the old Player of the user is replaced with the new object.
|
||||
* Checks if an old DGamePlayer instance of the user exists. If yes, the old Player of the user is replaced with the new object.
|
||||
*
|
||||
* @param player
|
||||
* the player to check
|
||||
* @param player the player to check
|
||||
* @return if the player exists
|
||||
*/
|
||||
public boolean checkPlayer(Player player) {
|
||||
@ -181,6 +179,8 @@ public class DPlayerCache {
|
||||
|
||||
/**
|
||||
* start a new SecureModeTask
|
||||
*
|
||||
* @param period the period in ticks
|
||||
*/
|
||||
public void startSecureModeTask(long period) {
|
||||
secureModeTask = new SecureModeTask().runTaskTimer(plugin, period, period);
|
||||
@ -195,6 +195,8 @@ public class DPlayerCache {
|
||||
|
||||
/**
|
||||
* start a new LazyUpdateTask
|
||||
*
|
||||
* @param period the period in ticks
|
||||
*/
|
||||
public void startUpdateTask(long period) {
|
||||
updateTask = new UpdateTask().runTaskTimer(plugin, period, period);
|
||||
@ -209,6 +211,8 @@ public class DPlayerCache {
|
||||
|
||||
/**
|
||||
* start a new LazyUpdateTask
|
||||
*
|
||||
* @param period the period in ticks
|
||||
*/
|
||||
public void startLazyUpdateTask(long period) {
|
||||
lazyUpdateTask = new LazyUpdateTask().runTaskTimer(plugin, period, period);
|
||||
|
@ -96,8 +96,7 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param keepInventoryOnEscape
|
||||
* set if the inventory shall be reset after a logout
|
||||
* @param keepInventoryAfterLogout set if the inventory shall be reset after a logout
|
||||
*/
|
||||
public void setKeepInventoryAfterLogout(boolean keepInventoryAfterLogout) {
|
||||
this.keepInventoryAfterLogout = keepInventoryAfterLogout;
|
||||
@ -116,8 +115,7 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param location
|
||||
* the location to set
|
||||
* @param location the location to set
|
||||
*/
|
||||
public void setOldLocation(Location location) {
|
||||
oldLocation = location;
|
||||
@ -131,8 +129,7 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param inventory
|
||||
* the inventory to set
|
||||
* @param inventory the inventory to set
|
||||
*/
|
||||
public void setOldInventory(List<ItemStack> inventory) {
|
||||
oldInventory = inventory;
|
||||
@ -146,8 +143,7 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param inventory
|
||||
* the inventory to set
|
||||
* @param inventory the inventory to set
|
||||
*/
|
||||
public void setOldArmor(List<ItemStack> inventory) {
|
||||
oldArmor = inventory;
|
||||
@ -161,8 +157,7 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param offHand
|
||||
* the off hand item to set
|
||||
* @param offHand the off hand item to set
|
||||
*/
|
||||
public void setOldOffHand(ItemStack offHand) {
|
||||
oldOffHand = offHand;
|
||||
@ -176,8 +171,7 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param level
|
||||
* the level to set
|
||||
* @param level the level to set
|
||||
*/
|
||||
public void setOldLevel(int level) {
|
||||
oldLvl = level;
|
||||
@ -191,8 +185,7 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param exp
|
||||
* the amount of exp to set
|
||||
* @param exp the amount of exp to set
|
||||
*/
|
||||
public void setOldExp(float exp) {
|
||||
oldExp = exp;
|
||||
@ -206,8 +199,7 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param maxHealth
|
||||
* the maximum health to set
|
||||
* @param maxHealth the maximum health to set
|
||||
*/
|
||||
public void setOldMaxHealth(double maxHealth) {
|
||||
oldMaxHealth = maxHealth;
|
||||
@ -221,8 +213,7 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param health
|
||||
* the health to set
|
||||
* @param health the health to set
|
||||
*/
|
||||
public void setOldHealth(double health) {
|
||||
oldHealth = health;
|
||||
@ -236,8 +227,7 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param foodLevel
|
||||
* the food level to set
|
||||
* @param foodLevel the food level to set
|
||||
*/
|
||||
public void setOldFoodLevel(int foodLevel) {
|
||||
oldFoodLevel = foodLevel;
|
||||
@ -251,8 +241,7 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fireTicks
|
||||
* the fire ticks to set
|
||||
* @param fireTicks the fire ticks to set
|
||||
*/
|
||||
public void setFireTicks(int fireTicks) {
|
||||
oldFireTicks = fireTicks;
|
||||
@ -266,8 +255,7 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param gameMode
|
||||
* the GameMode to set
|
||||
* @param gameMode the GameMode to set
|
||||
*/
|
||||
public void setOldGameMode(GameMode gameMode) {
|
||||
oldGameMode = gameMode;
|
||||
@ -281,8 +269,7 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param potionEffects
|
||||
* the potion effects to set
|
||||
* @param potionEffects the potion effects to set
|
||||
*/
|
||||
public void setOldPotionEffects(Collection<PotionEffect> potionEffects) {
|
||||
oldPotionEffects = potionEffects;
|
||||
@ -296,8 +283,7 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dungeon
|
||||
* the dungeon to check
|
||||
* @param dungeon the dungeon to check
|
||||
* @return the time when the player started the dungeon for the last time
|
||||
*/
|
||||
public long getTimeLastStarted(String dungeon) {
|
||||
@ -310,10 +296,8 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dungeon
|
||||
* the started dungeon
|
||||
* @param time
|
||||
* the time when the dungeon was started
|
||||
* @param dungeon the started dungeon
|
||||
* @param time the time when the dungeon was started
|
||||
*/
|
||||
public void setTimeLastStarted(String dungeon, long time) {
|
||||
timeLastStarted.put(dungeon.toLowerCase(), time);
|
||||
@ -328,8 +312,7 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dungeon
|
||||
* the dungeon to check
|
||||
* @param dungeon the dungeon to check
|
||||
* @return the time when the player finished the dungeon for the last time
|
||||
*/
|
||||
public long getTimeLastFinished(String dungeon) {
|
||||
@ -342,10 +325,8 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dungeon
|
||||
* the finished dungeon
|
||||
* @param time
|
||||
* the time when the dungeon was finished
|
||||
* @param dungeon the finished dungeon
|
||||
* @param time the time when the dungeon was finished
|
||||
*/
|
||||
public void setTimeLastFinished(String dungeon, long time) {
|
||||
timeLastFinished.put(dungeon.toLowerCase(), time);
|
||||
@ -354,8 +335,7 @@ public class DPlayerData extends DREConfig {
|
||||
|
||||
/* Actions */
|
||||
/**
|
||||
* @param dungeon
|
||||
* the started dungeon
|
||||
* @param dungeon the started dungeon
|
||||
*/
|
||||
public void logTimeLastStarted(String dungeon) {
|
||||
timeLastStarted.put(dungeon.toLowerCase(), System.currentTimeMillis());
|
||||
@ -363,8 +343,7 @@ public class DPlayerData extends DREConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dungeon
|
||||
* the finished dungeon
|
||||
* @param dungeon the finished dungeon
|
||||
*/
|
||||
public void logTimeLastFinished(String dungeon) {
|
||||
timeLastFinished.put(dungeon.toLowerCase(), System.currentTimeMillis());
|
||||
@ -446,8 +425,7 @@ public class DPlayerData extends DREConfig {
|
||||
/**
|
||||
* Saves the player's data to the file.
|
||||
*
|
||||
* @param player
|
||||
* the Player to save
|
||||
* @param player the Player to save
|
||||
*/
|
||||
public void savePlayerState(Player player) {
|
||||
oldGameMode = player.getGameMode();
|
||||
|
@ -44,8 +44,7 @@ public class FeeLevelRequirement extends Requirement {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fee
|
||||
* the fee to set
|
||||
* @param fee the fee to set
|
||||
*/
|
||||
public void setFee(int fee) {
|
||||
this.fee = fee;
|
||||
|
@ -42,8 +42,7 @@ public class FeeMoneyRequirement extends Requirement {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fee
|
||||
* the fee to set
|
||||
* @param fee the fee to set
|
||||
*/
|
||||
public void setFee(double fee) {
|
||||
this.fee = fee;
|
||||
|
@ -38,8 +38,7 @@ public class GroupSizeRequirement extends Requirement {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param minimum
|
||||
* the minimal group size to set
|
||||
* @param minimum the minimal group size to set
|
||||
*/
|
||||
public void setMinimum(int minimum) {
|
||||
this.minimum = minimum;
|
||||
@ -53,8 +52,7 @@ public class GroupSizeRequirement extends Requirement {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param maximum
|
||||
* the maximal group size to set
|
||||
* @param maximum the maximal group size to set
|
||||
*/
|
||||
public void setMaximum(int maximum) {
|
||||
this.maximum = maximum;
|
||||
|
@ -40,8 +40,7 @@ public class PermissionRequirement extends Requirement {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param permissions
|
||||
* the permissions to set
|
||||
* @param permissions the permissions to set
|
||||
*/
|
||||
public void setPermissions(List<String> permissions) {
|
||||
this.permissions = permissions;
|
||||
|
@ -34,8 +34,8 @@ public class RequirementTypeCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* the requirement type which has the identifier
|
||||
* @param identifier the identifier to check
|
||||
* @return the requirement type which has the identifier
|
||||
*/
|
||||
public RequirementType getByIdentifier(String identifier) {
|
||||
for (RequirementType type : types) {
|
||||
@ -48,24 +48,21 @@ public class RequirementTypeCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* the requirement types
|
||||
* @return the requirement types
|
||||
*/
|
||||
public List<RequirementType> getRequirements() {
|
||||
return types;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* the requirement type to add
|
||||
* @param type the requirement type to add
|
||||
*/
|
||||
public void addRequirement(RequirementType type) {
|
||||
types.add(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* the requirement type to remove
|
||||
* @param type the requirement type to remove
|
||||
*/
|
||||
public void removeRequirement(RequirementType type) {
|
||||
types.remove(type);
|
||||
|
@ -40,24 +40,21 @@ public class ItemReward extends Reward {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param items
|
||||
* the reward items to set
|
||||
* @param items the reward items to set
|
||||
*/
|
||||
public void setItems(List<ItemStack> items) {
|
||||
this.items = items;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param items
|
||||
* the reward items to add
|
||||
* @param items the reward items to add
|
||||
*/
|
||||
public void addItems(ItemStack... items) {
|
||||
this.items.addAll(Arrays.asList(items));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param items
|
||||
* the reward items to remove
|
||||
* @param items the reward items to remove
|
||||
*/
|
||||
public void removeItems(ItemStack... items) {
|
||||
this.items.addAll(Arrays.asList(items));
|
||||
|
@ -37,16 +37,14 @@ public class LevelReward extends Reward {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param levels
|
||||
* the levels to add
|
||||
* @param levels the levels to add
|
||||
*/
|
||||
public void addLevels(int levels) {
|
||||
this.levels += levels;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param levels
|
||||
* the levels to set
|
||||
* @param levels the levels to set
|
||||
*/
|
||||
public void setLevels(int levels) {
|
||||
this.levels = levels;
|
||||
|
@ -37,16 +37,14 @@ public class MoneyReward extends Reward {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param money
|
||||
* the money to add
|
||||
* @param money the money to add
|
||||
*/
|
||||
public void addMoney(double money) {
|
||||
this.money += money;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param money
|
||||
* the money to set
|
||||
* @param money the money to set
|
||||
*/
|
||||
public void setMoney(double money) {
|
||||
this.money = money;
|
||||
|
@ -37,6 +37,7 @@ public class RewardTypeCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param identifier the identifier to check
|
||||
* @return the reward type which has the identifier
|
||||
*/
|
||||
public RewardType getByIdentifier(String identifier) {
|
||||
@ -57,16 +58,14 @@ public class RewardTypeCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* the reward type to add
|
||||
* @param type the reward type to add
|
||||
*/
|
||||
public void addReward(RewardType type) {
|
||||
types.add(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* the reward type to remove
|
||||
* @param type the reward type to remove
|
||||
*/
|
||||
public void removeReward(RewardType type) {
|
||||
types.remove(type);
|
||||
|
@ -52,8 +52,7 @@ public class BossShopSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* the name of the shop
|
||||
* @param name the name of the shop
|
||||
*/
|
||||
public void setShopName(String name) {
|
||||
shopName = name;
|
||||
|
@ -57,8 +57,7 @@ public class ChestSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param amount
|
||||
* the amount to set
|
||||
* @param amount the amount to set
|
||||
*/
|
||||
public void setMoneyReward(double amount) {
|
||||
moneyReward = amount;
|
||||
@ -72,8 +71,7 @@ public class ChestSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param amount
|
||||
* the amount to set
|
||||
* @param amount the amount to set
|
||||
*/
|
||||
public void setLevelReward(int amount) {
|
||||
levelReward = amount;
|
||||
@ -90,8 +88,7 @@ public class ChestSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param items
|
||||
* the items to set as chest contents
|
||||
* @param items the items to set as chest contents
|
||||
*/
|
||||
public void setItemReward(ItemStack[] items) {
|
||||
chestContent = items;
|
||||
@ -105,8 +102,7 @@ public class ChestSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lootTable
|
||||
* the loot table to set
|
||||
* @param lootTable the loot table to set
|
||||
*/
|
||||
public void setLootTable(LootTable lootTable) {
|
||||
this.lootTable = lootTable;
|
||||
|
@ -96,8 +96,7 @@ public abstract class DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sign
|
||||
* the sign to set
|
||||
* @param sign the sign to set
|
||||
*/
|
||||
public void setSign(Sign sign) {
|
||||
this.sign = sign;
|
||||
@ -111,8 +110,7 @@ public abstract class DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lines
|
||||
* the sign lines to set
|
||||
* @param lines the sign lines to set
|
||||
*/
|
||||
public void setLines(String[] lines) {
|
||||
this.lines = lines;
|
||||
@ -140,16 +138,14 @@ public abstract class DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param trigger
|
||||
* the trigger to add
|
||||
* @param trigger the trigger to add
|
||||
*/
|
||||
public void addTrigger(Trigger trigger) {
|
||||
triggers.add(trigger);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param trigger
|
||||
* the trigger to remove
|
||||
* @param trigger the trigger to remove
|
||||
*/
|
||||
public void removeTrigger(Trigger trigger) {
|
||||
triggers.remove(trigger);
|
||||
@ -210,8 +206,7 @@ public abstract class DSign {
|
||||
/**
|
||||
* Set a placeholder to show that the sign is setup incorrectly.
|
||||
*
|
||||
* @param reason
|
||||
* the reason why the sign is marked as erroneous
|
||||
* @param reason the reason why the sign is marked as erroneous
|
||||
*/
|
||||
public void markAsErroneous(String reason) {
|
||||
erroneous = true;
|
||||
|
@ -44,16 +44,14 @@ public class DSignTypeCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* the type to add
|
||||
* @param type the type to add
|
||||
*/
|
||||
public void addDSign(DSignType type) {
|
||||
types.add(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* the type to remove
|
||||
* @param type the type to remove
|
||||
*/
|
||||
public void removeDSign(DSignType type) {
|
||||
types.remove(type);
|
||||
|
@ -48,8 +48,7 @@ public class DropSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param item
|
||||
* the item to set
|
||||
* @param item the item to set
|
||||
*/
|
||||
public void setItem(ItemStack item) {
|
||||
this.item = item;
|
||||
|
@ -47,8 +47,7 @@ public class FloorSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param floor
|
||||
* the floor to set
|
||||
* @param floor the floor to set
|
||||
*/
|
||||
public void setFloor(DResourceWorld floor) {
|
||||
this.floor = floor;
|
||||
|
@ -57,8 +57,7 @@ public class LivesModifierSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lives
|
||||
* the lives to add / remove
|
||||
* @param lives the lives to add / remove
|
||||
*/
|
||||
public void setLives(int lives) {
|
||||
this.lives = lives;
|
||||
|
@ -42,8 +42,7 @@ public abstract class LocationSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* the location marked by this sign
|
||||
* @return the location marked by this sign
|
||||
*/
|
||||
public Location getLocation() {
|
||||
return location;
|
||||
|
@ -48,8 +48,7 @@ public class OpenDoorSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param door
|
||||
* the door to open
|
||||
* @param door the door to open
|
||||
*/
|
||||
public void setDoor(LockedDoor door) {
|
||||
this.door = door;
|
||||
@ -63,8 +62,7 @@ public class OpenDoorSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param active
|
||||
* toggle the sign active
|
||||
* @param active toggle the sign active
|
||||
*/
|
||||
public void setActive(boolean active) {
|
||||
this.active = active;
|
||||
|
@ -40,10 +40,8 @@ public abstract class PerPlayerSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* the player to check
|
||||
* @return
|
||||
* true if the player already triggered the sign
|
||||
* @param player the player to check
|
||||
* @return true if the player already triggered the sign
|
||||
*/
|
||||
public boolean isTriggeredByPlayer(Player player) {
|
||||
return triggered.contains(player.getUniqueId());
|
||||
|
@ -53,8 +53,7 @@ public class RedstoneSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param initialized
|
||||
* the initialized to set
|
||||
* @param initialized the initialized to set
|
||||
*/
|
||||
public void setInitialized(boolean initialized) {
|
||||
this.initialized = initialized;
|
||||
@ -68,8 +67,7 @@ public class RedstoneSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param active
|
||||
* the active to set
|
||||
* @param active the active to set
|
||||
*/
|
||||
public void setActive(boolean active) {
|
||||
this.active = active;
|
||||
@ -83,8 +81,7 @@ public class RedstoneSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param enableTask
|
||||
* the enableTask to set
|
||||
* @param enableTask the enableTask to set
|
||||
*/
|
||||
public void setEnableTask(BukkitTask enableTask) {
|
||||
this.enableTask = enableTask;
|
||||
@ -98,8 +95,7 @@ public class RedstoneSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param disableTask
|
||||
* the disableTask to set
|
||||
* @param disableTask the disableTask to set
|
||||
*/
|
||||
public void setDisableTask(BukkitTask disableTask) {
|
||||
this.disableTask = disableTask;
|
||||
@ -113,8 +109,7 @@ public class RedstoneSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param block
|
||||
* the block to set
|
||||
* @param block the block to set
|
||||
*/
|
||||
public void setBlock(Block block) {
|
||||
this.block = block;
|
||||
@ -128,8 +123,7 @@ public class RedstoneSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param delay
|
||||
* the delay to set
|
||||
* @param delay the delay to set
|
||||
*/
|
||||
public void setDelay(long delay) {
|
||||
this.delay = delay;
|
||||
@ -143,8 +137,7 @@ public class RedstoneSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param offDelay
|
||||
* the offDelay to set
|
||||
* @param offDelay the offDelay to set
|
||||
*/
|
||||
public void setOffDelay(long offDelay) {
|
||||
this.offDelay = offDelay;
|
||||
@ -158,8 +151,7 @@ public class RedstoneSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param repeat
|
||||
* the repeat to set
|
||||
* @param repeat the repeat to set
|
||||
*/
|
||||
public void setRepeat(int repeat) {
|
||||
this.repeat = repeat;
|
||||
@ -173,8 +165,7 @@ public class RedstoneSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param repeatsToDo
|
||||
* the repeatsToDo to set
|
||||
* @param repeatsToDo the repeatsToDo to set
|
||||
*/
|
||||
public void setRepeatsToDo(int repeatsToDo) {
|
||||
this.repeatsToDo = repeatsToDo;
|
||||
|
@ -51,8 +51,7 @@ public class ResourcePackSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param resourcePack
|
||||
* the resource pack to set
|
||||
* @param resourcePack the resource pack to set
|
||||
*/
|
||||
public void setExternalMob(String resourcePack) {
|
||||
this.resourcePack = resourcePack;
|
||||
|
@ -24,8 +24,7 @@ import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
/**
|
||||
* Representation of a sign script.
|
||||
* Sign scripts allow to merge multiple dungeon signs at one position.
|
||||
* Representation of a sign script. Sign scripts allow to merge multiple dungeon signs at one position.
|
||||
*
|
||||
* @author Daniel Saukel
|
||||
*/
|
||||
@ -36,18 +35,15 @@ public class SignScript {
|
||||
private List<String[]> signs;
|
||||
|
||||
/**
|
||||
* @param file
|
||||
* the script file
|
||||
* @param file the script file
|
||||
*/
|
||||
public SignScript(File file) {
|
||||
this(file.getName().substring(0, file.getName().length() - 4), YamlConfiguration.loadConfiguration(file));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* the name of the Announcer
|
||||
* @param config
|
||||
* the config that stores the information
|
||||
* @param name the name of the Announcer
|
||||
* @param config the config that stores the information
|
||||
*/
|
||||
public SignScript(String name, FileConfiguration config) {
|
||||
this.name = name;
|
||||
@ -76,8 +72,7 @@ public class SignScript {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* the index number
|
||||
* @param index the index number
|
||||
* @return the lines of the sign
|
||||
*/
|
||||
public String[] getLines(int index) {
|
||||
@ -85,10 +80,8 @@ public class SignScript {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* the index number
|
||||
* @param lines
|
||||
* the lines to set
|
||||
* @param index the index number
|
||||
* @param lines the lines to set
|
||||
*/
|
||||
public void setLines(int index, String[] lines) {
|
||||
signs.set(index, lines);
|
||||
|
@ -39,6 +39,7 @@ public class SignScriptCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name the name to check
|
||||
* @return the script that has the name
|
||||
*/
|
||||
public SignScript getByName(String name) {
|
||||
@ -59,16 +60,14 @@ public class SignScriptCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param script
|
||||
* the SignScript to add
|
||||
* @param script the SignScript to add
|
||||
*/
|
||||
public void addScript(SignScript script) {
|
||||
scripts.add(script);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param script
|
||||
* the SignScript to remove
|
||||
* @param script the SignScript to remove
|
||||
*/
|
||||
public void removeScript(SignScript script) {
|
||||
scripts.remove(script);
|
||||
|
@ -47,8 +47,7 @@ public class WaveSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mobCountIncreaseRate
|
||||
* the mobCountIncreaseRate to set
|
||||
* @param mobCountIncreaseRate the mobCountIncreaseRate to set
|
||||
*/
|
||||
public void setMobCountIncreaseRate(double mobCountIncreaseRate) {
|
||||
this.mobCountIncreaseRate = mobCountIncreaseRate;
|
||||
@ -62,8 +61,7 @@ public class WaveSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param teleport
|
||||
* Set if the players shall get teleported to the start location
|
||||
* @param teleport Set if the players shall get teleported to the start location
|
||||
*/
|
||||
public void setTeleport(boolean teleport) {
|
||||
this.teleport = teleport;
|
||||
|
@ -47,8 +47,7 @@ public class ClassesSign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dClass
|
||||
* the DClass to set
|
||||
* @param dClass the DClass to set
|
||||
*/
|
||||
public void setDClass(DClass dClass) {
|
||||
this.dClass = dClass;
|
||||
|
@ -58,8 +58,7 @@ public class ReadySign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param gameType
|
||||
* the gameType to set
|
||||
* @param gameType the gameType to set
|
||||
*/
|
||||
public void setGameType(GameType gameType) {
|
||||
this.gameType = gameType;
|
||||
@ -73,8 +72,7 @@ public class ReadySign extends DSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param time
|
||||
* the time in seconds until the game starts automatically; -1 for no auto start
|
||||
* @param time the time in seconds until the game starts automatically; -1 for no auto start
|
||||
*/
|
||||
public void setTimeToAutoStart(double time) {
|
||||
autoStart = time;
|
||||
|
@ -46,8 +46,7 @@ public class StartSign extends LocationSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
* the ID to set
|
||||
* @param id the ID to set
|
||||
*/
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
|
@ -40,16 +40,14 @@ public class ActionBarSign extends PerPlayerSign {
|
||||
|
||||
/* Getters and setters*/
|
||||
/**
|
||||
* @return
|
||||
* the text
|
||||
* @return the text
|
||||
*/
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param text
|
||||
* the text to set
|
||||
* @param text the text to set
|
||||
*/
|
||||
public void setText(String text) {
|
||||
this.text = text;
|
||||
|
@ -41,32 +41,28 @@ public class TitleSign extends PerPlayerSign {
|
||||
|
||||
/* Getters and setters*/
|
||||
/**
|
||||
* @return
|
||||
* the title
|
||||
* @return the title
|
||||
*/
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param text
|
||||
* the text to set
|
||||
* @param text the text to set
|
||||
*/
|
||||
public void setTitle(String text) {
|
||||
title = text;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* the subtitle
|
||||
* @return the subtitle
|
||||
*/
|
||||
public String getSubtitle() {
|
||||
return subtitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param text
|
||||
* the text to set
|
||||
* @param text the text to set
|
||||
*/
|
||||
public void setSubtitle(String text) {
|
||||
subtitle = text;
|
||||
|
@ -151,8 +151,7 @@ public class ExternalMobSign extends DSign implements MobSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param spawnLocation
|
||||
* the spawnLocation to set
|
||||
* @param spawnLocation the spawnLocation to set
|
||||
*/
|
||||
public void setSpawnLocation(Location spawnLocation) {
|
||||
this.spawnLocation = spawnLocation;
|
||||
@ -166,8 +165,7 @@ public class ExternalMobSign extends DSign implements MobSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param externalMob
|
||||
* the external mob to set
|
||||
* @param externalMob the external mob to set
|
||||
*/
|
||||
public void setExternalMob(LivingEntity externalMob) {
|
||||
this.externalMob = externalMob;
|
||||
@ -181,16 +179,14 @@ public class ExternalMobSign extends DSign implements MobSign {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param externalMob
|
||||
* the externalMob to add
|
||||
* @param externalMob the externalMob to add
|
||||
*/
|
||||
public void addExternalMob(Entity externalMob) {
|
||||
externalMobs.add(externalMob);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param externalMob
|
||||
* the external mob to remove
|
||||
* @param externalMob the external mob to remove
|
||||
*/
|
||||
public void removeExternalMob(Entity externalMob) {
|
||||
externalMobs.remove(externalMob);
|
||||
|
@ -29,8 +29,7 @@ public interface MobSign {
|
||||
public String getMob();
|
||||
|
||||
/**
|
||||
* @param mob
|
||||
* the mob to set
|
||||
* @param mob the mob to set
|
||||
*/
|
||||
public void setMob(String mob);
|
||||
|
||||
@ -40,8 +39,7 @@ public interface MobSign {
|
||||
public int getMaxInterval();
|
||||
|
||||
/**
|
||||
* @param maxInterval
|
||||
* the maximum interval between mob spawns
|
||||
* @param maxInterval the maximum interval between mob spawns
|
||||
*/
|
||||
public void setMaxInterval(int maxInterval);
|
||||
|
||||
@ -51,8 +49,7 @@ public interface MobSign {
|
||||
public int getInterval();
|
||||
|
||||
/**
|
||||
* @param interval
|
||||
* the spawn interval
|
||||
* @param interval the spawn interval
|
||||
*/
|
||||
public void setInterval(int interval);
|
||||
|
||||
@ -62,8 +59,7 @@ public interface MobSign {
|
||||
public int getAmount();
|
||||
|
||||
/**
|
||||
* @param amount
|
||||
* the amount of mobs to set
|
||||
* @param amount the amount of mobs to set
|
||||
*/
|
||||
public void setAmount(int amount);
|
||||
|
||||
@ -73,8 +69,7 @@ public interface MobSign {
|
||||
public int getInitialAmount();
|
||||
|
||||
/**
|
||||
* @param amount
|
||||
* the amount of mobs to set
|
||||
* @param amount the amount of mobs to set
|
||||
*/
|
||||
public void setInitialAmount(int initialAmount);
|
||||
|
||||
@ -84,8 +79,7 @@ public interface MobSign {
|
||||
public boolean isInitialized();
|
||||
|
||||
/**
|
||||
* @param initialized
|
||||
* set the sign initialized
|
||||
* @param initialized set the sign initialized
|
||||
*/
|
||||
public void setInitialized(boolean initialized);
|
||||
|
||||
@ -95,8 +89,7 @@ public interface MobSign {
|
||||
public boolean isActive();
|
||||
|
||||
/**
|
||||
* @param active
|
||||
* set the sign active
|
||||
* @param active set the sign active
|
||||
*/
|
||||
public void setActive(boolean active);
|
||||
|
||||
@ -106,8 +99,7 @@ public interface MobSign {
|
||||
public BukkitTask getTask();
|
||||
|
||||
/**
|
||||
* @param task
|
||||
* the task to set
|
||||
* @param task the task to set
|
||||
*/
|
||||
public void setTask(BukkitTask task);
|
||||
|
||||
|
@ -44,8 +44,7 @@ public class FortuneTrigger extends Trigger {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param chance
|
||||
* the chance to set
|
||||
* @param chance the chance to set
|
||||
*/
|
||||
public void setChance(double chance) {
|
||||
this.chance = chance;
|
||||
|
@ -53,8 +53,7 @@ public class ProgressTrigger extends Trigger {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param floor
|
||||
* the specific floor to set
|
||||
* @param floor the specific floor to set
|
||||
*/
|
||||
public void setFloor(DResourceWorld floor) {
|
||||
this.floor = floor;
|
||||
@ -68,8 +67,7 @@ public class ProgressTrigger extends Trigger {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param floorCount
|
||||
* the floor count to set
|
||||
* @param floorCount the floor count to set
|
||||
*/
|
||||
public void setFloorCount(int floorCount) {
|
||||
this.floorCount = floorCount;
|
||||
@ -83,8 +81,7 @@ public class ProgressTrigger extends Trigger {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param waveCount
|
||||
* the wave count to set
|
||||
* @param waveCount the wave count to set
|
||||
*/
|
||||
public void setWaveCount(int waveCount) {
|
||||
this.waveCount = waveCount;
|
||||
|
@ -49,8 +49,7 @@ public abstract class Trigger {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param triggered
|
||||
* the triggered to set
|
||||
* @param triggered the triggered to set
|
||||
*/
|
||||
public void setTriggered(boolean triggered) {
|
||||
this.triggered = triggered;
|
||||
@ -64,8 +63,7 @@ public abstract class Trigger {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* the player to set
|
||||
* @param player the player to set
|
||||
*/
|
||||
public void setPlayer(Player player) {
|
||||
this.player = player;
|
||||
@ -79,16 +77,14 @@ public abstract class Trigger {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dSign
|
||||
* the dSign to add
|
||||
* @param dSign the dSign to add
|
||||
*/
|
||||
public void addDSign(DSign dSign) {
|
||||
dSigns.add(dSign);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dSign
|
||||
* the dSign to remove
|
||||
* @param dSign the dSign to remove
|
||||
*/
|
||||
public void removeDSign(DSign dSign) {
|
||||
dSigns.remove(dSign);
|
||||
|
@ -37,6 +37,7 @@ public class TriggerTypeCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param identifier the identifier to check
|
||||
* @return the trigger which has the identifier
|
||||
*/
|
||||
public TriggerType getByIdentifier(String identifier) {
|
||||
@ -57,16 +58,14 @@ public class TriggerTypeCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* the type to add
|
||||
* @param type the type to add
|
||||
*/
|
||||
public void addTrigger(TriggerType type) {
|
||||
types.add(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* the type to remove
|
||||
* @param type the type to remove
|
||||
*/
|
||||
public void removeTrigger(TriggerType type) {
|
||||
types.remove(type);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user