diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 8e4055a..107056a 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,12 +1,12 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/lib/CitizensAPI.jar b/lib/CitizensAPI.jar deleted file mode 100644 index 62b7197..0000000 Binary files a/lib/CitizensAPI.jar and /dev/null differ diff --git a/lib/Vault.jar b/lib/Vault.jar deleted file mode 100644 index 66e0d1c..0000000 Binary files a/lib/Vault.jar and /dev/null differ diff --git a/lib/bukkit-1.1-R5-SNAPSHOT.jar b/lib/bukkit-1.1-R5-SNAPSHOT.jar deleted file mode 100644 index 3cbadee..0000000 Binary files a/lib/bukkit-1.1-R5-SNAPSHOT.jar and /dev/null differ diff --git a/src/main/java/net/apunch/blacksmith/Blacksmith.java b/src/main/java/net/apunch/blacksmith/Blacksmith.java index b12300d..de91c8d 100644 --- a/src/main/java/net/apunch/blacksmith/Blacksmith.java +++ b/src/main/java/net/apunch/blacksmith/Blacksmith.java @@ -183,7 +183,6 @@ public class Blacksmith extends Character { reforge = player.getItemInHand(); } - @Override public void run() { npc.chat(player, reforgeItemInHand() ? successMsg : failMsg); if (npc.getBukkitEntity() instanceof Player) diff --git a/src/main/java/net/apunch/blacksmith/BlacksmithPlugin.java b/src/main/java/net/apunch/blacksmith/BlacksmithPlugin.java index 6a25ad1..e36a8e3 100644 --- a/src/main/java/net/apunch/blacksmith/BlacksmithPlugin.java +++ b/src/main/java/net/apunch/blacksmith/BlacksmithPlugin.java @@ -13,6 +13,7 @@ import net.milkbowl.vault.economy.Economy; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; +import org.bukkit.plugin.Plugin; import org.bukkit.plugin.RegisteredServiceProvider; import org.bukkit.plugin.java.JavaPlugin; @@ -37,6 +38,17 @@ public class BlacksmithPlugin extends JavaPlugin { Economy.class); if (economyProvider != null) economy = economyProvider.getProvider(); + else { + // Disable if no economy plugin was found + final Plugin plugin = this; + getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { + + public void run() { + getServer().getLogger().log(Level.SEVERE, "Failed to load an economy plugin. Disabling..."); + getServer().getPluginManager().disablePlugin(plugin); + } + }); + } CitizensAPI.getCharacterManager().registerCharacter( new CharacterFactory(Blacksmith.class).withName("blacksmith"));