we could just drop support for worldedit...

This commit is contained in:
boy0001 2014-10-29 22:26:50 +11:00
parent 0d305463fc
commit 0aaf573186
3 changed files with 14 additions and 30 deletions

View File

@ -10,6 +10,8 @@ import com.sk89q.worldedit.LocalWorld;
import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.bukkit.BukkitPlayer; import com.sk89q.worldedit.bukkit.BukkitPlayer;
import com.sk89q.worldedit.function.mask.Mask;
import com.sk89q.worldedit.function.mask.RegionMask;
import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.CuboidRegion;
/** /**
@ -55,8 +57,7 @@ public class PWE {
LocalWorld lw = PlotMain.worldEdit.wrapPlayer(p).getWorld(); LocalWorld lw = PlotMain.worldEdit.wrapPlayer(p).getWorld();
CuboidRegion region = new CuboidRegion(lw, bvec, tvec); CuboidRegion region = new CuboidRegion(lw, bvec, tvec);
com.sk89q.worldedit.masks.RegionMask mask = new com.sk89q.worldedit.masks.RegionMask(region); RegionMask mask = new RegionMask(region);
s.setMask(mask); s.setMask(mask);
return; return;
} }
@ -65,8 +66,7 @@ public class PWE {
if (noMask(s)) { if (noMask(s)) {
BukkitPlayer plr = PlotMain.worldEdit.wrapPlayer(p); BukkitPlayer plr = PlotMain.worldEdit.wrapPlayer(p);
Vector p1 = new Vector(69, 69, 69), p2 = new Vector(69, 69, 69); Vector p1 = new Vector(69, 69, 69), p2 = new Vector(69, 69, 69);
s.setMask(new RegionMask(new CuboidRegion(plr.getWorld(), p1, p2)));
s.setMask(new com.sk89q.worldedit.masks.RegionMask(new CuboidRegion(plr.getWorld(), p1, p2)));
} }
} }
catch (Exception e) { catch (Exception e) {
@ -76,33 +76,13 @@ public class PWE {
} }
} }
@SuppressWarnings("unused")
public static boolean noMask(LocalSession s) { public static boolean noMask(LocalSession s) {
// try { return s.getMask() == null;
// com.sk89q.worldedit.masks.Mask mask = s.getMask();
// return mask == null;
// }
// catch (Throwable e) {
//
//
// return true;
//
//
// }
return true;
} }
public static void removeMask(Player p, LocalSession s) { public static void removeMask(Player p, LocalSession s) {
// try { Mask mask = null;
// s.setMask(null); s.setMask(mask);
// }
// catch (Throwable e) {
// com.sk89q.worldedit.masks.Mask mask = null;
// s.setMask(mask);
// }
} }
public static void removeMask(Player p) { public static void removeMask(Player p) {

View File

@ -6,8 +6,12 @@ package com.intellectualcrafters.plot.database.sqlobjects;
public class PlotTable extends SQLTable { public class PlotTable extends SQLTable {
public PlotTable() { public PlotTable() {
super("plots"); super("plots", name, fields);
} }
public @Override
public void create() {
// TODO Auto-generated method stub
}
} }

View File

@ -71,7 +71,7 @@ public class WorldGenerator extends PlotGenerator {
return manager; return manager;
} }
/** /**
* Allow spawning everywhere (up to server owners to keep it safe) * Allow spawning everywhere
*/ */
@Override @Override
public boolean canSpawn(World world, int x, int z) { public boolean canSpawn(World world, int x, int z) {