Reformatted Code

This commit is contained in:
ProSavage
2018-11-06 23:38:43 -06:00
parent cd09e77b42
commit b1b9bd1b73
156 changed files with 1589 additions and 1593 deletions

View File

@@ -50,7 +50,7 @@ public enum ParticleEffect {
* <li>The speed value influences the velocity at which the particle flies off
* </ul>
*/
EXPLOSION_NORMAL("explode", 0, -1, ParticleProperty.DIRECTIONAL),
EXPLOSION_NORMAL("explode", 0, - 1, ParticleProperty.DIRECTIONAL),
/**
* A particle effect which is displayed by exploding ghast fireballs and wither skulls:
* <ul>
@@ -58,7 +58,7 @@ public enum ParticleEffect {
* <li>The speed value slightly influences the size of this particle effect
* </ul>
*/
EXPLOSION_LARGE("largeexplode", 1, -1),
EXPLOSION_LARGE("largeexplode", 1, - 1),
/**
* A particle effect which is displayed by exploding tnt and creepers:
* <ul>
@@ -66,7 +66,7 @@ public enum ParticleEffect {
* <li>The speed value has no influence on this particle effect
* </ul>
*/
EXPLOSION_HUGE("hugeexplosion", 2, -1),
EXPLOSION_HUGE("hugeexplosion", 2, - 1),
/**
* A particle effect which is displayed by launching fireworks:
* <ul>
@@ -74,7 +74,7 @@ public enum ParticleEffect {
* <li>The speed value influences the velocity at which the particle flies off
* </ul>
*/
FIREWORKS_SPARK("fireworksSpark", 3, -1, ParticleProperty.DIRECTIONAL),
FIREWORKS_SPARK("fireworksSpark", 3, - 1, ParticleProperty.DIRECTIONAL),
/**
* A particle effect which is displayed by swimming entities and arrows in water:
* <ul>
@@ -82,7 +82,7 @@ public enum ParticleEffect {
* <li>The speed value influences the velocity at which the particle flies off
* </ul>
*/
WATER_BUBBLE("bubble", 4, -1, ParticleProperty.DIRECTIONAL, ParticleProperty.REQUIRES_WATER),
WATER_BUBBLE("bubble", 4, - 1, ParticleProperty.DIRECTIONAL, ParticleProperty.REQUIRES_WATER),
/**
* A particle effect which is displayed by swimming entities and shaking wolves:
* <ul>
@@ -90,7 +90,7 @@ public enum ParticleEffect {
* <li>The speed value has no influence on this particle effect
* </ul>
*/
WATER_SPLASH("splash", 5, -1, ParticleProperty.DIRECTIONAL),
WATER_SPLASH("splash", 5, - 1, ParticleProperty.DIRECTIONAL),
/**
* A particle effect which is displayed on water when fishing:
* <ul>
@@ -106,7 +106,7 @@ public enum ParticleEffect {
* <li>The speed value has no influence on this particle effect
* </ul>
*/
SUSPENDED("suspended", 7, -1, ParticleProperty.REQUIRES_WATER),
SUSPENDED("suspended", 7, - 1, ParticleProperty.REQUIRES_WATER),
/**
* A particle effect which is displayed by air when close to bedrock and the in the void:
* <ul>
@@ -114,7 +114,7 @@ public enum ParticleEffect {
* <li>The speed value has no influence on this particle effect
* </ul>
*/
SUSPENDED_DEPTH("depthSuspend", 8, -1, ParticleProperty.DIRECTIONAL),
SUSPENDED_DEPTH("depthSuspend", 8, - 1, ParticleProperty.DIRECTIONAL),
/**
* A particle effect which is displayed when landing a critical hit and by arrows:
* <ul>
@@ -122,7 +122,7 @@ public enum ParticleEffect {
* <li>The speed value influences the velocity at which the particle flies off
* </ul>
*/
CRIT("crit", 9, -1, ParticleProperty.DIRECTIONAL),
CRIT("crit", 9, - 1, ParticleProperty.DIRECTIONAL),
/**
* A particle effect which is displayed when landing a hit with an enchanted weapon:
* <ul>
@@ -130,7 +130,7 @@ public enum ParticleEffect {
* <li>The speed value influences the velocity at which the particle flies off
* </ul>
*/
CRIT_MAGIC("magicCrit", 10, -1, ParticleProperty.DIRECTIONAL),
CRIT_MAGIC("magicCrit", 10, - 1, ParticleProperty.DIRECTIONAL),
/**
* A particle effect which is displayed by primed tnt, torches, droppers, dispensers, end portals, brewing stands and monster spawners:
* <ul>
@@ -138,7 +138,7 @@ public enum ParticleEffect {
* <li>The speed value influences the velocity at which the particle flies off
* </ul>
*/
SMOKE_NORMAL("smoke", 11, -1, ParticleProperty.DIRECTIONAL),
SMOKE_NORMAL("smoke", 11, - 1, ParticleProperty.DIRECTIONAL),
/**
* A particle effect which is displayed by fire, minecarts with furnace and blazes:
* <ul>
@@ -146,7 +146,7 @@ public enum ParticleEffect {
* <li>The speed value influences the velocity at which the particle flies off
* </ul>
*/
SMOKE_LARGE("largesmoke", 12, -1, ParticleProperty.DIRECTIONAL),
SMOKE_LARGE("largesmoke", 12, - 1, ParticleProperty.DIRECTIONAL),
/**
* A particle effect which is displayed when splash potions or bottles o' enchanting hit something:
* <ul>
@@ -155,7 +155,7 @@ public enum ParticleEffect {
* <li>Only the motion on the y-axis can be controlled, the motion on the x- and z-axis are multiplied by 0.1 when setting the values to 0
* </ul>
*/
SPELL("spell", 13, -1),
SPELL("spell", 13, - 1),
/**
* A particle effect which is displayed when instant splash potions hit something:
* <ul>
@@ -164,7 +164,7 @@ public enum ParticleEffect {
* <li>Only the motion on the y-axis can be controlled, the motion on the x- and z-axis are multiplied by 0.1 when setting the values to 0
* </ul>
*/
SPELL_INSTANT("instantSpell", 14, -1),
SPELL_INSTANT("instantSpell", 14, - 1),
/**
* A particle effect which is displayed by entities with active potion effects:
* <ul>
@@ -173,7 +173,7 @@ public enum ParticleEffect {
* <li>The particle color gets lighter when increasing the speed and darker when decreasing the speed
* </ul>
*/
SPELL_MOB("mobSpell", 15, -1, ParticleProperty.COLORABLE),
SPELL_MOB("mobSpell", 15, - 1, ParticleProperty.COLORABLE),
/**
* A particle effect which is displayed by entities with active potion effects applied through a beacon:
* <ul>
@@ -182,7 +182,7 @@ public enum ParticleEffect {
* <li>The particle color gets lighter when increasing the speed and darker when decreasing the speed
* </ul>
*/
SPELL_MOB_AMBIENT("mobSpellAmbient", 16, -1, ParticleProperty.COLORABLE),
SPELL_MOB_AMBIENT("mobSpellAmbient", 16, - 1, ParticleProperty.COLORABLE),
/**
* A particle effect which is displayed by witches:
* <ul>
@@ -191,7 +191,7 @@ public enum ParticleEffect {
* <li>Only the motion on the y-axis can be controlled, the motion on the x- and z-axis are multiplied by 0.1 when setting the values to 0
* </ul>
*/
SPELL_WITCH("witchMagic", 17, -1),
SPELL_WITCH("witchMagic", 17, - 1),
/**
* A particle effect which is displayed by blocks beneath a water source:
* <ul>
@@ -199,7 +199,7 @@ public enum ParticleEffect {
* <li>The speed value has no influence on this particle effect
* </ul>
*/
DRIP_WATER("dripWater", 18, -1),
DRIP_WATER("dripWater", 18, - 1),
/**
* A particle effect which is displayed by blocks beneath a lava source:
* <ul>
@@ -207,7 +207,7 @@ public enum ParticleEffect {
* <li>The speed value has no influence on this particle effect
* </ul>
*/
DRIP_LAVA("dripLava", 19, -1),
DRIP_LAVA("dripLava", 19, - 1),
/**
* A particle effect which is displayed when attacking a villager in a village:
* <ul>
@@ -215,7 +215,7 @@ public enum ParticleEffect {
* <li>The speed value has no influence on this particle effect
* </ul>
*/
VILLAGER_ANGRY("angryVillager", 20, -1),
VILLAGER_ANGRY("angryVillager", 20, - 1),
/**
* A particle effect which is displayed when using bone meal and trading with a villager in a village:
* <ul>
@@ -223,7 +223,7 @@ public enum ParticleEffect {
* <li>The speed value has no influence on this particle effect
* </ul>
*/
VILLAGER_HAPPY("happyVillager", 21, -1, ParticleProperty.DIRECTIONAL),
VILLAGER_HAPPY("happyVillager", 21, - 1, ParticleProperty.DIRECTIONAL),
/**
* A particle effect which is displayed by mycelium:
* <ul>
@@ -231,7 +231,7 @@ public enum ParticleEffect {
* <li>The speed value has no influence on this particle effect
* </ul>
*/
TOWN_AURA("townaura", 22, -1, ParticleProperty.DIRECTIONAL),
TOWN_AURA("townaura", 22, - 1, ParticleProperty.DIRECTIONAL),
/**
* A particle effect which is displayed by note blocks:
* <ul>
@@ -239,7 +239,7 @@ public enum ParticleEffect {
* <li>The speed value causes the particle to be colored green when set to 0
* </ul>
*/
NOTE("note", 23, -1, ParticleProperty.COLORABLE),
NOTE("note", 23, - 1, ParticleProperty.COLORABLE),
/**
* A particle effect which is displayed by nether portals, endermen, ender pearls, eyes of ender, ender chests and dragon eggs:
* <ul>
@@ -247,7 +247,7 @@ public enum ParticleEffect {
* <li>The speed value influences the spread of this particle effect
* </ul>
*/
PORTAL("portal", 24, -1, ParticleProperty.DIRECTIONAL),
PORTAL("portal", 24, - 1, ParticleProperty.DIRECTIONAL),
/**
* A particle effect which is displayed by enchantment tables which are nearby bookshelves:
* <ul>
@@ -255,7 +255,7 @@ public enum ParticleEffect {
* <li>The speed value influences the spread of this particle effect
* </ul>
*/
ENCHANTMENT_TABLE("enchantmenttable", 25, -1, ParticleProperty.DIRECTIONAL),
ENCHANTMENT_TABLE("enchantmenttable", 25, - 1, ParticleProperty.DIRECTIONAL),
/**
* A particle effect which is displayed by torches, active furnaces, magma cubes and monster spawners:
* <ul>
@@ -263,7 +263,7 @@ public enum ParticleEffect {
* <li>The speed value influences the velocity at which the particle flies off
* </ul>
*/
FLAME("flame", 26, -1, ParticleProperty.DIRECTIONAL),
FLAME("flame", 26, - 1, ParticleProperty.DIRECTIONAL),
/**
* A particle effect which is displayed by lava:
* <ul>
@@ -271,7 +271,7 @@ public enum ParticleEffect {
* <li>The speed value has no influence on this particle effect
* </ul>
*/
LAVA("lava", 27, -1),
LAVA("lava", 27, - 1),
/**
* A particle effect which is currently unused:
* <ul>
@@ -279,7 +279,7 @@ public enum ParticleEffect {
* <li>The speed value has no influence on this particle effect
* </ul>
*/
FOOTSTEP("footstep", 28, -1),
FOOTSTEP("footstep", 28, - 1),
/**
* A particle effect which is displayed when a mob dies:
* <ul>
@@ -287,7 +287,7 @@ public enum ParticleEffect {
* <li>The speed value influences the velocity at which the particle flies off
* </ul>
*/
CLOUD("cloud", 29, -1, ParticleProperty.DIRECTIONAL),
CLOUD("cloud", 29, - 1, ParticleProperty.DIRECTIONAL),
/**
* A particle effect which is displayed by redstone ore, powered redstone, redstone torches and redstone repeaters:
* <ul>
@@ -295,7 +295,7 @@ public enum ParticleEffect {
* <li>The speed value causes the particle to be colored red when set to 0
* </ul>
*/
REDSTONE("reddust", 30, -1, ParticleProperty.COLORABLE),
REDSTONE("reddust", 30, - 1, ParticleProperty.COLORABLE),
/**
* A particle effect which is displayed when snowballs hit a block:
* <ul>
@@ -303,7 +303,7 @@ public enum ParticleEffect {
* <li>The speed value has no influence on this particle effect
* </ul>
*/
SNOWBALL("snowballpoof", 31, -1),
SNOWBALL("snowballpoof", 31, - 1),
/**
* A particle effect which is currently unused:
* <ul>
@@ -311,7 +311,7 @@ public enum ParticleEffect {
* <li>The speed value influences the velocity at which the particle flies off
* </ul>
*/
SNOW_SHOVEL("snowshovel", 32, -1, ParticleProperty.DIRECTIONAL),
SNOW_SHOVEL("snowshovel", 32, - 1, ParticleProperty.DIRECTIONAL),
/**
* A particle effect which is displayed by slimes:
* <ul>
@@ -319,7 +319,7 @@ public enum ParticleEffect {
* <li>The speed value has no influence on this particle effect
* </ul>
*/
SLIME("slime", 33, -1),
SLIME("slime", 33, - 1),
/**
* A particle effect which is displayed when breeding and taming animals:
* <ul>
@@ -327,7 +327,7 @@ public enum ParticleEffect {
* <li>The speed value has no influence on this particle effect
* </ul>
*/
HEART("heart", 34, -1),
HEART("heart", 34, - 1),
/**
* A particle effect which is displayed by barriers:
* <ul>
@@ -342,7 +342,7 @@ public enum ParticleEffect {
* <li>It looks like a little piece with an item texture
* </ul>
*/
ITEM_CRACK("iconcrack", 36, -1, ParticleProperty.DIRECTIONAL, ParticleProperty.REQUIRES_DATA),
ITEM_CRACK("iconcrack", 36, - 1, ParticleProperty.DIRECTIONAL, ParticleProperty.REQUIRES_DATA),
/**
* A particle effect which is displayed when breaking blocks or sprinting:
* <ul>
@@ -350,7 +350,7 @@ public enum ParticleEffect {
* <li>The speed value has no influence on this particle effect
* </ul>
*/
BLOCK_CRACK("blockcrack", 37, -1, ParticleProperty.REQUIRES_DATA),
BLOCK_CRACK("blockcrack", 37, - 1, ParticleProperty.REQUIRES_DATA),
/**
* A particle effect which is displayed when falling:
* <ul>
@@ -422,7 +422,7 @@ public enum ParticleEffect {
*/
public static ParticleEffect fromName(String name) {
for (Entry<String, ParticleEffect> entry : NAME_MAP.entrySet()) {
if (!entry.getKey().equalsIgnoreCase(name)) {
if (! entry.getKey().equalsIgnoreCase(name)) {
continue;
}
return entry.getValue();
@@ -467,7 +467,7 @@ public enum ParticleEffect {
String world = location.getWorld().getName();
for (Player player : players) {
Location playerLocation = player.getLocation();
if (!world.equals(playerLocation.getWorld().getName()) || playerLocation.distanceSquared(location) < 65536) {
if (! world.equals(playerLocation.getWorld().getName()) || playerLocation.distanceSquared(location) < 65536) {
continue;
}
return true;
@@ -539,7 +539,7 @@ public enum ParticleEffect {
* @return Whether the particle effect is supported or not
*/
public boolean isSupported() {
if (requiredVersion == -1) {
if (requiredVersion == - 1) {
return true;
}
return ParticlePacket.getVersion() >= requiredVersion;
@@ -562,13 +562,13 @@ public enum ParticleEffect {
* @see ParticlePacket#sendTo(Location, double)
*/
public void display(float offsetX, float offsetY, float offsetZ, float speed, int amount, Location center, double range) throws ParticleVersionException, ParticleDataException, IllegalArgumentException {
if (!isSupported()) {
if (! isSupported()) {
throw new ParticleVersionException("This particle effect is not supported by your server version");
}
if (hasProperty(ParticleProperty.REQUIRES_DATA)) {
throw new ParticleDataException("This particle effect requires additional data");
}
if (hasProperty(ParticleProperty.REQUIRES_WATER) && !isWater(center)) {
if (hasProperty(ParticleProperty.REQUIRES_WATER) && ! isWater(center)) {
throw new IllegalArgumentException("There is no water at the center location");
}
new ParticlePacket(this, offsetX, offsetY, offsetZ, speed, amount, range > 256, null).sendTo(center, range);
@@ -591,13 +591,13 @@ public enum ParticleEffect {
* @see ParticlePacket#sendTo(Location, List)
*/
public void display(float offsetX, float offsetY, float offsetZ, float speed, int amount, Location center, List<Player> players) throws ParticleVersionException, ParticleDataException, IllegalArgumentException {
if (!isSupported()) {
if (! isSupported()) {
throw new ParticleVersionException("This particle effect is not supported by your server version");
}
if (hasProperty(ParticleProperty.REQUIRES_DATA)) {
throw new ParticleDataException("This particle effect requires additional data");
}
if (hasProperty(ParticleProperty.REQUIRES_WATER) && !isWater(center)) {
if (hasProperty(ParticleProperty.REQUIRES_WATER) && ! isWater(center)) {
throw new IllegalArgumentException("There is no water at the center location");
}
new ParticlePacket(this, offsetX, offsetY, offsetZ, speed, amount, isLongDistance(center, players), null).sendTo(center, players);
@@ -636,16 +636,16 @@ public enum ParticleEffect {
* @see ParticlePacket#sendTo(Location, double)
*/
public void display(Vector direction, float speed, Location center, double range) throws ParticleVersionException, ParticleDataException, IllegalArgumentException {
if (!isSupported()) {
if (! isSupported()) {
throw new ParticleVersionException("This particle effect is not supported by your server version");
}
if (hasProperty(ParticleProperty.REQUIRES_DATA)) {
throw new ParticleDataException("This particle effect requires additional data");
}
if (!hasProperty(ParticleProperty.DIRECTIONAL)) {
if (! hasProperty(ParticleProperty.DIRECTIONAL)) {
throw new IllegalArgumentException("This particle effect is not directional");
}
if (hasProperty(ParticleProperty.REQUIRES_WATER) && !isWater(center)) {
if (hasProperty(ParticleProperty.REQUIRES_WATER) && ! isWater(center)) {
throw new IllegalArgumentException("There is no water at the center location");
}
new ParticlePacket(this, direction, speed, range > 256, null).sendTo(center, range);
@@ -665,16 +665,16 @@ public enum ParticleEffect {
* @see ParticlePacket#sendTo(Location, List)
*/
public void display(Vector direction, float speed, Location center, List<Player> players) throws ParticleVersionException, ParticleDataException, IllegalArgumentException {
if (!isSupported()) {
if (! isSupported()) {
throw new ParticleVersionException("This particle effect is not supported by your server version");
}
if (hasProperty(ParticleProperty.REQUIRES_DATA)) {
throw new ParticleDataException("This particle effect requires additional data");
}
if (!hasProperty(ParticleProperty.DIRECTIONAL)) {
if (! hasProperty(ParticleProperty.DIRECTIONAL)) {
throw new IllegalArgumentException("This particle effect is not directional");
}
if (hasProperty(ParticleProperty.REQUIRES_WATER) && !isWater(center)) {
if (hasProperty(ParticleProperty.REQUIRES_WATER) && ! isWater(center)) {
throw new IllegalArgumentException("There is no water at the center location");
}
new ParticlePacket(this, direction, speed, isLongDistance(center, players), null).sendTo(center, players);
@@ -708,13 +708,13 @@ public enum ParticleEffect {
* @see ParticlePacket#sendTo(Location, double)
*/
public void display(ParticleColor color, Location center, double range) throws ParticleVersionException, ParticleColorException {
if (!isSupported()) {
if (! isSupported()) {
throw new ParticleVersionException("This particle effect is not supported by your server version");
}
if (!hasProperty(ParticleProperty.COLORABLE)) {
if (! hasProperty(ParticleProperty.COLORABLE)) {
throw new ParticleColorException("This particle effect is not colorable");
}
if (!isColorCorrect(this, color)) {
if (! isColorCorrect(this, color)) {
throw new ParticleColorException("The particle color type is incorrect");
}
new ParticlePacket(this, color, range > 256).sendTo(center, range);
@@ -732,13 +732,13 @@ public enum ParticleEffect {
* @see ParticlePacket#sendTo(Location, List)
*/
public void display(ParticleColor color, Location center, List<Player> players) throws ParticleVersionException, ParticleColorException {
if (!isSupported()) {
if (! isSupported()) {
throw new ParticleVersionException("This particle effect is not supported by your server version");
}
if (!hasProperty(ParticleProperty.COLORABLE)) {
if (! hasProperty(ParticleProperty.COLORABLE)) {
throw new ParticleColorException("This particle effect is not colorable");
}
if (!isColorCorrect(this, color)) {
if (! isColorCorrect(this, color)) {
throw new ParticleColorException("The particle color type is incorrect");
}
new ParticlePacket(this, color, isLongDistance(center, players)).sendTo(center, players);
@@ -775,13 +775,13 @@ public enum ParticleEffect {
* @see ParticlePacket#sendTo(Location, double)
*/
public void display(ParticleData data, float offsetX, float offsetY, float offsetZ, float speed, int amount, Location center, double range) throws ParticleVersionException, ParticleDataException {
if (!isSupported()) {
if (! isSupported()) {
throw new ParticleVersionException("This particle effect is not supported by your server version");
}
if (!hasProperty(ParticleProperty.REQUIRES_DATA)) {
if (! hasProperty(ParticleProperty.REQUIRES_DATA)) {
throw new ParticleDataException("This particle effect does not require additional data");
}
if (!isDataCorrect(this, data)) {
if (! isDataCorrect(this, data)) {
throw new ParticleDataException("The particle data type is incorrect");
}
new ParticlePacket(this, offsetX, offsetY, offsetZ, speed, amount, range > 256, data).sendTo(center, range);
@@ -804,13 +804,13 @@ public enum ParticleEffect {
* @see ParticlePacket#sendTo(Location, List)
*/
public void display(ParticleData data, float offsetX, float offsetY, float offsetZ, float speed, int amount, Location center, List<Player> players) throws ParticleVersionException, ParticleDataException {
if (!isSupported()) {
if (! isSupported()) {
throw new ParticleVersionException("This particle effect is not supported by your server version");
}
if (!hasProperty(ParticleProperty.REQUIRES_DATA)) {
if (! hasProperty(ParticleProperty.REQUIRES_DATA)) {
throw new ParticleDataException("This particle effect does not require additional data");
}
if (!isDataCorrect(this, data)) {
if (! isDataCorrect(this, data)) {
throw new ParticleDataException("The particle data type is incorrect");
}
new ParticlePacket(this, offsetX, offsetY, offsetZ, speed, amount, isLongDistance(center, players), data).sendTo(center, players);
@@ -849,13 +849,13 @@ public enum ParticleEffect {
* @see ParticlePacket#sendTo(Location, double)
*/
public void display(ParticleData data, Vector direction, float speed, Location center, double range) throws ParticleVersionException, ParticleDataException {
if (!isSupported()) {
if (! isSupported()) {
throw new ParticleVersionException("This particle effect is not supported by your server version");
}
if (!hasProperty(ParticleProperty.REQUIRES_DATA)) {
if (! hasProperty(ParticleProperty.REQUIRES_DATA)) {
throw new ParticleDataException("This particle effect does not require additional data");
}
if (!isDataCorrect(this, data)) {
if (! isDataCorrect(this, data)) {
throw new ParticleDataException("The particle data type is incorrect");
}
new ParticlePacket(this, direction, speed, range > 256, data).sendTo(center, range);
@@ -875,13 +875,13 @@ public enum ParticleEffect {
* @see ParticlePacket#sendTo(Location, List)
*/
public void display(ParticleData data, Vector direction, float speed, Location center, List<Player> players) throws ParticleVersionException, ParticleDataException {
if (!isSupported()) {
if (! isSupported()) {
throw new ParticleVersionException("This particle effect is not supported by your server version");
}
if (!hasProperty(ParticleProperty.REQUIRES_DATA)) {
if (! hasProperty(ParticleProperty.REQUIRES_DATA)) {
throw new ParticleDataException("This particle effect does not require additional data");
}
if (!isDataCorrect(this, data)) {
if (! isDataCorrect(this, data)) {
throw new ParticleDataException("The particle data type is incorrect");
}
new ParticlePacket(this, direction, speed, isLongDistance(center, players), data).sendTo(center, players);
@@ -949,7 +949,7 @@ public enum ParticleEffect {
* @param material Material of the item/block
* @param data Data value of the item/block
*/
@SuppressWarnings("deprecation")
@SuppressWarnings ("deprecation")
public ParticleData(Material material, byte data) {
this.material = material;
this.data = data;
@@ -1033,7 +1033,7 @@ public enum ParticleEffect {
*/
public BlockData(Material material, byte data) throws IllegalArgumentException {
super(material, data);
if (!material.isBlock()) {
if (! material.isBlock()) {
throw new IllegalArgumentException("The material is not a block");
}
}
@@ -1425,7 +1425,7 @@ public enum ParticleEffect {
* @return The version number
*/
public static int getVersion() {
if (!initialized) {
if (! initialized) {
initialize();
}
return version;
@@ -1530,7 +1530,7 @@ public enum ParticleEffect {
String worldName = center.getWorld().getName();
double squared = range * range;
for (Player player : Bukkit.getOnlinePlayers()) {
if (!player.getWorld().getName().equals(worldName) || player.getLocation().distanceSquared(center) > squared) {
if (! player.getWorld().getName().equals(worldName) || player.getLocation().distanceSquared(center) > squared) {
continue;
}
sendTo(center, player);

View File

@@ -44,7 +44,7 @@ public final class ReflectionUtils {
public static Constructor<?> getConstructor(Class<?> clazz, Class<?>... parameterTypes) throws NoSuchMethodException {
Class<?>[] primitiveTypes = DataType.getPrimitive(parameterTypes);
for (Constructor<?> constructor : clazz.getConstructors()) {
if (!DataType.compare(DataType.getPrimitive(constructor.getParameterTypes()), primitiveTypes)) {
if (! DataType.compare(DataType.getPrimitive(constructor.getParameterTypes()), primitiveTypes)) {
continue;
}
return constructor;
@@ -118,7 +118,7 @@ public final class ReflectionUtils {
public static Method getMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes) throws NoSuchMethodException {
Class<?>[] primitiveTypes = DataType.getPrimitive(parameterTypes);
for (Method method : clazz.getMethods()) {
if (!method.getName().equals(methodName) || !DataType.compare(DataType.getPrimitive(method.getParameterTypes()), primitiveTypes)) {
if (! method.getName().equals(methodName) || ! DataType.compare(DataType.getPrimitive(method.getParameterTypes()), primitiveTypes)) {
continue;
}
return method;