From 4a4ee986d57bb8dd2df2be48e3a2bb80571a2e63 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Thu, 22 Dec 2016 09:33:31 -0500 Subject: [PATCH] Changed Filepaths --- .../components/metrics/MetricsComponent.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/buttondevteam/alipresents/components/metrics/MetricsComponent.java b/src/buttondevteam/alipresents/components/metrics/MetricsComponent.java index ea57a09..0e561a6 100644 --- a/src/buttondevteam/alipresents/components/metrics/MetricsComponent.java +++ b/src/buttondevteam/alipresents/components/metrics/MetricsComponent.java @@ -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 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));