mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-11-28 12:55:34 +01:00
Removed deprecated item durability and art ID method usage
This commit is contained in:
parent
40ee11f644
commit
dad51fc900
@ -115,7 +115,7 @@ public class ContainerRollback extends Queue {
|
||||
action = 1;
|
||||
}
|
||||
|
||||
ItemStack itemstack = new ItemStack(rowType, rowAmount, (short) rowData);
|
||||
ItemStack itemstack = new ItemStack(rowType, rowAmount);
|
||||
Object[] populatedStack = Rollback.populateItemStack(itemstack, rowMetadata);
|
||||
int slot = (Integer) populatedStack[0];
|
||||
String faceData = (String) populatedStack[1];
|
||||
|
@ -1091,7 +1091,7 @@ public class Rollback extends Queue {
|
||||
}
|
||||
|
||||
int action = rollbackType == 0 ? (inventoryAction ^ 1) : inventoryAction;
|
||||
ItemStack itemstack = new ItemStack(inventoryItem, rowAmount, (short) rowData);
|
||||
ItemStack itemstack = new ItemStack(inventoryItem, rowAmount);
|
||||
Object[] populatedStack = populateItemStack(itemstack, rowMetadata);
|
||||
if (rowAction == ItemLogger.ITEM_REMOVE_ENDER || rowAction == ItemLogger.ITEM_ADD_ENDER) {
|
||||
modifyContainerItems(containerType, player.getEnderChest(), (Integer) populatedStack[0], ((ItemStack) populatedStack[2]).clone(), action ^ 1);
|
||||
@ -1108,7 +1108,7 @@ public class Rollback extends Queue {
|
||||
}
|
||||
|
||||
if ((rollbackType == 0 && rowRolledBack == 0) || (rollbackType == 1 && rowRolledBack == 1)) {
|
||||
ItemStack itemstack = new ItemStack(rowType, rowAmount, (short) rowData);
|
||||
ItemStack itemstack = new ItemStack(rowType, rowAmount);
|
||||
Object[] populatedStack = populateItemStack(itemstack, rowMetadata);
|
||||
String faceData = (String) populatedStack[1];
|
||||
|
||||
|
@ -182,7 +182,7 @@ public class ContainerLogger extends Queue {
|
||||
int y = location.getBlockY();
|
||||
int z = location.getBlockZ();
|
||||
int typeId = Util.getBlockId(item.getType().name(), true);
|
||||
int data = item.getDurability();
|
||||
int data = 0;
|
||||
int amount = item.getAmount();
|
||||
ContainerStatement.insert(preparedStmt, batchCount, time, userId, wid, x, y, z, typeId, data, amount, metadata, action, 0);
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import org.bukkit.Art;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
@ -628,10 +627,6 @@ public class Util extends Queue {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static int getArtId(Art art) {
|
||||
return art.getId();
|
||||
}
|
||||
|
||||
public static int getArtId(String name, boolean internal) {
|
||||
int id = -1;
|
||||
name = name.toLowerCase(Locale.ROOT).trim();
|
||||
@ -1175,10 +1170,6 @@ public class Util extends Queue {
|
||||
return new ItemStack(type, amount);
|
||||
}
|
||||
|
||||
public static ItemStack newItemStack(Material type, int amount, short data) {
|
||||
return new ItemStack(type, amount, data);
|
||||
}
|
||||
|
||||
public static boolean isSpigot() {
|
||||
try {
|
||||
Class.forName("org.spigotmc.SpigotConfig");
|
||||
|
Loading…
Reference in New Issue
Block a user