Delete Block.setData byte methods from API
Dieser Commit ist enthalten in:
Ursprung
b9fd5c60e9
Commit
d48ecdeb45
@ -39,6 +39,8 @@ public class Commodore
|
|||||||
"org/bukkit/block/Block (I)Z setTypeId",
|
"org/bukkit/block/Block (I)Z setTypeId",
|
||||||
"org/bukkit/block/Block (IZ)Z setTypeId",
|
"org/bukkit/block/Block (IZ)Z setTypeId",
|
||||||
"org/bukkit/block/Block (IBZ)Z setTypeIdAndData",
|
"org/bukkit/block/Block (IBZ)Z setTypeIdAndData",
|
||||||
|
"org/bukkit/block/Block (B)V setData",
|
||||||
|
"org/bukkit/block/Block (BZ)V setData",
|
||||||
"org/bukkit/inventory/ItemStack ()I getTypeId",
|
"org/bukkit/inventory/ItemStack ()I getTypeId",
|
||||||
"org/bukkit/inventory/ItemStack (I)V setTypeId"
|
"org/bukkit/inventory/ItemStack (I)V setTypeId"
|
||||||
) );
|
) );
|
||||||
|
@ -8,6 +8,7 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
|
import org.bukkit.craftbukkit.block.CraftBlock;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,10 +50,18 @@ public class CraftEvil {
|
|||||||
|
|
||||||
public static boolean setTypeIdAndData(Block block, int type, byte data, boolean applyPhysics) {
|
public static boolean setTypeIdAndData(Block block, int type, byte data, boolean applyPhysics) {
|
||||||
block.setType(getMaterial(type), applyPhysics);
|
block.setType(getMaterial(type), applyPhysics);
|
||||||
block.setData(data);
|
setData(block, data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setData(Block block, byte data) {
|
||||||
|
((CraftBlock) block).setData(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setData(Block block, byte data, boolean applyPhysics) {
|
||||||
|
((CraftBlock) block).setData(data, applyPhysics);
|
||||||
|
}
|
||||||
|
|
||||||
public static int getTypeId(BlockState state) {
|
public static int getTypeId(BlockState state) {
|
||||||
return getId(state.getType());
|
return getId(state.getType());
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren