mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-06-25 22:25:05 +02: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
|
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)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user