Commit Graph

573 Commits

Author SHA1 Message Date
Phoenix616
d332603fb4 Do not automatically color config strings (Fixes BUKKIT-1241)
This is necessary so that we still store the messages with the & code internally as they would get saved back to the config file using the converted color code (section sign) which could lead to encoding issues on different operating systems. (It also fixes issues with strings that contain an and sign that isn't supposed to be a color code) Instead we load the real string and color messages via the prefix method which should get called in every instance where a message is send.
2017-11-13 15:11:22 +01:00
Phoenix616
519a4fca8a Names with a colon are valid (Fixes #81)
The NameManager appends a unique id for every player that has the same short name as another already existing one with a colon to the end of the clashing usernames. This is necessary so that a player can't just change their name to another user's old name and get access to all his shops.
2017-11-10 00:05:59 +01:00
Phoenix616
2d45dcdac0 Get rid of expensive calls to Bukkit#getOfflinePlayer with a username
This changes events to store the database Account instead of an OfflinePlayer and deprecates any event method that uses/returns OfflinePlayer. This is necessary as Bukkit#getOfflinePlayer(String) queries Mojang for the UUID when the user was not found in the local cache. As we already store this information (name to UUID mapping) in our database we should not have no need to rely on querying Mojang. (This might make transactions fail for shop owners that haven't played before but that shouldn't really be an issue in most cases)
2017-10-29 23:50:24 +01:00
Phoenix616
61c08a3b18 Calculate the amount instead of using a loop (Fixes #78) 2017-10-25 15:22:26 +01:00
Phoenix616
e81077143e Also check for full account name permission 2017-09-26 15:39:08 +01:00
Phoenix616
1d80edbf9b Get rid of google dependencies
Mostly replaced with Java 8 features and our own cache
2017-09-23 15:19:00 +01:00
Phoenix616
9b7000272d Merge remote-tracking branch 'origin/master' 2017-09-06 14:20:14 +01:00
Phoenix616
9da7d5198b Fix stacking issues (Fixes #74)
This also fixes some conditions under which the STACK_TO_64 option did not get applied correctly and wrong inventory space checking for items with a max stack size of less than 64
2017-09-06 14:19:34 +01:00
Max Lee
3434c8860c Merge pull request #64 from LukBukkit/master
Fixed an error when trading with a admin shop (Fixes #59, #63 & DevBukkit #1219)
2017-08-27 16:16:11 +01:00
Phoenix616
7199acb8ef Added progress to migration and made error messages prettier (#67) 2017-08-17 21:38:05 +01:00
Phoenix616
9368dfea75 Make sure owner name is set (Fixes DevBukkit-1225) 2017-08-15 13:02:26 +01:00
Phoenix616
9a9e89206b Fix NPE that occurs when STACK_TO_64 is true (DevBukkit-1222) 2017-08-06 11:40:20 +01:00
Phoenix616
0413f24e64 Fix error in config comment 2017-08-06 11:40:02 +01:00
LukBukkit
e672dc5e22
Fixed an error when trading with a admin shop (Fixes #59 & fixes #63) 2017-07-26 15:13:03 +02:00
Phoenix616
4a71af39af Return account by normal name if name is longer than 15 cars (DevBukkit-1217) 2017-07-09 17:30:26 +01:00
Phoenix616
b3b9e690dd Fix NPE when server economy account info can't be found (DevBukkit-1216)
Also add a warning to the startup if that happens
2017-07-09 17:00:31 +01:00
Phoenix616
4120455974 Strings already get colored by the Breeze library 2017-07-05 23:51:49 +01:00
Phoenix616
9269fc4049 Added bstats metrics as mcstats isn't really stable anymore 2017-07-05 15:23:28 +01:00
Phoenix616
2e7613ae9c Create LWC protections with UUIDs instead of the name
Thanks to @Brokkonaut for noticing this
2017-07-04 16:18:21 +01:00
Phoenix616
0dea862cd0 Add full shop message, location and respect cstoggle
Inspired by @Brokkonaut's fork this adds a new NOT_ENOUGH_SPACE_IN_YOUR_SHOP message to send to the shop owner when someone tries to sell to his shop. It also adds new %world, %x, %y and %z variables to display the shop's location in the message, adds a config option to make both the full-shop and out-of-stock messages respect /cstoggle and makes values in the locale.yml support ampersand color codes.
2017-07-04 16:06:34 +01:00
Max Lee
ce4525d46e Add missing LGPLv2.1 license
The project is under the LGPLv2.1 according to the dev bukkit page at https://dev.bukkit.org/projects/chestshop
2017-07-04 15:23:15 +01:00
Phoenix616
b9f9166d6c Add permission check to version and reload command 2017-07-04 15:18:00 +01:00
Phoenix616
cae36a94bd Reload the NameManager when reloading the config 2017-07-04 15:14:57 +01:00
Phoenix616
f4e060071d Make accounts v3 migration more robust to errors (Fixes #58) 2017-07-03 00:46:43 +01:00
Phoenix616
70fa6292b1 Get OfflinePlayer from namewith offline mode UUIDs. Fixes #60 2017-07-02 23:32:06 +01:00
Phoenix616
0525c70452 Rewrite NameManager to support multiple short names per user
This should fix the issue where the player's short name on the shop sign does not reflect the actual player's name. This works by storing every uuid-username combination together with the associated short name and the last time the player logged in with that combination.
2017-07-01 17:14:41 +01:00
Phoenix616
aa2437f76b Update spigot-api dependency to 1.12-R0.1 2017-07-01 17:11:31 +01:00
Phoenix616
7271cebd91 Properly use the plugin's logger 2017-06-30 21:00:30 +01:00
Phoenix616
4abb9ae518 Fix NPE when slot in chest is empty 2017-06-30 20:38:58 +01:00
Phoenix616
0b65a7cc92 Rewrite (and document) the NameManager
This should fix issues with how name changes are handled and also prevent short names of different players from clashing. It also uses guava caches instead of maps now with a configurable cache size
2017-06-30 20:28:18 +01:00
Phoenix616
fc174a2b6e Include compile time when manually building 2017-06-28 23:56:45 +01:00
Phoenix616
cf2497ff91 Fix potential NPE 2017-06-28 22:11:54 +01:00
Phoenix616
5d01a8ed0e Update to Java 8 2017-06-28 21:37:45 +01:00
Phoenix616
ab1596632b Update spigot-api dependency to 1.12 pre6 and to log4j 2.1.0 2017-06-05 19:29:29 +01:00
Phoenix616
d399d5b2af Link to github's contributors page instead of trying to list all names 2017-05-23 14:50:38 +01:00
Phoenix616
20ba0f9674 Add SNAPSHOT to the version as these are not releases 2017-05-09 15:00:31 +01:00
Phoenix616
53725defe7 Update scm url 2017-05-09 14:55:28 +01:00
Phoenix616
1948156b42 Update residence dependency 2017-05-09 14:54:32 +01:00
Phoenix616
fc5d84eebb Fix issue with selling written books (#1107)
Also improved the manual add method.
2017-05-04 18:54:49 +01:00
Phoenix616
93a769539b Format type name comments better 2017-04-27 15:17:12 +01:00
Phoenix616
d18a5695f1 Add missing permissions for 1.8, 1.10 and 1.11 items/blocks 2017-04-27 15:12:43 +01:00
Max Lee
555b7efb70 Update build server link 2017-03-13 21:59:14 +01:00
Phoenix616
051a8511d4 Escape version string as yaml treats number signs as comments 2017-02-26 22:10:54 +01:00
Phoenix616
90a463abcd Add build number to version and fix authors in plugin.yml 2017-02-26 21:33:37 +01:00
Phoenix616
583c50438c Revert "Fix merging of items that aren't actually equal. (Like skulls with textures)"
This reverts commit 11d2280d3e.

The method isn't actually the issue and the workaround introduces new
issues.
2017-02-20 00:39:30 +01:00
Phoenix616
11d2280d3e Fix merging of items that aren't actually equal. (Like skulls with textures) 2017-02-19 17:22:07 +01:00
Phoenix616
765548e0e5 Use Bukkit's addItem method if maxStackSize equals the item's natural stack size 2017-02-19 17:17:42 +01:00
Phoenix616
90f7dd5b0f No need to use the workaround anymore as CB adds large itemstacks properly now 2017-02-19 16:50:31 +01:00
Dan Mulloy
5961c9f3df Update README.md 2017-01-16 13:56:39 -05:00
Dan Mulloy
5a39b6fd62 Merge pull request #47 from dmulloy2/master
Merge changes from fork
2017-01-16 13:55:24 -05:00