mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-02 08:50:17 +01:00
Minor fixes
Update message color CME on plot action Creative middle click banner/head
This commit is contained in:
parent
6e9c103b55
commit
a752780eeb
@ -46,7 +46,7 @@ public class PlayerEvents_1_8 extends PlotListener implements Listener {
|
||||
Player player = (Player) entity;
|
||||
PlayerInventory inv = player.getInventory();
|
||||
int slot = inv.getHeldItemSlot();
|
||||
if ((slot != event.getSlot()) || (slot > 8) || !event.getEventName().equals("InventoryCreativeEvent")) {
|
||||
if ((slot > 8) || !event.getEventName().equals("InventoryCreativeEvent")) {
|
||||
return;
|
||||
}
|
||||
ItemStack current = inv.getItemInHand();
|
||||
@ -95,7 +95,6 @@ public class PlayerEvents_1_8 extends PlotListener implements Listener {
|
||||
default:
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
Location l = BukkitUtil.getLocation(state.getLocation());
|
||||
PlotArea area = l.getPlotArea();
|
||||
|
@ -2304,10 +2304,11 @@ public class Plot {
|
||||
return connected_cache;
|
||||
}
|
||||
regions_cache = null;
|
||||
connected_cache = new HashSet<>();
|
||||
|
||||
HashSet<Plot> tmpSet = new HashSet<>();
|
||||
ArrayDeque<Plot> frontier = new ArrayDeque<>();
|
||||
HashSet<Object> queuecache = new HashSet<>();
|
||||
connected_cache.add(this);
|
||||
tmpSet.add(this);
|
||||
Plot tmp;
|
||||
if (merged[0]) {
|
||||
tmp = this.area.getPlotAbs(this.id.getRelative(0));
|
||||
@ -2381,39 +2382,40 @@ public class Plot {
|
||||
PS.debug("Ignoring invalid merged plot: " + current + " | " + current.owner);
|
||||
continue;
|
||||
}
|
||||
connected_cache.add(current);
|
||||
tmpSet.add(current);
|
||||
queuecache.remove(current);
|
||||
merged = current.getMerged();
|
||||
if (merged[0]) {
|
||||
tmp = current.area.getPlotAbs(current.id.getRelative(0));
|
||||
if (tmp != null && !queuecache.contains(tmp) && !connected_cache.contains(tmp)) {
|
||||
if (tmp != null && !queuecache.contains(tmp) && !tmpSet.contains(tmp)) {
|
||||
queuecache.add(tmp);
|
||||
frontier.add(tmp);
|
||||
}
|
||||
}
|
||||
if (merged[1]) {
|
||||
tmp = current.area.getPlotAbs(current.id.getRelative(1));
|
||||
if (tmp != null && !queuecache.contains(tmp) && !connected_cache.contains(tmp)) {
|
||||
if (tmp != null && !queuecache.contains(tmp) && !tmpSet.contains(tmp)) {
|
||||
queuecache.add(tmp);
|
||||
frontier.add(tmp);
|
||||
}
|
||||
}
|
||||
if (merged[2]) {
|
||||
tmp = current.area.getPlotAbs(current.id.getRelative(2));
|
||||
if (tmp != null && !queuecache.contains(tmp) && !connected_cache.contains(tmp)) {
|
||||
if (tmp != null && !queuecache.contains(tmp) && !tmpSet.contains(tmp)) {
|
||||
queuecache.add(tmp);
|
||||
frontier.add(tmp);
|
||||
}
|
||||
}
|
||||
if (merged[3]) {
|
||||
tmp = current.area.getPlotAbs(current.id.getRelative(3));
|
||||
if (tmp != null && !queuecache.contains(tmp) && !connected_cache.contains(tmp)) {
|
||||
if (tmp != null && !queuecache.contains(tmp) && !tmpSet.contains(tmp)) {
|
||||
queuecache.add(tmp);
|
||||
frontier.add(tmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
return connected_cache;
|
||||
connected_cache = tmpSet;
|
||||
return tmpSet;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -18,7 +18,6 @@ import com.intellectualcrafters.plot.object.RegionWrapper;
|
||||
import com.intellectualcrafters.plot.object.RunnableVal;
|
||||
import com.intellectualcrafters.plot.object.stream.AbstractDelegateOutputStream;
|
||||
import com.intellectualcrafters.plot.util.expiry.ExpireManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
@ -115,7 +114,7 @@ public class MainUtil {
|
||||
public static void sendAdmin(final String s) {
|
||||
for (final PlotPlayer player : UUIDHandler.getPlayers().values()) {
|
||||
if (player.hasPermission(C.PERMISSION_ADMIN.s())) {
|
||||
player.sendMessage(s);
|
||||
player.sendMessage(C.color(s));
|
||||
}
|
||||
}
|
||||
PS.debug(s);
|
||||
|
Loading…
Reference in New Issue
Block a user