mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-10-03 01:57:30 +02:00
Sync with the Wiki
This commit is contained in:
parent
77a25ad8e6
commit
ac66c2f3bb
@ -183,9 +183,9 @@ public class MultiverseCore extends JavaPlugin {
|
||||
this.commandHandler.registerCommand(new WhoCommand(this));
|
||||
this.commandHandler.registerCommand(new SpawnCommand(this));
|
||||
// Dangerous Commands
|
||||
this.commandHandler.registerCommand(new UnloadCommand(this));
|
||||
this.commandHandler.registerCommand(new RemoveCommand(this));
|
||||
this.commandHandler.registerCommand(new DeleteCommand(this));
|
||||
this.commandHandler.registerCommand(new UnloadCommand(this));
|
||||
this.commandHandler.registerCommand(new ConfirmCommand(this));
|
||||
// Modification commands
|
||||
this.commandHandler.registerCommand(new PurgeCommand(this));
|
||||
|
@ -23,6 +23,8 @@ public class CoordCommand extends Command {
|
||||
this.minimumArgLength = 0;
|
||||
this.maximumArgLength = 0;
|
||||
this.commandKeys.add("mvcoord");
|
||||
this.permission = "multiverse.world.coord";
|
||||
this.opRequired = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -16,11 +16,13 @@ public class CreateCommand extends Command {
|
||||
public CreateCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Create World";
|
||||
this.commandDesc = "Creates a new world of the specified type";
|
||||
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;
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ public class DeleteCommand extends Command {
|
||||
this.minimumArgLength = 1;
|
||||
this.maximumArgLength = 1;
|
||||
this.commandKeys.add("mvdelete");
|
||||
this.commandKeys.add("mv delete");
|
||||
this.permission = "multiverse.world.delete";
|
||||
this.opRequired = true;
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ public class EnvironmentCommand extends Command {
|
||||
this.minimumArgLength = 0;
|
||||
this.maximumArgLength = 0;
|
||||
this.commandKeys.add("mvenv");
|
||||
this.commandKeys.add("mv env");
|
||||
this.permission = "multiverse.world.list.environments";
|
||||
this.opRequired = false;
|
||||
}
|
||||
|
@ -20,6 +20,8 @@ public class ImportCommand extends Command {
|
||||
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;
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ public class ListCommand extends Command {
|
||||
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;
|
||||
}
|
||||
|
@ -23,6 +23,9 @@ public class ModifyAddCommand extends Command {
|
||||
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;
|
||||
}
|
||||
@ -60,7 +63,7 @@ public class ModifyAddCommand extends Command {
|
||||
|
||||
if (!ModifyCommand.validateAction(Action.Add, property)) {
|
||||
sender.sendMessage("Sorry, you can't ADD to " + property);
|
||||
sender.sendMessage("Please visit our wiki for more information: URLGOESHERE FERNFERRET DON'T FORGET IT!");
|
||||
sender.sendMessage("Please visit our Github Wiki for more information: http://goo.gl/4W8cY");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -20,8 +20,9 @@ public class ModifyClearCommand extends Command {
|
||||
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.commandKeys.add("mvmc");
|
||||
this.permission = "multiverse.world.modify";
|
||||
this.opRequired = true;
|
||||
}
|
||||
@ -57,7 +58,7 @@ public class ModifyClearCommand extends Command {
|
||||
|
||||
if (!ModifyCommand.validateAction(Action.Clear, property)) {
|
||||
sender.sendMessage("Sorry, you can't use CLEAR with " + property);
|
||||
sender.sendMessage("Please visit our wiki for more information: URLGOESHERE FERNFERRET DON'T FORGET IT!");
|
||||
sender.sendMessage("Please visit our Github Wiki for more information: http://goo.gl/cgB2B");
|
||||
return;
|
||||
}
|
||||
if (world.clearList(property)) {
|
||||
|
@ -9,7 +9,7 @@ import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
import com.pneumaticraft.commandhandler.Command;
|
||||
|
||||
enum AddProperties {
|
||||
animallist, monsterlist, blockblacklist, playerwhitelist, playerblacklist, editwhitelist, editblacklist, worldblacklist, animals, monsters
|
||||
blockblacklist, playerwhitelist, playerblacklist, editwhitelist, editblacklist, worldblacklist, animals, monsters
|
||||
}
|
||||
|
||||
enum Action {
|
||||
@ -31,6 +31,7 @@ public class ModifyCommand extends Command {
|
||||
this.minimumArgLength = 1;
|
||||
this.maximumArgLength = 0;
|
||||
this.commandKeys.add("mvmodify");
|
||||
this.commandKeys.add("mvm");
|
||||
this.permission = "multiverse.world.modify";
|
||||
this.opRequired = true;
|
||||
}
|
||||
|
@ -20,9 +20,9 @@ public class ModifyRemoveCommand extends Command {
|
||||
this.minimumArgLength = 2;
|
||||
this.maximumArgLength = 3;
|
||||
this.commandKeys.add("mvmodify remove");
|
||||
this.commandKeys.add("mvmodify r");
|
||||
this.commandKeys.add("mv modify remove");
|
||||
this.commandKeys.add("mvm remove");
|
||||
this.commandKeys.add("mvmremove");
|
||||
this.commandKeys.add("mvmr");
|
||||
this.permission = "multiverse.world.modify";
|
||||
this.opRequired = true;
|
||||
}
|
||||
@ -60,7 +60,7 @@ public class ModifyRemoveCommand extends Command {
|
||||
|
||||
if (!ModifyCommand.validateAction(Action.Remove, property)) {
|
||||
sender.sendMessage("Sorry, you can't REMOVE anything from" + property);
|
||||
sender.sendMessage("Please visit our wiki for more information: URLGOESHERE FERNFERRET DON'T FORGET IT!");
|
||||
sender.sendMessage("Please visit our Github Wiki for more information: http://goo.gl/4W8cY");
|
||||
return;
|
||||
}
|
||||
if (world.removeFromList(property, value)) {
|
||||
|
@ -16,10 +16,13 @@ public class ModifySetCommand extends Command {
|
||||
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.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;
|
||||
}
|
||||
@ -57,7 +60,7 @@ public class ModifySetCommand extends Command {
|
||||
|
||||
if (!ModifyCommand.validateAction(Action.Set, property)) {
|
||||
sender.sendMessage("Sorry, you can't SET " + property);
|
||||
sender.sendMessage("Please visit our wiki for more information: URLGOESHERE FERNFERRET DON'T FORGET IT!");
|
||||
sender.sendMessage("Please visit our Github Wiki for more information: http://goo.gl/l54PH");
|
||||
return;
|
||||
}
|
||||
if (world.setVariable(property, value)) {
|
||||
|
@ -23,6 +23,7 @@ public class PurgeCommand extends Command {
|
||||
this.minimumArgLength = 1;
|
||||
this.maximumArgLength = 2;
|
||||
this.commandKeys.add("mvpurge");
|
||||
this.commandKeys.add("mv purge");
|
||||
this.permission = "multiverse.world.purge";
|
||||
this.opRequired = true;
|
||||
}
|
||||
@ -48,12 +49,19 @@ public class PurgeCommand extends Command {
|
||||
deathName = args.get(1);
|
||||
}
|
||||
|
||||
if (!((MultiverseCore) this.plugin).isMVWorld(worldName)) {
|
||||
if (!worldName.equalsIgnoreCase("all") && !((MultiverseCore) this.plugin).isMVWorld(worldName)) {
|
||||
sender.sendMessage("Multiverse doesn't know about " + worldName);
|
||||
sender.sendMessage("... so It cannot be purged");
|
||||
return;
|
||||
}
|
||||
MVWorld world = ((MultiverseCore) this.plugin).getMVWorld(worldName);
|
||||
|
||||
List<MVWorld> worldsToRemoveEntitiesFrom = new ArrayList<MVWorld>();
|
||||
// Handle all case any user who names a world "all" should know better...
|
||||
if (worldName.equalsIgnoreCase("all")) {
|
||||
worldsToRemoveEntitiesFrom.addAll(((MultiverseCore) this.plugin).getMVWorlds());
|
||||
} else {
|
||||
worldsToRemoveEntitiesFrom.add(((MultiverseCore) this.plugin).getMVWorld(worldName));
|
||||
}
|
||||
|
||||
PurgeWorlds purger = ((MultiverseCore) this.plugin).getWorldPurger();
|
||||
ArrayList<String> thingsToKill = new ArrayList<String>();
|
||||
@ -62,7 +70,9 @@ public class PurgeCommand extends Command {
|
||||
} else {
|
||||
Collections.addAll(thingsToKill, deathName.toUpperCase().split(","));
|
||||
}
|
||||
purger.purgeWorld(sender, world, thingsToKill, false, false);
|
||||
for (MVWorld w : worldsToRemoveEntitiesFrom) {
|
||||
purger.purgeWorld(sender, w, thingsToKill, false, false);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -12,19 +12,21 @@ public class ReloadCommand extends Command {
|
||||
|
||||
public ReloadCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.commandName = "Reload worlds.yml";
|
||||
this.commandDesc = "Reloads all worlds that are in worlds.yml. Use this if you've modified worlds.yml.";
|
||||
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.permission = "multiverse.world.reload";
|
||||
this.commandKeys.add("mv reload");
|
||||
this.commandKeys.add("mvr");
|
||||
this.permission = "multiverse.reload";
|
||||
this.opRequired = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void runCommand(CommandSender sender, List<String> args) {
|
||||
((MultiverseCore) this.plugin).log(Level.INFO, "Reloading Multiverse-Core config");
|
||||
((MultiverseCore) this.plugin).log(Level.INFO, "Reloading Multiverse-Core config.yml and worlds.yml");
|
||||
((MultiverseCore) this.plugin).loadConfigs();
|
||||
((MultiverseCore) this.plugin).loadWorlds(true);
|
||||
((MultiverseCore) this.plugin).log(Level.INFO, "Reload Complete!");
|
||||
|
@ -18,6 +18,7 @@ public class RemoveCommand extends Command {
|
||||
this.minimumArgLength = 1;
|
||||
this.maximumArgLength = 1;
|
||||
this.commandKeys.add("mvremove");
|
||||
this.commandKeys.add("mv remove");
|
||||
this.permission = "multiverse.world.remove";
|
||||
this.opRequired = true;
|
||||
}
|
||||
|
@ -20,6 +20,8 @@ public class SetSpawnCommand extends Command {
|
||||
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;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ public class SleepCommand extends Command {
|
||||
this.maximumArgLength = 0;
|
||||
this.commandKeys.add("mv sleep");
|
||||
this.permission = "multiverse.sleep";
|
||||
this.opRequired = false;
|
||||
this.opRequired = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -19,28 +19,30 @@ public class SpawnCommand extends Command {
|
||||
this.minimumArgLength = 0;
|
||||
this.maximumArgLength = 1;
|
||||
this.commandKeys.add("mvspawn");
|
||||
this.permission = "multiverse.world.spawn.self";
|
||||
this.commandKeys.add("mv spawn");
|
||||
this.commandKeys.add("mvs");
|
||||
this.permission = "multiverse.world.spawn";
|
||||
this.opRequired = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void runCommand(CommandSender sender, List<String> args) {
|
||||
Player commandSender = null;
|
||||
Player player = null;
|
||||
if (sender instanceof Player) {
|
||||
commandSender = (Player) sender;
|
||||
player = (Player) sender;
|
||||
}
|
||||
// If a persons name was passed in, you must be A. the console, or B have permissions
|
||||
if (args.size() == 1) {
|
||||
if (commandSender != null && !((MultiverseCore) this.plugin).getPermissions().hasPermission(commandSender, "multiverse.world.spawn.other", true)) {
|
||||
sender.sendMessage("You don't have permission to teleport another player to spawn.");
|
||||
if (player != null && !((MultiverseCore) this.plugin).getPermissions().hasPermission(player, "multiverse.world.spawn.other", true)) {
|
||||
sender.sendMessage("You don't have permission to teleport another player to spawn. (multiverse.world.spawn.other)");
|
||||
return;
|
||||
}
|
||||
Player target = this.plugin.getServer().getPlayer(args.get(0));
|
||||
if (target != null) {
|
||||
target.sendMessage("Teleporting to this world's spawn...");
|
||||
target.teleport(target.getWorld().getSpawnLocation());
|
||||
if (commandSender != null) {
|
||||
target.sendMessage("You were teleported by: " + ChatColor.YELLOW + commandSender.getName());
|
||||
if (player != null) {
|
||||
target.sendMessage("You were teleported by: " + ChatColor.YELLOW + player.getName());
|
||||
} else {
|
||||
target.sendMessage("You were teleported by: " + ChatColor.LIGHT_PURPLE + "the console");
|
||||
}
|
||||
@ -48,9 +50,13 @@ public class SpawnCommand extends Command {
|
||||
sender.sendMessage(args.get(0) + " is not logged on right now!");
|
||||
}
|
||||
} else {
|
||||
if (commandSender != null) {
|
||||
commandSender.sendMessage("Teleporting to this world's spawn...");
|
||||
commandSender.teleport(commandSender.getWorld().getSpawnLocation());
|
||||
if (player != null && !((MultiverseCore) this.plugin).getPermissions().hasPermission(player, "multiverse.world.spawn.self", true)) {
|
||||
sender.sendMessage("You don't have permission to teleport yourself to spawn. (multiverse.world.spawn.self)");
|
||||
return;
|
||||
}
|
||||
if (player != null) {
|
||||
player.sendMessage("Teleporting to this world's spawn...");
|
||||
player.teleport(player.getWorld().getSpawnLocation());
|
||||
} else {
|
||||
sender.sendMessage("From the console, you must provide a PLAYER.");
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ public class TeleportCommand extends Command {
|
||||
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;
|
||||
|
@ -18,6 +18,7 @@ public class UnloadCommand extends Command {
|
||||
this.minimumArgLength = 1;
|
||||
this.maximumArgLength = 1;
|
||||
this.commandKeys.add("mvunload");
|
||||
this.commandKeys.add("mv unload");
|
||||
this.permission = "multiverse.world.unload";
|
||||
this.opRequired = true;
|
||||
}
|
||||
|
@ -47,6 +47,26 @@ commands:
|
||||
usage: |
|
||||
/<command> <world> <option>:<value>
|
||||
/<command> creative pvp:false -- Turns off PVP in the 'creative' world.
|
||||
mvmset:
|
||||
description: Modify the settings of an existing world
|
||||
usage: |
|
||||
/<command> <world> <option>:<value>
|
||||
/<command> creative pvp:false -- Turns off PVP in the 'creative' world.
|
||||
mvmadd:
|
||||
description: Modify the settings of an existing world
|
||||
usage: |
|
||||
/<command> <world> <option>:<value>
|
||||
/<command> creative pvp:false -- Turns off PVP in the 'creative' world.
|
||||
mvmremove:
|
||||
description: Modify the settings of an existing world
|
||||
usage: |
|
||||
/<command> <world> <option>:<value>
|
||||
/<command> creative pvp:false -- Turns off PVP in the 'creative' world.
|
||||
mvmclear:
|
||||
description: Modify the settings of an existing world
|
||||
usage: |
|
||||
/<command> <world> <option>:<value>
|
||||
/<command> creative pvp:false -- Turns off PVP in the 'creative' world.
|
||||
mvm:
|
||||
description: Modify the settings of an existing world
|
||||
usage: |
|
||||
@ -109,6 +129,9 @@ commands:
|
||||
mvreload:
|
||||
description: Reload Configuration files.
|
||||
usage: /<command>
|
||||
mvr:
|
||||
description: Reload Configuration files.
|
||||
usage: /<command>
|
||||
mvpurge:
|
||||
description: Purge the targetted world of creatures.
|
||||
usage: |
|
||||
|
Loading…
Reference in New Issue
Block a user