Commit Graph

269 Commits

Author SHA1 Message Date
Phoenix616
1b85bda656
Fix some block place and break access message issues
Messages were missing on block break and placement sent multiple.
2021-06-21 16:16:19 +01:00
Phoenix616
f825995a85
Don't automatically add prefix to certain messages 2021-05-16 19:39:53 +01:00
Phoenix616
2be9207faa
Differentiate between shop accessing and administrating
This fixes LWC donation and display protections not working correctly
2021-05-16 00:31:33 +01:00
Phoenix616
c9b8e136d1
Fix that shop info doesn't show when protected externally 2021-05-16 00:06:01 +01:00
Phoenix616
07a22fa534
Try to create an account when creating shop for other players 2021-04-18 18:24:22 +01:00
Phoenix616
4172d8d484
Cancel sign change and interact if previous events are cancelled
This fixes that blocks get placed/items used when trying to auto-fill
 a shop sign and the sign is getting destroyed for some reason
2021-04-16 21:03:37 +01:00
Phoenix616
0c51af6b45
Further improve item name shortening for alias system (#425)
This will correctly shorten dashes and ignore the case when comparing
 name starts
2021-03-27 21:07:18 +01:00
Phoenix616
76e3f5b3c8
Add check if item has meta as that could've returned null (Fixes #427) 2021-03-27 18:44:04 +01:00
Phoenix616
ce7cade0a5
Fix potential case issues on item alias part matching 2021-03-26 15:57:38 +01:00
Phoenix616
b93361cd07
Fix shortened item aliases not working (Fixes #425) 2021-03-26 15:55:29 +01:00
Daniel B
f68a3203ac
Allow specifying of valid player names (#410)
This allows plugins which allow differently named players to work e.g. Floodgate. (Fixes #383)

Co-authored-by: Phoenix616 <max@themoep.de>
2021-03-17 22:46:05 +01:00
Phoenix616
227e3e77f0
Update double chests too after transactions (Fixes #412) 2021-03-03 18:16:14 +01:00
Phoenix616
ebdebb81df
Implement /shopinfo command/chest click for shop info (Resolves #203)
The shop information can include the owner, available stock, the buy/
 sell prices and detailed item information from the ItemInfoEvent.
This also includes an item component in both /iteminfo and /shopinfo if
 ShowItem is installed.
2021-02-15 17:28:33 +01:00
Phoenix616
2f0e7b81a8
Add separate error message for invalid names 2021-02-05 15:26:39 +01:00
Phoenix616
65df4c40c6
Improve performance by using Paper's non-snapshot states if available 2021-01-28 17:18:42 +01:00
Phoenix616
ba47b82ba1
Make Admin Shops use containers if available (Resolves #402)
Admin Shops can now be stocked the same way as player shops if a valid
 shop container is nearby. If no container is nearby it will just work
 as an unlimited shop.

This behaviour can be disabled with the FORCE_UNLIMITED_ADMIN_SHOP
 config option so that an admin shop is unlimited even though a valid
 container is next to it.
2021-01-24 23:33:36 +01:00
Phoenix616
f12e6ed3b6
Use full item name instead of shortened for aliases
This fixes an issue where aliases would not show up in transaction
 messages when the aliases item's string was shortened.

Also remove an unnecessary string length calculation from the
 MaterialUtil getName method if there was no max width set.
2021-01-03 20:47:07 +01:00
Phoenix616
819f028774
Don't use contains check when searching alias without meta (Fixes #394) 2021-01-03 20:13:26 +01:00
Phoenix616
b774258051
Remove OddItem support and implement own alias system (Resolves #360)
Reasoning why this is part of the core and not a separate addon:
The impact of this function is extremely lightweight when (almost) no
 aliases are defined so someone who isn't using this should not have a
 worse experience.
Additionally including it in the core (similarly to the discounts,
 taxes and restrictions) promotes it's availability while not massively
 increasing the maintainability.

As for the OddItem removal:
That plugin hasn't been developed for over 7 years and such unique
 plugin support should really be added via separate addon using the
 events system which, with the new ItemStringQueryEvent, now actually
 supports doing that from an external plugin.
If someone really managed to run their own private fork of OddItem for
 all those years then they should be able to also provide such a simple
 addon.
2021-01-03 01:55:01 +01:00
Phoenix616
9dce41aa30
Work around internal issue with ender chests
At the moment they can't be shops anyways so this shouldn't have any impact.
2020-12-20 14:50:57 +01:00
Phoenix616
fd81bc143e
Ignore signs and transactions made by players with invalid names 2020-11-18 15:10:58 +01:00
Phoenix616
9bf6e1abc1
Check permission for shop name again after querying it
This protects people that use valid player names as admin shop names
 from people with the same username as well as other cases where the API
 is used to manage access to shops with certain special names.
2020-11-17 19:54:08 +01:00
Phoenix616
4bd443c69f
Fix NPE in StockCounter for admin shops/missing containers 2020-11-02 01:08:15 +01:00
Phoenix616
7a1c091c74
Fix NPE in StockCounter on autofill/no item found (Fixes #376) 2020-11-02 01:06:48 +01:00
Phoenix616
f0bf9a08ec
Add message to access and creative mode ignoring 2020-10-31 20:59:07 +01:00
Brice Frisco
8d98958c2d
Stock Counter (Resolves #365) (#368) 2020-10-30 22:45:16 +01:00
Phoenix616
a14aaa7235
Fix issues with LWC Single/Double Chest protections (Fixes #359) 2020-09-24 16:54:36 +01:00
Corey Shupe
282c39c975
Implement LockettePro support and improve soft dependency handling (#354) 2020-09-10 14:32:34 +01:00
Phoenix616
6a34054bc7
Add latest test profile 2020-07-08 21:38:54 +01:00
Phoenix616
d1f6b1616b
Fix sign sticker on 1.14+ 2020-07-08 21:01:33 +01:00
Phoenix616
efe9ff7024
Fix TURN_OFF_SIGN_PROTECTION not working (Fixes #233) 2020-07-03 18:56:29 +01:00
Phoenix616
742f838f09
Add support for component bungee messages
Requires at least BungeeCord commit a64c34d
2020-07-03 18:24:14 +01:00
Phoenix616
98985efd63
Fix legacy %material placeholder not working 2020-07-03 18:13:40 +01:00
Phoenix616
9cbf33f68f
Cancel before sending message so that access is denied in case of error 2020-07-03 17:26:13 +01:00
Phoenix616
3c51f8ed87
Move more info to hover in shop messages to clean up chat
Also fix placeholders not working in not enough stock message
2020-06-28 23:00:45 +01:00
Phoenix616
a0630db6f8
Fix typo in iteminfo book generation message key 2020-06-28 18:09:00 +01:00
Phoenix616
6ee7c4759a
Add multi-language and component message support (Requires Spigot)
Message configs are now selected based on the client's language (can be
 toggled in the config) and will use MineDown formatting to allow
 display of component messages as well as usage of RGB colors in 1.16.
If found the legacy local.yml will be used instead of the per-language
 files. Move your local.yml to the correct lang config to if you want to
 use the per-client language option.
Version was also changed to 3.11 due to the many internal changes that
 have accumulated over time
2020-06-28 18:00:09 +01:00
Phoenix616
cbd427f561 Cancel left click event on shop sign
This should improve compatibility with other plugins that handle left
 click interactions too and shouldn't apply to shop signs you don't have
 access to.
Also includes a small improvement to not run the same permission check
 twice in certain cases.
2020-06-24 16:00:16 +01:00
Phoenix616
4a04a623a7 Improve metrics additions 2020-06-21 19:09:25 +01:00
Phoenix616
183c724583 Improve Metrics and add /csmetrics command
This adds some more logging to the metrics for some interesting plugin
 settings as well as player account and transaction counts. This data
 about account count and average transaction and item counts is also
 exposed ingame via the /csmetrics command.

This also removes the outdated mcstats metrics as that site is long dead
 now, the last data is from two years ago...
2020-06-19 21:47:28 +01:00
Phoenix616
1f8fd09dd2 Only update player name on join, don't create new accounts 2020-06-19 20:57:22 +01:00
Phoenix616
0b39fd1a5e Make auto-fill check both buy and sell permission separately (#325)
Also slightly changes how the auto fill message is sent to not send two
 messages (autofill and no-permission)
2020-06-19 18:58:00 +01:00
Phoenix616
3e061dda8d Add config option to limit trading with shops via protections 2020-06-18 17:01:52 +01:00
Phoenix616
e520544d3a Add ability to reload discount and restriction module (Resolves #252) 2020-06-10 14:03:22 +01:00
Phoenix616
4acd3efda1 Allow metadata ID to be used in shop transaction permission 2020-06-01 23:05:59 +01:00
Phoenix616
080597c515 Allow metadata ID to be used in shop creation permission 2020-06-01 22:58:34 +01:00
Phoenix616
9f84ca8551 Add option to sell/buy all with shift (#320) 2020-05-31 14:50:53 +01:00
Phoenix616
24d89dbc44 Add ability to mark all economic events as handled
This resolves issues when multiple listeners try to handle the same
 events e.g. for group support which would've passed it onto the normal
 listeners leading to errors
2020-05-21 01:08:00 +01:00
Phoenix616
d868fe8af6 Put the correct sign type into the chest on empty remove (Fixes #313) 2020-05-20 00:43:20 +01:00
Phoenix616
e22a50e1cf Only close our own inventories on teleport (Fixes #312) 2020-05-16 22:33:52 +01:00