add null check for bungee portal destination
This commit is contained in:
parent
cab45ff7b2
commit
e926515175
|
@ -408,13 +408,15 @@ public class Portal {
|
|||
player.sendMessage(PluginMessages.customPrefix + "\u00A7a Attempting to warp to \u00A7e" + bungeeServer + "\u00A7a.");
|
||||
}
|
||||
|
||||
ByteArrayDataOutput outForList = ByteStreams.newDataOutput();
|
||||
outForList.writeUTF("PortalEnter");
|
||||
outForList.writeUTF(bungeeServer);
|
||||
outForList.writeUTF(player.getUniqueId().toString());
|
||||
outForList.writeUTF(portal.getDestiation());
|
||||
if (portal.getDestiation() != null) {
|
||||
ByteArrayDataOutput outForList = ByteStreams.newDataOutput();
|
||||
outForList.writeUTF("PortalEnter");
|
||||
outForList.writeUTF(bungeeServer);
|
||||
outForList.writeUTF(player.getUniqueId().toString());
|
||||
outForList.writeUTF(portal.getDestiation());
|
||||
|
||||
player.sendPluginMessage(plugin, plugin.channelName, outForList.toByteArray());
|
||||
player.sendPluginMessage(plugin, plugin.channelName, outForList.toByteArray());
|
||||
}
|
||||
|
||||
ByteArrayDataOutput outForSend = ByteStreams.newDataOutput();
|
||||
outForSend.writeUTF("Connect");
|
||||
|
|
Loading…
Reference in New Issue