[REQ] Give random items [FORMATTED]

Discussion in 'Archived: Plugin Requests' started by ggmike, May 9, 2012.

  1. Offline

    ggmike

    Suggested name: RandomGive

    A bit about me: I own a medium (24 slots) server with 7 people average online every hour.

    What I want: I want a plugin that will give people a random item and announce it whenever I execute a command. I want it to create a config file where I want to be able to configure separately every item with it's own possible amount (e.x. 5 - 64) and it's own message.

    Ideas for commands: /reward <NAME>

    Ideas for permissions: randomgive.use

    When I'd like it by: I could wait like for a week or maybe more so that there is a good result.

    Similar plugin requests: None.

    Devs who might be interested in this: I wish I knew some :(
     
  2. Offline

    zathrus

    hey there... this seems to be a rather frequent request, so I'll be implementing very similar feature into CommandsEX today

    it already has kits functionality - i.e. you can give out predefined sets of items to players, so what I would do is to add an optional broadcast message when you give a kit to another player

    it's not random though, you'd pick a reward (kit) from a predefined list that you create in a config file

    it that's good enough for you, let me know and I'll post an update once a new release of CommandsEX is ready later today
     
  3. Offline

    ggmike

    Well what I want is the plugin to automatically select a random item and not me typing a command to give an item I want. That random item by the plugin is what I'm looking for.
     
  4. Offline

    Tiko

    I'll try working on that for my first plugin, i'll get back at you if i get somewhere :)
     
  5. Offline

    ggmike

    I would be really happy to test it! If there is anyone else who would like to make such a plugin I would be happy to test it!
     
  6. Offline

    ggmike

    Any results?
     
  7. Offline

    ggmike

    Guys I really need that plugin!

    Bump. No results yet

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  8. Offline

    ggmike

    Come on guys -.- Is it so hard to make?
     
  9. Offline

    JayzaSapphire

    Could work on this for you :) Seems easy.
     
  10. Offline

    ggmike

    I would be so glad if you could make such a plugin!
     
  11. Offline

    ggmike

    Guys you can't understand how much I need this plugin!
    Please message me when you start making it!
    There are no results yet and I really need it!
     
  12. Offline

    ggmike

    Could someone at least tell me if it's possible?
     
  13. Offline

    yodogger

    I'll try this, however I'll need you to add me on Skype for me to finalize any small details there may be. Add yodogger1
     
  14. Offline

    ggmike

    I haven't received a response yet so I'm open to any help..
     
  15. Offline

    ggmike

    I guess nobody can make this -.-
     
  16. Offline

    ddeckys

    Seriously, I don't want to here it.

    If it's that easy, make it yourself.
     
    jtjj222 likes this.
  17. Offline

    ggmike

    No offense... I just asked if it's difficult or not.
     
  18. Offline

    BobbyD441

    I'll have a crack at this, any item will do, random?
    So no config list with possible rewards?

    Just looking for a good way to get a random item id's rest is 'done' (not tested), but thanks for the offer =)

    There you go =)

    Add permission - randomreward.give to give rewards
    /reward <playername>

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  19. Offline

    LegoPal92

    BobbyD441 I don't mean to be pushy, but I am just learning java, but i was wondering if you would load your source code, i wouldn't publish it with any changes, i just want to learn more. it would be nice to know more, can you please do this for me? I want to learn how to make awesome plugins like this, and others. My eventual goal is to make a full set of plugins that will be perfect to use on my server.
     
  20. Offline

    ddeckys

    Learn Java

    Then learn the Bukkit API: http://jd.bukkit.org/apidocs
     
  21. Offline

    np98765

    Some people learn best when looking at examples; tutorials aren't for everyone.
     
  22. Offline

    LegoPal92

    I learn best with examples to look at, just as np98765 said. If you are unwilling to help, i will look at other example, i just figured that with it being a new project, that it would be okay to ask to look at the source code.
    I guess that it was not, i am sorry if i asked too much of you, I will not assume that people like to share their work right once they have done it, anymore, unless they offer. I can take a look at the API, but i most likely will not understand it. I am new to the world of programming. Therefore, i just wanted an example. Again, I am sorry if i asked too much.
     
  23. Offline

    np98765

    No! BobbyD441 never said no... That was ddeckys comment. Who knows, BobbyD441 might be willing to! (Always check who write the comment. It can reduce confusion). :)
     
  24. Offline

    ggmike

    Huge thanks for putting some time to help me but for some reason it says that it couldn't load the plugin. So it's not working...
     
  25. Offline

    BobbyD441

  26. Offline

    ggmike

  27. Offline

    BobbyD441

    Can you post the error please?

    Edit:

    Also what version of bukkit do you use?
     
  28. Offline

    ggmike

    BobbyD441
    Here is the error. And also I'm using the latest recommended version of craftbukkit. (1.2.5-R2.0)

    Code:
    2012-05-22 14:06:05 [SEVERE] Could not load 'plugins\RandomRewardJ6.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: bobbyd441/mc/rr/RandomReward : Unsupported major.minor version 51.0
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:150)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:213)
        at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:189)
        at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:53)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:157)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:423)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Caused by: java.lang.UnsupportedClassVersionError: bobbyd441/mc/rr/RandomReward : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:139)
        ... 8 more
    @BobbyD441
    Sent you a pm about some fixes I want...

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Sep 7, 2018
  29. Offline

    BobbyD441


    Yeah this is a java version problem, i thought compiling in 6 should fix this. But let me have a look =)

    ggmike There yah go =)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  30. Offline

    LegoPal92

    Thank you so much for the source code, it will help me sooooo much! BobbyD441 you deserve a whole stack of diamonds for your generosity!
     

Share This Page