#Command autocomplete
1 messages · Page 1 of 1 (latest)
stop doing complete on args[0] and do it on args[1]
how tho
type 1 instead of 0
I'm new to this
your code literally looks for a single args
Im trying to make it depend on the first argument
so do a check for that as well then
I don't understand, you want them to type /command paste then your cache gets shown?
well your code needs to test for length = 2
2 is when the player has pressed space after typing paste
alr
also why not make the class where your command is also implement TabCompleter
makes it much more clean
This is just an experimenting/learning plugin
ah alr
I'd recommend getting into https://github.com/Incendo/cloud with cloud-minecraft-extras, saves a lot of time
handles autocompletion and different command types for you while still being able to add your own parsers
also useful if you want to port your commands to a different platform, eg bungee -> velocity or paper -> jda, etc etc
(@hard raft for the notification)