GlobalMarket
GlobalMarket is a global market system. It allows players to buy and sell items via a convenient in-game interface. It's similar WoW's Auction House or Runescape's Grand Exchange. I created this plugin awhile ago (back in the days of WebAuction, it's what inspired me) for private use, but I've decided to release it to the public. This plugin requires Vault and ProtocolLib, other than that, just drop it in plugins
(make sure you have Vault plus a supported economy plugin installed) and start trading!
Features
- Players can put any item up for sale using a dead simple in-game GUI system (see below)
- Uses ProtocolLib for proper item serialization that supports Bukkit, Spigot, and Cauldron
- Real time interface, all trades show up immediately without having to 'refresh' or close the GUI
- No maintenance or admin interaction required
Mailbox system that allows you to set up market areas or auction houses(not currently in 2.0.0)A built in price guide that compiles average prices from previous transactions(not currently in 2.0.0)
Latest Dev Build
Development builds of this project can be acquired at the following continuous integration server.
These builds have not been approved by the BukkitDev staff. Use them at your own risk.
http://build.survivorserver.com/job/GlobalMarket%202.0.0/
Changelog
Usage
- The Interface
- This is a display of all current listings, you click an item to buy it. You can shift+click to remove a listing if you own it, or if you have the "globalmarket.listingsadmin" permission. Listings automatically expire after 1 week (configurable). You can use
/market
to access the menu.
- Stock
- When you purchase an item it will be sent to your stock. Stock is an entirely optional system but is suggested to be enabled, as disabling it will disable certain other features like
/market send
. The stock system can hold a configurable amount of stacks of items in a configurable amount of slots. Once you place an item in your stock, you can list it to be sold to other players. Players can also send items to other players' stock via/market send
if they have the "globalmarket.command.send" permission.
- Server Listings
- You can create 'infinite listings' that do not expire and can't be bought out. Create them with
/market createinf <price> <[amount]>
. There's a dedicated section to server listings in the Market menu. You'll need the "globalmarket.command.createserverlisting
" permission to do this. Or you can disable this system all-together in the config.
Commands
Command | Description | Permission |
---|---|---|
/market | Opens the Market menu. | globalmarket.use |
/market ? | Shows command help. | <no permission> |
/market send <player> <[amount]> | Sends the item you're holding to <player>'s stock. Amount is optional. | globalmarket.command.send |
/market createinf <price> <[amount]> | Creates a server listing. Amount is optional. | globalmarket.command.createserverlisting |
/market reload | Reloads config.yml | globalmarket.command.reload |
Permissions
- globalmarket.use - base permission, required to use /market
- globalmarket.listingsadmin - ability to remove all listings
- globalmarket.command.send - ability to use /market send
- globalmarket.command.createserverlisting - ability to use /market createinf
- globalmarket.command.reload - ability to use /market reload
Config
All config values have comments that explain what they do in config.yml, how convenient for me!
If you wish to blacklist items from being used on the Market, there is blacklist.json. You can add material values with meta values:
- APPLE:0 - blacklist apples
- INK_SAC:-1 - blacklist all dies
If you're running Cauldron, you can do things like:
- oredict:ingotSteel - blacklist any item with an OreDictionary value matching ingotSteel
- extracells:storage.component:-1 - blacklist all ExtraCells storage cells
Locale
Virtually every string in the plugin is editable via the "en_US.json
" file, inside the plugin's JAR. It's pretty straightforward to edit. Don't replace or edit the %s
or %1$s
's, these are variables. For example, "Item sold: %s" would appear as "Item sold: Cobblestone" in-game. You can add/edit colors by typing &
plus a color code. So light green (the color code is a) would be &a
. You can find color codes here: http://ess.khhq.net/mc/
You can also create an entirely different language set, name it something like ch_CN.json, stick it in the server's JAR, and change the appropriate config value in config.yml to use it.
Source
https://github.com/Dasfaust/GlobalMarket
That's all for now. Sorry if things are unclear, I'll be updating this page with more information periodically. If you're stuck just add a reply and I'll do my best to help!
FYI EVERYONE:
Fully operational with MCPC 1.4.7 LATEST...
BUT..
If you have mcMMO installed this plugin simply will NOT function until 1.5.1!!!
I think the easiest way to fix the player spamming is to add a cooldown on the /create command with configurable (ingame, if you would) time between listings.
Desired checks in a future update would be-
delay_create: #cooldown for /create
listings_per_player:
Any possibility on adding a limit on the amount of listings per player? Even better would be having that settable per group, so for example players can have 5 listings at once while VIP can have 10?
2013-05-02 21:33:17 [SEVERE] Could not pass event InventoryClickEvent to GlobalMarket v1.2.0
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
at net.minecraft.server.v1_5_R2.PlayerConnection.a(PlayerConnection.java:1177)
at net.minecraft.server.v1_5_R2.Packet102WindowClick.handle(SourceFile:31)
at net.minecraft.server.v1_5_R2.NetworkManager.b(NetworkManager.java:292)
at net.minecraft.server.v1_5_R2.PlayerConnection.d(PlayerConnection.java:110)
at net.minecraft.server.v1_5_R2.ServerConnection.b(SourceFile:35)
at net.minecraft.server.v1_5_R2.DedicatedServerConnection.b(SourceFile:30)
at net.minecraft.server.v1_5_R2.MinecraftServer.r(MinecraftServer.java:580)
at net.minecraft.server.v1_5_R2.DedicatedServer.r(DedicatedServer.java:225)
at net.minecraft.server.v1_5_R2.MinecraftServer.q(MinecraftServer.java:476)
at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java:409)
at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:573)
Caused by: java.lang.NullPointerException
at com.survivorserver.GlobalMarket.MarketStorage.getListing(MarketStorage.java:110)
at com.survivorserver.GlobalMarket.InterfaceListener.handleListingsAction(InterfaceListener.java:92)
at com.survivorserver.GlobalMarket.InterfaceListener.handleClickEvent(InterfaceListener.java:40)
at sun.reflect.GeneratedMethodAccessor1046.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
... 14 more
@bird0021
This plugin should work with MCPC.
@Zawmbee
I guess both price and item caps are possible. I hadn't thought about players using it as storage.
Oh, any option for restricting player to sell specified quantity of the goods, and no restrict for OP?
@xdasfaust
Yes but, xdasfaust, on PVP servers the idea is that all your items can be taken if someone finds your base. Now people are just putting items for sale on the market at $100000000. It's basically their own infinite storage. A price cap would be lovely.
Need to increase not sell items? If mod items to sell, will be bad, because I MCPC Bukkit mod can add reload history.yml ?
@Adrenalineq
Are there errors on startup, or any other errors besides the one when you click? Are you clicking an item or an empty inventory slot? I just tested version 1.1.1 and the latest dev build with Vault 1.2.26, Fe - Economy 0.6, and Spigot #833 and they worked fine, no errors.
Make sure you've updated to 1.1.1 or later, and deleted
locale.yml
like I suggested in my last reply.@Mortalsinn
No, because listing things is kinda the point.
@DanishBaconMinecraft
A feature like that has already been planned.
@deleted_10786114
Grats!
@deleted_10786114
YESSSSS!!!! FIXED IT!!!!!! I'm on a Mac and I kept downloading and installing java from the Oracle website, but when I installed it from Software Update, it finally worked!!!!!
This plugin has potential! I have a suggestion! Do you think it could be possible to make a contract option? Like let say that a player wants to buy 64 diamonds, but there are not enough diamonds on the market. He or she can then use /market contract diamond 64 1000, and then there will be this log for sale, which contains 1000$, on the market, but the price is not cash - it is 64 diamonds.
Any chance of adding a feature to limit the number of items / slots a user can have on the market? possible? kind of annoyed with some of my users adding 10000000000000000000000000000000 items to the market..
2013-05-01 20:51:42 [SEVERE] Could not pass event InventoryClickEvent to GlobalMarket v1.1.1
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:26)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:479)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:464)
at net.minecraft.server.v1_5_R2.PlayerConnection.a(PlayerConnection.java:1194)
at net.minecraft.server.v1_5_R2.Packet102WindowClick.handle(SourceFile:31)
at org.spigotmc.netty.NettyNetworkManager.b(NettyNetworkManager.java:186)
at net.minecraft.server.v1_5_R2.PlayerConnection.d(PlayerConnection.java:110)
at net.minecraft.server.v1_5_R2.ServerConnection.b(SourceFile:35)
at org.spigotmc.MultiplexingServerConnection.b(MultiplexingServerConnection.java:72)
at net.minecraft.server.v1_5_R2.MinecraftServer.r(MinecraftServer.java:582)
at net.minecraft.server.v1_5_R2.DedicatedServer.r(DedicatedServer.java:223)
at net.minecraft.server.v1_5_R2.MinecraftServer.q(MinecraftServer.java:471)
at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java:403)
at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:573)
Caused by: java.lang.NullPointerException
at com.survivorserver.GlobalMarket.MarketStorage.getListing(MarketStorage.java:111)
at com.survivorserver.GlobalMarket.InterfaceListener.handleListingsAction(InterfaceListener.java:81)
at com.survivorserver.GlobalMarket.InterfaceListener.handleClickEvent(InterfaceListener.java:40)
at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
... 15 more
also is it a problem that i have bukkit 1.5.1-R0.2 Beta
@xdasfaust
automatic_payment enabled, cut: disabled but i change it to 0.05 ;p
listings:
http://pastebin.com/38bZjkPk
Permissions: PEX
@xdasfaust what version of java should i be running? i just installed j7u21 jdk and it still doesn't work
@Adrenalineq
I might have infinite listings up today. As for the bugs:
Try deleting config.yml and locale.yml, then load the latest dev build.
Bugs:
Spigot: Spigot-#830
GlobalMarket: v1.1.0
Vault: v1.2.25-b320
At locale.yml you have typo - 77 line ";" - it cause errors at startup :p
@xdasfaust
Sorry for asking.. but when do you plan to add unlimited-mode ? ^^
Woohoo, dev builds are back. I had to set up Jenkins as per the BukkitDev guidelines. It's a little overkill, but it's really nice for if someone requests a small change or reports a bug, I can change a few things and point them to a dev build for testing.
@iTeush
Nice video, even though I don't understand any of it :) I've updated the French locale with your changes.
@Mine_That_Dimond
Do you have Vault installed?
@CraftyMcloving
Make sure there's no see-through blocks in your line of vision, like torches, signs, or vines. I'll try to get this fixed.
This has been asked a few times, so this is to no one in specific: as for using NPCs to open the listings window, I don't really know. I guess that would depend on what NPC plugin you use. I might look at Citizens later and see if it has an API I can use.