mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-15 11:54:43 +02:00
Compare commits
8 Commits
7.3.0
...
fix/admin-
Author | SHA1 | Date | |
---|---|---|---|
ad24287619 | |||
b64db18f7d | |||
ead7acdd76 | |||
1991142d48 | |||
63ae11b3d3 | |||
86fe3c6846 | |||
a90e179338 | |||
a6ae287908 |
@ -67,6 +67,7 @@ tasks.named<ShadowJar>("shadowJar") {
|
|||||||
exclude(dependency("org.checkerframework:"))
|
exclude(dependency("org.checkerframework:"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
relocate("net.kyori.option", "com.plotsquared.core.configuration.option")
|
||||||
relocate("net.kyori.adventure", "com.plotsquared.core.configuration.adventure")
|
relocate("net.kyori.adventure", "com.plotsquared.core.configuration.adventure")
|
||||||
relocate("net.kyori.examination", "com.plotsquared.core.configuration.examination")
|
relocate("net.kyori.examination", "com.plotsquared.core.configuration.examination")
|
||||||
relocate("io.papermc.lib", "com.plotsquared.bukkit.paperlib")
|
relocate("io.papermc.lib", "com.plotsquared.bukkit.paperlib")
|
||||||
|
@ -261,7 +261,10 @@ public class BlockEventListener implements Listener {
|
|||||||
final BlockFace facing = piston.getFacing();
|
final BlockFace facing = piston.getFacing();
|
||||||
location = location.add(facing.getModX(), facing.getModY(), facing.getModZ());
|
location = location.add(facing.getModX(), facing.getModY(), facing.getModZ());
|
||||||
Plot newPlot = area.getOwnedPlotAbs(location);
|
Plot newPlot = area.getOwnedPlotAbs(location);
|
||||||
if (!plot.equals(newPlot)) {
|
if (plot.equals(newPlot)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!plot.isMerged() || !plot.getConnectedPlots().contains(newPlot)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
plot.debug("Prevented piston update because of invalid edge piston detection");
|
plot.debug("Prevented piston update because of invalid edge piston detection");
|
||||||
}
|
}
|
||||||
|
@ -252,7 +252,8 @@ public class PlayerEventListener implements Listener {
|
|||||||
}
|
}
|
||||||
Plot plot = location.getOwnedPlot();
|
Plot plot = location.getOwnedPlot();
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
if (PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, EditSignFlag.class, false)) {
|
if (PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, EditSignFlag.class, false)
|
||||||
|
&& !event.getPlayer().hasPermission(Permission.PERMISSION_ADMIN_INTERACT_ROAD.toString())) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -260,7 +261,8 @@ public class PlayerEventListener implements Listener {
|
|||||||
if (plot.isAdded(event.getPlayer().getUniqueId())) {
|
if (plot.isAdded(event.getPlayer().getUniqueId())) {
|
||||||
return; // allow for added players
|
return; // allow for added players
|
||||||
}
|
}
|
||||||
if (!plot.getFlag(EditSignFlag.class)) {
|
if (!plot.getFlag(EditSignFlag.class)
|
||||||
|
&& !event.getPlayer().hasPermission(Permission.PERMISSION_ADMIN_INTERACT_OTHER.toString())) {
|
||||||
plot.debug(event.getPlayer().getName() + " could not color the sign because of edit-sign = false");
|
plot.debug(event.getPlayer().getName() + " could not color the sign because of edit-sign = false");
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ package com.plotsquared.bukkit.listener;
|
|||||||
|
|
||||||
import com.plotsquared.bukkit.util.BukkitUtil;
|
import com.plotsquared.bukkit.util.BukkitUtil;
|
||||||
import com.plotsquared.core.location.Location;
|
import com.plotsquared.core.location.Location;
|
||||||
|
import com.plotsquared.core.permissions.Permission;
|
||||||
import com.plotsquared.core.plot.Plot;
|
import com.plotsquared.core.plot.Plot;
|
||||||
import com.plotsquared.core.plot.PlotArea;
|
import com.plotsquared.core.plot.PlotArea;
|
||||||
import com.plotsquared.core.plot.flag.implementations.EditSignFlag;
|
import com.plotsquared.core.plot.flag.implementations.EditSignFlag;
|
||||||
@ -46,7 +47,8 @@ public class PlayerEventListener1201 implements Listener {
|
|||||||
}
|
}
|
||||||
Plot plot = location.getOwnedPlot();
|
Plot plot = location.getOwnedPlot();
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
if (PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, EditSignFlag.class, false)) {
|
if (PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, EditSignFlag.class, false)
|
||||||
|
&& !event.getPlayer().hasPermission(Permission.PERMISSION_ADMIN_INTERACT_ROAD.toString())) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -54,7 +56,8 @@ public class PlayerEventListener1201 implements Listener {
|
|||||||
if (plot.isAdded(event.getPlayer().getUniqueId())) {
|
if (plot.isAdded(event.getPlayer().getUniqueId())) {
|
||||||
return; // allow for added players
|
return; // allow for added players
|
||||||
}
|
}
|
||||||
if (!plot.getFlag(EditSignFlag.class)) {
|
if (!plot.getFlag(EditSignFlag.class)
|
||||||
|
&& !event.getPlayer().hasPermission(Permission.PERMISSION_ADMIN_INTERACT_OTHER.toString())) {
|
||||||
plot.debug(event.getPlayer().getName() + " could not edit the sign because of edit-sign = false");
|
plot.debug(event.getPlayer().getName() + " could not edit the sign because of edit-sign = false");
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
@ -364,7 +364,6 @@ public class PlotListener {
|
|||||||
public boolean plotExit(final PlotPlayer<?> player, Plot plot) {
|
public boolean plotExit(final PlotPlayer<?> player, Plot plot) {
|
||||||
try (final MetaDataAccess<Plot> lastPlot = player.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_LAST_PLOT)) {
|
try (final MetaDataAccess<Plot> lastPlot = player.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_LAST_PLOT)) {
|
||||||
final Plot previous = lastPlot.remove();
|
final Plot previous = lastPlot.remove();
|
||||||
this.eventDispatcher.callLeave(player, plot);
|
|
||||||
|
|
||||||
List<StatusEffect> effects = playerEffects.remove(player.getUUID());
|
List<StatusEffect> effects = playerEffects.remove(player.getUUID());
|
||||||
if (effects != null) {
|
if (effects != null) {
|
||||||
@ -467,6 +466,8 @@ public class PlotListener {
|
|||||||
feedRunnable.remove(player.getUUID());
|
feedRunnable.remove(player.getUUID());
|
||||||
healRunnable.remove(player.getUUID());
|
healRunnable.remove(player.getUUID());
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
this.eventDispatcher.callLeave(player, plot);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "com.intellectualsites.plotsquared"
|
group = "com.intellectualsites.plotsquared"
|
||||||
version = "7.3.0"
|
version = "7.3.2-SNAPSHOT"
|
||||||
|
|
||||||
if (!File("$rootDir/.git").exists()) {
|
if (!File("$rootDir/.git").exists()) {
|
||||||
logger.lifecycle("""
|
logger.lifecycle("""
|
||||||
|
Reference in New Issue
Block a user