Bukkit Plugins
Bukkit Plugins
Content Deleted
Last edited by Samuel98 on Sun Mar 22, 2015 9:35 pm, edited 1 time in total.
![Image](http://comms-centre.samuelzcloud.co.uk/Avatars/Vanir112/la1lmQI-100px.png)
Samuel Carr
Server Developer
W: http://epiccrafts.co.uk
E: [url]mailto://samuel.carr@epiccrafts.co.uk[/url]
Re: Bukkit Plugins
Content Deleted
Last edited by Samuel98 on Sun Mar 22, 2015 9:35 pm, edited 1 time in total.
![Image](http://comms-centre.samuelzcloud.co.uk/Avatars/Vanir112/la1lmQI-100px.png)
Samuel Carr
Server Developer
W: http://epiccrafts.co.uk
E: [url]mailto://samuel.carr@epiccrafts.co.uk[/url]
Re: Bukkit Plugins
You need to join all of the arguments together, the easy way is this
[syntax=java]String message = args[0];
for (int i = 1; i < args.length; ++i){
message += " " + args;
}[/syntax]
Then the variable [i]message will contain all of the arguments with spaces between them.
[syntax=java]String message = args[0];
for (int i = 1; i < args.length; ++i){
message += " " + args;
}[/syntax]
Then the variable [i]message will contain all of the arguments with spaces between them.
Re: Bukkit Plugins
jacek wrote:You need to join all of the arguments together, the easy way is this
[syntax=java]String message = args[0];
for (int i = 1; i < args.length; ++i){
message += " " + args;
}[/syntax]
Then the variable [i]message will contain all of the arguments with spaces between them.
lmao, I remember some of your earlier vids used message = ""; and message += args[i] + " ", which set a space after the string XD
Nice that you've started doing it this way O.o
Re: Bukkit Plugins
offluffy wrote:lmao, I remember some of your earlier vids used message = ""; and message += args[i] + " ", which set a space after the string XD
I did that for ease of explanation. And extras space does not really matter does it ?
Re: Bukkit Plugins
Nah, bugged the hell outta meh when I saw it in the config, but it's all good XD I didn't even think about looping it like that, ended up doing a much more complicated loop @.@ But I think I like this better. Might steal it if I can find the spot I had it before.