mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-25 19:45:36 +01:00
Update dependencies (mainly ORMLite and bStats)
Also fixed the outdated Reserve maven repository. That massively slowed down builds...
This commit is contained in:
parent
5b712f9ed5
commit
a78b925181
18
pom.xml
18
pom.xml
@ -41,10 +41,6 @@
|
||||
<id>local_repo</id>
|
||||
<url>file://${project.basedir}/repo/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>reserve-repo</id>
|
||||
<url>https://dl.bintray.com/theneweconomy/java/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>redprotect-repo</id>
|
||||
<url>https://raw.githubusercontent.com/FabioZumbi12/RedProtect/mvn-repo/</url>
|
||||
@ -63,14 +59,14 @@
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13.1</version>
|
||||
<version>4.13.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.j256.ormlite</groupId>
|
||||
<artifactId>ormlite-jdbc</artifactId>
|
||||
<version>5.1</version>
|
||||
<version>6.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
@ -91,14 +87,14 @@
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-platform-bukkit</artifactId>
|
||||
<version>4.0.1</version>
|
||||
<version>4.1.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-text-serializer-gson</artifactId>
|
||||
<version>4.9.1</version>
|
||||
<version>4.11.0</version>
|
||||
<scope>compile</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
@ -112,14 +108,14 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.17.1</version>
|
||||
<version>2.17.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.bstats</groupId>
|
||||
<artifactId>bstats-bukkit</artifactId>
|
||||
<version>1.7</version>
|
||||
<version>3.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
@ -329,7 +325,7 @@
|
||||
<dependency>
|
||||
<groupId>net.tnemc</groupId>
|
||||
<artifactId>Reserve</artifactId>
|
||||
<version>0.1.0.10</version>
|
||||
<version>0.1.5.4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -66,6 +66,12 @@ import org.apache.logging.log4j.core.filter.AbstractFilter;
|
||||
import org.apache.logging.log4j.message.Message;
|
||||
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bstats.charts.AdvancedBarChart;
|
||||
import org.bstats.charts.DrilldownPie;
|
||||
import org.bstats.charts.MultiLineChart;
|
||||
import org.bstats.charts.SimpleBarChart;
|
||||
import org.bstats.charts.SimplePie;
|
||||
import org.bstats.charts.SingleLineChart;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Server;
|
||||
@ -433,7 +439,7 @@ public class ChestShop extends JavaPlugin {
|
||||
Metrics bStats = new Metrics(this, 1109);
|
||||
try {
|
||||
String dist = new JarFile(this.getFile()).getManifest().getMainAttributes().getValue("Distribution-Type");
|
||||
bStats.addCustomChart(new Metrics.SimplePie("distributionType", () -> dist));
|
||||
bStats.addCustomChart(new SimplePie("distributionType", () -> dist));
|
||||
} catch (IOException ignored) {}
|
||||
|
||||
String serverVersion = getServer().getBukkitVersion().split("-")[0];
|
||||
@ -447,22 +453,22 @@ public class ChestShop extends JavaPlugin {
|
||||
bStats.addCustomChart(createStaticDrilldownStat("versionJavaMc", javaVersion, serverVersion));
|
||||
bStats.addCustomChart(createStaticDrilldownStat("versionMcJava", serverVersion, javaVersion));
|
||||
|
||||
bStats.addCustomChart(new Metrics.SingleLineChart("shopAccounts", NameManager::getAccountCount));
|
||||
bStats.addCustomChart(new Metrics.MultiLineChart("transactionCount", () -> ImmutableMap.of(
|
||||
bStats.addCustomChart(new SingleLineChart("shopAccounts", NameManager::getAccountCount));
|
||||
bStats.addCustomChart(new MultiLineChart("transactionCount", () -> ImmutableMap.of(
|
||||
"total", MetricsModule.getTotalTransactions(),
|
||||
"buy", MetricsModule.getBuyTransactions(),
|
||||
"sell", MetricsModule.getSellTransactions()
|
||||
)));
|
||||
bStats.addCustomChart(new Metrics.MultiLineChart("itemCount", () -> ImmutableMap.of(
|
||||
bStats.addCustomChart(new MultiLineChart("itemCount", () -> ImmutableMap.of(
|
||||
"total", MetricsModule.getTotalItemsCount(),
|
||||
"buy", MetricsModule.getSoldItemsCount(),
|
||||
"sell", MetricsModule.getBoughtItemsCount()
|
||||
)));
|
||||
|
||||
bStats.addCustomChart(new Metrics.SimplePie("includeSettingsInMetrics", () -> Properties.INCLUDE_SETTINGS_IN_METRICS ? "enabled" : "disabled"));
|
||||
bStats.addCustomChart(new SimplePie("includeSettingsInMetrics", () -> Properties.INCLUDE_SETTINGS_IN_METRICS ? "enabled" : "disabled"));
|
||||
if (!Properties.INCLUDE_SETTINGS_IN_METRICS) return;
|
||||
|
||||
bStats.addCustomChart(new Metrics.AdvancedBarChart("pluginProperties", () -> {
|
||||
bStats.addCustomChart(new AdvancedBarChart("pluginProperties", () -> {
|
||||
Map<String, int[]> map = new LinkedHashMap<>();
|
||||
map.put("ensure-correct-playerid", getChartArray(Properties.ENSURE_CORRECT_PLAYERID));
|
||||
map.put("reverse-buttons", getChartArray(Properties.REVERSE_BUTTONS));
|
||||
@ -481,13 +487,13 @@ public class ChestShop extends JavaPlugin {
|
||||
map.put("log-to-file", getChartArray(Properties.LOG_TO_FILE));
|
||||
return map;
|
||||
}));
|
||||
bStats.addCustomChart(new Metrics.SimpleBarChart("shopContainers",
|
||||
bStats.addCustomChart(new SimpleBarChart("shopContainers",
|
||||
() -> Properties.SHOP_CONTAINERS.stream().map(Material::name).collect(Collectors.toMap(k -> k, k -> 1))));
|
||||
}
|
||||
|
||||
private Metrics.DrilldownPie createStaticDrilldownStat(String statId, String value1, String value2) {
|
||||
private DrilldownPie createStaticDrilldownStat(String statId, String value1, String value2) {
|
||||
final Map<String, Map<String, Integer>> map = ImmutableMap.of(value1, ImmutableMap.of(value2, 1));
|
||||
return new Metrics.DrilldownPie(statId, () -> map);
|
||||
return new DrilldownPie(statId, () -> map);
|
||||
}
|
||||
|
||||
private int[] getChartArray(boolean value) {
|
||||
|
@ -4,8 +4,8 @@ import com.Acrobot.ChestShop.ChestShop;
|
||||
import com.j256.ormlite.dao.Dao;
|
||||
import com.j256.ormlite.dao.DaoManager;
|
||||
import com.j256.ormlite.dao.LruObjectCache;
|
||||
import com.j256.ormlite.db.SqliteDatabaseType;
|
||||
import com.j256.ormlite.jdbc.JdbcConnectionSource;
|
||||
import com.j256.ormlite.jdbc.db.SqliteDatabaseType;
|
||||
import com.j256.ormlite.support.ConnectionSource;
|
||||
import com.j256.ormlite.table.TableUtils;
|
||||
|
||||
|
@ -113,7 +113,7 @@ public class Migrations {
|
||||
}
|
||||
try {
|
||||
results.close();
|
||||
} catch (IOException e1) {
|
||||
} catch (Exception e1) {
|
||||
ChestShop.getBukkitLogger().log(Level.WARNING, "Error while closing results! " + e.getMessage());
|
||||
}
|
||||
ChestShop.getBukkitLogger().log(Level.INFO, success + " accounts successfully migrated. " + error + " accounts failed to migrate!");
|
||||
|
Loading…
Reference in New Issue
Block a user