#Get String from 2+ arguments
1 messages · Page 1 of 1 (latest)
String.join
String.join
too easy and complicated at same time
@Override
public boolean onCommand(CommandSender sender, Command command, String alias, String[] args) {
if(String.join(" ",args).equals("yes this is a string")) {
System.out.println("This seems to be a String.");
}
}
lol
now better, thanks 😂
I need something like this
and this code does really nothing
I should save string.join in another string ?
What does it print?
Try converting args to list
I'm really new to spigot and java
Check if the block is even evaluated
Did you set executor
Or is this method in your main class
yea command works
How did you ensure that
Ah ok
Then i guess you can try this
Arrays.asList()
thanks
Not very sure why, but this should work tho
specially you
Huh how does that work when the previous version doesnt print anything
I registeret a command to 2 classases
and some bad thing .. nvm