diff --git a/Changelog.txt b/Changelog.txt index 9cc717387..891089c5c 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -10,6 +10,7 @@ Version 1.3.00-dev - Added Fast Food Service subskill to Taming - Re-added mcMMO reporting damage events - Fixed /mcability not respecting permissions + - Changed Taming to also gain XP from shearing - Changed Swords Bleeding effect to never kill - Changed Bleeding to never go beyond 10 ticks - Changed to use Bukkit's built-in ignoreCancelledEvents system diff --git a/src/main/java/com/gmail/nossr50/config/LoadProperties.java b/src/main/java/com/gmail/nossr50/config/LoadProperties.java index 67f65facd..83e407557 100644 --- a/src/main/java/com/gmail/nossr50/config/LoadProperties.java +++ b/src/main/java/com/gmail/nossr50/config/LoadProperties.java @@ -57,7 +57,7 @@ public class LoadProperties { MySQLserverName, MySQLdbName, MySQLdbPass, nWood, nStone, nIron, nGold, nDiamond, locale, nString, nLeather; - public static int mfishing, xpbar_x, xpbar_y, xpicon_x, xpicon_y, + public static int mshearing, mfishing, xpbar_x, xpbar_y, xpicon_x, xpicon_y, chimaeraId, msandstone, mbase, mpine, mbirch, mspruce, mmelon, mcactus, mmushroom, mflower, msugar, mpumpkin, mwheat, mgold, mdiamond, miron, mredstone, mlapis, mobsidian, mnetherrack, @@ -264,6 +264,8 @@ public class LoadProperties { msandstone = readInteger("Experience.Mining.Sandstone", 30); mendstone = readInteger("Experience.Mining.End_Stone", 150); mmossstone = readInteger("Experience.Mining.Moss_Stone", 30); + + mshearing = readInteger("Experience.Taming.Shearing", 250); mfishing = readInteger("Experience.Fishing.Base", 800); diff --git a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java index 3aac8ea9b..3860588d6 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java @@ -44,6 +44,7 @@ import org.bukkit.event.player.PlayerLoginEvent; import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerRespawnEvent; +import org.bukkit.event.player.PlayerShearEntityEvent; import org.bukkit.inventory.ItemStack; import com.gmail.nossr50.Combat; @@ -77,6 +78,18 @@ public class mcPlayerListener implements Listener plugin = instance; } + + @EventHandler(ignoreCancelled = true) + public void onSheepUndressing(PlayerShearEntityEvent event) + { + Player player = event.getPlayer(); + if(mcPermissions.getInstance().taming(player)) + { + PlayerProfile PP = Users.getProfile(player); + PP.addXP(SkillType.TAMING, 100, player); + } + } + @EventHandler public void onPlayerFish(PlayerFishEvent event) { diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index fbcb09cab..0e9fc4cd1 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -206,6 +206,8 @@ Experience: Iron: 250 End_Stone: 150 Moss_Stone: 30 + Taming: + Shearing: 250 # # Settings for Fishing