mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-21 01:01:35 +08:00
Directly teleport Player in EssentialsSpawn when joining.
This commit is contained in:
parent
2a2aef53fb
commit
04f14285e7
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user