Skip to content

Commit 761ee24

Browse files
authored
Changes GodTuts (Exiled-Team#87)
* 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?
1 parent ccc7214 commit 761ee24

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

AdminTools/Config.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class Config : IConfig
1111
[Description("Whether or not to show logs used for debugging.")]
1212
public bool Debug { get; set; } = false;
1313

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

1717
[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.")]

AdminTools/EventHandlers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public void OnTriggeringTesla(TriggeringTeslaEventArgs ev)
122122

123123
public void OnChangingRole(ChangingRoleEventArgs ev)
124124
{
125-
if (plugin.Config.GodTuts && ev.Player.RemoteAdminAccess && ev.Reason == SpawnReason.ForceClass)
125+
if (plugin.Config.GodTuts && (ev.Reason is SpawnReason.ForceClass or SpawnReason.None))
126126
ev.Player.IsGodModeEnabled = ev.NewRole == RoleTypeId.Tutorial;
127127
}
128128

0 commit comments

Comments
 (0)