Fixed inventory rollbacks not always returning correct item for placed blocks

This commit is contained in:
Intelli 2022-02-22 21:15:45 -07:00
parent c95bf3cc30
commit 4445c3c4a7
3 changed files with 16 additions and 2 deletions

View file

@ -1105,6 +1105,18 @@ public class Util extends Queue {
Chat.sendComponent(consoleSender, Color.RESET + "[CoreProtect] " + string + Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_POPUP + "| | " + Chat.COMPONENT_TAG_CLOSE);
}
public static Material itemFilter(Material material) {
if (material == null) {
return material;
}
if (!material.isItem() && material.name().contains("WALL_")) {
material = Material.valueOf(material.name().replace("WALL_", ""));
}
return material;
}
public static String nameFilter(String name, int data) {
if (name.equals("stone")) {
switch (data) {