Filled LuckyItem

Discussion in 'Plugin Requests' started by adi0115, Nov 11, 2017.

Thread Status:
Not open for further replies.
  1. Plugin category: Fun

    Minecraft version: 1.8

    Suggested name: LuckyItem

    What I want: When someone clicks a block that has been set in the config, they get a item that has been configured in the config with custom name and lore with a cooldown set in the config with the chance percantage of getting that item.

    Exmaple of a config:
    Code:
    clickable-block: diamond_block
    #Cooldown in ticks
    cooldown: 400
    Possible items: 'stone_sword':name:'&3Sword':lore:'Custom':chance:25%
    no-permission:&4Sorry, you don't have permission
    cooldown:&2Please wait %cooldown% to use this again
    clickable-block: stone
    #Cooldown in ticks
    cooldown: 600
    Possible items: 'diamond_sword':name:'&3Sword':lore:'Custom':chance:25%
    no-permission:&4Sorry, you don't have permission
    cooldown:&2Please wait %cooldown% to use this again
    Ideas for commands:
    - /li reload - reloads the config - ops only

    Ideas for permissions:
    - li.use - allows you to right click the block

    When I'd like it by: By the end of next week
     
    Last edited: Nov 12, 2017
  2. Offline

    wackoflying26

    I may be able to create this for you, the only problem is, I will not be setting the configuration up that way. It's very inconvenient and messy.

    Would this configuration work?
    Code:
    lucky-block-item: sponge
    click-cooldown: 400 #in seconds/ticks
    
    items:
       'sword':
          permission-required: false
          permission: lucky.obtain.sword
          percentage: 25
          name: "&eExample"
          lore: "&5This is an example item"
          amount: 1
          enchantments:
             DAMAGE_ALL: 5
             FIRE_ASPECT: 2
     
  3. @wackoflying26 Ofcourse, I didn't want it to be excatly that, I just wanted to show what things I wanted in the config and exmaple of it just so nothing gets missed.
     
  4. Offline

    RunsWithShovels

    @adi0115
    I'm finishing with cleaning up the code, then I'll upload it for you.

    EDIT:
    Here it is.

    You can add as many type of 'lucky blocks' that you want, just follow the format in the config.

    Permissions for each block is set in the config.

    Permission for using /luckyreload is lucky.reload

    Also this will only work with versions without duel wielding, as it will cause unwanted effects with those versions.
     

    Attached Files:

    Last edited: Nov 26, 2017
  5. @RunsWithShovels Thanks a lot, I'll check it out as soon as I can, would you be able to do a 1.9 version by any chance? I have plans to upate it the future, thanks.
     
  6. Offline

    RunsWithShovels

    It should work with any version less than 1.10, there isn't any nms code in it.

    Sent from my Nexus 6 using Tapatalk
     
  7. @RunsWithShovels Would you be able to fix the colour codes in names? They don't seem to work, codes show up as text, thanks.
     
  8. Offline

    RunsWithShovels

    I need screen shots. Also what server version are you using?
     
  9. 1.9 @RunsWithShovels
    [​IMG]
    [​IMG]
    The colour codes work just fine for lores, but not for names
     
    Last edited: Dec 27, 2017
  10. Offline

    RunsWithShovels

    Attached Files:

  11. @RunsWithShovels I think theres a bug with the cooldown timer, I have set it to 600 seconds which is 10 minutes but it seems people are able to claim items quicker, from what players were saying, it seems the cooldown reset for others when someone uses the block, so players in groups of 10 started camping by the block claiming items every 30-60 seconds.
     
  12. Offline

    RunsWithShovels

    Attached Files:

Thread Status:
Not open for further replies.

Share This Page