@Command( aliases = {"/fixlighting"}, desc = "Get the light at a position", min = 0, max = 0) @CommandPermissions("worldedit.light.fix") public void fixlighting(Player player, EditSession editSession) throws WorldEditException { FawePlayer fp = FawePlayer.wrap(player); final FaweLocation loc = fp.getLocation(); Region selection = fp.getSelection(); if (selection == null) { final int cx = loc.x >> 4; final int cz = loc.z >> 4; selection = new CuboidRegion( new Vector(cx - 8, 0, cz - 8).multiply(16), new Vector(cx + 8, 0, cz + 8).multiply(16)); } int count = FaweAPI.fixLighting(loc.world, selection, FaweQueue.RelightMode.ALL); BBC.LIGHTING_PROPOGATE_SELECTION.send(fp, count); }
@Command( aliases = {"/removelight", "/removelighting"}, desc = "Removing lighting in a selection", min = 0, max = 0) @CommandPermissions("worldedit.light.remove") public void removelighting(Player player, EditSession editSession) { FawePlayer fp = FawePlayer.wrap(player); final FaweLocation loc = fp.getLocation(); Region selection = fp.getSelection(); if (selection == null) { final int cx = loc.x >> 4; final int cz = loc.z >> 4; selection = new CuboidRegion( new Vector(cx - 8, 0, cz - 8).multiply(16), new Vector(cx + 8, 0, cz + 8).multiply(16)); } int count = FaweAPI.fixLighting(loc.world, selection, FaweQueue.RelightMode.NONE); BBC.UPDATED_LIGHTING_SELECTION.send(fp, count); }