mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
Remove bukkit classes from core
This commit is contained in:
parent
50f891a974
commit
893c2b3088
20 changed files with 30 additions and 47 deletions
|
@ -41,10 +41,6 @@ import com.intellectualcrafters.plot.object.PlotPlayer;
|
|||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.Permissions;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
//import com.plotsquared.bukkit.generator.AugmentedPopulator;
|
||||
//import com.plotsquared.bukkit.generator.AugmentedPopulator;
|
||||
//import com.plotsquared.bukkit.generator.BukkitPlotGenerator;
|
||||
//import com.plotsquared.bukkit.generator.HybridGen;
|
||||
import com.plotsquared.general.commands.CommandDeclaration;
|
||||
|
||||
@CommandDeclaration(
|
||||
|
|
|
@ -71,7 +71,6 @@ import com.intellectualcrafters.plot.util.StringMan;
|
|||
import com.intellectualcrafters.plot.util.TaskManager;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
import com.intellectualcrafters.plot.util.WorldUtil;
|
||||
import com.plotsquared.bukkit.util.BukkitHybridUtils;
|
||||
import com.plotsquared.general.commands.Command;
|
||||
import com.plotsquared.general.commands.CommandDeclaration;
|
||||
|
||||
|
@ -238,7 +237,7 @@ public class DebugExec extends SubCommand {
|
|||
return false;
|
||||
}
|
||||
if (HybridUtils.regions != null) {
|
||||
result = ((BukkitHybridUtils) (HybridUtils.manager)).scheduleRoadUpdate(area, HybridUtils.regions, 0);
|
||||
result = ((HybridUtils.manager)).scheduleRoadUpdate(area, HybridUtils.regions, 0);
|
||||
} else {
|
||||
result = HybridUtils.manager.scheduleRoadUpdate(area, 0);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@ import com.intellectualcrafters.plot.util.MainUtil;
|
|||
import com.intellectualcrafters.plot.util.Permissions;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
import com.intellectualcrafters.plot.util.WorldUtil;
|
||||
import com.plotsquared.bukkit.uuid.SQLUUIDHandler;
|
||||
import com.plotsquared.general.commands.Argument;
|
||||
import com.plotsquared.general.commands.CommandDeclaration;
|
||||
|
||||
|
@ -66,11 +65,7 @@ public class Deny extends SubCommand {
|
|||
uuid = UUIDHandler.getUUID(args[0], null);
|
||||
}
|
||||
if (uuid == null) {
|
||||
if (UUIDHandler.implementation instanceof SQLUUIDHandler) {
|
||||
MainUtil.sendMessage(plr, C.INVALID_PLAYER_WAIT, args[0]);
|
||||
} else {
|
||||
MainUtil.sendMessage(plr, C.INVALID_PLAYER, args[0]);
|
||||
}
|
||||
MainUtil.sendMessage(plr, C.INVALID_PLAYER, args[0]);
|
||||
return false;
|
||||
}
|
||||
if (plot.isOwner(uuid)) {
|
||||
|
|
|
@ -31,7 +31,6 @@ import com.intellectualcrafters.plot.object.PlotPlayer;
|
|||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.Permissions;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
import com.plotsquared.bukkit.uuid.SQLUUIDHandler;
|
||||
import com.plotsquared.general.commands.Argument;
|
||||
import com.plotsquared.general.commands.CommandDeclaration;
|
||||
|
||||
|
@ -126,11 +125,7 @@ public class Remove extends SubCommand {
|
|||
break;
|
||||
}
|
||||
if (count == 0) {
|
||||
if (UUIDHandler.implementation instanceof SQLUUIDHandler) {
|
||||
MainUtil.sendMessage(plr, C.INVALID_PLAYER_WAIT, args[0]);
|
||||
} else {
|
||||
MainUtil.sendMessage(plr, C.INVALID_PLAYER, args[0]);
|
||||
}
|
||||
MainUtil.sendMessage(plr, C.INVALID_PLAYER, args[0]);
|
||||
return false;
|
||||
} else {
|
||||
MainUtil.sendMessage(plr, C.REMOVED_PLAYERS, count + "");
|
||||
|
|
|
@ -31,7 +31,6 @@ import com.intellectualcrafters.plot.util.EventUtil;
|
|||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.Permissions;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
import com.plotsquared.bukkit.uuid.SQLUUIDHandler;
|
||||
import com.plotsquared.general.commands.Argument;
|
||||
import com.plotsquared.general.commands.CommandDeclaration;
|
||||
|
||||
|
@ -71,11 +70,7 @@ public class Trust extends SubCommand {
|
|||
uuid = UUIDHandler.getUUID(args[0], null);
|
||||
}
|
||||
if (uuid == null) {
|
||||
if (UUIDHandler.implementation instanceof SQLUUIDHandler) {
|
||||
MainUtil.sendMessage(plr, C.INVALID_PLAYER_WAIT, args[0]);
|
||||
} else {
|
||||
MainUtil.sendMessage(plr, C.INVALID_PLAYER, args[0]);
|
||||
}
|
||||
MainUtil.sendMessage(plr, C.INVALID_PLAYER, args[0]);
|
||||
return false;
|
||||
}
|
||||
if (plot.isOwner(uuid)) {
|
||||
|
|
|
@ -30,7 +30,6 @@ import com.intellectualcrafters.plot.object.PlotPlayer;
|
|||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.Permissions;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
import com.plotsquared.bukkit.uuid.SQLUUIDHandler;
|
||||
import com.plotsquared.general.commands.Argument;
|
||||
import com.plotsquared.general.commands.CommandDeclaration;
|
||||
|
||||
|
@ -93,11 +92,7 @@ public class Undeny extends SubCommand {
|
|||
break;
|
||||
}
|
||||
if (count == 0) {
|
||||
if (UUIDHandler.implementation instanceof SQLUUIDHandler) {
|
||||
MainUtil.sendMessage(plr, C.INVALID_PLAYER_WAIT, args[0]);
|
||||
} else {
|
||||
MainUtil.sendMessage(plr, C.INVALID_PLAYER, args[0]);
|
||||
}
|
||||
MainUtil.sendMessage(plr, C.INVALID_PLAYER, args[0]);
|
||||
return false;
|
||||
} else {
|
||||
MainUtil.sendMessage(plr, C.REMOVED_PLAYERS, count + "");
|
||||
|
|
|
@ -17,7 +17,7 @@ import com.intellectualcrafters.plot.object.PlotCluster;
|
|||
import com.intellectualcrafters.plot.object.PlotId;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.object.Rating;
|
||||
import com.plotsquared.bukkit.listeners.PlayerBlockEventType;
|
||||
import com.plotsquared.listener.PlayerBlockEventType;
|
||||
|
||||
public abstract class EventUtil {
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ import com.intellectualcrafters.plot.object.PlotBlock;
|
|||
import com.intellectualcrafters.plot.object.RegionWrapper;
|
||||
import com.intellectualcrafters.plot.object.RunnableVal;
|
||||
import com.intellectualcrafters.plot.object.schematic.PlotItem;
|
||||
import com.plotsquared.object.schematic.StateWrapper;
|
||||
|
||||
public abstract class SchematicHandler {
|
||||
public static SchematicHandler manager;
|
||||
|
@ -439,7 +438,7 @@ public abstract class SchematicHandler {
|
|||
final short x = IntTag.class.cast(state.get("x")).getValue().shortValue();
|
||||
final short y = IntTag.class.cast(state.get("y")).getValue().shortValue();
|
||||
final short z = IntTag.class.cast(state.get("z")).getValue().shortValue();
|
||||
new StateWrapper(ct).restoreTag(x, y, z, schem);
|
||||
manager.restoreTag(ct, x, y, z, schem);
|
||||
} catch (final Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -450,6 +449,8 @@ public abstract class SchematicHandler {
|
|||
return schem;
|
||||
}
|
||||
|
||||
public abstract void restoreTag(CompoundTag ct, short x, short y, short z, Schematic schem);
|
||||
|
||||
/**
|
||||
* Get a schematic
|
||||
*
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.bukkit.plugin.java.JavaPlugin;
|
|||
import com.intellectualcrafters.configuration.ConfigurationSection;
|
||||
import com.intellectualcrafters.plot.IPlotMain;
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.commands.MainCommand;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.config.ConfigurationNode;
|
||||
import com.intellectualcrafters.plot.config.Settings;
|
||||
|
@ -56,6 +57,7 @@ import com.intellectualcrafters.plot.util.UUIDHandler;
|
|||
import com.intellectualcrafters.plot.util.UUIDHandlerImplementation;
|
||||
import com.intellectualcrafters.plot.util.WorldUtil;
|
||||
import com.intellectualcrafters.plot.uuid.UUIDWrapper;
|
||||
import com.plotsquared.bukkit.commands.DebugUUID;
|
||||
import com.plotsquared.bukkit.database.plotme.ClassicPlotMeConnector;
|
||||
import com.plotsquared.bukkit.database.plotme.LikePlotMeConverter;
|
||||
import com.plotsquared.bukkit.database.plotme.PlotMeConnector_017;
|
||||
|
@ -174,6 +176,7 @@ public class BukkitMain extends JavaPlugin implements Listener, IPlotMain {
|
|||
plotCommand.setExecutor(bcmd);
|
||||
plotCommand.setAliases(Arrays.asList("p", "ps", "plotme", "plot"));
|
||||
plotCommand.setTabCompleter(bcmd);
|
||||
MainCommand.getInstance().addCommand(new DebugUUID());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
// /
|
||||
// You can contact us via: support@intellectualsites.com /
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
package com.intellectualcrafters.plot.commands;
|
||||
package com.plotsquared.bukkit.commands;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
|
@ -33,6 +33,9 @@ import java.util.Map.Entry;
|
|||
import java.util.UUID;
|
||||
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.commands.CommandCategory;
|
||||
import com.intellectualcrafters.plot.commands.RequiredType;
|
||||
import com.intellectualcrafters.plot.commands.SubCommand;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.database.AbstractDB;
|
||||
import com.intellectualcrafters.plot.database.DBFunc;
|
|
@ -116,6 +116,7 @@ import com.plotsquared.bukkit.BukkitMain;
|
|||
import com.plotsquared.bukkit.object.BukkitLazyBlock;
|
||||
import com.plotsquared.bukkit.object.BukkitPlayer;
|
||||
import com.plotsquared.bukkit.util.BukkitUtil;
|
||||
import com.plotsquared.listener.PlayerBlockEventType;
|
||||
|
||||
/**
|
||||
* Player Events involving plots
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.intellectualcrafters.plot.object.entity;
|
||||
package com.plotsquared.bukkit.object.entity;
|
||||
|
||||
public class AgeableStats {
|
||||
public int age;
|
|
@ -1,4 +1,4 @@
|
|||
package com.intellectualcrafters.plot.object.entity;
|
||||
package com.plotsquared.bukkit.object.entity;
|
||||
|
||||
public class ArmorStandStats {
|
||||
public float[] head = new float[3];
|
|
@ -1,6 +1,5 @@
|
|||
package com.intellectualcrafters.plot.object.entity;
|
||||
package com.plotsquared.bukkit.object.entity;
|
||||
|
||||
import com.plotsquared.bukkit.object.entity.EntityWrapper;
|
||||
|
||||
public class EntityBaseStats {
|
||||
public EntityWrapper passenger;
|
|
@ -32,10 +32,6 @@ import org.bukkit.util.EulerAngle;
|
|||
import org.bukkit.util.Vector;
|
||||
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.object.entity.AgeableStats;
|
||||
import com.intellectualcrafters.plot.object.entity.ArmorStandStats;
|
||||
import com.intellectualcrafters.plot.object.entity.EntityBaseStats;
|
||||
import com.intellectualcrafters.plot.object.entity.HorseStats;
|
||||
|
||||
public class EntityWrapper {
|
||||
public short id;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.intellectualcrafters.plot.object.entity;
|
||||
package com.plotsquared.bukkit.object.entity;
|
||||
|
||||
public class HorseStats {
|
||||
public double jump;
|
|
@ -1,4 +1,4 @@
|
|||
package com.plotsquared.object.schematic;
|
||||
package com.plotsquared.bukkit.object.schematic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
|
@ -12,12 +12,12 @@ import org.bukkit.command.CommandSender;
|
|||
import org.bukkit.command.TabCompleter;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.intellectualcrafters.plot.commands.DebugUUID;
|
||||
import com.intellectualcrafters.plot.commands.MainCommand;
|
||||
import com.intellectualcrafters.plot.object.ConsolePlayer;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.util.Permissions;
|
||||
import com.intellectualcrafters.plot.util.StringComparison;
|
||||
import com.plotsquared.bukkit.commands.DebugUUID;
|
||||
import com.plotsquared.general.commands.Command;
|
||||
|
||||
/**
|
||||
|
|
|
@ -48,7 +48,7 @@ import com.intellectualcrafters.plot.object.RunnableVal;
|
|||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.SchematicHandler;
|
||||
import com.intellectualcrafters.plot.util.TaskManager;
|
||||
import com.plotsquared.object.schematic.StateWrapper;
|
||||
import com.plotsquared.bukkit.object.schematic.StateWrapper;
|
||||
|
||||
/**
|
||||
* Schematic Handler
|
||||
|
@ -327,4 +327,9 @@ public class BukkitSchematicHandler extends SchematicHandler {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restoreTag(CompoundTag ct, short x, short y, short z, Schematic schem) {
|
||||
new StateWrapper(ct).restoreTag(x, y, z, schem);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.plotsquared.bukkit.listeners;
|
||||
package com.plotsquared.listener;
|
||||
|
||||
public enum PlayerBlockEventType {
|
||||
// Non interactive
|
Loading…
Reference in a new issue