mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-15 02:59:06 +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
|
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)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user