[GEN] OddGive 0.9.1 - Item giving (and taking) [1.2.5-R1.0]

Discussion in 'Inactive/Unsupported Plugins' started by petteyg359, Feb 16, 2011.

  1. Offline


    See OddGive on dev.bukkit.org.

    A not-so-basic /give plugin. Uses OddItem.

    /give command accepts multiple player names and multiple items with optional quantities
    /give command is restricted to giving items to others
    /i command accepts multiple items with optional quantities
    /i command is restricted to giving items to self
    /i0 command allows clearing inventories of self or other players (depending on permissions) - accepts multiple items and quantities, or no item parameters to clear inventory completely

    See OddGive on dev.bukkit.org.
    MasterMeNL and ne0nx3r0 like this.
  2. Offline


    Will check that.
  3. Offline


    This happens when I try to use the standard /give command (OddIteam alone works!)

    20:40:01 [SCHWERWIEGEND] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'give' in plugin OddGive v0.7.9
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:233)
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:594)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:557)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:551)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.NullPointerException
    at info.somethingodd.bukkit.OddItem.bktree.BKTree.findBestWordMatch(BKTree.java:75)
    at info.somethingodd.bukkit.OddItem.OddItem.findItem(OddItem.java:40)
    at info.somethingodd.bukkit.OddItem.OddItem.getItemStack(OddItem.java:80)
    at info.somethingodd.bukkit.OddGive.OddGive.give(OddGive.java:57)
    at info.somethingodd.bukkit.OddGive.OddGive.onCommand(OddGive.java:169)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more

    whats wrong? is it the new minecraft version 1.4_1 ?

    EDIT: could it be that I have to give the items names first?

    Thank you
  4. Offline


    Your item.txt is probably empty. The next version of OddItem will fix that.
  5. Offline


    Ah that was the problem! Thanks!

    EDIT: Oh no, the item.txt is not complete... that's sad, does anyone have an items.txt with ALL ids? :p
  6. Offline


    Download OddGive-0.8-alpha.jar, and add !DEFAULT to your give.txt. It will work for all Bukkit items, then. No guarantee that it works with the blacklist/whitelist yet.
    !DEFAULT was added to OddItem. If you're using this 0.8, get the latest OddItem and go back to 0.7.9 OddGive :)
  7. Offline


    Hi, I now customized my item.txt a bit with changed and additional id names. (Didnt use your 0.8 alpha version yet)

    But now when I start the server I get this error message:

    09:47:13 [SCHWERWIEGEND] 1 loading OddItem v0.6.3 (Is it up to date?)
    java.lang.ArrayIndexOutOfBoundsException: 1
    at info.somethingodd.bukkit.OddItem.OddItem.parseConfig(OddItem.java:184)
    at info.somethingodd.bukkit.OddItem.OddItem.getItems(OddItem.java:95)
    at info.somethingodd.bukkit.OddItem.OddItem.onEnable(OddItem.java:161)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:514)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:216)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:94)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:72)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)

    Have I done anything wrong?
    here is my item.txt:


    I made many names for some ids, is this a problem?

    Thank you

    PS: I also made only small changes before, like adding 328:minecart, and that worked!

    This does only work if the item.txt isnt empty. Are the names of the items not listed in the item.txt the same as in the wiki? e.g. 328:minecart does not stand in the item.txt but it works.
    But slimeball doesnt work (but the id 341 for slimeball does work)

    How does OddGive handle the items with spaces in the names? Like "storage minecart" or "sugar cane"?

    I'm so sorry for the many questions :/
  8. This seems to have been fixed in the latest recommended (670)
  9. Offline


    You've listed IDs in the file without names. Either give them a name, or take out the ID.
    No, you can have as many names for each item as you want.
    If you're asking whether item IDs from the wiki will work without being in item.txt, then no, not in the current version, which is why I posted the not-very-tested version of OddGive for you, which would go around that. I'll be adding that same thing ("!DEFAULT") to the next OddItem version, so that the blacklist/whitelist aliases will work appropriately.
    Right now, it doesn't, but OddItem does, so it probably wouldn't be hard to add.
  10. Offline


    Could you upload the source code please... I want to learn to edit java
  11. Offline


    Thank you so much for your detailed answer :D

    But 1 question remains:
    you said
    But why does /i minecart work then or saddle or or or ? They dont stand in the item.txt :p
  12. Offline


    If you're using the one you posted...
    Sure looks like they're in there :)
  13. Offline


    Sorry should have said that I mean when I use your item.txt, there is no saddle or minecart (that's really weird)^^

    But anyway that doesnt matter, I now use my custom item.txt + !DEFAULT. That's the perfect package :p

    Thank you so much!

    btw you're a genius

    Here I am again >_<

    I found something new:

    /io doesnt work :-S
    "unknown console command"

    (we dont use permissions, blacklists/whitelists, we are all op on my server)

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


    Also, if you're using the 0.8-alpha I posted, you can also do /i0 [player...] [item[quantity]...]
  15. Offline


    Can you update this for 670+?

    EDIT: read post below, I'm stupid :p
  16. Offline


    Do I really need to read the thread title for you?
  17. Offline


    I totally fail'd at saying something to an epic plugin author xD
    My problem is, /i [item] [quantity] works perfectly, it loads my custom list just fine.
    But when I use /give [item] [quantity] [player], it only uses the default items, so it won't use my custom list.
    Example: /i dp 1 ; I get a diamond pick, /give dp 1 mastermenl ; "Unknown item"
    This is pretty annoying when I want to give items to somebody else, since I only can give basic items.

    EDIT: Just in case, I added my items.txt, also I left my give.txt empty (I don't want to blacklist or whitelist anything at all.)

    Attached Files:

  18. Offline


    You're using /give in the wrong order; the player needs to be first, not last.
  19. Offline


    The plugin says: [Item][:data] [amount] [player]
    I tried every way possible to give myself a dp (= diamond pickaxe)
    it either says that it's not an item or that dp is not a number (because I tried every way possible)
    I can use default things though, I can use /give to give stone, diamond, grass and a few others, but I can't use my custom list. I'm signing of now, I'll check tomorrow for any response.
    Greetings, MasterMe.
  20. Offline


    You're using "/give ThatGuy dp 1", and it isn't working? It doesn't give any feedback right now (I should probably add that), but a person on my server definitely got the items when I used the command.
  21. Offline


    I'm using the 0.8 alpha btw, but I had those problems in the past too.
    The strange thing is, I can give grass, stone (or rock idk the name), dirt and some others.
    The plugin will say "Given MasterMeNL 4 GRASS" like that, but it won't use my custom list.
  22. Offline


    With the !DEFAULT part added to OddItem now, try the 0.7.9 OddGive again.
  23. Offline


    Just downgraded OddGive to 0.7.9 and OddItem 0.6.5 (Already had those two before)
    Still the same problem, giving default stuff like GRASS works, but my custom list won't work:
    - /i works using my custom list
    - /give can only give default items
    /i0 works for myself
    /i0 [player] error while executing internally (or some error like that)
    Also, my item.txt is fine, and give.txt is empty.

    EDIT: here are my plugins:
    BackupPlugin (_Oni_'s version) ; Controllerblock ; Minecart Mania (All but pressure plates & autocart) ; Nethrar ; OddItem ; OddGive ; Permissions (Phoenix) ; Propertime ; Sponge (Tsurara's) ; WorldEdit ; scrapbukkit ; chatbukkit ; bukkit main build 670
  24. Offline


    I'm using 0.8 alpha, but /io doesnt do anything... :S
  25. Offline


    io != i0
    Zero, not Oh. As in "Inventory Zeroed".
  26. Offline


    oh my god, now I understand what you meant in your post before...
    That's so embarrasing >_<
    Sorry for this stupid question..
  27. Offline


    Any information on this yet, it's a pain in the ass to teleport every time to give somebody some non-default stuff :p
  28. Offline


    Are you op? If not, do you have odd.give.give permission? Current versions are working for me...
  29. Offline


    Love it! However, can you make the console log the gives or display them in-game? Like Gave PlayerX 64 TNT.
    Great work however, now I don't need to kill myself anymore when I have junk in my inventory ^_^
  30. Offline


    Planning to add that soon.
  31. Offline


    I still have the same problem as before, just upgraded to 0.8, I am OP and have the permissions commands (I have - '*')

Share This Page