add null check for bungee portal destination

This commit is contained in:
dalbodeule 2020-01-21 20:22:12 +09:00
parent cab45ff7b2
commit e926515175
No known key found for this signature in database
GPG Key ID: 2FCD836D79E6D226
1 changed files with 8 additions and 6 deletions

View File

@ -408,6 +408,7 @@ public class Portal {
player.sendMessage(PluginMessages.customPrefix + "\u00A7a Attempting to warp to \u00A7e" + bungeeServer + "\u00A7a.");
}
if (portal.getDestiation() != null) {
ByteArrayDataOutput outForList = ByteStreams.newDataOutput();
outForList.writeUTF("PortalEnter");
outForList.writeUTF(bungeeServer);
@ -415,6 +416,7 @@ public class Portal {
outForList.writeUTF(portal.getDestiation());
player.sendPluginMessage(plugin, plugin.channelName, outForList.toByteArray());
}
ByteArrayDataOutput outForSend = ByteStreams.newDataOutput();
outForSend.writeUTF("Connect");