Fixed fallbackPrefix not being lowercased, which would break prefixes for plugins with an uppercase char in the name
This commit is contained in:
parent
0ac6a0bfe6
commit
e304ff739a
@ -87,11 +87,12 @@ public final class SimpleCommandMap implements CommandMap {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String lowerPrefix = fallbackPrefix.trim().toLowerCase();
|
||||||
boolean registerdPassedLabel = true;
|
boolean registerdPassedLabel = true;
|
||||||
|
|
||||||
// If the command exists but is an alias we overwrite it, otherwise we rename it based on the fallbackPrefix
|
// If the command exists but is an alias we overwrite it, otherwise we rename it based on the fallbackPrefix
|
||||||
while (knownCommands.containsKey(lowerLabel) && !aliases.contains(lowerLabel)) {
|
while (knownCommands.containsKey(lowerLabel) && !aliases.contains(lowerLabel)) {
|
||||||
lowerLabel = fallbackPrefix + ":" + lowerLabel;
|
lowerLabel = lowerPrefix + ":" + lowerLabel;
|
||||||
registerdPassedLabel = false;
|
registerdPassedLabel = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user