Skip to content

Commit 6d15b6d

Browse files
committed
Updated AbstractCommand to be more verbose for reasons that the command failed/no permission/etc
1 parent 04b3503 commit 6d15b6d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/main/java/org/mangorage/mangobotcore/api/command/v1/AbstractCommand.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ public R execute(CommandContext<C> ctx) {
150150
if (getPermissionNode().hasPermission(ctx)) {
151151
return run(ctx);
152152
} else {
153+
result.addMessage("Missing access to %s permission node".formatted(getPermissionNode().getId()));
153154
return getNoPermission();
154155
}
155156
}
@@ -172,6 +173,7 @@ public R execute(CommandContext<C> ctx) {
172173
if (getPermissionNode().hasPermission(ctx)) {
173174
return run(ctx);
174175
} else {
176+
result.addMessage("Missing access to %s permission node".formatted(getPermissionNode().getId()));
175177
return getNoPermission();
176178
}
177179
} catch (Throwable t) {

0 commit comments

Comments
 (0)