I need a plugin that will gift or give new players items on their first login only. If there already is one, I couldn't find it and would love a link to one. Thanks
I like this idea, shouldn't be too hard either. Just a simple hashmap check upon logon. I will start working on this!
@kmccmk9 : on player join you can just check the levelname/players folder to see if the player has ever been in the game.
yes, that it could, and it would actualy be easyer, join a server and on open inventory achievement give them an item.
go ahead I guess, just probably using one of the listed methods above could check to see if a player has been in the world before without making a saving script. you mine if I attempt it too?
Oo, what i'm saying is there is no need for a saving feature, as the world/players folder holds all players that have been in the game, you can just use that to see if they've ever been it. I'm actually almost done with mine, just got to test it, mine also will come with a file where you can define the items they get and the amount, and in-game you can remove and add items with: /loginrewards add|remove MaterialName Amount{Max=64}
um, I said go right ahead, in fact my method of finding out if a player has joined before failed, I thought maybe the player file didn't appear in the folder until a little after, but the file saves there instantly, therefore it think the player has been in before. Also the Configuration class will not seem to read the file even though it exists, so I made my own file reader and writer, and I think that's working better.
yah, like I said go right ahead. I'm still trying but most likely you'll do better anyways, I'm fairly new.
yeah, hope you have better luck with the loading, the saving is working actually very well and my own system of keeping track of the players I think is unique, only other thing that does it that I've found is bukkit itself. In the plugins/LoginRewards/DO_NOT_DELETE/worldname there will be a blank .sty file for every player that has joined. unfortunately I have been cursed with not ever having luck with loading... I have a config file like this: PHP: Rewards: Stone:'10' Dirt:'10' Wood_Spade:'1' Wood_Pickaxe:'1' Wood_Axe:'1' yet getting the config I can't get them, I used getKeys("Rewards") and it returned null...
Isn't getting things from the config file, in this case String.parseInt("Stone")? I'm not sure I'm doing another plugin that uses a similar feature so I'm just as bad if not worse than you lol. I'm watching my support thread about it religiously though.
not really, getting the property should return a string with the number in it, then I use Integer.valueOf(string), but string ends up being null and therefore error...
I actually have made considerable progress, only the config file is left and that's giving me a problem and errors, so hopefully soon.
There is one i'm sure i had it. Edit: http://forums.bukkit.org/threads/me...s-that-join-some-defined-items-766-815.17637/ Maybe i should not have said since someone has already made one
that's a bit too different, you have to add people to the started kits, you have to import a directory, ect... plus I looked at the source and it gives it the first time period the person logs in, however, when you swich worlds you start with new inv, so I the one I'm making gives it based on worlds as well, if you are first joining a certain world it'll give you items. So it's a little different