mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-29 05:55:57 +01:00
Change command requirements for base command. Fixes #52
This commit is contained in:
parent
0fe7cf94a9
commit
a2cefd78aa
@ -87,7 +87,7 @@ public void init() {
|
||||
// commands
|
||||
LiteralCommandNode<S> baseCommand =
|
||||
literal("bluemap")
|
||||
.requires(requirements("bluemap.status"))
|
||||
.requires(requirementsUnloaded("bluemap.status"))
|
||||
.executes(this::statusCommand)
|
||||
.build();
|
||||
|
||||
@ -277,6 +277,11 @@ private Optional<UUID> parseUUID(String uuidString) {
|
||||
public int statusCommand(CommandContext<S> context) {
|
||||
CommandSource source = commandSourceInterface.apply(context.getSource());
|
||||
|
||||
if (!plugin.isLoaded()) {
|
||||
source.sendMessage(Text.of(TextColor.RED, "BlueMap is not loaded! Try /bluemap reload"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
source.sendMessages(helper.createStatusMessage());
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user