mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Fix the actual issue and remove whatever junk from the previous commit
This commit is contained in:
parent
ac5cdfae64
commit
72291b09f2
@ -2803,6 +2803,7 @@ import org.bukkit.util.Vector;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Entity victim = event.getEntity();
|
Entity victim = event.getEntity();
|
||||||
|
/*
|
||||||
if (victim.getType().equals(EntityType.ITEM_FRAME)) {
|
if (victim.getType().equals(EntityType.ITEM_FRAME)) {
|
||||||
Plot plot = BukkitUtil.getLocation(victim).getPlot();
|
Plot plot = BukkitUtil.getLocation(victim).getPlot();
|
||||||
if (plot != null && !plot.isAdded(damager.getUniqueId())) {
|
if (plot != null && !plot.isAdded(damager.getUniqueId())) {
|
||||||
@ -2810,6 +2811,7 @@ import org.bukkit.util.Vector;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if (!entityDamage(damager, victim, event.getCause())) {
|
if (!entityDamage(damager, victim, event.getCause())) {
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
if (victim instanceof Ageable) {
|
if (victim instanceof Ageable) {
|
||||||
@ -2918,6 +2920,12 @@ import org.bukkit.util.Vector;
|
|||||||
if (victim instanceof Hanging) { // hanging
|
if (victim instanceof Hanging) { // hanging
|
||||||
if (plot != null && (plot.getFlag(Flags.HANGING_BREAK, false) || plot
|
if (plot != null && (plot.getFlag(Flags.HANGING_BREAK, false) || plot
|
||||||
.isAdded(plotPlayer.getUUID()))) {
|
.isAdded(plotPlayer.getUUID()))) {
|
||||||
|
if (Settings.Done.RESTRICT_BUILDING && plot.getFlags().containsKey(Flags.DONE)) {
|
||||||
|
if (!Permissions.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||||
|
MainUtil.sendMessage(plotPlayer, Captions.NO_PERMISSION_EVENT, Captions.PERMISSION_ADMIN_BUILD_OTHER);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!Permissions.hasPermission(plotPlayer, "plots.admin.destroy." + stub)) {
|
if (!Permissions.hasPermission(plotPlayer, "plots.admin.destroy." + stub)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user