Page 1 of 1

ChatMarket plugin tutorial

Posted: 20.1.2024 00:01:25
by Julius
ChatMarket plugin tutorial

ChatMarket is plugin added to BetaWorld 2.0 on early 2024.
This tutorial is created so players could have better time to understanding how it works.

This tutorial has 4 parts: Scoll down to read the posts :lol:
Part 1 - User commands, Read this if you want to see how to use shop for buying and selling items.
Part 2 - Making your own shop Read this if you want to make your own shop
Part 3 - Managing your shop Here's all shop management commands listed.
Part 4 - Addional information
Part 5 - Changelog


More questions about how to use the plugin?
Please create new topic here and ask,
Another option is that you ask on our other media: IRC, XMPP, Discord, InGame

Feature requests? Bug reports? Feedback?
In all of these cases, contact staffteam. (see above)

ChatMarket plugin tutorial Part 1

Posted: 20.1.2024 00:01:16
by Julius
Part 1 - User commands

User commands, and how to use them:
If you want to buy item type /shop buy [item] replace [item] with item you want to buy for example /shop buy 1 will
list all items with id1 on sale you can also type item name. "stone" is same as "1" since stone id is 1.
Command also accepts subtype argument to list all subtypes type stone:* (If subtype has not been spesified will :* be default value if item name does not contain data) (*=all typedatas will be shown)
If you want to sell item use command /shop sell [item] it will list all the shops that buy the item.
If you just want to list both buy and sell type /shop find [item]

How to read item listings:
Item list contains next elements: ShopName (red if shop is not discovered by you, green if it is.) Cnumber Bnumber Snumber
C=count the amount of the items the shop buys/sells
B=buy price (how much item costs)
S=sell price (how much you will be paid when you seel item)
Its also possible for number to be -- in that case that chest does not have option to buy/sell

After that on blue color there will be C1 (count 1) and B and S values these are 1 items values. (shop per 1 item price, makes it easier for you know how good deals are)

After that there might be text that tells chest status ("Nothing" does not showup, this is normal if shop has been just created). Possible values are:
  • Nothing - Shop has been unused since (re)registration. (unknow status, does not showup)
  • OnStock - Last action was successfull on shop
  • SoldOut - Chesthop was empty when it was last time tried
  • Full - Chestshop chest was full when last time checked
  • LowBal - If Chestshop owners balance was too low for last interaction
  • Infinity - This shop has infinity buy/sell capasity (most likely its admin shop)
At last there is upd: and time or date. That is last update time of the chest.

Witch shop statuses should you target?
Its always good idea to check all chests! since status can be outdated!
When you're buying: Nothing,OnStock,Full,LowBal,Infinity
When you're selling: Nothing,OnStock,SoldOut,Infinity

Going to shops:
On listing theres shop name on left, you can type command /shop tp [shopName] to teleport to the shop.
If you have not discovered the shop type /shop info [shop] that command shows shop location, travel there and interact with shopsings to discover the shop so you can teleport there on future. In somecases shops can put directions to their descriptions for eg: "shop can be traveled with railway starting next to spawn x100 y75 z-80"

Another way to find shops and shoplistings:
You can also type /shop list that will show you list of all shops, if you type /shop list [shopName] you will get list of all the shopsings insaid taht shop.

ChatMarket plugin tutorial Part 2

Posted: 20.1.2024 00:01:45
by Julius
Part 2 - Making your own shop

Basics:
Creating new shop is pretty simple, goto where you want your shop spawn to be located and type /shop create [shopName]
After that type /shop register to register your shop sings to it.
If you dont have existing chesthops: In this case you can just create new chesthops and they will be added to your shop
If you have existing chestshops: In this case leftclick all your shopsings and they will be registered for you
Remember to type /shop done after youre done :wink:

If you have other players chests on your shop:
If you have other players chests on your shop before you can register their chests you need to add them as shopkeeper to your shop.
type /shop add [playerName] to send them request to be added. notice: They need to be online! After that they will get request to chat, to accept player needs to type /shop accept or to deny /shop deny you will get reply from the plugin about the question was it answered in correct timewindow (30secs) if your offer was accepted will player now be shopkeeper on your shop. now you can register their chests and they can also register their chests (or other players chests) to your shop.

Warnings:
creating shops might cost, do /shop help to see does it cost (if it does amount will be shown next to "/shop create" command)
chestshops need to be near shop spawn, you will get prompt if the shop is too far away.

ChatMarket plugin tutorial Part 3

Posted: 20.1.2024 00:01:08
by Julius
Part 3 - Managing your shop

Short explanation for all the things:
/shop create [shop] - will create new shop for you
/shop delete [shop] - deletes the shop and unregisters all shopsings in it. You can't undo this and there are no confirmation prompt!
/shop register - Starts registering mode, with this intecact with or create new chestshops and they will be registered to your shop Remember to type /shop done after youre complete!
/shop unregister - Unregister shopsings with id. Id can be get with command /shop list [shop]. it lists all shopsigns and their id's ids can be also calculated manually beause id is: worldName,x,y,z zyz being shopsing cordinates. You can't undo this and there are no confirmation prompt!
/shop rename - renames your shop, note that new name cant be another shops name. (oviously) This will make all the players who have discovered the shop to undiscover it!
/shop setdesc - set description for your shop, it would be prefered to contain short description of what kinda shop you have and how to find it.
/shop setowner - change shop owner, player who youre giving the shop will get prompt asking does he want it, if he accepts shop ownership will be given to that player. If you still want to have access to the shop as shopkeeper you add yourself as one before giving the shop away.
/shop setspawn Sets shop spawnlocation to your current location. Note: The direction youre watching will be also saved to this This will make all the players who have discovered the shop to undiscover it!
/shop add - ask player to become an shopkeeper to your shop.
/shop remove - remove player from your shopkeeper list.
/shop leave - quit from shopkeeper job (removes you from shopkeeper list of the spesified shop if youre in it)

Warnings:
There are no undo feature on any of these commands.
When doing owner/shopkeerer commands make sure you type player name correctly, if there are many players that have similar name than you type (if you didn't type full name) the command will be executed for that player
Ongoing offers (questions for other players) can NOT be canceled.

ChatMarket plugin tutorial Part 4

Posted: 20.1.2024 00:01:14
by Julius
Part 4 - Addional information:

About the plugin:
Plugin is created by JuliusVan and is used on BetaWorld 2.0 CraftBukkit server.
Since plugin is private it is not used on another servers, (like other plugins like skyblock, minigameengine)
But in far future theres always change that the plugin will be shared for others, thats why values that are configured for BW2 (like shop creation cost or shop distance, will not be listed there since thoose are values that servers can change with config)

Addional info:
Current builds are compiled under java 7
Plugin is created for CraftBukkit 1060 but has been also tested on BetaWorldYdinCB1060
Plugin can hookup will all economy plugins with Register (this is only used on creation cost) (optional)
Plugin can use essentials to teleport players (optional) (so its compatible with ess delays and fees)

Time format on itemlisting is either day.month.year or day.month. or hour:minutes
When shops last interaction was on last year (or earlier) will full day.month.year be shown.
If shops last update was same year will format be day.month.
If shops last update was same day as current day will format be hours:minutes
Time format is 24h. (0:00-23:59)

Ordering of the itemlistings:
/shop buy will be ordered by cheapest buy price
/shop sell will be ordered by shops that pay most of the item
/shop find will be orderder by latest update to chest status

SoldOut - before 1.1.0 this status was "OutOfStock"
Full - before 1.1.0 this status was "FullStock"
Before 1.1.0 listings defaulted for :0 now they default :*
LowBal - before 1.1.3 this status was "LowBalance"

Tips and Tricks:
On /shop buy/sell/find you can spesify subtype to be -1 thats same as * (ex. /shop find 6:-1)
Most of the commands are not casesensitive (like shop names, exeption oviously being when naming them)
When you have shops that buy stuff and you restock them (empty if players can only sell to them or remove some of the items there if it has both sell/buy), hit your own sign to sell items (this will update the listing status to say OnStock instead of OutOfStock or Full)
"/shop usage" command will give you usage of the plugin (same as /shop)

ChatMarket plugin tutorial Part 5

Posted: 5.2.2025 16:02:46
by Julius
Part 5 - Changelog:

Please note that the date format used is: day.month.year

v0.0.0 11.1.2024
Development started.

v1.0.0 15.1.2024
Everything :)

