mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Get Taming XP for milking cows.
This commit is contained in:
parent
94cb118a7e
commit
d06ec5e452
@ -24,6 +24,7 @@ Version 1.3.00-dev
|
||||
! Changed god mode to turn off if player enters world where he does not have mcgod permission
|
||||
! Changed Taming to also gain XP from shearing
|
||||
! Changed Taming to also gain XP from animal taming
|
||||
! Changed Taming to also gain XP from milking cows
|
||||
! Changed Swords Bleeding effect to never kill
|
||||
! Changed Bleeding to never go beyond 10 ticks
|
||||
! Changed to use Bukkit's built-in ignoreCancelledEvents system
|
||||
|
@ -56,7 +56,7 @@ public class LoadProperties {
|
||||
MySQLserverName, MySQLdbName, MySQLdbPass, nWood, nStone,
|
||||
nIron, nGold, nDiamond, locale, nString, nLeather;
|
||||
|
||||
public static int mtameWolf, mshearing, mfishing, xpbar_x, xpbar_y, xpicon_x, xpicon_y,
|
||||
public static int mtameWolf, mshearing, mmilkCow, 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,
|
||||
@ -270,6 +270,7 @@ public class LoadProperties {
|
||||
|
||||
mshearing = readInteger("Experience.Taming.Shearing", 250);
|
||||
mtameWolf = readInteger("Experience.Taming.Animal_Taming.Wolf", 250);
|
||||
mmilkCow = readInteger("Experience.Taming.Milking", 50);
|
||||
|
||||
mfishing = readInteger("Experience.Fishing.Base", 800);
|
||||
|
||||
|
@ -34,6 +34,7 @@ import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.player.PlayerBucketFillEvent;
|
||||
import org.bukkit.event.player.PlayerChangedWorldEvent;
|
||||
import org.bukkit.event.player.PlayerChatEvent;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
@ -209,6 +210,7 @@ public class mcPlayerListener implements Listener
|
||||
player.sendMessage(ChatColor.GOLD+"mcMMO is currently in an XP rate event! XP rate is "+LoadProperties.xpGainMultiplier+"x!");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onPlayerInteract(PlayerInteractEvent event)
|
||||
{
|
||||
@ -375,6 +377,21 @@ public class mcPlayerListener implements Listener
|
||||
log.log(Level.INFO, "[A]<" + name + ">" + event.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void onCowMilking(PlayerBucketFillEvent event){
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if(mcPermissions.getInstance().taming(player))
|
||||
{
|
||||
if(event.getItemStack().getTypeId() == 335)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
PP.addXP(SkillType.TAMING, LoadProperties.mmilkCow, player);
|
||||
Skills.XpCheckSkill(SkillType.TAMING, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Dynamically aliasing commands need to be re-done.
|
||||
// For now, using a command with an alias will send both the original command, and the mcMMO command
|
||||
|
@ -219,6 +219,7 @@ Experience:
|
||||
Shearing: 250
|
||||
Animal_Taming:
|
||||
Wolf: 250
|
||||
Milking: 50
|
||||
|
||||
#
|
||||
# Settings for Fishing
|
||||
|
Loading…
Reference in New Issue
Block a user