mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fixes #1931
This commit is contained in:
parent
9fe1e53d9d
commit
ef83b5a1b7
@ -1,5 +1,7 @@
|
|||||||
package com.plotsquared.bukkit;
|
package com.plotsquared.bukkit;
|
||||||
|
|
||||||
|
import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass;
|
||||||
|
|
||||||
import com.intellectualcrafters.configuration.ConfigurationSection;
|
import com.intellectualcrafters.configuration.ConfigurationSection;
|
||||||
import com.intellectualcrafters.plot.IPlotMain;
|
import com.intellectualcrafters.plot.IPlotMain;
|
||||||
import com.intellectualcrafters.plot.PS;
|
import com.intellectualcrafters.plot.PS;
|
||||||
@ -10,32 +12,94 @@ import com.intellectualcrafters.plot.generator.GeneratorWrapper;
|
|||||||
import com.intellectualcrafters.plot.generator.HybridGen;
|
import com.intellectualcrafters.plot.generator.HybridGen;
|
||||||
import com.intellectualcrafters.plot.generator.HybridUtils;
|
import com.intellectualcrafters.plot.generator.HybridUtils;
|
||||||
import com.intellectualcrafters.plot.generator.IndependentPlotGenerator;
|
import com.intellectualcrafters.plot.generator.IndependentPlotGenerator;
|
||||||
import com.intellectualcrafters.plot.object.*;
|
import com.intellectualcrafters.plot.object.Plot;
|
||||||
|
import com.intellectualcrafters.plot.object.PlotArea;
|
||||||
|
import com.intellectualcrafters.plot.object.PlotId;
|
||||||
|
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||||
|
import com.intellectualcrafters.plot.object.RunnableVal;
|
||||||
|
import com.intellectualcrafters.plot.object.SetupObject;
|
||||||
import com.intellectualcrafters.plot.object.chat.PlainChatManager;
|
import com.intellectualcrafters.plot.object.chat.PlainChatManager;
|
||||||
import com.intellectualcrafters.plot.object.worlds.PlotAreaManager;
|
import com.intellectualcrafters.plot.object.worlds.PlotAreaManager;
|
||||||
import com.intellectualcrafters.plot.object.worlds.SinglePlotArea;
|
import com.intellectualcrafters.plot.object.worlds.SinglePlotArea;
|
||||||
import com.intellectualcrafters.plot.object.worlds.SinglePlotAreaManager;
|
import com.intellectualcrafters.plot.object.worlds.SinglePlotAreaManager;
|
||||||
import com.intellectualcrafters.plot.object.worlds.SingleWorldGenerator;
|
import com.intellectualcrafters.plot.object.worlds.SingleWorldGenerator;
|
||||||
import com.intellectualcrafters.plot.util.*;
|
import com.intellectualcrafters.plot.util.AbstractTitle;
|
||||||
|
import com.intellectualcrafters.plot.util.ChatManager;
|
||||||
|
import com.intellectualcrafters.plot.util.ChunkManager;
|
||||||
|
import com.intellectualcrafters.plot.util.ConsoleColors;
|
||||||
|
import com.intellectualcrafters.plot.util.EconHandler;
|
||||||
|
import com.intellectualcrafters.plot.util.EventUtil;
|
||||||
|
import com.intellectualcrafters.plot.util.InventoryUtil;
|
||||||
|
import com.intellectualcrafters.plot.util.MainUtil;
|
||||||
|
import com.intellectualcrafters.plot.util.ReflectionUtils;
|
||||||
|
import com.intellectualcrafters.plot.util.SchematicHandler;
|
||||||
|
import com.intellectualcrafters.plot.util.SetupUtils;
|
||||||
|
import com.intellectualcrafters.plot.util.StringMan;
|
||||||
|
import com.intellectualcrafters.plot.util.TaskManager;
|
||||||
|
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||||
|
import com.intellectualcrafters.plot.util.UUIDHandlerImplementation;
|
||||||
|
import com.intellectualcrafters.plot.util.WorldUtil;
|
||||||
import com.intellectualcrafters.plot.util.block.QueueProvider;
|
import com.intellectualcrafters.plot.util.block.QueueProvider;
|
||||||
import com.intellectualcrafters.plot.uuid.UUIDWrapper;
|
import com.intellectualcrafters.plot.uuid.UUIDWrapper;
|
||||||
import com.plotsquared.bukkit.database.plotme.ClassicPlotMeConnector;
|
import com.plotsquared.bukkit.database.plotme.ClassicPlotMeConnector;
|
||||||
import com.plotsquared.bukkit.database.plotme.LikePlotMeConverter;
|
import com.plotsquared.bukkit.database.plotme.LikePlotMeConverter;
|
||||||
import com.plotsquared.bukkit.database.plotme.PlotMeConnector_017;
|
import com.plotsquared.bukkit.database.plotme.PlotMeConnector_017;
|
||||||
import com.plotsquared.bukkit.generator.BukkitPlotGenerator;
|
import com.plotsquared.bukkit.generator.BukkitPlotGenerator;
|
||||||
import com.plotsquared.bukkit.listeners.*;
|
import com.plotsquared.bukkit.listeners.ChunkListener;
|
||||||
|
import com.plotsquared.bukkit.listeners.EntityPortal_1_7_9;
|
||||||
|
import com.plotsquared.bukkit.listeners.EntitySpawnListener;
|
||||||
|
import com.plotsquared.bukkit.listeners.PlayerEvents;
|
||||||
|
import com.plotsquared.bukkit.listeners.PlayerEvents183;
|
||||||
|
import com.plotsquared.bukkit.listeners.PlayerEvents_1_8;
|
||||||
|
import com.plotsquared.bukkit.listeners.PlayerEvents_1_9;
|
||||||
|
import com.plotsquared.bukkit.listeners.PlotPlusListener;
|
||||||
|
import com.plotsquared.bukkit.listeners.PlotPlusListener_1_12;
|
||||||
|
import com.plotsquared.bukkit.listeners.PlotPlusListener_Legacy;
|
||||||
|
import com.plotsquared.bukkit.listeners.SingleWorldListener;
|
||||||
|
import com.plotsquared.bukkit.listeners.WorldEvents;
|
||||||
import com.plotsquared.bukkit.titles.DefaultTitle_111;
|
import com.plotsquared.bukkit.titles.DefaultTitle_111;
|
||||||
import com.plotsquared.bukkit.util.*;
|
import com.plotsquared.bukkit.util.BukkitChatManager;
|
||||||
import com.plotsquared.bukkit.util.block.*;
|
import com.plotsquared.bukkit.util.BukkitChunkManager;
|
||||||
import com.plotsquared.bukkit.uuid.*;
|
import com.plotsquared.bukkit.util.BukkitCommand;
|
||||||
|
import com.plotsquared.bukkit.util.BukkitEconHandler;
|
||||||
|
import com.plotsquared.bukkit.util.BukkitEventUtil;
|
||||||
|
import com.plotsquared.bukkit.util.BukkitHybridUtils;
|
||||||
|
import com.plotsquared.bukkit.util.BukkitInventoryUtil;
|
||||||
|
import com.plotsquared.bukkit.util.BukkitSchematicHandler;
|
||||||
|
import com.plotsquared.bukkit.util.BukkitSetupUtils;
|
||||||
|
import com.plotsquared.bukkit.util.BukkitTaskManager;
|
||||||
|
import com.plotsquared.bukkit.util.BukkitUtil;
|
||||||
|
import com.plotsquared.bukkit.util.BukkitVersion;
|
||||||
|
import com.plotsquared.bukkit.util.Metrics;
|
||||||
|
import com.plotsquared.bukkit.util.SendChunk;
|
||||||
|
import com.plotsquared.bukkit.util.SetGenCB;
|
||||||
|
import com.plotsquared.bukkit.util.block.BukkitLocalQueue;
|
||||||
|
import com.plotsquared.bukkit.util.block.BukkitLocalQueue_1_7;
|
||||||
|
import com.plotsquared.bukkit.util.block.BukkitLocalQueue_1_8;
|
||||||
|
import com.plotsquared.bukkit.util.block.BukkitLocalQueue_1_8_3;
|
||||||
|
import com.plotsquared.bukkit.util.block.BukkitLocalQueue_1_9;
|
||||||
|
import com.plotsquared.bukkit.uuid.DefaultUUIDWrapper;
|
||||||
|
import com.plotsquared.bukkit.uuid.FileUUIDHandler;
|
||||||
|
import com.plotsquared.bukkit.uuid.LowerOfflineUUIDWrapper;
|
||||||
|
import com.plotsquared.bukkit.uuid.OfflineUUIDWrapper;
|
||||||
|
import com.plotsquared.bukkit.uuid.SQLUUIDHandler;
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import org.bukkit.*;
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Chunk;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.OfflinePlayer;
|
||||||
|
import org.bukkit.World;
|
||||||
import org.bukkit.command.PluginCommand;
|
import org.bukkit.command.PluginCommand;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
@ -48,9 +112,6 @@ import org.bukkit.plugin.Plugin;
|
|||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
|
||||||
import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass;
|
|
||||||
|
|
||||||
public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain {
|
public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain {
|
||||||
|
|
||||||
private static ConcurrentHashMap<String, Plugin> pluginMap;
|
private static ConcurrentHashMap<String, Plugin> pluginMap;
|
||||||
@ -386,6 +447,9 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
|||||||
case FIREBALL:
|
case FIREBALL:
|
||||||
case DRAGON_FIREBALL:
|
case DRAGON_FIREBALL:
|
||||||
case DROPPED_ITEM:
|
case DROPPED_ITEM:
|
||||||
|
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
|
||||||
|
entity.remove();
|
||||||
|
}
|
||||||
// dropped item
|
// dropped item
|
||||||
continue;
|
continue;
|
||||||
case PRIMED_TNT:
|
case PRIMED_TNT:
|
||||||
|
@ -31,7 +31,7 @@ public class EntitySpawnListener implements Listener {
|
|||||||
EntityType type = entity.getType();
|
EntityType type = entity.getType();
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case DROPPED_ITEM:
|
case DROPPED_ITEM:
|
||||||
if (Settings.Enabled_Components.KILL_ROAD_MOBS) {
|
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PLAYER:
|
case PLAYER:
|
||||||
|
@ -321,6 +321,8 @@ public class Settings extends Config {
|
|||||||
public static boolean CHUNK_PROCESSOR = false;
|
public static boolean CHUNK_PROCESSOR = false;
|
||||||
@Comment("Kill mobs on roads")
|
@Comment("Kill mobs on roads")
|
||||||
public static boolean KILL_ROAD_MOBS = false;
|
public static boolean KILL_ROAD_MOBS = false;
|
||||||
|
@Comment("Kill items on roads")
|
||||||
|
public static boolean KILL_ROAD_ITEMS = false;
|
||||||
@Comment("Kill vehicles on roads")
|
@Comment("Kill vehicles on roads")
|
||||||
public static boolean KILL_ROAD_VEHICLES = false;
|
public static boolean KILL_ROAD_VEHICLES = false;
|
||||||
@Comment("Notify a player of any missed comments upon plot entry")
|
@Comment("Notify a player of any missed comments upon plot entry")
|
||||||
|
Loading…
Reference in New Issue
Block a user