8
paper-api/src/main/java/org/bukkit/block/Barrel.java
Normal file
8
paper-api/src/main/java/org/bukkit/block/Barrel.java
Normal file
@@ -0,0 +1,8 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.loot.Lootable;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a Barrel.
|
||||
*/
|
||||
public interface Barrel extends Container, Lootable { }
|
||||
@@ -3,7 +3,6 @@ package org.bukkit.block;
|
||||
import java.util.Collection;
|
||||
import org.bukkit.Nameable;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.inventory.BeaconInventory;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -12,15 +11,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents a captured state of a beacon.
|
||||
*/
|
||||
public interface Beacon extends Container, Nameable {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
BeaconInventory getInventory();
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
BeaconInventory getSnapshotInventory();
|
||||
public interface Beacon extends BlockState, Lockable, Nameable {
|
||||
|
||||
/**
|
||||
* Returns the list of players within the beacon's range of effect.
|
||||
|
||||
6
paper-api/src/main/java/org/bukkit/block/Bell.java
Normal file
6
paper-api/src/main/java/org/bukkit/block/Bell.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
/**
|
||||
* Represents a captured state of Bell.
|
||||
*/
|
||||
public interface Bell extends BlockState { }
|
||||
@@ -1,9 +1,14 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import java.util.Locale;
|
||||
import org.bukkit.Keyed;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Holds all accepted Biomes in the default server
|
||||
*/
|
||||
public enum Biome {
|
||||
public enum Biome implements Keyed {
|
||||
OCEAN,
|
||||
PLAINS,
|
||||
DESERT,
|
||||
@@ -76,5 +81,19 @@ public enum Biome {
|
||||
SHATTERED_SAVANNA_PLATEAU,
|
||||
ERODED_BADLANDS,
|
||||
MODIFIED_WOODED_BADLANDS_PLATEAU,
|
||||
MODIFIED_BADLANDS_PLATEAU
|
||||
MODIFIED_BADLANDS_PLATEAU,
|
||||
BAMBOO_JUNGLE,
|
||||
BAMBOO_JUNGLE_HILLS;
|
||||
|
||||
private final NamespacedKey key;
|
||||
|
||||
private Biome() {
|
||||
this.key = NamespacedKey.minecraft(name().toLowerCase(Locale.ROOT));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public NamespacedKey getKey() {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a blast furnace.
|
||||
*/
|
||||
public interface BlastFurnace extends Furnace { }
|
||||
@@ -1,13 +1,12 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.Nameable;
|
||||
import org.bukkit.inventory.BrewerInventory;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a brewing stand.
|
||||
*/
|
||||
public interface BrewingStand extends Container, Nameable {
|
||||
public interface BrewingStand extends Container {
|
||||
|
||||
/**
|
||||
* How much time is left in the brewing cycle.
|
||||
|
||||
69
paper-api/src/main/java/org/bukkit/block/Campfire.java
Normal file
69
paper-api/src/main/java/org/bukkit/block/Campfire.java
Normal file
@@ -0,0 +1,69 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a campfire.
|
||||
*/
|
||||
public interface Campfire extends BlockState {
|
||||
|
||||
/**
|
||||
* @see Inventory#getSize()
|
||||
*
|
||||
* @return The size of the inventory
|
||||
*/
|
||||
int getSize();
|
||||
|
||||
/**
|
||||
* @see Inventory#getItem(int)
|
||||
*
|
||||
* @param index The index of the Slot's ItemStack to return
|
||||
* @return The ItemStack in the slot
|
||||
*/
|
||||
@Nullable
|
||||
ItemStack getItem(int index);
|
||||
|
||||
/**
|
||||
* @see Inventory#setItem(int, org.bukkit.inventory.ItemStack)
|
||||
*
|
||||
* @param index The index where to put the ItemStack
|
||||
* @param item The ItemStack to set
|
||||
*/
|
||||
void setItem(int index, @Nullable ItemStack item);
|
||||
|
||||
/**
|
||||
* Get cook time.This is the amount of time the item has been cooking for.
|
||||
*
|
||||
* @param index
|
||||
* @return Cook time
|
||||
*/
|
||||
int getCookTime(int index);
|
||||
|
||||
/**
|
||||
* Set cook time.This is the amount of time the item has been cooking for.
|
||||
*
|
||||
* @param index
|
||||
* @param cookTime Cook time
|
||||
*/
|
||||
void setCookTime(int index, int cookTime);
|
||||
|
||||
/**
|
||||
* Get cook time total.This is the amount of time the item is required to
|
||||
* cook for.
|
||||
*
|
||||
* @param index
|
||||
* @return Cook time total
|
||||
*/
|
||||
int getCookTimeTotal(int index);
|
||||
|
||||
/**
|
||||
* Set cook time.This is the amount of time the item is required to cook
|
||||
* for.
|
||||
*
|
||||
* @param index
|
||||
* @param cookTimeTotal Cook time total
|
||||
*/
|
||||
void setCookTimeTotal(int index, int cookTimeTotal);
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.Nameable;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.loot.Lootable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -8,7 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
/**
|
||||
* Represents a captured state of a chest.
|
||||
*/
|
||||
public interface Chest extends Container, Nameable, Lootable {
|
||||
public interface Chest extends Container, Lootable {
|
||||
|
||||
/**
|
||||
* Gets the inventory of the chest block represented by this block state.
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.Nameable;
|
||||
import org.bukkit.inventory.BlockInventoryHolder;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.InventoryHolder;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a container block.
|
||||
*/
|
||||
public interface Container extends BlockState, InventoryHolder, Lockable {
|
||||
public interface Container extends BlockState, BlockInventoryHolder, Lockable, Nameable {
|
||||
|
||||
/**
|
||||
* Gets the inventory of the block represented by this block state.
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.Nameable;
|
||||
import org.bukkit.loot.Lootable;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a dropper.
|
||||
*/
|
||||
public interface Dropper extends Container, Nameable, Lootable {
|
||||
public interface Dropper extends Container, Lootable {
|
||||
|
||||
/**
|
||||
* Tries to drop a randomly selected item from the dropper's inventory,
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.Nameable;
|
||||
import org.bukkit.inventory.FurnaceInventory;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a furnace.
|
||||
*/
|
||||
public interface Furnace extends Container, Nameable {
|
||||
public interface Furnace extends Container {
|
||||
|
||||
/**
|
||||
* Get burn time.
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.Nameable;
|
||||
import org.bukkit.loot.Lootable;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a hopper.
|
||||
*/
|
||||
public interface Hopper extends Container, Nameable, Lootable { }
|
||||
public interface Hopper extends Container, Lootable { }
|
||||
|
||||
6
paper-api/src/main/java/org/bukkit/block/Jigsaw.java
Normal file
6
paper-api/src/main/java/org/bukkit/block/Jigsaw.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a jigsaw.
|
||||
*/
|
||||
public interface Jigsaw extends BlockState { }
|
||||
45
paper-api/src/main/java/org/bukkit/block/Lectern.java
Normal file
45
paper-api/src/main/java/org/bukkit/block/Lectern.java
Normal file
@@ -0,0 +1,45 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.inventory.BlockInventoryHolder;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a lectern.
|
||||
*/
|
||||
public interface Lectern extends BlockState, BlockInventoryHolder {
|
||||
|
||||
/**
|
||||
* Get the current lectern page.
|
||||
*
|
||||
* @return current page
|
||||
*/
|
||||
int getPage();
|
||||
|
||||
/**
|
||||
* Set the current lectern page.
|
||||
*
|
||||
* If the page is greater than the number of pages of the book currently in
|
||||
* the inventory, then behavior is undefined.
|
||||
*
|
||||
* @param page new page
|
||||
*/
|
||||
void setPage(int page);
|
||||
|
||||
/**
|
||||
* @see Container#getInventory()
|
||||
*
|
||||
* @return inventory
|
||||
*/
|
||||
@NotNull
|
||||
@Override
|
||||
Inventory getInventory();
|
||||
|
||||
/**
|
||||
* @see Container#getSnapshotInventory()
|
||||
*
|
||||
* @return snapshot inventory
|
||||
*/
|
||||
@NotNull
|
||||
Inventory getSnapshotInventory();
|
||||
}
|
||||
@@ -1,14 +1,13 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Nameable;
|
||||
import org.bukkit.loot.Lootable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a ShulkerBox.
|
||||
*/
|
||||
public interface ShulkerBox extends Container, Nameable, Lootable {
|
||||
public interface ShulkerBox extends Container, Lootable {
|
||||
|
||||
/**
|
||||
* Get the {@link DyeColor} corresponding to this ShulkerBox
|
||||
|
||||
6
paper-api/src/main/java/org/bukkit/block/Smoker.java
Normal file
6
paper-api/src/main/java/org/bukkit/block/Smoker.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a smoker.
|
||||
*/
|
||||
public interface Smoker extends Furnace { }
|
||||
@@ -0,0 +1,44 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Ageable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* 'leaves' represents the size of the leaves on this bamboo block.
|
||||
*/
|
||||
public interface Bamboo extends Ageable, Sapling {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'leaves' property.
|
||||
*
|
||||
* @return the 'leaves' value
|
||||
*/
|
||||
@NotNull
|
||||
Leaves getLeaves();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'leaves' property.
|
||||
*
|
||||
* @param leaves the new 'leaves' value
|
||||
*/
|
||||
void setLeaves(@NotNull Leaves leaves);
|
||||
|
||||
/**
|
||||
* Bamboo leaf size.
|
||||
*/
|
||||
public enum Leaves {
|
||||
|
||||
/**
|
||||
* No leaves.
|
||||
*/
|
||||
NONE,
|
||||
/**
|
||||
* Small leaves.
|
||||
*/
|
||||
SMALL,
|
||||
/**
|
||||
* Large leaves.
|
||||
*/
|
||||
LARGE;
|
||||
}
|
||||
}
|
||||
32
paper-api/src/main/java/org/bukkit/block/data/type/Bell.java
Normal file
32
paper-api/src/main/java/org/bukkit/block/data/type/Bell.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
|
||||
/**
|
||||
* 'attachment' denotes how the bell is attached to its block.
|
||||
*/
|
||||
public interface Bell extends Directional {
|
||||
|
||||
/**
|
||||
* What the bell is attached to.
|
||||
*/
|
||||
public enum Attachment {
|
||||
|
||||
/**
|
||||
* Placed on floor.
|
||||
*/
|
||||
FLOOR,
|
||||
/**
|
||||
* Placed on ceiling.
|
||||
*/
|
||||
CEILING,
|
||||
/**
|
||||
* Placed on one wall.
|
||||
*/
|
||||
SINGLE_WALL,
|
||||
/**
|
||||
* Placed between two walls.
|
||||
*/
|
||||
DOUBLE_WALL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Lightable;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
/**
|
||||
* 'signal_fire' denotes whether the fire is extra smokey due to having a hay
|
||||
* bale placed beneath it.
|
||||
*/
|
||||
public interface Campfire extends Lightable, Waterlogged {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'signal_fire' property.
|
||||
*
|
||||
* @return the 'signal_fire' value
|
||||
*/
|
||||
boolean isSignalFire();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'signal_fire' property.
|
||||
*
|
||||
* @param signalFire the new 'signal_fire' value
|
||||
*/
|
||||
void setSignalFire(boolean signalFire);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
/**
|
||||
* 'hanging' denotes whether the lantern is hanging from a block.
|
||||
*/
|
||||
public interface Lantern {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'hanging' property.
|
||||
*
|
||||
* @return the 'hanging' value
|
||||
*/
|
||||
boolean isHanging();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'hanging' property.
|
||||
*
|
||||
* @param hanging the new 'hanging' value
|
||||
*/
|
||||
void setHanging(boolean hanging);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* 'has_book' is a quick flag to check whether this lectern has a book inside
|
||||
* it.
|
||||
*/
|
||||
public interface Lectern extends Directional, Powerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'has_book' property.
|
||||
*
|
||||
* @return the 'has_book' value
|
||||
*/
|
||||
boolean hasBook();
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
/**
|
||||
* 'bottom' indicates whether the scaffolding is floating or not.
|
||||
* <br>
|
||||
* 'distance' indicates the distance from a scaffolding block placed above a
|
||||
* 'bottom' scaffold.
|
||||
* <br>
|
||||
* When 'distance' reaches {@link #getMaximumDistance()} the block will drop.
|
||||
*/
|
||||
public interface Scaffolding extends Waterlogged {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'bottom' property.
|
||||
*
|
||||
* @return the 'bottom' value
|
||||
*/
|
||||
boolean isBottom();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'bottom' property.
|
||||
*
|
||||
* @param bottom the new 'bottom' value
|
||||
*/
|
||||
void setBottom(boolean bottom);
|
||||
|
||||
/**
|
||||
* Gets the value of the 'distance' property.
|
||||
*
|
||||
* @return the 'distance' value
|
||||
*/
|
||||
int getDistance();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'distance' property.
|
||||
*
|
||||
* @param distance the new 'distance' value
|
||||
*/
|
||||
void setDistance(int distance);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'distance' property.
|
||||
*
|
||||
* @return the maximum 'distance' value
|
||||
*/
|
||||
int getMaximumDistance();
|
||||
}
|
||||
Reference in New Issue
Block a user