Added XP for Animal Taming

This commit is contained in:
GJ 2012-02-21 01:01:27 -05:00
parent d0d9868b5f
commit c308121c47
13 changed files with 32 additions and 12 deletions

View File

@ -8,6 +8,8 @@ Version 1.3.00-dev
- Added hunger regain bonuses to Herbalism skill
- Added framework for new Blast Mining skill
- Added Fast Food Service subskill to Taming
- Added Wolf Taming XP to Taming
- Added Sheep Shearing XP to Taming
- Re-added mcMMO reporting damage events
- Fixed /mcability not respecting permissions
- Changed Taming to also gain XP from shearing

View File

@ -57,7 +57,7 @@ public class LoadProperties {
MySQLserverName, MySQLdbName, MySQLdbPass, nWood, nStone,
nIron, nGold, nDiamond, locale, nString, nLeather;
public static int mshearing, mfishing, xpbar_x, xpbar_y, xpicon_x, xpicon_y,
public static int mtameWolf, 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,
@ -267,6 +267,7 @@ public class LoadProperties {
mmossstone = readInteger("Experience.Mining.Moss_Stone", 30);
mshearing = readInteger("Experience.Taming.Shearing", 250);
mtameWolf = readInteger("Experience.Taming.Animal_Taming.Wolf", 250);
mfishing = readInteger("Experience.Fishing.Base", 800);

View File

@ -32,6 +32,7 @@ import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.EntityTameEvent;
import org.bukkit.event.entity.ExplosionPrimeEvent;
import org.bukkit.event.entity.FoodLevelChangeEvent;
import org.bukkit.inventory.ItemStack;
@ -39,6 +40,7 @@ import org.bukkit.inventory.ItemStack;
import com.gmail.nossr50.Combat;
import com.gmail.nossr50.Users;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.mcPermissions;
import com.gmail.nossr50.config.LoadProperties;
import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.datatypes.SkillType;
@ -223,8 +225,7 @@ public class mcEntityListener implements Listener
}
}
}
@EventHandler (priority = EventPriority.LOW)
public void onEnitityExplode(EntityExplodeEvent event)
{
@ -334,6 +335,20 @@ public class mcEntityListener implements Listener
}
}
@EventHandler (priority = EventPriority.MONITOR)
public void onEntityTame(EntityTameEvent event)
{
Player player = (Player) event.getOwner();
if(mcPermissions.getInstance().taming(player))
{
PlayerProfile PP = Users.getProfile(player);
if(event.getEntity() instanceof Wolf)
{
PP.addXP(SkillType.TAMING, LoadProperties.mtameWolf, player);
}
}
}
public boolean isBow(ItemStack is){
if (is.getTypeId() == 261){
return true;

View File

@ -208,6 +208,8 @@ Experience:
Moss_Stone: 30
Taming:
Shearing: 250
Animal_Taming:
Wolf: 250
#
# Settings for Fishing

View File

@ -40,7 +40,7 @@ m.AbilityBonusTemplate=[[YELLOW]]{0}: [[GREEN]]{1}
m.Effects=EFFEKTE
m.YourStats=[[DARK_AQUA]]_______ [[YELLOW]]DEINE WERTE [[DARK_AQUA]]_______
m.SkillTaming=Bestienkunde (Taming)
m.XPGainTaming=Shearing or combat w/ your wolves
m.XPGainTaming=Shearing, Animal Taming, or combat w/ your wolves
m.EffectsTaming1_0=[[YELLOW]]Bestienkunde
m.EffectsTaming1_1=[[AQUA]]mit Knochen schlagen inspiziert Woelfe
m.EffectsTaming2_0=[[YELLOW]]Biss

View File

@ -40,7 +40,7 @@ m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
m.Effects=EFFECTS
m.YourStats=YOUR STATS
m.SkillTaming=TAMING
m.XPGainTaming=Shearing or combat w/ your wolves
m.XPGainTaming=Shearing, Animal Taming, or combat w/ your wolves
m.EffectsTaming1_0=Beast Lore
m.EffectsTaming1_1=Bone-whacking inspects wolves
m.EffectsTaming2_0=Gore

View File

@ -40,7 +40,7 @@ m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
m.Effects=EFECTOS
m.YourStats=TUS ESTADISTICAS
m.SkillTaming=DOMADURA
m.XPGainTaming=Shearing or combat w/ your wolves
m.XPGainTaming=Shearing, Animal Taming, or combat w/ your wolves
m.EffectsTaming1_0=Leyenda de bestias
m.EffectsTaming1_1=Golpear con huesos examina a los lobos
m.EffectsTaming2_0=Sangre

View File

@ -40,7 +40,7 @@ m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
m.Effects=EFEKTIT
m.YourStats=TILASTOSI
m.SkillTaming=KESYTTÄMINEN
m.XPGainTaming=Shearing or combat w/ your wolves
m.XPGainTaming=Shearing, Animal Taming, or combat w/ your wolves
m.EffectsTaming1_0=Pedon Tarina
m.EffectsTaming1_1=Luulla lyöminen tutkii susia
m.EffectsTaming2_0=Pisto

View File

@ -40,7 +40,7 @@ m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
m.Effects=EFFETS
m.YourStats=VOS STATS
m.SkillTaming=DRESSAGE
m.XPGainTaming=Shearing or combat w/ your wolves
m.XPGainTaming=Shearing, Animal Taming, or combat w/ your wolves
m.EffectsTaming1_0=Connaissance des bêtes
m.EffectsTaming1_1=Inspecte un loup avec un os
m.EffectsTaming2_0=Morsures

View File

@ -46,7 +46,7 @@ m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
m.Effects=EFFECTEN
m.YourStats=JOUW STATUS
m.SkillTaming=TEMMEN
m.XPGainTaming=Shearing or combat w/ your wolves
m.XPGainTaming=Shearing, Animal Taming, or combat w/ your wolves
m.EffectsTaming1_0=Wolfinspectie
m.EffectsTaming1_1=Bone-meal inspecteert wolven
m.EffectsTaming2_0=Gestold bloed

View File

@ -40,7 +40,7 @@ m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
m.Effects=EFEKTY
m.YourStats=TWOJE STATYSTYKI
m.SkillTaming=OSWAJANIE
m.XPGainTaming=Shearing or combat w/ your wolves
m.XPGainTaming=Shearing, Animal Taming, or combat w/ your wolves
m.EffectsTaming1_0=Wiedza o zwierzetach
m.EffectsTaming1_1=Uderz koscia aby sprawdzic wilka.
m.EffectsTaming2_0=Krwotok

View File

@ -40,7 +40,7 @@ m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
m.Effects=EFEITOS
m.YourStats=SUAS ESTATISTICAS
m.SkillTaming=DOMESTICAR
m.XPGainTaming=Shearing or combat w/ your wolves
m.XPGainTaming=Shearing, Animal Taming, or combat w/ your wolves
m.EffectsTaming1_0=Conhecimento de Feras
m.EffectsTaming1_1=Inspeciona um lobo com um osso
m.EffectsTaming2_0=Mordida

View File

@ -41,7 +41,7 @@ m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
m.Effects=ЭФФЕКТЫ
m.YourStats=ВАШИ ХАРАКТЕРИСТИКИ
m.SkillTaming=Приручение
m.XPGainTaming=Shearing or combat w/ your wolves
m.XPGainTaming=Shearing, Animal Taming, or combat w/ your wolves
m.EffectsTaming1_0=Удар Волка
m.EffectsTaming1_1=Уменьшение количества костей
m.EffectsTaming2_0=Окравление