also check for metadata in anonymous task in plaayerjoinevent
This commit is contained in:
parent
e27bbcabe7
commit
4a9d62c78f
|
|
@ -811,7 +811,7 @@ class PlayerEventHandler implements Listener
|
|||
@Override
|
||||
public void run()
|
||||
{
|
||||
if (player.getPortalCooldown() > 8)
|
||||
if (player.getPortalCooldown() > 8 && player.hasMetadata("GP_PORTALRESCUE"))
|
||||
{
|
||||
instance.AddLogEntry("Rescued " + player.getName() + " from a nether portal.\nTeleported from " + player.getLocation().toString() + " to " + ((Location)player.getMetadata("GP_PORTALRESCUE").get(0).value()).toString(), CustomLogEntryTypes.Debug);
|
||||
player.teleport((Location)player.getMetadata("GP_PORTALRESCUE").get(0).value());
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user