mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-26 04:25:37 +01:00
Command fixes.
This commit is contained in:
parent
c5108c3463
commit
1a938c8ce8
@ -1 +1 @@
|
||||
Subproject commit d5752319a3c66a2eafa63672da1bf78bdf4d6a20
|
||||
Subproject commit 78a0466284cdd80f932e225a2b5d583c07a2cacf
|
@ -94,18 +94,17 @@ public class MVPermissions implements PermissionsInterface {
|
||||
Player player = (Player) sender;
|
||||
|
||||
boolean opFallback = this.plugin.getConfig().getBoolean("opfallback", true);
|
||||
this.plugin.log(Level.WARNING, "Checking to see if person has " + node);
|
||||
if (this.permissions != null && this.permissions.has(player, node)) {
|
||||
// If Permissions is enabled we check against them.
|
||||
this.plugin.log(Level.WARNING, "Allowed by P3/P2 ");
|
||||
//this.plugin.log(Level.WARNING, "Allowed by P3/P2 ");
|
||||
return true;
|
||||
} else if (sender.hasPermission(node)) {
|
||||
// If Now check the bukkit permissions
|
||||
this.plugin.log(Level.WARNING, "Allowed by BukkitPerms");
|
||||
//this.plugin.log(Level.WARNING, "Allowed by BukkitPerms");
|
||||
return true;
|
||||
} else if (player.isOp() && opFallback) {
|
||||
// If Player is Op we always let them use it if they have the fallback enabled!
|
||||
this.plugin.log(Level.WARNING, "Allowed by OP");
|
||||
//this.plugin.log(Level.WARNING, "Allowed by OP");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ public class MVTeleport {
|
||||
public boolean safelyTeleport(Entity e, Location l) {
|
||||
if (this.bs.playerCanSpawnHereSafely(l)) {
|
||||
e.teleport(l);
|
||||
this.plugin.log(Level.WARNING, "The first location you gave me was safe.");
|
||||
//this.plugin.log(Level.WARNING, "The first location you gave me was safe.");
|
||||
return true;
|
||||
}
|
||||
if(e instanceof Minecart) {
|
||||
@ -198,7 +198,7 @@ public class MVTeleport {
|
||||
safeLocation.setY(safeLocation.getBlockY() + .5);
|
||||
}
|
||||
e.teleport(safeLocation);
|
||||
this.plugin.log(Level.WARNING, "Had to look for a bit, but I found a safe place for ya!");
|
||||
//this.plugin.log(Level.WARNING, "Had to look for a bit, but I found a safe place for ya!");
|
||||
return true;
|
||||
}
|
||||
if (e instanceof Player) {
|
||||
|
@ -16,6 +16,7 @@ public class ConfirmCommand extends MultiverseCommand {
|
||||
this.setCommandUsage("/mv confirm");
|
||||
this.setArgRange(0, 0);
|
||||
this.addKey("mvconfirm");
|
||||
this.addKey("mv confirm");
|
||||
this.setPermission("multiverse.core.confirm", "If you have not been prompted to use this, it will not do anything.", PermissionDefault.OP);
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,8 @@ public class EnvironmentCommand extends MultiverseCommand {
|
||||
this.setArgRange(0, 0);
|
||||
this.addKey("mvenv");
|
||||
this.addKey("mv env");
|
||||
this.addKey("mv environment");
|
||||
this.addKey("mv environments");
|
||||
this.setPermission("multiverse.core.list.environments", "Lists valid known environments.", PermissionDefault.OP);
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ public class ImportCommand extends MultiverseCommand {
|
||||
this.setCommandUsage("/mv import" + ChatColor.GREEN + " {NAME} {ENV} " + ChatColor.GOLD + "[GENERATOR[:ID]]");
|
||||
this.setArgRange(2, 3);
|
||||
this.addKey("mvimport");
|
||||
this.addKey("mvi");
|
||||
this.addKey("mvim");
|
||||
this.addKey("mv import");
|
||||
this.setPermission("multiverse.core.import", "Imports a new world of the specified type.", PermissionDefault.OP);
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ public class ModifyCommand extends MultiverseCommand {
|
||||
this.setArgRange(2, 3);
|
||||
this.addKey("mvm");
|
||||
this.addKey("mvmodify");
|
||||
this.addKey("mv modify");
|
||||
Map<String, Boolean> children = new HashMap<String, Boolean>();
|
||||
children.put("multiverse.core.modify.add", true);
|
||||
children.put("multiverse.core.modify.modify", true);
|
||||
|
@ -21,6 +21,10 @@ public class ModifyRemoveCommand extends MultiverseCommand {
|
||||
this.addKey("mvmremove");
|
||||
this.addKey("mv modify remove");
|
||||
this.addKey("mvmodify remove");
|
||||
this.addKey("mvm delete");
|
||||
this.addKey("mvmdelete");
|
||||
this.addKey("mv modify delete");
|
||||
this.addKey("mvmodify delete");
|
||||
this.setPermission("multiverse.core.modify.remove", "Modify various aspects of worlds. See the help wiki for how to use this command properly. If you do not include a world, the current world will be used.", PermissionDefault.OP);
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@ public class RemoveCommand extends MultiverseCommand {
|
||||
this.setCommandUsage("/mv remove" + ChatColor.GREEN + " {WORLD}");
|
||||
this.setArgRange(1, 1);
|
||||
this.addKey("mvremove");
|
||||
this.addKey("mv remove");
|
||||
this.setPermission("multiverse.core.remove", "Unloads a world from Multiverse and removes it from worlds.yml, this does NOT remove the world folder.", PermissionDefault.OP);
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,8 @@ public class SetSpawnCommand extends MultiverseCommand {
|
||||
this.addKey("mvsetspawn");
|
||||
this.addKey("mvss");
|
||||
this.addKey("mv set spawn");
|
||||
this.addKey("mv setspawn");
|
||||
this.addKey("mvset spawn");
|
||||
this.setPermission("multiverse.core.spawn.set", "Sets the spawn for the current world.", PermissionDefault.OP);
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,6 @@ public class TeleportCommand extends MultiverseCommand {
|
||||
|
||||
@Override
|
||||
public void runCommand(CommandSender sender, List<String> args) {
|
||||
this.plugin.log(Level.WARNING, "running MVTP");
|
||||
// Check if the command was sent from a Player.
|
||||
Player teleporter = null;
|
||||
Player teleportee = null;
|
||||
@ -116,6 +115,5 @@ public class TeleportCommand extends MultiverseCommand {
|
||||
String message = ChatColor.GREEN + "Multiverse" + ChatColor.WHITE + " did not teleport " + ChatColor.AQUA + player + ChatColor.WHITE + " to " + ChatColor.DARK_AQUA + d.getName() + ChatColor.WHITE + " because it was unsafe.";
|
||||
this.plugin.getCommandHandler().queueCommand(sender, "mvteleport", "teleportPlayer", items, paramTypes, message, "Would you like to try anyway?", "", "", 15);
|
||||
}
|
||||
this.plugin.log(Level.WARNING, "Done with MVTP");
|
||||
}
|
||||
}
|
||||
|
@ -93,6 +93,9 @@ commands:
|
||||
mvsetspawn:
|
||||
description: Set the spawn area for a particular world
|
||||
usage: /<command> -- Sets the spawn area of the current world to your location.
|
||||
mvset:
|
||||
description: Set the spawn area for a particular world
|
||||
usage: /<command> -- Sets the spawn area of the current world to your location.
|
||||
mvss:
|
||||
description: Set the spawn area for a particular world
|
||||
usage: /<command> -- Sets the spawn area of the current world to your location.
|
||||
|
Loading…
Reference in New Issue
Block a user