Commit Graph

572 Commits

Author SHA1 Message Date
Rutger Kok
e6b05ff982 Add support for BlockLocker
It's no longer possible to open shops on chests that were protected by someone else.
2021-03-17 22:11:54 +01:00
Phoenix616
227e3e77f0
Update double chests too after transactions (Fixes #412) 2021-03-03 18:16:14 +01:00
Phoenix616
7b2fe6c1f3
Rework how accounts are queried from (short form) user names
The AccountQueryEvent will now check both, short names as well as full
 names and the getAccountFromShortName method will no longer check full
 names or offline player names. (Names in a short format wouldn't match
 them anyways)
This should not change the overal behaviour as the plugin uses the
 AccountQueryEvent internally as that is now checking for full name/
 offline player accounts. (And short names are matched first)
2021-02-24 15:18:15 +01:00
Phoenix616
68c9df2078
Re-add ability to quickly create buy shops by only specifying price
The change to the more advanced patterns required it to always specify B
2021-02-24 15:01:10 +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
320d9ad9fb
Fix adapter backwards compatiblity (and getHolder loading 🙈) 2021-01-28 17:33:40 +01:00
Phoenix616
65df4c40c6
Improve performance by using Paper's non-snapshot states if available 2021-01-28 17:18:42 +01:00
Phoenix616
22d3f262f5
Improve NameManager OfflinePlayer and UUID version handling (#383)
This also removes the deprecated methods which might interact with the
 changed methods in unintended ways from the NameManager and the
 PreTransactionEvent.
2021-01-28 15:26:23 +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
9843e92525
Make price line pattern matcher more strict (Fixes #401) 2021-01-14 19:01:04 +01:00
Phoenix616
71e8ef732f
Fix error in short item code generation logic (Fixes #395) 2021-01-06 20:08:38 +01:00
Phoenix616
66eaab7c4d
Include log level (if not INFO) and error stack trace in log file 2021-01-04 22:42:17 +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
395f0513a6
Improve ignore config setting comments to make it more clear 2020-12-04 15:01:26 +01:00
Phoenix616
4e40823d23
Fix ShowItem incompatibility as well as update adventure 2020-12-04 14:53:27 +01:00
Phoenix616
af32b041ff
Implement missing Inventory#isEmpty method in AdminInventory 2020-12-01 20:05:11 +01:00
Phoenix616
51e9d5f267
Use adventure text api in order to fix hover issues
This also has the side-effect of restoring CraftBukkit compatibility

Also move all libraries into a dedicated Libs package
2020-12-01 19:48:26 +01:00
Phoenix616
8aff3da550
Add ENSURE_CORRECT_PLAYERID to properties metrics chart
Also fix missing new line in metrics chart code.
2020-11-18 15:31:44 +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
00fa83c56a
Improve UUID version handling (Fixes #382, #337)
This adds a new config option ENSURE_CORRECT_PLAYERID which lets one
 disable the check whether or not a player's UUID version matches the
 server's online/offline mode UUID version. Due to potential issues with
 offline players which might occur when this isn't checked disabling
 this can't really be supported and any issues should first be tested if
 they still occur with this option enabled.

This also forces the UUID to version 4 if the server runs in online mode
 as it should not be necessary in any normal setup to detect the UUID
 version dynamically in that case. (Dynamic detection is only necessary
 for offline mode which might potentially run behind a proxy)
2020-11-16 14:09:07 +01:00
Phoenix616
cbb605df81
Set default locale to English if it is set to an invalid one in config 2020-11-12 23:16:40 +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
9a08e8897b
Don't allow opening of shops via sign by default
This has caused lots of confusion in the past regarding the first time
setup and might be a feature that people don't even want to have.
(e.g. to allow coloring of the signs with dyes)
2020-10-31 20:59:15 +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
Phoenix616
de14a1affb
Don't parse player name as count in /csgive (Fixes #355) 2020-09-14 14:36:10 +01:00
Corey Shupe
282c39c975
Implement LockettePro support and improve soft dependency handling (#354) 2020-09-10 14:32:34 +01:00
Phoenix616
741a10cb95
Update server economy account warning to include shop creation and uuid 2020-09-08 12:20:19 +01:00
Phoenix616
5bc23214e0
Fix issue with items that have a single character in name (Fixes #339) 2020-07-08 21:40:06 +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
8c1c80e138
Don't log SERVER_ECONOMY_ACCOUNT warning if it's not set 2020-07-04 18:18:59 +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
493784c2dd
Fix that the legacy locale is not automatically used 2020-07-03 17:15:36 +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
7161c0bfdf Add Jenkins test build notifier
This will only send a notification into the log once for each new build
 and can be disabled in the config or the new jenkinsBuildNotifier.yml
2020-06-18 21:19:35 +01:00
Phoenix616
d3f717deef Do not enabled automatic updates by default without user interaction 2020-06-18 18:14:53 +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
Phoenix616
7f32a7a722 Fix InventoryOpenEvent listener not applying to non chest containers 2020-05-16 22:30:14 +01:00
Phoenix616
009febb5c2 Call add and subtract event to give listeners a chance to handle them 2020-05-13 23:56:47 +01:00
Phoenix616
7b978ae022 Fix shop sign getting broken with autofill marker (Fixes #310) 2020-05-13 23:13:56 +01:00
Phoenix616
a427c8c5a0 Fix shop removal with partial transactions (Fixes #307) 2020-05-06 20:53:59 +01:00
Phoenix616
7fbf50cefe Allow 0 for a free shop (Resolves #297) 2020-05-06 20:38:41 +01:00
Phoenix616
8e6bc01d97 Fix automatic setting of item lines (Fixes #308) 2020-05-06 20:17:50 +01:00
Phoenix616
3bf54529db Add support for LWC LimitsV2 module (#293)
This adds a new OTHER_BREAK PreShopCreationEvent outcome to indicate
that the sign should get broken. To keep it backwards compatible with
other plugins setCancelled still sets OTHER and will not lead to a sign
break. The breaking logic is also moved out of the ErrorMessageSender
as it didn't make sense to have there. (It also wasted a tiny bit of CPU
by getting the block of the state again)

Do do this it now fully depend on LWCX, it's the only active version anways.

Also fixed a possible out of index error with the sign lines.
2020-05-04 22:33:46 +01:00
Phoenix616
bb4eece790 Fix pre-events not being uncancellable 2020-05-04 22:16:09 +01:00
Phoenix616
0c1b82c9d8 Fix /iteminfo coloring 2020-05-04 21:40:39 +01:00
Phoenix616
432c505806 Add more information to /iteminfo command and make messages configurable 2020-05-03 15:05:24 +01:00
Phoenix616
0d08880ed2 Some cleanup of code and deprecated stuff
Also deprecate amount and account setters on the CurrencyCheckEvent,
these values will be final in a future version. Changing them here does
not make sense in the internal structure.
2020-05-03 02:37:06 +01:00
Phoenix616
9ae6725c5d Listen on low so that other plugins could hook into before
This is necessary if you want to do something like automatic completion
of the sign for group/bank accounts.
2020-05-03 02:34:57 +01:00
Phoenix616
4673a3f00c Use AccountQueryEvent in NameManager#canUseName utility method 2020-05-02 19:25:44 +01:00
Phoenix616
8c83be59ba Option to block shop creation when LWC limit is reached (Resolves #293) 2020-05-02 15:57:42 +01:00
Phoenix616
3bed1261aa Move account access check to an event
This should be the final addition that allows other plugins to implement
multi-owner/group shops like requested in #119 and #133 by listening to
all the transaction events to handle money flow and shop/account access
events to enable access to the actual shop.
2020-05-02 15:32:48 +01:00
Phoenix616
c6f6672188 Fix uuid version check 2020-04-27 21:39:46 +01:00
Phoenix616
744b02a447 Add ability to configure server economy account UUID
This adds better support for fake server economy accounts by not
requiring that a player with the name already has an account but allow
automatic creation of the account with the fake UUID provided in the
config.

Old configs that only define the name will still work though.
2020-04-27 21:00:46 +01:00
Phoenix616
e57bf94923 Don't continue checking if account can hold currency if already done 2020-04-24 14:54:48 +01:00
Phoenix616
781e017ae9 Add debug logging for configuration loading 2020-04-17 15:10:27 +01:00
Phoenix616
2426aef969 Add space at start of comments when writing config 2020-04-17 15:10:09 +01:00
Phoenix616
e8034e20b0 Change hard limit to one million 2020-04-17 14:51:37 +01:00
Phoenix616
bb17cc35a0 Add ability to set max amount and improve error messages 2020-03-24 00:31:08 +01:00
Josh Roy
809546ecab
Update bStats to 1.7 (#295)
Also updates bStats maven repo to new one
2020-03-08 18:26:52 +01:00
Phoenix616
7bd00f23be Block change block event for shop containers/signs 2020-02-22 17:43:17 +01:00
Phoenix616
9d6c2f8c1b Improve LWC shop protection messages 2020-02-15 18:20:55 +01:00
Phoenix616
3fe35cd0a5 Clean cache after protection registration and fire post event 2020-02-15 18:10:18 +01:00
Phoenix616
2a37304113 Specify locale when changing case (Fixes #291) 2020-01-29 16:35:04 +01:00
Phoenix616
d4bb775086 Check WorldGuard's chest protection too 2020-01-17 17:41:22 +01:00
Phoenix616
d0919e78d7 Fix BuildPermissionEvent logic
This makes it possible for other plugins to force allow placing of shops
and avoid potential issues in the check if multiple plugins are changing
the allow settings.

ALso while the allow counters were a nice idea they might not have even
worked correctly because in the case of only one plugin disallowing it
they would've still returned true at the end. Only if one listener
allowed it and another disallowed it the end result would be disallow.

This also makes the BuildPermissionEvent implement Cancellable (which is
an inverted allowed) in order to easily ignore events that are already
disallowed by another listener.
2020-01-16 00:04:28 +01:00
Phoenix616
bd8f2dfc19 Add RedProtect support 2020-01-15 23:44:34 +01:00
Phoenix616
3d83bfdddd Add GriefPrevention support (Resolves #227)
Also slightly cleanup dependency logic loading to not have per-plugin
code in Dependencies class
2020-01-15 23:40:42 +01:00
Phoenix616
37b7669acb Fix players being allowed to build outside regions (Fixes #278)
Basically players were allowed to build shops outside regions in the
case where no region manager was available.
2020-01-15 23:13:18 +01:00
Phoenix616
4067427650 Add ability to define type of LWC protection in config 2020-01-15 22:55:40 +01:00
Phoenix616
2075693e12 Add ability to send shop owner notifications via BungeeCord 2019-11-19 21:50:17 +01:00
Phoenix616
40467e3522 Add support for Paper's BlockDestroyEvent for sign breaks (Fixes #214)
Instead of using different modules we use a bukkit profile to test backwards compatibility with pure-Bukkit servers and use the paper-api in the default profile. This should really be done with modules in the future. The actual selection which listener to use is handled by checking if the event class exists on event registration.
2019-11-04 17:26:43 +01:00
Phoenix616
35dd13f917 Slightly change access_denied message to indicate container access error
This is necessary as the no_permission error was worded exactly the same making debugging more difficulty. Also this way someone who thinks he needs to access the chest doesn't think that he doesn't have access to the shop at all.
2019-11-04 17:26:22 +01:00
g--o
88a23a38db Added toggle access command (#271)
Thanks to @g--o and @JRoy
2019-09-16 12:56:30 +01:00
Phoenix616
c028015d5e Improve /cstoggle by using UUIDs and HashSet instead of ArrayList 2019-09-14 23:49:40 +01:00
Phoenix616
d51a512ab8 Fix Vault CurrencyAmountEvent listener returning wrong balance 2019-09-06 13:31:19 +01:00
Phoenix616
bc680afcaf Slightly rework item comparison to fix legacy spawn eggs (Fixes #264) 2019-09-06 13:23:49 +01:00
Phoenix616
58cf96dca8 Fix issues with double chests not begin detected as shops in some cases 2019-08-31 11:20:02 +01:00
Phoenix616
b718fcc429 Use shop owner for LWC protections and not the creator
Also fix a bug where it was possible for shops to be created with shop owners that did not have a valid Account information when other plugins manipulated the name line after the NameChecker checked it. Now it gets checked twice, once at the start (to abort early and to populate the ownerAccount field) and once at the end to check again when the name line changed.
2019-08-22 14:03:27 +01:00
Phoenix616
f90d23cfc3 Update LWC protection and support more LWC forks (LWCX and Modern-LWC) 2019-08-22 13:09:54 +01:00
Phoenix616
5eb467a1d3 Set UUID version if players are online when manager loads (Fixes #265) 2019-08-20 13:15:41 +01:00
Phoenix616
930b2cc07b Use prepared queries to avoid special character issues (Fixes #258) 2019-07-29 18:50:26 +01:00
Phoenix616
e972a7d657 Add further workarounds for comparing meta data (Fixes #250)
This is especially obvious for books where all the text will have color codes after dumping and loading them from the database. In order to be able to still compare to them we will load the item the item and then dump it again if it doesn't match the original one.
2019-07-08 18:05:50 +01:00
Phoenix616
6c5e5ece81 Block editing of shop signs that user can't destroy (BUKKIT-1293) 2019-07-08 17:21:21 +01:00
Phoenix616
481e2bdf9e Fix issue with sign sticker 2019-06-09 15:04:14 +01:00
Phoenix616
b0523b2199 Add cooldown for empty/full shop owner notifications 2019-05-27 17:11:09 +01:00
Phoenix616
26daa4531d Always register WorldGuard shop flag (Fixes #230)
The configuration isn't loaded yet when the plugin loaded and the flag initialised so we can't check that there. The config option is checked at the point where the flag is handled though so there is no difference from the intended functionality when registering the flag anyways. The only downside is that this could be a tiny bit confusing to the user in the end but I think that is a small price to pay when it wouldn't be working at all otherwise.
2019-05-13 00:16:57 +01:00
Phoenix616
17e7ab781b Fix shops creation message getting send on auto fill
The NameChecker now catches any exception that might be thrown when querying the account in order to properly cancel in the case of an unknown account or an error that occurred in the event to not let players create shops that they don't have access to if an exception occurs.
2019-05-08 00:22:16 +01:00
Phoenix616
2907706399 Actually send error message and break sign on unknown player error 2019-05-08 00:11:47 +01:00
Phoenix616
a8c57bc0ab Set name line empty if name isn't usable and always use account name 2019-05-07 23:57:56 +01:00
Phoenix616
ca94031ddf Fix wrong UUID version comparison logic 2019-05-07 23:48:04 +01:00
Phoenix616
a95f7316d6 Fix ProtectionCheckEvent not being used when accessing shop 2019-05-07 16:13:56 +01:00
Phoenix616
b300798a62 Make querying of accounts by (short) name an event too 2019-05-06 23:49:16 +01:00
Phoenix616
619ac17cd5 Also use registry to get the allow-shop flag 2019-05-06 18:19:33 +01:00
Phoenix616
2e0c5a3cac Fix issues with user account storage on shop creation
This fixes a bug where shop owner accounts would not be created in certain cases e.g. when the owner had certain admin permissions or created the account for another player while having certain admin permissions.
2019-05-05 19:23:04 +01:00
Phoenix616
4769ae2cf7 Allow loading of different numbers to BigDecimal (Fixes #225)
Also catch wrong types when loading the config better without completely disabling the plugin and revert "Make sure special parsers are setup" and register the parsers static again.
2019-05-03 21:08:56 +01:00
Phoenix616
da1dd94705 Make sure special parsers are setup (Might prevent #225)
There might have been a case where when trying to pair the yml file with the Properties class the parsers weren't actually registered yet as nothing was called on the Properties file yet.
2019-05-02 18:35:45 +01:00
Phoenix616
816fe77f27 Use registry to register WorldGuard flags 2019-05-01 17:21:46 +01:00
Phoenix616
04f91aa55b Add warnings about unknown OfflinePlayer to VaultListener
Also improve the ReserveListener by removing the query for the OfflinePlayer object as that's not necessary to use the Reserve economy API as it directly provides methods for UUID usage (and account existence has usually been checked before already)
Also use canAddHoldings to check if economy user can hold money instead of adding and removing.
2019-05-01 17:13:47 +01:00
Phoenix616
0b57382cd0 Don't use sign Material as that's going to change in 1.14 2019-05-01 17:01:43 +01:00
Phoenix616
c538f4a3dc Remove all usage of old MaterialData and other outdated code
This should make it more future-proof and possibly even work with 1.14 already.
2019-04-30 21:31:24 +01:00
Phoenix616
6773f89221 Improve internal precision of calculations (Fixes #221) 2019-04-30 16:02:01 +01:00
Phoenix616
8cf9934a32 Properly set scale and rounding mode for divisions (Fixes #220) 2019-04-28 15:41:20 +01:00
Phoenix616
f0bc277566 Move to BigDecimal in all events and use the CurrencyTransferEvent
Also add tax bypass permissions (#204, ChestShop.notax.buy/sell). When buying with that permission the buyer does not have to pay the tax (the seller will still get the reduced amount), when selling the seller will get the full amount instead of one lowered by the tax.
The permissions of the shop owner play no role due to there not being a good way of checking offline player permissions and it being a bit non-obvious for the buying/selling player if a shop would be with or without tax. This way all that gets changed is the amount the player pays/receives and not the shop owner (and the player should know their permissions/rank already)

The transfer event was necessary in order to correctly resolve who triggered the transaction. Economy adapters are now required to implement a listener for each of the events. It's also recommended that economy adapters that support transfers directly use that instead of passing it through subtract and add with the processTransfer method.
2019-04-25 18:44:22 +01:00
Phoenix616
6e78fea880 Update the container on item transfers (Fixes #217)
This was removed when the item transfer code changed which stopped comparators from working. This shouldn't be a true block update that observers can detect but only a notification for surrounding blocks that the content might have changed.
2019-04-23 18:00:21 +01:00
Phoenix616
28fb5cbeff Fix message amount display error when buying from admin shops
Also fix that the stock items were modified when buying from the admin shop
2019-04-07 13:48:16 +01:00
Phoenix616
53ae07b779 Fix error that prevented selling to admin shops 2019-04-07 13:47:18 +01:00
Phoenix616
8a09e91e62 Better catch for potential exceptions when de-serializing items
For some reason items might corrupt in the encoding and decoding process leading to invalid YAML strings. There's also another issue of the server not being able to load certain old itemstacks. (seems to be especially an issue with old entity types)
2019-04-06 18:39:49 +01:00
Phoenix616
52492f8469 Support registering of economy providers after the plugin loaded 2019-04-06 16:24:20 +01:00
Phoenix616
5a99180aab Fix Admin Shops by adding more implementation to AdminInventory
This is required as we now move items between inventories instead of individually removing and adding. This basically adds the stock represented by the admin shop sign to the AdminInventory so all transactions should always be possible.
2019-04-05 15:17:15 +01:00
Phoenix616
1952e5cb46 Directly transfer items (Fixes #169) 2019-04-05 14:49:27 +01:00
Phoenix616
2007c4a7fb Fix ShopDestroyEvent not getting called in certain cases
This could be triggered by updating a column of physics blocks with a shop attached
2019-04-01 13:55:21 +01:00
Phoenix616
be5f47cb1f Add config option to toggle if all shop removals should be logged
Removals that happened due to no player being present will always be logged
2019-04-01 13:49:48 +01:00
Phoenix616
03589b3fef Catch Vault issues with null usernames (#158, #194, #205, #209) 2019-03-30 16:09:48 +01:00
Phoenix616
b37bf12e7f Convert old item metadata to newest version (Fixes #202) 2019-03-30 15:40:31 +01:00
Phoenix616
8cd89bf8ee Work around issue with serialising explorer maps
This is due to a bug in CraftBukkit not properly supporting localised/translatable display names when serialising item meta.
This also adds/improves the message when no valid item ID could be generated.
2019-03-19 19:08:53 +01:00
Phoenix616
355fa58ac4 Properly detect if reserve economy is provided (Fixes #210) 2019-03-18 15:10:18 +01:00
Phoenix616
b931393a62 Fix more issues with the shop access permissions (#207) 2019-03-08 22:52:08 +01:00
Phoenix616
de5b505ec5 Fix issues with shop sign opening and access permissions (Fixes #207) 2019-03-07 17:33:47 +01:00
Phoenix616
6d99210dd7 Really fix price restriction 2019-01-19 00:40:50 +01:00
Phoenix616
20228dd645 Fix amount in price restriction not working correctly
Also fix copy and paste error in SELL_PRICE_BELOW_MIN error message.
2019-01-18 22:27:40 +01:00
Phoenix616
91a372bd05 Make Item and Material parsing events 2019-01-17 19:50:47 +01:00
Phoenix616
c8d0590614 Add different error messages when price limits are exceeded (#193) 2019-01-17 18:08:54 +01:00
Phoenix616
6fe6f80538 Use Bukkit's inbuilt command permissions system (Fixes #186)
Also fix plugin not disabling when dependencies aren't loaded correctly
2018-11-25 00:59:13 +01:00
Phoenix616
bc14736a37 Ignore cancelled sign change events 2018-11-21 00:45:39 +01:00