summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pom.xml1
-rw-r--r--src/main/java/org/bukkit/Bukkit.java10
-rw-r--r--src/main/java/org/bukkit/Effect.java2
-rw-r--r--src/main/java/org/bukkit/FireworkEffect.java4
-rw-r--r--src/main/java/org/bukkit/Rotation.java2
-rw-r--r--src/main/java/org/bukkit/Server.java2
-rw-r--r--src/main/java/org/bukkit/block/banner/Pattern.java10
-rw-r--r--src/main/java/org/bukkit/command/defaults/TimingsCommand.java2
-rw-r--r--src/main/java/org/bukkit/configuration/MemorySection.java2
-rw-r--r--src/main/java/org/bukkit/configuration/file/YamlConfiguration.java3
-rw-r--r--src/main/java/org/bukkit/conversations/BooleanPrompt.java2
-rw-r--r--src/main/java/org/bukkit/conversations/Conversation.java2
-rw-r--r--src/main/java/org/bukkit/conversations/ConversationFactory.java7
-rw-r--r--src/main/java/org/bukkit/conversations/InactivityConversationCanceller.java3
-rw-r--r--src/main/java/org/bukkit/conversations/ManuallyAbandonedConversationCanceller.java2
-rw-r--r--src/main/java/org/bukkit/conversations/MessagePrompt.java2
-rw-r--r--src/main/java/org/bukkit/conversations/NullConversationPrefix.java4
-rw-r--r--src/main/java/org/bukkit/conversations/NumericPrompt.java5
-rw-r--r--src/main/java/org/bukkit/conversations/PlayerNamePrompt.java3
-rw-r--r--src/main/java/org/bukkit/conversations/StringPrompt.java2
-rw-r--r--src/main/java/org/bukkit/event/player/AsyncPlayerChatEvent.java2
-rw-r--r--src/main/java/org/bukkit/event/player/PlayerBucketEvent.java2
-rw-r--r--src/main/java/org/bukkit/event/player/PlayerEditBookEvent.java2
-rw-r--r--src/main/java/org/bukkit/event/player/PlayerLevelChangeEvent.java6
-rw-r--r--src/main/java/org/bukkit/event/player/PlayerPortalEvent.java2
-rw-r--r--src/main/java/org/bukkit/event/player/PlayerStatisticIncrementEvent.java6
-rw-r--r--src/main/java/org/bukkit/event/player/PlayerToggleSprintEvent.java2
-rw-r--r--src/main/java/org/bukkit/inventory/CraftingInventory.java2
-rw-r--r--src/main/java/org/bukkit/inventory/InventoryView.java4
-rw-r--r--src/main/java/org/bukkit/inventory/meta/FireworkMeta.java2
-rw-r--r--src/main/java/org/bukkit/inventory/meta/ItemMeta.java14
-rw-r--r--src/main/java/org/bukkit/map/MapFont.java2
-rw-r--r--src/main/java/org/bukkit/material/Cauldron.java2
-rw-r--r--src/main/java/org/bukkit/material/Comparator.java6
-rw-r--r--src/main/java/org/bukkit/material/Crops.java8
-rw-r--r--src/main/java/org/bukkit/material/Gate.java6
-rw-r--r--src/main/java/org/bukkit/material/Mushroom.java5
-rw-r--r--src/main/java/org/bukkit/material/NetherWarts.java2
-rw-r--r--src/main/java/org/bukkit/material/SpawnEgg.java2
-rw-r--r--src/main/java/org/bukkit/material/Stairs.java2
-rw-r--r--src/main/java/org/bukkit/material/Step.java2
-rw-r--r--src/main/java/org/bukkit/material/Tripwire.java10
-rw-r--r--src/main/java/org/bukkit/material/TripwireHook.java2
-rw-r--r--src/main/java/org/bukkit/material/Vine.java6
-rw-r--r--src/main/java/org/bukkit/permissions/Permission.java2
-rw-r--r--src/main/java/org/bukkit/plugin/PluginDescriptionFile.java4
-rw-r--r--src/main/java/org/bukkit/plugin/RegisteredListener.java6
-rw-r--r--src/main/java/org/bukkit/plugin/SimplePluginManager.java4
-rw-r--r--src/main/java/org/bukkit/potion/PotionEffect.java10
-rw-r--r--src/main/java/org/bukkit/util/ChatPaginator.java8
50 files changed, 96 insertions, 107 deletions
diff --git a/pom.xml b/pom.xml
index 2b273b1a..fa6cd0c1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,7 +54,6 @@
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
- <type>jar</type>
<scope>compile</scope>
</dependency>
<!-- bundled with Minecraft, should be kept in sync -->
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 87c34743..d57e4a57 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -197,7 +197,7 @@ public final class Bukkit {
public static String getServerId() {
return server.getServerId();
}
-
+
/**
* Get world type (level-type setting) for default world.
*
@@ -567,7 +567,7 @@ public final class Bukkit {
public static void savePlayers() {
server.savePlayers();
}
-
+
/**
* Dispatches a command on this server, and executes it if found.
*
@@ -626,7 +626,7 @@ public final class Bukkit {
public static void resetRecipes() {
server.resetRecipes();
}
-
+
/**
* Gets a list of command aliases defined in the server properties.
*
@@ -781,7 +781,7 @@ public final class Bukkit {
* @param type the type of list to fetch, cannot be null
* @return a ban list of the specified type
*/
- public static BanList getBanList(BanList.Type type){
+ public static BanList getBanList(BanList.Type type) {
return server.getBanList(type);
}
@@ -955,7 +955,7 @@ public final class Bukkit {
public static int getWaterAnimalSpawnLimit() {
return server.getWaterAnimalSpawnLimit();
}
-
+
/**
* Gets user-specified limit for number of ambient mobs that can spawn in
* a chunk.
diff --git a/src/main/java/org/bukkit/Effect.java b/src/main/java/org/bukkit/Effect.java
index ba7dc495..21f7db58 100644
--- a/src/main/java/org/bukkit/Effect.java
+++ b/src/main/java/org/bukkit/Effect.java
@@ -204,7 +204,7 @@ public enum Effect {
private static final Map<Integer, Effect> BY_ID = Maps.newHashMap();
Effect(int id, Type type) {
- this(id,type,null);
+ this(id, type, null);
}
Effect(int id, Type type, Class<?> data) {
diff --git a/src/main/java/org/bukkit/FireworkEffect.java b/src/main/java/org/bukkit/FireworkEffect.java
index 4b0687fe..e565a2b7 100644
--- a/src/main/java/org/bukkit/FireworkEffect.java
+++ b/src/main/java/org/bukkit/FireworkEffect.java
@@ -145,7 +145,7 @@ public final class FireworkEffect implements ConfigurationSerializable {
* @throws IllegalArgumentException If any color is null (may be
* thrown after changes have occurred)
*/
- public Builder withColor(Color...colors) throws IllegalArgumentException {
+ public Builder withColor(Color... colors) throws IllegalArgumentException {
Validate.notNull(colors, "Cannot have null colors");
if (colors.length == 0) {
return this;
@@ -214,7 +214,7 @@ public final class FireworkEffect implements ConfigurationSerializable {
* @throws IllegalArgumentException If any color is null (may be
* thrown after changes have occurred)
*/
- public Builder withFade(Color...colors) throws IllegalArgumentException {
+ public Builder withFade(Color... colors) throws IllegalArgumentException {
Validate.notNull(colors, "Cannot have null colors");
if (colors.length == 0) {
return this;
diff --git a/src/main/java/org/bukkit/Rotation.java b/src/main/java/org/bukkit/Rotation.java
index 5d059eae..8afd0469 100644
--- a/src/main/java/org/bukkit/Rotation.java
+++ b/src/main/java/org/bukkit/Rotation.java
@@ -41,7 +41,7 @@ public enum Rotation {
COUNTER_CLOCKWISE_45
;
- private static final Rotation [] rotations = values();
+ private static final Rotation[] rotations = values();
/**
* Rotate clockwise by 90 degrees.
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 073fecd5..5f88b720 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -918,7 +918,7 @@ public interface Server extends PluginMessageRecipient {
* @param flags an optional list of flags to set on the boss bar
* @return the created boss bar
*/
- BossBar createBossBar(String title, BarColor color, BarStyle style, BarFlag ...flags);
+ BossBar createBossBar(String title, BarColor color, BarStyle style, BarFlag... flags);
/**
* Gets an entity on the server by its UUID
diff --git a/src/main/java/org/bukkit/block/banner/Pattern.java b/src/main/java/org/bukkit/block/banner/Pattern.java
index 95b0f3c8..4a8444d2 100644
--- a/src/main/java/org/bukkit/block/banner/Pattern.java
+++ b/src/main/java/org/bukkit/block/banner/Pattern.java
@@ -12,7 +12,7 @@ public class Pattern implements ConfigurationSerializable {
private static final String COLOR = "color";
private static final String PATTERN = "pattern";
-
+
private final DyeColor color;
private final PatternType pattern;
@@ -27,7 +27,7 @@ public class Pattern implements ConfigurationSerializable {
this.color = color;
this.pattern = pattern;
}
-
+
/**
* Constructor for deserialization.
*
@@ -36,16 +36,16 @@ public class Pattern implements ConfigurationSerializable {
public Pattern(Map<String, Object> map) {
color = DyeColor.valueOf(getString(map, COLOR));
pattern = PatternType.getByIdentifier(getString(map, PATTERN));
- }
+ }
- private static String getString(Map<?,?> map, Object key) {
+ private static String getString(Map<?, ?> map, Object key) {
Object str = map.get(key);
if (str instanceof String) {
return (String) str;
}
throw new NoSuchElementException(map + " does not contain " + key);
}
-
+
@Override
public Map<String, Object> serialize() {
return ImmutableMap.<String, Object>of(
diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
index a39ea5dd..66ea6345 100644
--- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
@@ -46,7 +46,7 @@ public class TimingsCommand extends BukkitCommand {
for (HandlerList handlerList : HandlerList.getHandlerLists()) {
for (RegisteredListener listener : handlerList.getRegisteredListeners()) {
if (listener instanceof TimedRegisteredListener) {
- ((TimedRegisteredListener)listener).reset();
+ ((TimedRegisteredListener) listener).reset();
}
}
}
diff --git a/src/main/java/org/bukkit/configuration/MemorySection.java b/src/main/java/org/bukkit/configuration/MemorySection.java
index 1f4c8ce4..6e5ba586 100644
--- a/src/main/java/org/bukkit/configuration/MemorySection.java
+++ b/src/main/java/org/bukkit/configuration/MemorySection.java
@@ -181,7 +181,7 @@ public class MemorySection implements ConfigurationSection {
ConfigurationSection subSection = section.getConfigurationSection(node);
if (subSection == null) {
if (value == null) {
- // no need to create missing sub-sections if we want to remove the value:
+ // no need to create missing sub-sections if we want to remove the value:
return;
}
section = section.createSection(node);
diff --git a/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java b/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java
index 6f082731..60eecf4b 100644
--- a/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java
+++ b/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java
@@ -3,7 +3,6 @@ package org.bukkit.configuration.file;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
-import java.io.InputStream;
import java.io.Reader;
import java.util.Map;
import java.util.logging.Level;
@@ -181,7 +180,7 @@ public class YamlConfiguration extends FileConfiguration {
} catch (IOException ex) {
Bukkit.getLogger().log(Level.SEVERE, "Cannot load " + file, ex);
} catch (InvalidConfigurationException ex) {
- Bukkit.getLogger().log(Level.SEVERE, "Cannot load " + file , ex);
+ Bukkit.getLogger().log(Level.SEVERE, "Cannot load " + file, ex);
}
return config;
diff --git a/src/main/java/org/bukkit/conversations/BooleanPrompt.java b/src/main/java/org/bukkit/conversations/BooleanPrompt.java
index 3f2c97f4..c37d1596 100644
--- a/src/main/java/org/bukkit/conversations/BooleanPrompt.java
+++ b/src/main/java/org/bukkit/conversations/BooleanPrompt.java
@@ -7,7 +7,7 @@ import org.apache.commons.lang.BooleanUtils;
* BooleanPrompt is the base class for any prompt that requires a boolean
* response from the user.
*/
-public abstract class BooleanPrompt extends ValidatingPrompt{
+public abstract class BooleanPrompt extends ValidatingPrompt {
public BooleanPrompt() {
super();
diff --git a/src/main/java/org/bukkit/conversations/Conversation.java b/src/main/java/org/bukkit/conversations/Conversation.java
index d4c1f6d3..6d53ea2e 100644
--- a/src/main/java/org/bukkit/conversations/Conversation.java
+++ b/src/main/java/org/bukkit/conversations/Conversation.java
@@ -217,7 +217,7 @@ public class Conversation {
}
// Test for conversation abandonment based on input
- for(ConversationCanceller canceller : cancellers) {
+ for (ConversationCanceller canceller : cancellers) {
if (canceller.cancelBasedOnInput(context, input)) {
abandon(new ConversationAbandonedEvent(this, canceller));
return;
diff --git a/src/main/java/org/bukkit/conversations/ConversationFactory.java b/src/main/java/org/bukkit/conversations/ConversationFactory.java
index e7cbd52c..8a3b3920 100644
--- a/src/main/java/org/bukkit/conversations/ConversationFactory.java
+++ b/src/main/java/org/bukkit/conversations/ConversationFactory.java
@@ -35,8 +35,7 @@ public class ConversationFactory {
*
* @param plugin The plugin that owns the factory.
*/
- public ConversationFactory(Plugin plugin)
- {
+ public ConversationFactory(Plugin plugin) {
this.plugin = plugin;
isModal = true;
localEchoEnabled = true;
@@ -58,8 +57,7 @@ public class ConversationFactory {
* @param modal The modality of all conversations to be created.
* @return This object.
*/
- public ConversationFactory withModality(boolean modal)
- {
+ public ConversationFactory withModality(boolean modal) {
isModal = modal;
return this;
}
@@ -141,7 +139,6 @@ public class ConversationFactory {
return withConversationCanceller(new ExactMatchConversationCanceller(escapeSequence));
}
-
/**
* Adds a {@link ConversationCanceller} to constructed conversations.
*
diff --git a/src/main/java/org/bukkit/conversations/InactivityConversationCanceller.java b/src/main/java/org/bukkit/conversations/InactivityConversationCanceller.java
index 760a518e..617e26d8 100644
--- a/src/main/java/org/bukkit/conversations/InactivityConversationCanceller.java
+++ b/src/main/java/org/bukkit/conversations/InactivityConversationCanceller.java
@@ -1,6 +1,5 @@
package org.bukkit.conversations;
-import org.bukkit.Server;
import org.bukkit.plugin.Plugin;
/**
@@ -48,7 +47,7 @@ public class InactivityConversationCanceller implements ConversationCanceller {
public void run() {
if (conversation.getState() == Conversation.ConversationState.UNSTARTED) {
startTimer();
- } else if (conversation.getState() == Conversation.ConversationState.STARTED) {
+ } else if (conversation.getState() == Conversation.ConversationState.STARTED) {
cancelling(conversation);
conversation.abandon(new ConversationAbandonedEvent(conversation, InactivityConversationCanceller.this));
}
diff --git a/src/main/java/org/bukkit/conversations/ManuallyAbandonedConversationCanceller.java b/src/main/java/org/bukkit/conversations/ManuallyAbandonedConversationCanceller.java
index 3e80de1f..1272f22c 100644
--- a/src/main/java/org/bukkit/conversations/ManuallyAbandonedConversationCanceller.java
+++ b/src/main/java/org/bukkit/conversations/ManuallyAbandonedConversationCanceller.java
@@ -5,7 +5,7 @@ package org.bukkit.conversations;
* ConversationAbandonedEvent} to indicate that the conversation was manually
* abandoned by programmatically calling the abandon() method on it.
*/
-public class ManuallyAbandonedConversationCanceller implements ConversationCanceller{
+public class ManuallyAbandonedConversationCanceller implements ConversationCanceller {
public void setConversation(Conversation conversation) {
throw new UnsupportedOperationException();
}
diff --git a/src/main/java/org/bukkit/conversations/MessagePrompt.java b/src/main/java/org/bukkit/conversations/MessagePrompt.java
index fa1775a4..6d379bec 100644
--- a/src/main/java/org/bukkit/conversations/MessagePrompt.java
+++ b/src/main/java/org/bukkit/conversations/MessagePrompt.java
@@ -4,7 +4,7 @@ package org.bukkit.conversations;
* MessagePrompt is the base class for any prompt that only displays a message
* to the user and requires no input.
*/
-public abstract class MessagePrompt implements Prompt{
+public abstract class MessagePrompt implements Prompt {
public MessagePrompt() {
super();
diff --git a/src/main/java/org/bukkit/conversations/NullConversationPrefix.java b/src/main/java/org/bukkit/conversations/NullConversationPrefix.java
index 7d8a7d85..57d777e7 100644
--- a/src/main/java/org/bukkit/conversations/NullConversationPrefix.java
+++ b/src/main/java/org/bukkit/conversations/NullConversationPrefix.java
@@ -1,12 +1,10 @@
package org.bukkit.conversations;
-import org.bukkit.command.CommandSender;
-
/**
* NullConversationPrefix is a {@link ConversationPrefix} implementation that
* displays nothing in front of conversation output.
*/
-public class NullConversationPrefix implements ConversationPrefix{
+public class NullConversationPrefix implements ConversationPrefix {
/**
* Prepends each conversation message with an empty string.
diff --git a/src/main/java/org/bukkit/conversations/NumericPrompt.java b/src/main/java/org/bukkit/conversations/NumericPrompt.java
index f0fdea1c..7154bda3 100644
--- a/src/main/java/org/bukkit/conversations/NumericPrompt.java
+++ b/src/main/java/org/bukkit/conversations/NumericPrompt.java
@@ -6,7 +6,7 @@ import org.apache.commons.lang.math.NumberUtils;
* NumericPrompt is the base class for any prompt that requires a {@link
* Number} response from the user.
*/
-public abstract class NumericPrompt extends ValidatingPrompt{
+public abstract class NumericPrompt extends ValidatingPrompt {
public NumericPrompt() {
super();
}
@@ -30,8 +30,7 @@ public abstract class NumericPrompt extends ValidatingPrompt{
@Override
protected Prompt acceptValidatedInput(ConversationContext context, String input) {
- try
- {
+ try {
return acceptValidatedInput(context, NumberUtils.createNumber(input));
} catch (NumberFormatException e) {
return acceptValidatedInput(context, NumberUtils.INTEGER_ZERO);
diff --git a/src/main/java/org/bukkit/conversations/PlayerNamePrompt.java b/src/main/java/org/bukkit/conversations/PlayerNamePrompt.java
index feeb7155..dcf8090d 100644
--- a/src/main/java/org/bukkit/conversations/PlayerNamePrompt.java
+++ b/src/main/java/org/bukkit/conversations/PlayerNamePrompt.java
@@ -7,7 +7,7 @@ import org.bukkit.plugin.Plugin;
* PlayerNamePrompt is the base class for any prompt that requires the player
* to enter another player's name.
*/
-public abstract class PlayerNamePrompt extends ValidatingPrompt{
+public abstract class PlayerNamePrompt extends ValidatingPrompt {
private Plugin plugin;
public PlayerNamePrompt(Plugin plugin) {
@@ -18,7 +18,6 @@ public abstract class PlayerNamePrompt extends ValidatingPrompt{
@Override
protected boolean isInputValid(ConversationContext context, String input) {
return plugin.getServer().getPlayer(input) != null;
-
}
@Override
diff --git a/src/main/java/org/bukkit/conversations/StringPrompt.java b/src/main/java/org/bukkit/conversations/StringPrompt.java
index 29344595..3e3e5e9e 100644
--- a/src/main/java/org/bukkit/conversations/StringPrompt.java
+++ b/src/main/java/org/bukkit/conversations/StringPrompt.java
@@ -4,7 +4,7 @@ package org.bukkit.conversations;
* StringPrompt is the base class for any prompt that accepts an arbitrary
* string from the user.
*/
-public abstract class StringPrompt implements Prompt{
+public abstract class StringPrompt implements Prompt {
/**
* Ensures that the prompt waits for the user to provide input.
diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerChatEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerChatEvent.java
index a7962920..680a632e 100644
--- a/src/main/java/org/bukkit/event/player/AsyncPlayerChatEvent.java
+++ b/src/main/java/org/bukkit/event/player/AsyncPlayerChatEvent.java
@@ -122,7 +122,7 @@ public class AsyncPlayerChatEvent extends PlayerEvent implements Cancellable {
}
public boolean isCancelled() {
- return cancel ;
+ return cancel;
}
public void setCancelled(boolean cancel) {
diff --git a/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java b/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java
index d32c55e4..e18feff2 100644
--- a/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java
@@ -77,4 +77,4 @@ public abstract class PlayerBucketEvent extends PlayerEvent implements Cancellab
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/org/bukkit/event/player/PlayerEditBookEvent.java b/src/main/java/org/bukkit/event/player/PlayerEditBookEvent.java
index ea7ecefe..2cb8ca28 100644
--- a/src/main/java/org/bukkit/event/player/PlayerEditBookEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerEditBookEvent.java
@@ -23,7 +23,7 @@ public class PlayerEditBookEvent extends PlayerEvent implements Cancellable {
public PlayerEditBookEvent(Player who, int slot, BookMeta previousBookMeta, BookMeta newBookMeta, boolean isSigning) {
super(who);
- Validate.isTrue(slot >= 0 && slot <=8, "Slot must be in range 0-8 inclusive");
+ Validate.isTrue(slot >= 0 && slot <= 8, "Slot must be in range 0-8 inclusive");
Validate.notNull(previousBookMeta, "Previous book meta must not be null");
Validate.notNull(newBookMeta, "New book meta must not be null");
diff --git a/src/main/java/org/bukkit/event/player/PlayerLevelChangeEvent.java b/src/main/java/org/bukkit/event/player/PlayerLevelChangeEvent.java
index 730a7762..68254279 100644
--- a/src/main/java/org/bukkit/event/player/PlayerLevelChangeEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerLevelChangeEvent.java
@@ -12,9 +12,9 @@ public class PlayerLevelChangeEvent extends PlayerEvent {
private final int newLevel;
public PlayerLevelChangeEvent(final Player player, final int oldLevel, final int newLevel) {
- super(player);
- this.oldLevel = oldLevel;
- this.newLevel = newLevel;
+ super(player);
+ this.oldLevel = oldLevel;
+ this.newLevel = newLevel;
}
/**
diff --git a/src/main/java/org/bukkit/event/player/PlayerPortalEvent.java b/src/main/java/org/bukkit/event/player/PlayerPortalEvent.java
index 93752f79..330311df 100644
--- a/src/main/java/org/bukkit/event/player/PlayerPortalEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerPortalEvent.java
@@ -84,4 +84,4 @@ public class PlayerPortalEvent extends PlayerTeleportEvent {
public static HandlerList getHandlerList() {
return handlers;
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/org/bukkit/event/player/PlayerStatisticIncrementEvent.java b/src/main/java/org/bukkit/event/player/PlayerStatisticIncrementEvent.java
index 3b64d702..7c70bbb0 100644
--- a/src/main/java/org/bukkit/event/player/PlayerStatisticIncrementEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerStatisticIncrementEvent.java
@@ -24,7 +24,7 @@ public class PlayerStatisticIncrementEvent extends PlayerEvent implements Cancel
private final Material material;
public PlayerStatisticIncrementEvent(Player player, Statistic statistic, int initialValue, int newValue) {
- super (player);
+ super(player);
this.statistic = statistic;
this.initialValue = initialValue;
this.newValue = newValue;
@@ -33,7 +33,7 @@ public class PlayerStatisticIncrementEvent extends PlayerEvent implements Cancel
}
public PlayerStatisticIncrementEvent(Player player, Statistic statistic, int initialValue, int newValue, EntityType entityType) {
- super (player);
+ super(player);
this.statistic = statistic;
this.initialValue = initialValue;
this.newValue = newValue;
@@ -42,7 +42,7 @@ public class PlayerStatisticIncrementEvent extends PlayerEvent implements Cancel
}
public PlayerStatisticIncrementEvent(Player player, Statistic statistic, int initialValue, int newValue, Material material) {
- super (player);
+ super(player);
this.statistic = statistic;
this.initialValue = initialValue;
this.newValue = newValue;
diff --git a/src/main/java/org/bukkit/event/player/PlayerToggleSprintEvent.java b/src/main/java/org/bukkit/event/player/PlayerToggleSprintEvent.java
index cf065e11..1558f8f7 100644
--- a/src/main/java/org/bukkit/event/player/PlayerToggleSprintEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerToggleSprintEvent.java
@@ -42,4 +42,4 @@ public class PlayerToggleSprintEvent extends PlayerEvent implements Cancellable
public static HandlerList getHandlerList() {
return handlers;
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/org/bukkit/inventory/CraftingInventory.java b/src/main/java/org/bukkit/inventory/CraftingInventory.java
index f71533c7..106367e7 100644
--- a/src/main/java/org/bukkit/inventory/CraftingInventory.java
+++ b/src/main/java/org/bukkit/inventory/CraftingInventory.java
@@ -42,4 +42,4 @@ public interface CraftingInventory extends Inventory {
* recipe.
*/
Recipe getRecipe();
-} \ No newline at end of file
+}
diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/java/org/bukkit/inventory/InventoryView.java
index 35c7d2bd..647b804e 100644
--- a/src/main/java/org/bukkit/inventory/InventoryView.java
+++ b/src/main/java/org/bukkit/inventory/InventoryView.java
@@ -159,9 +159,9 @@ public abstract class InventoryView {
public void setItem(int slot, ItemStack item) {
if (slot != OUTSIDE) {
if (slot < getTopInventory().getSize()) {
- getTopInventory().setItem(convertSlot(slot),item);
+ getTopInventory().setItem(convertSlot(slot), item);
} else {
- getBottomInventory().setItem(convertSlot(slot),item);
+ getBottomInventory().setItem(convertSlot(slot), item);
}
} else {
getPlayer().getWorld().dropItemNaturally(getPlayer().getLocation(), item);
diff --git a/src/main/java/org/bukkit/inventory/meta/FireworkMeta.java b/src/main/java/org/bukkit/inventory/meta/FireworkMeta.java
index 1e3ee59b..d3a86c7e 100644
--- a/src/main/java/org/bukkit/inventory/meta/FireworkMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/FireworkMeta.java
@@ -26,7 +26,7 @@ public interface FireworkMeta extends ItemMeta {
* @throws IllegalArgumentException If any effect is null (may be thrown
* after changes have occurred)
*/
- void addEffects(FireworkEffect...effects) throws IllegalArgumentException;
+ void addEffects(FireworkEffect... effects) throws IllegalArgumentException;
/**
* Add several firework effects to this firework.
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
index 37d2e49e..76d43266 100644
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
@@ -141,13 +141,13 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable {
*/
boolean removeEnchant(Enchantment ench);
- /**
- * Checks if the specified enchantment conflicts with any enchantments in
- * this ItemMeta.
- *
- * @param ench enchantment to test
- * @return true if the enchantment conflicts, false otherwise
- */
+ /**
+ * Checks if the specified enchantment conflicts with any enchantments in
+ * this ItemMeta.
+ *
+ * @param ench enchantment to test
+ * @return true if the enchantment conflicts, false otherwise
+ */
boolean hasConflictingEnchant(Enchantment ench);
/**
diff --git a/src/main/java/org/bukkit/map/MapFont.java b/src/main/java/org/bukkit/map/MapFont.java
index ed70d1e9..2d3b2da2 100644
--- a/src/main/java/org/bukkit/map/MapFont.java
+++ b/src/main/java/org/bukkit/map/MapFont.java
@@ -53,7 +53,7 @@ public class MapFont {
throw new IllegalArgumentException("text contains invalid characters");
}
- if (text.length() == 0){
+ if (text.length() == 0) {
return 0;
}
diff --git a/src/main/java/org/bukkit/material/Cauldron.java b/src/main/java/org/bukkit/material/Cauldron.java
index 0ead402b..0d00e501 100644
--- a/src/main/java/org/bukkit/material/Cauldron.java
+++ b/src/main/java/org/bukkit/material/Cauldron.java
@@ -20,7 +20,7 @@ public class Cauldron extends MaterialData {
* @deprecated Magic value
*/
@Deprecated
- public Cauldron(int type, byte data){
+ public Cauldron(int type, byte data) {
super(type, data);
}
diff --git a/src/main/java/org/bukkit/material/Comparator.java b/src/main/java/org/bukkit/material/Comparator.java
index b5602ee6..b5b44b65 100644
--- a/src/main/java/org/bukkit/material/Comparator.java
+++ b/src/main/java/org/bukkit/material/Comparator.java
@@ -41,7 +41,7 @@ public class Comparator extends MaterialData implements Directional, Redstone {
* @see BlockFace
*/
public Comparator(BlockFace facingDirection, boolean isSubtraction) {
- this(facingDirection, isSubtraction, DEFAULT_STATE);
+ this(facingDirection, isSubtraction, DEFAULT_STATE);
}
/**
@@ -98,7 +98,7 @@ public class Comparator extends MaterialData implements Directional, Redstone {
* @param isSubtraction True if the comparator is in subtraction mode, false for normal comparator operation
*/
public void setSubtractionMode(boolean isSubtraction) {
- setData((byte)(getData() & 0xB | (isSubtraction ? 0x4 : 0x0)));
+ setData((byte) (getData() & 0xB | (isSubtraction ? 0x4 : 0x0)));
}
/**
@@ -139,7 +139,7 @@ public class Comparator extends MaterialData implements Directional, Redstone {
data |= 0x0;
}
- setData((byte)data);
+ setData((byte) data);
}
/**
diff --git a/src/main/java/org/bukkit/material/Crops.java b/src/main/java/org/bukkit/material/Crops.java
index f48637d0..f149831c 100644
--- a/src/main/java/org/bukkit/material/Crops.java
+++ b/src/main/java/org/bukkit/material/Crops.java
@@ -96,12 +96,12 @@ public class Crops extends MaterialData {
case CARROT:
case POTATO:
// Mask the data just in case top bit set
- return CropState.getByData((byte)(getData() & 0x7));
+ return CropState.getByData((byte) (getData() & 0x7));
case BEETROOT_BLOCK:
case NETHER_WARTS:
// Mask the data just in case top bits are set
// Will return SEEDED, SMALL, TALL, RIPE for the three growth data values
- return CropState.getByData((byte)(((getData() & 0x3)*7+2)/3)) ;
+ return CropState.getByData((byte) (((getData() & 0x3) * 7 + 2) / 3));
default:
throw new IllegalArgumentException("Block type is not a crop");
}
@@ -127,12 +127,12 @@ public class Crops extends MaterialData {
case CARROT:
case POTATO:
// Preserve the top bit in case it is set
- setData((byte)((getData() & 0x8)|state.getData()));
+ setData((byte) ((getData() & 0x8) | state.getData()));
break;
case NETHER_WARTS:
case BEETROOT_BLOCK:
// Preserve the top bits in case they are set
- setData((byte)((getData() & 0xC)|(state.getData() >> 1)));
+ setData((byte) ((getData() & 0xC) | (state.getData() >> 1)));
break;
default:
throw new IllegalArgumentException("Block type is not a crop");
diff --git a/src/main/java/org/bukkit/material/Gate.java b/src/main/java/org/bukkit/material/Gate.java
index 8adc1cfb..19a66ee9 100644
--- a/src/main/java/org/bukkit/material/Gate.java
+++ b/src/main/java/org/bukkit/material/Gate.java
@@ -18,7 +18,7 @@ public class Gate extends MaterialData implements Directional, Openable {
super(Material.FENCE_GATE);
}
- public Gate(int type, byte data){
+ public Gate(int type, byte data) {
super(type, data);
}
@@ -27,7 +27,7 @@ public class Gate extends MaterialData implements Directional, Openable {
}
public void setFacingDirection(BlockFace face) {
- byte data = (byte) (getData() &~ DIR_BIT);
+ byte data = (byte) (getData() & ~DIR_BIT);
switch (face) {
default:
@@ -88,4 +88,4 @@ public class Gate extends MaterialData implements Directional, Openable {
public Gate clone() {
return (Gate) super.clone();
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/org/bukkit/material/Mushroom.java b/src/main/java/org/bukkit/material/Mushroom.java
index 3b372ec3..16453073 100644
--- a/src/main/java/org/bukkit/material/Mushroom.java
+++ b/src/main/java/org/bukkit/material/Mushroom.java
@@ -88,7 +88,7 @@ public class Mushroom extends MaterialData {
* @deprecated Magic value
*/
@Deprecated
- public Mushroom(int type, byte data){
+ public Mushroom(int type, byte data) {
super(type, data);
Validate.isTrue(type == Material.HUGE_MUSHROOM_1.getId() || type == Material.HUGE_MUSHROOM_2.getId(), "Not a mushroom!");
}
@@ -237,8 +237,7 @@ public class Mushroom extends MaterialData {
case DOWN:
if (painted) {
data = MushroomBlockTexture.ALL_CAP.getData();
- }
- else {
+ } else {
data = MushroomBlockTexture.ALL_PORES.getData();
}
break;
diff --git a/src/main/java/org/bukkit/material/NetherWarts.java b/src/main/java/org/bukkit/material/NetherWarts.java
index 55eb864a..663b1a10 100644
--- a/src/main/java/org/bukkit/material/NetherWarts.java
+++ b/src/main/java/org/bukkit/material/NetherWarts.java
@@ -26,7 +26,7 @@ public class NetherWarts extends MaterialData {
}
public NetherWarts(final Material type) {
- super (type);
+ super(type);
}
/**
diff --git a/src/main/java/org/bukkit/material/SpawnEgg.java b/src/main/java/org/bukkit/material/SpawnEgg.java
index 40be534a..a8613a0c 100644
--- a/src/main/java/org/bukkit/material/SpawnEgg.java
+++ b/src/main/java/org/bukkit/material/SpawnEgg.java
@@ -21,7 +21,7 @@ public class SpawnEgg extends MaterialData {
* @deprecated Magic value
*/
@Deprecated
- public SpawnEgg(int type, byte data){
+ public SpawnEgg(int type, byte data) {
super(type, data);
}
diff --git a/src/main/java/org/bukkit/material/Stairs.java b/src/main/java/org/bukkit/material/Stairs.java
index 7dde0214..80c6fb1b 100644
--- a/src/main/java/org/bukkit/material/Stairs.java
+++ b/src/main/java/org/bukkit/material/Stairs.java
@@ -130,7 +130,7 @@ public class Stairs extends MaterialData implements Directional {
@Override
public String toString() {
- return super.toString() + " facing " + getFacing() + (isInverted()?" inverted":"");
+ return super.toString() + " facing " + getFacing() + (isInverted() ? " inverted" : "");
}
@Override
diff --git a/src/main/java/org/bukkit/material/Step.java b/src/main/java/org/bukkit/material/Step.java
index c2ccfce4..7f46af26 100644
--- a/src/main/java/org/bukkit/material/Step.java
+++ b/src/main/java/org/bukkit/material/Step.java
@@ -116,6 +116,6 @@ public class Step extends TexturedMaterial {
@Override
public String toString() {
- return super.toString() + (isInverted()?"inverted":"");
+ return super.toString() + (isInverted() ? "inverted" : "");
}
}
diff --git a/src/main/java/org/bukkit/material/Tripwire.java b/src/main/java/org/bukkit/material/Tripwire.java
index 570635d2..c95ed999 100644
--- a/src/main/java/org/bukkit/material/Tripwire.java
+++ b/src/main/java/org/bukkit/material/Tripwire.java
@@ -6,7 +6,7 @@ import org.bukkit.Material;
* Represents the tripwire
*/
public class Tripwire extends MaterialData {
-
+
public Tripwire() {
super(Material.TRIPWIRE);
}
@@ -38,7 +38,7 @@ public class Tripwire extends MaterialData {
public boolean isActivated() {
return (getData() & 0x4) != 0;
}
-
+
/**
* Set tripwire activated state
*
@@ -50,8 +50,8 @@ public class Tripwire extends MaterialData {
dat |= 0x4;
}
setData((byte) dat);
- }
-
+ }
+
/**
* Test if object triggering this tripwire directly
*
@@ -81,6 +81,6 @@ public class Tripwire extends MaterialData {
@Override
public String toString() {
- return super.toString() + (isActivated()?" Activated":"") + (isObjectTriggering()?" Triggered":"");
+ return super.toString() + (isActivated() ? " Activated" : "") + (isObjectTriggering() ? " Triggered" : "");
}
}
diff --git a/src/main/java/org/bukkit/material/TripwireHook.java b/src/main/java/org/bukkit/material/TripwireHook.java
index 8ff23e9f..72a1fb4f 100644
--- a/src/main/java/org/bukkit/material/TripwireHook.java
+++ b/src/main/java/org/bukkit/material/TripwireHook.java
@@ -124,6 +124,6 @@ public class TripwireHook extends SimpleAttachableMaterialData implements Redsto
@Override
public String toString() {
- return super.toString() + " facing " + getFacing() + (isActivated()?" Activated":"") + (isConnected()?" Connected":"");
+ return super.toString() + " facing " + getFacing() + (isActivated() ? " Activated" : "") + (isConnected() ? " Connected" : "");
}
}
diff --git a/src/main/java/org/bukkit/material/Vine.java b/src/main/java/org/bukkit/material/Vine.java
index 5a09667f..f58be9df 100644
--- a/src/main/java/org/bukkit/material/Vine.java
+++ b/src/main/java/org/bukkit/material/Vine.java
@@ -26,7 +26,7 @@ public class Vine extends MaterialData {
* @deprecated Magic value
*/
@Deprecated
- public Vine(int type, byte data){
+ public Vine(int type, byte data) {
super(type, data);
}
@@ -107,7 +107,7 @@ public class Vine extends MaterialData {
* @param face The face to attach.
*/
public void putOnFace(BlockFace face) {
- switch(face) {
+ switch (face) {
case WEST:
setData((byte) (getData() | VINE_WEST));
break;
@@ -149,7 +149,7 @@ public class Vine extends MaterialData {
* @param face The face to detach.
*/
public void removeFromFace(BlockFace face) {
- switch(face) {
+ switch (face) {
case WEST:
setData((byte) (getData() & ~VINE_WEST));
break;
diff --git a/src/main/java/org/bukkit/permissions/Permission.java b/src/main/java/org/bukkit/permissions/Permission.java
index 31a78f3c..c5237bbc 100644
--- a/src/main/java/org/bukkit/permissions/Permission.java
+++ b/src/main/java/org/bukkit/permissions/Permission.java
@@ -305,7 +305,7 @@ public class Permission {
}
}
} else if (childrenNode instanceof Map) {
- children = extractChildren((Map<?,?>) childrenNode, name, def, output);
+ children = extractChildren((Map<?, ?>) childrenNode, name, def, output);
} else {
throw new IllegalArgumentException("'children' key is of wrong type");
}
diff --git a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
index d4861714..4cdaac45 100644
--- a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
+++ b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
@@ -1060,9 +1060,9 @@ public final class PluginDescriptionFile {
return map;
}
- private Map<?,?> asMap(Object object) throws InvalidDescriptionException {
+ private Map<?, ?> asMap(Object object) throws InvalidDescriptionException {
if (object instanceof Map) {
- return (Map<?,?>) object;
+ return (Map<?, ?>) object;
}
throw new InvalidDescriptionException(object + " is not properly structured.");
}
diff --git a/src/main/java/org/bukkit/plugin/RegisteredListener.java b/src/main/java/org/bukkit/plugin/RegisteredListener.java
index 9dd0b7a1..944f9088 100644
--- a/src/main/java/org/bukkit/plugin/RegisteredListener.java
+++ b/src/main/java/org/bukkit/plugin/RegisteredListener.java
@@ -54,15 +54,15 @@ public class RegisteredListener {
* @throws EventException If an event handler throws an exception.
*/
public void callEvent(final Event event) throws EventException {
- if (event instanceof Cancellable){
- if (((Cancellable) event).isCancelled() && isIgnoringCancelled()){
+ if (event instanceof Cancellable) {
+ if (((Cancellable) event).isCancelled() && isIgnoringCancelled()) {
return;
}
}
executor.execute(listener, event);
}
- /**
+ /**
* Whether this listener accepts cancelled events
*
* @return True when ignoring cancelled events
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index 2dae74e7..b9015eee 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -152,7 +152,7 @@ public final class SimplePluginManager implements PluginManager {
file.getPath(),
replacedFile.getPath(),
directory.getPath()
- ));
+ ));
}
Collection<String> softDependencySet = description.getSoftDepend();
@@ -443,7 +443,7 @@ public final class SimplePluginManager implements PluginManager {
try {
server.getMessenger().unregisterIncomingPluginChannel(plugin);
server.getMessenger().unregisterOutgoingPluginChannel(plugin);
- } catch(Throwable ex) {
+ } catch (Throwable ex) {
server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while unregistering plugin channels for " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
}
}
diff --git a/src/main/java/org/bukkit/potion/PotionEffect.java b/src/main/java/org/bukkit/potion/PotionEffect.java
index 03221bf8..e7b86f85 100644
--- a/src/main/java/org/bukkit/potion/PotionEffect.java
+++ b/src/main/java/org/bukkit/potion/PotionEffect.java
@@ -41,7 +41,7 @@ public class PotionEffect implements ConfigurationSerializable {
* @param particles the particle status, see {@link PotionEffect#hasParticles()}
* @param color the particle color, see {@link PotionEffect#getColor()}
*/
- public PotionEffect(PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, Color color){
+ public PotionEffect(PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, Color color) {
Validate.notNull(type, "effect type cannot be null");
this.type = type;
this.duration = duration;
@@ -99,7 +99,7 @@ public class PotionEffect implements ConfigurationSerializable {
this(getEffectType(map), getInt(map, DURATION), getInt(map, AMPLIFIER), getBool(map, AMBIENT, false), getBool(map, PARTICLES, true));
}
- private static PotionEffectType getEffectType(Map<?,?> map) {
+ private static PotionEffectType getEffectType(Map<?, ?> map) {
int type = getInt(map, TYPE);
PotionEffectType effect = PotionEffectType.getById(type);
if (effect != null) {
@@ -108,7 +108,7 @@ public class PotionEffect implements ConfigurationSerializable {
throw new NoSuchElementException(map + " does not contain " + TYPE);
}
- private static int getInt(Map<?,?> map, Object key) {
+ private static int getInt(Map<?, ?> map, Object key) {
Object num = map.get(key);
if (num instanceof Integer) {
return (Integer) num;
@@ -116,7 +116,7 @@ public class PotionEffect implements ConfigurationSerializable {
throw new NoSuchElementException(map + " does not contain " + key);
}
- private static boolean getBool(Map<?,?> map, Object key, boolean def) {
+ private static boolean getBool(Map<?, ?> map, Object key, boolean def) {
Object bool = map.get(key);
if (bool instanceof Boolean) {
return (Boolean) bool;
@@ -200,7 +200,7 @@ public class PotionEffect implements ConfigurationSerializable {
/**
* @return whether this effect has particles or not
*/
- public boolean hasParticles(){
+ public boolean hasParticles() {
return particles;
}
diff --git a/src/main/java/org/bukkit/util/ChatPaginator.java b/src/main/java/org/bukkit/util/ChatPaginator.java
index 580fa260..87c8aec6 100644
--- a/src/main/java/org/bukkit/util/ChatPaginator.java
+++ b/src/main/java/org/bukkit/util/ChatPaginator.java
@@ -27,7 +27,7 @@ public class ChatPaginator {
* @return A single chat page.
*/
public static ChatPage paginate(String unpaginatedString, int pageNumber) {
- return paginate(unpaginatedString, pageNumber, GUARANTEED_NO_WRAP_CHAT_PAGE_WIDTH, CLOSED_CHAT_PAGE_HEIGHT);
+ return paginate(unpaginatedString, pageNumber, GUARANTEED_NO_WRAP_CHAT_PAGE_WIDTH, CLOSED_CHAT_PAGE_HEIGHT);
}
/**
@@ -46,7 +46,7 @@ public class ChatPaginator {
int actualPageNumber = pageNumber <= totalPages ? pageNumber : totalPages;
int from = (actualPageNumber - 1) * pageHeight;
- int to = from + pageHeight <= lines.length ? from + pageHeight : lines.length;
+ int to = from + pageHeight <= lines.length ? from + pageHeight : lines.length;
String[] selectedLines = Arrays.copyOfRange(lines, from, to);
return new ChatPage(selectedLines, actualPageNumber, totalPages);
@@ -121,7 +121,7 @@ public class ChatPaginator {
}
}
- if(line.length() > 0) { // Only add the last line if there is anything to add
+ if (line.length() > 0) { // Only add the last line if there is anything to add
lines.add(line.toString());
}
@@ -130,7 +130,7 @@ public class ChatPaginator {
lines.set(0, ChatColor.WHITE + lines.get(0));
}
for (int i = 1; i < lines.size(); i++) {
- final String pLine = lines.get(i-1);
+ final String pLine = lines.get(i - 1);
final String subLine = lines.get(i);
char color = pLine.charAt(pLine.lastIndexOf(ChatColor.COLOR_CHAR) + 1);