13
0
geforkt von Mirrors/Paper

Whitespace + general cleanup

By: Erik Broes <erikbroes@grum.nl>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2011-05-14 23:22:54 +02:00
Ursprung 8217ff1836
Commit 855f4133b6
216 geänderte Dateien mit 1649 neuen und 1637 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit; package org.bukkit;
import java.util.HashMap; import java.util.HashMap;

Datei anzeigen

@ -8,6 +8,7 @@ package org.bukkit;
* @author sk89q * @author sk89q
*/ */
public interface BlockChangeDelegate { public interface BlockChangeDelegate {
/** /**
* Set a block type at the specified coordinates. * Set a block type at the specified coordinates.
* *

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit; package org.bukkit;
/** /**
@ -10,8 +9,7 @@ public final class Bukkit {
/** /**
* Static class cannot be initialized. * Static class cannot be initialized.
*/ */
private Bukkit() { private Bukkit() {}
}
/** /**
* Gets the current {@link Server} singleton * Gets the current {@link Server} singleton

Datei anzeigen

@ -7,6 +7,7 @@ import java.util.Map;
* All supported color values for chat * All supported color values for chat
*/ */
public enum ChatColor { public enum ChatColor {
/** /**
* Represents black * Represents black
*/ */
@ -110,8 +111,9 @@ public enum ChatColor {
* @return A copy of the input string, without any coloring * @return A copy of the input string, without any coloring
*/ */
public static String stripColor(final String input) { public static String stripColor(final String input) {
if (input == null) if (input == null) {
return null; return null;
}
return input.replaceAll("(?i)\u00A7[0-F]", ""); return input.replaceAll("(?i)\u00A7[0-F]", "");
} }

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit; package org.bukkit;
import org.bukkit.block.Block; import org.bukkit.block.Block;

Datei anzeigen

@ -8,6 +8,7 @@ import java.util.Map;
* @author sunkid * @author sunkid
*/ */
public enum CropState { public enum CropState {
/** /**
* State when first seeded * State when first seeded
*/ */

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit; package org.bukkit;
import java.util.HashMap; import java.util.HashMap;
@ -8,6 +7,7 @@ import java.util.Map;
* All supported color values for dyes and cloth * All supported color values for dyes and cloth
*/ */
public enum DyeColor { public enum DyeColor {
/** /**
* Represents white dye * Represents white dye
*/ */

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit; package org.bukkit;
import org.bukkit.block.Block; import org.bukkit.block.Block;
@ -207,8 +206,9 @@ public class Location implements Cloneable {
vector.setY(-Math.sin(Math.toRadians(rotY))); vector.setY(-Math.sin(Math.toRadians(rotY)));
double h = Math.cos(Math.toRadians(rotY)); double h = Math.cos(Math.toRadians(rotY));
vector.setX(-h*Math.sin(Math.toRadians(rotX)));
vector.setZ(h*Math.cos(Math.toRadians(rotX))); vector.setX(-h * Math.sin(Math.toRadians(rotX)));
vector.setZ(h * Math.cos(Math.toRadians(rotX)));
return vector; return vector;
} }
@ -222,6 +222,7 @@ public class Location implements Cloneable {
return false; return false;
} }
final Location other = (Location) obj; final Location other = (Location) obj;
if (this.world != other.world && (this.world == null || !this.world.equals(other.world))) { if (this.world != other.world && (this.world == null || !this.world.equals(other.world))) {
return false; return false;
} }
@ -246,6 +247,7 @@ public class Location implements Cloneable {
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 3; int hash = 3;
hash = 19 * hash + (this.world != null ? this.world.hashCode() : 0); hash = 19 * hash + (this.world != null ? this.world.hashCode() : 0);
hash = 19 * hash + (int) (Double.doubleToLongBits(this.x) ^ (Double.doubleToLongBits(this.x) >>> 32)); hash = 19 * hash + (int) (Double.doubleToLongBits(this.x) ^ (Double.doubleToLongBits(this.x) >>> 32));
hash = 19 * hash + (int) (Double.doubleToLongBits(this.y) ^ (Double.doubleToLongBits(this.y) >>> 32)); hash = 19 * hash + (int) (Double.doubleToLongBits(this.y) ^ (Double.doubleToLongBits(this.y) >>> 32));
@ -272,7 +274,8 @@ public class Location implements Cloneable {
@Override @Override
public Location clone() { public Location clone() {
try { try {
Location l = (Location)super.clone(); Location l = (Location) super.clone();
l.world = world; l.world = world;
l.x = x; l.x = x;
l.y = y; l.y = y;
@ -293,6 +296,6 @@ public class Location implements Cloneable {
* @return Block coordinate * @return Block coordinate
*/ */
public static int locToBlock(double loc) { public static int locToBlock(double loc) {
return (int)Math.floor(loc); return (int) Math.floor(loc);
} }
} }

Datei anzeigen

@ -237,7 +237,7 @@ public enum Material {
private Material(final int id, final int stack, final int durability, final Class<? extends MaterialData> data) { private Material(final int id, final int stack, final int durability, final Class<? extends MaterialData> data) {
this.id = id; this.id = id;
this.durability = (short)durability; this.durability = (short) durability;
this.maxStack = stack; this.maxStack = stack;
this.data = data; this.data = data;
} }
@ -292,6 +292,7 @@ public enum Material {
try { try {
Constructor<? extends MaterialData> ctor = data.getConstructor(int.class, byte.class); Constructor<? extends MaterialData> ctor = data.getConstructor(int.class, byte.class);
return ctor.newInstance(id, raw); return ctor.newInstance(id, raw);
} catch (InstantiationException ex) { } catch (InstantiationException ex) {
Logger.getLogger(Material.class.getName()).log(Level.SEVERE, null, ex); Logger.getLogger(Material.class.getName()).log(Level.SEVERE, null, ex);
@ -354,11 +355,11 @@ public enum Material {
try { try {
result = getMaterial(Integer.parseInt(name)); result = getMaterial(Integer.parseInt(name));
} catch (NumberFormatException ex) { } catch (NumberFormatException ex) {}
}
if (result == null) { if (result == null) {
String filtered = name.toUpperCase(); String filtered = name.toUpperCase();
filtered = filtered.replaceAll("\\s+", "_").replaceAll("\\W", ""); filtered = filtered.replaceAll("\\s+", "_").replaceAll("\\W", "");
result = lookupName.get(filtered); result = lookupName.get(filtered);
} }

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit; package org.bukkit;
import com.avaje.ebean.config.ServerConfig; import com.avaje.ebean.config.ServerConfig;
@ -18,6 +17,7 @@ import org.bukkit.scheduler.BukkitScheduler;
* Represents a server implementation * Represents a server implementation
*/ */
public interface Server { public interface Server {
/** /**
* Gets the name of this server implementation * Gets the name of this server implementation
* *

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit; package org.bukkit;
import java.util.HashMap; import java.util.HashMap;

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit; package org.bukkit;
import java.util.List; import java.util.List;
@ -11,6 +10,7 @@ import org.bukkit.util.Vector;
* Represents a world, which may contain entities, chunks and blocks * Represents a world, which may contain entities, chunks and blocks
*/ */
public interface World { public interface World {
/** /**
* Gets the {@link Block} at the given coordinates * Gets the {@link Block} at the given coordinates
* *
@ -486,11 +486,11 @@ public interface World {
* Represents various map environment types that a world may be * Represents various map environment types that a world may be
*/ */
public enum Environment { public enum Environment {
/** /**
* Represents the "normal"/"surface world" map * Represents the "normal"/"surface world" map
*/ */
NORMAL, NORMAL,
/** /**
* Represents a nether based map * Represents a nether based map
*/ */

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit.block; package org.bukkit.block;
/** /**

Datei anzeigen

@ -12,6 +12,7 @@ import org.bukkit.Location;
* block which will not be modified. * block which will not be modified.
*/ */
public interface Block { public interface Block {
/** /**
* Gets the metadata for this block * Gets the metadata for this block
* *

Datei anzeigen

@ -60,24 +60,34 @@ public enum BlockFace {
switch (this) { switch (this) {
case NORTH: case NORTH:
return BlockFace.SOUTH; return BlockFace.SOUTH;
case SOUTH: case SOUTH:
return BlockFace.NORTH; return BlockFace.NORTH;
case EAST: case EAST:
return BlockFace.WEST; return BlockFace.WEST;
case WEST: case WEST:
return BlockFace.EAST; return BlockFace.EAST;
case UP: case UP:
return BlockFace.DOWN; return BlockFace.DOWN;
case DOWN: case DOWN:
return BlockFace.UP; return BlockFace.UP;
case NORTH_EAST: case NORTH_EAST:
return BlockFace.SOUTH_WEST; return BlockFace.SOUTH_WEST;
case NORTH_WEST: case NORTH_WEST:
return BlockFace.SOUTH_EAST; return BlockFace.SOUTH_EAST;
case SOUTH_EAST: case SOUTH_EAST:
return BlockFace.NORTH_WEST; return BlockFace.NORTH_WEST;
case SOUTH_WEST: case SOUTH_WEST:
return BlockFace.NORTH_EAST; return BlockFace.NORTH_EAST;
case SELF: case SELF:
return BlockFace.SELF; return BlockFace.SELF;
} }

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit.block; package org.bukkit.block;
import org.bukkit.Chunk; import org.bukkit.Chunk;
@ -15,6 +14,7 @@ import org.bukkit.material.MaterialData;
* another type entirely, causing your BlockState to become invalid. * another type entirely, causing your BlockState to become invalid.
*/ */
public interface BlockState { public interface BlockState {
/** /**
* Gets the block represented by this BlockState * Gets the block represented by this BlockState
* *

Datei anzeigen

@ -5,5 +5,4 @@ package org.bukkit.block;
* *
* @author sk89q * @author sk89q
*/ */
public interface Chest extends BlockState, ContainerBlock { public interface Chest extends BlockState, ContainerBlock {}
}

Datei anzeigen

@ -8,6 +8,7 @@ import org.bukkit.inventory.Inventory;
* @author sk89q * @author sk89q
*/ */
public interface ContainerBlock { public interface ContainerBlock {
/** /**
* Get the block's inventory. * Get the block's inventory.
* *

Datei anzeigen

@ -2,7 +2,6 @@ package org.bukkit.block;
import org.bukkit.entity.CreatureType; import org.bukkit.entity.CreatureType;
/** /**
* Represents a creature spawner. * Represents a creature spawner.
* *
@ -10,6 +9,7 @@ import org.bukkit.entity.CreatureType;
* @author Cogito * @author Cogito
*/ */
public interface CreatureSpawner extends BlockState { public interface CreatureSpawner extends BlockState {
/** /**
* Get the spawner's creature type. * Get the spawner's creature type.
* *

Datei anzeigen

@ -6,6 +6,7 @@ package org.bukkit.block;
* @author sk89q * @author sk89q
*/ */
public interface Dispenser extends BlockState, ContainerBlock { public interface Dispenser extends BlockState, ContainerBlock {
/** /**
* Attempts to dispense the contents of this block<br /> * Attempts to dispense the contents of this block<br />
* <br /> * <br />

Datei anzeigen

@ -6,6 +6,7 @@ package org.bukkit.block;
* @author sk89q * @author sk89q
*/ */
public interface Furnace extends BlockState, ContainerBlock { public interface Furnace extends BlockState, ContainerBlock {
/** /**
* Get burn time. * Get burn time.
* *

Datei anzeigen

@ -8,6 +8,7 @@ import org.bukkit.entity.Player;
* @author sk89q * @author sk89q
*/ */
public interface NoteBlock extends BlockState { public interface NoteBlock extends BlockState {
/** /**
* Gets the note. * Gets the note.
* *

Datei anzeigen

@ -1,10 +1,10 @@
package org.bukkit.block; package org.bukkit.block;
/** /**
* Represents either a SignPost or a WallSign * Represents either a SignPost or a WallSign
*/ */
public interface Sign extends BlockState { public interface Sign extends BlockState {
/** /**
* Gets all the lines of text currently on this sign. * Gets all the lines of text currently on this sign.
* *

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit.command; package org.bukkit.command;
/** /**
@ -9,9 +8,7 @@ public class CommandException extends RuntimeException {
/** /**
* Creates a new instance of <code>CommandException</code> without detail message. * Creates a new instance of <code>CommandException</code> without detail message.
*/ */
public CommandException() { public CommandException() {}
}
/** /**
* Constructs an instance of <code>CommandException</code> with the specified detail message. * Constructs an instance of <code>CommandException</code> with the specified detail message.

Datei anzeigen

@ -1,10 +1,10 @@
package org.bukkit.command; package org.bukkit.command;
/** /**
* Represents a class which contains a single method for executing commands * Represents a class which contains a single method for executing commands
*/ */
public interface CommandExecutor { public interface CommandExecutor {
/** /**
* Executes the given command, returning its success * Executes the given command, returning its success
* *

Datei anzeigen

@ -3,6 +3,7 @@ package org.bukkit.command;
import java.util.List; import java.util.List;
public interface CommandMap { public interface CommandMap {
/** /**
* Registers all the commands belonging to a certain plugin. * Registers all the commands belonging to a certain plugin.
* @param plugin * @param plugin

Datei anzeigen

@ -2,8 +2,8 @@ package org.bukkit.command;
import org.bukkit.Server; import org.bukkit.Server;
public interface CommandSender { public interface CommandSender {
/** /**
* Sends this sender a message * Sends this sender a message
* *

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit.command; package org.bukkit.command;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;

Datei anzeigen

@ -39,7 +39,7 @@ public final class PluginCommand extends Command {
if (!success && usageMessage.length() > 0) { if (!success && usageMessage.length() > 0) {
for (String line: usageMessage.replace("<command>", commandLabel).split("\n")) { for (String line: usageMessage.replace("<command>", commandLabel).split("\n")) {
sender.sendMessage( line ); sender.sendMessage(line);
} }
} }

Datei anzeigen

@ -13,20 +13,23 @@ public class PluginCommandYamlParser {
public static List<Command> parse(Plugin plugin) { public static List<Command> parse(Plugin plugin) {
List<Command> pluginCmds = new ArrayList<Command>(); List<Command> pluginCmds = new ArrayList<Command>();
Object object = plugin.getDescription().getCommands(); Object object = plugin.getDescription().getCommands();
if (object == null)
return pluginCmds;
Map<String, Map<String, Object>> map = (Map<String, Map<String, Object>>)object; if (object == null) {
return pluginCmds;
}
Map<String, Map<String, Object>> map = (Map<String, Map<String, Object>>) object;
if (map != null) { if (map != null) {
for(Entry<String, Map<String, Object>> entry : map.entrySet()) { for (Entry<String, Map<String, Object>> entry : map.entrySet()) {
Command newCmd = new PluginCommand(entry.getKey(),plugin); Command newCmd = new PluginCommand(entry.getKey(), plugin);
Object description = entry.getValue().get("description"); Object description = entry.getValue().get("description");
Object usage = entry.getValue().get("usage"); Object usage = entry.getValue().get("usage");
Object aliases = entry.getValue().get("aliases"); Object aliases = entry.getValue().get("aliases");
if (description != null) if (description != null) {
newCmd.setDescription(description.toString()); newCmd.setDescription(description.toString());
}
if (usage != null) { if (usage != null) {
newCmd.setUsage(usage.toString()); newCmd.setUsage(usage.toString());
@ -36,7 +39,7 @@ public class PluginCommandYamlParser {
List<String> aliasList = new ArrayList<String>(); List<String> aliasList = new ArrayList<String>();
if (aliases instanceof List) { if (aliases instanceof List) {
for (Object o : (List<Object>)aliases) { for (Object o : (List<Object>) aliases) {
aliasList.add(o.toString()); aliasList.add(o.toString());
} }
} else { } else {
@ -51,5 +54,4 @@ public class PluginCommandYamlParser {
} }
return pluginCmds; return pluginCmds;
} }
} }

Datei anzeigen

@ -34,7 +34,7 @@ public final class SimpleCommandMap implements CommandMap {
*/ */
public void registerAll(String fallbackPrefix, List<Command> commands) { public void registerAll(String fallbackPrefix, List<Command> commands) {
if (commands != null) { if (commands != null) {
for(Command c : commands) { for (Command c : commands) {
register(fallbackPrefix, c); register(fallbackPrefix, c);
} }
} }
@ -42,6 +42,7 @@ public final class SimpleCommandMap implements CommandMap {
private void register(String fallbackPrefix, Command command) { private void register(String fallbackPrefix, Command command) {
List<String> names = new ArrayList<String>(); List<String> names = new ArrayList<String>();
names.add(command.getName()); names.add(command.getName());
names.addAll(command.getAliases()); names.addAll(command.getAliases());
@ -80,6 +81,7 @@ public final class SimpleCommandMap implements CommandMap {
Command target = getCommand(sentCommandLabel); Command target = getCommand(sentCommandLabel);
boolean isRegisteredCommand = (target != null); boolean isRegisteredCommand = (target != null);
if (isRegisteredCommand) { if (isRegisteredCommand) {
try { try {
target.execute(sender, sentCommandLabel, args); target.execute(sender, sentCommandLabel, args);
@ -117,8 +119,7 @@ public final class SimpleCommandMap implements CommandMap {
@Override @Override
public boolean execute(CommandSender sender, String currentAlias, String[] args) { public boolean execute(CommandSender sender, String currentAlias, String[] args) {
if (args.length == 0) { if (args.length == 0) {
sender.sendMessage("This server is running " + ChatColor.GREEN sender.sendMessage("This server is running " + ChatColor.GREEN + server.getName() + ChatColor.WHITE + " version " + ChatColor.GREEN + server.getVersion());
+ server.getName() + ChatColor.WHITE + " version " + ChatColor.GREEN + server.getVersion());
sender.sendMessage("This server is also sporting some funky dev build of Bukkit!"); sender.sendMessage("This server is also sporting some funky dev build of Bukkit!");
} else { } else {
StringBuilder name = new StringBuilder(); StringBuilder name = new StringBuilder();
@ -134,6 +135,7 @@ public final class SimpleCommandMap implements CommandMap {
if (plugin != null) { if (plugin != null) {
PluginDescriptionFile desc = plugin.getDescription(); PluginDescriptionFile desc = plugin.getDescription();
sender.sendMessage(ChatColor.GREEN + desc.getName() + ChatColor.WHITE + " version " + ChatColor.GREEN + desc.getVersion()); sender.sendMessage(ChatColor.GREEN + desc.getName() + ChatColor.WHITE + " version " + ChatColor.GREEN + desc.getVersion());
if (desc.getDescription() != null) { if (desc.getDescription() != null) {

Datei anzeigen

@ -1,5 +1,3 @@
package org.bukkit.entity; package org.bukkit.entity;
public interface AnimalTamer { public interface AnimalTamer {}
}

Datei anzeigen

@ -6,6 +6,4 @@ package org.bukkit.entity;
* @author Cogito * @author Cogito
* *
*/ */
public interface Animals extends Creature{ public interface Animals extends Creature {}
}

Datei anzeigen

@ -5,5 +5,4 @@ package org.bukkit.entity;
* *
* @author sk89q * @author sk89q
*/ */
public interface Arrow extends Entity { public interface Arrow extends Entity {}
}

Datei anzeigen

@ -6,6 +6,7 @@ package org.bukkit.entity;
* @author sk89q * @author sk89q
*/ */
public interface Boat extends Vehicle { public interface Boat extends Vehicle {
/** /**
* Gets the maximum speed of a boat. The speed is unrelated to the velocity. * Gets the maximum speed of a boat. The speed is unrelated to the velocity.
* *

Datei anzeigen

@ -9,6 +9,4 @@ package org.bukkit.entity;
* @author Cogito * @author Cogito
* *
*/ */
public interface Chicken extends Animals { public interface Chicken extends Animals {}
}

Datei anzeigen

@ -9,6 +9,4 @@ package org.bukkit.entity;
* @author Cogito * @author Cogito
* *
*/ */
public interface Cow extends Animals { public interface Cow extends Animals {}
}

Datei anzeigen

@ -5,6 +5,7 @@ package org.bukkit.entity;
* have very simple abilities. * have very simple abilities.
*/ */
public interface Creature extends LivingEntity { public interface Creature extends LivingEntity {
/** /**
* Instructs this Creature to set the specified LivingEntity as its target. * Instructs this Creature to set the specified LivingEntity as its target.
* Hostile creatures may attack their target, and friendly creatures may * Hostile creatures may attack their target, and friendly creatures may

Datei anzeigen

@ -1,10 +1,10 @@
package org.bukkit.entity; package org.bukkit.entity;
/** /**
* Represents a Creeper * Represents a Creeper
*/ */
public interface Creeper extends Monster { public interface Creeper extends Monster {
/** /**
* Checks if this Creeper is powered (Electrocuted) * Checks if this Creeper is powered (Electrocuted)
* *

Datei anzeigen

@ -5,5 +5,4 @@ package org.bukkit.entity;
* *
* @author sk89q * @author sk89q
*/ */
public interface Egg extends Entity { public interface Egg extends Entity {}
}

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit.entity; package org.bukkit.entity;
import org.bukkit.Location; import org.bukkit.Location;
@ -12,6 +11,7 @@ import java.util.List;
* Represents a base entity in the world * Represents a base entity in the world
*/ */
public interface Entity { public interface Entity {
/** /**
* Gets the entity's current position * Gets the entity's current position
* *

Datei anzeigen

@ -9,6 +9,4 @@ package org.bukkit.entity;
* @author Cogito * @author Cogito
* *
*/ */
public interface FallingSand extends Entity { public interface FallingSand extends Entity {}
}

Datei anzeigen

@ -5,5 +5,4 @@ package org.bukkit.entity;
* *
* @author Cogito * @author Cogito
*/ */
public interface Fireball extends Entity { public interface Fireball extends Entity {}
}

Datei anzeigen

@ -5,5 +5,4 @@ package org.bukkit.entity;
* *
* @author Cogito * @author Cogito
*/ */
public interface Fish extends Entity { public interface Fish extends Entity {}
}

Datei anzeigen

@ -9,6 +9,4 @@ package org.bukkit.entity;
* @author Cogito * @author Cogito
* *
*/ */
public interface Flying extends LivingEntity { public interface Flying extends LivingEntity {}
}

Datei anzeigen

@ -9,6 +9,4 @@ package org.bukkit.entity;
* @author Cogito * @author Cogito
* *
*/ */
public interface Ghast extends Flying { public interface Ghast extends Flying {}
}

Datei anzeigen

@ -9,6 +9,4 @@ package org.bukkit.entity;
* @author Cogito * @author Cogito
* *
*/ */
public interface Giant extends Monster { public interface Giant extends Monster {}
}

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit.entity; package org.bukkit.entity;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
@ -8,6 +7,7 @@ import org.bukkit.inventory.PlayerInventory;
* Represents a human entity, such as an NPC or a player * Represents a human entity, such as an NPC or a player
*/ */
public interface HumanEntity extends LivingEntity, AnimalTamer { public interface HumanEntity extends LivingEntity, AnimalTamer {
/** /**
* Returns the name of this player * Returns the name of this player
* *
@ -43,7 +43,7 @@ public interface HumanEntity extends LivingEntity, AnimalTamer {
* *
* @param index The new index to use, only valid ones are 0-8. * @param index The new index to use, only valid ones are 0-8.
* *
public void selectItemInHand( int index ); public void selectItemInHand(int index);
*/ */
/** /**

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit.entity; package org.bukkit.entity;
/** /**

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit.entity; package org.bukkit.entity;
import java.util.HashSet; import java.util.HashSet;
@ -11,6 +10,7 @@ import org.bukkit.block.Block;
* Represents a living entity, such as a monster or player * Represents a living entity, such as a monster or player
*/ */
public interface LivingEntity extends Entity { public interface LivingEntity extends Entity {
/** /**
* Gets the entity's health from 0-20, where 0 is dead and 20 is full * Gets the entity's health from 0-20, where 0 is dead and 20 is full
* *
@ -205,5 +205,4 @@ public interface LivingEntity extends Entity {
*/ */
public void setNoDamageTicks(int ticks); public void setNoDamageTicks(int ticks);
} }

Datei anzeigen

@ -8,6 +8,7 @@ import org.bukkit.util.Vector;
* @author sk89q * @author sk89q
*/ */
public interface Minecart extends Vehicle { public interface Minecart extends Vehicle {
/** /**
* Sets a minecart's damage. * Sets a minecart's damage.
* *

Datei anzeigen

@ -9,6 +9,4 @@ package org.bukkit.entity;
* @author Cogito * @author Cogito
* *
*/ */
public interface Monster extends Creature { public interface Monster extends Creature {}
}

Datei anzeigen

@ -9,6 +9,4 @@ package org.bukkit.entity;
* @author Cogito * @author Cogito
* *
*/ */
public interface Painting extends Entity { public interface Painting extends Entity {}
}

Datei anzeigen

@ -7,6 +7,7 @@ package org.bukkit.entity;
* *
*/ */
public interface Pig extends Animals { public interface Pig extends Animals {
/** /**
* @author xPaw * @author xPaw
* @return if the pig has been saddled. * @return if the pig has been saddled.

Datei anzeigen

@ -9,6 +9,4 @@ package org.bukkit.entity;
* @author Cogito * @author Cogito
* *
*/ */
public interface PigZombie extends Zombie { public interface PigZombie extends Zombie {}
}

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit.entity; package org.bukkit.entity;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
@ -13,6 +12,7 @@ import org.bukkit.command.CommandSender;
* *
*/ */
public interface Player extends HumanEntity, CommandSender { public interface Player extends HumanEntity, CommandSender {
/** /**
* Checks if this player is currently online * Checks if this player is currently online
* *

Datei anzeigen

@ -5,6 +5,4 @@ package org.bukkit.entity;
* *
* @author sk89q * @author sk89q
*/ */
public interface PoweredMinecart extends Minecart { public interface PoweredMinecart extends Minecart {}
}

Datei anzeigen

@ -2,6 +2,7 @@
* *
*/ */
package org.bukkit.entity; package org.bukkit.entity;
import org.bukkit.material.Colorable; import org.bukkit.material.Colorable;
/** /**
@ -11,11 +12,13 @@ import org.bukkit.material.Colorable;
* *
*/ */
public interface Sheep extends Animals, Colorable { public interface Sheep extends Animals, Colorable {
/** /**
* @author Celtic Minstrel * @author Celtic Minstrel
* @return Whether the sheep is sheared. * @return Whether the sheep is sheared.
*/ */
public boolean isSheared(); public boolean isSheared();
/** /**
* @author Celtic Minstrel * @author Celtic Minstrel
* @param flag Whether to shear the sheep * @param flag Whether to shear the sheep

Datei anzeigen

@ -9,6 +9,4 @@ package org.bukkit.entity;
* @author Cogito * @author Cogito
* *
*/ */
public interface Skeleton extends Monster { public interface Skeleton extends Monster {}
}

Datei anzeigen

@ -10,11 +10,13 @@ package org.bukkit.entity;
* *
*/ */
public interface Slime extends LivingEntity { public interface Slime extends LivingEntity {
/** /**
* @author Celtic Minstrel * @author Celtic Minstrel
* @return The size of the slime * @return The size of the slime
*/ */
public int getSize(); public int getSize();
/** /**
* @author Celtic Minstrel * @author Celtic Minstrel
* @param sz The new size of the slime. * @param sz The new size of the slime.

Datei anzeigen

@ -5,5 +5,4 @@ package org.bukkit.entity;
* *
* @author sk89q * @author sk89q
*/ */
public interface Snowball extends Entity { public interface Snowball extends Entity {}
}

Datei anzeigen

@ -9,6 +9,4 @@ package org.bukkit.entity;
* @author Cogito * @author Cogito
* *
*/ */
public interface Spider extends Monster { public interface Spider extends Monster {}
}

Datei anzeigen

@ -9,6 +9,4 @@ package org.bukkit.entity;
* @author Cogito * @author Cogito
* *
*/ */
public interface Squid extends WaterMob { public interface Squid extends WaterMob {}
}

Datei anzeigen

@ -8,6 +8,7 @@ import org.bukkit.inventory.Inventory;
* @author sk89q * @author sk89q
*/ */
public interface StorageMinecart extends Minecart { public interface StorageMinecart extends Minecart {
/** /**
* Return the inventory object for this StorageMinecart. * Return the inventory object for this StorageMinecart.
* *

Datei anzeigen

@ -9,6 +9,4 @@ package org.bukkit.entity;
* @author Cogito * @author Cogito
* *
*/ */
public interface TNTPrimed extends Entity { public interface TNTPrimed extends Entity {}
}

Datei anzeigen

@ -8,6 +8,7 @@ import org.bukkit.util.Vector;
* @author sk89q * @author sk89q
*/ */
public interface Vehicle extends Entity { public interface Vehicle extends Entity {
/** /**
* Gets the vehicle's velocity. * Gets the vehicle's velocity.
* *

Datei anzeigen

@ -8,6 +8,4 @@ package org.bukkit.entity;
* @author Cogito * @author Cogito
* *
*/ */
public interface WaterMob extends Creature { public interface WaterMob extends Creature {}
}

Datei anzeigen

@ -1,9 +1,6 @@
package org.bukkit.entity; package org.bukkit.entity;
/** /**
* Represents a Weather related entity, such as a storm * Represents a Weather related entity, such as a storm
*/ */
public interface Weather extends Entity { public interface Weather extends Entity {}
}

Datei anzeigen

@ -1,10 +1,10 @@
package org.bukkit.entity; package org.bukkit.entity;
/** /**
* Represents a Wolf * Represents a Wolf
*/ */
public interface Wolf extends Animals, Tameable { public interface Wolf extends Animals, Tameable {
/** /**
* Checks if this wolf is angry * Checks if this wolf is angry
* *

Datei anzeigen

@ -6,6 +6,4 @@ package org.bukkit.entity;
* @author Cogito * @author Cogito
* *
*/ */
public interface Zombie extends Monster{ public interface Zombie extends Monster {}
}

Datei anzeigen

@ -6,14 +6,12 @@ import org.bukkit.event.Listener;
* Handles all custom events * Handles all custom events
*/ */
public class CustomEventListener implements Listener { public class CustomEventListener implements Listener {
public CustomEventListener() { public CustomEventListener() {}
}
/** /**
* Called when a player joins a server * Called when a player joins a server
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onCustomEvent(Event event) { public void onCustomEvent(Event event) {}
}
} }

Datei anzeigen

@ -31,7 +31,9 @@ public abstract class Event implements Serializable {
} }
private void exAssert(boolean b, String s) { private void exAssert(boolean b, String s) {
if(!b) throw new IllegalArgumentException(s); if (!b) {
throw new IllegalArgumentException(s);
}
} }
/** /**
@ -40,40 +42,36 @@ public abstract class Event implements Serializable {
* @return Name of this event * @return Name of this event
*/ */
public final String getEventName() { public final String getEventName() {
return ( type != Type.CUSTOM_EVENT) ? type.toString() : name; return (type != Type.CUSTOM_EVENT) ? type.toString() : name;
} }
/** /**
* Represents an events priority in execution * Represents an events priority in execution
*/ */
public enum Priority { public enum Priority {
/** /**
* Event call is of very low importance and should be ran first, to allow * Event call is of very low importance and should be ran first, to allow
* other plugins to further customise the outcome * other plugins to further customise the outcome
*/ */
Lowest, Lowest,
/** /**
* Event call is of low importance * Event call is of low importance
*/ */
Low, Low,
/** /**
* Event call is neither important or unimportant, and may be ran normally * Event call is neither important or unimportant, and may be ran normally
*/ */
Normal, Normal,
/** /**
* Event call is of high importance * Event call is of high importance
*/ */
High, High,
/** /**
* Event call is critical and must have the final say in what happens * Event call is critical and must have the final say in what happens
* to the event * to the event
*/ */
Highest, Highest,
/** /**
* Event is listened to purely for monitoring the outcome of an event. * Event is listened to purely for monitoring the outcome of an event.
* *
@ -86,52 +84,44 @@ public abstract class Event implements Serializable {
* Represents a category used by Type * Represents a category used by Type
*/ */
public enum Category { public enum Category {
/** /**
* Represents Player-based events * Represents Player-based events
* @see Category.LIVING_ENTITY * @see Category.LIVING_ENTITY
*/ */
PLAYER, PLAYER,
/** /**
* Represents Entity-based events * Represents Entity-based events
*/ */
ENTITY, ENTITY,
/** /**
* Represents Block-based events * Represents Block-based events
*/ */
BLOCK, BLOCK,
/** /**
* Represents LivingEntity-based events * Represents LivingEntity-based events
*/ */
LIVING_ENTITY, LIVING_ENTITY,
/** /**
* Represents Weather-based events * Represents Weather-based events
*/ */
WEATHER, WEATHER,
/** /**
* Vehicle-based events * Vehicle-based events
*/ */
VEHICLE, VEHICLE,
/** /**
* Represents World-based events * Represents World-based events
*/ */
WORLD, WORLD,
/** /**
* Represents Server and Plugin based events * Represents Server and Plugin based events
*/ */
SERVER, SERVER,
/** /**
* Represents Inventory-based events * Represents Inventory-based events
*/ */
INVENTORY, INVENTORY,
/** /**
* Any miscellaneous events * Any miscellaneous events
*/ */
@ -144,6 +134,7 @@ public abstract class Event implements Serializable {
* @see org.bukkit.event. * @see org.bukkit.event.
*/ */
public enum Type { public enum Type {
/** /**
* PLAYER EVENTS * PLAYER EVENTS
*/ */
@ -154,154 +145,132 @@ public abstract class Event implements Serializable {
* @see org.bukkit.event.player.PlayerEvent * @see org.bukkit.event.player.PlayerEvent
*/ */
PLAYER_JOIN (Category.PLAYER), PLAYER_JOIN (Category.PLAYER),
/** /**
* Called when a player is attempting to connect to the server * Called when a player is attempting to connect to the server
* *
* @see org.bukkit.event.player.PlayerLoginEvent * @see org.bukkit.event.player.PlayerLoginEvent
*/ */
PLAYER_LOGIN (Category.PLAYER), PLAYER_LOGIN (Category.PLAYER),
/** /**
* Called when a player has just been authenticated * Called when a player has just been authenticated
* *
* @see org.bukkit.event.player.PlayerPreLoginEvent * @see org.bukkit.event.player.PlayerPreLoginEvent
*/ */
PLAYER_PRELOGIN (Category.PLAYER), PLAYER_PRELOGIN (Category.PLAYER),
/** /**
* Called when a player respawns * Called when a player respawns
* *
* @see org.bukkit.event.player.PlayerEvent * @see org.bukkit.event.player.PlayerEvent
*/ */
PLAYER_RESPAWN (Category.PLAYER), PLAYER_RESPAWN (Category.PLAYER),
/** /**
* Called when a player gets kicked a server * Called when a player gets kicked a server
* *
* @see org.bukkit.event.player.PlayerEvent * @see org.bukkit.event.player.PlayerEvent
*/ */
PLAYER_KICK (Category.PLAYER), PLAYER_KICK (Category.PLAYER),
/** /**
* Called when a player sends a chat message * Called when a player sends a chat message
* *
* @see org.bukkit.event.player.PlayerChatEvent * @see org.bukkit.event.player.PlayerChatEvent
*/ */
PLAYER_CHAT (Category.PLAYER), PLAYER_CHAT (Category.PLAYER),
/** /**
* Called when a player early in the command handling process * Called when a player early in the command handling process
* *
* @see org.bukkit.event.player.PlayerChatEvent * @see org.bukkit.event.player.PlayerChatEvent
*/ */
PLAYER_COMMAND_PREPROCESS (Category.PLAYER), PLAYER_COMMAND_PREPROCESS (Category.PLAYER),
/** /**
* Called when a player leaves a server * Called when a player leaves a server
* *
* @see org.bukkit.event.player.PlayerEvent * @see org.bukkit.event.player.PlayerEvent
*/ */
PLAYER_QUIT (Category.PLAYER), PLAYER_QUIT (Category.PLAYER),
/** /**
* Called when a player moves position in the world * Called when a player moves position in the world
* *
* @see org.bukkit.event.player.PlayerMoveEvent * @see org.bukkit.event.player.PlayerMoveEvent
*/ */
PLAYER_MOVE (Category.PLAYER), PLAYER_MOVE (Category.PLAYER),
/** /**
* Called when a player undergoes an animation, such as arm swinging * Called when a player undergoes an animation, such as arm swinging
* *
* @see org.bukkit.event.player.PlayerAnimationEvent * @see org.bukkit.event.player.PlayerAnimationEvent
*/ */
PLAYER_ANIMATION (Category.PLAYER), PLAYER_ANIMATION (Category.PLAYER),
/** /**
* Called when a player toggles sneak mode * Called when a player toggles sneak mode
* *
* @todo: add javadoc see comment * @todo: add javadoc see comment
*/ */
PLAYER_TOGGLE_SNEAK (Category.PLAYER), PLAYER_TOGGLE_SNEAK (Category.PLAYER),
/** /**
* Called when a player uses an item * Called when a player uses an item
* *
* @see org.bukkit.event.player.PlayerItemEvent * @see org.bukkit.event.player.PlayerItemEvent
*/ */
PLAYER_INTERACT (Category.PLAYER), PLAYER_INTERACT (Category.PLAYER),
/** /**
* Called when a player right clicks an entity * Called when a player right clicks an entity
* *
* @see org.bukkit.event.player.PlayerInteractEntityEvent * @see org.bukkit.event.player.PlayerInteractEntityEvent
*/ */
PLAYER_INTERACT_ENTITY (Category.PLAYER), PLAYER_INTERACT_ENTITY (Category.PLAYER),
/** /**
* Called when a player throws an egg and it might hatch * Called when a player throws an egg and it might hatch
* *
* @see org.bukkit.event.player.PlayerEggThrowEvent * @see org.bukkit.event.player.PlayerEggThrowEvent
*/ */
PLAYER_EGG_THROW (Category.PLAYER), PLAYER_EGG_THROW (Category.PLAYER),
/** /**
* Called when a player teleports from one position to another * Called when a player teleports from one position to another
* *
* @see org.bukkit.event.player.PlayerMoveEvent * @see org.bukkit.event.player.PlayerMoveEvent
*/ */
PLAYER_TELEPORT (Category.PLAYER), PLAYER_TELEPORT (Category.PLAYER),
/** /**
* Called when a player changes their held item * Called when a player changes their held item
* *
* @see org.bukkit.event.player.PlayerItemHeldEvent * @see org.bukkit.event.player.PlayerItemHeldEvent
*/ */
PLAYER_ITEM_HELD (Category.PLAYER), PLAYER_ITEM_HELD (Category.PLAYER),
/** /**
* Called when a player drops an item * Called when a player drops an item
* *
* @see org.bukkit.event.player.PlayerDropItemEvent * @see org.bukkit.event.player.PlayerDropItemEvent
*/ */
PLAYER_DROP_ITEM (Category.PLAYER), PLAYER_DROP_ITEM (Category.PLAYER),
/** /**
* Called when a player picks an item up off the ground * Called when a player picks an item up off the ground
* *
* @see org.bukkit.event.player.PlayerPickupItemEvent * @see org.bukkit.event.player.PlayerPickupItemEvent
*/ */
PLAYER_PICKUP_ITEM (Category.PLAYER), PLAYER_PICKUP_ITEM (Category.PLAYER),
/** /**
* Called when a player empties a bucket * Called when a player empties a bucket
* *
* @see org.bukkit.event.player.PlayerBucketEmptyEvent * @see org.bukkit.event.player.PlayerBucketEmptyEvent
*/ */
PLAYER_BUCKET_EMPTY(Category.PLAYER), PLAYER_BUCKET_EMPTY(Category.PLAYER),
/** /**
* Called when a player fills a bucket * Called when a player fills a bucket
* *
* @see org.bukkit.event.player.PlayerBucketFillEvent * @see org.bukkit.event.player.PlayerBucketFillEvent
*/ */
PLAYER_BUCKET_FILL(Category.PLAYER), PLAYER_BUCKET_FILL(Category.PLAYER),
/** /**
* Called when a player interacts with the inventory * Called when a player interacts with the inventory
* *
* @see org.bukkit.event.player.PlayerInventoryEvent * @see org.bukkit.event.player.PlayerInventoryEvent
*/ */
PLAYER_INVENTORY(Category.PLAYER), PLAYER_INVENTORY(Category.PLAYER),
/** /**
* Called when a player enter a bed * Called when a player enter a bed
* *
* @see org.bukkit.event.player.PlayerBedEnterEvent * @see org.bukkit.event.player.PlayerBedEnterEvent
*/ */
PLAYER_BED_ENTER(Category.PLAYER), PLAYER_BED_ENTER(Category.PLAYER),
/** /**
* Called when a player leaves a bed * Called when a player leaves a bed
* *
@ -319,7 +288,6 @@ public abstract class Event implements Serializable {
* @see org.bukkit.event.block.BlockDamageEvent * @see org.bukkit.event.block.BlockDamageEvent
*/ */
BLOCK_DAMAGE (Category.BLOCK), BLOCK_DAMAGE (Category.BLOCK),
/** /**
* Called when a block is undergoing a universe physics * Called when a block is undergoing a universe physics
* check on whether it can be built * check on whether it can be built
@ -329,7 +297,6 @@ public abstract class Event implements Serializable {
* @see org.bukkit.event.block.BlockCanBuildEvent * @see org.bukkit.event.block.BlockCanBuildEvent
*/ */
BLOCK_CANBUILD (Category.BLOCK), BLOCK_CANBUILD (Category.BLOCK),
/** /**
* Called when a block of water or lava attempts to flow into another * Called when a block of water or lava attempts to flow into another
* block * block
@ -337,7 +304,6 @@ public abstract class Event implements Serializable {
* @see org.bukkit.event.block.BlockFromToEvent * @see org.bukkit.event.block.BlockFromToEvent
*/ */
BLOCK_FROMTO (Category.BLOCK), BLOCK_FROMTO (Category.BLOCK),
/** /**
* Called when a block is being set on fire from another block, such as * Called when a block is being set on fire from another block, such as
* an adjacent block of fire attempting to set fire to wood * an adjacent block of fire attempting to set fire to wood
@ -345,7 +311,6 @@ public abstract class Event implements Serializable {
* @see org.bukkit.event.block.BlockIgniteEvent * @see org.bukkit.event.block.BlockIgniteEvent
*/ */
BLOCK_IGNITE (Category.BLOCK), BLOCK_IGNITE (Category.BLOCK),
/** /**
* Called when a block undergoes a physics check * Called when a block undergoes a physics check
* *
@ -355,42 +320,36 @@ public abstract class Event implements Serializable {
* @see org.bukkit.event.block.BlockPhysicsEvent * @see org.bukkit.event.block.BlockPhysicsEvent
*/ */
BLOCK_PHYSICS (Category.BLOCK), BLOCK_PHYSICS (Category.BLOCK),
/** /**
* Called when a player is attempting to place a block * Called when a player is attempting to place a block
* *
* @see org.bukkit.event.block.BlockPlaceEvent * @see org.bukkit.event.block.BlockPlaceEvent
*/ */
BLOCK_PLACE (Category.BLOCK), BLOCK_PLACE (Category.BLOCK),
/** /**
* Called when a block dispenses something * Called when a block dispenses something
* *
* @see org.bukkit.event.block.BlockPlaceEvent * @see org.bukkit.event.block.BlockPlaceEvent
*/ */
BLOCK_DISPENSE (Category.BLOCK), BLOCK_DISPENSE (Category.BLOCK),
/** /**
* Called when a block is destroyed from being burnt by fire * Called when a block is destroyed from being burnt by fire
* *
* @see org.bukkit.event.block.BlockBurnEvent * @see org.bukkit.event.block.BlockBurnEvent
*/ */
BLOCK_BURN (Category.BLOCK), BLOCK_BURN (Category.BLOCK),
/** /**
* Called when leaves are decaying naturally * Called when leaves are decaying naturally
* *
* @see org.bukkit.event.block.LeavesDecayEvent * @see org.bukkit.event.block.LeavesDecayEvent
*/ */
LEAVES_DECAY (Category.BLOCK), LEAVES_DECAY (Category.BLOCK),
/** /**
* Called when a sign is changed * Called when a sign is changed
* *
* @see org.bukkit.event.block.SignChangeEvent * @see org.bukkit.event.block.SignChangeEvent
*/ */
SIGN_CHANGE (Category.BLOCK), SIGN_CHANGE (Category.BLOCK),
/** /**
* Called when a block changes redstone current. Only triggered on blocks * Called when a block changes redstone current. Only triggered on blocks
* that are actually capable of transmitting or carrying a redstone * that are actually capable of transmitting or carrying a redstone
@ -399,14 +358,12 @@ public abstract class Event implements Serializable {
* @see org.bukkit.event.block.BlockFromToEvent * @see org.bukkit.event.block.BlockFromToEvent
*/ */
REDSTONE_CHANGE (Category.BLOCK), REDSTONE_CHANGE (Category.BLOCK),
/** /**
* Called when a block is destroyed by a player. * Called when a block is destroyed by a player.
* *
* @see org.bukkit.event.block.BlockBreakEvent * @see org.bukkit.event.block.BlockBreakEvent
*/ */
BLOCK_BREAK (Category.BLOCK), BLOCK_BREAK (Category.BLOCK),
/** /**
* Called when world attempts to place a snow block during a snowfall * Called when world attempts to place a snow block during a snowfall
* *
@ -424,28 +381,24 @@ public abstract class Event implements Serializable {
* @todo: add javadoc see comment * @todo: add javadoc see comment
*/ */
INVENTORY_OPEN (Category.INVENTORY), INVENTORY_OPEN (Category.INVENTORY),
/** /**
* Called when a player closes an inventory * Called when a player closes an inventory
* *
* @todo: add javadoc see comment * @todo: add javadoc see comment
*/ */
INVENTORY_CLOSE (Category.INVENTORY), INVENTORY_CLOSE (Category.INVENTORY),
/** /**
* Called when a player clicks on an inventory slot * Called when a player clicks on an inventory slot
* *
* @todo: add javadoc see comment * @todo: add javadoc see comment
*/ */
INVENTORY_CLICK (Category.INVENTORY), INVENTORY_CLICK (Category.INVENTORY),
/** /**
* Called when an inventory slot changes values or type * Called when an inventory slot changes values or type
* *
* @todo: add javadoc see comment * @todo: add javadoc see comment
*/ */
INVENTORY_CHANGE (Category.INVENTORY), INVENTORY_CHANGE (Category.INVENTORY),
/** /**
* Called when a player is attempting to perform an inventory transaction * Called when a player is attempting to perform an inventory transaction
* *
@ -463,14 +416,12 @@ public abstract class Event implements Serializable {
* @see org.bukkit.event.server.PluginEvent * @see org.bukkit.event.server.PluginEvent
*/ */
PLUGIN_ENABLE (Category.SERVER), PLUGIN_ENABLE (Category.SERVER),
/** /**
* Called when a plugin is disabled * Called when a plugin is disabled
* *
* @see org.bukkit.event.server.PluginEvent * @see org.bukkit.event.server.PluginEvent
*/ */
PLUGIN_DISABLE (Category.SERVER), PLUGIN_DISABLE (Category.SERVER),
/** /**
* Called when a server command is called * Called when a server command is called
* *
@ -491,41 +442,35 @@ public abstract class Event implements Serializable {
* @see org.bukkit.event.world.ChunkLoadEvent * @see org.bukkit.event.world.ChunkLoadEvent
*/ */
CHUNK_LOAD (Category.WORLD), CHUNK_LOAD (Category.WORLD),
/** /**
* Called when a chunk is unloaded * Called when a chunk is unloaded
* *
* @see org.bukkit.event.world.ChunkUnloadEvent * @see org.bukkit.event.world.ChunkUnloadEvent
*/ */
CHUNK_UNLOAD (Category.WORLD), CHUNK_UNLOAD (Category.WORLD),
/** /**
* Called when a chunk needs to be generated * Called when a chunk needs to be generated
* *
* @todo: add javadoc see comment * @todo: add javadoc see comment
*/ */
CHUNK_GENERATION (Category.WORLD), CHUNK_GENERATION (Category.WORLD),
/** /**
* Called when an ItemEntity spawns in the world * Called when an ItemEntity spawns in the world
* *
* @todo: add javadoc see comment * @todo: add javadoc see comment
*/ */
ITEM_SPAWN (Category.WORLD), ITEM_SPAWN (Category.WORLD),
/** /**
* Called when a World's spawn is changed * Called when a World's spawn is changed
* *
* @see org.bukkit.event.world.SpawnChangeEvent * @see org.bukkit.event.world.SpawnChangeEvent
*/ */
SPAWN_CHANGE (Category.WORLD), SPAWN_CHANGE (Category.WORLD),
/** /**
* Called when a world is saved * Called when a world is saved
* *
*/ */
WORLD_SAVE (Category.WORLD), WORLD_SAVE (Category.WORLD),
/** /**
* Called when a World is loaded * Called when a World is loaded
*/ */
@ -541,7 +486,6 @@ public abstract class Event implements Serializable {
* @see org.bukkit.event.painting.PaintingCreateEvent * @see org.bukkit.event.painting.PaintingCreateEvent
*/ */
PAINTING_PLACE (Category.ENTITY), PAINTING_PLACE (Category.ENTITY),
/** /**
* Called when a painting is removed * Called when a painting is removed
* *
@ -560,35 +504,30 @@ public abstract class Event implements Serializable {
* @todo: add javadoc see comment * @todo: add javadoc see comment
*/ */
CREATURE_SPAWN (Category.LIVING_ENTITY), CREATURE_SPAWN (Category.LIVING_ENTITY),
/** /**
* Called when a LivingEntity is damaged with no source. * Called when a LivingEntity is damaged with no source.
* *
* @see org.bukkit.event.entity.EntityDamageEvent * @see org.bukkit.event.entity.EntityDamageEvent
*/ */
ENTITY_DAMAGE (Category.LIVING_ENTITY), ENTITY_DAMAGE (Category.LIVING_ENTITY),
/** /**
* Called when a LivingEntity dies * Called when a LivingEntity dies
* *
* @todo: add javadoc see comment * @todo: add javadoc see comment
*/ */
ENTITY_DEATH (Category.LIVING_ENTITY), ENTITY_DEATH (Category.LIVING_ENTITY),
/** /**
* Called when a Skeleton or Zombie catch fire due to the sun * Called when a Skeleton or Zombie catch fire due to the sun
* *
* @todo: add javadoc see comment * @todo: add javadoc see comment
*/ */
ENTITY_COMBUST (Category.LIVING_ENTITY), ENTITY_COMBUST (Category.LIVING_ENTITY),
/** /**
* Called when an entity explodes, either TNT, Creeper, or Ghast Fireball * Called when an entity explodes, either TNT, Creeper, or Ghast Fireball
* *
* @todo: add javadoc see comment * @todo: add javadoc see comment
*/ */
ENTITY_EXPLODE (Category.LIVING_ENTITY), ENTITY_EXPLODE (Category.LIVING_ENTITY),
/** /**
* Called when an entity has made a decision to explode. * Called when an entity has made a decision to explode.
* *
@ -602,14 +541,12 @@ public abstract class Event implements Serializable {
* @see org.bukkit.event.entity.EntityExplodeTriggerEvent * @see org.bukkit.event.entity.EntityExplodeTriggerEvent
*/ */
EXPLOSION_PRIME (Category.LIVING_ENTITY), EXPLOSION_PRIME (Category.LIVING_ENTITY),
/** /**
* Called when an entity targets another entity * Called when an entity targets another entity
* *
* @see org.bukkit.event.entity.EntityTargetEvent * @see org.bukkit.event.entity.EntityTargetEvent
*/ */
ENTITY_TARGET (Category.LIVING_ENTITY), ENTITY_TARGET (Category.LIVING_ENTITY),
/** /**
* Called when an entity interacts with a block * Called when an entity interacts with a block
* This event specifically excludes player entities * This event specifically excludes player entities
@ -617,14 +554,12 @@ public abstract class Event implements Serializable {
* @see org.bukkit.event.entity.EntityInteractEvent * @see org.bukkit.event.entity.EntityInteractEvent
*/ */
ENTITY_INTERACT (Category.LIVING_ENTITY), ENTITY_INTERACT (Category.LIVING_ENTITY),
/** /**
* Called when a creeper gains or loses a power shell * Called when a creeper gains or loses a power shell
* *
* @see org.bukkit.event.entity.CreeperPowerEvent * @see org.bukkit.event.entity.CreeperPowerEvent
*/ */
CREEPER_POWER (Category.LIVING_ENTITY), CREEPER_POWER (Category.LIVING_ENTITY),
/** /**
* Called when a pig is zapped, zombifying it * Called when a pig is zapped, zombifying it
* *
@ -642,14 +577,12 @@ public abstract class Event implements Serializable {
* @see org.bukkit.event.weather.LightningStrikeEvent * @see org.bukkit.event.weather.LightningStrikeEvent
*/ */
LIGHTNING_STRIKE (Category.WEATHER), LIGHTNING_STRIKE (Category.WEATHER),
/** /**
* Called when the weather in a world changes * Called when the weather in a world changes
* *
* @see org.bukkit.event.weather.WeatherChangeEvent * @see org.bukkit.event.weather.WeatherChangeEvent
*/ */
WEATHER_CHANGE (Category.WEATHER), WEATHER_CHANGE (Category.WEATHER),
/** /**
* Called when the thunder state in a world changes * Called when the thunder state in a world changes
* *
@ -667,63 +600,54 @@ public abstract class Event implements Serializable {
* @see org.bukkit.event.vehicle.VehicleCreateEvent * @see org.bukkit.event.vehicle.VehicleCreateEvent
*/ */
VEHICLE_CREATE (Category.VEHICLE), VEHICLE_CREATE (Category.VEHICLE),
/** /**
* Called when a vehicle is destroyed * Called when a vehicle is destroyed
* *
* @see org.bukkit.event.vehicle.VehicleDestroyEvent * @see org.bukkit.event.vehicle.VehicleDestroyEvent
*/ */
VEHICLE_DESTROY (Category.VEHICLE), VEHICLE_DESTROY (Category.VEHICLE),
/** /**
* Called when a vehicle is damaged by a LivingEntity * Called when a vehicle is damaged by a LivingEntity
* *
* @see org.bukkit.event.vehicle.VehicleDamageEvent * @see org.bukkit.event.vehicle.VehicleDamageEvent
*/ */
VEHICLE_DAMAGE (Category.VEHICLE), VEHICLE_DAMAGE (Category.VEHICLE),
/** /**
* Called when a vehicle collides with an Entity * Called when a vehicle collides with an Entity
* *
* @see org.bukkit.event.vehicle.VehicleCollisionEvent * @see org.bukkit.event.vehicle.VehicleCollisionEvent
*/ */
VEHICLE_COLLISION_ENTITY (Category.VEHICLE), VEHICLE_COLLISION_ENTITY (Category.VEHICLE),
/** /**
* Called when a vehicle collides with a Block * Called when a vehicle collides with a Block
* *
* @see org.bukkit.event.vehicle.VehicleBlockCollisionEvent * @see org.bukkit.event.vehicle.VehicleBlockCollisionEvent
*/ */
VEHICLE_COLLISION_BLOCK (Category.VEHICLE), VEHICLE_COLLISION_BLOCK (Category.VEHICLE),
/** /**
* Called when a vehicle is entered by a LivingEntity * Called when a vehicle is entered by a LivingEntity
* *
* @see org.bukkit.event.vehicle.VehicleEnterEvent * @see org.bukkit.event.vehicle.VehicleEnterEvent
*/ */
VEHICLE_ENTER (Category.VEHICLE), VEHICLE_ENTER (Category.VEHICLE),
/** /**
* Called when a vehicle is exited by a LivingEntity * Called when a vehicle is exited by a LivingEntity
* *
* @see org.bukkit.event.vehicle.VehicleExitEvent * @see org.bukkit.event.vehicle.VehicleExitEvent
*/ */
VEHICLE_EXIT (Category.VEHICLE), VEHICLE_EXIT (Category.VEHICLE),
/** /**
* Called when a vehicle moves position in the world * Called when a vehicle moves position in the world
* *
* @see org.bukkit.event.vehicle.VehicleMoveEvent * @see org.bukkit.event.vehicle.VehicleMoveEvent
*/ */
VEHICLE_MOVE (Category.VEHICLE), VEHICLE_MOVE (Category.VEHICLE),
/** /**
* Called when a vehicle is going through an update cycle, rechecking itself * Called when a vehicle is going through an update cycle, rechecking itself
* *
* @see org.bukkit.event.vehicle.VehicleUpdateEvent * @see org.bukkit.event.vehicle.VehicleUpdateEvent
*/ */
VEHICLE_UPDATE (Category.VEHICLE), VEHICLE_UPDATE (Category.VEHICLE),
/** /**
* MISCELLANEOUS EVENTS * MISCELLANEOUS EVENTS
*/ */
@ -750,19 +674,18 @@ public abstract class Event implements Serializable {
} }
public enum Result { public enum Result {
/** /**
* Deny the event. * Deny the event.
* Depending on the event, the action indicated by the event will either not take place or will be reverted. * Depending on the event, the action indicated by the event will either not take place or will be reverted.
* Some actions may not be denied. * Some actions may not be denied.
*/ */
DENY, DENY,
/** /**
* Neither deny nor allow the event. * Neither deny nor allow the event.
* The server will proceed with its normal handling. * The server will proceed with its normal handling.
*/ */
DEFAULT, DEFAULT,
/** /**
* Allow / Force the event. * Allow / Force the event.
* The action indicated by the event will take place if possible, even if the server would not normally allow the action. * The action indicated by the event will take place if possible, even if the server would not normally allow the action.

Datei anzeigen

@ -1,9 +1,6 @@
package org.bukkit.event; package org.bukkit.event;
/** /**
* Simple interface for tagging all EventListeners * Simple interface for tagging all EventListeners
*/ */
public interface Listener { public interface Listener {}
}

Datei anzeigen

@ -1,6 +1,7 @@
package org.bukkit.event.block; package org.bukkit.event.block;
public enum Action { public enum Action {
/** /**
* Left-clicking a block * Left-clicking a block
*/ */

Datei anzeigen

@ -1,5 +1,3 @@
package org.bukkit.event.block; package org.bukkit.event.block;
import org.bukkit.block.Block; import org.bukkit.block.Block;

Datei anzeigen

@ -56,7 +56,6 @@ public class BlockDamageEvent extends BlockEvent implements Cancellable {
return itemstack; return itemstack;
} }
public boolean isCancelled() { public boolean isCancelled() {
return cancel; return cancel;
} }

Datei anzeigen

@ -73,5 +73,4 @@ public class BlockDispenseEvent extends BlockEvent implements Cancellable {
public void setCancelled(boolean cancel) { public void setCancelled(boolean cancel) {
cancelled = cancel; cancelled = cancel;
} }
} }

Datei anzeigen

@ -55,8 +55,7 @@ public class BlockIgniteEvent extends BlockEvent implements Cancellable {
* Gets the cause of block ignite. * Gets the cause of block ignite.
* @return An IgniteCause value detailing the cause of block ignition. * @return An IgniteCause value detailing the cause of block ignition.
*/ */
public IgniteCause getCause() public IgniteCause getCause() {
{
return cause; return cause;
} }
@ -73,6 +72,7 @@ public class BlockIgniteEvent extends BlockEvent implements Cancellable {
* An enum to specify the cause of the ignite * An enum to specify the cause of the ignite
*/ */
public enum IgniteCause { public enum IgniteCause {
/** /**
* Block ignition caused by lava. * Block ignition caused by lava.
*/ */
@ -90,5 +90,4 @@ public class BlockIgniteEvent extends BlockEvent implements Cancellable {
*/ */
LIGHTNING, LIGHTNING,
} }
} }

Datei anzeigen

@ -9,25 +9,23 @@ import org.bukkit.plugin.AuthorNagException;
* @author durron597 * @author durron597
*/ */
public class BlockListener implements Listener { public class BlockListener implements Listener {
/** /**
* Default Constructor * Default Constructor
*/ */
public BlockListener() { public BlockListener() {}
}
/** /**
* Called when a block is damaged (or broken) * Called when a block is damaged (or broken)
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onBlockDamage(BlockDamageEvent event) { public void onBlockDamage(BlockDamageEvent event) {}
}
/** /**
* Called when we try to place a block, to see if we can build it * Called when we try to place a block, to see if we can build it
*/ */
public void onBlockCanBuild(BlockCanBuildEvent event) { public void onBlockCanBuild(BlockCanBuildEvent event) {}
}
/** /**
* Called when a block flows (water/lava) * Called when a block flows (water/lava)
@ -48,24 +46,21 @@ public class BlockListener implements Listener {
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onBlockIgnite(BlockIgniteEvent event) { public void onBlockIgnite(BlockIgniteEvent event) {}
}
/** /**
* Called when block physics occurs * Called when block physics occurs
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onBlockPhysics(BlockPhysicsEvent event) { public void onBlockPhysics(BlockPhysicsEvent event) {}
}
/** /**
* Called when a player places a block * Called when a player places a block
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onBlockPlace(BlockPlaceEvent event) { public void onBlockPlace(BlockPlaceEvent event) {}
}
/** /**
* Called when redstone changes * Called when redstone changes
@ -74,54 +69,47 @@ public class BlockListener implements Listener {
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onBlockRedstoneChange(BlockRedstoneEvent event) { public void onBlockRedstoneChange(BlockRedstoneEvent event) {}
}
/** /**
* Called when leaves are decaying naturally * Called when leaves are decaying naturally
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onLeavesDecay(LeavesDecayEvent event) { public void onLeavesDecay(LeavesDecayEvent event) {}
}
/** /**
* Called when a sign is changed * Called when a sign is changed
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onSignChange(SignChangeEvent event) { public void onSignChange(SignChangeEvent event) {}
}
/** /**
* Called when a block is destroyed from burning * Called when a block is destroyed from burning
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onBlockBurn(BlockBurnEvent event) { public void onBlockBurn(BlockBurnEvent event) {}
}
/** /**
* Called when a block is destroyed by a player. * Called when a block is destroyed by a player.
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onBlockBreak(BlockBreakEvent event) { public void onBlockBreak(BlockBreakEvent event) {}
}
/** /**
* Called when a world is attempting to place a block during a snowfall * Called when a world is attempting to place a block during a snowfall
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onSnowForm(SnowFormEvent event) { public void onSnowForm(SnowFormEvent event) {}
}
/** /**
* Called when a block is dispensing an item * Called when a block is dispensing an item
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onBlockDispense(BlockDispenseEvent event) { public void onBlockDispense(BlockDispenseEvent event) {}
}
} }

Datei anzeigen

@ -75,7 +75,6 @@ public class BlockPlaceEvent extends BlockEvent implements Cancellable {
return this.replacedBlockState; return this.replacedBlockState;
} }
/** /**
* Get the block that this block was placed against * Get the block that this block was placed against
* *

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit.event.block; package org.bukkit.event.block;
import org.bukkit.block.Block; import org.bukkit.block.Block;
@ -42,5 +41,4 @@ public class BlockRedstoneEvent extends BlockEvent {
public void setNewCurrent(int newCurrent) { public void setNewCurrent(int newCurrent) {
this.newCurrent = newCurrent; this.newCurrent = newCurrent;
} }
} }

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit.event.block; package org.bukkit.event.block;
import org.bukkit.block.Block; import org.bukkit.block.Block;

Datei anzeigen

@ -23,7 +23,7 @@ public class SnowFormEvent extends BlockEvent implements Cancellable {
* *
* @return the material being placed by a snowfall * @return the material being placed by a snowfall
*/ */
public Material getMaterial(){ public Material getMaterial() {
return material; return material;
} }
@ -32,7 +32,7 @@ public class SnowFormEvent extends BlockEvent implements Cancellable {
* *
* @param material the material to be placed during a snowfall * @param material the material to be placed during a snowfall
*/ */
public void setMaterial(Material material){ public void setMaterial(Material material) {
this.material = material; this.material = material;
} }
@ -41,7 +41,7 @@ public class SnowFormEvent extends BlockEvent implements Cancellable {
* *
* @return the data of the block being placed by a snowfall * @return the data of the block being placed by a snowfall
*/ */
public byte getData(){ public byte getData() {
return data; return data;
} }
@ -50,7 +50,7 @@ public class SnowFormEvent extends BlockEvent implements Cancellable {
* *
* @param data * @param data
*/ */
public void setData(byte data){ public void setData(byte data) {
this.data = data; this.data = data;
} }

Datei anzeigen

@ -68,18 +68,17 @@ public class CreeperPowerEvent extends EntityEvent implements Cancellable {
* An enum to specify the cause of the change in power * An enum to specify the cause of the change in power
*/ */
public enum PowerCause { public enum PowerCause {
/** /**
* Power change caused by a lightning bolt * Power change caused by a lightning bolt
* Powered state: true * Powered state: true
*/ */
LIGHTNING, LIGHTNING,
/** /**
* Power change caused by something else (probably a plugin) * Power change caused by something else (probably a plugin)
* Powered state: true * Powered state: true
*/ */
SET_ON, SET_ON,
/** /**
* Power change caused by something else (probably a plugin) * Power change caused by something else (probably a plugin)
* Powered state: false * Powered state: false

Datei anzeigen

@ -20,9 +20,7 @@ public class EntityDamageByBlockEvent extends EntityDamageEvent implements Cance
* Returns the block that damaged the player. * Returns the block that damaged the player.
* @return Block that damaged the player * @return Block that damaged the player
*/ */
public Block getDamager() public Block getDamager() {
{
return damager; return damager;
} }
} }

Datei anzeigen

@ -19,9 +19,7 @@ public class EntityDamageByEntityEvent extends EntityDamageEvent implements Canc
* Returns the entity that damaged the defender. * Returns the entity that damaged the defender.
* @return Entity that damaged the defender. * @return Entity that damaged the defender.
*/ */
public Entity getDamager() public Entity getDamager() {
{
return damager; return damager;
} }
} }

Datei anzeigen

@ -13,6 +13,7 @@ public class EntityDamageByProjectileEvent extends EntityDamageByEntityEvent {
super(damager, damagee, cause, damage); super(damager, damagee, cause, damage);
this.projectile = projectile; this.projectile = projectile;
Random random = new Random(); Random random = new Random();
this.bounce = random.nextBoolean(); this.bounce = random.nextBoolean();
} }
@ -24,12 +25,11 @@ public class EntityDamageByProjectileEvent extends EntityDamageByEntityEvent {
return projectile; return projectile;
} }
public void setBounce(boolean bounce){ public void setBounce(boolean bounce) {
this.bounce = bounce; this.bounce = bounce;
} }
public boolean getBounce(){ public boolean getBounce() {
return bounce; return bounce;
} }
} }

Datei anzeigen

@ -13,15 +13,13 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
private boolean cancelled; private boolean cancelled;
private DamageCause cause; private DamageCause cause;
public EntityDamageEvent(Entity damagee, DamageCause cause, int damage) public EntityDamageEvent(Entity damagee, DamageCause cause, int damage) {
{
super(Event.Type.ENTITY_DAMAGE, damagee); super(Event.Type.ENTITY_DAMAGE, damagee);
this.cause = cause; this.cause = cause;
this.damage = damage; this.damage = damage;
} }
protected EntityDamageEvent(Event.Type type, Entity damagee, DamageCause cause, int damage) protected EntityDamageEvent(Event.Type type, Entity damagee, DamageCause cause, int damage) {
{
super(type, damagee); super(type, damagee);
this.cause = cause; this.cause = cause;
this.damage = damage; this.damage = damage;
@ -57,8 +55,7 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
* Gets the amount of damage caused by the Block * Gets the amount of damage caused by the Block
* @return The amount of damage caused by the Block * @return The amount of damage caused by the Block
*/ */
public int getDamage() public int getDamage() {
{
return damage; return damage;
} }
@ -74,16 +71,15 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
* Gets the cause of the damage. * Gets the cause of the damage.
* @return A DamageCause value detailing the cause of the damage. * @return A DamageCause value detailing the cause of the damage.
*/ */
public DamageCause getCause() public DamageCause getCause() {
{
return cause; return cause;
} }
/** /**
* An enum to specify the cause of the damage * An enum to specify the cause of the damage
*/ */
public enum DamageCause public enum DamageCause {
{
/** /**
* Damage caused when an entity contacts a block such as a Cactus. * Damage caused when an entity contacts a block such as a Cactus.
* *

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit.event.entity; package org.bukkit.event.entity;
import java.util.List; import java.util.List;

Datei anzeigen

@ -9,8 +9,7 @@ import org.bukkit.event.Event;
public class EntityEvent extends Event { public class EntityEvent extends Event {
protected Entity entity; protected Entity entity;
public EntityEvent(final Event.Type type, final Entity what) public EntityEvent(final Event.Type type, final Entity what) {
{
super(type); super(type);
entity = what; entity = what;
} }
@ -19,8 +18,7 @@ public class EntityEvent extends Event {
* Returns the Entity involved in this event * Returns the Entity involved in this event
* @return Entity who is involved in this event * @return Entity who is involved in this event
*/ */
public final Entity getEntity() public final Entity getEntity() {
{
return entity; return entity;
} }
} }

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit.event.entity; package org.bukkit.event.entity;
import java.util.List; import java.util.List;
@ -17,7 +16,7 @@ public class EntityExplodeEvent extends EntityEvent implements Cancellable {
private List<Block> blocks; private List<Block> blocks;
private float yield = 0.3F; private float yield = 0.3F;
public EntityExplodeEvent (Entity what, Location location, List<Block> blocks) { public EntityExplodeEvent(Entity what, Location location, List<Block> blocks) {
super(Type.ENTITY_EXPLODE, what); super(Type.ENTITY_EXPLODE, what);
this.location = location; this.location = location;
this.cancel = false; this.cancel = false;

Datei anzeigen

@ -8,42 +8,29 @@ import org.bukkit.event.painting.PaintingBreakEvent;
* Handles all events fired in relation to entities * Handles all events fired in relation to entities
*/ */
public class EntityListener implements Listener { public class EntityListener implements Listener {
public EntityListener() { public EntityListener() {}
}
public void onCreatureSpawn(CreatureSpawnEvent event) { public void onCreatureSpawn(CreatureSpawnEvent event) {}
}
public void onEntityCombust(EntityCombustEvent event) { public void onEntityCombust(EntityCombustEvent event) {}
}
public void onEntityDamage(EntityDamageEvent event) { public void onEntityDamage(EntityDamageEvent event) {}
}
public void onEntityExplode(EntityExplodeEvent event) { public void onEntityExplode(EntityExplodeEvent event) {}
}
public void onExplosionPrime(ExplosionPrimeEvent event) { public void onExplosionPrime(ExplosionPrimeEvent event) {}
}
public void onEntityDeath(EntityDeathEvent event) { public void onEntityDeath(EntityDeathEvent event) {}
}
public void onEntityTarget(EntityTargetEvent event) { public void onEntityTarget(EntityTargetEvent event) {}
}
public void onEntityInteract(EntityInteractEvent event) { public void onEntityInteract(EntityInteractEvent event) {}
}
public void onPaintingPlace(PaintingPlaceEvent event){ public void onPaintingPlace(PaintingPlaceEvent event) {}
}
public void onPaintingBreak(PaintingBreakEvent event){ public void onPaintingBreak(PaintingBreakEvent event) {}
}
public void onPigZap(PigZapEvent event) { public void onPigZap(PigZapEvent event) {}
}
public void onCreeperPower(CreeperPowerEvent event) { public void onCreeperPower(CreeperPowerEvent event) {}
}
} }

Datei anzeigen

@ -66,8 +66,8 @@ public class EntityTargetEvent extends EntityEvent implements Cancellable {
/** /**
* An enum to specify the reason for the targeting * An enum to specify the reason for the targeting
*/ */
public enum TargetReason public enum TargetReason {
{
/** /**
* When the entity's target has died, and so it no longer targets it * When the entity's target has died, and so it no longer targets it
*/ */

Datei anzeigen

@ -38,5 +38,4 @@ public class ExplosionPrimeEvent extends EntityEvent implements Cancellable {
public void setFire(boolean fire) { public void setFire(boolean fire) {
this.fire = fire; this.fire = fire;
} }
} }

Datei anzeigen

@ -8,7 +8,7 @@ import org.bukkit.entity.Painting;
* @author Tanel Suurhans * @author Tanel Suurhans
*/ */
public class PaintingBreakByWorldEvent extends PaintingBreakEvent{ public class PaintingBreakByWorldEvent extends PaintingBreakEvent {
public PaintingBreakByWorldEvent(final Painting painting) { public PaintingBreakByWorldEvent(final Painting painting) {
super(painting, RemoveCause.WORLD); super(painting, RemoveCause.WORLD);
} }

Datei anzeigen

@ -20,7 +20,7 @@ public class PaintingBreakEvent extends PaintingEvent implements Cancellable {
this.cause = cause; this.cause = cause;
} }
public RemoveCause getCause(){ public RemoveCause getCause() {
return cause; return cause;
} }
@ -41,12 +41,10 @@ public class PaintingBreakEvent extends PaintingEvent implements Cancellable {
* Removed by an entity * Removed by an entity
*/ */
ENTITY, ENTITY,
/** /**
* Removed by the world - block destroyed behind, water flowing over etc * Removed by the world - block destroyed behind, water flowing over etc
*/ */
WORLD WORLD
} }
} }

Datei anzeigen

@ -25,5 +25,4 @@ public class PaintingEvent extends Event {
public Painting getPainting() { public Painting getPainting() {
return painting; return painting;
} }
} }

Datei anzeigen

@ -46,5 +46,4 @@ public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable {
public Block getBed() { public Block getBed() {
return bed; return bed;
} }
} }

Datei anzeigen

@ -25,5 +25,4 @@ public class PlayerBedLeaveEvent extends PlayerEvent {
public Block getBed() { public Block getBed() {
return bed; return bed;
} }
} }

Datei anzeigen

@ -1,4 +1,3 @@
package org.bukkit.event.player; package org.bukkit.event.player;
import java.util.Arrays; import java.util.Arrays;

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen