diff --git a/com/gamingmesh/jobs/HookEconomyTask.java b/com/gamingmesh/jobs/HookEconomyTask.java index 3bd1be85..f3065468 100644 --- a/com/gamingmesh/jobs/HookEconomyTask.java +++ b/com/gamingmesh/jobs/HookEconomyTask.java @@ -26,7 +26,7 @@ import org.bukkit.plugin.RegisteredServiceProvider; import com.gamingmesh.jobs.economy.BlackholeEconomy; import com.gamingmesh.jobs.economy.VaultEconomy; -import com.gamingmesh.jobs.economy.IConomy6Adapter; +import com.gamingmesh.jobs.economy.IConomyAdapter; public class HookEconomyTask implements Runnable { private Jobs plugin; @@ -79,7 +79,7 @@ public class HookEconomyTask implements Runnable { return false; try { - Jobs.setEconomy(this.plugin, new IConomy6Adapter((com.iCo6.iConomy) p)); + Jobs.setEconomy(this.plugin, new IConomyAdapter((com.iCo6.iConomy) p)); } catch (Exception e) { Jobs.consoleMsg("&e[" + this.plugin.getDescription().getName() + "] UNKNOWN iConomy version."); return false; diff --git a/com/gamingmesh/jobs/commands/JobsCommands.java b/com/gamingmesh/jobs/commands/JobsCommands.java index d2de6376..95ad6a81 100644 --- a/com/gamingmesh/jobs/commands/JobsCommands.java +++ b/com/gamingmesh/jobs/commands/JobsCommands.java @@ -375,13 +375,13 @@ public class JobsCommands implements CommandExecutor { } } - if (job.getBoost().get(BoostType.EXP) != 1.0) + if (job.getBoost().get(BoostType.EXP) != 0D) message.append(ChatColor.GOLD + Jobs.getLanguage().getMessage("command.expboost.output.infostats", "%boost%", job.getBoost().get(BoostType.EXP)) + "\n"); - if (job.getBoost().get(BoostType.MONEY) != 1.0) + if (job.getBoost().get(BoostType.MONEY) != 0D) message.append(ChatColor.GOLD + Jobs.getLanguage().getMessage("command.moneyboost.output.infostats", "%boost%", job.getBoost().get(BoostType.MONEY)) + "\n"); - if (job.getBoost().get(BoostType.POINTS) != 1.0) + if (job.getBoost().get(BoostType.POINTS) != 0D) message.append(ChatColor.GOLD + Jobs.getLanguage().getMessage("command.pointboost.output.infostats", "%boost%", job.getBoost().get(BoostType.POINTS)) + "\n"); if (Jobs.getGCManager().useDynamicPayment) diff --git a/com/gamingmesh/jobs/container/JobInfo.java b/com/gamingmesh/jobs/container/JobInfo.java index 18828ae6..2c27c45c 100644 --- a/com/gamingmesh/jobs/container/JobInfo.java +++ b/com/gamingmesh/jobs/container/JobInfo.java @@ -28,8 +28,8 @@ public class JobInfo { private String name; private double baseIncome, baseXp, basePoints; private Parser moneyEquation, xpEquation, pointsEquation; - private int fromLevel; - private int untilLevel; + private int fromLevel = 0; + private int untilLevel = Integer.MAX_VALUE; public JobInfo(ActionType actionType, int id, String meta, String name, double baseIncome, Parser moneyEquation, double baseXp, Parser xpEquation, Parser pointsEquation, double basePoints, int fromLevel, int untilLevel) { diff --git a/com/gamingmesh/jobs/container/RestrictedArea.java b/com/gamingmesh/jobs/container/RestrictedArea.java index 1e1ae3f2..0009da9f 100644 --- a/com/gamingmesh/jobs/container/RestrictedArea.java +++ b/com/gamingmesh/jobs/container/RestrictedArea.java @@ -56,6 +56,8 @@ public class RestrictedArea { * @return false - the location is outside the restricted area */ public boolean inRestrictedArea(Player player) { + if (player == null) + return false; if (isBetween(player.getLocation().getX(), this.location1.getX(), this.location2.getX()) && isBetween(player.getLocation().getY(), this.location1.getY(), this.location2.getY()) && isBetween(player.getLocation().getZ(), this.location1.getZ(), this.location2.getZ()) && diff --git a/com/gamingmesh/jobs/economy/.gitignore b/com/gamingmesh/jobs/economy/.gitignore index 978564c7..e462dc0d 100644 --- a/com/gamingmesh/jobs/economy/.gitignore +++ b/com/gamingmesh/jobs/economy/.gitignore @@ -7,3 +7,4 @@ /PointsData.class /IConomy6Adapter.class /IConomy7Adapter.class +/IConomyAdapter.class diff --git a/com/gamingmesh/jobs/economy/IConomy6Adapter.java b/com/gamingmesh/jobs/economy/IConomyAdapter.java similarity index 94% rename from com/gamingmesh/jobs/economy/IConomy6Adapter.java rename to com/gamingmesh/jobs/economy/IConomyAdapter.java index 60db4da7..42cde663 100644 --- a/com/gamingmesh/jobs/economy/IConomy6Adapter.java +++ b/com/gamingmesh/jobs/economy/IConomyAdapter.java @@ -5,11 +5,11 @@ import org.bukkit.OfflinePlayer; import com.iCo6.iConomy; import com.iCo6.system.Accounts; -public class IConomy6Adapter implements Economy { +public class IConomyAdapter implements Economy { iConomy icon; - public IConomy6Adapter(iConomy iconomy) { + public IConomyAdapter(iConomy iconomy) { icon = iconomy; } diff --git a/com/gamingmesh/jobs/listeners/McMMOlistener.java b/com/gamingmesh/jobs/listeners/McMMOlistener.java index cb872ff1..1c13cdc0 100644 --- a/com/gamingmesh/jobs/listeners/McMMOlistener.java +++ b/com/gamingmesh/jobs/listeners/McMMOlistener.java @@ -81,6 +81,9 @@ public class McMMOlistener implements Listener { public double getMultiplier(Player player) { + if (player == null) + return 0D; + HashMap InfoMap = map.get(player.getName()); if (InfoMap == null) { return 0D;