Fix several bracket mismatch

This commit is contained in:
SGKoishi 2022-10-27 01:53:41 -07:00
parent 95d6baaf6c
commit 4f6ba61611
No known key found for this signature in database
GPG key ID: 8FFC399070653828
2 changed files with 15 additions and 15 deletions

View file

@ -452,7 +452,7 @@ namespace TShockAPI
byte plr = args.PlayerId; byte plr = args.PlayerId;
ControlSet control = args.Control; ControlSet control = args.Control;
MiscDataSet1 miscData1 = args.MiscData1; MiscDataSet1 miscData1 = args.MiscData1;
byte item = args.SelectedItem ; byte item = args.SelectedItem;
var pos = args.Position; var pos = args.Position;
var vel = args.Velocity; var vel = args.Velocity;
@ -932,7 +932,7 @@ namespace TShockAPI
if (args.Player.IsBouncerThrottled()) if (args.Player.IsBouncerThrottled())
{ {
TShock.Log.ConsoleDebug(GetString("Bouncer / OnTileEdit rejected from throttled from {0} {1} {2}"), args.Player.Name, action, editData); TShock.Log.ConsoleDebug(GetString("Bouncer / OnTileEdit rejected from throttled from {0} {1} {2}", args.Player.Name, action, editData));
args.Player.SendTileSquareCentered(tileX, tileY, 4); args.Player.SendTileSquareCentered(tileX, tileY, 4);
args.Handled = true; args.Handled = true;
return; return;
@ -2262,7 +2262,7 @@ namespace TShockAPI
return; return;
} }
} }
else if(args.Player.SelectedItem.type == ItemID.AcornAxe) else if (args.Player.SelectedItem.type == ItemID.AcornAxe)
{ {
if (type != TileID.Saplings) if (type != TileID.Saplings)
{ {
@ -2441,7 +2441,7 @@ namespace TShockAPI
if (args.NewPosition.X > Main.maxTilesX || args.NewPosition.X < 0 if (args.NewPosition.X > Main.maxTilesX || args.NewPosition.X < 0
|| args.NewPosition.Y > Main.maxTilesY || args.NewPosition.Y < 0) || args.NewPosition.Y > Main.maxTilesY || args.NewPosition.Y < 0)
{ {
TShock.Log.ConsoleDebug(GetString("Bouncer / OnPlayerPortalTeleport rejected teleport out of bounds from {0}"), args.Player.Name); TShock.Log.ConsoleDebug(GetString("Bouncer / OnPlayerPortalTeleport rejected teleport out of bounds from {0}", args.Player.Name));
args.Handled = true; args.Handled = true;
return; return;
} }
@ -2449,7 +2449,7 @@ namespace TShockAPI
//May as well reject teleport attempts if the player is being throttled //May as well reject teleport attempts if the player is being throttled
if (args.Player.IsBeingDisabled() || args.Player.IsBouncerThrottled()) if (args.Player.IsBeingDisabled() || args.Player.IsBouncerThrottled())
{ {
TShock.Log.ConsoleDebug(GetString("Bouncer / OnPlayerPortalTeleport rejected disabled/throttled from {0}"), args.Player.Name); TShock.Log.ConsoleDebug(GetString("Bouncer / OnPlayerPortalTeleport rejected disabled/throttled from {0}", args.Player.Name));
args.Handled = true; args.Handled = true;
return; return;
} }

View file

@ -1052,7 +1052,7 @@ namespace TShockAPI
{ {
args.Player.SendErrorMessage(GetString("Sorry, {0} was already taken by another person.", account.Name)); args.Player.SendErrorMessage(GetString("Sorry, {0} was already taken by another person.", account.Name));
args.Player.SendErrorMessage(GetString("Please try a different username.")); args.Player.SendErrorMessage(GetString("Please try a different username."));
TShock.Log.ConsoleInfo(GetString("{0} attempted to register for the account {1} but it was already taken."), args.Player.Name, account.Name); TShock.Log.ConsoleInfo(GetString("{0} attempted to register for the account {1} but it was already taken.", args.Player.Name, account.Name));
} }
} }
catch (UserAccountManagerException ex) catch (UserAccountManagerException ex)
@ -1817,7 +1817,7 @@ namespace TShockAPI
} }
else if (players.Count == 0) else if (players.Count == 0)
{ {
args.Player.SendErrorMessage(GetString("No player was found matching '{0}'."), args.Parameters[0]); args.Player.SendErrorMessage(GetString("No player was found matching '{0}'.", args.Parameters[0]));
return; return;
} }
else else