Fixed disabled abilities still being bound to bar

This commit is contained in:
Matt 2016-04-30 10:18:59 -05:00
parent 125e5da0f9
commit dc615d5d49
2 changed files with 16 additions and 12 deletions

View file

@ -1035,10 +1035,12 @@ public class PKListener implements Listener {
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent e) {
Player player = e.getPlayer();
public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
JUMPS.put(player, player.getStatistic(Statistic.JUMP));
GeneralMethods.createBendingPlayer(e.getPlayer().getUniqueId(), player.getName());
GeneralMethods.createBendingPlayer(player.getUniqueId(), player.getName());
GeneralMethods.removeUnusableAbilities(player.getName());
}
@EventHandler

View file

@ -1,5 +1,14 @@
package com.projectkorra.projectkorra;
import java.io.File;
import java.io.IOException;
import java.util.logging.Logger;
import org.bukkit.Bukkit;
import org.bukkit.Statistic;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import com.bekvon.bukkit.residence.protection.FlagPermissions;
import com.projectkorra.projectkorra.ability.CoreAbility;
import com.projectkorra.projectkorra.ability.util.ComboManager;
@ -19,15 +28,6 @@ import com.projectkorra.projectkorra.util.Updater;
import com.projectkorra.projectkorra.util.logging.PKLogHandler;
import com.projectkorra.projectkorra.waterbending.WaterbendingManager;
import org.bukkit.Bukkit;
import org.bukkit.Statistic;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.File;
import java.io.IOException;
import java.util.logging.Logger;
public class ProjectKorra extends JavaPlugin {
public static ProjectKorra plugin;
@ -85,7 +85,9 @@ public class ProjectKorra extends JavaPlugin {
for (Player player : Bukkit.getOnlinePlayers()) {
PKListener.getJumpStatistics().put(player, player.getStatistic(Statistic.JUMP));
GeneralMethods.createBendingPlayer(player.getUniqueId(), player.getName());
GeneralMethods.removeUnusableAbilities(player.getName());
}
try {