mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-01-07 08:47:37 +01:00
Modifying world values now persists again! (When the hell did this break???)
This commit is contained in:
parent
807c8d0f2c
commit
319a701a16
@ -85,6 +85,9 @@ public class ModifyAddCommand extends MultiverseCommand {
|
||||
if (world.addToVariable(property, value)) {
|
||||
sender.sendMessage(ChatColor.GREEN + "Success! " + ChatColor.AQUA
|
||||
+ value + ChatColor.WHITE + " was " + ChatColor.GREEN + "added to " + ChatColor.GREEN + property);
|
||||
if (!plugin.saveWorldConfig()) {
|
||||
sender.sendMessage(ChatColor.RED + "There was an issue saving worlds.yml! Your changes will only be temporary!");
|
||||
}
|
||||
} else {
|
||||
sender.sendMessage(value + " could not be added to " + property);
|
||||
}
|
||||
|
@ -80,6 +80,9 @@ public class ModifyClearCommand extends MultiverseCommand {
|
||||
sender.sendMessage(property + " was cleared. It contains 0 values now.");
|
||||
sender.sendMessage(ChatColor.GREEN + "Success! " + ChatColor.AQUA + property + ChatColor.WHITE + " was "
|
||||
+ ChatColor.GREEN + "CLEARED" + ChatColor.WHITE + ". It contains " + ChatColor.LIGHT_PURPLE + "0" + ChatColor.WHITE + " values now.");
|
||||
if (!plugin.saveWorldConfig()) {
|
||||
sender.sendMessage(ChatColor.RED + "There was an issue saving worlds.yml! Your changes will only be temporary!");
|
||||
}
|
||||
} else {
|
||||
sender.sendMessage(ChatColor.RED + "Error: " + ChatColor.GOLD + property
|
||||
+ ChatColor.WHITE + " was " + ChatColor.GOLD + "NOT" + ChatColor.WHITE + " cleared.");
|
||||
|
@ -85,6 +85,9 @@ public class ModifyRemoveCommand extends MultiverseCommand {
|
||||
if (world.removeFromVariable(property, value)) {
|
||||
sender.sendMessage(ChatColor.GREEN + "Success! " + ChatColor.AQUA + value + ChatColor.WHITE
|
||||
+ " was " + ChatColor.RED + "removed from " + ChatColor.GREEN + property);
|
||||
if (!plugin.saveWorldConfig()) {
|
||||
sender.sendMessage(ChatColor.RED + "There was an issue saving worlds.yml! Your changes will only be temporary!");
|
||||
}
|
||||
} else {
|
||||
sender.sendMessage(ChatColor.RED + "There was an error removing " + ChatColor.GRAY
|
||||
+ value + ChatColor.WHITE + " from " + ChatColor.GOLD + property);
|
||||
|
@ -111,6 +111,9 @@ public class ModifySetCommand extends MultiverseCommand {
|
||||
if (world.setPropertyValue(property, value)) {
|
||||
sender.sendMessage(ChatColor.GREEN + "Success!" + ChatColor.WHITE + " Property " + ChatColor.AQUA + property
|
||||
+ ChatColor.WHITE + " was set to " + ChatColor.GREEN + value);
|
||||
if (!plugin.saveWorldConfig()) {
|
||||
sender.sendMessage(ChatColor.RED + "There was an issue saving worlds.yml! Your changes will only be temporary!");
|
||||
}
|
||||
} else {
|
||||
sender.sendMessage(ChatColor.RED + world.getPropertyHelp(property));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user