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.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;
}
}

View file

@ -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);

View file

@ -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());