Commit Graph

66 Commits

Author SHA1 Message Date
ken_kentan
47b23f126e Add permission check to a shop create func (#194) 2018-07-21 14:04:26 +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
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
51a0813473 Fixed shop info item when in off hand 2017-07-30 13:54:59 +02:00
Eric
8533c017e7 Fixed NoSuchMethodError on 1.8 2017-06-27 21:57:17 +02:00
Eric
a92bd9292e Fixed NPE while creating shop on an unowned ASkyBlock island 2017-06-08 21:57:30 +02:00
Eric
3e6207182a Fixed refund if economy transactions fail 2017-06-08 11:32:40 +02:00
Eric
f69299e20a Fixed typos in message enum names 2017-06-05 15:13:26 +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
18d3e36390 Added notification for withdrawal of shop creation price 2017-06-05 13:39:01 +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
4dde2d9f53 Prevent shop use in creative mode
Closes #100
2017-05-25 14:18:35 +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
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
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
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
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
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
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
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
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
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
39822fe8df Added AuthMe support
Closes #64
2017-03-17 14:59:34 +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
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
8e867a7c1d Hopefully fixed item meta issues for good 2017-01-03 13:06:29 +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
103662c532 Add support for per-world-economy plugins
The money will be withdrawn or deposited on the world of the shop
2016-11-23 16:11:07 +01:00
Eric
d097a15122 Added way to disable WorldGuard/Towny integration
+ Added permission to use shops in WorldGuard regions that deny shop use
2016-11-23 16:05:33 +01:00
Eric
04a6d836b9 Added towny support
- Players can only create shops in shop plots, not in wilderness or normal
  plots
- Added permission "shopchest.extend.protected"
- Changed permission "shopchest.extendOther" to "shopchest.extend.other"
- When creating a shop on a double chest, both chests must not be
  protected/in a protected region
- To extend a shop into a protected region (e.g. WorldGuard/Towny), you
  need permission (shopchest.extend.protected)
- Added no-permission message for "shopchest.extend.protected"
2016-11-20 14:18:36 +01:00
Eric
198f83c738 Fix hologram interaction in 1.8.x 2016-11-19 21:34:59 +01:00
Eric
6dcedc9bff Added messages when WorldGuard denies shop use 2016-11-19 14:45:18 +01:00
Eric
fdfc7419d9 Permission constants & No more Vault permission system 2016-11-18 22:29:28 +01:00
Eric
58ad504f7f Add hologram interaction (configurable) 2016-11-18 17:58:50 +01:00