[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

    petteyg359

    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

    WMisiedjan

    Not to be rude or anything, but nobody will need this plugin. People can already, built-in craftbukkit give items to players if they are OP.]

    Edit:
    I now see your Extra Feature. I Should read topics more carefully :(

    I think most people just use Items.db file to get the id of the item based on name.

    Although, It's a nice alternative to it.
     
  3. Offline

    petteyg359

    Version 0.2 up. Adds inventory clearing.
     
  4. Offline

    BindMind

    This is exactly what I've been looking for. Just one problem, it seems like ANYBODY can use the commands, not just ops. Is this on purpose?
     
  5. Offline

    petteyg359

    0.3 is a minor update for latest Craftbukkit "recommended build" 53.
     
  6. how is permission support or better groupmanager looking?

    Right now only op's can use it but I'd like to have some of my trusted users be able to use the command, also it would be nice if it defaulted to 1 and not 64 (having 64 diamondpicks could get ugly :p)

    okay well I'm using groupmanager and fakepermissions and will stick to it, so will you be able to update it soon?

    for latest recommended build there is also other stuff to fix I believe like onCommand()

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

    petteyg359

    Version 0.4 adds Permissions (2.5) support. Not tested with older versions.
     
  8. nice, I will test it, I'm using groupmanager

    thats odd, still says version is 3.0 in console, and odditem say 2.0...?
    seems to work though, will test permissions tomorrow
     
  9. Offline

    RytoEX

    Seconding what GizmoTheGreen observed: I installed OddGive and OddItem version 0.4, but the console says that OddGive is version 0.3 and that OddItem is version 0.2.
     
  10. Offline

    petteyg359

    I forgot to update the plugin.yml files. If the permissions work, then you've got the latest version :)
     
  11. Version 0.5
    fixed version number to 0.4

    ....wait

    jokes aside, very good plugin, any plans to make it so certain users can't get certain items?
    like admins can get any item, and "users" can't get lava, dynamite, gunpowder etc
     
  12. Offline

    petteyg359

    Working on that. Will also have to redo the onCommand stuff now that recommended build has gone up :)
     
  13. oh, I didn't notice any error on 493 :)
     
  14. Offline

    TheRealNeo

    Very convinient plugin, thanks !

    Would it be possible to have the name list of existing items? (something like /i list would be perfect)
     
  15. Offline

    petteyg359

    0.5 update adds much better control over who can get what. See OP for configuration instructions. If no configuration is found, it defaults to an empty "blacklist" (anybody with odd.give.i permission can get any item).
     
  16. Offline

    petteyg359

    0.6.1 fixes the blacklist so that it actually blacklists.

    0.7 automatically adds all aliases into the blacklist (or whitelist). If your give.txt has "items: dhelm" and your item.txt has "310:dhat|diamondhat|dhelm|diamondhelm|dhelmet|diamondhelmet", then everything on the line will be added to the blacklist.

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

    mintrepublic

    I'm having some problems getting OddItem and OddGive to work. I'm running Ubuntu 10.10. The server runs fine (except for these two plugins) when I start it. Any ideas?

    >version
    14:41:39 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-544-g6c6c30a-b556jnks (MC: 1.3)
    14:41:39 [INFO] This server is also sporting some funky dev build of Bukkit!

    I just downloaded the minecraft server jar on Friday, so I'm pretty sure it's the latest one.

    Here's my plugins folder:
    Code:
    ryan@skynet:~/mine/plugins$ ls -l
    total 936
    drwxr-xr-x 2 ryan root   4096 2011-03-13 20:58 craftscripts
    drwxr-xr-x 2 ryan root   4096 2011-03-20 13:54 Odd
    -rw-r--r-- 1 ryan root  11380 2011-03-18 15:15 OddGive.jar
    -rw-r--r-- 1 ryan root  20066 2011-03-18 15:15 OddItem.jar
    drwxr-xr-x 2 ryan root   4096 2011-03-20 14:04 PlgWarp_op
    -rw-r--r-- 1 ryan root   9197 2011-02-27 11:54 PlgWarp_op.jar
    drwxr-xr-x 2 ryan root   4096 2011-03-18 22:21 WorldEdit
    -rw-r--r-- 1 ryan root 437112 2011-03-13 23:02 worldedit-4.2.zip
    -rw-r--r-- 1 ryan root 456558 2011-03-13 20:58 WorldEdit.jar


    And here's what happens when I start the server:
    Code:
    14:28:14 [INFO] Starting minecraft server version Beta 1.3
    14:28:14 [INFO] Loading properties
    14:28:14 [INFO] Starting Minecraft server on *:25565
    14:28:14 [WARNING] **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
    14:28:14 [WARNING] The server will make no attempt to authenticate usernames. Beware.
    14:28:14 [WARNING] While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.
    14:28:14 [WARNING] To change this, set "online-mode" to "true" in the server.settings file.
    14:28:14 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-544-g6c6c30a-b556jnks (MC: 1.3)
    14:28:14 [INFO] Preparing level "world"
    14:28:14 [INFO] Preparing start region
    14:28:15 [INFO] Preparing spawn area: 89%
    14:28:15 [SEVERE] Could not load plugins/OddGive.jar in plugins: OddItem
    org.bukkit.plugin.UnknownDependencyException: OddItem
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:92)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    14:28:15 [SEVERE] Could not load plugins/OddItem.jar in plugins: Permissions
    org.bukkit.plugin.UnknownDependencyException: Permissions
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:92)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    14:28:15 [INFO] WorldEdit 4.2 enabled.
    14:28:15 [INFO] WorldEdit: No known permissions plugin detected. Using configuration file for permissions.
    14:28:16 [INFO] PlgWarp version 2.0 is enabled!
    14:28:16 [INFO] Done (0.201s)! For help, type "help" or "?"
     
  18. Offline

    petteyg359

    That's because you don't have Permissions. I had changed it to use plugin.yml for the dependency; apparently that doesn't work for optional stuff. I'll upload a fixed version in a minute.

    Re-download now, it should be fixed.

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

    mintrepublic

    I thought that might have been the case at first, so I did install Permissions (the 2.5.4 jar). I started the server so it could create files, stopped it, and restarted, which resulted in this:
    Code:
    ryan@skynet:~/mine$ ./minecraft.sh16:31:56 [INFO] Starting minecraft server version Beta 1.3
    16:31:56 [INFO] Loading properties
    16:31:56 [INFO] Starting Minecraft server on *:25565
    16:31:56 [WARNING] **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
    16:31:56 [WARNING] The server will make no attempt to authenticate usernames. Beware.
    16:31:56 [WARNING] While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.
    16:31:56 [WARNING] To change this, set "online-mode" to "true" in the server.settings file.
    16:31:57 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-544-g6c6c30a-b556jnks (MC: 1.3)
    16:31:57 [INFO] Preparing level "world"
    16:31:57 [INFO] Preparing start region
    16:31:58 [INFO] Preparing spawn area: 89%
    16:31:58 [SEVERE] Could not load plugins/Permissions.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:113)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:109)
        ... 8 more
    Caused by: java.lang.NullPointerException
        at com.nijikokun.bukkit.Permissions.Permissions.<init>(Permissions.java:77)
        ... 13 more
    16:31:58 [SEVERE] Could not load plugins/OddGive.jar in plugins: OddItem
    org.bukkit.plugin.UnknownDependencyException: OddItem
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:92)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    16:31:58 [SEVERE] Could not load plugins/OddItem.jar in plugins: Permissions
    org.bukkit.plugin.UnknownDependencyException: Permissions
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:92)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    16:31:58 [INFO] WorldEdit 4.2 enabled.
    16:31:58 [INFO] WorldEdit: No known permissions plugin detected. Using configuration file for permissions.
    16:31:59 [INFO] PlgWarp version 2.0 is enabled!
    16:31:59 [INFO] Done (0.199s)! For help, type "help" or "?"
    
    I just did it again so I could copy/paste it in here. Permissions didn't seem to create a .yml file like it was supposed to. I thank you for working on an updated plugin, but do you think this might be caused by the version of craftbukkit I'm running (git-Bukkit-0.0.0-544-g6c6c30a-b556jnks)?

    Redownloaded, rebooting and trying

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

    petteyg359

    Forgot to fix OddItem the same way, sorry. Give me a minute again :)

    Done. Get the new OddItem, too :)
     
    mintrepublic likes this.
  21. Offline

    mintrepublic

    Fixed!


    Code:
    ryan@skynet:~/mine$ ./minecraft.sh
    17:02:03 [INFO] Starting minecraft server version Beta 1.3
    17:02:03 [INFO] Loading properties
    17:02:03 [INFO] Starting Minecraft server on *:25565
    17:02:03 [WARNING] **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
    17:02:03 [WARNING] The server will make no attempt to authenticate usernames. Beware.
    17:02:03 [WARNING] While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.
    17:02:03 [WARNING] To change this, set "online-mode" to "true" in the server.settings file.
    17:02:03 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-544-g6c6c30a-b556jnks (MC: 1.3)
    17:02:03 [INFO] Preparing level "world"
    17:02:03 [INFO] Preparing start region
    17:02:05 [INFO] Preparing spawn area: 93%
    17:02:05 [INFO] WorldEdit 4.2 enabled.
    17:02:05 [INFO] WorldEdit: No known permissions plugin detected. Using configuration file for permissions.
    17:02:05 [INFO] PlgWarp version 2.0 is enabled!
    17:02:05 [INFO] [OddItem] 0.6.1 enabled
    17:02:05 [WARNING] [OddItem] Permissions not found. Using op-only mode.
    17:02:05 [INFO] [OddItem] Parsed 499 entries.
    17:02:05 [INFO] [OddGive] 0.7.1 enabled
    17:02:05 [INFO] [OddGive] Permissions not found. Using op-only mode.
    17:02:05 [INFO] Done (0.204s)! For help[SIZE=4], ty[/SIZE]pe "help" or "?"
    

    All is better after this:
    -rw-r--r-- 1 ryan root 11395 2011-03-20 16:30 OddGive.jar
    -rw-r--r-- 1 ryan root 20094 2011-03-20 16:53 OddItem.jar


    Thanks a million for the quick response. Now I don't have to keep the wiki's data value page open!
     
  22. Offline

    taiiat

    hmm. give piece of the plugin doesn't seem to operate properly.
    the give file doesn't need to be populated does it? i have no real want or need for black or white listing items.

    Code:
    21:13:42 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'i' in plugin OddGive v0.5.2
            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:229)
            at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:645)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:608)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:602)
            at net.minecraft.server.Packet3Chat.a(SourceFile:24)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:76)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.IncompatibleClassChangeError: Expected static method info.somethingodd.bukkit.OddItem.OddItem.getItemStack(Ljava/lang/String;)Lorg/bukkit/inventory/ItemStack;
            at info.somethingodd.bukkit.OddGive.OddGive.give(OddGive.java:65)
            at info.somethingodd.bukkit.OddGive.OddGive.onCommand(OddGive.java:145)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    
     
  23. Offline

    petteyg359

    Try the latest version. That says you're using 0.5.2.
     
  24. Offline

    petteyg359

    0.7.7 adds more options to /i0 (multi-player and/or multi-item removal). I haven't tested with multiple users (I only tested against myself from in game and from console), so can't be sure the options for working with other players work in all cases. Let me know if it doesn't work right. If it blows up strangely (though it shouldn't, just removing the odd.give.i0.other permission and telling any ops to not use it should be enough), just add ".bak" to the download link to get the previous jar.
     
  25. Offline

    Eddie Diller

    I keep on getting this error:

    16:02:31 [SEVERE] Could not load plugins/OddGive.jar in plugins: OddItem
    org.bukkit.plugin.UnknownDependencyException: OddItem
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:92)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)

    PLease Help! i can't seem to figure this 1 out
     
  26. Offline

    petteyg359

    Read line 2.
    See "UnknownDependencyException".
    Note the word "dependency".
    Read first post.
    See "Requires OddItem".

    Solution: Get OddItem.
     
  27. Offline

    Stormshadow77

    When I use the command, it says an internal error was found. ?
     
  28. Offline

    petteyg359

    Tell me which command, and paste the whole error from the server console, and I might be able to help.
     
  29. Offline

    Eddie Diller

    Same here. When i type for example: /i 5 (wood) 64 i get:

    [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'i' in plugin OddGive v0.7.7
    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:229)
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:645)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:608)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:602)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(SourceFile:230)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:76)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    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:39)
    at info.somethingodd.bukkit.OddItem.OddItem.getItemStack(OddItem.java:79)
    at info.somethingodd.bukkit.OddGive.OddGive.give(OddGive.java:57)
    at info.somethingodd.bukkit.OddGive.OddGive.onCommand(OddGive.java:181)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more

    There is nothing wrong with my permissions and i have Odd item installed.


    Ok. I fixed it. Its just i didn't have any items in the item.txt

    Ok.. another error.
    Im using the plugin and it works fine for me. But... it won't work 4 any1 else.
    In permissions, i made it so admins can use it. Im an admin and i can use it, but for some reason other admins can't use it...
    I would appreciate some help

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

    petteyg359

    What command are they using?
     

Share This Page