[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. Offline

    Jdragon

    Great plugin if it would work lol. Im not nagging at you ;) but currently for npc and shops Im using citizens and local shops together for a npc shop effect... I know pretty bootleg LOL but just a small note to people who want to use this plugin but is down :D Hopefully it'll be up soon so I don't need 2 plugins for 1 task :C
     
  3. Offline

    Frag_Me

    Mayby it's mysql the problem ???
    Try with sqlite ?
     
  4. Offline

    firewalled

    That is very unlikely as MySQL is way more powerful than sqllite
     
  5. Offline

    Frag_Me

    escuse me just a proposition from noob ! lol
    i wait the upgrade impatiently ....
     
  6. Offline

    firewalled

  7. Offline

    Kazeron

    Not to be a nag and you prolly already know this, but citizens is working now. Maybe you could get with the dev from citizens and figure out what needs to be done to get this up and running.
     
  8. Offline

    MatCat

    New experimental build out! This will work on 740, and probably 733. Note this one does spam console with debugging lines! There are a few known issues, please check Known Issues section of OP to see what they are.
     
  9. Offline

    Jiggy

    Got 1 question tough, can u also use the infinite items ?
    As example i want a shop with infinite bread in it, so i use: /npc stock 1 -1
     
  10. Offline

    Durandir

    Just tried the new version, I still got problems. Maybe those problems are due to other things?
    I get this in the Server window:

    And I get this message in the chat: An internal error occured while attempting to perform this command.

    I am not that good with Permissions, as I added it solely to use this and iEconomy yesterday. But I think I have set it up correctly, and I am the admin.
     
  11. Offline

    glericus

    This is my error.
    I also get the "An internal error occured while attempting to perform this command." when I try to create a NPC

    I use iConomy with MySQL and a * on me in permissions
     
  12. Offline

    jimbo8

  13. Offline

    DaddyCool64

    Now i have install the new (test)Version.
    If i start the Server i get this:
    Code:
    2011-05-02 17:15:03 [INFO] NPCTrader Successfully linked with iConomy.
    2011-05-02 17:15:03 [INFO] NPCTrader version 1.1.3: No iConomy, disabling plugin
    2011-05-02 17:15:03 [INFO] NPCTrader version 1.1.3 is disabled!
    2011-05-02 17:15:03 [INFO] NPCTrader Successfully linked with iConomy.
    2011-05-02 17:15:03 [INFO] NPCTrader Successfully linked with iConomy.
    2011-05-02 17:15:03 [INFO] NPCTrader is Using Permissions
    2011-05-02 17:15:03 [INFO] Loaded 0 NPCs.
    2011-05-02 17:15:03 [INFO] NPCTrader: Chunk Listener is running...
    2011-05-02 17:15:03 [INFO] NPCTrader version 1.1.3 is enabled!
    
    If i create a NPCTrader (/npc create Bob 6 10) i get an internal server error in the Chat and this in the server.log:
    Code:
    2011-05-02 17:17:27 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'npc' in plugin NPCTrader v1.1.3
     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
     at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:255)
     at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:677)
     at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:640)
     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:634)
     at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
     at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
     at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
     at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.NoSuchMethodError: com.nijiko.permissions.PermissionHandler.getGroup(Ljava/lang/String;)Ljava/lang/String;
     at com.MatCat.NPCTrader.NPCTrader.CanCreate(NPCTrader.java:123)
     at com.MatCat.NPCTrader.Commands.npcCreateCommand.Run(npcCreateCommand.java:43)
     at com.MatCat.NPCTrader.NPCTrader.onCommand(NPCTrader.java:373)
     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
     ... 12 more
    Hope that can help you

    sorry for my bad english
     
  14. Offline

    MatCat

    My plugin may no longer be fully compatible with the Actual Permissions plugin, as I use GroupManager with Fake Permissions (GroupManagerBridge), I do not test against actual Permissions. I will look into it...
     
  15. Offline

    Durandir

    Hope you'll make it work with Permissions then, as I'd rather use that.
     
  16. Offline

    SvenBrnn

    Can you Make a Github update. If you could i would make an Fork tomorrow to make Permissions work again. Would be nice if you could do.

    MFG Sven
     
  17. Offline

    glericus

    How to not use permissions on the mod, can I still have permission active and the NPCtrader ignores it?
     
  18. Offline

    firewalled

    Ah great, I see now, thanks. (Sorry for the slow response)
     
  19. Hi i use db4free as an db how can the plugin connect to this db i tried different commands on database and driver, but nothing work.
    Please canyou help me
     
  20. Offline

    Durandir

    Just updated some plugins, and now your plugin gives me a lot of errors:

    Code:
    2011-05-03 11:25:16 [INFO] Starting minecraft server version Beta 1.5_02
    2011-05-03 11:25:16 [INFO] Loading properties
    2011-05-03 11:25:16 [INFO] Starting Minecraft server on *:25542
    2011-05-03 11:25:16 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-706-gf53e007-b740jnks (MC: 1.5_02)
    2011-05-03 11:25:16 [INFO] Preparing level "world"
    2011-05-03 11:25:16 [INFO] Preparing start region
    2011-05-03 11:25:17 [INFO] NPCTrader: Chunk Listener is running...
    2011-05-03 11:25:17 [INFO] [Permissions] (Phoenix) was Initialized.
    2011-05-03 11:25:17 [INFO] ChatBukkit v0.0.2 is enabled!
    2011-05-03 11:25:17 [INFO] CraftBukkitUpToDate version 2.5.2 is enabled!
    2011-05-03 11:25:17 [INFO] [Permissions] version [2.7.2] (Phoenix)  loaded
    2011-05-03 11:25:17 [INFO] CButD: CraftBukkit is up to Date
    2011-05-03 11:25:17 [INFO] DefaultCommands 3.0.0 is enabled.
    2011-05-03 11:25:18 [INFO] [iConomy] Logging is currently disabled.
    2011-05-03 11:25:18 [INFO] [iConomy] v5.0 (Eruanna) loaded.
    2011-05-03 11:25:18 [INFO] [iConomy] Developed by: [Nijikokun]
    2011-05-03 11:25:18 [INFO] [iConomy] hooked into Permissions.
    2011-05-03 11:25:18 [INFO] [Minecart Mania] Debug mode switched to NORMAL
    2011-05-03 11:25:18 [INFO] [Minecart Mania] MinecartManiaCore version 1.1.9 is enabled!
    2011-05-03 11:25:18 [INFO] [Minecart Mania] MinecartManiaSignCommands version 1.1.3 is enabled!
    2011-05-03 11:25:18 [INFO] [Minecart Mania] MinecartManiaStation version 1.1.0 is enabled!
    2011-05-03 11:25:18 [INFO] Nether v1.1 enabled
    2011-05-03 11:25:18 [INFO] NPCTrader Successfully linked with iConomy.
    2011-05-03 11:25:18 [INFO] NPCTrader version 1.1.3: No iConomy, disabling plugin
    2011-05-03 11:25:18 [INFO] NPCTrader version 1.1.3 is disabled!
    2011-05-03 11:25:18 [SEVERE] Could not pass event PLUGIN_ENABLE to NPCTrader
    java.lang.NoClassDefFoundError: com/nijiko/coelho/iConomy/iConomy
        at com.MatCat.NPCTrader.PluginListener.onPluginEnable(PluginListener.java:24)
        at org.bukkit.plugin.java.JavaPluginLoader$34.execute(JavaPluginLoader.java:408)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:633)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.ClassNotFoundException: com.nijiko.coelho.iConomy.iConomy
        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:36)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 13 more
    2011-05-03 11:25:18 [INFO] PorteCoulissante plugin version 1.0.3 by Captain_Chaos enabled
    2011-05-03 11:25:18 [SEVERE] Could not pass event PLUGIN_ENABLE to NPCTrader
    java.lang.NoClassDefFoundError: com/nijiko/coelho/iConomy/iConomy
        at com.MatCat.NPCTrader.PluginListener.onPluginEnable(PluginListener.java:24)
        at org.bukkit.plugin.java.JavaPluginLoader$34.execute(JavaPluginLoader.java:408)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:633)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-05-03 11:25:18 [INFO] ScrapBukkit version 0.2.1 is enabled!
    2011-05-03 11:25:18 [SEVERE] Could not pass event PLUGIN_ENABLE to NPCTrader
    java.lang.NoClassDefFoundError: com/nijiko/coelho/iConomy/iConomy
        at com.MatCat.NPCTrader.PluginListener.onPluginEnable(PluginListener.java:24)
        at org.bukkit.plugin.java.JavaPluginLoader$34.execute(JavaPluginLoader.java:408)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:633)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-05-03 11:25:18 [INFO] [Minecart Mania] Permissions detected. Using permissions.
    2011-05-03 11:25:18 [INFO] [Minecart Mania] MinecartManiaAdminControls version 1.1.4 is enabled!
    2011-05-03 11:25:18 [SEVERE] Could not pass event PLUGIN_ENABLE to NPCTrader
    java.lang.NoClassDefFoundError: com/nijiko/coelho/iConomy/iConomy
        at com.MatCat.NPCTrader.PluginListener.onPluginEnable(PluginListener.java:24)
        at org.bukkit.plugin.java.JavaPluginLoader$34.execute(JavaPluginLoader.java:408)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:633)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-05-03 11:25:18 [INFO] [Minecart Mania] MinecartManiaAutomations version 1.1.2 is enabled!
    2011-05-03 11:25:18 [SEVERE] Could not pass event PLUGIN_ENABLE to NPCTrader
    java.lang.NoClassDefFoundError: com/nijiko/coelho/iConomy/iConomy
        at com.MatCat.NPCTrader.PluginListener.onPluginEnable(PluginListener.java:24)
        at org.bukkit.plugin.java.JavaPluginLoader$34.execute(JavaPluginLoader.java:408)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:633)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-05-03 11:25:18 [INFO] [Minecart Mania] MinecartManiaChestControl version 1.1.3 is enabled!
    2011-05-03 11:25:18 [SEVERE] Could not pass event PLUGIN_ENABLE to NPCTrader
    java.lang.NoClassDefFoundError: com/nijiko/coelho/iConomy/iConomy
        at com.MatCat.NPCTrader.PluginListener.onPluginEnable(PluginListener.java:24)
        at org.bukkit.plugin.java.JavaPluginLoader$34.execute(JavaPluginLoader.java:408)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:633)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-05-03 11:25:18 [INFO] Done (0.206s)! For help, type "help" or "?"
    2011-05-03 11:25:27 [INFO] The automatic update-Check only work every 6 hours, the last check was 4 minutes ago.
    2011-05-03 11:25:29 [INFO] Stopping the server..
    2011-05-03 11:25:29 [INFO] CONSOLE: Stopping the server..
    2011-05-03 11:25:29 [INFO] Stopping server
    2011-05-03 11:25:30 [INFO] DefaultCommands 3.0.0 is disabled.
    2011-05-03 11:25:30 [INFO] [iConomy] Plugin disabled.
    2011-05-03 11:25:30 [INFO] [Minecart Mania] MinecartManiaCore version 1.1.9 is disabled!
    2011-05-03 11:25:30 [INFO] [Minecart Mania] Saving Sensor Data.
    2011-05-03 11:25:30 [INFO] [Permissions] (Phoenix) saved all data.
    2011-05-03 11:25:30 [INFO] [Permissions] (Phoenix) disabled successfully.
    2011-05-03 11:25:30 [INFO] Saving chunks
    2011-05-03 11:25:30 [INFO] Stopping server
    2011-05-03 11:25:30 [INFO] Saving chunks
    Hope this helps! :)
     
  21. Offline

    duschdas2

    When i try to use /npc create bill 5 10 then says it you need more money.
    Can i make it that a Admin must pay 0 ?
     
  22. Offline

    nickkeane

    I'm getting the same error that DaddyCool64 and Durandir are getting when creating an npc shopkeeper. I'm using Permissions and I have full '*' access to all commands.

    @Durandir
    For your multi-error plugin issues, did you update iConomy to v5? Most mods aren't up to date with v5 and will break.

    @Jeff van der Hoop
    You're config should look something like this:

    # NPC Trader Configuration File

    # Price settings. ItemSlot is the cost per item slot, Units are how much each unit per slot costs. The formula
    # is ((Units * Units Cost) * ItemSlots) + (ItemSlots * ItemSlot Cost) I.E., An NPC with 5 ItemSlots and 5 Units would
    # be: ((5 * 5)[25] * 5)[125] + (5 * 100)[500] = 625
    # RefundPercentage is how many money to refund the owner either when removing or downgrading the npc. 50% will give half
    # of their money back.
    Prices:
    ItemSlot: 100
    Unit: 5
    RefundPercentage: 50

    # UnitStack is how big a stack size per unit. an NPC with 5 Units and a UnitStack of 64 will hold 320 (5*64) items per slot.
    UnitStack: 64

    # Name prefix to put before NPC Names and Suffix to put after NPC Names.
    NPC:
    Prefix: "[NPC]"
    Suffix: ""


    # DB
    DB:
    # For MySQL
    Driver: "com.mysql.jdbc.Driver"
    Database: "jdbc:mysql://localhost:port/database_name"
    User: "user" ('root', or a valid username)
    Pass: "password"
    # This is the configuration for maxium allowed NPCs based on
    # Permissions or GroupManager FakePermissions AKA EssentialsGroupBridge
    # It is sectioned into 2 sections, Groups and Players. Either
    # configuration tree takes the respective name with Count as the value
    # holder. Examples shown below.
    # 0 means none
    # -1 means Unlimited
    # Any other negative number would equate to unlimited
    # Any posative number would be the limit of NPC's the player may be
    # owner flagged on.

    MaxNPCGroupsCount:
    Default: 2
    Donator: 5
    Moderator: 10
    Admin: -1
    MaxNPCPPlayersCount:
    matcat: -1


    Under #DB, You just replace the 'port', 'database_name', 'user', and 'password' fields. Make sure that whatever database you supply as a name already exists on your MySQL database server. This plugin doesn't create it automatically.
     
  23. Offline

    kush

    I get the error below every time I try to start with NPCTrader. It seems like everyone else can startup with this plugin just fine... I tried to run iconomy and npctrader alone and still same error. anyone have a solution?

    Code:
    2011-05-03 10:22:08 [SEVERE] null loading iConomy v4.65 (Is it up to date?)
    java.util.ConcurrentModificationException
        at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1100)
        at java.util.TreeMap$KeyIterator.next(TreeMap.java:1154)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:633)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
     
  24. Offline

    cpalms

    I'm still confused as to what the "Driver" and "DB" fields are for. I've been assuming they are database type and web address/web domain your database is located.

    Tell me if this is correct:


    # NPC Trader Configuration File

    Price settings. ItemSlot is the cost per item slot, Units are how much each unit per slot costs. The formula
    # is ((Units * Units Cost) * ItemSlots) + (ItemSlots * ItemSlot Cost) I.E., An NPC with 5 ItemSlots and 5 Units would
    # be: ((5 * 5)[25] * 5)[125] + (5 * 100)[500] = 625
    # RefundPercentage is how many money to refund the owner either when removing or downgrading the npc. 50% will give half
    # of their money back.
    Prices:
    ItemSlot: 100
    Unit: 5
    RefundPercentage: 50

    # UnitStack is how big a stack size per unit. an NPC with 5 Units and a UnitStack of 64 will hold 320 (5*64) items per slot.
    UnitStack: 64

    # Name prefix to put before NPC Names and Suffix to put after NPC Names.
    NPC:
    Prefix: "[NPC]"
    Suffix: ""

    # DB
    DB:MySQL
    # For MySQL
    Driver: "database.bukkit.org"
    Database: "bukkit_database"
    User: "bukkit_user" ('root', or a valid username)
    Pass: "bukkit1234"
    # This is the configuration for maxium allowed NPCs based on
    # Permissions or GroupManager FakePermissions AKA EssentialsGroupBridge
    # It is sectioned into 2 sections, Groups and Players. Either
    # configuration tree takes the respective name with Count as the value
    # holder. Examples shown below.
    # 0 means none
    # -1 means Unlimited
    # Any other negative number would equate to unlimited
    # Any posative number would be the limit of NPC's the player may be
    # owner flagged on.

    MaxNPCGroupsCount:
    Default: 2
    Donator: 5
    Moderator: 10
    Admin: -1
    MaxNPCPPlayersCount:
    matcat: -1


    The Red text is text I have changed. Would this be a correct or is more information/wrong information needed/provided?

    Thanks in advance.
     
  25. Offline

    robbert777

    do you need iconomy for this? or can you do it without?
     
  26. Offline

    William Hall

    I didnt get an NpcTrader folder?
     
  27. Offline

    swedish2011

    Code:
    2011-05-03 19:18:57 [INFO] NPCTrader is Using Permissions
    2011-05-03 19:18:57 [SEVERE] java.lang.NullPointerException
    2011-05-03 19:18:57 [SEVERE]     at net.minecraft.server.NetworkManager.f(NetworkManager.java:127)
    2011-05-03 19:18:57 [SEVERE]     at net.minecraft.server.NetworkManager.c(NetworkManager.java:226)
    2011-05-03 19:18:57 [SEVERE]     at net.minecraft.server.NetworkReaderThread.run(SourceFile:69)
    2011-05-03 19:18:57 [SEVERE] java.lang.NullPointerException
    2011-05-03 19:18:57 [SEVERE]     at net.minecraft.server.NetworkManager.f(NetworkManager.java:127)
    2011-05-03 19:18:57 [SEVERE]     at net.minecraft.server.NetworkManager.c(NetworkManager.java:226)
    2011-05-03 19:18:57 [SEVERE]     at net.minecraft.server.NetworkReaderThread.run(SourceFile:69)
    2011-05-03 19:18:57 [SEVERE] java.lang.NullPointerException
    2011-05-03 19:18:57 [SEVERE]     at net.minecraft.server.NetworkManager.f(NetworkManager.java:127)
    2011-05-03 19:18:57 [SEVERE]     at net.minecraft.server.NetworkManager.c(NetworkManager.java:226)
    2011-05-03 19:18:57 [SEVERE]     at net.minecraft.server.NetworkReaderThread.run(SourceFile:69)
     
  28. you really expect people to understand the mysql setup please make your own simpified version of the setup. the setup you provided is obviously for people planning on making a database. you sir, fail.
     
  29. Offline

    Durandir

    @nickkeane: Indeed I did, and I should have thought about that. The plugin didn't work anyway, so I'll just wait for the updated version.
     
  30. Offline

    DaddyCool64

    It's wrong.
    Take this:
    sorry for my bad english
     
  31. Offline

    nickkeane

    @cpalms
    What DaddyCool64 said is correct. The 'DB:' is simply a tag used to identify the config section - don't put anything in its field. Just make sure to specify whatever port the db server is running on (3306 is default), and that the port is open on your router/firewall.

    @Durandir
    you're welcome. most active mods should have iConomy 5 support soon enough.

    @cpalms
    Also make sure that you've installed mysql-connector-java-bin.jar to the folder with the craftbukkit executable.

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

Share This Page