Skip to content

Commit

Permalink
Feedback when reloading map styles
Browse files Browse the repository at this point in the history
  • Loading branch information
SmylerMC committed Oct 22, 2020
1 parent 92ba35f commit 801c3a6
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -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
Expand Down

0 comments on commit 801c3a6

Please sign in to comment.