Remove TShock.CheckProjectilePermission

Add TSPlayer.HasProjectilePermission() and its inverse:
	TSPlayer.LacksProjectilePermission()
This commit is contained in:
Lucas Nicodemus 2017-12-10 23:36:16 -07:00
parent c5f9a51802
commit ba851d3570
5 changed files with 54 additions and 37 deletions

View file

@ -2260,7 +2260,7 @@ namespace TShockAPI
var type = Main.projectile[index].type;
// TODO: This needs to be moved somewhere else.
if (TShock.CheckProjectilePermission(args.Player, index, type) && type != 102 && type != 100 && !TShock.Config.IgnoreProjKill)
if (args.Player.LacksProjectilePermission(index, type) && type != 102 && type != 100 && !TShock.Config.IgnoreProjKill)
{
args.Player.Disable("Does not have projectile permission to kill projectile.", DisableFlags.WriteToLogAndConsole);
args.Player.RemoveProjectile(ident, owner);