9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2026-01-03 22:26:25 +00:00

Add Settings check before calling WorldEditLink

This commit is contained in:
Julian Krings
2023-11-17 11:40:56 +01:00
committed by BuildTools
parent f257f2c551
commit 2b449a1f3d

View File

@@ -226,17 +226,19 @@ public class WandSVC implements IrisService {
return getCuboidFromItem(p.getInventory().getItemInMainHand());
}
Cuboid c = WorldEditLink.getSelection(p);
if (IrisSettings.get().getWorld().worldEditWandCUI) {
Cuboid c = WorldEditLink.getSelection(p);
if (c != null) {
return new Location[]{c.getLowerNE(), c.getUpperSW()};
if (c != null) {
return new Location[]{c.getLowerNE(), c.getUpperSW()};
}
}
return null;
}
public static boolean isHoldingWand(Player p) {
return isHoldingIrisWand(p) || WorldEditLink.getSelection(p) != null;
return isHoldingIrisWand(p) || (IrisSettings.get().getWorld().worldEditWandCUI && WorldEditLink.getSelection(p) != null);
}
public static boolean isHoldingIrisWand(Player p) {