Added metrics and did some fixes
This commit is contained in:
parent
761dd4bf30
commit
b4cca7ed9f
3 changed files with 16 additions and 1 deletions
6
pom.xml
6
pom.xml
|
@ -174,5 +174,11 @@
|
||||||
<artifactId>annotations</artifactId>
|
<artifactId>annotations</artifactId>
|
||||||
<version>19.0.0</version>
|
<version>19.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bstats</groupId>
|
||||||
|
<artifactId>bstats-bukkit</artifactId>
|
||||||
|
<version>1.7</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -10,6 +10,7 @@ import nl.sbdeveloper.themeparkplus.sbutils.UpdateManager;
|
||||||
import nl.sbdeveloper.themeparkplus.sbutils.YamlFile;
|
import nl.sbdeveloper.themeparkplus.sbutils.YamlFile;
|
||||||
import nl.sbdeveloper.themeparkplus.util.LGUtil;
|
import nl.sbdeveloper.themeparkplus.util.LGUtil;
|
||||||
import nl.sbdeveloper.themeparkplus.util.License;
|
import nl.sbdeveloper.themeparkplus.util.License;
|
||||||
|
import org.bstats.bukkit.Metrics;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||||
|
@ -176,6 +177,9 @@ public final class ThemeParkPlus extends JavaPlugin {
|
||||||
Bukkit.getLogger().severe("[ThemeParkPlus] Couldn't load data! Something went wrong.");
|
Bukkit.getLogger().severe("[ThemeParkPlus] Couldn't load data! Something went wrong.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Bukkit.getLogger().info("[ThemeParkPlus] Loading metrics (can be disabled in the config of bStats)...");
|
||||||
|
new Metrics(this, 5023);
|
||||||
|
|
||||||
Bukkit.getLogger().info("[ThemeParkPlus] Plugin enabled!");
|
Bukkit.getLogger().info("[ThemeParkPlus] Plugin enabled!");
|
||||||
Bukkit.getLogger().info("[ThemeParkPlus] -------------------------------");
|
Bukkit.getLogger().info("[ThemeParkPlus] -------------------------------");
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ public class WaitingRow {
|
||||||
@Getter @Setter private String rideID;
|
@Getter @Setter private String rideID;
|
||||||
@Getter @Setter private String regionID;
|
@Getter @Setter private String regionID;
|
||||||
@Getter @Setter private transient int waitingPlayers = 0;
|
@Getter @Setter private transient int waitingPlayers = 0;
|
||||||
@Getter @Setter private transient double waitingTimeMinutes = 0;
|
@Getter private transient double waitingTimeMinutes = 0;
|
||||||
private ArrayList<SignLocation> signLocations = new ArrayList<>();
|
private ArrayList<SignLocation> signLocations = new ArrayList<>();
|
||||||
|
|
||||||
public WaitingRow(String rideID, String regionID) {
|
public WaitingRow(String rideID, String regionID) {
|
||||||
|
@ -31,4 +31,9 @@ public class WaitingRow {
|
||||||
public void removeSignLocation(SignLocation loc) {
|
public void removeSignLocation(SignLocation loc) {
|
||||||
this.signLocations.remove(loc);
|
this.signLocations.remove(loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setWaitingTimeMinutes(double waitingTimeMinutes) {
|
||||||
|
if (waitingTimeMinutes < 0) return;
|
||||||
|
this.waitingTimeMinutes = waitingTimeMinutes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue