mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2025-02-28 01:41:19 +01:00
Fix NullPointerException
This commit is contained in:
parent
ae7591f952
commit
243bf9ea0a
@ -31,6 +31,9 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
}
|
||||
|
||||
DataWatcherPacketBuilder<T> setCustomName(String customName) {
|
||||
if (customName == null) {
|
||||
customName = "";
|
||||
}
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.CUSTOM_NAME, Strings.truncate(customName, 300));
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.CUSTOM_NAME_VISIBILITY, !Strings.isEmpty(customName));
|
||||
return this;
|
||||
|
@ -30,6 +30,9 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
}
|
||||
|
||||
DataWatcherPacketBuilder<T> setCustomName(String customName) {
|
||||
if (customName == null) {
|
||||
customName = "";
|
||||
}
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.CUSTOM_NAME, Strings.truncate(customName, 300));
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.CUSTOM_NAME_VISIBILITY, !Strings.isEmpty(customName));
|
||||
return this;
|
||||
|
@ -30,6 +30,9 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
}
|
||||
|
||||
DataWatcherPacketBuilder<T> setCustomName(String customName) {
|
||||
if (customName == null) {
|
||||
customName = "";
|
||||
}
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.CUSTOM_NAME, Strings.truncate(customName, 300));
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.CUSTOM_NAME_VISIBILITY, !Strings.isEmpty(customName));
|
||||
return this;
|
||||
|
@ -30,6 +30,9 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
}
|
||||
|
||||
DataWatcherPacketBuilder<T> setCustomName(String customName) {
|
||||
if (customName == null) {
|
||||
customName = "";
|
||||
}
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.CUSTOM_NAME, Strings.truncate(customName, 300));
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.CUSTOM_NAME_VISIBILITY, Strings.isEmpty(customName) ? (byte) 0 : (byte) 1);
|
||||
return this;
|
||||
|
@ -31,6 +31,9 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
}
|
||||
|
||||
DataWatcherPacketBuilder<T> setCustomName(String customName) {
|
||||
if (customName == null) {
|
||||
customName = "";
|
||||
}
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.CUSTOM_NAME, Strings.truncate(customName, 300));
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.CUSTOM_NAME_VISIBILITY, !Strings.isEmpty(customName));
|
||||
return this;
|
||||
|
Loading…
Reference in New Issue
Block a user