Changed Call of the Wild, newly summoned pet's will have a custom name

Closes #972
This commit is contained in:
TfT_02 2013-04-18 23:04:27 +02:00
parent d57c253b19
commit e831f0561a
4 changed files with 10 additions and 0 deletions

View File

@ -25,6 +25,7 @@ Version 1.4.06-dev
= Fixed NPE when trying to tab-complete /mctop
= Fixed Fishing treasures always having the same enchants
! Changed Berserk to add items to inventory rather than denying pickup
! Changed Call of the Wild, newly summoned pet's will have a custom name. (added permission node to disable this)
! Changed Chimaera Wing's recipe result to use the ingredient Material
! Players will no longer pickup items to their hotbar while using Unarmed
! ExperienceAPI methods will now throw InvalidSkillException if the skill name passed in is invalid.

View File

@ -198,6 +198,11 @@ public class TamingManager extends SkillManager {
entity.setHealth(entity.getMaxHealth());
}
if (Permissions.renamePets(player)) {
entity.setCustomName(player.getName() + "\'s " + StringUtils.getPrettyEntityTypeString(entity.getType())); //TODO Localize, perhaps in a different language it makes more sense to switch this around
entity.setCustomNameVisible(true);
}
player.setItemInHand(new ItemStack(heldItem.getType(), heldItemAmount - summonAmount));
player.sendMessage(LocaleLoader.getString("Taming.Summon.Complete"));
}

View File

@ -191,6 +191,7 @@ public final class Permissions {
/* TAMING */
public static boolean beastLore(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.taming.beastlore"); }
public static boolean callOfTheWild(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.taming.callofthewild"); }
public static boolean renamePets(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.taming.callofthewild_renamepets"); }
public static boolean environmentallyAware(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.taming.environmentallyaware"); }
public static boolean fastFoodService(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.taming.fastfoodservice"); }
public static boolean gore(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.taming.gore"); }

View File

@ -514,6 +514,7 @@ permissions:
children:
mcmmo.ability.taming.beastlore: true
mcmmo.ability.taming.callofthewild: true
mcmmo.ability.taming.callofthewild_renamepets: true
mcmmo.ability.taming.environmentallyaware: true
mcmmo.ability.taming.fastfoodservice: true
mcmmo.ability.taming.gore: true
@ -525,6 +526,8 @@ permissions:
description: Allows access to the Beast Lore ability
mcmmo.ability.taming.callofthewild:
description: Allows access to the Call of the Wild ability
mcmmo.ability.taming.callofthewild_renamepets:
description: Pets spawned with Call of the Wild will have custom names
mcmmo.ability.taming.environmentallyaware:
description: Allows access to the Environmentally Aware ability
mcmmo.ability.taming.fastfoodservice: