mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-09 09:16:34 +00:00
cleanup fabric commands
This commit is contained in:
@@ -8,5 +8,6 @@ public final class CommandUtil {
|
||||
public static void registerAll(CommandManager manager) throws MalformedCommandException {
|
||||
manager.register("structure", StructureCommand.class);
|
||||
manager.register("profile", ProfileCommand.class);
|
||||
manager.register("reload", ReloadCommand.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,23 @@
|
||||
package com.dfsek.terra.commands;
|
||||
|
||||
import com.dfsek.terra.api.TerraPlugin;
|
||||
import com.dfsek.terra.api.command.CommandTemplate;
|
||||
import com.dfsek.terra.api.command.annotation.Command;
|
||||
import com.dfsek.terra.api.injection.annotations.Inject;
|
||||
import com.dfsek.terra.api.platform.CommandSender;
|
||||
import com.dfsek.terra.config.lang.LangUtil;
|
||||
|
||||
@Command()
|
||||
public class ReloadCommand implements CommandTemplate {
|
||||
@Inject
|
||||
private TerraPlugin main;
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender) {
|
||||
|
||||
if(!main.reload()) {
|
||||
LangUtil.send("command.reload-error", sender);
|
||||
} else {
|
||||
LangUtil.send("command.reload", sender);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user