Fix item giving and animations going to the wrong player

This commit is contained in:
Sam 2017-02-18 10:37:26 +00:00
parent af29135026
commit 15395d1391

View File

@ -62,6 +62,8 @@ public class SpawnModule extends MiniPlugin
Player player = event.getPlayer();
player.teleport(_spawn);
player.setFoodLevel(20);
player.setExhaustion(0);
if (_npcsSpawned)
{
@ -90,7 +92,7 @@ public class SpawnModule extends MiniPlugin
return;
}
PlayerTeleportIntoMapEvent teleportEvent = new PlayerTeleportIntoMapEvent(player, toTeleport);
PlayerTeleportIntoMapEvent teleportEvent = new PlayerTeleportIntoMapEvent(clicker, toTeleport);
UtilServer.CallEvent(teleportEvent);
@ -112,7 +114,7 @@ public class SpawnModule extends MiniPlugin
@Override
public void run()
{
if (animation.displayAsTitle(player))
if (animation.displayAsTitle(clicker))
{
cancel();
}