mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
parent
a0640a1e66
commit
a015039dad
@ -24,8 +24,10 @@ public class EntitySpawnListener implements Listener {
|
|||||||
Plot plot = area.getOwnedPlotAbs(location);
|
Plot plot = area.getOwnedPlotAbs(location);
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
if (!area.MOB_SPAWNING) {
|
if (!area.MOB_SPAWNING) {
|
||||||
|
if (event.getEntityType().isAlive() || !area.MISC_SPAWN_UNOWNED) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Settings.Done.RESTRICT_BUILDING && plot.hasFlag(Flags.DONE)) {
|
if (Settings.Done.RESTRICT_BUILDING && plot.hasFlag(Flags.DONE)) {
|
||||||
|
@ -48,6 +48,7 @@ public abstract class PlotArea {
|
|||||||
public int MAX_PLOT_MEMBERS = 128;
|
public int MAX_PLOT_MEMBERS = 128;
|
||||||
public boolean AUTO_MERGE = false;
|
public boolean AUTO_MERGE = false;
|
||||||
public boolean ALLOW_SIGNS = true;
|
public boolean ALLOW_SIGNS = true;
|
||||||
|
public boolean MISC_SPAWN_UNOWNED = false;
|
||||||
public boolean MOB_SPAWNING = false;
|
public boolean MOB_SPAWNING = false;
|
||||||
public boolean MOB_SPAWNER_SPAWNING = false;
|
public boolean MOB_SPAWNER_SPAWNING = false;
|
||||||
public String PLOT_BIOME = "FOREST";
|
public String PLOT_BIOME = "FOREST";
|
||||||
@ -215,6 +216,7 @@ public abstract class PlotArea {
|
|||||||
this.TYPE = config.getInt("generator.type");
|
this.TYPE = config.getInt("generator.type");
|
||||||
}
|
}
|
||||||
this.MOB_SPAWNING = config.getBoolean("natural_mob_spawning");
|
this.MOB_SPAWNING = config.getBoolean("natural_mob_spawning");
|
||||||
|
this.MISC_SPAWN_UNOWNED = config.getBoolean("misc_spawn_unowned");
|
||||||
this.MOB_SPAWNER_SPAWNING = config.getBoolean("mob_spawner_spawning");
|
this.MOB_SPAWNER_SPAWNING = config.getBoolean("mob_spawner_spawning");
|
||||||
this.AUTO_MERGE = config.getBoolean("plot.auto_merge");
|
this.AUTO_MERGE = config.getBoolean("plot.auto_merge");
|
||||||
this.MAX_PLOT_MEMBERS = config.getInt("limits.max-members");
|
this.MAX_PLOT_MEMBERS = config.getInt("limits.max-members");
|
||||||
@ -314,6 +316,7 @@ public abstract class PlotArea {
|
|||||||
public void saveConfiguration(ConfigurationSection config) {
|
public void saveConfiguration(ConfigurationSection config) {
|
||||||
HashMap<String, Object> options = new HashMap<>();
|
HashMap<String, Object> options = new HashMap<>();
|
||||||
options.put("natural_mob_spawning", this.MOB_SPAWNING);
|
options.put("natural_mob_spawning", this.MOB_SPAWNING);
|
||||||
|
options.put("misc_spawn_unowned", this.MISC_SPAWN_UNOWNED);
|
||||||
options.put("mob_spawner_spawning", this.MOB_SPAWNER_SPAWNING);
|
options.put("mob_spawner_spawning", this.MOB_SPAWNER_SPAWNING);
|
||||||
options.put("plot.auto_merge", this.AUTO_MERGE);
|
options.put("plot.auto_merge", this.AUTO_MERGE);
|
||||||
options.put("plot.create_signs", this.ALLOW_SIGNS);
|
options.put("plot.create_signs", this.ALLOW_SIGNS);
|
||||||
|
Loading…
Reference in New Issue
Block a user