mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-17 22:32:04 +00:00
Add Settings check before calling WorldEditLink
This commit is contained in:
committed by
BuildTools
parent
f257f2c551
commit
2b449a1f3d
@@ -226,17 +226,19 @@ public class WandSVC implements IrisService {
|
|||||||
return getCuboidFromItem(p.getInventory().getItemInMainHand());
|
return getCuboidFromItem(p.getInventory().getItemInMainHand());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IrisSettings.get().getWorld().worldEditWandCUI) {
|
||||||
Cuboid c = WorldEditLink.getSelection(p);
|
Cuboid c = WorldEditLink.getSelection(p);
|
||||||
|
|
||||||
if (c != null) {
|
if (c != null) {
|
||||||
return new Location[]{c.getLowerNE(), c.getUpperSW()};
|
return new Location[]{c.getLowerNE(), c.getUpperSW()};
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isHoldingWand(Player p) {
|
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) {
|
public static boolean isHoldingIrisWand(Player p) {
|
||||||
|
|||||||
Reference in New Issue
Block a user