mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-26 02:34:42 +02:00
Allow redstone to be used in server plot with redstone.disable-offline
enabled.
Potentially fixes #2613
This commit is contained in:
@ -6,6 +6,7 @@ import com.github.intellectualsites.plotsquared.bukkit.util.BukkitUtil;
|
|||||||
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
|
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
|
||||||
import com.github.intellectualsites.plotsquared.plot.config.Captions;
|
import com.github.intellectualsites.plotsquared.plot.config.Captions;
|
||||||
import com.github.intellectualsites.plotsquared.plot.config.Settings;
|
import com.github.intellectualsites.plotsquared.plot.config.Settings;
|
||||||
|
import com.github.intellectualsites.plotsquared.plot.database.DBFunc;
|
||||||
import com.github.intellectualsites.plotsquared.plot.flag.Flags;
|
import com.github.intellectualsites.plotsquared.plot.flag.Flags;
|
||||||
import com.github.intellectualsites.plotsquared.plot.listener.PlayerBlockEventType;
|
import com.github.intellectualsites.plotsquared.plot.listener.PlayerBlockEventType;
|
||||||
import com.github.intellectualsites.plotsquared.plot.listener.PlotListener;
|
import com.github.intellectualsites.plotsquared.plot.listener.PlotListener;
|
||||||
@ -413,7 +414,8 @@ import java.util.regex.Pattern;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Settings.Redstone.DISABLE_OFFLINE) {
|
if (Settings.Redstone.DISABLE_OFFLINE) {
|
||||||
boolean disable;
|
boolean disable = false;
|
||||||
|
if (!plot.getOwner().equals(DBFunc.SERVER)) {
|
||||||
if (plot.isMerged()) {
|
if (plot.isMerged()) {
|
||||||
disable = true;
|
disable = true;
|
||||||
for (UUID owner : plot.getOwners()) {
|
for (UUID owner : plot.getOwners()) {
|
||||||
@ -425,6 +427,7 @@ import java.util.regex.Pattern;
|
|||||||
} else {
|
} else {
|
||||||
disable = UUIDHandler.getPlayer(plot.guessOwner()) == null;
|
disable = UUIDHandler.getPlayer(plot.guessOwner()) == null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (disable) {
|
if (disable) {
|
||||||
for (UUID trusted : plot.getTrusted()) {
|
for (UUID trusted : plot.getTrusted()) {
|
||||||
if (UUIDHandler.getPlayer(trusted) != null) {
|
if (UUIDHandler.getPlayer(trusted) != null) {
|
||||||
|
Reference in New Issue
Block a user