@@ -23,7 +23,7 @@ public class EnchantItemEvent extends InventoryEvent implements Cancellable {
|
||||
private final ItemStack item;
|
||||
private int level;
|
||||
private boolean cancelled;
|
||||
private final Map<Enchantment,Integer> enchants;
|
||||
private final Map<Enchantment, Integer> enchants;
|
||||
private final Player enchanter;
|
||||
private final int button;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* Called when an Entity targets a {@link LivingEntity} and can only target
|
||||
* LivingEntity's.
|
||||
*/
|
||||
public class EntityTargetLivingEntityEvent extends EntityTargetEvent{
|
||||
public class EntityTargetLivingEntityEvent extends EntityTargetEvent {
|
||||
public EntityTargetLivingEntityEvent(@NotNull final Entity entity, @Nullable final LivingEntity target, @Nullable final TargetReason reason) {
|
||||
super(entity, target, reason);
|
||||
}
|
||||
|
||||
@@ -71,6 +71,6 @@ public class PlayerLeashEntityEvent extends Event implements Cancellable {
|
||||
|
||||
@Override
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancelled = cancel;
|
||||
this.cancelled = cancel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,11 +25,11 @@ public enum InventoryType {
|
||||
* A chest inventory, with 0, 9, 18, 27, 36, 45, or 54 slots of type
|
||||
* CONTAINER.
|
||||
*/
|
||||
CHEST(27,"Chest"),
|
||||
CHEST(27, "Chest"),
|
||||
/**
|
||||
* A dispenser inventory, with 9 slots of type CONTAINER.
|
||||
*/
|
||||
DISPENSER(9,"Dispenser"),
|
||||
DISPENSER(9, "Dispenser"),
|
||||
/**
|
||||
* A dropper inventory, with 9 slots of type CONTAINER.
|
||||
*/
|
||||
@@ -38,45 +38,45 @@ public enum InventoryType {
|
||||
* A furnace inventory, with a RESULT slot, a CRAFTING slot, and a FUEL
|
||||
* slot.
|
||||
*/
|
||||
FURNACE(3,"Furnace"),
|
||||
FURNACE(3, "Furnace"),
|
||||
/**
|
||||
* A workbench inventory, with 9 CRAFTING slots and a RESULT slot.
|
||||
*/
|
||||
WORKBENCH(10,"Crafting"),
|
||||
WORKBENCH(10, "Crafting"),
|
||||
/**
|
||||
* A player's crafting inventory, with 4 CRAFTING slots and a RESULT slot.
|
||||
* Also implies that the 4 ARMOR slots are accessible.
|
||||
*/
|
||||
CRAFTING(5,"Crafting", false),
|
||||
CRAFTING(5, "Crafting", false),
|
||||
/**
|
||||
* An enchantment table inventory, with two CRAFTING slots and three
|
||||
* enchanting buttons.
|
||||
*/
|
||||
ENCHANTING(2,"Enchanting"),
|
||||
ENCHANTING(2, "Enchanting"),
|
||||
/**
|
||||
* A brewing stand inventory, with one FUEL slot and four CRAFTING slots.
|
||||
*/
|
||||
BREWING(5,"Brewing"),
|
||||
BREWING(5, "Brewing"),
|
||||
/**
|
||||
* A player's inventory, with 9 QUICKBAR slots, 27 CONTAINER slots, 4 ARMOR
|
||||
* slots and 1 offhand slot. The ARMOR and offhand slots may not be visible
|
||||
* to the player, though.
|
||||
*/
|
||||
PLAYER(41,"Player"),
|
||||
PLAYER(41, "Player"),
|
||||
/**
|
||||
* The creative mode inventory, with only 9 QUICKBAR slots and nothing
|
||||
* else. (The actual creative interface with the items is client-side and
|
||||
* cannot be altered by the server.)
|
||||
*/
|
||||
CREATIVE(9,"Creative", false),
|
||||
CREATIVE(9, "Creative", false),
|
||||
/**
|
||||
* The merchant inventory, with 2 CRAFTING slots, and 1 RESULT slot.
|
||||
*/
|
||||
MERCHANT(3,"Villager", false),
|
||||
MERCHANT(3, "Villager", false),
|
||||
/**
|
||||
* The ender chest inventory, with 27 slots.
|
||||
*/
|
||||
ENDER_CHEST(27,"Ender Chest"),
|
||||
ENDER_CHEST(27, "Ender Chest"),
|
||||
/**
|
||||
* An anvil inventory, with 2 CRAFTING slots and 1 RESULT slot
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* alternative for thread safe implementations.
|
||||
*/
|
||||
@Deprecated
|
||||
@Warning(reason="Listening to this event forces chat to wait for the main thread, delaying chat messages.")
|
||||
@Warning(reason = "Listening to this event forces chat to wait for the main thread, delaying chat messages.")
|
||||
public class PlayerChatEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancel = false;
|
||||
|
||||
@@ -70,7 +70,7 @@ public class PlayerEggThrowEvent extends PlayerEvent {
|
||||
* @param hatchType The type of the mob being hatched by the egg
|
||||
*/
|
||||
public void setHatchingType(@NotNull EntityType hatchType) {
|
||||
if(!hatchType.isSpawnable()) throw new IllegalArgumentException("Can't spawn that entity type from an egg!");
|
||||
if (!hatchType.isSpawnable()) throw new IllegalArgumentException("Can't spawn that entity type from an egg!");
|
||||
this.hatchType = hatchType;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* asynchronous.
|
||||
*/
|
||||
@Deprecated
|
||||
@Warning(reason="This event causes a login thread to synchronize with the main thread")
|
||||
@Warning(reason = "This event causes a login thread to synchronize with the main thread")
|
||||
public class PlayerPreLoginEvent extends Event {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Result result;
|
||||
|
||||
Reference in New Issue
Block a user