- Fix sign lines on claim not updating
- Fix plot tier removing for merged plots
- Fix stair rotation for id=24
- Fix interaction to have a lower priority than chestshop (why doesn't
chestshop use monitor priority?)
This commit is contained in:
Jesse Boyd
2015-10-18 22:20:12 +11:00
parent c595b69c3a
commit 26c0e3fa85
8 changed files with 54 additions and 29 deletions

View File

@ -20,13 +20,10 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.PlotWorld;
import com.intellectualcrafters.plot.util.EconHandler;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.Permissions;
import com.plotsquared.general.commands.CommandDeclaration;
@ -34,7 +31,12 @@ import com.plotsquared.general.commands.CommandDeclaration;
/**
* Unclaiming a plot makes no changes to the terrain or plot border and only removes the owner and should be regarded as an admin command.
*/
@CommandDeclaration(command = "unclaim", usage = "/plot unclaim", requiredType = RequiredType.NONE, description = "Unclaim a plot (admin command)", category = CommandCategory.ACTIONS)
@CommandDeclaration(
command = "unclaim",
usage = "/plot unclaim",
requiredType = RequiredType.NONE,
description = "Unclaim a plot (admin command/does not clear plot)",
category = CommandCategory.ACTIONS)
public class Unclaim extends SubCommand {
@Override

View File

@ -22,7 +22,6 @@ package com.intellectualcrafters.plot.object;
import java.io.File;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
@ -39,7 +38,6 @@ import com.intellectualcrafters.plot.config.Settings;
import com.intellectualcrafters.plot.database.DBFunc;
import com.intellectualcrafters.plot.flag.Flag;
import com.intellectualcrafters.plot.flag.FlagManager;
import com.intellectualcrafters.plot.object.comment.PlotComment;
import com.intellectualcrafters.plot.util.BO3Handler;
import com.intellectualcrafters.plot.util.BlockManager;
import com.intellectualcrafters.plot.util.ChunkManager;
@ -982,11 +980,7 @@ public class Plot {
* Remove a denied player (use DBFunc as well)
*
* @param uuid
*/
public boolean removeDenied(final UUID uuid) {
if (getDenied().remove(uuid)) {
DBFunc.removeDenied(this, uuid);
return true;
*/
public boolean removeDenied(final UUID uuid) {
return PlotHandler.removeDenied(this, uuid);
}
@ -995,11 +989,7 @@ public class Plot {
* Remove a helper (use DBFunc as well)
*
* @param uuid
*/
public boolean removeTrusted(final UUID uuid) {
if (getTrusted().remove(uuid)) {
DBFunc.removeTrusted(this, uuid);
return true;
*/
public boolean removeTrusted(final UUID uuid) {
return PlotHandler.removeTrusted(this, uuid);
}
@ -1008,11 +998,7 @@ public class Plot {
* Remove a trusted user (use DBFunc as well)
*
* @param uuid
*/
public boolean removeMember(final UUID uuid) {
if (getMembers().remove(uuid)) {
DBFunc.removeMember(this, uuid);
return true;
*/
public boolean removeMember(final UUID uuid) {
return PlotHandler.removeMember(this, uuid);
}

View File

@ -198,6 +198,39 @@ public class PlotHandler {
}
}
}
public static boolean removeDenied(Plot plot, UUID uuid) {
for (Plot current : MainUtil.getConnectedPlots(plot)) {
if (current.getDenied().remove(uuid)) {
DBFunc.removeDenied(current, uuid);
} else {
return false;
}
}
return true;
}
public static boolean removeMember(Plot plot, UUID uuid) {
for (Plot current : MainUtil.getConnectedPlots(plot)) {
if (current.getMembers().remove(uuid)) {
DBFunc.removeMember(current, uuid);
} else {
return false;
}
}
return true;
}
public static boolean removeTrusted(Plot plot, UUID uuid) {
for (Plot current : MainUtil.getConnectedPlots(plot)) {
if (current.getTrusted().remove(uuid)) {
DBFunc.removeTrusted(current, uuid);
} else {
return false;
}
}
return true;
}
public static boolean unclaim(Plot plot) {
if (plot.owner == null) {

View File

@ -243,7 +243,6 @@ public abstract class SchematicHandler {
case 20:
case 21:
case 22:
case 24:
case 30:
case 32:
case 37: