Skip to content
This repository was archived by the owner on Nov 7, 2023. It is now read-only.

Commit 9464186

Browse files
committed
refactor(permissions): fix typo
1 parent 5edec6e commit 9464186

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Implementation/ChestManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public void SetUpBankChest(TSPlayer player, DPoint tileLocation, int bankChestIn
170170
throw new MissingPermissionException(ProtectorPlugin.SetBankChests_Permission);
171171

172172
if (
173-
checkPermissions && !player.Group.HasPermission(ProtectorPlugin.NoBankChestLimits_Permision)
173+
checkPermissions && !player.Group.HasPermission(ProtectorPlugin.NoBankChestLimits_Permission)
174174
) {
175175
if (bankChestIndex > this.Config.MaxBankChestsPerPlayer)
176176
throw new ArgumentOutOfRangeException("bankChestIndex", this.Config.MaxBankChestsPerPlayer, "Global bank chest limit reached.");
@@ -268,7 +268,7 @@ public void SetUpTradeChest(TSPlayer player, DPoint tileLocation, int sellAmount
268268
throw new NoChestDataException(chestLocation);
269269

270270
bool isNewTradeChest = (protection.TradeChestData == null);
271-
if (isNewTradeChest && checkPermissions && this.CooperationHandler.IsSeconomyAvailable && !player.Group.HasPermission(ProtectorPlugin.FreeTradeChests_Permision)) {
271+
if (isNewTradeChest && checkPermissions && this.CooperationHandler.IsSeconomyAvailable && !player.Group.HasPermission(ProtectorPlugin.FreeTradeChests_Permission)) {
272272
if (this.CooperationHandler.Seconomy_GetBalance(player.Name) < this.Config.TradeChestPayment)
273273
throw new PaymentException(this.Config.TradeChestPayment);
274274

Implementation/ProtectionManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ private IEnumerable<ProtectionEntry> EnumProtectionEntriesOnTopOfObject(ObjectMe
206206
public bool CheckProtectionAccess(ProtectionEntry protection, TSPlayer player, bool fullAccessRequired = false) {
207207
bool hasAccess = (player.IsLoggedIn && protection.Owner == player.User.ID);
208208
if (!hasAccess && !fullAccessRequired) {
209-
hasAccess = player.Group.HasPermission(ProtectorPlugin.UseEverything_Permision);
209+
hasAccess = player.Group.HasPermission(ProtectorPlugin.UseEverything_Permission);
210210
if (!hasAccess)
211211
hasAccess = protection.IsSharedWithPlayer(player);
212212
}

Implementation/ProtectorPlugin.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ public class ProtectorPlugin: TerrariaPlugin, IDisposable {
3030
public const string OtherSharing_Permission = "prot.othershare";
3131
public const string ShareWithGroups_Permission = "prot.sharewithgroups";
3232
public const string ProtectionMaster_Permission = "prot.protectionmaster";
33-
public const string UseEverything_Permision = "prot.useeverything";
33+
public const string UseEverything_Permission = "prot.useeverything";
3434
public const string SetRefillChests_Permission = "prot.setrefillchest";
3535
public const string SetBankChests_Permission = "prot.setbankchest";
3636
public const string SetTradeChests_Permission = "prot.settradechest";
3737
public const string DumpBankChests_Permission = "prot.dumpbankchest";
3838
public const string BankChestShare_Permission = "prot.bankchestshare";
39-
public const string NoBankChestLimits_Permision = "prot.nobankchestlimits";
40-
public const string FreeTradeChests_Permision = "prot.freetradechests";
39+
public const string NoBankChestLimits_Permission = "prot.nobankchestlimits";
40+
public const string FreeTradeChests_Permission = "prot.freetradechests";
4141
public const string Utility_Permission = "prot.utility";
4242
public const string Cfg_Permission = "prot.cfg";
4343

Implementation/UserInteractionHandler.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,7 +1772,7 @@ private void BankChestCommand_Exec(CommandArgs args) {
17721772
return;
17731773
}
17741774

1775-
bool hasNoBankChestLimits = args.Player.Group.HasPermission(ProtectorPlugin.NoBankChestLimits_Permision);
1775+
bool hasNoBankChestLimits = args.Player.Group.HasPermission(ProtectorPlugin.NoBankChestLimits_Permission);
17761776
if (
17771777
chestIndex < 1 || (chestIndex > this.Config.MaxBankChestsPerPlayer && !hasNoBankChestLimits)
17781778
) {
@@ -2040,7 +2040,7 @@ private void TradeChestCommand_Exec(CommandArgs args) {
20402040
};
20412041

20422042
string priceInfo = "";
2043-
if (this.PluginCooperationHandler.IsSeconomyAvailable && this.Config.TradeChestPayment > 0 && !args.Player.Group.HasPermission(ProtectorPlugin.FreeTradeChests_Permision))
2043+
if (this.PluginCooperationHandler.IsSeconomyAvailable && this.Config.TradeChestPayment > 0 && !args.Player.Group.HasPermission(ProtectorPlugin.FreeTradeChests_Permission))
20442044
priceInfo = $" This will cost you {this.Config.TradeChestPayment} {this.PluginCooperationHandler.Seconomy_MoneyName()}";
20452045

20462046
args.Player.SendInfoMessage("Open a chest to convert it into a trade chest." + priceInfo);
@@ -3608,7 +3608,7 @@ public bool TrySetUpBankChest(TSPlayer player, DPoint tileLocation, int bankChes
36083608
ArgumentOutOfRangeException actualEx = (ArgumentOutOfRangeException)ex;
36093609
if (sendMessages) {
36103610
string messageFormat;
3611-
if (!player.Group.HasPermission(ProtectorPlugin.NoBankChestLimits_Permision))
3611+
if (!player.Group.HasPermission(ProtectorPlugin.NoBankChestLimits_Permission))
36123612
messageFormat = "The bank chest number must be between 1 and {0}.";
36133613
else
36143614
messageFormat = "The bank chest number must be greater than 1.";

0 commit comments

Comments
 (0)