diff --git a/src/main/java/com/onarandombox/MultiverseCore/MVWorld.java b/src/main/java/com/onarandombox/MultiverseCore/MVWorld.java index 1a566426..1bc501aa 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/MVWorld.java +++ b/src/main/java/com/onarandombox/MultiverseCore/MVWorld.java @@ -50,7 +50,7 @@ public class MVWorld implements MultiverseWorld { private final MultiverseCore plugin; // Hold the Plugin Instance. private final String name; // The Worlds Name, EG its folder name. private final UUID worldUID; - final WorldProperties props; + private final WorldProperties props; public MVWorld(MultiverseCore plugin, World world, WorldProperties properties) { this(plugin, world, properties, true); @@ -470,10 +470,18 @@ public class MVWorld implements MultiverseWorld { this.plugin.getServer().getPluginManager().recalculatePermissionDefaults(allWorlds); } + /** + * Copies all properties from another {@link MVWorld} object. + * @param other The other world object. + */ public void copyValues(MVWorld other) { props.copyValues(other.props); } + /** + * Copies all properties from a {@link WorldProperties} object. + * @param other The world properties object. + */ public void copyValues(WorldProperties other) { props.copyValues(other); } diff --git a/src/main/java/com/onarandombox/MultiverseCore/WorldProperties.java b/src/main/java/com/onarandombox/MultiverseCore/WorldProperties.java index 4ec266a4..542e47e2 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/WorldProperties.java +++ b/src/main/java/com/onarandombox/MultiverseCore/WorldProperties.java @@ -29,6 +29,11 @@ import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; +/* + * This is a property class, I think we don't need that much javadoc. + * BEGIN CHECKSTYLE-SUPPRESSION: Javadoc + */ + @SerializableAs("MVWorld") public class WorldProperties extends SerializationConfig { @@ -235,7 +240,7 @@ public class WorldProperties extends SerializationConfig { @Property(serializor = EnumPropertySerializor.class, description = "Sorry, 'style' must be a valid style-name.") private volatile EnglishChatStyle style; @Property(description = "Sorry, 'pvp' must either be: true or false.", virtualType = Boolean.class, persistVirtual = true) - volatile VirtualProperty pvp; + volatile VirtualProperty pvp; // SUPPRESS CHECKSTYLE: VisibilityModifier @Property(description = "Scale must be a positive double value. ex: 2.3") private volatile double scale; @Property(description = "You must set this to the NAME not alias of a world.") @@ -244,7 +249,7 @@ public class WorldProperties extends SerializationConfig { private volatile boolean allowWeather; @Property(serializor = DifficultyPropertySerializor.class, virtualType = Difficulty.class, persistVirtual = true, description = "Difficulty must be set as one of the following: peaceful easy normal hard") - volatile VirtualProperty difficulty; + volatile VirtualProperty difficulty; // SUPPRESS CHECKSTYLE: VisibilityModifier @Property(description = "Sorry, 'animals' must either be: true or false.") private volatile SpawnSettings spawning; @Property @@ -260,12 +265,12 @@ public class WorldProperties extends SerializationConfig { @Property(serializor = GameModePropertySerializor.class, description = "GameMode must be set as one of the following: survival creative") private volatile GameMode gameMode; @Property(description = "Sorry, this must either be: true or false.", virtualType = Boolean.class, persistVirtual = true) - volatile VirtualProperty keepSpawnInMemory; + volatile VirtualProperty keepSpawnInMemory; // SUPPRESS CHECKSTYLE: VisibilityModifier @Property - volatile SpawnLocation spawnLocation; + volatile SpawnLocation spawnLocation; // SUPPRESS CHECKSTYLE: VisibilityModifier @Property(virtualType = Location.class, description = "There is no help available for this variable. Go bug Rigby90 about it.") - volatile VirtualProperty spawn; + volatile VirtualProperty spawn; // SUPPRESS CHECKSTYLE: VisibilityModifier @Property(description = "Set this to false ONLY if you don't want this world to load itself on server restart.") private volatile boolean autoLoad; @Property(description = "If a player dies in this world, shoudld they go to their bed?") @@ -274,11 +279,11 @@ public class WorldProperties extends SerializationConfig { private volatile List worldBlacklist; @Property(serializor = TimePropertySerializor.class, virtualType = Long.class, description = "Set the time to whatever you want! (Will NOT freeze time)") - volatile VirtualProperty time; + volatile VirtualProperty time; // SUPPRESS CHECKSTYLE: VisibilityModifier @Property - volatile Environment environment; + volatile Environment environment; // SUPPRESS CHECKSTYLE: VisibilityModifier @Property - volatile long seed; + volatile long seed; // SUPPRESS CHECKSTYLE: VisibilityModifier @Property private volatile String generator; @Property @@ -547,7 +552,7 @@ public class WorldProperties extends SerializationConfig { return this.difficulty.get(); } - @Deprecated + @Deprecated // SUPPRESS CHECKSTYLE: Deprecated public boolean setDifficulty(String difficulty) { return this.setPropertyUnchecked("difficulty", difficulty); } diff --git a/src/main/java/com/onarandombox/MultiverseCore/listeners/MVMapListener.java b/src/main/java/com/onarandombox/MultiverseCore/listeners/MVMapListener.java index 3a3f6ad0..fe039a6c 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/listeners/MVMapListener.java +++ b/src/main/java/com/onarandombox/MultiverseCore/listeners/MVMapListener.java @@ -21,6 +21,10 @@ public class MVMapListener implements Listener { this.plugin = plugin; } + /** + * This method is called when a map is initialized. + * @param event The event that was fired. + */ @EventHandler public void mapInitialize(final MapInitializeEvent event) { for (final Player player : Bukkit.getOnlinePlayers()) {