Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2 from JohnodonCode/dev
Browse files Browse the repository at this point in the history
actually make things optimized. oops
  • Loading branch information
JohnodonCode authored Jul 22, 2021
2 parents 360e55b + 2dcb312 commit cfcf3ef
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion betterperms/Commands/setconfig/FriendlyFire.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class FriendlyFire : ICommand

public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
{
if (!new Methods().CheckSCPerms("friendlyfire", sender))
if (Methods.CheckSCPerms("friendlyfire", sender))
{
response = "You do not have permission to use this command.";
return false;
Expand Down
2 changes: 1 addition & 1 deletion betterperms/Commands/setconfig/HumanGrenadeMultiplier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class HumanGrenadeMultiplier : ICommand

public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
{
if (!new Methods().CheckSCPerms("humangrenademultiplier", sender))
if (Methods.CheckSCPerms("humangrenademultiplier", sender))
{
response = "You do not have permission to use this command.";
return false;
Expand Down
2 changes: 1 addition & 1 deletion betterperms/Commands/setconfig/PDRefreshExit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PDRefreshExit : ICommand

public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
{
if (!new Methods().CheckSCPerms("pdrefreshexit", sender))
if (Methods.CheckSCPerms("pdrefreshexit", sender))
{
response = "You do not have permission to use this command.";
return false;
Expand Down
2 changes: 1 addition & 1 deletion betterperms/Commands/setconfig/PlayerListTitle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PlayerListTitle : ICommand

public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
{
if (!new Methods().CheckSCPerms("playerlisttitle", sender))
if (Methods.CheckSCPerms("playerlisttitle", sender))
{
response = "You do not have permission to use this command.";
return false;
Expand Down
2 changes: 1 addition & 1 deletion betterperms/Commands/setconfig/ScpGrenadeMultiplier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ScpGrenadeMultiplier : ICommand

public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
{
if (!new Methods().CheckSCPerms("scpgrenademultiplier", sender))
if (Methods.CheckSCPerms("scpgrenademultiplier", sender))
{
response = "You do not have permission to use this command.";
return false;
Expand Down
2 changes: 1 addition & 1 deletion betterperms/Commands/setconfig/SpawnProtectDisable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SpawnProtectDisable : ICommand

public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
{
if (!new Methods().CheckSCPerms("spawnprotectdisable", sender))
if (Methods.CheckSCPerms("spawnprotectdisable", sender))
{
response = "You do not have permission to use this command.";
return false;
Expand Down
2 changes: 1 addition & 1 deletion betterperms/Commands/setconfig/SpawnProtectTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SpawnProtectTime : ICommand

public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
{
if (!new Methods().CheckSCPerms("spawnprotecttime", sender))
if (Methods.CheckSCPerms("spawnprotecttime", sender))
{
response = "You do not have permission to use this command.";
return false;
Expand Down
2 changes: 1 addition & 1 deletion betterperms/Methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace BetterPerms
class Methods
{
//command permissions
internal bool CheckSCPerms(string node, ICommandSender sender)
internal static bool CheckSCPerms(string node, ICommandSender sender)
{
if(!sender.CheckPermission($"{Plugin.Instance.Config.ScBasePermission}.{node}") && !sender.CheckPermission(Plugin.Instance.Config.ScBasePermission) && !sender.CheckPermission(PlayerPermissions.ServerConfigs))
{
Expand Down

0 comments on commit cfcf3ef

Please sign in to comment.