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
Eric
50adf1f1d1
Replaced "Usable Regex" with "Usable Placeholders"
2017-05-14 18:54:09 +02:00
Eric
8367bd5e57
Added missing soft-depend for GriefPrevention
2017-05-14 13:34:38 +02:00
Eric
fbfb05faf9
Fixed help message for shop creation
2017-05-13 17:38:09 +02:00
Eric
81c5ed05f5
Added tab completion for Towny's and AreaShop's config values
2017-05-13 17:28:10 +02:00
Eric
56dc0c9c65
Added support for AreaShop
2017-05-13 17:23:44 +02:00
Eric
02275103c0
Use custom method to get blocks in sight
2017-05-06 16:13:59 +02:00
Eric
f95122daaa
Removed automatic shop reloading
...
+ Fixed config reload after entering "/shop reload"
2017-05-06 15:25:42 +02:00
Eric
d44e30b625
Improved support for GriefPrevention
...
Now checks if the claim where the shop is located allows
container access for the player. If there is no claim, shop creation
is allowed (except it has been denied by other plugins)
2017-04-29 14:37:52 +02:00
Eric
4ecbbb417b
Added support for GriefPrevention
...
Only players who are allowed to build can create a shop
2017-04-26 17:03:39 +02:00
Eric
53a9bb0274
Show WorldGuard permission message when trying to create a shop
...
(e.g. when not allowed to open the chest)
This also has the effect that the original event won't be un-cancelled
anymore, so the flag "chest-access" now also has to be allowed!
2017-04-26 16:38:33 +02:00
Eric
460abc722e
Added permission nodes for shop creation for specific items
...
Examples:
- "shopchest.create.apple"
- "shopchest.create.stone.2"
But: If a player has permission "shopchest.create", he is allowed to
create shops of all items. Also, the creation of admin shops is not
affected by these permissions.
2017-04-26 16:21:04 +02:00
Eric
d161fc60ac
Only show the shop the player targets instead of all the shops he sees
...
(configurable)
2017-04-19 14:07:22 +02:00
Eric
a4886c8cbb
Added debug messages for shop creation (external plugins)
2017-04-19 14:04:57 +02:00
Eric
d34e5f809f
Fixed NPE when chest is not on an island (ASkyBlock and uSkyBlock)
2017-04-17 18:31:12 +02:00
Eric
bc222b6b37
Added support for IslandWorld
...
Only players who can build on the island (owner and members) are
allowed to create a shop, but anyone can use it (if not limited by
other plugins like WorldGuard)
2017-04-17 18:30:59 +02:00
Eric
7c1cb7f665
Added support for ASkyBlock
...
Only members and the owner of an island are allowed to create a shop,
but everyone is allowed to use it (if not restricted by other plugins
like WorldGuard)
Closes #50
2017-04-17 17:07:47 +02:00
Eric
dcea39ab9e
Improved Towny integration
...
Closes #95
2017-04-17 16:35:43 +02:00
Eric
bf6f24313b
Added book generation to shop info message
2017-04-16 18:31:50 +02:00
Eric
98275ef57d
Switch to Bukkit's inbuilt isSimilar method
2017-04-16 15:48:12 +02:00
Eric
468fa0e645
Include shop's world in error messages
2017-04-10 20:36:28 +02:00
Eric
f6a7f5e3ba
Use more prepared statements
...
+ Removed quotation marks and semi colons from queries
2017-04-10 20:32:36 +02:00
Eric
508baf4f6b
If a world is not found, only show the error once
2017-04-10 20:06:05 +02:00
Eric
8e5b61c7a0
Reload shops when a world loads after initializing the shops
2017-04-10 20:05:31 +02:00
Eric
8140db76c5
Prevent characters in translations from being escaped
2017-04-10 20:03:20 +02:00
Eric
fd9c6beea4
Reduced amount of log messages
2017-04-10 20:01:47 +02:00
Eric
ed4a14dfa5
Fixed exploit to generate money or items
...
When 'auto-calculate-item-amount' was set to true and the player was
sneaking, he could buy something even though the shop didn't have a
whole stack in stock, but still get the items, or he could sell
something even though he didn't have a stack in his inventory, but
still get the money for it.
Closes #93
2017-04-10 17:46:00 +02:00
Eric
d7985c615d
Added support for uSkyBlock
...
Only the leader pr members of an island can create or expand a shop,
but everyone can use them.
2017-04-10 17:25:48 +02:00
Eric
35028f2cab
Fix shop visibility after respawn or world change
2017-04-10 16:19:41 +02:00
Eric
e969aa35da
Removed isUUID method
2017-03-30 20:45:09 +02:00
Eric
08f65dbee0
Fixed NPE when creating a shop not in a PlotSquared plot
2017-03-30 20:44:28 +02:00
Eric
71e2c48cc2
Fixed NPE while removing a shop when vendor is not online
...
+ Added missing javadoc parameter 'message'
Fixes #91
2017-03-29 20:05:56 +02:00
Eric
0a67cd81a2
Removed unnecessary debug methods
2017-03-29 20:02:41 +02:00
Eric
928c0ef817
Added AuthMe in as soft-dependence in plugin.yml
2017-03-28 14:37:58 +02:00
Eric
4a7202df6f
Added support for PlotSquared
...
Three new custom flags will be available for every plot to set:
- create-shop
- use-shop
- use-admin-shop
These flags can be set to the following values
to allow the flag to that group. If you set the group to
members, trusted members and owners are also allowed the flag:
- owners
- trusted
- members
- everyone
- none
The default value for the flags will be 'none', so be sure to
change it in order to create or use shops!
The flag 'create-shop' can be bypassed by granting the permission
'shopchest.create.protected' (which is not recommended), and the
other flags can be bypassed by granting the permission
'shopchest.external.bypass'.
This closes #87
2017-03-28 14:37:12 +02:00
Eric
97c0ca70c2
Force to not use SSL for connecting to MySQL server
...
Fixes #86
2017-03-25 15:17:37 +01:00
Eric
b6a233f2b4
Fixed javadoc for methods with a callback as parameter
...
Also, the getShops() method now always gets all shops from the
database instead of returning the existing one
2017-03-25 15:17:36 +01:00
Eric
dd7a82b49e
Added notification about offline revenue on join
...
Closes #47
2017-03-25 15:17:35 +01:00
Eric
b554ef1efd
Re-import BukkitRunnable
...
Got lost while rebasing...
2017-03-25 15:17:34 +01:00
Eric
dfafa2930d
Added missing null check for callback
2017-03-25 15:17:34 +01:00
Eric
1e38edc7a0
Improved database interaction
2017-03-25 15:17:33 +01:00
Eric
7b3dac61ac
Query and update SQL database asynchronously
2017-03-25 15:17:32 +01:00
Eric
248cf08811
Added tab completion for commands
...
Had to change the way the custom command is registered,
so I could add a tab completer
2017-03-25 15:12:09 +01:00
Eric
da41151402
Added shift-click to sell stack
...
Only works when a player does not have an axe in one of his hands.
If he has, the shop will be broken/removed (if he has permission).
Closes #84
2017-03-25 13:45:17 +01:00
Eric
1de56fcf6a
Protect holograms from damage
2017-03-25 13:24:05 +01:00
Eric
ea41f6759e
Shop chests can only be broken with an axe
2017-03-25 13:18:52 +01:00
Eric
2302962eac
Added shift-click to buy stack
...
Closes #85
2017-03-21 15:40:23 +01:00
Eric
474f734456
Added command "/shop open" to open shops
...
Shift-click no longer works anywhere to open a shop.
2017-03-21 15:03:12 +01:00
Eric
79660920d8
Updated events
...
Methods getPlayer() and getShop() don't need to be overridden,
as they are now declared in the ShopEvent superclass.
2017-03-21 14:25:49 +01:00
Eric
bc13dd7a9d
Prevent armor items from being taken by the hologram
2017-03-17 15:01:11 +01:00
Eric
d2b75295ca
Added null checks for Hologram in WorldGuardListener
2017-03-17 15:00:35 +01:00
Eric
39822fe8df
Added AuthMe support
...
Closes #64
2017-03-17 14:59:34 +01:00
Eric
8efdd8768e
Disable auto shop reloads by default
2017-03-17 14:21:20 +01:00
Eric
268d69c077
Only update shops if player has moved
2017-03-17 14:04:29 +01:00
Eric
598f9434e6
Switch from MCStats to bStats
...
New stats link: https://bstats.org/plugin/bukkit/ShopChest
2017-03-15 18:40:45 +01:00
Eric
6d6595c642
Fixed Events
...
Added missing static method getHandlerList
2017-03-14 15:54:47 +01:00
Eric
e29da1279b
Catch IllegalStateException for getLineOfSight
...
Closes #79
2017-02-15 17:04:32 +01:00
Eric
00323510bb
Only show shops to players who point on the shop (configurable)
2017-02-10 17:59:08 +01:00
Eric
3459a8ccba
Stop shop updater when server is empty and restart on join
2017-02-08 21:49:23 +01:00
Eric
9583b77413
Fix NPE on player join
...
Fixes #77
2017-02-08 14:04:23 +01:00
Eric
8b8c7d4d73
Show and hide holograms asynchronously
2017-02-05 17:22:37 +01:00
Eric
bae02c910a
Fixed fallback command "/shopchest:shop"
2017-02-05 17:19:31 +01:00
Eric
cdb862d435
Updated item names file
2017-02-05 15:04:57 +01:00
Eric
4d7f5dc3b7
Fixed holograms in the end world
...
Fixes #74
2017-02-05 14:51:46 +01:00
Eric
150c178679
Check if item names in config are valid
2017-01-28 12:23:10 +01:00
Eric
c269cea82b
Fixed holograms from being displayed too far away after teleporting
2017-01-21 13:30:39 +01:00
Eric
f0a0d760a0
Fixed NPE on hologram updating
...
Fixes #63
2017-01-13 15:31:28 +01:00
Eric
5a40f84e21
Shorten lines in config file
2017-01-08 17:05:29 +01:00
Eric
39e3b4f837
Fixed error when clicking an entity that is not an ArmorStand
...
(only occurred with WorldGuard)
2017-01-06 13:21:06 +01:00
Eric
c78f81a1b6
Fixed no permission message when removing an admin shop (en_US)
2017-01-05 14:36:32 +01:00
Eric
30ede5e01e
Added configurable maximum prices
...
Closes #55
2017-01-05 14:35:42 +01:00
Eric
bdf39503ab
Added regex information to vendor-out-of-stock message
2017-01-05 14:15:09 +01:00
Eric
4c5ec37588
Call ShopUpdateEvent synchronously
2017-01-05 14:13:07 +01:00
Eric
4194c72bd4
Added vendor information about a sold out shop
2017-01-04 18:46:50 +01:00
Eric
f6f8d93b85
Improve performance while updating shops
...
Inspired from the fork of @gonzalociocca but not exactly the same
Closes #39
2017-01-04 17:07:00 +01:00
Eric
e08b09fe3f
Allow better customization of hologram lift
...
Closes #38
2017-01-04 14:50:11 +01:00
Eric
2951ef8349
Only permitted players can remove admin shops
...
+ Changed permission "shopchest.removeOther" to "shopchest.remove.other"
Closes #36
2017-01-04 14:34:59 +01:00
Eric
f233c626e1
Add way to invert mouse buttons
...
Closes #35
2017-01-03 15:35:35 +01:00
Eric
f54c2ff7ff
Shortened method to check WorldGuard permission
2017-01-03 14:28:54 +01:00
Eric
8217cdef6f
Allow customization of custom WorldGuard flags' default values
...
Closes #45
2017-01-03 13:59:09 +01:00
Eric
49398547f1
Hide WorldGuard message when interacting with hologram
2017-01-03 13:34:34 +01:00
Eric
8e867a7c1d
Hopefully fixed item meta issues for good
2017-01-03 13:06:29 +01:00
Eric
f1712a6bce
Added 1.11.2 translation values and the missing one for "Nether Wart"
2017-01-02 19:20:41 +01:00
Eric
222b553a8e
Fixed Shulker Boxes
...
Closes #53
2017-01-02 17:50:46 +01:00
Steven M
bedf207210
Fix fireworks ( #52 )
...
Fixes #51
2017-01-01 17:52:33 +01:00
gonzalociocca
253e40e8b9
Only compare a world's name to improve performace ( #40 )
...
When using .equals() on classes with many variables and methods, means that every single thing on the class would be checked to be equals to the one from the another class, and its taking too much CPU.
2016-12-08 20:11:48 +01:00
Steven M
f4b7df8c92
Add additional check for permissions ( #42 )
2016-12-08 20:08:28 +01:00
Eric
192b124eb5
Added way to disable vendor messages
...
(= Messages that a vendor gets after players buy or sell something from/to
his shop)
Closes #33
2016-11-26 17:23:32 +01:00
Eric
98c79f5e8a
Fixed issue when shop limit by permission is smaller than default
2016-11-26 17:13:39 +01:00
Eric
73f5d0f79e
Change get(...) to getShop(...) in database
2016-11-26 17:07:21 +01:00
Eric
4f894ddac7
Fix ClassCastException when using Shulker Boxes
...
Closes #34
2016-11-26 17:06:21 +01:00
Eric
1fa0f08073
Shortened getShops method in ShopUtils
2016-11-25 13:55:39 +01:00
Eric
a522197112
Improve performance while reloading shops
2016-11-24 22:00:49 +01:00
Eric
d4a88a2a9b
Fixed typos in config file
2016-11-24 21:43:26 +01:00