Go to file
blablubbabc 37b68085f8 Changed how items are getting defined in the config.
Internally this new format uses Bukkit's item serialization for parsing
the item data, which allows it to support the specification of arbitrary
item data and hopefully not require any major updating/maintenance for
future minecraft versions. At the same time it tries to stay (slightly)
more user-friendly than Bukkit's item serialization by omitting any data
that can be restored by the plugin, by avoiding one level of nesting
between the item type and item data, by translating ampersand ('&')
color codes in display name and lore, and by offering a compact
representation for specifying an item only by its type.

This change also allows a more detailed specification of some of the
editor button items. However, many editor buttons still miss
corresponding config settings. Also keep in mind that the display name
and lore for these button items get specified via corresponding message
settings, so any specified item display name and lore will get replaced
by that.

When checking if an in-game item matches the item data specified in the
config, only the specified data gets compared. So this does not check
for item data equality, but instead the checked item is able to contain
additional data but still get matched (like before, but previously this
was limited to checking display name and lore).

The previous item data gets automatically migrated to the new format
(config version 2).

Other changes:
* Internal: Moved config migrations into a separate package.
* Internal: Moved some function(s) into ConfigUtils.
* Internal: Slightly changed how the plugin checks whether the high
currency is enabled.
* Internal: Avoiding ItemStack#hasItemMeta calls before getting an
item's ItemMeta, since this might be heavier than simply getting the
ItemMeta directly and performing only the relevant checks on that.
Internally ItemStack#hasItemMeta checks emptiness for all item
attributes and might (for CraftItemStacks) even first copy all the
item's data into a new ItemMeta object. And even if the item actually
has no data (Bukkit ItemStack with null ItemMeta), ItemStack#getItemMeta
will simply create a new empty ItemMeta object without having to copy
any data, so this is still a similarly lightweight operation anyways.
* Internal: Added ItemData tests. Unfortunately this requires
CraftBukkit as test dependency.
2019-08-18 04:51:49 +02:00
.github Updated the issue template. 2018-09-12 19:55:27 +02:00
modules Changed how items are getting defined in the config. 2019-08-18 04:51:49 +02:00
src Changed how items are getting defined in the config. 2019-08-18 04:51:49 +02:00
.classpath Added a test to ensure consistency between ShopkeepersPlugin and 2019-08-12 20:55:32 +02:00
.gitignore Changed how items are getting defined in the config. 2019-08-18 04:51:49 +02:00
.project Move base dependencies up, so the project will build in eclipse. 2013-12-04 12:48:11 +01:00
.travis.yml Bumped Bukkit dependency from 1.14.3 to 1.14.4. 2019-08-17 09:03:16 +02:00
CHANGELOG.md Changed how items are getting defined in the config. 2019-08-18 04:51:49 +02:00
CONTRIBUTING.md Create CONTRIBUTING.md 2017-10-23 16:36:52 +02:00
LICENSE Initial commit 2013-12-02 09:01:27 -08:00
README.md Formatting. 2019-08-01 21:49:19 +02:00
TODO.txt Updated TODO. 2019-05-30 20:42:54 +02:00
VERSIONING.md Added VERSIONING.md 2018-05-21 23:35:39 +02:00
installSpigot.sh Added some safeguards in installSpigot script, in case it gets 2018-07-20 19:38:52 +02:00
pom.xml Changed how items are getting defined in the config. 2019-08-18 04:51:49 +02:00

README.md

Shopkeepers logo

Shopkeepers Build Status

Shopkeepers is a Bukkit plugin which allows you to set up custom villager shopkeepers that sell exactly what you want them to sell and for what price. You can set up admin shops, which have infinite supply, and you can also set up player shops, which pull supply from a chest.

BukkitDev Page: https://dev.bukkit.org/projects/shopkeepers
Wiki: https://github.com/Shopkeepers/Shopkeepers-Wiki/wiki
Issue Tracker: https://github.com/Shopkeepers/Shopkeepers/issues
Discord Server: https://discord.gg/d9NKd5z
Source code: https://github.com/Shopkeepers/Shopkeepers/

Maven repository for releases: https://nexus.lichtspiele.org/repository/releases/
Maven repository for dev builds (snapshots): https://nexus.lichtspiele.org/repository/snapshots/

Pull Requests & Contributing

See Contributing

Build with Maven

This is the recommended and easy way to compile the plugin yourself and/or help to contribute to it. Just check out the project to your machine and import it in Eclipse with Import > Maven > Existing Maven Project. Then just right click the imported project and select Run As > Maven install.

Build without Maven

If you really want to do it the old school way, you're free to import the project in Eclipse with Import > General > Existing Project into Workspace. You'll find that the project will instantly show some errors because it's missing its dependencies. You also need to make sure that you'll include the provided modules (NMSHandlers).

Here's how you do that:

  • After importing the project right click on it and select Properties
  • Under Java Build Path > Source click on Add Folder... and add all provided modules:
    • modules/v1_6_R3/src/main/java
    • modules/v1_7_R1/src/main/java
    • ...
  • Under Java Build Path > Library click on Add External JARs... and add the needed CraftBukkit.jar files for the modules above. Information on how to get them: https://www.spigotmc.org/wiki/spigot/
  • After that you can create the plugin for example by right-clicking the project and selecting Export > Java > JAR file or another recommended way.