From 801c3a6b756f901f187e8c4b90a41ae7ab57cd14 Mon Sep 17 00:00:00 2001 From: Smyler Date: Thu, 22 Oct 2020 22:12:02 +0200 Subject: [PATCH] Feedback when reloading map styles --- .../thesmyler/terramap/command/TilesetReloadCommand.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/thesmyler/terramap/command/TilesetReloadCommand.java b/src/main/java/fr/thesmyler/terramap/command/TilesetReloadCommand.java index 961f29b8..ea97afc0 100644 --- a/src/main/java/fr/thesmyler/terramap/command/TilesetReloadCommand.java +++ b/src/main/java/fr/thesmyler/terramap/command/TilesetReloadCommand.java @@ -12,6 +12,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.server.MinecraftServer; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.TextComponentString; public class TilesetReloadCommand extends CommandBase { @@ -32,7 +33,12 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args if(sender instanceof EntityPlayer && !PermissionManager.hasPermission((EntityPlayer) sender, Permission.RELOAD_MAP_STYLES)) { throw new CommandException("You do not have the permission to use that command!"); } - MapStyleRegistry.loadFromConfigFile(); + try { + MapStyleRegistry.loadFromConfigFile(); + sender.sendMessage(new TextComponentString("Done")); + } catch(Exception e) { + sender.sendMessage(new TextComponentString("Error")); + } } @Override