if (!c.getBoolean("sg-system.lobby.sign.set", false)) {
c.set("sg-system.lobby.sign.set", true);
s.saveSystemConfig();
}
WorldEditPlugin we = GameManager.getInstance().getWorldEdit();
Selection sel = we.getSelection(pl);
if (sel == null) {
pl.sendMessage(ChatColor.RED + "You must make a WorldEdit Selection first");
return;
}
if ((sel.getNativeMaximumPoint().getBlockX() - sel.getNativeMinimumPoint().getBlockX()) != 0 && (sel.getNativeMinimumPoint().getBlockZ() - sel.getNativeMaximumPoint().getBlockZ() != 0)) {
pl.sendMessage(ChatColor.RED + " Must be in a straight line!");
return;
}
Vector max = sel.getNativeMaximumPoint();
Vector min = sel.getNativeMinimumPoint();
int i = c.getInt("sg-system.lobby.signno", 0) + 1;
c.set("sg-system.lobby.signno", i);
c.set("sg-system.lobby.signs." + i + ".id", a);
c.set("sg-system.lobby.signs." + i + ".world", pl.getWorld().getName());
c.set("sg-system.lobby.signs." + i + ".x1", max.getBlockX());