Prevent players from naming their pets "ULTRA"

This was being used to fool support into thinking the player had won
Ultra from a chest
This commit is contained in:
cnr 2016-04-13 16:37:13 -05:00
parent 67adf94341
commit 91c97e38b8

View File

@ -83,6 +83,15 @@ public class PetTagPage extends ShopPageBase<CosmeticManager, CosmeticShop>
return; return;
} }
if (_tagName.equalsIgnoreCase("ULTRA"))
{
UtilPlayer.message(getPlayer(), F.main(getPlugin().getName(), ChatColor.RED + _tagName + " is a restricted name."));
playDenySound(getPlayer());
getShop().openPageForPlayer(getPlayer(), new PetPage(getPlugin(), getShop(), getClientManager(), getDonationManager(), "Pets", getPlayer()));
return;
}
PetExtra tag = new PetExtra("Rename " + _pet.GetName() + " to " + _tagName, Material.NAME_TAG, 100); PetExtra tag = new PetExtra("Rename " + _pet.GetName() + " to " + _tagName, Material.NAME_TAG, 100);
_pet.setDisplayName(C.cGreen + "Purchase " + _tagName); _pet.setDisplayName(C.cGreen + "Purchase " + _tagName);