Merge branch 'general-devel' into fix-portal-exploit
This commit is contained in:
commit
cae760ad4b
4 changed files with 26 additions and 12 deletions
|
|
@ -565,7 +565,7 @@ namespace TShockAPI.DB
|
|||
permissions.ForEach(p => group.AddPermission(p));
|
||||
|
||||
if (database.Query("UPDATE GroupList SET Commands=@0 WHERE GroupName=@1", group.Permissions, name) == 1)
|
||||
return "Group " + name + " has been modified successfully.";
|
||||
return GetString($"Group {name} has been modified successfully.");
|
||||
|
||||
// Restore old permissions so DB and internal object are in a consistent state
|
||||
group.Permissions = oldperms;
|
||||
|
|
@ -588,7 +588,7 @@ namespace TShockAPI.DB
|
|||
permissions.ForEach(p => group.RemovePermission(p));
|
||||
|
||||
if (database.Query("UPDATE GroupList SET Commands=@0 WHERE GroupName=@1", group.Permissions, name) == 1)
|
||||
return "Group " + name + " has been modified successfully.";
|
||||
return GetString($"Group {name} has been modified successfully.");
|
||||
|
||||
// Restore old permissions so DB and internal object are in a consistent state
|
||||
group.Permissions = oldperms;
|
||||
|
|
|
|||
|
|
@ -2734,8 +2734,11 @@ namespace TShockAPI
|
|||
|
||||
if (OnPlayerSpawn(args.Player, args.Data, player, spawnX, spawnY, respawnTimer, numberOfDeathsPVE, numberOfDeathsPVP, context))
|
||||
return true;
|
||||
|
||||
args.Player.Dead = respawnTimer > 0;
|
||||
|
||||
if (!Main.ServerSideCharacter || context != PlayerSpawnContext.SpawningIntoWorld)
|
||||
{
|
||||
args.Player.Dead = respawnTimer > 0;
|
||||
}
|
||||
|
||||
if (Main.ServerSideCharacter)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1263,6 +1263,11 @@ namespace TShockAPI
|
|||
/// <returns>True if allowed, otherwise false</returns>
|
||||
private bool OnCreep(int tileType)
|
||||
{
|
||||
if (WorldGen.generatingWorld)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!Config.Settings.AllowCrimsonCreep && (tileType == TileID.Dirt || tileType == TileID.CrimsonGrass
|
||||
|| TileID.Sets.Crimson[tileType]))
|
||||
{
|
||||
|
|
@ -1456,7 +1461,7 @@ namespace TShockAPI
|
|||
|
||||
if (!tsplr.FinishedHandshake)
|
||||
{
|
||||
tsplr.Kick(GetString("Your client didn't send the right connection information."), true);
|
||||
tsplr.Kick(GetString("Your client didn't send the right connection information."), true, true);
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue