Commit Graph

404 Commits

Author SHA1 Message Date
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
58892f73a5 Fixed build (Couldn't retrieve WorldGuard dependency) 2017-04-29 16:00:14 +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
0f4f421f76 Put non-maven dependencies in lib folder 2017-04-29 14:21:41 +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
d9a76ba09c Added sk89q-repo for WorldGuard
I don't know why I didn't add it before...
Fixes #88
2017-03-26 15:57:41 +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