From f18243242fcf04a15ede101db6ed827544b0e165 Mon Sep 17 00:00:00 2001 From: AkjaHAsLk1IALk0MasH <46046453+AgaSpace@users.noreply.github.com> Date: Tue, 6 Jun 2023 16:12:05 +0700 Subject: [PATCH] Update Group.cs --- TShockAPI/Group.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/TShockAPI/Group.cs b/TShockAPI/Group.cs index ff2ba2e9..0858dfd4 100644 --- a/TShockAPI/Group.cs +++ b/TShockAPI/Group.cs @@ -52,17 +52,17 @@ namespace TShockAPI /// /// The group that this group inherits permissions from. /// - public Group Parent { get; set; } + public virtual Group Parent { get; set; } /// /// The chat prefix for this group. /// - public string Prefix { get; set; } + public virtual string Prefix { get; set; } /// /// The chat suffix for this group. /// - public string Suffix { get; set; } + public virtual string Suffix { get; set; } /// /// The name of the parent, not particularly sure why this is here. @@ -154,15 +154,15 @@ namespace TShockAPI /// /// The group's chat color red byte. /// - public byte R = 255; + public virtual byte R { get; set; } = 255; /// /// The group's chat color green byte. /// - public byte G = 255; + public virtual byte G { get; set; } = 255; /// /// The group's chat color blue byte. /// - public byte B = 255; + public virtual byte B { get; set; } = 255; /// /// The default group attributed to unregistered users. @@ -242,7 +242,7 @@ namespace TShockAPI /// Adds a permission to the list of negated permissions. /// /// The permission to negate. - public void NegatePermission(string permission) + public virtual void NegatePermission(string permission) { // Avoid duplicates if (!negatedpermissions.Contains(permission)) @@ -256,7 +256,7 @@ namespace TShockAPI /// Adds a permission to the list of permissions. /// /// The permission to add. - public void AddPermission(string permission) + public virtual void AddPermission(string permission) { if (permission.StartsWith("!")) { @@ -276,7 +276,7 @@ namespace TShockAPI /// will parse "!permission" and add it to the negated permissions. /// /// The new list of permissions to associate with the group. - public void SetPermission(List permission) + public virtual void SetPermission(List permission) { permissions.Clear(); negatedpermissions.Clear(); @@ -288,7 +288,7 @@ namespace TShockAPI /// where "!permission" will remove a negated permission. /// /// - public void RemovePermission(string permission) + public virtual void RemovePermission(string permission) { if (permission.StartsWith("!")) { @@ -302,7 +302,7 @@ namespace TShockAPI /// Assigns all fields of this instance to another. /// /// The other instance. - public void AssignTo(Group otherGroup) + public virtual void AssignTo(Group otherGroup) { otherGroup.Name = Name; otherGroup.Parent = Parent;