mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-06-27 23:04:42 +02:00
Message configs are now selected based on the client's language (can be toggled in the config) and will use MineDown formatting to allow display of component messages as well as usage of RGB colors in 1.16. If found the legacy local.yml will be used instead of the per-language files. Move your local.yml to the correct lang config to if you want to use the per-client language option. Version was also changed to 3.11 due to the many internal changes that have accumulated over time
27 lines
1.1 KiB
Java
27 lines
1.1 KiB
Java
package com.Acrobot.ChestShop.Commands;
|
|
|
|
import com.Acrobot.ChestShop.Configuration.Messages;
|
|
import com.Acrobot.ChestShop.Listeners.Modules.MetricsModule;
|
|
import com.Acrobot.ChestShop.UUIDs.NameManager;
|
|
import org.bukkit.command.Command;
|
|
import org.bukkit.command.CommandExecutor;
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
/**
|
|
* @author Acrobot
|
|
*/
|
|
public class Metrics implements CommandExecutor {
|
|
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
|
Messages.METRICS.send(sender,
|
|
"accounts", String.valueOf(NameManager.getAccountCount()),
|
|
"totalTransactions", String.valueOf(MetricsModule.getTotalTransactions()),
|
|
"buyTransactions", String.valueOf(MetricsModule.getBuyTransactions()),
|
|
"sellTransactions", String.valueOf(MetricsModule.getSellTransactions()),
|
|
"totalItems", String.valueOf(MetricsModule.getTotalItemsCount()),
|
|
"boughtItems", String.valueOf(MetricsModule.getBoughtItemsCount()),
|
|
"soldItems", String.valueOf(MetricsModule.getSoldItemsCount())
|
|
);
|
|
return true;
|
|
}
|
|
}
|