Skip to content

Commit

Permalink
Merge pull request #24 from MherZaqaryan/master
Browse files Browse the repository at this point in the history
Fix #21 #23, update dependencies
  • Loading branch information
andrei1058 authored Nov 1, 2021
2 parents 112492d + a477b38 commit c39458d
Show file tree
Hide file tree
Showing 6 changed files with 394 additions and 422 deletions.
8 changes: 4 additions & 4 deletions bedwars-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
<version>1.7</version>
<version>2.2.1</version>
<optional>true</optional>
</dependency>
<dependency>
Expand Down Expand Up @@ -191,14 +191,14 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
<version>2.11.0</version>
<optional>true</optional>
</dependency>
<!-- https://mvnrepository.com/artifact/com.zaxxer/HikariCP -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>3.4.5</version>
<version>5.0.0</version>
<optional>true</optional>
<exclusions>
<exclusion>
Expand All @@ -211,7 +211,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.30</version>
<version>1.7.32</version>
<optional>true</optional>
</dependency>
</dependencies>
Expand Down
19 changes: 10 additions & 9 deletions bedwars-plugin/src/main/java/com/andrei1058/bedwars/BedWars.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
import com.andrei1058.vipfeatures.api.IVipFeatures;
import com.andrei1058.vipfeatures.api.MiniGameAlreadyRegistered;
import org.bstats.bukkit.Metrics;
import org.bstats.charts.SimplePie;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
Expand Down Expand Up @@ -383,6 +384,7 @@ public void onEnable() {
remoteDatabase.init();
} else {
remoteDatabase = new SQLite();
remoteDatabase.init();
}

/* Citizens support */
Expand Down Expand Up @@ -471,14 +473,14 @@ public void onEnable() {

// bStats metrics
Metrics metrics = new Metrics(this, 1885);
metrics.addCustomChart(new Metrics.SimplePie("server_type", () -> getServerType().toString()));
metrics.addCustomChart(new Metrics.SimplePie("default_language", () -> Language.getDefaultLanguage().getIso()));
metrics.addCustomChart(new Metrics.SimplePie("auto_scale", () -> String.valueOf(autoscale)));
metrics.addCustomChart(new Metrics.SimplePie("party_adapter", () -> party.getClass().getName()));
metrics.addCustomChart(new Metrics.SimplePie("chat_adapter", () -> chat.getClass().getName()));
metrics.addCustomChart(new Metrics.SimplePie("level_adapter", () -> getLevelSupport().getClass().getName()));
metrics.addCustomChart(new Metrics.SimplePie("db_adapter", () -> getRemoteDatabase().getClass().getName()));
metrics.addCustomChart(new Metrics.SimplePie("map_adapter", () -> String.valueOf(getAPI().getRestoreAdapter().getOwner().getName())));
metrics.addCustomChart(new SimplePie("server_type", () -> getServerType().toString()));
metrics.addCustomChart(new SimplePie("default_language", () -> Language.getDefaultLanguage().getIso()));
metrics.addCustomChart(new SimplePie("auto_scale", () -> String.valueOf(autoscale)));
metrics.addCustomChart(new SimplePie("party_adapter", () -> party.getClass().getName()));
metrics.addCustomChart(new SimplePie("chat_adapter", () -> chat.getClass().getName()));
metrics.addCustomChart(new SimplePie("level_adapter", () -> getLevelSupport().getClass().getName()));
metrics.addCustomChart(new SimplePie("db_adapter", () -> getRemoteDatabase().getClass().getName()));
metrics.addCustomChart(new SimplePie("map_adapter", () -> String.valueOf(getAPI().getRestoreAdapter().getOwner().getName())));

if (Bukkit.getPluginManager().getPlugin("VipFeatures") != null) {
try {
Expand Down Expand Up @@ -568,7 +570,6 @@ public void onDisable() {
}
} catch (Exception ignored) {
}
if (remoteDatabase != null) remoteDatabase.close();
}

private void loadArenasAndSigns() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ public interface Database {

PlayerStats fetchStats(UUID uuid);

/**
* Close connection.
*/
void close();

/**
* Set quick buy slot value.
*/
Expand Down
Loading

0 comments on commit c39458d

Please sign in to comment.