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
- 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

View File

@ -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);

View File

@ -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)
{

View File

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