Cleanup for release
Updated EtzCore to 1.0.5 Removed Maven annotations Updated Essentials/Dynmap interfaces Overwrite qol.png to hopefully stop seeing that stupid warning logmaster
parent
5ac54a96a9
commit
a01d41d143
6
pom.xml
6
pom.xml
|
@ -37,26 +37,22 @@
|
|||
<dependency>
|
||||
<groupId>xyz.etztech</groupId>
|
||||
<artifactId>EtzCore</artifactId>
|
||||
<version>1.0.4</version>
|
||||
<scope>compile</scope>
|
||||
<version>1.0.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.ess3</groupId>
|
||||
<artifactId>Essentials</artifactId>
|
||||
<version>2.14-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>us.dynmap</groupId>
|
||||
<artifactId>dynmap-api</artifactId>
|
||||
<version>1.9.4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>2.6</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
package xyz.etztech.qol;
|
||||
|
||||
import net.ess3.api.IEssentials;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import xyz.etztech.core.maven.MavenLibrary;
|
||||
import xyz.etztech.core.maven.MavenPlugin;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.dynmap.DynmapAPI;
|
||||
import xyz.etztech.qol.commands.*;
|
||||
import xyz.etztech.qol.listeners.*;
|
||||
import xyz.etztech.qol.other.LinkCommand;
|
||||
|
@ -16,14 +17,11 @@ import java.util.List;
|
|||
import java.util.UUID;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@MavenLibrary(group = "net.ess3", artifact = "Essentials", version = "2.13.1", repository = "http://repo.ess3.net/content/groups/essentials")
|
||||
@MavenLibrary(group = "us.dynmap", artifact = "dynmap-api", version = "1.9.4", repository = "http://repo.mikeprimm.com/")
|
||||
@MavenLibrary(group = "commons-lang", artifact = "commons-lang", version = "2.6")
|
||||
public class QoL extends MavenPlugin {
|
||||
public class QoL extends JavaPlugin {
|
||||
|
||||
private static QoL instance;
|
||||
private Object essentials = null;
|
||||
private Object dynmap = null;
|
||||
private IEssentials essentials = null;
|
||||
private DynmapAPI dynmap = null;
|
||||
|
||||
public static FileConfiguration config;
|
||||
private Logger log = Logger.getLogger( "Minecraft" );
|
||||
|
@ -35,23 +33,22 @@ public class QoL extends MavenPlugin {
|
|||
private static List<String> audits = new ArrayList<>();
|
||||
private static List<LinkCommand> links = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
public void onEnable() {
|
||||
instance = this;
|
||||
saveDefaultConfig();
|
||||
reloadConfig();
|
||||
saveResource("qol.png", false);
|
||||
saveResource("qol.png", true);
|
||||
|
||||
//Essentials hook
|
||||
if (Bukkit.getPluginManager().isPluginEnabled("Essentials")) {
|
||||
log("Hooked into Essentials for TPS alert.");
|
||||
essentials = Bukkit.getPluginManager().getPlugin("Essentials");
|
||||
essentials = (IEssentials) Bukkit.getPluginManager().getPlugin("Essentials");
|
||||
}
|
||||
|
||||
//Dynmap hook
|
||||
if (Bukkit.getPluginManager().isPluginEnabled("dynmap")) {
|
||||
log("Hooked into Dynmap.");
|
||||
dynmap = Bukkit.getPluginManager().getPlugin("dynmap");
|
||||
dynmap = (DynmapAPI) Bukkit.getPluginManager().getPlugin("dynmap");
|
||||
}
|
||||
|
||||
if( isEnabled() ) {
|
||||
|
@ -194,8 +191,7 @@ public class QoL extends MavenPlugin {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
public void onDisable() {
|
||||
}
|
||||
|
||||
public void disablePlugin() {
|
||||
|
@ -262,9 +258,9 @@ public class QoL extends MavenPlugin {
|
|||
return links;
|
||||
}
|
||||
|
||||
public Object getEssentials() { return essentials; }
|
||||
public IEssentials getEssentials() { return essentials; }
|
||||
|
||||
public Object getDynmap() { return dynmap; }
|
||||
public DynmapAPI getDynmap() { return dynmap; }
|
||||
|
||||
|
||||
private void runTask(final String command) {
|
||||
|
|
|
@ -49,7 +49,7 @@ public class CommandPreprocessListener implements Listener {
|
|||
String base = command.split(" ")[0].substring(1).toLowerCase(); // Strip the slash
|
||||
|
||||
Player sender = event.getPlayer();
|
||||
DynmapAPI dynmap = (DynmapAPI) plugin.getDynmap();
|
||||
DynmapAPI dynmap = plugin.getDynmap();
|
||||
|
||||
// Spec dynmap hide
|
||||
if (base.equals("spec") && sender.hasPermission("SafeSpectate.spectate") && dynmap != null) {
|
||||
|
|
|
@ -18,7 +18,7 @@ public class TPSRunnable implements Runnable {
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
IEssentials essentials = (IEssentials) plugin.getEssentials();
|
||||
IEssentials essentials = plugin.getEssentials();
|
||||
if (essentials != null) {
|
||||
double tps = essentials.getTimer().getAverageTPS();
|
||||
int threshold = plugin.getConfig().getInt("tps.threshold", 0);
|
||||
|
|
Loading…
Reference in New Issue