mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-02-02 21:51:24 +01:00
Commit because i've changed just about everything... Doubt this one works.
This commit is contained in:
parent
bf51adaa3e
commit
3c4135236d
@ -1 +1 @@
|
||||
Subproject commit c1f179e22aae2b4216b253cfe9f1ee7837728edd
|
||||
Subproject commit 146c05f6a9bc81f1f3a3c2af794a5c800aa5350a
|
@ -95,7 +95,9 @@ public class MVPermissions implements PermissionsInterface {
|
||||
if (!(sender instanceof Player)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
|
||||
boolean opFallback = this.plugin.configMV.getBoolean("opfallback", true);
|
||||
if (player.isOp() && opFallback) {
|
||||
// If Player is Op we always let them use it if they have the fallback enabled!
|
||||
@ -103,6 +105,8 @@ public class MVPermissions implements PermissionsInterface {
|
||||
} else if (this.permissions != null && this.permissions.has(player, node)) {
|
||||
// If Permissions is enabled we check against them.
|
||||
return true;
|
||||
} else if(sender.hasPermission(node)) {
|
||||
return true;
|
||||
}
|
||||
// If the Player doesn't have Permissions and isn't an Op then
|
||||
// we return true if OP is not required, otherwise we return false
|
||||
|
@ -3,6 +3,7 @@ package com.onarandombox.MultiverseCore.commands;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
|
||||
@ -10,15 +11,13 @@ public class ConfirmCommand extends MultiverseCommand {
|
||||
|
||||
public ConfirmCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Confirms a command that could destroy life, the universe and everything.";
|
||||
this.commandDesc = "If you have not been prompted to use this, it will not do anything.";
|
||||
this.commandUsage = "/mvconfirm";
|
||||
this.minimumArgLength = 0;
|
||||
this.maximumArgLength = 0;
|
||||
this.commandKeys.add("mvconfirm");
|
||||
this.permission = "multiverse.world.confirm";
|
||||
// Any command that is dangerous should require op
|
||||
this.opRequired = true;
|
||||
this.setName("Confirms a command that could destroy life, the universe and everything.");
|
||||
this.setCommandUsage("/mvconfirm");
|
||||
this.setArgRange(0, 0);
|
||||
this.addKey("mvconfirm");
|
||||
this.setPermission("multiverse.core.confirm", "If you have not been prompted to use this, it will not do anything.", PermissionDefault.OP);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -6,6 +6,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
import com.onarandombox.utils.LocationManipulation;
|
||||
@ -16,14 +17,12 @@ public class CoordCommand extends MultiverseCommand {
|
||||
|
||||
public CoordCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Coordinates";
|
||||
this.commandDesc = "Returns detailed information on the Players where abouts.";
|
||||
this.commandUsage = "/mvcoord";
|
||||
this.minimumArgLength = 0;
|
||||
this.maximumArgLength = 0;
|
||||
this.commandKeys.add("mvcoord");
|
||||
this.permission = "multiverse.world.coord";
|
||||
this.opRequired = false;
|
||||
this.setName("Coordinates");
|
||||
this.setCommandUsage("/mvcoord");
|
||||
this.setArgRange(0, 0);
|
||||
this.addKey("mv coord");
|
||||
this.addKey("mvcoord");
|
||||
this.setPermission("multiverse.core.coord", "Returns detailed information on the Players where abouts.", PermissionDefault.TRUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.World.Environment;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
import com.pneumaticraft.commandhandler.CommandHandler;
|
||||
@ -14,16 +15,13 @@ public class CreateCommand extends MultiverseCommand {
|
||||
|
||||
public CreateCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Create World";
|
||||
this.commandDesc = "Creates a new world and loads it.";
|
||||
this.commandUsage = "/mvcreate" + ChatColor.GREEN + " {NAME} {ENV}" + ChatColor.GOLD + " -s [SEED] -g [GENERATOR[:ID]]";
|
||||
this.minimumArgLength = 2;
|
||||
this.maximumArgLength = 6;
|
||||
this.commandKeys.add("mvcreate");
|
||||
this.commandKeys.add("mvc");
|
||||
this.commandKeys.add("mv create");
|
||||
this.permission = "multiverse.world.create";
|
||||
this.opRequired = true;
|
||||
this.setName("Create World");
|
||||
this.setCommandUsage("/mvcreate" + ChatColor.GREEN + " {NAME} {ENV}" + ChatColor.GOLD + " -s [SEED] -g [GENERATOR[:ID]]");
|
||||
this.setArgRange(2, 6);
|
||||
this.addKey("mvcreate");
|
||||
this.addKey("mvc");
|
||||
this.addKey("mv create");
|
||||
this.setPermission("multiverse.core.create", "Creates a new world and loads it.", PermissionDefault.OP);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
|
||||
@ -11,15 +12,12 @@ public class DeleteCommand extends MultiverseCommand {
|
||||
|
||||
public DeleteCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Delete World";
|
||||
this.commandDesc = "Deletes a world on your server. " + ChatColor.RED + "PERMANENTLY.";
|
||||
this.commandUsage = "/mvdelete" + ChatColor.GREEN + " {WORLD} ";
|
||||
this.minimumArgLength = 1;
|
||||
this.maximumArgLength = 1;
|
||||
this.commandKeys.add("mvdelete");
|
||||
this.commandKeys.add("mv delete");
|
||||
this.permission = "multiverse.world.delete";
|
||||
this.opRequired = true;
|
||||
this.setName("Delete World");
|
||||
this.setCommandUsage("/mvdelete" + ChatColor.GREEN + " {WORLD}");
|
||||
this.setArgRange(1, 1);
|
||||
this.addKey("mvdelete");
|
||||
this.addKey("mv delete");
|
||||
this.setPermission("multiverse.core.delete", "Deletes a world on your server. " + ChatColor.RED + "PERMANENTLY.", PermissionDefault.OP);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
|
||||
@ -12,15 +13,12 @@ public class EnvironmentCommand extends MultiverseCommand {
|
||||
|
||||
public EnvironmentCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "List Environments";
|
||||
this.commandDesc = "Lists valid known environments.";
|
||||
this.commandUsage = "/mvenv";
|
||||
this.minimumArgLength = 0;
|
||||
this.maximumArgLength = 0;
|
||||
this.commandKeys.add("mvenv");
|
||||
this.commandKeys.add("mv env");
|
||||
this.permission = "multiverse.world.list.environments";
|
||||
this.opRequired = false;
|
||||
this.setName("List Environments");
|
||||
this.setCommandUsage("/mvenv");
|
||||
this.setArgRange(0, 0);
|
||||
this.addKey("mvenv");
|
||||
this.addKey("mv env");
|
||||
this.setPermission("multiverse.core.list.environments", "Lists valid known environments.", PermissionDefault.TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -7,6 +7,7 @@ import java.util.List;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
import com.pneumaticraft.commandhandler.Command;
|
||||
@ -16,16 +17,13 @@ public class HelpCommand extends MultiverseCommand {
|
||||
|
||||
public HelpCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Get Help with Multiverse";
|
||||
this.commandDesc = "Displays a nice help menu.";
|
||||
this.commandUsage = "/mv " + ChatColor.GOLD + "[PAGE #]";
|
||||
this.minimumArgLength = 0;
|
||||
this.maximumArgLength = 1;
|
||||
this.commandKeys.add("mv");
|
||||
this.commandKeys.add("mvhelp");
|
||||
this.commandKeys.add("mv help");
|
||||
this.permission = "multiverse.help";
|
||||
this.opRequired = false;
|
||||
this.setName("Get Help with Multiverse");
|
||||
this.setCommandUsage("/mv " + ChatColor.GOLD + "[PAGE #]");
|
||||
this.setArgRange(0, 1);
|
||||
this.addKey("mv");
|
||||
this.addKey("mvhelp");
|
||||
this.addKey("mv help");
|
||||
this.setPermission("multiverse.help", "Displays a nice help menu.", PermissionDefault.TRUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.World.Environment;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
|
||||
@ -13,16 +14,13 @@ public class ImportCommand extends MultiverseCommand {
|
||||
|
||||
public ImportCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Import World";
|
||||
this.commandDesc = "Imports a new world of the specified type";
|
||||
this.commandUsage = "/mvimport" + ChatColor.GREEN + " {NAME} {ENV} " + ChatColor.GOLD + "[GENERATOR[:ID]]";
|
||||
this.minimumArgLength = 2;
|
||||
this.maximumArgLength = 3;
|
||||
this.commandKeys.add("mvimport");
|
||||
this.commandKeys.add("mvi");
|
||||
this.commandKeys.add("mv import");
|
||||
this.permission = "multiverse.world.import";
|
||||
this.opRequired = true;
|
||||
this.setName("Import World");
|
||||
this.setCommandUsage("/mvimport" + ChatColor.GREEN + " {NAME} {ENV} " + ChatColor.GOLD + "[GENERATOR[:ID]]");
|
||||
this.setArgRange(2, 3);
|
||||
this.addKey("mvimport");
|
||||
this.addKey("mvi");
|
||||
this.addKey("mv import");
|
||||
this.setPermission("multiverse.core.import", "Imports a new world of the specified type.", PermissionDefault.TRUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MVWorld;
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
@ -14,16 +15,13 @@ public class InfoCommand extends MultiverseCommand {
|
||||
|
||||
public InfoCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "World Information";
|
||||
this.commandDesc = "Returns detailed information on the world.";
|
||||
this.commandUsage = "/mvinfo" + ChatColor.GOLD + " [WORLD] ";
|
||||
this.minimumArgLength = 0;
|
||||
this.maximumArgLength = 2;
|
||||
this.commandKeys.add("mvinfo");
|
||||
this.commandKeys.add("mv info");
|
||||
this.commandKeys.add("mvi");
|
||||
this.permission = "multiverse.world.info";
|
||||
this.opRequired = false;
|
||||
this.setName("World Information");
|
||||
this.setCommandUsage("/mvinfo" + ChatColor.GOLD + " [WORLD]");
|
||||
this.setArgRange(0, 1);
|
||||
this.addKey("mvinfo");
|
||||
this.addKey("mvi");
|
||||
this.addKey("mv info");
|
||||
this.setPermission("multiverse.world.coord", "Returns detailed information on the world.", PermissionDefault.TRUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -6,6 +6,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.World.Environment;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MVWorld;
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
@ -14,16 +15,13 @@ public class ListCommand extends MultiverseCommand {
|
||||
|
||||
public ListCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "World Listing";
|
||||
this.commandDesc = "Displays a listing of all worlds that you can enter";
|
||||
this.commandUsage = "/mvlist";
|
||||
this.minimumArgLength = 0;
|
||||
this.maximumArgLength = 0;
|
||||
this.commandKeys.add("mvlist");
|
||||
this.commandKeys.add("mvl");
|
||||
this.commandKeys.add("mv list");
|
||||
this.permission = "multiverse.world.list";
|
||||
this.opRequired = false;
|
||||
this.setName("World Listing");
|
||||
this.setCommandUsage("/mvlist");
|
||||
this.setArgRange(0, 0);
|
||||
this.addKey("mvlist");
|
||||
this.addKey("mvl");
|
||||
this.addKey("mv list");
|
||||
this.setPermission("multiverse.core.list.worlds", "Displays a listing of all worlds that you can enter.", PermissionDefault.TRUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MVWorld;
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
@ -16,17 +17,14 @@ public class ModifyAddCommand extends MultiverseCommand {
|
||||
|
||||
public ModifyAddCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Modify a World (Add a value)";
|
||||
this.commandDesc = "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.";
|
||||
this.commandUsage = "/mvmodify " + ChatColor.GREEN + "ADD {VALUE} {PROPERTY}" + ChatColor.GOLD + " [WORLD] ";
|
||||
this.minimumArgLength = 2;
|
||||
this.maximumArgLength = 3;
|
||||
this.commandKeys.add("mvmodify add");
|
||||
this.commandKeys.add("mv modify add");
|
||||
this.commandKeys.add("mvm add");
|
||||
this.commandKeys.add("mvmadd");
|
||||
this.permission = "multiverse.world.modify";
|
||||
this.opRequired = true;
|
||||
this.setName("Modify a World (Add a value)");
|
||||
this.setCommandUsage("/mvmodify " + ChatColor.GREEN + "ADD {VALUE} {PROPERTY}" + ChatColor.GOLD + " [WORLD] ");
|
||||
this.setArgRange(2, 3);
|
||||
this.addKey("mvm add");
|
||||
this.addKey("mvmadd");
|
||||
this.addKey("mv modify add");
|
||||
this.addKey("mvmodify add");
|
||||
this.setPermission("multiverse.core.modify.add", "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);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -39,8 +37,8 @@ public class ModifyAddCommand extends MultiverseCommand {
|
||||
|
||||
if (args.size() == 2 && p == null) {
|
||||
sender.sendMessage(ChatColor.RED + "From the console, WORLD is required.");
|
||||
sender.sendMessage(this.commandDesc);
|
||||
sender.sendMessage(this.commandUsage);
|
||||
sender.sendMessage(this.getCommandDesc());
|
||||
sender.sendMessage(this.getCommandUsage());
|
||||
sender.sendMessage("Nothing changed.");
|
||||
return;
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MVWorld;
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
@ -13,17 +14,14 @@ public class ModifyClearCommand extends MultiverseCommand {
|
||||
|
||||
public ModifyClearCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Modify a World (Clear a property)";
|
||||
this.commandDesc = "Removes all values from a property. This will work on properties that contain lists.";
|
||||
this.commandUsage = "/mvmodify" + ChatColor.GREEN + " CLEAR {PROPERTY}" + ChatColor.GOLD + " [WORLD] ";
|
||||
this.minimumArgLength = 1;
|
||||
this.maximumArgLength = 2;
|
||||
this.commandKeys.add("mvmodify clear");
|
||||
this.commandKeys.add("mv modify clear");
|
||||
this.commandKeys.add("mvm clear");
|
||||
this.commandKeys.add("mvmclear");
|
||||
this.permission = "multiverse.world.modify";
|
||||
this.opRequired = true;
|
||||
this.setName("Modify a World (Clear a property)");
|
||||
this.setCommandUsage("/mvmodify" + ChatColor.GREEN + " clear {PROPERTY}" + ChatColor.GOLD + " [WORLD]");
|
||||
this.setArgRange(1, 2);
|
||||
this.addKey("mvm clear");
|
||||
this.addKey("mvmclear");
|
||||
this.addKey("mv modify clear");
|
||||
this.addKey("mvmodify clear");
|
||||
this.setPermission("multiverse.core.modify.clear", "Removes all values from a property. This will work on properties that contain lists.", PermissionDefault.OP);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -35,8 +33,8 @@ public class ModifyClearCommand extends MultiverseCommand {
|
||||
}
|
||||
if (args.size() == 1 && p == null) {
|
||||
sender.sendMessage(ChatColor.RED + "From the console, WORLD is required.");
|
||||
sender.sendMessage(this.commandDesc);
|
||||
sender.sendMessage(this.commandUsage);
|
||||
sender.sendMessage(this.getCommandDesc());
|
||||
sender.sendMessage(this.getCommandUsage());
|
||||
sender.sendMessage("Nothing changed.");
|
||||
return;
|
||||
}
|
||||
|
@ -1,9 +1,13 @@
|
||||
package com.onarandombox.MultiverseCore.commands;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.permissions.Permission;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
|
||||
@ -24,16 +28,18 @@ public class ModifyCommand extends MultiverseCommand {
|
||||
|
||||
public ModifyCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Modify a World";
|
||||
this.commandDesc = "MVModify requires an extra parameter: SET,ADD,REMOVE or CLEAR. See below for usage.";
|
||||
this.commandUsage = "/mvmodify" + ChatColor.GREEN + " {SET|ADD|REMOVE|CLEAR} ...";
|
||||
// Make it so they can NEVER execute this one
|
||||
this.minimumArgLength = 1;
|
||||
this.maximumArgLength = 0;
|
||||
this.commandKeys.add("mvmodify");
|
||||
this.commandKeys.add("mvm");
|
||||
this.permission = "multiverse.world.modify";
|
||||
this.opRequired = true;
|
||||
this.setName("Modify a World");
|
||||
this.setCommandUsage("/mvmodify" + ChatColor.GREEN + " {set|add|remove|clear} ...");
|
||||
this.setArgRange(2, 3);
|
||||
this.addKey("mvm");
|
||||
this.addKey("mvmodify");
|
||||
Map<String, Boolean> children = new HashMap<String, Boolean>();
|
||||
children.put("multiverse.core.modify.add", true);
|
||||
children.put("multiverse.core.modify.modify", true);
|
||||
children.put("multiverse.core.modify.clear", true);
|
||||
children.put("multiverse.core.modify.remove", true);
|
||||
Permission modify = new Permission("multiverse.core.modify", "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, children);
|
||||
this.setPermission(modify);
|
||||
}
|
||||
|
||||
protected static boolean validateAction(Action action, String property) {
|
||||
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MVWorld;
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
@ -13,17 +14,14 @@ public class ModifyRemoveCommand extends MultiverseCommand {
|
||||
|
||||
public ModifyRemoveCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Modify a World";
|
||||
this.commandDesc = "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.";
|
||||
this.commandUsage = "/mvmodify" + ChatColor.GREEN + "REMOVE {PROPERTY} {VALUE}" + ChatColor.GOLD + " [WORLD]";
|
||||
this.minimumArgLength = 2;
|
||||
this.maximumArgLength = 3;
|
||||
this.commandKeys.add("mvmodify remove");
|
||||
this.commandKeys.add("mv modify remove");
|
||||
this.commandKeys.add("mvm remove");
|
||||
this.commandKeys.add("mvmremove");
|
||||
this.permission = "multiverse.world.modify";
|
||||
this.opRequired = true;
|
||||
this.setName("Modify a World (Remove a value)");
|
||||
this.setCommandUsage("/mvmodify" + ChatColor.GREEN + "REMOVE {PROPERTY} {VALUE}" + ChatColor.GOLD + " [WORLD]");
|
||||
this.setArgRange(2, 3);
|
||||
this.addKey("mvm remove");
|
||||
this.addKey("mvmremove");
|
||||
this.addKey("mv modify remove");
|
||||
this.addKey("mvmodify remove");
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -36,8 +34,8 @@ public class ModifyRemoveCommand extends MultiverseCommand {
|
||||
|
||||
if (args.size() == 2 && p == null) {
|
||||
sender.sendMessage(ChatColor.RED + "From the console, WORLD is required.");
|
||||
sender.sendMessage(this.commandDesc);
|
||||
sender.sendMessage(this.commandUsage);
|
||||
sender.sendMessage(this.getCommandDesc());
|
||||
sender.sendMessage(this.getCommandUsage());
|
||||
sender.sendMessage("Nothing changed.");
|
||||
return;
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MVWorld;
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
@ -13,17 +14,14 @@ public class ModifySetCommand extends MultiverseCommand {
|
||||
|
||||
public ModifySetCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Modify a World (Set a value)";
|
||||
this.commandDesc = "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.";
|
||||
this.commandUsage = "/mvmodify" + ChatColor.GREEN + " set {PROPERTY} {VALUE}" + ChatColor.GOLD + " [WORLD]";
|
||||
this.minimumArgLength = 2;
|
||||
this.maximumArgLength = 3;
|
||||
this.commandKeys.add("mvmodify set");
|
||||
this.commandKeys.add("mv modify set");
|
||||
this.commandKeys.add("mvm set");
|
||||
this.commandKeys.add("mvmset");
|
||||
this.permission = "multiverse.world.modify";
|
||||
this.opRequired = true;
|
||||
this.setName("Modify a World (Set a value)");
|
||||
this.setCommandUsage("/mvmodify" + ChatColor.GREEN + " set {PROPERTY} {VALUE}" + ChatColor.GOLD + " [WORLD]");
|
||||
this.setArgRange(2, 3);
|
||||
this.addKey("mvm set");
|
||||
this.addKey("mvmset");
|
||||
this.addKey("mv modify set");
|
||||
this.addKey("mvmodify set");
|
||||
this.setPermission("multiverse.core.modify.set", "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);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -36,8 +34,8 @@ public class ModifySetCommand extends MultiverseCommand {
|
||||
|
||||
if (args.size() == 2 && p == null) {
|
||||
sender.sendMessage("From the command line, WORLD is required.");
|
||||
sender.sendMessage(this.commandDesc);
|
||||
sender.sendMessage(this.commandUsage);
|
||||
sender.sendMessage(this.getCommandDesc());
|
||||
sender.sendMessage(this.getCommandUsage());
|
||||
sender.sendMessage("Nothing changed.");
|
||||
return;
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import java.util.List;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MVWorld;
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
@ -16,15 +17,12 @@ public class PurgeCommand extends MultiverseCommand {
|
||||
|
||||
public PurgeCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Purge the world ";
|
||||
this.commandDesc = "Removed the specified type of mob from the specified world.";
|
||||
this.commandUsage = "/mvpurge" + ChatColor.GOLD + " [WORLD|all] " + ChatColor.GREEN + "{all|animals|monsters|MOBNAME}";
|
||||
this.minimumArgLength = 1;
|
||||
this.maximumArgLength = 2;
|
||||
this.commandKeys.add("mvpurge");
|
||||
this.commandKeys.add("mv purge");
|
||||
this.permission = "multiverse.world.purge";
|
||||
this.opRequired = true;
|
||||
this.setName("Purge World of Creatures");
|
||||
this.setCommandUsage("/mvpurge" + ChatColor.GOLD + " [WORLD|all] " + ChatColor.GREEN + "{all|animals|monsters|MOBNAME}");
|
||||
this.setArgRange(1, 2);
|
||||
this.addKey("mvpurge");
|
||||
this.addKey("mv purge");
|
||||
this.setPermission("multiverse.core.purge", "Removed the specified type of mob from the specified world.", PermissionDefault.OP);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -35,7 +33,7 @@ public class PurgeCommand extends MultiverseCommand {
|
||||
}
|
||||
if (args.size() == 1 && p == null) {
|
||||
sender.sendMessage("This command requires a WORLD when being run from the console!");
|
||||
sender.sendMessage(this.commandUsage);
|
||||
sender.sendMessage(this.getCommandUsage());
|
||||
return;
|
||||
}
|
||||
String worldName = null;
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.onarandombox.MultiverseCore.commands;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
|
||||
@ -11,24 +11,20 @@ public class ReloadCommand extends MultiverseCommand {
|
||||
|
||||
public ReloadCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Reload";
|
||||
this.commandDesc = "Reloads worlds.yml and config.yml.";
|
||||
this.commandUsage = "/mvreload";
|
||||
this.minimumArgLength = 0;
|
||||
this.maximumArgLength = 0;
|
||||
this.commandKeys.add("mvreload");
|
||||
this.commandKeys.add("mv reload");
|
||||
this.commandKeys.add("mvr");
|
||||
this.permission = "multiverse.reload";
|
||||
this.opRequired = true;
|
||||
this.setName("Reload Configs");
|
||||
this.setCommandUsage("/mvreload");
|
||||
this.setArgRange(0, 0);
|
||||
this.addKey("mvreload");
|
||||
this.addKey("mv reload");
|
||||
this.setPermission("multiverse.core.reload", "Reloads worlds.yml and config.yml.", PermissionDefault.OP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void runCommand(CommandSender sender, List<String> args) {
|
||||
this.plugin.log(Level.INFO, "Reloading Multiverse-Core config.yml and worlds.yml");
|
||||
sender.sendMessage("Reloading Multiverse-Core config.yml and worlds.yml");
|
||||
this.plugin.loadConfigs();
|
||||
this.plugin.loadWorlds(true);
|
||||
this.plugin.log(Level.INFO, "Reload Complete!");
|
||||
sender.sendMessage("Reload Complete!");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
|
||||
@ -11,15 +12,11 @@ public class RemoveCommand extends MultiverseCommand {
|
||||
|
||||
public RemoveCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Remove World";
|
||||
this.commandDesc = "Unloads a world from Multiverse and removes it from worlds.yml, this does NOT remove the world folder.";
|
||||
this.commandUsage = "/mvremove " + ChatColor.GREEN + " {WORLD} ";
|
||||
this.minimumArgLength = 1;
|
||||
this.maximumArgLength = 1;
|
||||
this.commandKeys.add("mvremove");
|
||||
this.commandKeys.add("mv remove");
|
||||
this.permission = "multiverse.world.remove";
|
||||
this.opRequired = true;
|
||||
this.setName("Remove World");
|
||||
this.setCommandUsage("/mvremove " + ChatColor.GREEN + " {WORLD}");
|
||||
this.setArgRange(1, 1);
|
||||
this.addKey("mvcoord");
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -6,6 +6,7 @@ import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
|
||||
@ -13,16 +14,13 @@ public class SetSpawnCommand extends MultiverseCommand {
|
||||
|
||||
public SetSpawnCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Set World Spawn";
|
||||
this.commandDesc = "Sets the spawn for the current world.";
|
||||
this.commandUsage = "/mvsetspawn";
|
||||
this.minimumArgLength = 0;
|
||||
this.maximumArgLength = 0;
|
||||
this.commandKeys.add("mvsetspawn");
|
||||
this.commandKeys.add("mvss");
|
||||
this.commandKeys.add("mv set spawn");
|
||||
this.permission = "multiverse.world.spawn.set";
|
||||
this.opRequired = true;
|
||||
this.setName("Set World Spawn");
|
||||
this.setCommandUsage("/mvsetspawn");
|
||||
this.setArgRange(0, 0);
|
||||
this.addKey("mvsetspawn");
|
||||
this.addKey("mvss");
|
||||
this.addKey("mv set spawn");
|
||||
this.setPermission("multiverse.core.spawn.set", "Sets the spawn for the current world.", PermissionDefault.OP);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MVPlayerSession;
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
@ -12,14 +13,11 @@ public class SleepCommand extends MultiverseCommand {
|
||||
|
||||
public SleepCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Go To Sleep";
|
||||
this.commandDesc = "Takes you the latest bed you've slept in.";
|
||||
this.commandUsage = "/mv sleep";
|
||||
this.minimumArgLength = 0;
|
||||
this.maximumArgLength = 0;
|
||||
this.commandKeys.add("mv sleep");
|
||||
this.permission = "multiverse.sleep";
|
||||
this.opRequired = true;
|
||||
this.setName("Go to Sleep");
|
||||
this.setCommandUsage("/mv sleep");
|
||||
this.setArgRange(0, 0);
|
||||
this.addKey("mv sleep");
|
||||
this.setPermission("multiverse.core.sleep", "Takes you the latest bed you've slept in (Currently BROKEN).", PermissionDefault.OP);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
|
||||
@ -12,16 +13,13 @@ public class SpawnCommand extends MultiverseCommand {
|
||||
|
||||
public SpawnCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Spawn";
|
||||
this.commandDesc = "Teleports target player to the Spawn Point of the world they are in.";
|
||||
this.commandUsage = "/mvspawn" + ChatColor.GOLD + " [PLAYER]";
|
||||
this.minimumArgLength = 0;
|
||||
this.maximumArgLength = 1;
|
||||
this.commandKeys.add("mvspawn");
|
||||
this.commandKeys.add("mv spawn");
|
||||
this.commandKeys.add("mvs");
|
||||
this.permission = "multiverse.world.spawn";
|
||||
this.opRequired = false;
|
||||
this.setName("Spawn");
|
||||
this.setCommandUsage("/mvspawn" + ChatColor.GOLD + " [PLAYER]");
|
||||
this.setArgRange(0, 1);
|
||||
this.addKey("mvspawn");
|
||||
this.addKey("mv spawn");
|
||||
this.addKey("mvs");
|
||||
this.setPermission("multiverse.core.spawn.use", "Teleports target player to the Spawn Point of the world they are in.", PermissionDefault.OP);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,11 +1,15 @@
|
||||
package com.onarandombox.MultiverseCore.commands;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.Permission;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MVTeleport;
|
||||
import com.onarandombox.MultiverseCore.MVWorld;
|
||||
@ -18,16 +22,21 @@ public class TeleportCommand extends MultiverseCommand {
|
||||
|
||||
public TeleportCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Teleport";
|
||||
this.commandDesc = "Teleports target player to a different world. If no player is specified, teleports you instead.";
|
||||
this.commandUsage = "/mvtp " + ChatColor.GOLD + "[PLAYER]" + ChatColor.GREEN + " {WORLD}";
|
||||
this.minimumArgLength = 1;
|
||||
this.maximumArgLength = 2;
|
||||
this.commandKeys.add("mvtp");
|
||||
this.commandKeys.add("mv tp");
|
||||
this.playerTeleporter = new MVTeleport(plugin);
|
||||
this.permission = "multiverse.world.tp";
|
||||
this.opRequired = true;
|
||||
Permission self = new Permission("multiverse.core.tp.self", "Allows you to teleport yourself to other worlds.", PermissionDefault.OP);
|
||||
Permission other = new Permission("multiverse.core.tp.self", "Allows you to teleport yourself to other worlds.", PermissionDefault.OP);
|
||||
this.plugin.getServer().getPluginManager().addPermission(self);
|
||||
this.plugin.getServer().getPluginManager().addPermission(other);
|
||||
Map<String, Boolean> children = new HashMap<String, Boolean>();
|
||||
children.put(self.getName(), true);
|
||||
children.put(other.getName(), true);
|
||||
Permission tp = new Permission("multiverse.core.tp", "Allows teleportation to other worlds.", PermissionDefault.OP, children);
|
||||
|
||||
this.setName("Teleport");
|
||||
this.setCommandUsage("/mvtp " + ChatColor.GOLD + "[PLAYER]" + ChatColor.GREEN + " {WORLD}");
|
||||
this.setArgRange(1, 2);
|
||||
this.addKey("mvtp");
|
||||
this.addKey("mv tp");
|
||||
this.setPermission(tp);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
|
||||
@ -11,15 +12,12 @@ public class UnloadCommand extends MultiverseCommand {
|
||||
|
||||
public UnloadCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Unload World";
|
||||
this.commandDesc = "Unloads a world from Multiverse. This does NOT remove the world folder. This does NOT remove it from the config file.";
|
||||
this.commandUsage = "/mvunload" + ChatColor.GREEN + " {WORLD} ";
|
||||
this.minimumArgLength = 1;
|
||||
this.maximumArgLength = 1;
|
||||
this.commandKeys.add("mvunload");
|
||||
this.commandKeys.add("mv unload");
|
||||
this.permission = "multiverse.world.unload";
|
||||
this.opRequired = true;
|
||||
this.setName("Unload World");
|
||||
this.setCommandUsage("/mvunload" + ChatColor.GREEN + " {WORLD}");
|
||||
this.setArgRange(1, 1);
|
||||
this.addKey("mvunload");
|
||||
this.addKey("mv unload");
|
||||
this.setPermission("multiverse.core.unload", "Unloads a world from Multiverse. This does NOT remove the world folder. This does NOT remove it from the config file.", PermissionDefault.OP);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MVWorld;
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
@ -14,14 +15,11 @@ public class WhoCommand extends MultiverseCommand {
|
||||
|
||||
public WhoCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Who";
|
||||
this.commandDesc = "States who is in what world.";
|
||||
this.commandUsage = "/mvwho" + ChatColor.GOLD + " [WORLD]";
|
||||
this.minimumArgLength = 0;
|
||||
this.maximumArgLength = 1;
|
||||
this.commandKeys.add("mvwho");
|
||||
this.permission = "multiverse.world.list.who";
|
||||
this.opRequired = false;
|
||||
this.setName("Who?");
|
||||
this.setCommandUsage("/mvwho" + ChatColor.GOLD + " [WORLD]");
|
||||
this.setArgRange(0, 1);
|
||||
this.addKey("mvwho");
|
||||
this.setPermission("multiverse.core.list.who", "States who is in what world.", PermissionDefault.TRUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user