mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 11:55:38 +01:00
Fixes
- 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:
parent
c595b69c3a
commit
26c0e3fa85
@ -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
|
||||
|
@ -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 {
|
||||
* @param uuid
|
||||
*/
|
||||
public boolean removeDenied(final UUID uuid) {
|
||||
if (getDenied().remove(uuid)) {
|
||||
DBFunc.removeDenied(this, uuid);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return PlotHandler.removeDenied(this, uuid);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -995,11 +989,7 @@ public class Plot {
|
||||
* @param uuid
|
||||
*/
|
||||
public boolean removeTrusted(final UUID uuid) {
|
||||
if (getTrusted().remove(uuid)) {
|
||||
DBFunc.removeTrusted(this, uuid);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return PlotHandler.removeTrusted(this, uuid);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1008,11 +998,7 @@ public class Plot {
|
||||
* @param uuid
|
||||
*/
|
||||
public boolean removeMember(final UUID uuid) {
|
||||
if (getMembers().remove(uuid)) {
|
||||
DBFunc.removeMember(this, uuid);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return PlotHandler.removeMember(this, uuid);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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) {
|
||||
|
@ -243,7 +243,6 @@ public abstract class SchematicHandler {
|
||||
case 20:
|
||||
case 21:
|
||||
case 22:
|
||||
case 24:
|
||||
case 30:
|
||||
case 32:
|
||||
case 37:
|
||||
|
@ -625,7 +625,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
||||
event.setFormat(format);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void BlockDestroy(final BlockBreakEvent event) {
|
||||
final Player player = event.getPlayer();
|
||||
final String world = player.getWorld().getName();
|
||||
@ -1040,7 +1040,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||
public void onInteract(final PlayerInteractEvent event) {
|
||||
final Action action = event.getAction();
|
||||
final Block block = event.getClickedBlock();
|
||||
|
@ -31,6 +31,7 @@ import com.intellectualcrafters.plot.util.BlockManager;
|
||||
import com.intellectualcrafters.plot.util.MathMan;
|
||||
import com.intellectualcrafters.plot.util.StringComparison;
|
||||
import com.intellectualcrafters.plot.util.StringMan;
|
||||
import com.intellectualcrafters.plot.util.TaskManager;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
import com.plotsquared.bukkit.object.BukkitPlayer;
|
||||
|
||||
@ -215,10 +216,15 @@ public class BukkitUtil extends BlockManager {
|
||||
block.setTypeIdAndData(Material.WALL_SIGN.getId(), (byte) 2, false);
|
||||
final BlockState blockstate = block.getState();
|
||||
if ((blockstate instanceof Sign)) {
|
||||
for (int i = 0; i < lines.length; i++) {
|
||||
((Sign) blockstate).setLine(i, lines[i]);
|
||||
}
|
||||
((Sign) blockstate).update(true);
|
||||
TaskManager.runTaskLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
for (int i = 0; i < lines.length; i++) {
|
||||
((Sign) blockstate).setLine(i, lines[i]);
|
||||
}
|
||||
((Sign) blockstate).update(true);
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,6 @@ public class SetBlockFast_1_8 extends BukkitSetBlockManager {
|
||||
case 20:
|
||||
case 21:
|
||||
case 22:
|
||||
case 24:
|
||||
case 25:
|
||||
case 30:
|
||||
case 32:
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user