Merge pull request #44 from TBMCPlugins/PlayerMetrics

Changed Filepaths for Player Metrics
This commit is contained in:
alisolarflare 2016-12-24 03:21:14 -05:00 committed by GitHub
commit 0cba3cba91

View file

@ -11,15 +11,20 @@ import buttondevteam.alipresents.components.metrics.files.MetricsFile;
import buttondevteam.alipresents.components.metrics.output.GetLoginMetrics;
public class MetricsComponent extends Component{
String defaultPath = "src/alisolarflare/resources";
String defaultFilePath = (defaultPath + "/metrics.txt");
String playerLoginsFilePath = (defaultPath + "/playerLogins.txt");
String defaultPath;
String defaultFilePath;
String playerLoginsFilePath;
public MetricsFile playerLoginsFile; // DATA - STRING
public List<String> metricsList;
@Override
public void register(JavaPlugin plugin){
defaultPath = plugin.getDataFolder().getAbsolutePath();
defaultFilePath = defaultPath + "/metrics.txt";
playerLoginsFilePath = defaultPath + "/playerLogins.txt";
playerLoginsFile = new MetricsFile(playerLoginsFilePath);
registerCommand(plugin, new GetLoginMetrics(this));
registerListener(plugin, new PlayerJoinListener(this, playerLoginsFile));