From 9863b4719fcbf18e54f8d74c4a50c57f90882863 Mon Sep 17 00:00:00 2001 From: Zrips Date: Thu, 1 Dec 2016 17:00:20 +0200 Subject: [PATCH] Default permission boost is 0D, not 1D --- com/gamingmesh/jobs/config/GeneralConfigManager.java | 8 +++++--- com/gamingmesh/jobs/container/JobsPlayer.java | 5 ++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/com/gamingmesh/jobs/config/GeneralConfigManager.java b/com/gamingmesh/jobs/config/GeneralConfigManager.java index be7b3f13..15ee934e 100644 --- a/com/gamingmesh/jobs/config/GeneralConfigManager.java +++ b/com/gamingmesh/jobs/config/GeneralConfigManager.java @@ -38,6 +38,7 @@ import com.gamingmesh.jobs.container.Schedule; import com.gamingmesh.jobs.dao.JobsDAOMySQL; import com.gamingmesh.jobs.dao.JobsDAOSQLite; import com.gamingmesh.jobs.stuff.ChatColor; +import com.gamingmesh.jobs.stuff.Debug; public class GeneralConfigManager { private Jobs plugin; @@ -741,9 +742,10 @@ public class GeneralConfigManager { "Use: jobs.boost.[jobname].money or jobs.boost.[jobname].exp or jobs.boost.[jobname].points or jobs.boost.[jobname].all for all of them with specific jobs name.", "Use: jobs.boost.all.money or jobs.boost.all.exp or jobs.boost.all.points or jobs.boost.all.all to get boost for all jobs", "1.25 means that player will get 25% more than others, you can set less than 1 to get less from anothers"); - Boost.put(BoostType.EXP, c.get("boost.exp", 1D) - 1D); - Boost.put(BoostType.MONEY, c.get("boost.money", 1D) - 1D); - Boost.put(BoostType.POINTS, c.get("boost.points", 1D) - 1D); + + Boost.put(BoostType.EXP, (int) ((c.get("boost.exp", 1D) * 100)-100) / 100D); + Boost.put(BoostType.MONEY, (int) ((c.get("boost.money", 1D) * 100)-100) / 100D); + Boost.put(BoostType.POINTS, (int) ((c.get("boost.points", 1D) * 100)-100) / 100D); c.getW().addComment("old-job", "Old job save", "Players can leave job and return later with some level loss during that", "You can fix players level if hes job level is at max level"); diff --git a/com/gamingmesh/jobs/container/JobsPlayer.java b/com/gamingmesh/jobs/container/JobsPlayer.java index e7a35c8e..093a1cd5 100644 --- a/com/gamingmesh/jobs/container/JobsPlayer.java +++ b/com/gamingmesh/jobs/container/JobsPlayer.java @@ -154,7 +154,7 @@ public class JobsPlayer { public double getBoost(String JobName, BoostType type, boolean force) { - double Boost = 1.0; + double Boost = 0D; if (this.OffPlayer == null) return Boost; @@ -195,8 +195,7 @@ public class JobsPlayer { } private Double getPlayerBoost(String JobName, BoostType type) { - double Boost = 1.0; - + double Boost = 0D; if (Perm.hasPermission(player, "jobs.boost." + JobName + "." + type.getName().toLowerCase()) || Perm.hasPermission(player, "jobs.boost." + JobName + ".all") || Perm.hasPermission(player, "jobs.boost.all.all") ||