diff --git a/Mobcash/config.yml b/Mobcash/config.yml index ca0e24d..0e09453 100644 --- a/Mobcash/config.yml +++ b/Mobcash/config.yml @@ -37,14 +37,17 @@ Mobcash: Mushroom Cow: 3 Ocelot: 3 Pig: 3 + Rabbit: 3 Sheep: 3 Squid: 3 Villager: 3 Agressive Mobs: Blaze: 10 Cave Spider: 10 + Chicken Jockey: 10 Creeper: 10 Enderman: 10 + Endermite: 10 Ghast: 10 Giant: 10 Iron Golem: 10 @@ -60,4 +63,5 @@ Mobcash: Zombie: 10 Bosses: Ender Dragon: 40 - Wither: 40 \ No newline at end of file + Guardian: 40 + Wither: 40 diff --git a/Mobcash/plugin.yml b/Mobcash/plugin.yml index b9c7ba2..0856fc3 100644 --- a/Mobcash/plugin.yml +++ b/Mobcash/plugin.yml @@ -1,7 +1,7 @@ name: Mobcash author: Feazes main: me.Feazes.MobCash.Mobcash -version: 2.3 +version: 2.5 description: MobCash gives players money when they kill a mob depend: [Vault] @@ -9,4 +9,4 @@ commands: mobcash: description: shows information about the plugin permission: mobcash.admin - permission-message: You dont have the permission for this command \ No newline at end of file + permission-message: You don''t have the permission for this command. diff --git a/Mobcash/src/me/Feazes/plugins/mobcash/EntityName.java b/Mobcash/src/me/Feazes/plugins/mobcash/EntityName.java index e5baf61..083bb70 100644 --- a/Mobcash/src/me/Feazes/plugins/mobcash/EntityName.java +++ b/Mobcash/src/me/Feazes/plugins/mobcash/EntityName.java @@ -1,4 +1,4 @@ -package me.Feazes.plugins.mobcash; +package me.Feazes.mobcash; import org.bukkit.entity.Entity; @@ -14,8 +14,10 @@ public static String readEntity(Entity e) { case CREEPER:return"Creeper"; case ENDERMAN:return"Enderman"; case ENDER_DRAGON:return"Ender Dragon"; + case ENDERMITE:return"Endermite"; case GHAST:return"Ghast"; case GIANT:return"Giant"; + case GUARDIAN:return"Guardian"; case HORSE:return"Horse"; case IRON_GOLEM:return"Iron Golem"; case MAGMA_CUBE:return"Magma Cube"; @@ -23,6 +25,7 @@ public static String readEntity(Entity e) { case OCELOT:return"Ocelot"; case PIG:return"Pig"; case PIG_ZOMBIE:return"Pig Zombie"; + case RABBIT:return"Rabbit"; case SHEEP:return"Sheep"; case SILVERFISH:return"Silver Fish"; case SKELETON:return"Skeleton"; diff --git a/Mobcash/src/me/Feazes/plugins/mobcash/Mobcash.java b/Mobcash/src/me/Feazes/plugins/mobcash/Mobcash.java index 6de2e4c..2bd1ddb 100644 --- a/Mobcash/src/me/Feazes/plugins/mobcash/Mobcash.java +++ b/Mobcash/src/me/Feazes/plugins/mobcash/Mobcash.java @@ -1,17 +1,17 @@ -package me.Feazes.plugins.mobcash; +package me.Feazes.mobcash; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.UUID; -import me.Feazes.plugins.mobcash.Metrics.Metrics; -import me.Feazes.plugins.mobcash.Reason.Breeding; -import me.Feazes.plugins.mobcash.Reason.Egg; -import me.Feazes.plugins.mobcash.Reason.Natural; -import me.Feazes.plugins.mobcash.Reason.Slime_Split; -import me.Feazes.plugins.mobcash.Reason.Spawner; -import me.Feazes.plugins.mobcash.World.WorldListener; +import me.Feazes.mobcash.Metrics.Metrics; +import me.Feazes.mobcash.Reason.Breeding; +import me.Feazes.mobcash.Reason.Egg; +import me.Feazes.mobcash.Reason.Natural; +import me.Feazes.mobcash.Reason.Slime_Split; +import me.Feazes.mobcash.Reason.Spawner; +import me.Feazes.mobcash.World.WorldListener; import net.milkbowl.vault.economy.Economy; import org.bukkit.ChatColor; @@ -22,37 +22,66 @@ import org.bukkit.plugin.RegisteredServiceProvider; import org.bukkit.plugin.java.JavaPlugin; -public class Mobcash extends JavaPlugin { - - public Economy economy = null; - - public List spawnedMobs = new ArrayList(); - - //Listeners +public class Mobcash extends JavaPlugin { + + // Listeners public final Breeding breeding = new Breeding(this); + + public Economy economy = null; + public final Egg egg = new Egg(this); + public final MobKill mobkill = new MobKill(this); public final Natural natural = new Natural(this); public final Slime_Split slimeSplit = new Slime_Split(this); + public List spawnedMobs = new ArrayList(); public final Spawner spawner = new Spawner(this); public final WorldListener world = new WorldListener(this); - public final MobKill mobkill = new MobKill(this); - + + @Override + public boolean onCommand(CommandSender sender, Command command, + String label, String[] args) { + Player p = (Player) sender; + if (label.equalsIgnoreCase("mobcash")) { + if (p.hasPermission("mobcash.admin")) { + if (args.length == 0) { + p.sendMessage(ChatColor.GOLD + "--------[ Mobcash ]--------"); + p.sendMessage(ChatColor.GRAY + "v2.5 created by Feazes"); + p.sendMessage(ChatColor.GRAY + "Updated by Saiee_"); + p.sendMessage(ChatColor.GOLD + "--------[ Commands ]--------"); + p.sendMessage(ChatColor.GRAY + "- /mobcash reload"); + } else if (args.length == 1) { + if (args[0].equalsIgnoreCase("reload")) { + reloadConfig(); + p.sendMessage(ChatColor.GOLD + "[Mobcash] " + + ChatColor.GRAY + "Config Reloded!"); + } + } + } + } + return false; + } + + @Override + public void onDisable() { + this.getLogger().info("[Mobcash] has been disabled!"); + } + @Override public void onEnable() { - + try { - Metrics metrics = new Metrics(this); - metrics.start(); - this.getLogger().info("Now tracking stats!"); - } catch (IOException e) { - // Failed to submit the stats :-( - } - + Metrics metrics = new Metrics(this); + metrics.start(); + this.getLogger().info("Now tracking stats!"); + } catch (IOException e) { + // Failed to submit the stats :-( + } + this.getLogger().info("[Mobcash] has been enabled!"); this.getConfig().options().copyDefaults(true); saveConfig(); setupEconomy(); - + // Register events PluginManager pm = this.getServer().getPluginManager(); pm.registerEvents(breeding, this); @@ -63,42 +92,17 @@ public void onEnable() { pm.registerEvents(world, this); pm.registerEvents(mobkill, this); } - - @Override - public void onDisable() { - this.getLogger().info("[Mobcash] has been disabled!"); - } - - private boolean setupEconomy() - { - - RegisteredServiceProvider economyProvider = getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class); - if (economyProvider != null) { - economy = economyProvider.getProvider(); - } - - return (economy != null); - } - - @Override - public boolean onCommand(CommandSender sender, Command command, - String label, String[] args) { - Player p = (Player) sender; - if (label.equalsIgnoreCase("mobcash")) { - if (p.hasPermission("mobcash.admin")) { - if (args.length == 0) { - p.sendMessage(ChatColor.GOLD + "--------[Mobcash]--------"); - p.sendMessage(ChatColor.GRAY+"v2.0 created by Feazes"); - p.sendMessage(ChatColor.GRAY+"- /mobcash reload"); - } else if (args.length == 1) { - if (args[0].equalsIgnoreCase("reload")) { - reloadConfig(); - p.sendMessage(ChatColor.GOLD + "[Mobcash]"+ ChatColor.GRAY+" reloaded config!"); - } - } - } + + private boolean setupEconomy() { + + RegisteredServiceProvider economyProvider = getServer() + .getServicesManager().getRegistration( + net.milkbowl.vault.economy.Economy.class); + if (economyProvider != null) { + economy = economyProvider.getProvider(); } - return false; + + return (economy != null); } }