mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-25 20:16:00 +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
|
// commands
|
||||||
LiteralCommandNode<S> baseCommand =
|
LiteralCommandNode<S> baseCommand =
|
||||||
literal("bluemap")
|
literal("bluemap")
|
||||||
.requires(requirements("bluemap.status"))
|
.requires(requirementsUnloaded("bluemap.status"))
|
||||||
.executes(this::statusCommand)
|
.executes(this::statusCommand)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
@ -277,6 +277,11 @@ private Optional<UUID> parseUUID(String uuidString) {
|
|||||||
public int statusCommand(CommandContext<S> context) {
|
public int statusCommand(CommandContext<S> context) {
|
||||||
CommandSource source = commandSourceInterface.apply(context.getSource());
|
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());
|
source.sendMessages(helper.createStatusMessage());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user