Filled Give a player an item when spawning?

Discussion in 'Archived: Plugin Requests' started by LavaAndy, Nov 7, 2013.

  1. Offline

    LavaAndy

    I want all player when they spawn they get a item in this case a clock.Im using #CompassNavigation plugin to teleport to areas.The problem is when they join a game they will loose the clock so i want to make it so that they have the clock everytime they are in lobby or spawn.
     
  2. Offline

    Zarko

    are you asking for help to develop a plugin,or requesting a plugin?
     
  3. Offline

    LavaAndy

    requesting
     
  4. Offline

    Famous Guy

    So a compass and a clock right?
     
  5. Offline

    Necrodoom

    Moved to correct section.
     
  6. Offline

    TheCombatCA

    I'll try this out. PM me your skype name so I know where to send it to. (currently in school when I posted this)
     
  7. Offline

    Ipzen

    If you use Essentials, just make a kit with the stuff you want.
    You can do so they start with some stuff, and / or make kits so they kan use /kit "name" to get that kit, If you use economysystem then you also can set prices on kit, permissions can be used to give certain ppl or groups other stuff.

    So.. for you its easiest to setup that ppl get a kit with clock when they respawn, (after death and ect..) and maybe even make so they can do /kit clock they get a clock

    http://wiki.ess3.net/wiki/Command_Reference/Kits
     
  8. Offline

    timtower Administrator Administrator Moderator

    Or just post a link here like everbody does :p
     
    Famous Guy and vampre1122 like this.
  9. Offline

    calebbfmv

    TheCombatCA
    Just noticing that you have a random "if" statement in you sig, causing some errors with my console:
     
    timtower likes this.
  10. Offline

    LavaAndy

    I have essentials im saying like when a player chooses a kit for kit pvp the player looses the clock so when he wants to go back he looses the clock.
     
  11. Offline

    calebbfmv

    timtower likes this.
  12. Offline

    Ipzen

    Hmm im not sure what you mean, But if you want them to loose that item in a area, just use Worldedit/worldguard and set a flag denying to use that item. And if i remember right you can even make items dissapear in that zone to comeback in inventory when out of the area (if there is room in inventory)
     
  13. Offline

    Commander9292

    Are you using Multiverse? If so, just use MultiverseInventories (I believe it's something like that) and try experimenting with that. I've personally never used it though so I'm not sure if it can even do this. If you're using BungeeCord or Lilypad, I can make a plugin for you that would would need to put onto the Hub/Lobby server.
     
  14. Offline

    LavaAndy

    I do have multiverse and I did have seperated enventorys before I wiped out the my plugins folder.

    But that was like 5 months ago

    That would work but if they play mob arena or any mini game they will loose it

    The clock is the item i replaced the compass with
     
  15. Offline

    CrispyLipz

    LavaAndy Hey, this is simple enough for me to do I think, any devs that can help me? I need a Listener for a player death event and something that when they die it gives them a Clock? It seems really simple but I will probably overthink it... xD I will try :3 If I get snagged I will upload the code and see if anyone else can remedy it ;P
     
  16. Offline

    timtower Administrator Administrator Moderator

    CrispyLipz That code also triggers when somebody wakes up from his / her bed and I am not sure about joining the server
     
  17. Offline

    CrispyLipz

  18. Offline

    Yebol


    http://dev.bukkit.org/bukkit-plugins/custom-join-items/
     
  19. Offline

    CrispyLipz

    Mark as filled please! I've made you a couple and Yebol suggested one too! :)

    Oh if you want to customize the item here is the source:
    Code:java
    1. package info.crispylipz.deathclock;
    2.  
    3. import org.bukkit.event.EventHandler;
    4. import org.bukkit.event.Listener;
    5. import org.bukkit.event.player.PlayerJoinEvent;
    6. import org.bukkit.inventory.ItemStack;
    7. import org.bukkit.plugin.java.JavaPlugin;
    8.  
    9.  
    10. public class DeathClock extends JavaPlugin implements Listener {
    11.  
    12. @Override
    13. public void onEnable() {
    14. getServer().getPluginManager().registerEvents(this, this);
    15. }
    16.  
    17. @EventHandler
    18. public void onPlayerJoin(PlayerJoinEvent event) {
    19. int item = getConfig().getInt("item", 347);
    20. event.getPlayer().getInventory().addItem(new ItemStack(item));
    21. }
    22.  
    23. }


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
  20. Offline

    Yebol


    I'm just tooooo good :D
     
  21. Offline

    LavaAndy

    Thanks by the way how do i mark as filled.

    I'm kind of new to the threads

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
  22. Offline

    timtower Administrator Administrator Moderator

    Top right corner, thread tools, edit thread
     
    AndyMcB1 likes this.

Share This Page