diff --git a/mcMMO/Changelog.txt b/mcMMO/Changelog.txt index 58b31218f..0a8b10173 100644 --- a/mcMMO/Changelog.txt +++ b/mcMMO/Changelog.txt @@ -1,5 +1,11 @@ Changelog: #Versions without changelogs probably had very small misc fixes, like tweaks to the source code +Version 1.1.05 +Maps dropped from excavation are created correctly, and represent the area they are found in +Fixed an exploit with clay and excavation +Fixed a NPE with locking xp bars +Fixed the !AdeptDiamond! localization error when repairing diamond with a skill below 50 + Version 1.1.04 Removed URL settings for XPBAR/XPICON/HPBAR Added single URL setting for mcMMO diff --git a/mcMMO/com/gmail/nossr50/m.java b/mcMMO/com/gmail/nossr50/m.java index ad3faea94..2e1bb27bb 100644 --- a/mcMMO/com/gmail/nossr50/m.java +++ b/mcMMO/com/gmail/nossr50/m.java @@ -74,12 +74,9 @@ public class m public static boolean shouldBeWatched(Block block) { int id = block.getTypeId(); - if(id == 16 || id == 73 || id == 49 || id == 81 || id == 83 || id == 86 || id == 91 || id == 1 || id == 17 || id == 42 || id == 87 || id == 89 || id == 2 || id == 3 || id == 12 || id == 13 || id == 21 || id == 15 || id == 14 || id == 56 || id == 38 || id == 37 || id == 39 || id == 40 || id == 24){ - return true; - } else { - return false; - } + return id == 82 || id == 16 || id == 73 || id == 49 || id == 81 || id == 83 || id == 86 || id == 91 || id == 1 || id == 17 || id == 42 || id == 87 || id == 89 || id == 2 || id == 3 || id == 12 || id == 13 || id == 21 || id == 15 || id == 14 || id == 56 || id == 38 || id == 37 || id == 39 || id == 40 || id == 24; } + public static int getPowerLevel(Player player) { PlayerProfile PP = Users.getProfile(player); diff --git a/mcMMO/com/gmail/nossr50/skills/Excavation.java b/mcMMO/com/gmail/nossr50/skills/Excavation.java index cc4f3b031..e5109bbfc 100644 --- a/mcMMO/com/gmail/nossr50/skills/Excavation.java +++ b/mcMMO/com/gmail/nossr50/skills/Excavation.java @@ -1,12 +1,14 @@ package com.gmail.nossr50.skills; import java.util.ArrayList; - +import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; +import org.bukkit.map.MapView; + import com.gmail.nossr50.locale.mcLocale; import com.gmail.nossr50.Users; import com.gmail.nossr50.m; @@ -147,8 +149,10 @@ public class Excavation { if(Math.random() * 50 > 49) { + MapView mv = Bukkit.getServer().createMap(loc.getWorld()); + xp+= LoadProperties.mmap * LoadProperties.xpGainMultiplier; - is.add(new ItemStack(Material.MAP, 1, (byte)0, (byte)0)); + is.add(new ItemStack(Material.MAP, 1, (byte)0, (byte) mv.getId())); } } if(LoadProperties.bucket && PP.getSkillLevel(SkillType.EXCAVATION) >= 500) diff --git a/mcMMO/com/gmail/nossr50/skills/Repair.java b/mcMMO/com/gmail/nossr50/skills/Repair.java index 2ac4cd5ac..05503a24e 100644 --- a/mcMMO/com/gmail/nossr50/skills/Repair.java +++ b/mcMMO/com/gmail/nossr50/skills/Repair.java @@ -443,7 +443,7 @@ public class Repair { PlayerProfile PP = Users.getProfile(player); if ((isDiamondTools(is) || isDiamondArmor(is)) && PP.getSkillLevel(SkillType.REPAIR) < LoadProperties.repairdiamondlevel) { - player.sendMessage(mcLocale.getString("AdeptDiamond")); + player.sendMessage(mcLocale.getString("Skills.AdeptDiamond")); } else if (isDiamondTools(is) && !hasItem(player, rDiamond) || isIronTools(is) && !hasItem(player, rIron) || isGoldTools(is) && !hasItem(player, rGold)){ if(isDiamondTools(is) && !hasItem(player, rDiamond)) player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.BLUE+ nDiamond); diff --git a/mcMMO/com/gmail/nossr50/spout/SpoutStuff.java b/mcMMO/com/gmail/nossr50/spout/SpoutStuff.java index 0221edf6c..f99fffb2a 100644 --- a/mcMMO/com/gmail/nossr50/spout/SpoutStuff.java +++ b/mcMMO/com/gmail/nossr50/spout/SpoutStuff.java @@ -534,15 +534,25 @@ public class SpoutStuff SpoutManager.getPlayer(player).getMainScreen().setDirty(true); } else if (PP.getXpBarLocked()) { - int num = getXpInc(PP.getSkillXpLevel(PP.getSkillLock()), PP.getXpToLevel(PP.getSkillLock())); - - xpbars.get(player).setUrl(getUrlBar(num)).setDirty(true); - xpicons.get(player).setUrl(getUrlIcon(PP.getSkillLock())).setDirty(true); - - SpoutManager.getPlayer(player).getMainScreen().setDirty(true); + if(xpbars.get(player) != null && xpicons.get(player) != null) + { + updateXpBarUrl(PP, player); + } else + { + initializeXpBarDisplay(SpoutManager.getPlayer(player)); + updateXpBarUrl(PP, player); + } } } - + public static void updateXpBarUrl(PlayerProfile PP, Player player) + { + int num = getXpInc(PP.getSkillXpLevel(PP.getSkillLock()), PP.getXpToLevel(PP.getSkillLock())); + + xpbars.get(player).setUrl(getUrlBar(num)).setDirty(true); + xpicons.get(player).setUrl(getUrlIcon(PP.getSkillLock())).setDirty(true); + + SpoutManager.getPlayer(player).getMainScreen().setDirty(true); + } public static void updateXpBarFill(Player player) { PlayerProfile PP = Users.getProfile(player); diff --git a/mcMMO/plugin.yml b/mcMMO/plugin.yml index 317cf5c5b..eb69fca0b 100644 --- a/mcMMO/plugin.yml +++ b/mcMMO/plugin.yml @@ -1,6 +1,6 @@ name: mcMMO main: com.gmail.nossr50.mcMMO -version: 1.1.04 +version: 1.1.05 softdepend: [Spout] commands: xplock: