File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Essentials/src/com/earth2me/essentials Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -572,12 +572,18 @@ public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event)
572
572
user .updateActivityOnInteract (broadcast );
573
573
}
574
574
575
- if (ess .getSettings ().isCommandCooldownsEnabled () && pluginCommand != null
575
+ if (ess .getSettings ().isCommandCooldownsEnabled ()
576
576
&& !user .isAuthorized ("essentials.commandcooldowns.bypass" )) {
577
577
final int argStartIndex = event .getMessage ().indexOf (" " );
578
578
final String args = argStartIndex == -1 ? "" // No arguments present
579
579
: " " + event .getMessage ().substring (argStartIndex ); // arguments start at argStartIndex; substring from there.
580
- final String fullCommand = pluginCommand .getName () + args ;
580
+
581
+ final String fullCommand ;
582
+ if (pluginCommand != null ) {
583
+ fullCommand = pluginCommand .getName () + args ;
584
+ } else {
585
+ fullCommand = cmd + args ;
586
+ }
581
587
582
588
// Used to determine whether a user already has an existing cooldown
583
589
// If so, no need to check for (and write) new ones.
You can’t perform that action at this time.
0 commit comments