From 0a866df10e6ebb307caf15f5af1a32d22427e75d Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Thu, 17 Nov 2016 19:15:41 -0500 Subject: [PATCH] Tried to get potatoes to even work --- .../components/magic/tricks/AliArrowListener.java | 13 ++++++++----- .../metrics/commands/GetLoginMetrics.java | 1 + .../metrics/listeners/PlayerJoinListener.java | 1 + 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/alisolarflare/components/magic/tricks/AliArrowListener.java b/src/alisolarflare/components/magic/tricks/AliArrowListener.java index cbbe46c..10ee0f0 100644 --- a/src/alisolarflare/components/magic/tricks/AliArrowListener.java +++ b/src/alisolarflare/components/magic/tricks/AliArrowListener.java @@ -8,6 +8,8 @@ import org.bukkit.event.Listener; import org.bukkit.event.entity.ProjectileLaunchEvent; import org.bukkit.plugin.java.JavaPlugin; +import alisolarflare.components.BaseCommand; + public class AliArrowListener implements Listener { private final JavaPlugin plugin; @@ -24,12 +26,13 @@ public class AliArrowListener implements Listener { if (!(arrow.isCritical()) || !(arrow.getShooter() instanceof Player)){ return; } + Player player = (Player) arrow.getShooter(); + String username = player.getName(); - String user = ((Player) arrow.getShooter()).getName(); - - for (String permittedUser : AliArrowTask.permittedUsers){ - if(permittedUser.equalsIgnoreCase(user)){ - new AliArrowTask(arrow,user).runTaskTimer(plugin, 2, 1); + for (String permittedUsername : AliArrowTask.permittedUsers){ + if(permittedUsername.equalsIgnoreCase(username)){ + BaseCommand.SendDebugPotato(player, "HAHAHAHHAHA NICE"); + new AliArrowTask(arrow,username).runTaskTimer(plugin, 2, 1); break; } } diff --git a/src/alisolarflare/components/metrics/commands/GetLoginMetrics.java b/src/alisolarflare/components/metrics/commands/GetLoginMetrics.java index 0722cad..1555df6 100644 --- a/src/alisolarflare/components/metrics/commands/GetLoginMetrics.java +++ b/src/alisolarflare/components/metrics/commands/GetLoginMetrics.java @@ -17,6 +17,7 @@ public class GetLoginMetrics extends ModCommand{ @Override public boolean OnCommand(CommandSender sender, String alias, String[] args) { Player player = (Player) sender; + SendDebugPotato(player, "FIREEED"); for (String metric : module.metricsList){ SendDebugPotato(player, module.metricsList); SendDebugPotato(player, metric); diff --git a/src/alisolarflare/components/metrics/listeners/PlayerJoinListener.java b/src/alisolarflare/components/metrics/listeners/PlayerJoinListener.java index 953b5bb..dcc5a6b 100644 --- a/src/alisolarflare/components/metrics/listeners/PlayerJoinListener.java +++ b/src/alisolarflare/components/metrics/listeners/PlayerJoinListener.java @@ -15,6 +15,7 @@ public class PlayerJoinListener implements Listener{ } @EventHandler public void onPlayerJoin(PlayerJoinEvent event){ + BaseCommand.SendDebugPotato(event.getPlayer(), "PLAYERJOIIIN"); BaseCommand.SendDebugPotato(event.getPlayer(), "loginlog."+System.currentTimeMillis()+event.getPlayer().getName()); module.saveData(module.metricsYml, "loginlog."+System.currentTimeMillis()+event.getPlayer().getName(), event.getPlayer().getName()); module.metricsList.add("loginlog."+System.currentTimeMillis()+event.getPlayer().getName());