v1.0.1 15.1.2024
Fix StringIndexOutOfBoundsException on /shop list if there where no any shops.

v1.0.2 16.1.2024
Fixed wrong shop color on /shop buy,sell,find prompt if player was not discovered any shops

v1.0.3 16.1.2024
Fixed nullpointer on shop tp when player's discovered shops was null.

v1.0.4 16.1.2024
Fixed teleporting to shops that had uppercase chars on their name
Fixed shop list listed all shops lowercase
Fixed old leftover code reformated text on item listing in some rare cases

v1.0.5 19.1.2024
Fixed shop setspawn did not fail when it should had.

v1.0.6 19.1.2024
Fixed shop list owner/shopkeeper color did not showup if player did not have any discovered shops.
Fixed shop rename allowed to rename shop with another shops name (this way replacing the old shop)
Fixed shop rename did not rename shopsings

v1.1.0 22.1.2024 Major update!
Updated API to version 2
Added /ashop command (admin command)
Fixed delete command ran from console did not show error when shop was not found.
Added admin overrides all commands that needed them.
Changed some messages (eg. added shop name to many texts and removed ~ when registering shopsings)
Fixed shopmanagers with usernames that had uppercase letters (and didnt own the shop) could not go into register mode
Shop list color prompt will not be shown on console since that does not matter
Fixed unregister command ran from console did not show error if id was not found. (or autodelete it on error)
Fixed unregisrer command shopkeeper check failed if player had uppercase chars on their name.
Listing data default now -1 if not spesified
Listing will now show -1 as * on data field
Fixed on listing shops that "buy" "sell" was incorrectly warped (replaced with "offer" and "take")
Changed "OutOfStock" to "SoldOut" and "FullStock" to "Full"
Added infinity api and Infinity status
Shop registering "add as shopkeeper" propt will be only shown if registering player is the owner of the shop.
Fixed full "usage" msg was not shown on console
Added reregistered message on reregisteration (before this it just said registered)
Fixed 0amount shopsings where allowed to regisrer to api
Added if both buy and sell are 0 or less will registering be canceled
Fixed shop list on incorrect id without :data caused ArrayIndexOutOfBoundsException

v1.1.1 23.1.2024
Fixed switch overflow when accepting questions

v1.1.2 30.1.2024
Fixed shop rename with oldname containing uppercase chars did cause shopsings in that shop not to reregister to new shop
Fixed shop rename existing check was not being done when command was not run by player
Fixed shop rename overwrite another shop check was not being done when command was run from console
Added version display on usage command (default if unknow subcommand has been used)
Fixed "Unknown sub command!" error was not shown

v1.1.3 19.2.2024
Fixed shop setspawn scanned tru all server's shops
Fixed shop setspawn checking was done to shops location instead of player's
Changed LowBalance to LowBal
Removed leading black 0 from shop listing and -- is now -
Fixed no deals found message was formated to offer search always

v1.1.4 4.3.2024
Fixed shop remaming if shop contained uppercase chars
Changed admin continue message to be more short (so it stays on one line)

v1.1.5 14.8.2024
Changed plugin is now fully CraftBukkit 1060 compatible