Add null checks for Nullables
This commit is contained in:
parent
b74ead594f
commit
ae40b01161
@ -1454,6 +1454,9 @@ public class Portal {
|
||||
}
|
||||
|
||||
public static String filterName(String input) {
|
||||
if (input == null) {
|
||||
return "";
|
||||
}
|
||||
return input.replaceAll("[\\|:#]", "").trim();
|
||||
}
|
||||
|
||||
|
@ -895,6 +895,8 @@ public class Stargate extends JavaPlugin {
|
||||
Player player = event.getPlayer();
|
||||
Block block = event.getClickedBlock();
|
||||
|
||||
if(block == null) return;
|
||||
|
||||
// Right click
|
||||
if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
||||
if (block.getBlockData() instanceof WallSign) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user