mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-07 04:53:00 +00:00
More changes
This commit is contained in:
parent
d227bcc739
commit
fde378c965
96 changed files with 3323 additions and 1354 deletions
|
@ -25,7 +25,7 @@ import net.milkbowl.vault.economy.Economy;
|
|||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.intellectualcrafters.plot.PlotMain;
|
||||
import com.intellectualcrafters.plot.PlotSquared;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.database.DBFunc;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
|
@ -48,20 +48,20 @@ public class Delete extends SubCommand {
|
|||
if (!PlayerFunctions.getTopPlot(plr.getWorld(), plot).equals(PlayerFunctions.getBottomPlot(plr.getWorld(), plot))) {
|
||||
return !sendMessage(plr, C.UNLINK_REQUIRED);
|
||||
}
|
||||
if ((((plot == null) || !plot.hasOwner() || !plot.getOwner().equals(UUIDHandler.uuidWrapper.getUUID(plr)))) && !PlotMain.hasPermission(plr, "plots.admin.command.delete")) {
|
||||
if ((((plot == null) || !plot.hasOwner() || !plot.getOwner().equals(UUIDHandler.uuidWrapper.getUUID(plr)))) && !PlotSquared.hasPermission(plr, "plots.admin.command.delete")) {
|
||||
return !sendMessage(plr, C.NO_PLOT_PERMS);
|
||||
}
|
||||
assert plot != null;
|
||||
final PlotWorld pWorld = PlotMain.getWorldSettings(plot.getWorld());
|
||||
if (PlotMain.useEconomy && pWorld.USE_ECONOMY && (plot != null) && plot.hasOwner() && plot.getOwner().equals(UUIDHandler.getUUID(plr))) {
|
||||
final PlotWorld pWorld = PlotSquared.getWorldSettings(plot.getWorld());
|
||||
if (PlotSquared.useEconomy && pWorld.USE_ECONOMY && (plot != null) && plot.hasOwner() && plot.getOwner().equals(UUIDHandler.getUUID(plr))) {
|
||||
final double c = pWorld.SELL_PRICE;
|
||||
if (c > 0d) {
|
||||
final Economy economy = PlotMain.economy;
|
||||
final Economy economy = PlotSquared.economy;
|
||||
economy.depositPlayer(plr, c);
|
||||
sendMessage(plr, C.ADDED_BALANCE, c + "");
|
||||
}
|
||||
}
|
||||
final boolean result = PlotMain.removePlot(plr.getWorld().getName(), plot.id, true);
|
||||
final boolean result = PlotSquared.removePlot(plr.getWorld().getName(), plot.id, true);
|
||||
if (result) {
|
||||
plot.clear(plr, true);
|
||||
DBFunc.delete(plr.getWorld().getName(), plot);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue