Skip to content

Commit 7ae7a04

Browse files
committed
Make region wand act more like /rg info.
Addresses the part that #1534 and #1817 missed.
1 parent 40adfe9 commit 7ae7a04

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/listener/WorldGuardPlayerListener.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,11 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
258258
}
259259

260260
if (wcfg.useRegions) {
261-
//Block placedIn = block.getRelative(event.getBlockFace());
262-
ApplicableRegionSet set =
263-
WorldGuard.getInstance().getPlatform().getRegionContainer().createQuery().getApplicableRegions(BukkitAdapter.adapt(block.getLocation()));
264-
//ApplicableRegionSet placedInSet = plugin.getRegionContainer().createQuery().getApplicableRegions(placedIn.getLocation());
265261
LocalPlayer localPlayer = getPlugin().wrapPlayer(player);
266262

267263
if (item != null && item.getType().getKey().toString().equals(wcfg.regionWand) && getPlugin().hasPermission(player, "worldguard.region.wand")) {
264+
ApplicableRegionSet set = WorldGuard.getInstance().getPlatform().getRegionContainer().createQuery()
265+
.getApplicableRegions(BukkitAdapter.adapt(block.getLocation()), RegionQuery.QueryOption.SORT);
268266
if (set.size() > 0) {
269267
player.sendMessage(ChatColor.YELLOW + "Can you build? " + (set.testState(localPlayer, Flags.BUILD) ? "Yes" : "No"));
270268

0 commit comments

Comments
 (0)