[ECON] NPCTrader v1.1.4 - The Full featured localized shop system [RB740 - 766]

Discussion in 'Inactive/Unsupported Plugins' started by MatCat, Feb 13, 2011.

  1. Offline

    MatCat

    NPC Trader - The Full featured localized shop system

    Version 1.1.4 (Testing Version!)



    The first localized full featured shop system for Bukkit/iConomy, in NPC Form!

    What's better for a localized shop system then your very own NPC Clerk / Teller / Worker / Slave / Whatever word you want to call your NPC!

    Features
    • Localized system
    • Fully player controlled (No admin intervention needed)
    • Full Item and Metadata support (Colored wools, etc)
    • Item name or ID recognition
    • Partial name recognition (If online)
    • Complete internal permissions system for managers of the NPC
    • iConomy Based
    • MySQL data storage
    • Item stocking system
    • In-Game help for everything
    • Supports Permissions and GroupManager (Using FakePermissions) Plugins!
    Installation / Setup

    1. Put NPCTrader.jar in your plugins folder
    2. Put mysql-connector-java-bin.jar in your main minecraft folder
    3. Restart your server (Auto-generates config.yml in plugins/NPCTrader/)
    4. Edit the config.yml for MySQL and other config settings.
    5. Restart once more
    6. Enjoy!
    If for some reason the folder / config does not auto-generate, then you can open the .jar file with 7zip or winzip or other archiving utility that supports jars and extract the config.yml from the jar.


    NOTE: If you do not have or do not know if you have MySQL setup then you either have to setup MySQL or not use this plugin for now. Please do not post questions asking how to install MySQL as that is outside of the scope of this post. You can follow this tutorial (Thanks @Germata!) for detailed windows installation and setup, but I cannot provide support for installing and setting up MySQL, only support for my plugin specifically.

    Permissions

    Permissions will only be used if it is installed. The following is the permissions list:

    Code:
    npc.admin      - Give to admins for full access to all NPCs
    npc.admin.list - Access to /npc list npcs
    npc.user.*     - General user commands, you can specify by replacing * with command name, I.E. buy
    npc.manager.*  - NPC Manager commands
    npc.owner.*    - NPC Owner commands
    npc.create     - Ability to create an NPC 
    If permissions is used you may also specify limits on how many NPCs a specific player or group may have ownership flag on, please see config file for more information.

    Usage

    Once the plugin is installed and running, you can see the in-game help by typing /npc in your chat window. To interact with an NPC just right click on it first.

    Here is a simple tutorial for setting up an NPC named Bob that sell's bread, cooked fish, and cooked pork, and buys wheat, raw fish, and raw pork.

    1. Stand exactly where you want your NPC, including head position and body rotation.
    2. Type: /npc create Bob 6 10 This will create the NPC with 6 Item Slots, each holding 10 units.
    3. Right click on the newly created NPC
    4. Type: /npc setup 1 bread 1 2 0 true false This will setup Slot 1 with Bread, selling lots of 1 at 2 Coins, buying them from players at 0, True for NPC Selling it, False for buying from players.
    5. Repeat step 4 for Cooked fish and Pork
    6. Type: /npc setup 4 wheat 64 0 10 false true This will setup Slot 4 with Wheat, buying lots of 64 at 10 Coins. This one is set False to selling it to players, but true to buy from players.
    7. Type: /npc stock 1 20 This will stock the NPC with 20 breads on slot 1 (Assuming you have enough bread).
    8. Repeat step 7 for raw fish and pork.
    You know have a fully setup and functioning NPC.


    Known Issues / Bugs

    • Config folder does not get generated on Linux - Works on Windows
    • Cookies and beds, and pretty much any other 1.4/1.5 items.
    • Spams console when you stand close to an NPC
    • Gives error when an NPC is spawned (Can be ignored)
    • Head / Rotation is not being properly set on spawn / move. (Fixed in 1.14)
    • Does not work with actual permissions (works with GroupManager)
    • Rename command is broken
    Things Todo

    • Re-write item handling
    • Support for both GroupManager and Permissions
    • iConomy 5 Support
    • Add armor capacity
    • Tie into WorldGuard for checking for build rights (Will be optional)
    Misc


    If you installed MySQL for Windows just to run this plugin then check out this link to see how to create the initial minecraft database you will need.


    *** NOTE: SQLite IS NEVER GONNA HAPPEN! If you want to see an alternative, fork the src, make it work as an option, and I will include it in.***

    Changelog
    • Version 1.1.4
      • Changed out item name / id handling system
      • Now supports all current official items
      • Fixed Move Bug
      • Fixed NPC Creation Errors
      • Fixed a few other errors
      • Fixed Config creation on linux (hopefully!)
    • Version 1.1.3
      • Completely rewrote most of the code that directly interfaces with the NPC Library.
      • Now uses chunk loading/unloading to make sure only NPC's in loaded chunks are loaded (Way more efficient)
      • Changed banker command to only allow setting yourself as banker (to stop an exploit situation).
    • Version 1.1.2
      • Fixed upgrading stack counts for free bug
      • Fixed rename command not working on linux
      • Made it so an NPC must have 1 item slot to be created
      • Added permissions support for owned npc limits (By group or player)
    • Version 1.1.1
      • Fixed issues with quantities of '0'
      • Added rename command
      • Fixed iConomy hooking on startup
    • Version 1.1.0
      • Fixed Admin Override Permissions not working
      • Added Half and Double Slabs
      • Updated to work with B612+
    • Version 1.0.9
      • Updated to work on B531+
      • Updated to work with iConomy 4.*
      • Much needed overhaul of error handling and disabling procedures.
      • Converted integer based money to decimal based.
    • Version 1.0.8
      • Updated for newer builds
    • Version 1.0.7
      • Fixed more issues with ItemData, hopefully they are fixed for good.
      • Added log names
      • Added Coal/Charcoal distinction
      • Order of slots listed will always be in ascending order
    • Version 1.0.6
      • More meta-data issues, resolved.
    • Version 1.0.5
      • My restructuring of the code to try to support SQlite completely foobared the connect and close code, causing timeouts and errors. Fixed it.
    • Version 1.0.3
      • Fixed buy/sell/stock/unstock to use absolute values so that negatives cannot happen.
    • Version 1.0.2
      • Fixed bug where db connection was closed on /npc create
    • Version 1.0.1
      • Fixed bug with null Item Datas
    • Version 1.0.0
      • Fixed many many bugs
      • Added /npc list npcs as an admin command to let you see a full list of NPCs
      • Added recording transactions.
      • Added full permissions support
      • Better error handling and message delivery.
    • Version 0.94
      • Fixed not checking stock when doing /npc setup
      • Made the setup's error messages way more intuitive
    • Version 0.93
      • Fixed disappearing NPC bug.
    • Version 0.92
      • Fixed bug where selling was not checking player inventory.
    • Version 0.91
      • Fixed bug where giving improper arguments for upgrading and creating reported iConomy and NPC Trader out of sync.
    • Version 0.9
      • Initial Release
    You can download the jar here.



    You can download the mysql connector jar here.
     
  2. i'm getting the error that your plugin is registering events before it is enabled... is this a vital error, or just an inconvenience (spams my console screen -_- )
     
  3. Offline

    MatCat

    I'm pretty sure that is something that can be ignored for now... I will check into it though
     
  4. Offline

    Myrrdin

    I'm getting the following error every time I right-click an npc ingame. It says in the log that the plugin loads up fine, but as soon as I right-click, that error appears. I'm using CB 432.
     
  5. Offline

    Belarr

    Errors while creating NPC

    Permissions as well as the config and database are properly running, but it returns that error when issuing most /npc commands.


    CB Build: 421

    Ingame:
    An internal error occured while attempting to perform this command​

    Server:
    2011-02-23 12:15:39 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'npc' in plugin NPCTrader v1.0.8
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:21)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:77)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:173)
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:621)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:585)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:578)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(SourceFile:230)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:252)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NullPointerException
    at com.MatCat.NPCTrader.Commands.npcCommand.Run(npcCommand.java:76)
    at com.MatCat.NPCTrader.Commands.npcCreateCommand.Run(npcCreateCommand.java:22)
    at com.MatCat.NPCTrader.NPCTrader.onCommand(NPCTrader.java:286)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:19)
    ... 12 more
     
  6. Offline

    MatCat

    I did build this again 425, not 421 so It may be an issue with that.
     
  7. Offline

    Belarr

    I had also attempted 432 and just tried 425, same errors.
     
  8. Offline

    MatCat

    Unfortunately minecraft is not letting me on anything to test anything
     
  9. Offline

    mrgreaper

    aparently if you use the old launcher you will get on (or i persume there browser version)
     
  10. Offline

    Runelynx

    ack, this no worky w/ cbukkit432. it breaks all commands and crashed the server when I tried to load it w/ /reloadall
     
  11. Offline

    mrgreaper

    a request (clearly your busy updating before you can look at requests but if you can add to your todo pile it would be appreciated)

    allow admins to create infinite stock shops where the money from the sales goes perhaps to a special iconomy account of the admins choosing or vanishes to the nether

    the situation;
    we want a npc near our spawnpoint that will sell diamond blocks, lightstone blocks and ipis blocks that players can use for making protection fields (we use precous stones plugin) they will be pricy

    we can create an npc
    then /i diamond block
    then stock it

    but me and the other admins do not want to cheat and while were happy to cheat to stock it we dont want floods of money coming in ! we want to earn our chicken lips the same as the other players! (we dont run the server to abusee our power)

    so an npc that we can create, we can stock but who sends his funds to either a fake account or to non exitance would be of great import to us :)
     
  12. Offline

    TheYeti

    Trying to update my server and get everything up and running again so I can let players on. Getting the following messages:

    Code:
    2011-02-23 13:56:48 [WARNING] Using the stupidly long constructor com.MatCat.NPCTrader.NPCTrader(PluginLoader, Server, PluginDescriptionFile, File, File, ClassLoader) is no longer recommended. Go nag the plugin author of NPCTrader to remove it! (Nothing is broken, we just like to keep code clean.)
    Which I realize can be ignored. However, I am getting the following errors when I try to interact with NPC's.

    Code:
    2011-02-23 13:58:16 [SEVERE] Could not pass event ENTITY_TARGET to NPCTrader
    java.lang.NullPointerException
            at com.MatCat.NPCTrader.Commands.npcCommand.Run(npcCommand.java:76)
            at com.MatCat.NPCTrader.Commands.npcListCommand.Run(npcListCommand.java:20)
            at com.MatCat.NPCTrader.NPCTraderEntityListener.onEntityTarget(NPCTraderEntityListener.java:74)
            at org.bukkit.plugin.java.JavaPluginLoader$44.execute(JavaPluginLoader.java:354)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
            at redecouverte.npcspawner.CHumanNpc.a(CHumanNpc.java:43)
            at net.minecraft.server.EntityHuman.c(EntityHuman.java:381)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:745)
            at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    
    This is on craftbukkit build 450.
     
  13. Offline

    mrgreaper

    432 is latest cb build http://ci.bukkit.org/job/dev-CraftBukkit/
     
  14. Offline

    TheYeti

    That is the one I am using. Odd that in the startup it says 450.

    2011-02-23 13:56:47 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-450-gd3c1ba4-b432jnks (MC: 1.3)

    EDIT: Sorry, I'm a moron. It is build 432. I should stop trying to do things when I'm sick. It impairs my ability to not say stupid things.
     
  15. Offline

    crohakon

    Using the latest bukkit build and latest jar from here for NPCtrader. If I load NPCtrader most other plug-ins are broke. If I do not load NPCtrader all other plug-ins work. Is there a fix for this?
    --- merged: Feb 23, 2011 10:52 PM ---
    Code:
    2011-02-23 17:52:19 [INFO] NPCTrader version 1.0.8: Found iConomy
    2011-02-23 17:52:20 [INFO] NPC Trader is Using Permissions
    2011-02-23 17:52:20 [SEVERE] java.sql.SQLException: No suitable driver found for
    2011-02-23 17:52:20 [SEVERE]     at java.sql.DriverManager.getConnection(DriverManager.java:640)
    2011-02-23 17:52:20 [SEVERE]     at java.sql.DriverManager.getConnection(DriverManager.java:200)
    2011-02-23 17:52:20 [SEVERE]     at com.MatCat.NPCTrader.NPCTraderMySQL.dbConnect(NPCTraderMySQL.java:1220)
    2011-02-23 17:52:20 [SEVERE]     at com.MatCat.NPCTrader.NPCTrader.onEnable(NPCTrader.java:182)
    2011-02-23 17:52:20 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
    2011-02-23 17:52:20 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:426)
    2011-02-23 17:52:20 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    2011-02-23 17:52:20 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:76)
    2011-02-23 17:52:20 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:57)
    2011-02-23 17:52:20 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
    2011-02-23 17:52:20 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
    2011-02-23 17:52:20 [SEVERE]     at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
    2011-02-23 17:52:20 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
    2011-02-23 17:52:20 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    2011-02-23 17:52:20 [INFO] Datbase configuration Error: java.sql.SQLException: No suitable driver found for
    2011-02-23 17:52:20 [SEVERE] java.lang.NullPointerException
    2011-02-23 17:52:20 [SEVERE]     at com.MatCat.NPCTrader.NPCTraderMySQL.CheckDB(NPCTraderMySQL.java:229)
    2011-02-23 17:52:20 [SEVERE]     at com.MatCat.NPCTrader.NPCTrader.onEnable(NPCTrader.java:184)
    2011-02-23 17:52:20 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
    2011-02-23 17:52:20 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:426)
    2011-02-23 17:52:20 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    2011-02-23 17:52:20 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:76)
    2011-02-23 17:52:20 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:57)
    2011-02-23 17:52:20 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
    2011-02-23 17:52:20 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
    2011-02-23 17:52:20 [SEVERE]     at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
    2011-02-23 17:52:20 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
    2011-02-23 17:52:20 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    2011-02-23 17:52:20 [INFO] Database Configuration Error
    2011-02-23 17:52:20 [INFO] NPCTrader version 1.0.8 is disabled!
    2011-02-23 17:52:20 [SEVERE] java.lang.NullPointerException
    2011-02-23 17:52:20 [SEVERE]     at com.MatCat.NPCTrader.NPCTraderMySQL.SetupNPC(NPCTraderMySQL.java:977)
    2011-02-23 17:52:20 [SEVERE]     at com.MatCat.NPCTrader.NPCTrader.onEnable(NPCTrader.java:188)
    2011-02-23 17:52:20 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
    2011-02-23 17:52:20 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:426)
    2011-02-23 17:52:20 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    2011-02-23 17:52:20 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:76)
    2011-02-23 17:52:20 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:57)
    2011-02-23 17:52:20 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
    2011-02-23 17:52:20 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
    2011-02-23 17:52:20 [SEVERE]     at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
    2011-02-23 17:52:20 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
    2011-02-23 17:52:20 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    2011-02-23 17:52:20 [WARNING] Plugin 'NPCTrader' (ver 1.0.8) is registering events before it is enabled. It may be misbehaving and the author needs to fix this.
    2011-02-23 17:52:20 [WARNING] Plugin 'NPCTrader' (ver 1.0.8) is registering events before it is enabled. It may be misbehaving and the author needs to fix this.
    2011-02-23 17:52:20 [WARNING] Plugin 'NPCTrader' (ver 1.0.8) is registering events before it is enabled. It may be misbehaving and the author needs to fix this.
    2011-02-23 17:52:20 [INFO] NPCTrader version 1.0.8 is enabled!
    
     
  16. Offline

    Varnsen

    Love the plugin! Just what I was looking for. :) Quick question though.. will there be a way to skin the NPCs in the future?
     
  17. Offline

    TheYeti

    That is telling you that it can't find the MySQL driver in your root directory for the server. Do you have mysql-connector-java-bin.jar in the same directory as craftbukkit.jar? If not this will cause that issue.
     
  18. Offline

    crohakon

    I do indeed have that file in the directory where the craftbukkit.jar.
     
  19. Offline

    Lime Studios

    Could the MySQL server possibly be hosted by my web host so as not to run it on my own machine? Also my server is run on a VPS (Debian 5.0) FYI. Thanks so much for making this plugin!
     
  20. Offline

    MatCat

    As long as the MySQL server you are using allows a remote connection then you can use it. As far as for the errors above you make sure your config file is setup properly. It will also say no suitable driver found if the Database: field is not proper.

    As far as errors others are getting on 432 I will check into it.

    Also for your question mrgreeper, you can always manually add an account and call it whatever, then set the banker to that account. It should work, but this is a planned feature anyway I have just been so busy with work that I have not had a chance to get to it yet.
     
  21. Offline

    Liger_XT5

    You're probly making the same mistake as I. I thought I had mySQL (not lite) working on my OS, but it wasn't.
    make sure you have mySQL installed. There is a link on the main post about how to. I though need to find one for tiny core linux... I'm using MineOS, haven't had any trouble hosting my own server through VBox.
     
  22. Offline

    crohakon


    I am quite sure I have MySQL installed. I use it for web development projects and am quite familiar with it. This setup was working for a long while prior to mojang/bukkit upgrade and the mysql worked just fine. I have not made any changes to the config files. I simply replaced the .jar files.
     
  23. Offline

    Liger_XT5

    Ok, it was just a suggestion.
    I can get the plugin to start, but all plugins after it fail to start. I just assumed that mineOS didn't come with mysql because the plugin was acting odd.
    I've been googling how to install ysql on tinycore linux, but all has failed so far. Hmm...
     
  24. i put the mysql in my lib folder and put the plugin in the right folder but then i get this please help
    Code:
    00:34:37 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'npc' in plugin NPCTrader v1.0.8
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:21)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:77)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:173)
        at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:633)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:596)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:590)
        at net.minecraft.server.Packet3Chat.a(SourceFile:24)
        at net.minecraft.server.NetworkManager.a(SourceFile:230)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "com.MatCat.NPCTrader.Commands.npcCreateCommand.<init>(Lcom/MatCat/NPCTrader/NPCTrader;Lorg/bukkit/command/CommandSender;Lorg/bukkit/command/Command;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V" the class loader (instance of org/bukkit/plugin/java/PluginClassLoader) of the current class, com/MatCat/NPCTrader/NPCTrader, and the class loader (instance of org/bukkit/plugin/java/PluginClassLoader) for resolved class, com/MatCat/NPCTrader/Commands/npcCreateCommand, have different Class objects for the type com/MatCat/NPCTrader/NPCTrader used in the signature
        at com.MatCat.NPCTrader.NPCTrader.onCommand(NPCTrader.java:284)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:19)
        ... 12 more
     
  25. Offline

    contex

    Well, as the developer of Permissions has gone off I decided to edit the Permission and make it able to use MySQL insted of SQLlite, I edited the functions a bit and now I'm getting these errors when i do /npc create Bob 6 10, /npc works fine.

    Code:
    011-02-24 03:12:10 [INFO] jdbc:mysql://localhost:3306/minecraft
    2011-02-24 03:12:10 [INFO] Checking Permissions
    2011-02-24 03:12:10 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'npc'
     in plugin NPCTrader v1.0.8
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:21)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:77
    )
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:1
    73)
            at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:621)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:585)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:578)
            at net.minecraft.server.Packet3Chat.a(SourceFile:24)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:252)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NullPointerException
            at com.MatCat.NPCTrader.Commands.npcCommand.Run(npcCommand.java:76)
            at com.MatCat.NPCTrader.Commands.npcCreateCommand.Run(npcCreateCommand.j
    ava:22)
            at com.MatCat.NPCTrader.NPCTrader.onCommand(NPCTrader.java:286)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:19)
            ... 12 more
    
     
  26. Offline

    redf1sh

    I'm getting something similar to the above, when I try /npc create somedude x x I get:

    Code:
    2011-02-23 18:12:13 [INFO] redf1sh exploded
    2011-02-23 18:16:18 [INFO] jdbc:mysql://127.0.0.1:3306/minecraft
    2011-02-23 18:16:18 [INFO] Checking Permissions
    2011-02-23 18:16:18 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'npc' in plugin NPCTrader v1.0.8
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:21)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:77)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:173)
        at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:633)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:596)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:590)
        at net.minecraft.server.Packet3Chat.a(SourceFile:24)
        at net.minecraft.server.NetworkManager.a(SourceFile:230)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NullPointerException
        at com.MatCat.NPCTrader.Commands.npcCommand.Run(npcCommand.java:76)
        at com.MatCat.NPCTrader.Commands.npcCreateCommand.Run(npcCreateCommand.java:22)
        at com.MatCat.NPCTrader.NPCTrader.onCommand(NPCTrader.java:286)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:19)
        ... 12 more
    
    I'm only using Npctrader Permissions and iConomy, and I'm pretty sure the database is setup correctly (plugin created several empty tables anyway). I'm pretty sure I'm just doing something wrong, any ideas?

    Also out of curiosity is the plugin source available somewhere?

    Thanks!
    - Redfish
     
  27. Offline

    contex

    I'd love that as well.
     
  28. Offline

    Trohd

    MySQL is just a mindscrew for an old man like me. Will there be any support for simple plug and chug plugins like permissions? Where you can edit NPC's based on names from a file within the plugins/folderhere? Let me know!
     
  29. Offline

    Volander

    Code:
    2011-02-24 13:13:25 [INFO] jdbc:mysql://localhost:3306/minecraft
    2011-02-24 13:13:25 [INFO] Checking Permissions
    2011-02-24 13:13:25 [SEVERE] Could not pass event ENTITY_TARGET to NPCTrader
    java.lang.NullPointerException
            at com.MatCat.NPCTrader.Commands.npcCommand.Run(npcCommand.java:76)
            at com.MatCat.NPCTrader.Commands.npcListCommand.Run(npcListCommand.java:
    20)
            at com.MatCat.NPCTrader.NPCTraderEntityListener.onEntityTarget(NPCTrader
    EntityListener.java:74)
            at org.bukkit.plugin.java.JavaPluginLoader$44.execute(JavaPluginLoader.j
    ava:354)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:225)
            at redecouverte.npcspawner.CHumanNpc.a(CHumanNpc.java:43)
            at net.minecraft.server.EntityHuman.c(EntityHuman.java:381)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:745)
            at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    I get this error when rightclicking the NPC.. Build 1.0.8 b421+

    Running : Craftbukkit version git-Bukkit-0.0.0-450-gd3c1ba4-b432jnks (MC: 1.3)

    Can you help?

    - Volander
    --- merged: Feb 24, 2011 12:44 PM ---
    Code:
    2011-02-24 13:39:58 [INFO] [PLAYER_COMMAND] Volander: /plugin reload NPCTrader
    2011-02-24 13:39:58 [INFO] NPCTrader version 1.0.8 is disabled!
    2011-02-24 13:39:58 [SEVERE] java.util.ConcurrentModificationException
    2011-02-24 13:39:58 [SEVERE]    at java.util.HashMap$HashIterator.nextEntry(Unkn
    own Source)
    2011-02-24 13:39:58 [SEVERE]    at java.util.HashMap$KeyIterator.next(Unknown So
    urce)
    2011-02-24 13:39:58 [SEVERE]    at net.minecraft.server.EntityTracker.a(EntityTr
    acker.java:106)
    2011-02-24 13:39:58 [SEVERE]    at net.minecraft.server.MinecraftServer.h(Minecr
    aftServer.java:340)
    2011-02-24 13:39:58 [SEVERE]    at net.minecraft.server.MinecraftServer.run(Mine
    craftServer.java:253)
    2011-02-24 13:39:58 [SEVERE]    at net.minecraft.server.ThreadServerApplication.
    run(SourceFile:366)
    2011-02-24 13:39:58 [SEVERE] Unexpected exception
    java.util.ConcurrentModificationException
            at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
            at java.util.HashMap$KeyIterator.next(Unknown Source)
            at net.minecraft.server.EntityTracker.a(EntityTracker.java:106)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:340)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    This one made the server crash.. dont know if it's related to NPCTrader.

    - Volander
     
  30. Offline

    Myrrdin

    Hi there. When I try to create an NPC I get the following error:
    Upon starting the server, I get no errors. The mysql loads perfectly fine and the recipes are loaded + the npcs are placed. However, I still can't purchase things from them, their list of items does not appear when I right-click.

    I'm running CB 432.
     
  31. Offline

    Runelynx

    when i reload to enable this, it breaks all my plugins :(
     

Share This Page