mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-24 13:52:36 +02: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() {
|
public void run() {
|
||||||
Location spawn = spawns.getSpawn(user.getGroup());
|
Location spawn = spawns.getSpawn(user.getGroup());
|
||||||
try {
|
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) {
|
} catch (Exception e) {
|
||||||
ess.showError(user.getSource(), e, "spawn-on-join");
|
ess.showError(user.getSource(), e, "spawn-on-join");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user