mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 15:16:45 +01:00
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:
parent
d6500873cf
commit
c9c669a8c2
@ -759,9 +759,6 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
|
|||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
public void onInteract(final PlayerInteractEvent event) {
|
public void onInteract(final PlayerInteractEvent event) {
|
||||||
Action action = event.getAction();
|
Action action = event.getAction();
|
||||||
if (action == Action.LEFT_CLICK_BLOCK) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final Block block = event.getClickedBlock();
|
final Block block = event.getClickedBlock();
|
||||||
if (block == null) {
|
if (block == null) {
|
||||||
return;
|
return;
|
||||||
@ -780,7 +777,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
|
|||||||
if (Permissions.hasPermission(pp, "plots.admin.interact.unowned")) {
|
if (Permissions.hasPermission(pp, "plots.admin.interact.unowned")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (action != Action.PHYSICAL) {
|
if (action != Action.PHYSICAL && action != Action.LEFT_CLICK_BLOCK) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.interact.unowned");
|
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.interact.unowned");
|
||||||
}
|
}
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
@ -795,7 +792,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
|
|||||||
if (Permissions.hasPermission(pp, "plots.admin.interact.other")) {
|
if (Permissions.hasPermission(pp, "plots.admin.interact.other")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (action != Action.PHYSICAL) {
|
if (action != Action.PHYSICAL && action != Action.LEFT_CLICK_BLOCK) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.interact.other");
|
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.interact.other");
|
||||||
}
|
}
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
@ -808,7 +805,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (MainUtil.isPlotArea(loc)) {
|
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");
|
MainUtil.sendMessage(pp, C.NO_PERMISSION, "plots.admin.interact.road");
|
||||||
}
|
}
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
@ -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");
|
PlotSquared.log(C.PREFIX.s() + "&6Cached a total of: " + UUIDHandler.uuidMap.size() + " UUIDs");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user