Fix item giving and animations going to the wrong player
This commit is contained in:
parent
af29135026
commit
15395d1391
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user