mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-31 21:48:31 +01:00
Null check in new player teleport, fixes #1212
This commit is contained in:
parent
719539d63b
commit
ef49d92c49
@ -85,7 +85,11 @@ public class EssentialsSpawnPlayerListener extends PlayerListener
|
||||
{
|
||||
try
|
||||
{
|
||||
user.getTeleport().now(spawns.getSpawn(ess.getSettings().getNewbieSpawn()), false, TeleportCause.PLUGIN);
|
||||
Location spawn = spawns.getSpawn(ess.getSettings().getNewbieSpawn());
|
||||
if (spawn != null)
|
||||
{
|
||||
user.getTeleport().now(spawn, false, TeleportCause.PLUGIN);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user