mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-01-06 19:09:24 +01:00
misc fixes
This commit is contained in:
parent
bef18aa9f6
commit
b9732ccd1a
@ -8,7 +8,7 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
<artifactId>PlotSquared</artifactId>
|
<artifactId>PlotSquared</artifactId>
|
||||||
<version>2.9.12</version>
|
<version>2.9.13</version>
|
||||||
<name>PlotSquared</name>
|
<name>PlotSquared</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<build>
|
<build>
|
||||||
|
@ -709,7 +709,7 @@ public class PlotSquared {
|
|||||||
final List<String> booleanFlags = Arrays.asList("notify-enter", "notify-leave", "item-drop", "invincible", "instabreak", "drop-protection", "forcefield", "titles", "pve", "pvp", "no-worldedit", "redstone");
|
final List<String> booleanFlags = Arrays.asList("notify-enter", "notify-leave", "item-drop", "invincible", "instabreak", "drop-protection", "forcefield", "titles", "pve", "pvp", "no-worldedit", "redstone");
|
||||||
final List<String> intervalFlags = Arrays.asList("feed", "heal");
|
final List<String> intervalFlags = Arrays.asList("feed", "heal");
|
||||||
final List<String> stringFlags = Arrays.asList("greeting", "farewell");
|
final List<String> stringFlags = Arrays.asList("greeting", "farewell");
|
||||||
final List<String> intFlags = Arrays.asList("entity-cap", "animal-cap", "mob-cap");
|
final List<String> intFlags = Arrays.asList("mob-cap", "animal-cap", "hostile-cap");
|
||||||
for (final String flag : stringFlags) {
|
for (final String flag : stringFlags) {
|
||||||
FlagManager.addFlag(new AbstractFlag(flag));
|
FlagManager.addFlag(new AbstractFlag(flag));
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
package com.intellectualcrafters.plot.commands;
|
package com.intellectualcrafters.plot.commands;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import com.intellectualcrafters.plot.config.C;
|
import com.intellectualcrafters.plot.config.C;
|
||||||
@ -105,9 +106,9 @@ public class Denied extends SubCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
for (UUID uuid : plot.denied) {
|
for (UUID uuid : plot.denied) {
|
||||||
plot.removeDenied(uuid);
|
|
||||||
DBFunc.removeDenied(loc.getWorld(), plot, uuid);
|
DBFunc.removeDenied(loc.getWorld(), plot, uuid);
|
||||||
}
|
}
|
||||||
|
plot.denied = new ArrayList<>();
|
||||||
MainUtil.sendMessage(plr, C.DENIED_REMOVED);
|
MainUtil.sendMessage(plr, C.DENIED_REMOVED);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
package com.intellectualcrafters.plot.commands;
|
package com.intellectualcrafters.plot.commands;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import com.intellectualcrafters.plot.config.C;
|
import com.intellectualcrafters.plot.config.C;
|
||||||
@ -96,9 +97,9 @@ public class Helpers extends SubCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
for (UUID uuid : plot.helpers) {
|
for (UUID uuid : plot.helpers) {
|
||||||
plot.removeHelper(uuid);
|
|
||||||
DBFunc.removeHelper(loc.getWorld(), plot, uuid);
|
DBFunc.removeHelper(loc.getWorld(), plot, uuid);
|
||||||
}
|
}
|
||||||
|
plot.helpers = new ArrayList<>();
|
||||||
MainUtil.sendMessage(plr, C.HELPER_REMOVED);
|
MainUtil.sendMessage(plr, C.HELPER_REMOVED);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
package com.intellectualcrafters.plot.commands;
|
package com.intellectualcrafters.plot.commands;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import com.intellectualcrafters.plot.config.C;
|
import com.intellectualcrafters.plot.config.C;
|
||||||
@ -97,9 +98,9 @@ public class Trusted extends SubCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
for (UUID uuid : plot.trusted) {
|
for (UUID uuid : plot.trusted) {
|
||||||
plot.removeTrusted(uuid);
|
|
||||||
DBFunc.removeTrusted(loc.getWorld(), plot, uuid);
|
DBFunc.removeTrusted(loc.getWorld(), plot, uuid);
|
||||||
}
|
}
|
||||||
|
plot.trusted = new ArrayList<>();
|
||||||
MainUtil.sendMessage(plr, C.TRUSTED_REMOVED);
|
MainUtil.sendMessage(plr, C.TRUSTED_REMOVED);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -809,9 +809,9 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
|
|||||||
}
|
}
|
||||||
Plot plot = MainUtil.getPlot(loc);
|
Plot plot = MainUtil.getPlot(loc);
|
||||||
if (plot != null && plot.owner != null) {
|
if (plot != null && plot.owner != null) {
|
||||||
Flag entityFlag = FlagManager.getPlotFlag(plot, "entity-cap");
|
Flag entityFlag = FlagManager.getPlotFlag(plot, "mob-cap");
|
||||||
Flag animalFlag = FlagManager.getPlotFlag(plot, "animal-cap");
|
Flag animalFlag = FlagManager.getPlotFlag(plot, "animal-cap");
|
||||||
Flag monsterFlag = FlagManager.getPlotFlag(plot, "mob-cap");
|
Flag monsterFlag = FlagManager.getPlotFlag(plot, "hostile-cap");
|
||||||
if (!(entity instanceof Creature)) {
|
if (!(entity instanceof Creature)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ public class WEListener implements Listener {
|
|||||||
HashSet<RegionWrapper> regions = new HashSet<>();
|
HashSet<RegionWrapper> regions = new HashSet<>();
|
||||||
UUID uuid = player.getUUID();
|
UUID uuid = player.getUUID();
|
||||||
for (Plot plot : PlotSquared.getPlots(player.getLocation().getWorld()).values()) {
|
for (Plot plot : PlotSquared.getPlots(player.getLocation().getWorld()).values()) {
|
||||||
if (!plot.settings.getMerged(1) && !plot.settings.getMerged(2)) {
|
if (!plot.settings.getMerged(0) && !plot.settings.getMerged(3)) {
|
||||||
if (plot.isOwner(uuid) || plot.helpers.contains(uuid)) {
|
if (plot.isOwner(uuid) || plot.helpers.contains(uuid)) {
|
||||||
Location pos1 = MainUtil.getPlotBottomLoc(plot.world, plot.id).add(1, 0, 1);
|
Location pos1 = MainUtil.getPlotBottomLoc(plot.world, plot.id).add(1, 0, 1);
|
||||||
Location pos2 = MainUtil.getPlotTopLoc(plot.world, plot.id);
|
Location pos2 = MainUtil.getPlotTopLoc(plot.world, plot.id);
|
||||||
|
Loading…
Reference in New Issue
Block a user