Added Shearing to Taming XP

This commit is contained in:
nossr50 2012-02-20 16:29:03 -08:00
parent f8869c177f
commit c915bb8312
4 changed files with 19 additions and 1 deletions

View File

@ -10,6 +10,7 @@ Version 1.3.00-dev
- Added Fast Food Service subskill to Taming - Added Fast Food Service subskill to Taming
- Re-added mcMMO reporting damage events - Re-added mcMMO reporting damage events
- Fixed /mcability not respecting permissions - Fixed /mcability not respecting permissions
- Changed Taming to also gain XP from shearing
- Changed Swords Bleeding effect to never kill - Changed Swords Bleeding effect to never kill
- Changed Bleeding to never go beyond 10 ticks - Changed Bleeding to never go beyond 10 ticks
- Changed to use Bukkit's built-in ignoreCancelledEvents system - Changed to use Bukkit's built-in ignoreCancelledEvents system

View File

@ -57,7 +57,7 @@ public class LoadProperties {
MySQLserverName, MySQLdbName, MySQLdbPass, nWood, nStone, MySQLserverName, MySQLdbName, MySQLdbPass, nWood, nStone,
nIron, nGold, nDiamond, locale, nString, nLeather; 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, chimaeraId, msandstone, mbase, mpine, mbirch, mspruce, mmelon,
mcactus, mmushroom, mflower, msugar, mpumpkin, mwheat, mgold, mcactus, mmushroom, mflower, msugar, mpumpkin, mwheat, mgold,
mdiamond, miron, mredstone, mlapis, mobsidian, mnetherrack, mdiamond, miron, mredstone, mlapis, mobsidian, mnetherrack,
@ -265,6 +265,8 @@ public class LoadProperties {
mendstone = readInteger("Experience.Mining.End_Stone", 150); mendstone = readInteger("Experience.Mining.End_Stone", 150);
mmossstone = readInteger("Experience.Mining.Moss_Stone", 30); mmossstone = readInteger("Experience.Mining.Moss_Stone", 30);
mshearing = readInteger("Experience.Taming.Shearing", 250);
mfishing = readInteger("Experience.Fishing.Base", 800); mfishing = readInteger("Experience.Fishing.Base", 800);
enableOnlyActivateWhenSneaking = readBoolean("Abilities.Activation.Only_Activate_When_Sneaking", false); enableOnlyActivateWhenSneaking = readBoolean("Abilities.Activation.Only_Activate_When_Sneaking", false);

View File

@ -44,6 +44,7 @@ import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.event.player.PlayerPickupItemEvent;
import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerRespawnEvent; import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.event.player.PlayerShearEntityEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import com.gmail.nossr50.Combat; import com.gmail.nossr50.Combat;
@ -77,6 +78,18 @@ public class mcPlayerListener implements Listener
plugin = instance; 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 @EventHandler
public void onPlayerFish(PlayerFishEvent event) public void onPlayerFish(PlayerFishEvent event)
{ {

View File

@ -206,6 +206,8 @@ Experience:
Iron: 250 Iron: 250
End_Stone: 150 End_Stone: 150
Moss_Stone: 30 Moss_Stone: 30
Taming:
Shearing: 250
# #
# Settings for Fishing # Settings for Fishing