mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
We should redo the command alias things
This commit is contained in:
parent
670c0979c9
commit
694dd0432e
@ -1,33 +0,0 @@
|
||||
package com.intellectualcrafters.plot.commands;
|
||||
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions;
|
||||
|
||||
/**
|
||||
* Created 2014-11-09 for PlotSquared
|
||||
*
|
||||
* @author Citymonstret
|
||||
*/
|
||||
public class DEOP extends SubCommand {
|
||||
public DEOP() {
|
||||
super(Command.DEOP, "Alias for /plot trusted remove", "/plot deop [player]", CommandCategory.ACTIONS, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(final PlotPlayer plr, final String... args) {
|
||||
if (args.length < 1) {
|
||||
return MainUtil.sendMessage(plr, "&cUsage: &c" + this.usage);
|
||||
}
|
||||
if (!BukkitPlayerFunctions.isInPlot(plr)) {
|
||||
return sendMessage(plr, C.NOT_IN_PLOT);
|
||||
}
|
||||
final Plot plot = MainUtil.getPlot(loc);
|
||||
if (!plot.hasRights(plr)) {
|
||||
return sendMessage(plr, C.NO_PLOT_PERMS);
|
||||
}
|
||||
return plr.performCommand("plot trusted remove " + args[0]);
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
package com.intellectualcrafters.plot.commands;
|
||||
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions;
|
||||
|
||||
/**
|
||||
* Created 2014-11-09 for PlotSquared
|
||||
*
|
||||
* @author Citymonstret
|
||||
*/
|
||||
public class OP extends SubCommand {
|
||||
public OP() {
|
||||
super(Command.OP, "Alias for /plot trusted add", "/plot op [player]", CommandCategory.ACTIONS, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(final PlotPlayer plr, final String... args) {
|
||||
if (args.length < 1) {
|
||||
return MainUtil.sendMessage(plr, "&cUsage: &c" + this.usage);
|
||||
}
|
||||
if (!BukkitPlayerFunctions.isInPlot(plr)) {
|
||||
return sendMessage(plr, C.NOT_IN_PLOT);
|
||||
}
|
||||
final Plot plot = MainUtil.getPlot(loc);
|
||||
if (!plot.hasRights(plr)) {
|
||||
return sendMessage(plr, C.NO_PLOT_PERMS);
|
||||
}
|
||||
return plr.performCommand("plot trusted add " + args[0]);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user