Bukkit Plugins

Any help topics that don't fit in the current categories can go here.
Post Reply
User avatar
Samuel98
Posts: 46
Joined: Wed Oct 05, 2011 1:20 am
Location: United Kingdom
Contact:

Bukkit Plugins

Post by Samuel98 »

Content Deleted
Last edited by Samuel98 on Sun Mar 22, 2015 9:35 pm, edited 1 time in total.
Image

Samuel Carr
Server Developer
W: http://epiccrafts.co.uk
E: [url]mailto://samuel.carr@epiccrafts.co.uk[/url]
User avatar
Samuel98
Posts: 46
Joined: Wed Oct 05, 2011 1:20 am
Location: United Kingdom
Contact:

Re: Bukkit Plugins

Post by Samuel98 »

Content Deleted
Last edited by Samuel98 on Sun Mar 22, 2015 9:35 pm, edited 1 time in total.
Image

Samuel Carr
Server Developer
W: http://epiccrafts.co.uk
E: [url]mailto://samuel.carr@epiccrafts.co.uk[/url]
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Bukkit Plugins

Post by jacek »

You need to join all of the arguments together, the easy way is this
String message = args[0];

for (int i = 1; i < args.length; ++i){
    message += " " + args;
}

Then the variable message will contain all of the arguments with spaces between them.
Image
User avatar
offluffy
Posts: 65
Joined: Tue Mar 20, 2012 7:04 am

Re: Bukkit Plugins

Post by offluffy »

jacek wrote:You need to join all of the arguments together, the easy way is this
String message = args[0];

for (int i = 1; i < args.length; ++i){
    message += " " + args;
}

Then the variable message will contain all of the arguments with spaces between them.


lmao, I remember some of your earlier vids used message = ""; and message += args + " ", which set a space after the string XD
Nice that you've started doing it this way O.o
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Bukkit Plugins

Post by jacek »

offluffy wrote:lmao, I remember some of your earlier vids used message = ""; and message += args + " ", which set a space after the string XD

I did that for ease of explanation. And extras space does not really matter does it ?
Image
User avatar
offluffy
Posts: 65
Joined: Tue Mar 20, 2012 7:04 am

Re: Bukkit Plugins

Post by offluffy »

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.
Post Reply