Added some JavaDoc explanations to the classes

This commit is contained in:
Daniel Saukel 2016-08-26 15:42:26 +02:00
parent 0ea47a47e5
commit 258e115a38
65 changed files with 162 additions and 10 deletions

View File

@ -58,6 +58,9 @@ import org.bukkit.event.HandlerList;
import org.bukkit.scheduler.BukkitTask;
/**
* 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
*/
public class DungeonsXL extends BRPlugin {

View File

@ -44,6 +44,8 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
/**
* Represents a game announcement.
*
* @author Daniel Saukel
*/
public class Announcer {

View File

@ -24,6 +24,8 @@ import org.bukkit.ChatColor;
import org.bukkit.inventory.Inventory;
/**
* Announcer instance manager.
*
* @author Daniel Saukel
*/
public class Announcers {

View File

@ -28,8 +28,9 @@ import org.bukkit.entity.Player;
/**
* @author Frank Baumann, Daniel Saukel
* @deprecated
* @deprecated Use BreakCommand instead.
*/
@Deprecated
public class DeletePortalCommand extends BRCommand {
DungeonsXL plugin = DungeonsXL.getInstance();

View File

@ -24,6 +24,9 @@ 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.
*
* @author Daniel Saukel
*/
public enum DMessages implements Messages {

View File

@ -25,6 +25,8 @@ import java.util.ArrayList;
import java.util.List;
/**
* Represents a dungeon script. See {@link io.github.dre2n.dungeonsxl.dungeon.Dungeon}.
*
* @author Daniel Saukel
*/
public class DungeonConfig extends BRConfig {

View File

@ -20,6 +20,8 @@ import io.github.dre2n.commons.config.BRConfig;
import java.io.File;
/**
* Represents the global data.yml.
*
* @author Daniel Saukel
*/
public class GlobalData extends BRConfig {

View File

@ -32,6 +32,8 @@ import java.util.Map;
import org.bukkit.configuration.ConfigurationSection;
/**
* Represents the main config.yml.
*
* @author Frank Baumann, Milan Albrecht, Daniel Saukel
*/
public class MainConfig extends BRConfig {

View File

@ -35,6 +35,8 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect;
/**
* Represents a player's persistent data.
*
* @author Daniel Saukel
*/
public class PlayerData extends BRConfig {

View File

@ -30,6 +30,8 @@ import org.bukkit.block.Block;
import org.bukkit.block.Sign;
/**
* Represents the data file of a dungeon map, mainly to store signs.
*
* @author Daniel Saukel
*/
public class SignData {

View File

@ -44,6 +44,10 @@ import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.inventory.ItemStack;
/**
* The world configuration is a simple game rule source.
* Besides game rules, WorldConfig also stores some map specific data such as the invited players.
* It is used directly in dungeon map config.yml files, but also part of dungeon and main config files.
*
* @author Frank Baumann, Milan Albrecht, Daniel Saukel
*/
public class WorldConfig extends GameRules {

View File

@ -21,6 +21,10 @@ import io.github.dre2n.dungeonsxl.config.DungeonConfig;
import java.io.File;
/**
* Represents a dungeon.
* While multi floor dungeon scripts are represented by {@link io.github.dre2n.dungeonsxl.config.DungeonConfig},
* single floor dungeons also get a dungeon object without a config file as a placeholder.
*
* @author Daniel Saukel
*/
public class Dungeon {

View File

@ -22,6 +22,8 @@ import java.util.ArrayList;
import java.util.List;
/**
* Dungeon instance manager.
*
* @author Daniel Saukel
*/
public class Dungeons {

View File

@ -41,6 +41,9 @@ import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
/**
* Game mostly stores for which purposes and how a {@link io.github.dre2n.dungeonsxl.dungeon.Dungeon} is used,
* the player groups and the progress.
*
* @author Daniel Saukel
*/
public class Game {

View File

@ -17,6 +17,8 @@
package io.github.dre2n.dungeonsxl.game;
/**
* A game goal defines what the players have to do in order to finish the game.
*
* @author Daniel Saukel
*/
public enum GameGoal {

View File

@ -29,6 +29,8 @@ import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
/**
* See {@link io.github.dre2n.dungeonsxl.config.WorldConfig}
*
* @author Daniel Saukel
*/
public class GameRules {

View File

@ -19,6 +19,8 @@ package io.github.dre2n.dungeonsxl.game;
import org.bukkit.GameMode;
/**
* Implement this to create custom game types.
*
* @author Daniel Saukel
*/
public interface GameType {

View File

@ -20,6 +20,8 @@ import static io.github.dre2n.dungeonsxl.game.GameGoal.*;
import org.bukkit.GameMode;
/**
* Default implementation of {@link io.github.dre2n.dungeonsxl.game.GameType}.
*
* @author Daniel Saukel
*/
public enum GameTypeDefault implements GameType {

View File

@ -22,6 +22,8 @@ import java.util.ArrayList;
import java.util.List;
/**
* GameType instance manager.
*
* @author Daniel Saukel
*/
public class GameTypes {

View File

@ -35,6 +35,8 @@ import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
/**
* A portal that leads into a dungeon.
*
* @author Frank Baumann, Daniel Saukel
*/
public class DPortal extends GlobalProtection {

View File

@ -34,6 +34,8 @@ import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
/**
* Basically a GroupSign, but to form a game of multiple groups.
*
* @author Frank Baumann, Milan Albrecht, Daniel Saukel
*/
public class GameSign extends GlobalProtection {

View File

@ -1,7 +1,18 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
* Copyright (C) 2012-2016 Frank Baumann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package io.github.dre2n.dungeonsxl.global;

View File

@ -1,7 +1,18 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
* Copyright (C) 2012-2016 Frank Baumann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package io.github.dre2n.dungeonsxl.global;

View File

@ -33,6 +33,8 @@ import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
/**
* A sign to form a group and to define its dungeon.
*
* @author Frank Baumann, Milan Albrecht, Daniel Saukel
*/
public class GroupSign extends GlobalProtection {

View File

@ -30,6 +30,8 @@ import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
/**
* A sign to leave a group.
*
* @author Frank Baumann
*/
public class LeaveSign extends GlobalProtection {

View File

@ -26,6 +26,8 @@ import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.inventory.ItemStack;
/**
* A loot table for rewards and mob drops.
*
* @author Daniel Saukel
*/
public class DLootTable {

View File

@ -22,6 +22,8 @@ import java.util.ArrayList;
import java.util.List;
/**
* DLootTable instance manager.
*
* @author Daniel Saukel
*/
public class DLootTables {

View File

@ -26,6 +26,8 @@ import org.bukkit.Location;
import org.bukkit.entity.LivingEntity;
/**
* ExternalMobProvider implementation for Citizens.
*
* @author Daniel Saukel
*/
public class CitizensMobProvider implements ExternalMobProvider {

View File

@ -21,6 +21,8 @@ import org.bukkit.Bukkit;
import org.bukkit.Location;
/**
* A custom external mob provider like defined in the main config file.
*
* @author Daniel Saukel
*/
public class CustomExternalMobProvider implements ExternalMobProvider {

View File

@ -20,6 +20,8 @@ import org.bukkit.Bukkit;
import org.bukkit.Location;
/**
* Officially supported external mob plugins.
*
* @author Daniel Saukel
*/
public enum ExternalMobPlugin implements ExternalMobProvider {

View File

@ -19,6 +19,8 @@ package io.github.dre2n.dungeonsxl.mob;
import org.bukkit.Location;
/**
* Implement this to create custom ExternalMobProviders.
*
* @author Daniel Saukel
*/
public interface ExternalMobProvider {

View File

@ -25,6 +25,8 @@ import java.util.Set;
import org.bukkit.Bukkit;
/**
* ExternalMobProvider instance manager.
*
* @author Daniel Saukel
*/
public class ExternalMobProviders {

View File

@ -29,6 +29,8 @@ import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.inventory.ItemStack;
/**
* Represents a class and a class script.
*
* @author Frank Baumann, Daniel Saukel
*/
public class DClass {

View File

@ -22,6 +22,8 @@ import java.util.ArrayList;
import java.util.List;
/**
* DClass instance manager.
*
* @author Daniel Saukel
*/
public class DClasses {

View File

@ -33,7 +33,7 @@ import org.bukkit.entity.Player;
import org.bukkit.event.block.SignChangeEvent;
/**
* Represents a player in an DEditWorld.
* Represents a player in a DEditWorld.
*
* @author Daniel Saukel
*/

View File

@ -34,7 +34,6 @@ import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect;
import org.bukkit.scheduler.BukkitRunnable;
/**
* Represents a player in the non-DXL worlds of the server.

View File

@ -44,6 +44,8 @@ import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitTask;
/**
* Represents a group of players.
*
* @author Frank Baumann, Daniel Saukel
*/
public class DGroup {

View File

@ -21,6 +21,8 @@ import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffect;
/**
* Represents a player in an instance.
*
* @author Daniel Saukel
*/
public abstract class DInstancePlayer extends DGlobalPlayer {

View File

@ -23,6 +23,8 @@ import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
/**
* DGlobalPlayer instance manager.
*
* @author Daniel Saukel
*/
public class DPlayers {

View File

@ -26,6 +26,8 @@ import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.entity.Player;
/**
* Extend this to create a custom Requirement.
*
* @author Daniel Saukel
*/
public abstract class Requirement {

View File

@ -17,6 +17,8 @@
package io.github.dre2n.dungeonsxl.requirement;
/**
* Implement this to create custom requirement types.
*
* @author Daniel Saukel
*/
public interface RequirementType {

View File

@ -17,6 +17,8 @@
package io.github.dre2n.dungeonsxl.requirement;
/**
* Default implementation of RequirementType.
*
* @author Daniel Saukel
*/
public enum RequirementTypeDefault implements RequirementType {

View File

@ -21,6 +21,8 @@ import java.util.Arrays;
import java.util.List;
/**
* RequirementType instance manager.
*
* @author Daniel Saukel
*/
public class RequirementTypes {

View File

@ -25,6 +25,8 @@ import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
/**
* Extend this to create a custom Reward.
*
* @author Daniel Saukel
*/
public abstract class Reward {

View File

@ -17,6 +17,8 @@
package io.github.dre2n.dungeonsxl.reward;
/**
* Implement this to create custom reward types.
*
* @author Daniel Saukel
*/
public interface RewardType {

View File

@ -17,6 +17,8 @@
package io.github.dre2n.dungeonsxl.reward;
/**
* Default implementation of RewardType.
*
* @author Daniel Saukel
*/
public enum RewardTypeDefault implements RewardType {

View File

@ -21,6 +21,8 @@ import java.util.Arrays;
import java.util.List;
/**
* RewardType instance manager.
*
* @author Daniel Saukel
*/
public class RewardTypes {

View File

@ -32,6 +32,8 @@ import org.bukkit.block.Sign;
import org.bukkit.entity.Player;
/**
* Extend this to create a custom DSign.
*
* @author Frank Baumann, Milan Albrecht, Daniel Saukel
*/
public abstract class DSign {
@ -203,7 +205,7 @@ public abstract class DSign {
sign.setLine(2, ERROR_2);
sign.setLine(3, ERROR_3);
sign.update();
DMessages.LOG_ERROR_SIGN_SETUP.getMessage(sign.getX() + ", " + sign.getY() + ", " + sign.getZ());
}

View File

@ -17,6 +17,8 @@
package io.github.dre2n.dungeonsxl.sign;
/**
* Implement this to create custom sign types.
*
* @author Daniel Saukel
*/
public interface DSignType {

View File

@ -19,6 +19,8 @@ package io.github.dre2n.dungeonsxl.sign;
import io.github.dre2n.dungeonsxl.player.DPermissions;
/**
* Default implementation of DSignType.
*
* @author Daniel Saukel
*/
public enum DSignTypeDefault implements DSignType {

View File

@ -21,6 +21,8 @@ import java.util.Arrays;
import java.util.List;
/**
* DSignType instance manager.
*
* @author Daniel Saukel
*/
public class DSignTypes {

View File

@ -25,6 +25,9 @@ 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.
*
* @author Daniel Saukel
*/
public class SignScript {

View File

@ -22,6 +22,8 @@ import java.util.ArrayList;
import java.util.List;
/**
* SignScript instance manager.
*
* @author Daniel Saukel
*/
public class SignScripts {

View File

@ -29,6 +29,8 @@ import java.util.Set;
import org.bukkit.entity.Player;
/**
* Extend this to create a custom Trigger.
*
* @author Frank Baumann, Daniel Saukel
*/
public abstract class Trigger {

View File

@ -17,6 +17,8 @@
package io.github.dre2n.dungeonsxl.trigger;
/**
* Implement this to create custom trigger types.
*
* @author Daniel Saukel
*/
public interface TriggerType {

View File

@ -17,6 +17,8 @@
package io.github.dre2n.dungeonsxl.trigger;
/**
* Default implementation of TriggerType.
*
* @author Daniel Saukel
*/
public enum TriggerTypeDefault implements TriggerType {

View File

@ -21,6 +21,8 @@ import java.util.Arrays;
import java.util.List;
/**
* TriggerType instance manager.
*
* @author Daniel Saukel
*/
public class TriggerTypes {

View File

@ -20,6 +20,8 @@ import org.bukkit.ChatColor;
import org.bukkit.DyeColor;
/**
* Links different color types together.
*
* @author Daniel Saukel
*/
public enum DColor {

View File

@ -28,6 +28,8 @@ import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.scheduler.BukkitTask;
/**
* A boss bar based progress bar.
*
* @author Daniel Saukel
*/
public class ProgressBar extends BukkitRunnable {

View File

@ -31,6 +31,9 @@ import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
/**
* A raw resource world instance to edit the dungeon map.
* There is never more than one DEditWorld per DResourceWorld.
*
* @author Frank Baumann, Daniel Saukel
*/
public class DEditWorld extends DInstanceWorld {

View File

@ -66,6 +66,9 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.scheduler.BukkitRunnable;
/**
* A playable resource instance.
* There may be any amount of DGameWorlds per DResourceWorld.
*
* @author Frank Baumann, Milan Albrecht, Daniel Saukel
*/
public class DGameWorld extends DInstanceWorld {

View File

@ -25,6 +25,8 @@ import org.bukkit.Location;
import org.bukkit.World;
/**
* An instance of a resource world.
*
* @author Daniel Saukel
*/
public abstract class DInstanceWorld {

View File

@ -30,6 +30,8 @@ import org.bukkit.WorldCreator;
import org.bukkit.WorldType;
/**
* World instance manager.
*
* @author Daniel Saukel
*/
public class DWorlds {

View File

@ -20,6 +20,8 @@ import org.bukkit.block.Block;
import org.bukkit.event.block.BlockBreakEvent;
/**
* A block that has a special purpose in a game.
*
* @author Daniel Saukel
*/
public abstract class GameBlock {

View File

@ -21,6 +21,8 @@ import org.bukkit.block.BlockFace;
import org.bukkit.event.block.BlockBreakEvent;
/**
* A locked door that may be opened with a trigger.
*
* @author Daniel Saukel
*/
public class LockedDoor extends GameBlock implements MultiBlock {