mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-25 17:33:52 -07:00
General cleanup (deprecated+whitespace)
By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
@@ -38,7 +38,7 @@ public interface Entity {
|
||||
|
||||
/**
|
||||
* Returns a unique id for this entity
|
||||
*
|
||||
*
|
||||
* @return Entity id
|
||||
*/
|
||||
public int getEntityId();
|
||||
|
@@ -24,7 +24,7 @@ public interface HumanEntity extends LivingEntity {
|
||||
|
||||
/**
|
||||
* Returns the ItemStack currently in your hand, can be empty.
|
||||
*
|
||||
*
|
||||
* @return The ItemStack of the item you are currently holding.
|
||||
*/
|
||||
public ItemStack getItemInHand();
|
||||
@@ -32,17 +32,17 @@ public interface HumanEntity extends LivingEntity {
|
||||
/**
|
||||
* Sets the item to the given ItemStack, this will replace whatever the
|
||||
* user was holding.
|
||||
*
|
||||
*
|
||||
* @param item The ItemStack which will end up in the hand
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public void setItemInHand(ItemStack item);
|
||||
|
||||
/**
|
||||
* Changes the item in hand to another of your 'action slots'.
|
||||
*
|
||||
*
|
||||
* @param index The new index to use, only valid ones are 0-8.
|
||||
*
|
||||
*
|
||||
public void selectItemInHand( int index );
|
||||
*/
|
||||
}
|
||||
|
@@ -18,44 +18,44 @@ public interface LivingEntity extends Entity {
|
||||
* @param health New health represented from 0-20
|
||||
*/
|
||||
public void setHealth(int health);
|
||||
|
||||
|
||||
/**
|
||||
* Throws an egg from the entity.
|
||||
*/
|
||||
public Egg throwEgg();
|
||||
|
||||
|
||||
/**
|
||||
* Throws a snowball from the entity.
|
||||
*/
|
||||
public Snowball throwSnowball();
|
||||
|
||||
|
||||
/**
|
||||
* Shoots an arrow from the entity.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Arrow shootArrow();
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this entity is inside a vehicle.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isInsideVehicle();
|
||||
|
||||
|
||||
/**
|
||||
* Leave the current vehicle. If the entity is currently in a vehicle
|
||||
* (and is removed from it), true will be returned, otherwise false will
|
||||
* be returned.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean leaveVehicle();
|
||||
|
||||
|
||||
/**
|
||||
* Get the vehicle that this player is inside. If there is no vehicle,
|
||||
* null will be returned.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Vehicle getVehicle();
|
||||
|
@@ -18,7 +18,7 @@ public enum MobType {
|
||||
SQUID("Squid");
|
||||
|
||||
private String name;
|
||||
|
||||
|
||||
private static final Map<String, MobType> mapping
|
||||
= new HashMap<String, MobType>();
|
||||
|
||||
@@ -35,7 +35,7 @@ public enum MobType {
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
public static MobType fromName(String name) {
|
||||
return mapping.get(name);
|
||||
}
|
||||
|
Reference in New Issue
Block a user