Directly teleport Player in EssentialsSpawn when joining.

This commit is contained in:
Ali Moghnieh 2016-07-11 15:12:47 +01:00
parent 2a2aef53fb
commit 04f14285e7
No known key found for this signature in database
GPG Key ID: F09D3A1BAF2E6D70

View File

@ -80,7 +80,8 @@ public class EssentialsSpawnPlayerListener implements Listener {
public void run() {
Location spawn = spawns.getSpawn(user.getGroup());
try {
user.getTeleport().now(spawn, false, TeleportCause.PLUGIN);
// We don't use user.getTeleport() because it stores last location, which is unwanted in this case.
user.getBase().teleport(spawn, TeleportCause.PLUGIN);
} catch (Exception e) {
ess.showError(user.getSource(), e, "spawn-on-join");
}