From e24a527713586852404dc6b2965a2d423a7ea4ff Mon Sep 17 00:00:00 2001 From: Zrips Date: Mon, 21 Dec 2015 15:11:57 +0200 Subject: [PATCH] GigaDrill multiplayer --- com/gamingmesh/jobs/Gui/GuiTools.java | 6 ++++-- com/gamingmesh/jobs/config/JobsConfiguration.java | 7 +++++-- com/gamingmesh/jobs/listeners/JobsPaymentListener.java | 2 ++ plugin.yml | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/com/gamingmesh/jobs/Gui/GuiTools.java b/com/gamingmesh/jobs/Gui/GuiTools.java index ac96d562..e48cd307 100644 --- a/com/gamingmesh/jobs/Gui/GuiTools.java +++ b/com/gamingmesh/jobs/Gui/GuiTools.java @@ -166,7 +166,8 @@ public class GuiTools { continue; ArrayList Lore = new ArrayList(); - Lore.add(ChatColor.translateAlternateColorCodes('&', "&e" + actionType.getName())); + Lore.add(ChatColor.translateAlternateColorCodes('&', "&e" + Language.getMessage("command.info.output." + actionType.getName().toLowerCase() + + ".info"))); int y = 1; for (int z = 0; z < info.size(); z++) { String itemName = TranslateName.Translate(info.get(z).getName(), info.get(z)); @@ -197,7 +198,8 @@ public class GuiTools { GuiItem = job.getGuiItem(); Lore = new ArrayList(); - Lore.add(ChatColor.translateAlternateColorCodes('&', "&e" + actionType.getName())); + Lore.add(ChatColor.translateAlternateColorCodes('&', "&e" + Language.getMessage("command.info.output." + actionType.getName().toLowerCase() + + ".info"))); i++; } y++; diff --git a/com/gamingmesh/jobs/config/JobsConfiguration.java b/com/gamingmesh/jobs/config/JobsConfiguration.java index 176222f1..51a76ce3 100644 --- a/com/gamingmesh/jobs/config/JobsConfiguration.java +++ b/com/gamingmesh/jobs/config/JobsConfiguration.java @@ -78,7 +78,7 @@ public class JobsConfiguration { public int EconomyLimitTimeLimit, EconomyExpTimeLimit; public int EconomyLimitAnnouncmentDelay, EconomyLimitAnnouncmentExpDelay, globalblocktimer, CowMilkingTimer, CoreProtectInterval, BlockPlaceInterval, InfoUpdateInterval; - public Double payNearSpawnerMultiplier, VIPpayNearSpawnerMultiplier, TreeFellerMultiplier, PetPay, VipPetPay; + public Double payNearSpawnerMultiplier, VIPpayNearSpawnerMultiplier, TreeFellerMultiplier, gigaDrillMultiplier, PetPay, VipPetPay; public String localeString; public boolean useBlockProtection; public boolean useBlockTimer; @@ -590,6 +590,9 @@ public class JobsConfiguration { writer.addComment("ExploitProtections.McMMO.TreeFellerMultiplier", "Players will get part of money from cutting trees with treefeller ability enabled.", "0.2 means 20% of original price"); TreeFellerMultiplier = getDouble("ExploitProtections.McMMO.TreeFellerMultiplier", 0.2, config, writer); + writer.addComment("ExploitProtections.McMMO.gigaDrillMultiplier", "Players will get part of money from braking blocks with gigaDrill ability enabled.", + "0.2 means 20% of original price"); + gigaDrillMultiplier = getDouble("ExploitProtections.McMMO.gigaDrillMultiplier", 0.2, config, writer); writer.addComment("ExploitProtections.Spawner.PreventSlimeSplit", "Prevent slime spliting when they are from spawner", "Protects agains exploiting as new splited slimes is treated as naturaly spawned and not from spawner"); @@ -1308,7 +1311,7 @@ public class JobsConfiguration { GetConfigString("command.leave.help.info", "Leave the selected job.", writer, conf, true); GetConfigString("command.leave.help.args", "[jobname]", writer, conf, true); GetConfigString("command.leave.success", "You have left the job %jobname%.", writer, conf, true); - + GetConfigString("command.fixnames.help.info", "Tries to fix NULL player names in data base.", writer, conf, true); GetConfigString("command.fixnames.help.args", "", writer, conf, true); diff --git a/com/gamingmesh/jobs/listeners/JobsPaymentListener.java b/com/gamingmesh/jobs/listeners/JobsPaymentListener.java index 15606066..cb6ca005 100644 --- a/com/gamingmesh/jobs/listeners/JobsPaymentListener.java +++ b/com/gamingmesh/jobs/listeners/JobsPaymentListener.java @@ -312,6 +312,8 @@ public class JobsPaymentListener implements Listener { if (McMMOlistener.mcMMOPresent) if (AbilityAPI.treeFellerEnabled(player)) multiplier -= (1 - ConfigManager.getJobsConfiguration().TreeFellerMultiplier); + else if (AbilityAPI.gigaDrillBreakerEnabled(player)) + multiplier -= (1 - ConfigManager.getJobsConfiguration().gigaDrillMultiplier); } catch (IndexOutOfBoundsException e) { } diff --git a/plugin.yml b/plugin.yml index eef90695..548d43ef 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,7 +1,7 @@ name: Jobs description: Jobs Plugin for the BukkitAPI main: com.gamingmesh.jobs.JobsPlugin -version: 2.54.3 +version: 2.54.5 author: phrstbrn softdepend: [Vault, CoreProtect, MythicMobs, McMMO] commands: