mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
we could just drop support for worldedit...
This commit is contained in:
parent
0d305463fc
commit
0aaf573186
@ -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) {
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user