Commit Graph

406 Commits

Author SHA1 Message Date
Eric
86322a1198 Fix warnings regarding PlotSquared flags 2018-08-03 18:56:09 +02:00
Eric
f40b0b7418 Use WorldGuardWrapper to support v7 and v6
https://github.com/CodeMC/WorldGuardWrapper
2018-08-03 18:24:09 +02:00
Eric
11c6af099b Fix ConcurrentModificationException 2018-08-03 18:19:45 +02:00
Eric
1e02539aab Don't allow WorldGuard access when sneaking
Sneaking doesn't open a shop chest anymore.
2018-08-01 16:17:24 +02:00
Eric
3678738048 Async shop creation (again)
This time, a thread pool with a maximum pool
size of 8 threads is used to execute the slow
methods of shop creation.
2018-08-01 13:37:07 +02:00
Eric
78384ebc7b Implement HikariCP for database 2018-08-01 12:20:10 +02:00
Eric
1a3641a377 Revert "Async shop creation"
This reverts commit 80626e823f.

It doesn't seem like a good idea to create 1000+ threads
(even if just for a minute)
2018-07-31 11:47:46 +02:00
Eric
80626e823f Async shop creation
This should fix timeouts when (re-)loading shops
2018-07-31 11:11:18 +02:00
Eric
16498424a8 Fix some NPEs for localizations 2018-07-30 17:52:32 +02:00
Eric
3cd655a2be Only have one ScriptEngine in HologramFormat class 2018-07-30 16:02:50 +02:00
Eric
5c2c3169b6 Change shop updater logic
I'm not sure if this better or worse, but it's worth a try.
2018-07-29 22:01:04 +02:00
Eric
0a06a69e65 Fix shops not being shown after re-join 2018-07-29 14:20:16 +02:00
Eric
09fef5b38c Remove database migration from old versions 2018-07-29 12:27:24 +02:00
Eric
b23040f7ce Update item_names.txt 2018-07-27 21:44:15 +02:00
Eric
baa67214b4 Fixed formatting for German translation 2018-07-27 21:44:14 +02:00
Eric
6ebffd020e Fix double chests for version <1.13 2018-07-27 21:44:13 +02:00
Eric
8ecc137835 Fixed command description (German and fallback) 2018-07-27 21:44:12 +02:00
Steven M
ff5c3cdd45 Fix books changing metadata by serialization (#165)
Fixes #164
2018-07-26 17:35:53 +02:00
Eric
148295ddb4 Don't check vendor balance at admin shops
Should fix errors with economy plugins when the vendor
does not have a valid name.
2018-07-26 17:25:55 +02:00
Eric
1a0920f239 Add product preview in shop info
This removes shop info messages for potion effect, enchantments,
music disc title and book generation.
2018-07-26 15:52:55 +02:00
Eric
8dd2a12375 Final updates for JsonBuilder 2018-07-26 15:48:25 +02:00
Eric
9a953f88f3 Fix item name for potions and some other items 2018-07-26 14:20:49 +02:00
Eric
3c0790d670 Make JsonBuilder.parse static 2018-07-26 13:44:44 +02:00
Eric
720fceaba1 Fix missing param in javadoc 2018-07-26 00:02:51 +02:00
Eric
9a70df5e01 Update JSON message builder/parser
Preparing for item preview in shop info
2018-07-26 00:02:06 +02:00
Eric
381de24362 Fixed formatting for update notification 2018-07-25 22:39:44 +02:00
Eric
4cb59b18de Re-add support for Minecraft 1.8 - 1.12.2 2018-07-25 16:54:22 +02:00
Eric
3d60b5b49c Replace deprecated AuthMe calls 2018-07-25 14:37:02 +02:00
Eric
8cf7b7c08e Fix javadoc warnings
A part of the documentation may still be incorrect
2018-07-25 13:11:44 +02:00
Eric
1dbf68af9c Fix typos 2018-07-24 18:15:26 +02:00
Steven M
cfff0b9ce2 Implemented economy log cleanup (#156) 2018-07-24 18:10:04 +02:00
Eric
372124b04e FIx double chests when facing south or west 2018-07-23 21:32:42 +02:00
Eric
43bb3e3b38 Fix display issues and double chests 2018-07-23 21:12:43 +02:00
Eric
2ac81b0b8f Fix update checker 2018-07-23 19:50:27 +02:00
Eric
036d7f3bd2 Fix holograms 2018-07-23 19:31:42 +02:00
Eric
2d3edc7dcc Clean up some warnings 2018-07-23 18:38:37 +02:00
Eric
5a4741ddf3 Support Java 9+
Drops support for Java 7
2018-07-23 18:38:36 +02:00
Eric
94a51373b5 Support Minecraft 1.13
Drops support for older Minecraft verions (1.8 - 1.12.2)
2018-07-23 18:38:06 +02:00
Eric
5bfb0a1a22 Renamed config variables 2018-07-23 17:57:01 +02:00
ken_kentan
47b23f126e Add permission check to a shop create func (#194) 2018-07-21 14:04:26 +02:00
Thijs Wiefferink
cf4d1716b8 Fix AreaShop integration for regions using capital characters in their name (#190)
* Use a system dependency for AuthMe (maven repository is down)

* Use maven repository for AreaShop instead of including the jar

https://jenkins.wiefferink.me hosts the maven repository of AreaShop, so it is better to use that

* Fix AreaShop integration for regions that use capital characters
2018-05-21 09:40:40 +02:00
Eric
3ae16b0c61 Instantly update hologram text after buying/selling 2017-08-15 12:53:15 +02:00
Eric
2340eb67e1 Added config option to confirm buying and selling
Closes #128
2017-08-15 12:44:03 +02:00
Eric
21fd9bb5ed Check if backup table already exists to prevent errors 2017-08-15 12:44:02 +02:00
Eric
8d459220d3 Vacuum SQLite database on server stop
Closes #132
2017-08-15 12:44:02 +02:00
Eric
a8f589c1b7 Added config option to disable economy logging 2017-08-15 12:44:01 +02:00
Eric
397304c748 Use collection instead of array in Database#getShops 2017-08-15 12:44:01 +02:00
MineTheCube
3b9d26c079 Few improvements (#135)
* Fix: Few improvements

* Few improvements

* Hologram/item can wait after shop creation

* Compare worlds using their name

* Fix holograms display

* Changed version to 1.12.4

* Display shop after creation

* Fix requested changed

* Improve performance for simple hologram conditions
2017-08-10 17:02:24 +02:00
Eric
efced89eb1 Fixed ConcurrentModificationException (again) 2017-07-30 17:58:56 +02:00
Eric
c230257676 Fix ConcurrentModificationException on disable 2017-07-30 14:09:16 +02:00
Eric
787426218b Fixed NPE when product does not have item meta 2017-07-30 13:56:56 +02:00
Eric
51a0813473 Fixed shop info item when in off hand 2017-07-30 13:54:59 +02:00
Eric
49d90da57a Added type parameter to callback 2017-07-30 13:54:48 +02:00
MineTheCube
48059811fb Method getShops now returns a collection 2017-07-27 13:10:00 +02:00
MineTheCube
08b298922e Re-add teleport listener and few minor changes 2017-07-27 01:02:21 +02:00
MineTheCube
67f12872a9 Performance improvements & shop updater refactor 2017-07-25 02:18:05 +02:00
Eric
1ae4ee379b Added durability requirement and placeholder for hologram format 2017-06-27 22:00:37 +02:00
Eric
8533c017e7 Fixed NoSuchMethodError on 1.8 2017-06-27 21:57:17 +02:00
Eric
bbd0046ed1 Fixed crashes and errors ("Asynchronous entity track")
Fixes #109 (Hopefully)
Fixes #110 (Hopefully)
2017-06-27 21:42:41 +02:00
Eric
c0415a1e27 Respawn shop item after teleport
Sometimes it disappeared after teleporting, because the chunk
has not been loaded yet. Now, after 15 ticks, the shop item will
be respawned after a teleport.
2017-06-17 13:38:07 +02:00
Eric
ef8f597796 Added CHEST_SPACE requirement and placeholder
+ Fixed %MAX-STACK% placeholder
2017-06-15 14:03:48 +02:00
Eric
0e1fc781f5 Fixed error when extending shop in unowned ASkyBlock island 2017-06-15 13:33:06 +02:00
Eric
36ea51b593 Fixed NPE when hologram interaction is disabled 2017-06-15 13:31:35 +02:00
Eric
d135a7ae92 Armor Stands should be removed from entity lists 2017-06-15 13:30:21 +02:00
Eric
a78195037b Fixed high CPU usage
Closes #70
2017-06-15 12:25:42 +02:00
Eric
a92bd9292e Fixed NPE while creating shop on an unowned ASkyBlock island 2017-06-08 21:57:30 +02:00
Eric
408abebbfa Added header and footer to help message (translatable)
+ Fixed translations with one or more equal signs in its value
2017-06-08 14:02:34 +02:00
Eric
6aa0c0b07c Changed command system for easier integration of "addons" 2017-06-08 14:02:34 +02:00
Eric
3e6207182a Fixed refund if economy transactions fail 2017-06-08 11:32:40 +02:00
Eric
3eef8250d2 Fixed shops duplicating after extending 2017-06-06 18:13:24 +02:00
Eric
4c02a77037 Revert to NMS Armor Stands for holograms
Bukkit's armor stands caused too many issues
2017-06-06 17:40:30 +02:00
Eric
f69299e20a Fixed typos in message enum names 2017-06-05 15:13:26 +02:00
Eric
58b5eb20ef Removed unnecessary placeholder checks 2017-06-05 15:12:09 +02:00
Eric
f653355cc2 Added way to retrieve shop info by clicking it with a specific item
Closes #104
2017-06-05 15:02:49 +02:00
Eric
c4e7e5a8ab Added auto removal of click type after 15 seconds 2017-06-05 14:20:00 +02:00
Eric
8f0d2aaf5f Added permissions "shopchest.create.buy" and "shopchest.create.sell"
Both of these also work with item nodes. Examples:

- shopchest.create.buy.CHEST (Allows only shops selling chests)
- shopchest.create.sell.APPLE (Allows only shops buying apples)
- shopchest.create.STONE.3 (Allows only shops buying or selling diorite)
- shopchest.create.buy (Allows only shops that are selling anything)
- shopchest.create.sell (Allows only shops that are buying anything)
2017-06-05 14:13:40 +02:00
Eric
8cdff11aaf Fixed typo in description of update command 2017-06-05 13:39:49 +02:00
Eric
18d3e36390 Added notification for withdrawal of shop creation price 2017-06-05 13:39:01 +02:00
Eric
de2046e6b5 Added empty lines before and after help message 2017-06-05 13:38:08 +02:00
Eric
9f229bbf6a Fixed NPE when player does not have an item in his hand 2017-06-05 13:31:47 +02:00
Eric
48eda92079 Fixed support for multi-world economy plugins 2017-06-02 14:56:34 +02:00
Eric
57e57dc71e Improved configuration of command description messages
+ Renamed all occurrences of "regex" to "placeholder"
2017-06-02 14:44:08 +02:00
Eric
b455db4172 Added ShopInitializedEvent 2017-06-02 14:17:08 +02:00
Eric
0f1d68e0c1 Fixed holograms when dynamic line, that is not the last one, disappears 2017-05-30 21:10:57 +02:00
Eric
d4da428bc1 Removed "useCurrentThread" parameter from "hidePlayer" method 2017-05-30 20:41:49 +02:00
Eric
6e8e450534 Replaced "IS_SHOP" requirement with "IS_WRITTEN_BOOK" 2017-05-30 20:39:52 +02:00
Eric
5589ab6655 Added command "/shop removeall <player>"
- Needs permission "shopchest.remove.other"

Closes #101
2017-05-25 14:18:42 +02:00
Eric
4dde2d9f53 Prevent shop use in creative mode
Closes #100
2017-05-25 14:18:35 +02:00
Eric
c5611027a7 Fixed armor stands not being removed after shop removal 2017-05-23 15:34:32 +02:00
Eric
ca064da094 You can now add scripts to the hologram format itself
Use curly brackets to add a script to the format.
Also, "regex" has been renamed to "placeholder".
2017-05-23 15:18:02 +02:00
Eric
4b4cfb3c0f Added comments to shop creation command method 2017-05-23 13:59:40 +02:00
Eric
428d48e5fc Fixed config description for hologram-lift 2017-05-22 22:02:22 +02:00
Eric
a50738bc8c Fixed issue that the holograms of further shops are displayed 2017-05-22 20:39:54 +02:00
Eric
cb8eb29112 Fixed a few issues with holograms 2017-05-22 20:21:13 +02:00
Eric
e1f076bfcd Vastly extended hologram configuration
- You can now completely customize every part of the hologram
- Added new placeholders "%STOCK%" and "%MAX-STACK%"
  => Now uses "%STOCK%" instead of "%AMOUNT%" in the in-stock message)
- Armor Stands are no longer spawned with NMS and reflection
- Hologram texts can dynamically change (e.g. with in-stock info)
- Might contain a few issues
2017-05-20 20:15:54 +02:00
Eric
e85b11d274 Added description to plugin.yml 2017-05-20 12:48:59 +02:00
Eric
4b2620964c Allow empty messages
Especially for holograms
2017-05-20 12:45:13 +02:00
Eric
edd7608c02 Cleaned up code
- Removed unnecessary methods
- Split long methods into multiple shorter ones
- Updated Bukkit dependency to 1.12-pre5
- Removed permission for "/shop" command
2017-05-20 12:44:07 +02:00
Eric
7560cddb7a Fixed old shop updating 2017-05-17 17:12:45 +02:00
Eric
63a0509248 Added support for Minecraft 1.12-pre2 2017-05-15 20:29:38 +02:00