mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 14:38:53 +00:00
Add more metric collection, simplify syntax description of tp command
This commit is contained in:
1 parent
f7e2b6431f
commit
9737f6ba79
4 files changed
+21
-8
No files matched your search
@@ -44,7 +44,7 @@
|
|||||||
<relocations>
|
<relocations>
|
||||||
<relocation>
|
<relocation>
|
||||||
<pattern>org.bstats</pattern>
|
<pattern>org.bstats</pattern>
|
||||||
<shadedPattern>me.william278.huskhomes2.integrations</shadedPattern>
|
<shadedPattern>me.william278.huskhomes2.bstats</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
<relocation>
|
<relocation>
|
||||||
<pattern>de.themoep.minedown</pattern>
|
<pattern>de.themoep.minedown</pattern>
|
||||||
@@ -159,8 +159,8 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bstats</groupId>
|
<groupId>org.bstats</groupId>
|
||||||
<artifactId>bstats-bukkit-lite</artifactId>
|
<artifactId>bstats-bukkit</artifactId>
|
||||||
<version>1.8</version>
|
<version>2.2.1</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ import me.william278.huskhomes2.listeners.PlayerListener;
|
|||||||
import me.william278.huskhomes2.listeners.PluginMessageListener;
|
import me.william278.huskhomes2.listeners.PluginMessageListener;
|
||||||
import me.william278.huskhomes2.teleport.SettingHandler;
|
import me.william278.huskhomes2.teleport.SettingHandler;
|
||||||
import me.william278.huskhomes2.util.PlayerList;
|
import me.william278.huskhomes2.util.PlayerList;
|
||||||
import org.bstats.bukkit.MetricsLite;
|
import org.bstats.bukkit.Metrics;
|
||||||
|
import org.bstats.charts.SimplePie;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
@@ -77,6 +78,8 @@ public final class HuskHomes extends JavaPlugin {
|
|||||||
private static PlayerList playerList;
|
private static PlayerList playerList;
|
||||||
public static PlayerList getPlayerList() { return playerList; }
|
public static PlayerList getPlayerList() { return playerList; }
|
||||||
|
|
||||||
|
private static final int METRICS_PLUGIN_ID = 8430;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the HuskHomes API
|
* Returns the HuskHomes API
|
||||||
* @deprecated Use {@link HuskHomesAPI#getInstance()} instead
|
* @deprecated Use {@link HuskHomesAPI#getInstance()} instead
|
||||||
@@ -215,7 +218,19 @@ public final class HuskHomes extends JavaPlugin {
|
|||||||
registerEvents(this);
|
registerEvents(this);
|
||||||
|
|
||||||
// bStats initialisation
|
// bStats initialisation
|
||||||
new MetricsLite(this, 8430);
|
try {
|
||||||
|
Metrics metrics = new Metrics(this, METRICS_PLUGIN_ID);
|
||||||
|
metrics.addCustomChart(new SimplePie("bungee_mode", () -> Boolean.toString(getSettings().doBungee())));
|
||||||
|
metrics.addCustomChart(new SimplePie("language", () -> getSettings().getLanguage()));
|
||||||
|
metrics.addCustomChart(new SimplePie("database_type", () -> getSettings().getDatabaseType()));
|
||||||
|
metrics.addCustomChart(new SimplePie("using_economy", () -> Boolean.toString(getSettings().doEconomy())));
|
||||||
|
metrics.addCustomChart(new SimplePie("using_map", () -> Boolean.toString(getSettings().doMapIntegration())));
|
||||||
|
if (getSettings().doMapIntegration()) {
|
||||||
|
metrics.addCustomChart(new SimplePie("map_type", () -> getSettings().getMapPlugin()));
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
getLogger().warning("An exception occurred initialising metrics; skipping.");
|
||||||
|
}
|
||||||
|
|
||||||
// Setup player list
|
// Setup player list
|
||||||
playerList = new PlayerList();
|
playerList = new PlayerList();
|
||||||
|
|||||||
@@ -85,7 +85,5 @@ public class BlueMap extends Map {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -67,7 +67,7 @@ commands:
|
|||||||
aliases: [phome]
|
aliases: [phome]
|
||||||
tp:
|
tp:
|
||||||
description: Teleport to another player or location
|
description: Teleport to another player or location
|
||||||
usage: /tp <player> OR /tp <x> <y> <z> [world] [server]
|
usage: /tp <player/coordinates>
|
||||||
permission: huskhomes.tp
|
permission: huskhomes.tp
|
||||||
aliases: [tpo]
|
aliases: [tpo]
|
||||||
tphere:
|
tphere:
|
||||||
|
|||||||
Reference in new issue
Block a user