mirror of
https://gitlab.com/SamB440/rpgregions-2.git
synced 2025-12-29 19:59:11 +00:00
Fix null error on save command
This commit is contained in:
@@ -217,8 +217,9 @@ public class RPGRegionsCommand {
|
||||
@CommandDescription("Saves configured regions to the `/plugins/RPGRegions/regions` folder. Also saves user data.")
|
||||
@CommandPermission("rpgregions.save")
|
||||
@CommandMethod("rpgregions|rpgr save [async]")
|
||||
public void onSave(CommandSender sender, @Argument(value = "async", suggestions = "async") String asyncArg) {
|
||||
boolean async = asyncArg.equals("--async");
|
||||
public void onSave(CommandSender sender,
|
||||
@Argument(value = "async", suggestions = "async") @Nullable String asyncArg) {
|
||||
boolean async = asyncArg != null && asyncArg.equals("--async");
|
||||
sender.sendMessage(ChatColor.GREEN + "Saving data..." + (async ? ChatColor.GOLD + " (async)" : ""));
|
||||
long startTime = System.currentTimeMillis();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user