mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Add new economy actions, update API docs to use new repo, add metrics to Sponge (#398)
This commit is contained in:
1 parent
8b609010ec
commit
40cb340b15
33 files changed
+437
-159
No files matched your search
@@ -437,6 +437,10 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, BukkitTask
|
||||
|
||||
@Override
|
||||
public void registerMetrics(int metricsId) {
|
||||
if (!getVersion().getMetadata().isBlank()) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
final Metrics metrics = new Metrics(this, metricsId);
|
||||
metrics.addCustomChart(new SimplePie("bungee_mode", () -> Boolean.toString(getSettings().doCrossServer())));
|
||||
@@ -448,8 +452,8 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, BukkitTask
|
||||
metrics.addCustomChart(new SimplePie("using_economy", () -> Boolean.toString(getSettings().doEconomy())));
|
||||
metrics.addCustomChart(new SimplePie("using_map", () -> Boolean.toString(getSettings().doMapHook())));
|
||||
getMapHook().ifPresent(hook -> metrics.addCustomChart(new SimplePie("map_type", hook::getName)));
|
||||
} catch (Exception e) {
|
||||
log(Level.WARNING, "Failed to register metrics", e);
|
||||
} catch (Throwable e) {
|
||||
log(Level.WARNING, "Failed to register bStats metrics (" + e.getMessage() + ")");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -471,7 +475,7 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, BukkitTask
|
||||
@Override
|
||||
public void onPluginMessageReceived(@NotNull String channel, @NotNull Player player, byte[] message) {
|
||||
if (broker != null && broker instanceof PluginMessageBroker pluginMessenger
|
||||
&& getSettings().getBrokerType() == Broker.Type.PLUGIN_MESSAGE) {
|
||||
&& getSettings().getBrokerType() == Broker.Type.PLUGIN_MESSAGE) {
|
||||
pluginMessenger.onReceive(channel, BukkitUser.adapt(player), message);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user