Fix automatically disabling all players

In rewriting Disable, I accidentally implemented logic that disabled all
players for having banned armor. This is now fixed.
This commit is contained in:
Lucas Nicodemus 2017-12-22 10:21:49 -07:00
parent a76144b503
commit b93bab65d7

View file

@ -1081,7 +1081,6 @@ namespace TShockAPI
} }
else if (!Main.ServerSideCharacter || (Main.ServerSideCharacter && player.IsLoggedIn)) else if (!Main.ServerSideCharacter || (Main.ServerSideCharacter && player.IsLoggedIn))
{ {
string check = "none";
if (!player.HasPermission(Permissions.ignorestackhackdetection)) if (!player.HasPermission(Permissions.ignorestackhackdetection))
{ {
player.IsDisabledForStackDetection = player.HasHackedItemStacks(shouldWarnPlayer: true); player.IsDisabledForStackDetection = player.HasHackedItemStacks(shouldWarnPlayer: true);
@ -1140,6 +1139,7 @@ namespace TShockAPI
break; break;
} }
} }
if (check != "none")
player.IsDisabledForBannedWearable = true; player.IsDisabledForBannedWearable = true;
if (player.IsBeingDisabled()) if (player.IsBeingDisabled())