mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-03 09:30:17 +01:00
Remove code smells due to nonNull Spigot settings
Let's see if the nonNull's are really true!
This commit is contained in:
parent
23491d0c4a
commit
1f341f4929
@ -40,9 +40,6 @@ public class JoinLeaveListener implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
||||
public void onPlayerJoin(final PlayerJoinEvent event) {
|
||||
if (event.getPlayer() == null) {
|
||||
return;
|
||||
}
|
||||
User user = User.getInstance(event.getPlayer());
|
||||
if (user.getUniqueId() == null) {
|
||||
return;
|
||||
|
@ -2,7 +2,6 @@ package world.bentobox.bentobox.listeners;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@ -81,11 +80,6 @@ public class StandardSpawnProtectionListener implements Listener {
|
||||
// Not used in island worlds
|
||||
return false;
|
||||
}
|
||||
// Find out what is exploding
|
||||
Entity expl = e.getEntity();
|
||||
if (expl == null) {
|
||||
return false;
|
||||
}
|
||||
e.blockList().removeIf(b -> atSpawn(b.getLocation()));
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user