@@ -32,7 +32,9 @@ public interface Boat extends Vehicle {
|
||||
* Gets the type of the boat.
|
||||
*
|
||||
* @return the boat type
|
||||
* @deprecated different boats types are now different entity types
|
||||
*/
|
||||
@Deprecated
|
||||
@NotNull
|
||||
Type getBoatType();
|
||||
|
||||
@@ -40,7 +42,9 @@ public interface Boat extends Vehicle {
|
||||
* Sets the type of the boat.
|
||||
*
|
||||
* @param type the new type
|
||||
* @deprecated different boats types are now different entity types
|
||||
*/
|
||||
@Deprecated
|
||||
void setBoatType(@NotNull Type type);
|
||||
|
||||
/**
|
||||
@@ -134,7 +138,9 @@ public interface Boat extends Vehicle {
|
||||
|
||||
/**
|
||||
* Represents the type of boats.
|
||||
* @deprecated different boats types are now different entity types
|
||||
*/
|
||||
@Deprecated
|
||||
public enum Type {
|
||||
OAK(Material.OAK_PLANKS),
|
||||
SPRUCE(Material.SPRUCE_PLANKS),
|
||||
|
||||
13
paper-api/src/main/java/org/bukkit/entity/Creaking.java
Normal file
13
paper-api/src/main/java/org/bukkit/entity/Creaking.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a Creaking.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public interface Creaking extends Monster {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a Creaking spawned from a creaking heart which will not persist.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public interface CreakingTransient extends Creaking {
|
||||
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
public interface Dolphin extends WaterMob { }
|
||||
public interface Dolphin extends Ageable, WaterMob { }
|
||||
|
||||
@@ -7,9 +7,30 @@ import java.util.Map;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Keyed;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.Translatable;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.boat.AcaciaBoat;
|
||||
import org.bukkit.entity.boat.AcaciaChestBoat;
|
||||
import org.bukkit.entity.boat.BambooChestRaft;
|
||||
import org.bukkit.entity.boat.BambooRaft;
|
||||
import org.bukkit.entity.boat.BirchBoat;
|
||||
import org.bukkit.entity.boat.BirchChestBoat;
|
||||
import org.bukkit.entity.boat.CherryBoat;
|
||||
import org.bukkit.entity.boat.CherryChestBoat;
|
||||
import org.bukkit.entity.boat.DarkOakBoat;
|
||||
import org.bukkit.entity.boat.DarkOakChestBoat;
|
||||
import org.bukkit.entity.boat.JungleBoat;
|
||||
import org.bukkit.entity.boat.JungleChestBoat;
|
||||
import org.bukkit.entity.boat.MangroveBoat;
|
||||
import org.bukkit.entity.boat.MangroveChestBoat;
|
||||
import org.bukkit.entity.boat.OakBoat;
|
||||
import org.bukkit.entity.boat.OakChestBoat;
|
||||
import org.bukkit.entity.boat.PaleOakBoat;
|
||||
import org.bukkit.entity.boat.PaleOakChestBoat;
|
||||
import org.bukkit.entity.boat.SpruceBoat;
|
||||
import org.bukkit.entity.boat.SpruceChestBoat;
|
||||
import org.bukkit.entity.minecart.CommandMinecart;
|
||||
import org.bukkit.entity.minecart.ExplosiveMinecart;
|
||||
import org.bukkit.entity.minecart.HopperMinecart;
|
||||
@@ -19,6 +40,7 @@ import org.bukkit.entity.minecart.SpawnerMinecart;
|
||||
import org.bukkit.entity.minecart.StorageMinecart;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -181,10 +203,6 @@ public enum EntityType implements Keyed, Translatable {
|
||||
* @see CommandMinecart
|
||||
*/
|
||||
COMMAND_BLOCK_MINECART("command_block_minecart", CommandMinecart.class, 40),
|
||||
/**
|
||||
* A placed boat.
|
||||
*/
|
||||
BOAT("boat", Boat.class, 41),
|
||||
/**
|
||||
* @see RideableMinecart
|
||||
*/
|
||||
@@ -275,7 +293,6 @@ public enum EntityType implements Keyed, Translatable {
|
||||
GOAT("goat", Goat.class, -1),
|
||||
MARKER("marker", Marker.class, -1),
|
||||
ALLAY("allay", Allay.class, -1),
|
||||
CHEST_BOAT("chest_boat", ChestBoat.class, -1),
|
||||
FROG("frog", Frog.class, -1),
|
||||
TADPOLE("tadpole", Tadpole.class, -1),
|
||||
WARDEN("warden", Warden.class, -1),
|
||||
@@ -291,6 +308,32 @@ public enum EntityType implements Keyed, Translatable {
|
||||
ARMADILLO("armadillo", Armadillo.class, -1),
|
||||
BOGGED("bogged", Bogged.class, -1),
|
||||
OMINOUS_ITEM_SPAWNER("ominous_item_spawner", OminousItemSpawner.class, -1),
|
||||
ACACIA_BOAT("acacia_boat", AcaciaBoat.class, -1),
|
||||
ACACIA_CHEST_BOAT("acacia_chest_boat", AcaciaChestBoat.class, -1),
|
||||
BAMBOO_RAFT("bamboo_raft", BambooRaft.class, -1),
|
||||
BAMBOO_CHEST_RAFT("bamboo_chest_raft", BambooChestRaft.class, -1),
|
||||
BIRCH_BOAT("birch_boat", BirchBoat.class, -1),
|
||||
BIRCH_CHEST_BOAT("birch_chest_boat", BirchChestBoat.class, -1),
|
||||
CHERRY_BOAT("cherry_boat", CherryBoat.class, -1),
|
||||
CHERRY_CHEST_BOAT("cherry_chest_boat", CherryChestBoat.class, -1),
|
||||
DARK_OAK_BOAT("dark_oak_boat", DarkOakBoat.class, -1),
|
||||
DARK_OAK_CHEST_BOAT("dark_oak_chest_boat", DarkOakChestBoat.class, -1),
|
||||
JUNGLE_BOAT("jungle_boat", JungleBoat.class, -1),
|
||||
JUNGLE_CHEST_BOAT("jungle_chest_boat", JungleChestBoat.class, -1),
|
||||
MANGROVE_BOAT("mangrove_boat", MangroveBoat.class, -1),
|
||||
MANGROVE_CHEST_BOAT("mangrove_chest_boat", MangroveChestBoat.class, -1),
|
||||
OAK_BOAT("oak_boat", OakBoat.class, -1),
|
||||
OAK_CHEST_BOAT("oak_chest_boat", OakChestBoat.class, -1),
|
||||
PALE_OAK_BOAT("pale_oak_boat", PaleOakBoat.class, -1),
|
||||
PALE_OAK_CHEST_BOAT("pale_oak_chest_boat", PaleOakChestBoat.class, -1),
|
||||
SPRUCE_BOAT("spruce_boat", SpruceBoat.class, -1),
|
||||
SPRUCE_CHEST_BOAT("spruce_chest_boat", SpruceChestBoat.class, -1),
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
CREAKING("creaking", Creaking.class, -1),
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
CREAKING_TRANSIENT("creaking_transient", CreakingTransient.class, -1),
|
||||
/**
|
||||
* A fishing line and bobber.
|
||||
*/
|
||||
|
||||
@@ -6,14 +6,18 @@ package org.bukkit.entity;
|
||||
public interface Explosive extends Entity {
|
||||
|
||||
/**
|
||||
* Set the radius affected by this explosive's explosion
|
||||
* Set the radius affected by this explosive's explosion.
|
||||
* <br>
|
||||
* This is the base yield, which may be affected by other entity attributes.
|
||||
*
|
||||
* @param yield The explosive yield
|
||||
*/
|
||||
public void setYield(float yield);
|
||||
|
||||
/**
|
||||
* Return the radius or yield of this explosive's explosion
|
||||
* Return the radius or yield of this explosive's explosion.
|
||||
* <br>
|
||||
* This is the base yield, which may be affected by other entity attributes.
|
||||
*
|
||||
* @return the radius of blocks affected
|
||||
*/
|
||||
|
||||
@@ -256,6 +256,37 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
public void setCooldown(@NotNull Material material, int ticks);
|
||||
|
||||
/**
|
||||
* Check whether a cooldown is active on the specified item.
|
||||
*
|
||||
* @param item the item to check
|
||||
* @return if a cooldown is active on the item
|
||||
*/
|
||||
public boolean hasCooldown(@NotNull ItemStack item);
|
||||
|
||||
/**
|
||||
* Get the cooldown time in ticks remaining for the specified item.
|
||||
*
|
||||
* @param item the item to check
|
||||
* @return the remaining cooldown time in ticks
|
||||
*/
|
||||
public int getCooldown(@NotNull ItemStack item);
|
||||
|
||||
/**
|
||||
* Set a cooldown on the specified item for a certain amount of ticks.
|
||||
* ticks. 0 ticks will result in the removal of the cooldown.
|
||||
* <p>
|
||||
* Cooldowns are used by the server for items such as ender pearls and
|
||||
* shields to prevent them from being used repeatedly.
|
||||
* <p>
|
||||
* Note that cooldowns will not by themselves stop an item from being used
|
||||
* for attacking.
|
||||
*
|
||||
* @param item the item to set the cooldown for
|
||||
* @param ticks the amount of ticks to set or 0 to remove
|
||||
*/
|
||||
public void setCooldown(@NotNull ItemStack item, int ticks);
|
||||
|
||||
/**
|
||||
* Get the sleep ticks of the player. This value may be capped.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.GameRule;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.bukkit.util.Vector;
|
||||
@@ -30,7 +31,9 @@ public interface Minecart extends Vehicle {
|
||||
* velocity.
|
||||
*
|
||||
* @return The max speed
|
||||
* @see GameRule#MINECART_MAX_SPEED
|
||||
*/
|
||||
@Deprecated
|
||||
public double getMaxSpeed();
|
||||
|
||||
/**
|
||||
@@ -38,7 +41,9 @@ public interface Minecart extends Vehicle {
|
||||
* 0.4D.
|
||||
*
|
||||
* @param speed The max speed
|
||||
* @see GameRule#MINECART_MAX_SPEED
|
||||
*/
|
||||
@Deprecated
|
||||
public void setMaxSpeed(double speed);
|
||||
|
||||
/**
|
||||
|
||||
@@ -106,6 +106,21 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public void setPlayerListName(@Nullable String name);
|
||||
|
||||
/**
|
||||
* Gets the relative order that the player is shown on the player list.
|
||||
*
|
||||
* @return the player list order
|
||||
*/
|
||||
public int getPlayerListOrder();
|
||||
|
||||
/**
|
||||
* Sets the relative order that the player is shown on the in-game player
|
||||
* list.
|
||||
*
|
||||
* @param order new player list order, must be positive
|
||||
*/
|
||||
public void setPlayerListOrder(int order);
|
||||
|
||||
/**
|
||||
* Gets the currently displayed player list header for this player.
|
||||
*
|
||||
|
||||
@@ -1,7 +1,43 @@
|
||||
|
||||
package org.bukkit.entity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents a salmon fish.
|
||||
*/
|
||||
public interface Salmon extends Fish { }
|
||||
public interface Salmon extends Fish {
|
||||
|
||||
/**
|
||||
* Get the variant of this salmon.
|
||||
*
|
||||
* @return salmon variant
|
||||
*/
|
||||
@NotNull
|
||||
public Variant getVariant();
|
||||
|
||||
/**
|
||||
* Set the variant of this salmon.
|
||||
*
|
||||
* @param variant salmon variant
|
||||
*/
|
||||
public void setVariant(@NotNull Variant variant);
|
||||
|
||||
/**
|
||||
* Represents the variant of a salmon - ie its size.
|
||||
*/
|
||||
public enum Variant {
|
||||
|
||||
/**
|
||||
* Small salmon.
|
||||
*/
|
||||
SMALL,
|
||||
/**
|
||||
* Default salmon.
|
||||
*/
|
||||
MEDIUM,
|
||||
/**
|
||||
* Large salmon.
|
||||
*/
|
||||
LARGE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@ package org.bukkit.entity;
|
||||
/**
|
||||
* Represents a Squid.
|
||||
*/
|
||||
public interface Squid extends WaterMob {}
|
||||
public interface Squid extends Ageable, WaterMob {}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents an acacia boat.
|
||||
*/
|
||||
public interface AcaciaBoat extends Boat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents an acacia chest boat.
|
||||
*/
|
||||
public interface AcaciaChestBoat extends ChestBoat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents a bamboo chest raft.
|
||||
*/
|
||||
public interface BambooChestRaft extends ChestBoat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents a bamboo raft.
|
||||
*/
|
||||
public interface BambooRaft extends Boat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents a birch boat.
|
||||
*/
|
||||
public interface BirchBoat extends Boat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents a birch chest boat.
|
||||
*/
|
||||
public interface BirchChestBoat extends ChestBoat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents a cherry boat.
|
||||
*/
|
||||
public interface CherryBoat extends Boat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents a cherry chest boat.
|
||||
*/
|
||||
public interface CherryChestBoat extends ChestBoat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents a dark oak boat.
|
||||
*/
|
||||
public interface DarkOakBoat extends Boat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents a dark oak chest boat.
|
||||
*/
|
||||
public interface DarkOakChestBoat extends ChestBoat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents a jungle boat.
|
||||
*/
|
||||
public interface JungleBoat extends Boat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents a jungle chest boat.
|
||||
*/
|
||||
public interface JungleChestBoat extends ChestBoat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents a mangrove boat.
|
||||
*/
|
||||
public interface MangroveBoat extends Boat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents a mangrove chest boat.
|
||||
*/
|
||||
public interface MangroveChestBoat extends ChestBoat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents an oak boat.
|
||||
*/
|
||||
public interface OakBoat extends Boat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents an oak chest boat.
|
||||
*/
|
||||
public interface OakChestBoat extends ChestBoat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents an pale oak boat.
|
||||
*/
|
||||
public interface PaleOakBoat extends Boat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents an pale oak chest boat.
|
||||
*/
|
||||
public interface PaleOakChestBoat extends ChestBoat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
|
||||
/**
|
||||
* Represents a spruce boat.
|
||||
*/
|
||||
public interface SpruceBoat extends Boat {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
|
||||
/**
|
||||
* Represents a spruce chest boat.
|
||||
*/
|
||||
public interface SpruceChestBoat extends ChestBoat {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Interfaces for various {@link org.bukkit.entity.Boat} types.
|
||||
*/
|
||||
package org.bukkit.entity.boat;
|
||||
@@ -1,11 +1,12 @@
|
||||
package org.bukkit.entity.minecart;
|
||||
|
||||
import org.bukkit.entity.Explosive;
|
||||
import org.bukkit.entity.Minecart;
|
||||
|
||||
/**
|
||||
* Represents a Minecart with TNT inside it that can explode when triggered.
|
||||
*/
|
||||
public interface ExplosiveMinecart extends Minecart {
|
||||
public interface ExplosiveMinecart extends Minecart, Explosive {
|
||||
|
||||
/**
|
||||
* Set the fuse ticks of this minecart.
|
||||
|
||||
Reference in New Issue
Block a user