This commit is contained in:
aPunch 2012-03-20 20:31:03 -05:00
parent 46810ddf0e
commit a14fb5b5b4

View File

@ -8,12 +8,12 @@ import net.apunch.blacksmith.util.Settings.Setting;
import net.citizensnpcs.api.CitizensAPI; import net.citizensnpcs.api.CitizensAPI;
import net.citizensnpcs.api.npc.character.CharacterFactory; import net.citizensnpcs.api.npc.character.CharacterFactory;
import net.citizensnpcs.api.util.DataKey; import net.citizensnpcs.api.util.DataKey;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.Economy;
import org.bukkit.enchantments.Enchantment; import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.RegisteredServiceProvider; import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
@ -40,14 +40,9 @@ public class BlacksmithPlugin extends JavaPlugin {
economy = economyProvider.getProvider(); economy = economyProvider.getProvider();
else { else {
// Disable if no economy plugin was found // Disable if no economy plugin was found
final Plugin plugin = this; getServer().getLogger().log(Level.SEVERE, "Failed to load an economy plugin. Disabling...");
getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { getServer().getPluginManager().disablePlugin(this);
return;
public void run() {
getServer().getLogger().log(Level.SEVERE, "Failed to load an economy plugin. Disabling...");
getServer().getPluginManager().disablePlugin(plugin);
}
});
} }
CitizensAPI.getCharacterManager().registerCharacter( CitizensAPI.getCharacterManager().registerCharacter(