4.2 update

This commit is contained in:
mfnalex 2019-05-02 15:43:58 +02:00
parent af0931dcb3
commit bbc78ecd96
4 changed files with 21 additions and 20 deletions

View File

@ -6,7 +6,7 @@
<groupId>de.jeffclan</groupId>
<artifactId>JeffChestSort</artifactId>
<version>4.1.2</version>
<version>4.2</version>
<packaging>jar</packaging>
<name>JeffChestSort</name>

View File

@ -59,7 +59,7 @@ public class JeffChestSortPlugin extends JavaPlugin {
JeffChestSortListener listener;
String sortingMethod;
ArrayList<String> disabledWorlds;
int currentConfigVersion = 8;
int currentConfigVersion = 9;
boolean usingMatchingConfig = true;
boolean debug = false;
boolean verbose = true;
@ -260,6 +260,12 @@ public class JeffChestSortPlugin extends JavaPlugin {
updateChecker.checkForUpdate();
}
registerMetrics();
}
private void registerMetrics() {
// Metrics will need json-simple with 1.14 API.
Metrics metrics = new Metrics(this);
metrics.addCustomChart(new Metrics.SimplePie("sorting_method", () -> sortingMethod));
@ -277,8 +283,7 @@ public class JeffChestSortPlugin extends JavaPlugin {
() -> Boolean.toString(getConfig().getBoolean("sorting-enabled-by-default"))));
metrics.addCustomChart(
new Metrics.SimplePie("using_matching_config_version", () -> Boolean.toString(usingMatchingConfig)));
metrics.addCustomChart(new Metrics.SimplePie("sort_time", () -> getConfig().getString("sort-time")));
}
// Saves default category files, when enabled in the config

View File

@ -43,26 +43,22 @@ auto-generate-category-files: true
# you can choose when ChestSort should sort chests.
# The default option is to sort when an inventory is closed.
# This is useful, because the onInventoryClose event never
# gets fired when access to the chest is forbidden by
# another plugin, e.g. WorldGuard
# You can also sort whenenver a chest is opened.
# ChestSort will check if the onInventoryOpenEvent gets
# cancelled. If it does get cancelled, ChestSort will
# not sort the chest. However, if a plugin uses the
# This is useful, because the onInventoryClose event never gets fired
# when access to the chest is forbidden by another plugin, e.g. WorldGuard
# You can also sort whenenver a chest is opened. ChestSort will then check
# if the onInventoryOpenEvent gets cancelled. If it does get cancelled,
# ChestSort will not sort the chest. However, if a plugin uses the
# MONITOR event priority, ChestSort cannot detect this.
# If you have problems with unaccessible chests being
# sorted, set this option to "close".
# If you want, you can sort twice, however this is not
# If you have problems with unaccessible chests being sorted, set this
# option to "close". If you want, you can sort twice, however this is not
# very useful.
# Available options:
# open, close, both
# If you don't know what to put here, just use the default "close"
# Available options: open, close, both
sort-time: close
# should we check for updates?
# when enabled, a message is printed in the console if a new
# version has been found, and OPs will be notified when they
# join the server
# version has been found, and OPs will be notified when they join the server
# When set to true, we will check for updates on startup and every 24 hours
# When set to on-startup, we will only check on startup
# When set to false, don't check for updates
@ -232,4 +228,4 @@ message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s
#########################
# please do not change the following line manually!
config-version: 8
config-version: 9

View File

@ -1,6 +1,6 @@
main: de.jeffclan.JeffChestSort.JeffChestSortPlugin
name: ChestSort
version: 4.1.2
version: 4.2
api-version: 1.13
description: Allows automatic chest sorting
author: mfnalex