Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/ By: md_5 <git@md-5.net>
This commit is contained in:
@@ -16,17 +16,28 @@ public class BlockPistonExtendEvent extends BlockPistonEvent {
|
||||
private final int length;
|
||||
private List<Block> blocks;
|
||||
|
||||
@Deprecated
|
||||
public BlockPistonExtendEvent(final Block block, final int length, final BlockFace direction) {
|
||||
super(block, direction);
|
||||
|
||||
this.length = length;
|
||||
}
|
||||
|
||||
public BlockPistonExtendEvent(final Block block, final List<Block> blocks, final BlockFace direction) {
|
||||
super(block, direction);
|
||||
|
||||
this.length = blocks.size();
|
||||
this.blocks = blocks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the amount of blocks which will be moved while extending.
|
||||
*
|
||||
* @return the amount of moving blocks
|
||||
* @deprecated slime blocks make the value of this method
|
||||
* inaccurate due to blocks being pushed at the side
|
||||
*/
|
||||
@Deprecated
|
||||
public int getLength() {
|
||||
return this.length;
|
||||
}
|
||||
|
||||
@@ -136,6 +136,15 @@ public class EntityTargetEvent extends EntityEvent implements Cancellable {
|
||||
/**
|
||||
* For custom calls to the event.
|
||||
*/
|
||||
CUSTOM
|
||||
CUSTOM,
|
||||
/**
|
||||
* When the entity doesn't have a target, so it attacks the nearest
|
||||
* entity
|
||||
*/
|
||||
CLOSEST_ENTITY,
|
||||
/**
|
||||
* A currently unknown reason for the entity changing target.
|
||||
*/
|
||||
UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,10 +30,10 @@ public enum InventoryType {
|
||||
*/
|
||||
CRAFTING(5,"Crafting"),
|
||||
/**
|
||||
* An enchantment table inventory, with one CRAFTING slot and three
|
||||
* An enchantment table inventory, with two CRAFTING slots and three
|
||||
* enchanting buttons.
|
||||
*/
|
||||
ENCHANTING(1,"Enchanting"),
|
||||
ENCHANTING(2,"Enchanting"),
|
||||
/**
|
||||
* A brewing stand inventory, with one FUEL slot and three CRAFTING slots.
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.bukkit.event.player;
|
||||
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
/**
|
||||
* Represents an event that is called when a player right clicks an entity
|
||||
* with a location on the entity the was clicked.
|
||||
*/
|
||||
public class PlayerInteractAtEntityEvent extends PlayerInteractEntityEvent {
|
||||
private final Vector position;
|
||||
|
||||
public PlayerInteractAtEntityEvent(Player who, Entity clickedEntity, Vector position) {
|
||||
super(who, clickedEntity);
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
public Vector getClickedPosition() {
|
||||
return position.clone();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user