Tried to get potatoes to even work

This commit is contained in:
alisolarflare 2016-11-17 19:15:41 -05:00
parent bdc565492b
commit 0a866df10e
3 changed files with 10 additions and 5 deletions

View file

@ -8,6 +8,8 @@ import org.bukkit.event.Listener;
import org.bukkit.event.entity.ProjectileLaunchEvent; import org.bukkit.event.entity.ProjectileLaunchEvent;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import alisolarflare.components.BaseCommand;
public class AliArrowListener implements Listener { public class AliArrowListener implements Listener {
private final JavaPlugin plugin; private final JavaPlugin plugin;
@ -24,12 +26,13 @@ public class AliArrowListener implements Listener {
if (!(arrow.isCritical()) || !(arrow.getShooter() instanceof Player)){ if (!(arrow.isCritical()) || !(arrow.getShooter() instanceof Player)){
return; return;
} }
Player player = (Player) arrow.getShooter();
String username = player.getName();
String user = ((Player) arrow.getShooter()).getName(); for (String permittedUsername : AliArrowTask.permittedUsers){
if(permittedUsername.equalsIgnoreCase(username)){
for (String permittedUser : AliArrowTask.permittedUsers){ BaseCommand.SendDebugPotato(player, "HAHAHAHHAHA NICE");
if(permittedUser.equalsIgnoreCase(user)){ new AliArrowTask(arrow,username).runTaskTimer(plugin, 2, 1);
new AliArrowTask(arrow,user).runTaskTimer(plugin, 2, 1);
break; break;
} }
} }

View file

@ -17,6 +17,7 @@ public class GetLoginMetrics extends ModCommand{
@Override @Override
public boolean OnCommand(CommandSender sender, String alias, String[] args) { public boolean OnCommand(CommandSender sender, String alias, String[] args) {
Player player = (Player) sender; Player player = (Player) sender;
SendDebugPotato(player, "FIREEED");
for (String metric : module.metricsList){ for (String metric : module.metricsList){
SendDebugPotato(player, module.metricsList); SendDebugPotato(player, module.metricsList);
SendDebugPotato(player, metric); SendDebugPotato(player, metric);

View file

@ -15,6 +15,7 @@ public class PlayerJoinListener implements Listener{
} }
@EventHandler @EventHandler
public void onPlayerJoin(PlayerJoinEvent event){ public void onPlayerJoin(PlayerJoinEvent event){
BaseCommand.SendDebugPotato(event.getPlayer(), "PLAYERJOIIIN");
BaseCommand.SendDebugPotato(event.getPlayer(), "loginlog."+System.currentTimeMillis()+event.getPlayer().getName()); BaseCommand.SendDebugPotato(event.getPlayer(), "loginlog."+System.currentTimeMillis()+event.getPlayer().getName());
module.saveData(module.metricsYml, "loginlog."+System.currentTimeMillis()+event.getPlayer().getName(), 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()); module.metricsList.add("loginlog."+System.currentTimeMillis()+event.getPlayer().getName());