Skip to content

Commit a2cefd7

Browse files
committed
Change command requirements for base command. Fixes #52
1 parent 0fe7cf9 commit a2cefd7

File tree

1 file changed

+6
-1
lines changed
  • BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands

1 file changed

+6
-1
lines changed

BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/Commands.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public void init() {
8787
// commands
8888
LiteralCommandNode<S> baseCommand =
8989
literal("bluemap")
90-
.requires(requirements("bluemap.status"))
90+
.requires(requirementsUnloaded("bluemap.status"))
9191
.executes(this::statusCommand)
9292
.build();
9393

@@ -277,6 +277,11 @@ private Optional<UUID> parseUUID(String uuidString) {
277277
public int statusCommand(CommandContext<S> context) {
278278
CommandSource source = commandSourceInterface.apply(context.getSource());
279279

280+
if (!plugin.isLoaded()) {
281+
source.sendMessage(Text.of(TextColor.RED, "BlueMap is not loaded! Try /bluemap reload"));
282+
return 0;
283+
}
284+
280285
source.sendMessages(helper.createStatusMessage());
281286
return 1;
282287
}

0 commit comments

Comments
 (0)