mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Implement basic Forge suggestions
This commit is contained in:
committed by
Kenzie Togami
parent
8a3e6a12b9
commit
067a570df0
@ -567,8 +567,9 @@ public final class PlatformCommandManager {
|
||||
|
||||
event.setSuggestions(suggestions.stream()
|
||||
.map(suggestion -> {
|
||||
int noSlashLength = arguments.length() - 1;
|
||||
Substring original = suggestion.getReplacedArgument() == split.size()
|
||||
? Substring.from(arguments, arguments.length() - 1)
|
||||
? Substring.from(arguments, noSlashLength, noSlashLength)
|
||||
: split.get(suggestion.getReplacedArgument());
|
||||
// increase original points by 1, for removed `/` in `parseArgs`
|
||||
return Substring.wrap(
|
||||
|
Reference in New Issue
Block a user