mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 20:12:54 +00:00
Move the per kit and warp permissions:
essentials.kit.kitname is moved to essentials.kits.kitname essentials.warp.warpname is moved to essentials.warps.warpname
This commit is contained in:
parent
ce50e1448b
commit
9c9d4e1da5
3 changed files with 5 additions and 5 deletions
|
@ -23,7 +23,7 @@ public class Kit
|
||||||
final StringBuilder list = new StringBuilder();
|
final StringBuilder list = new StringBuilder();
|
||||||
for (String kiteItem : kits.getKeys(false))
|
for (String kiteItem : kits.getKeys(false))
|
||||||
{
|
{
|
||||||
if (user == null || user.isAuthorized("essentials.kit." + kiteItem.toLowerCase(Locale.ENGLISH)))
|
if (user == null || user.isAuthorized("essentials.kits." + kiteItem.toLowerCase(Locale.ENGLISH)))
|
||||||
{
|
{
|
||||||
list.append(" ").append(capitalCase(kiteItem));
|
list.append(" ").append(capitalCase(kiteItem));
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,9 +72,9 @@ public class Commandkit extends EssentialsCommand
|
||||||
|
|
||||||
final Map<String, Object> kit = ess.getSettings().getKit(kitName);
|
final Map<String, Object> kit = ess.getSettings().getKit(kitName);
|
||||||
|
|
||||||
if (!userFrom.isAuthorized("essentials.kit." + kitName))
|
if (!userFrom.isAuthorized("essentials.kits." + kitName))
|
||||||
{
|
{
|
||||||
throw new Exception(_("noKitPermission", "essentials.kit." + kitName));
|
throw new Exception(_("noKitPermission", "essentials.kits." + kitName));
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<String> items = Kit.getItems(userTo, kit);
|
final List<String> items = Kit.getItems(userTo, kit);
|
||||||
|
|
|
@ -87,7 +87,7 @@ public class Commandwarp extends EssentialsCommand
|
||||||
while (iterator.hasNext())
|
while (iterator.hasNext())
|
||||||
{
|
{
|
||||||
final String warpName = iterator.next();
|
final String warpName = iterator.next();
|
||||||
if (ess.getSettings().getPerWarpPermission() && !((User)sender).isAuthorized("essentials.warp." + warpName))
|
if (ess.getSettings().getPerWarpPermission() && !((User)sender).isAuthorized("essentials.warps." + warpName))
|
||||||
{
|
{
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ public class Commandwarp extends EssentialsCommand
|
||||||
final double fullCharge = chargeWarp.getCommandCost(user) + chargeCmd.getCommandCost(user);
|
final double fullCharge = chargeWarp.getCommandCost(user) + chargeCmd.getCommandCost(user);
|
||||||
final Trade charge = new Trade(fullCharge, ess);
|
final Trade charge = new Trade(fullCharge, ess);
|
||||||
charge.isAffordableFor(owner);
|
charge.isAffordableFor(owner);
|
||||||
if (ess.getSettings().getPerWarpPermission() && !owner.isAuthorized("essentials.warp." + name))
|
if (ess.getSettings().getPerWarpPermission() && !owner.isAuthorized("essentials.warps." + name))
|
||||||
{
|
{
|
||||||
throw new Exception(_("warpUsePermission"));
|
throw new Exception(_("warpUsePermission"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue