Skip to content

Commit

Permalink
Changes GodTuts (#87)
Browse files Browse the repository at this point in the history
* Changes GodTuts to apply to anybody who is forceclassed/ spawned with no reason. Allows Jailed individuals to stay in GodMode without affecting the greater Tutorial role (assuming plugins are configured to send the correct RoleChangeReasons, which they should because thats correct thing to do in my opinion don't @ me)

* prettification and efficiency?
  • Loading branch information
BenFRC5147 authored Jun 23, 2024
1 parent ccc7214 commit 761ee24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AdminTools/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class Config : IConfig
[Description("Whether or not to show logs used for debugging.")]
public bool Debug { get; set; } = false;

[Description("Should Staff be in God Mode when they forceclass to Tutorial?? Default: false")]
[Description("Should Tutorials be in God Mode when Forceclassed? Default: false")]
public bool GodTuts { get; set; } = false;

[Description("Extending Command use for Getting a player (such as candy command and other parts of AdminTools). View the README on github for more info.")]
Expand Down
2 changes: 1 addition & 1 deletion AdminTools/EventHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void OnTriggeringTesla(TriggeringTeslaEventArgs ev)

public void OnChangingRole(ChangingRoleEventArgs ev)
{
if (plugin.Config.GodTuts && ev.Player.RemoteAdminAccess && ev.Reason == SpawnReason.ForceClass)
if (plugin.Config.GodTuts && (ev.Reason is SpawnReason.ForceClass or SpawnReason.None))
ev.Player.IsGodModeEnabled = ev.NewRole == RoleTypeId.Tutorial;
}

Expand Down

0 comments on commit 761ee24

Please sign in to comment.