Add projectile bans and the commands needed to set them up.

This commit is contained in:
Zack Piispanen 2014-04-11 13:44:47 -04:00
parent 61d05ffdc6
commit 84d8049ac6
6 changed files with 456 additions and 4 deletions

View file

@ -2393,9 +2393,17 @@ namespace TShockAPI
if (index > Main.maxProjectiles || index < 0)
{
return false;
args.Player.RemoveProjectile(ident, owner);
return true;
}
if (TShock.ProjectileBans.ProjectileIsBanned(type, args.Player))
{
args.Player.Disable("Player does not have permission to create that projectile.", true);
args.Player.SendErrorMessage("You do not have permission to create that projectile.");
args.Player.RemoveProjectile(ident, owner);
return false;
}
// Server now checks owner + ident, if owner is different, server will create new projectile.
/*if (args.Player.Index != owner)
{