Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

I have a bukkit server running on a Raspberry Pi 512MB (personal project for the heck of it) and I thought I'd try inviting some friends (~2/3 can't go over 4 players because of RAM) just for testing.

My problem/question is, does anyone know of a way (preferably not a mod, or a very light one) that I can set up a spawn chest that only they and the Op can access? I would want the stuff in it like a regular spawn chest (Axe, Wood, Sticks, Books explaining the site, etc.) Or, alternatively, set it up so the players spawn again, first time only) in with the books already in their inventory.

I think the first is cooler, but either works.

share|improve this question
    
Would this go better on Stack Overflow? –  RPi Awesomeness Jan 22 at 12:11
    
With command blocks and scoreboards, you can give items directly to new players. It's not quite what you're asking, but it should be possible. –  MBraedley Jan 23 at 13:45
    
@RPiAwesomeness questions like this don't get that much attention on SO –  Jojodmo Feb 14 at 16:05
add comment

2 Answers 2

You can use Essentials Kit/Spawn. Just add your items into the Kit part of the config and add the kit to the Spawn part of the config. More information can be found here: http://wiki.ess3.net/wiki/Command_Reference/Kits

share|improve this answer
    
Sorry, should have said this in my question, but I'd rather not use any more mods, as the server is a Raspberry Pi with 512MB of RAM :) How heavy is this on performance/RAM usage? –  RPi Awesomeness Jan 22 at 19:28
    
I have no idea, lol, but seeing you have the Commandbook plugin, you can just create a kit using that and set a extremely long delay for it. The downside is that the new players need to use the command to get the kit. Just try Essentials, and if your server can't handle it, try the Commandbook solution. –  Darakath Jan 22 at 19:48
add comment

You could make a simple bukkit plugin that gives them items on first spawn... You could use something like:

@EventHandler
public void playerJoin(PlayerJoinEvent e){ //called when player joins
    Player p = e.getPlayer(); //get the player who joined
    if(!p.hasPlayedBefore()){ //check if the player has not played before

        p.getInventory().addItem(Material.IRON_PICKAXE);
        p.getInventory().addItem(Material.IRON_AXE);
        p.getInventory().addItem(Material.IRON_SPADE);
        //give the player an iron pick, iron axe, and iron shovel if it is their first time playing
    }
}

This code would, in words, would do:

When a player joins:
    if the player has not played before:
        give player iron pickaxe
        give player iron axe
        give player iron shovel

if you would like to use custom books, you would have to use ItemStacks, like so:

ItemStack itemStack = new ItemStack(Material.WRITTEN_BOOK); //make a new written book
BookMeta bm = (BookMeta) itStack.getItemMeta; //get the book meta data of the book
bm.setTitle("title"); //set the title to "title"

bm.addPage("page 1"); //set the pages
bm.addPage("page 2");
bm.addPage("page 3");
bm.addPage("page 4");

itemStack.setItemMeta(bm); //set the meta of the book to the above


p.getInventory().addItem(itemStack); //give the player the formatted book
share|improve this answer
    
Very nice answer! I have looked into writing Bukkit plugins for my server, I just haven't been able to do anything with it lately as my Pi's Ethernet/USB ports were fried! (Not my fault, outside action that had nothing to do with the Pi itself) –  RPi Awesomeness Feb 15 at 0:05
    
@RPiAwesomeness If your hosting a server you have to be connected to wifi or something... There's probably a program so that you can connect your computer to your pi and edit files on it. You could code plugins on your regular computer, and transfer them over to your Pi –  Jojodmo Feb 15 at 16:15
    
Doemnico: Yes, that is true, and that is what I was planning on doing. However, seeing as I can't connect to the Pi in any form (Ethernet, USB, WiFi - all dead) I really can't develop. –  RPi Awesomeness Feb 15 at 23:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.