mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-30 14:43:49 +01:00
Require owner to be non-null. It should never be null
This commit is contained in:
parent
37e7846908
commit
1a802a7510
@ -36,7 +36,7 @@ public class CommandCycleClick implements ClickHandler {
|
|||||||
// Get the user's island for the game world
|
// Get the user's island for the game world
|
||||||
World world = panel.getWorld().orElse(user.getWorld());
|
World world = panel.getWorld().orElse(user.getWorld());
|
||||||
Island island = plugin.getIslands().getIsland(world, user.getUniqueId());
|
Island island = plugin.getIslands().getIsland(world, user.getUniqueId());
|
||||||
if (island != null && island.getOwner().equals(user.getUniqueId())) {
|
if (island != null && island.getOwner() != null && island.getOwner().equals(user.getUniqueId())) {
|
||||||
RanksManager rm = plugin.getRanksManager();
|
RanksManager rm = plugin.getRanksManager();
|
||||||
int currentRank = island.getRankCommand(command);
|
int currentRank = island.getRankCommand(command);
|
||||||
if (click.equals(ClickType.LEFT)) {
|
if (click.equals(ClickType.LEFT)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user