Prevent NPE

This commit is contained in:
tastybento 2021-10-11 17:43:04 -07:00
parent 907c6b3534
commit 2ffa4c9874

View File

@ -344,7 +344,10 @@ public class Players implements DataObject, MetaDataAble {
*/
public void addToPendingKick(World world)
{
this.pendingKicks.add(Util.getWorld(world).getName());
World w = Util.getWorld(world);
if (w != null) {
this.pendingKicks.add(w.getName());
}
}
/**