mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-13 10:04:51 +02:00
Null check in new player teleport, fixes #1212
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user