+ fix tellraw

This commit is contained in:
坏黑 2019-02-05 23:18:31 +08:00
parent 803542c589
commit 2617069878
2 changed files with 29 additions and 26 deletions

View File

@ -6,7 +6,7 @@
<groupId>me.skymc</groupId> <groupId>me.skymc</groupId>
<artifactId>TabooLib</artifactId> <artifactId>TabooLib</artifactId>
<version>4.7</version> <version>4.71</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

View File

@ -65,6 +65,7 @@ public class InternalTellraw implements AbstractTellraw {
@Override @Override
public ItemStack optimizeShulkerBox(ItemStack item) { public ItemStack optimizeShulkerBox(ItemStack item) {
try {
if (item.getType().name().endsWith("SHULKER_BOX")) { if (item.getType().name().endsWith("SHULKER_BOX")) {
ItemStack itemClone = item.clone(); ItemStack itemClone = item.clone();
BlockStateMeta blockStateMeta = (BlockStateMeta) itemClone.getItemMeta(); BlockStateMeta blockStateMeta = (BlockStateMeta) itemClone.getItemMeta();
@ -94,6 +95,8 @@ public class InternalTellraw implements AbstractTellraw {
itemClone.setItemMeta(blockStateMeta); itemClone.setItemMeta(blockStateMeta);
return itemClone; return itemClone;
} }
} catch (Throwable ignored) {
}
return item; return item;
} }