@@ -0,0 +1,1794 @@
+package colt.customgapples;%0A%0Aimport java.util.List;%0Aimport org.bukkit.Bukkit;%0Aimport org.bukkit.Material;%0Aimport org.bukkit.entity.Player;%0Aimport org.bukkit.event.EventHandler;%0Aimport org.bukkit.event.Listener;%0Aimport org.bukkit.event.player.PlayerItemConsumeEvent;%0Aimport org.bukkit.inventory.ItemStack;%0Aimport org.bukkit.plugin.java.JavaPlugin;%0Aimport org.bukkit.potion.PotionEffect;%0Aimport org.bukkit.potion.PotionEffectType;%0A%0Apublic class CustomGapples extends JavaPlugin implements Listener %7B%0A%0A%09List%3CString%3E effects = getConfig().getStringList(%22effects%22);%0A%0A%09public void onEnable() %7B%0A%09%09Bukkit.getServer().getPluginManager().registerEvents(this, this);%0A%09%09saveDefaultConfig();%0A%09%7D%0A%0A%09@EventHandler%0A%09public void itemConsumeEvent(PlayerItemConsumeEvent event) %7B%0A%09%09Player player = event.getPlayer();%0A%09%09if ((event.getItem().getType() == Material.GOLDEN_APPLE) %0A%09%09%09%09&& (event.getItem().getDurability() == 1)%0A%09%09%09%09&& (player.hasPermission(%22customgapple.use%22))) %7B%0A%09%09%09ItemStack itemInHand = player.getInventory().getItemInMainHand();%0A%09%09%09if (event.getItem().getAmount() == 1) %7B%0A%09%09%09%09player.getInventory().remove(event.getItem());%0A%09%09%09%7D else %7B%0A%09%09%09%09itemInHand.setAmount(itemInHand.getAmount() - 1);%0A%09%09%09%7D%0A%09%09%09for (String potion : this.effects) %7B%0A%09%09%09%09String%5B%5D inf = potion.split(%22:%22);%0A%09%09%09%09if ((inf.length == 3) && (PotionEffectType.getByName(inf%5B0%5D.toUpperCase()) != null)) %7B%0A%09%09%09%09%09PotionEffectType pot = PotionEffectType.getByName(inf%5B0%5D.toUpperCase());%0A%09%09%09%09%09int dur = Math.min(Integer.parseInt(inf%5B1%5D), Integer.MAX_VALUE);%0A%09%09%09%09%09int amp = Math.min(Integer.parseInt(inf%5B2%5D), 255);%0A%09%09%09%09%09PotionEffect effect = new PotionEffect(pot, dur, amp);%0A%09%09%09%09%09if (player.hasPotionEffect(pot)) %7B%0A%09%09%09%09%09%09player.removePotionEffect(pot);%0A%09%09%09%09%09%7D%0A%09%09%09%09%09player.addPotionEffect(effect);%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%09event.setCancelled(true);%0A%09%09%7D%0A%09%7D%0A%7D%0A

Create CustomGapples.java