UUID caching + Interact event

Fixed an issue where UUID handler would not recognize * as the "everyone
uuid" if it took the shortcut for faster UUID caching.

Fixed #301 an issue with fire protection (Bukkit has a strange way of
dealing with this)
This commit is contained in:
boy0001 2015-05-09 13:38:40 +10:00
parent d6500873cf
commit c9c669a8c2
2 changed files with 4 additions and 6 deletions

View File

@ -759,9 +759,6 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onInteract(final PlayerInteractEvent event) {
Action action = event.getAction();
if (action == Action.LEFT_CLICK_BLOCK) {
return;
}
final Block block = event.getClickedBlock();
if (block == null) {
return;
@ -780,7 +777,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
if (Permissions.hasPermission(pp, "plots.admin.interact.unowned")) {
return;
}
if (action != Action.PHYSICAL) {
if (action != Action.PHYSICAL && action != Action.LEFT_CLICK_BLOCK) {
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.interact.unowned");
}
event.setCancelled(true);
@ -795,7 +792,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
if (Permissions.hasPermission(pp, "plots.admin.interact.other")) {
return;
}
if (action != Action.PHYSICAL) {
if (action != Action.PHYSICAL && action != Action.LEFT_CLICK_BLOCK) {
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.interact.other");
}
event.setCancelled(true);
@ -808,7 +805,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
return;
}
if (MainUtil.isPlotArea(loc)) {
if (action != Action.PHYSICAL) {
if (action != Action.PHYSICAL && action != Action.LEFT_CLICK_BLOCK) {
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.interact.road");
}
event.setCancelled(true);

View File

@ -136,6 +136,7 @@ public class UUIDHandler {
}
}
}
add(new StringWrapper("*"), DBFunc.everyone);
PlotSquared.log(C.PREFIX.s() + "&6Cached a total of: " + UUIDHandler.uuidMap.size() + " UUIDs");
return;
}