use of com.sk89q.minecraft.util.commands.CommandPermissions in project WorldGuard by EngineHub.
the class DebuggingCommands method fireDamageEvent.
@Command(aliases = { "testdamage" }, usage = "[player]", desc = "Simulate an entity damage", min = 1, max = 1, flags = "ts")
@CommandPermissions("worldguard.debug.event")
public void fireDamageEvent(CommandContext args, final Actor sender) throws CommandException {
LocalPlayer target = worldGuard.getPlatform().getMatcher().matchSinglePlayer(sender, args.getString(0));
worldGuard.getPlatform().getDebugHandler().testDamage(sender, target, args.hasFlag('t'), args.hasFlag('s'));
}
use of com.sk89q.minecraft.util.commands.CommandPermissions in project WorldGuard by EngineHub.
the class DebuggingCommands method firePlaceEvent.
@Command(aliases = { "testplace" }, usage = "[player]", desc = "Simulate a block place", min = 1, max = 1, flags = "ts")
@CommandPermissions("worldguard.debug.event")
public void firePlaceEvent(CommandContext args, final Actor sender) throws CommandException {
LocalPlayer target = worldGuard.getPlatform().getMatcher().matchSinglePlayer(sender, args.getString(0));
worldGuard.getPlatform().getDebugHandler().testPlace(sender, target, args.hasFlag('t'), args.hasFlag('s'));
}
use of com.sk89q.minecraft.util.commands.CommandPermissions in project WorldGuard by EngineHub.
the class GeneralCommands method stack.
@Command(aliases = { "stack", ";" }, usage = "", desc = "Stack items", max = 0)
@CommandPermissions({ "worldguard.stack" })
public void stack(CommandContext args, Actor sender) throws CommandException {
LocalPlayer player = worldGuard.checkPlayer(sender);
WorldGuard.getInstance().getPlatform().stackPlayerInventory(player);
player.print("Items compacted into stacks!");
}
use of com.sk89q.minecraft.util.commands.CommandPermissions in project WorldGuard by EngineHub.
the class GeneralCommands method locate.
@Command(aliases = { "locate" }, usage = "[player]", desc = "Locate a player", max = 1)
@CommandPermissions({ "worldguard.locate" })
public void locate(CommandContext args, Actor sender) throws CommandException {
LocalPlayer player = worldGuard.checkPlayer(sender);
if (args.argsLength() == 0) {
player.setCompassTarget(new Location(player.getWorld(), player.getWorld().getSpawnPosition().toVector3()));
sender.print("Compass reset to spawn.");
} else {
LocalPlayer target = worldGuard.getPlatform().getMatcher().matchSinglePlayer(sender, args.getString(0));
player.setCompassTarget(target.getLocation());
sender.print("Compass repointed.");
}
}
Aggregations