Use guava's Optional for data watcher creation

This commit is contained in:
Eric 2019-06-22 17:25:58 +02:00
parent 0617d3bc1b
commit da27a4e846

View File

@ -437,7 +437,7 @@ public class Utils {
if (majorVersion < 13) register.invoke(dataWatcher, fCustomName.get(null), customName != null ? customName : ""); if (majorVersion < 13) register.invoke(dataWatcher, fCustomName.get(null), customName != null ? customName : "");
if (nmsItemStack != null) { if (nmsItemStack != null) {
register.invoke(dataWatcher, fItem.get(null), majorVersion < 11 ? Optional.of(nmsItemStack) : nmsItemStack); register.invoke(dataWatcher, fItem.get(null), majorVersion < 11 ? com.google.common.base.Optional.of(nmsItemStack) : nmsItemStack);
} else { } else {
register.invoke(dataWatcher, fArmorStandFlags.get(null), armorStandFlags); register.invoke(dataWatcher, fArmorStandFlags.get(null), armorStandFlags);
} }