Merge branch 'general-devel' into fix-invalid-groups

This commit is contained in:
quake1337 2021-07-31 16:38:12 +02:00 committed by GitHub
commit 91376ae087
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 128 additions and 81 deletions

View file

@ -464,14 +464,14 @@ namespace TShockAPI.DB
}
catch (Exception ex)
{
TShock.Log.Error($"An exception has occured during database transaction: {ex.Message}");
TShock.Log.Error($"An exception has occurred during database transaction: {ex.Message}");
try
{
transaction.Rollback();
}
catch (Exception rollbackEx)
{
TShock.Log.Error($"An exception has occured during database rollback: {rollbackEx.Message}");
TShock.Log.Error($"An exception has occurred during database rollback: {rollbackEx.Message}");
}
}
}

View file

@ -168,7 +168,7 @@ namespace TShockAPI.DB
}
/// <summary>
/// Delets the region from this world with a given ID.
/// Deletes the region from this world with a given ID.
/// </summary>
/// <param name="id">The ID of the region to delete.</param>
/// <returns>Whether the region was successfully deleted.</returns>
@ -584,7 +584,7 @@ namespace TShockAPI.DB
/// </summary>
/// <param name="regionName">Region name</param>
/// <param name="newOwner">New owner's username</param>
/// <returns>Whether the change was successfull</returns>
/// <returns>Whether the change was successful</returns>
public bool ChangeOwner(string regionName, string newOwner)
{
var region = GetRegionByName(regionName);
@ -604,7 +604,7 @@ namespace TShockAPI.DB
/// </summary>
/// <param name="regionName">Region name</param>
/// <param name="groupName">Group's name</param>
/// <returns>Whether the change was successfull</returns>
/// <returns>Whether the change was successful</returns>
public bool AllowGroup(string regionName, string groupName)
{
string mergedGroups = "";
@ -646,7 +646,7 @@ namespace TShockAPI.DB
/// </summary>
/// <param name="regionName">Region name</param>
/// <param name="group">Group name</param>
/// <returns>Whether the change was successfull</returns>
/// <returns>Whether the change was successful</returns>
public bool RemoveGroup(string regionName, string group)
{
Region r = GetRegionByName(regionName);
@ -688,7 +688,7 @@ namespace TShockAPI.DB
/// </summary>
/// <param name="name">Region name</param>
/// <param name="z">New Z index</param>
/// <returns>Whether the change was successfull</returns>
/// <returns>Whether the change was successful</returns>
public bool SetZ(string name, int z)
{
try

View file

@ -56,7 +56,7 @@ namespace TShockAPI.DB
{
int checkX=reader.Get<int>("X");
int checkY=reader.Get<int>("Y");
//fix leftover inconsistancies
//fix leftover inconsistencies
if (checkX==0)
checkX++;
if (checkY==0)

View file

@ -378,7 +378,7 @@ namespace TShockAPI.DB
/// <summary>The hashed password for the user account.</summary>
public string Password { get; internal set; }
/// <summary>The user's saved Univerally Unique Identifier token.</summary>
/// <summary>The user's saved Universally Unique Identifier token.</summary>
public string UUID { get; set; }
/// <summary>The group object that the user account is a part of.</summary>

View file

@ -139,7 +139,7 @@ namespace TShockAPI.DB
/// <param name="warpName">The warp name.</param>
/// <param name="x">The X position.</param>
/// <param name="y">The Y position.</param>
/// <returns>Whether the operation suceeded.</returns>
/// <returns>Whether the operation succeeded.</returns>
public bool Position(string warpName, int x, int y)
{
try
@ -163,7 +163,7 @@ namespace TShockAPI.DB
/// </summary>
/// <param name="warpName">The warp name.</param>
/// <param name="state">The state.</param>
/// <returns>Whether the operation suceeded.</returns>
/// <returns>Whether the operation succeeded.</returns>
public bool Hide(string warpName, bool state)
{
try
@ -216,4 +216,4 @@ namespace TShockAPI.DB
IsPrivate = false;
}
}
}
}