mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-19 16:59:37 +01:00
Updating permissions for consistency.
This commit is contained in:
parent
d444e088c4
commit
974862a60a
@ -64,7 +64,7 @@ public final class ChatAPI {
|
|||||||
mcMMO.p.getLogger().info("[A]<" + chatEvent.getSender() + "> " + chatEvent.getMessage());
|
mcMMO.p.getLogger().info("[A]<" + chatEvent.getSender() + "> " + chatEvent.getMessage());
|
||||||
|
|
||||||
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
|
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
|
||||||
if (Permissions.getInstance().adminChat(player) || player.isOp())
|
if (Permissions.adminChat(player) || player.isOp())
|
||||||
player.sendMessage(aPrefix + chatEvent.getMessage());
|
player.sendMessage(aPrefix + chatEvent.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ public class CommandHelper {
|
|||||||
if (sender instanceof Player) {
|
if (sender instanceof Player) {
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
|
|
||||||
if (!Permissions.getInstance().permission(player, permission)) {
|
if (!Permissions.hasPermission(player, permission)) {
|
||||||
player.sendMessage(LocaleLoader.getString("mcMMO.NoPermission"));
|
player.sendMessage(LocaleLoader.getString("mcMMO.NoPermission"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -58,23 +58,23 @@ public class CommandHelper {
|
|||||||
|
|
||||||
display.sendMessage(LocaleLoader.getString("Stats.Header.Gathering"));
|
display.sendMessage(LocaleLoader.getString("Stats.Header.Gathering"));
|
||||||
|
|
||||||
if (Permissions.getInstance().excavation(inspect)) {
|
if (Permissions.excavation(inspect)) {
|
||||||
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Excavation.Listener"), profile.getSkillLevel(SkillType.EXCAVATION), profile.getSkillXpLevel(SkillType.EXCAVATION), profile.getXpToLevel(SkillType.EXCAVATION) }));
|
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Excavation.Listener"), profile.getSkillLevel(SkillType.EXCAVATION), profile.getSkillXpLevel(SkillType.EXCAVATION), profile.getXpToLevel(SkillType.EXCAVATION) }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().fishing(inspect)) {
|
if (Permissions.fishing(inspect)) {
|
||||||
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Fishing.Listener"), profile.getSkillLevel(SkillType.FISHING), profile.getSkillXpLevel(SkillType.FISHING), profile.getXpToLevel(SkillType.FISHING) }));
|
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Fishing.Listener"), profile.getSkillLevel(SkillType.FISHING), profile.getSkillXpLevel(SkillType.FISHING), profile.getXpToLevel(SkillType.FISHING) }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().herbalism(inspect)) {
|
if (Permissions.herbalism(inspect)) {
|
||||||
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Herbalism.Listener"), profile.getSkillLevel(SkillType.HERBALISM), profile.getSkillXpLevel(SkillType.HERBALISM), profile.getXpToLevel(SkillType.HERBALISM) }));
|
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Herbalism.Listener"), profile.getSkillLevel(SkillType.HERBALISM), profile.getSkillXpLevel(SkillType.HERBALISM), profile.getXpToLevel(SkillType.HERBALISM) }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().mining(inspect)) {
|
if (Permissions.mining(inspect)) {
|
||||||
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Mining.Listener"), profile.getSkillLevel(SkillType.MINING), profile.getSkillXpLevel(SkillType.MINING), profile.getXpToLevel(SkillType.MINING) }));
|
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Mining.Listener"), profile.getSkillLevel(SkillType.MINING), profile.getSkillXpLevel(SkillType.MINING), profile.getXpToLevel(SkillType.MINING) }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().woodcutting(inspect)) {
|
if (Permissions.woodcutting(inspect)) {
|
||||||
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Woodcutting.Listener"), profile.getSkillLevel(SkillType.WOODCUTTING), profile.getSkillXpLevel(SkillType.WOODCUTTING), profile.getXpToLevel(SkillType.WOODCUTTING) }));
|
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Woodcutting.Listener"), profile.getSkillLevel(SkillType.WOODCUTTING), profile.getSkillXpLevel(SkillType.WOODCUTTING), profile.getXpToLevel(SkillType.WOODCUTTING) }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -101,23 +101,23 @@ public class CommandHelper {
|
|||||||
|
|
||||||
display.sendMessage(LocaleLoader.getString("Stats.Header.Combat"));
|
display.sendMessage(LocaleLoader.getString("Stats.Header.Combat"));
|
||||||
|
|
||||||
if (Permissions.getInstance().axes(inspect)) {
|
if (Permissions.axes(inspect)) {
|
||||||
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Axes.Listener"), profile.getSkillLevel(SkillType.AXES), profile.getSkillXpLevel(SkillType.AXES), profile.getXpToLevel(SkillType.AXES) }));
|
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Axes.Listener"), profile.getSkillLevel(SkillType.AXES), profile.getSkillXpLevel(SkillType.AXES), profile.getXpToLevel(SkillType.AXES) }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().archery(inspect)) {
|
if (Permissions.archery(inspect)) {
|
||||||
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Archery.Listener"), profile.getSkillLevel(SkillType.ARCHERY), profile.getSkillXpLevel(SkillType.ARCHERY), profile.getXpToLevel(SkillType.ARCHERY) }));
|
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Archery.Listener"), profile.getSkillLevel(SkillType.ARCHERY), profile.getSkillXpLevel(SkillType.ARCHERY), profile.getXpToLevel(SkillType.ARCHERY) }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().swords(inspect)) {
|
if (Permissions.swords(inspect)) {
|
||||||
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Swords.Listener"), profile.getSkillLevel(SkillType.SWORDS), profile.getSkillXpLevel(SkillType.SWORDS), profile.getXpToLevel(SkillType.SWORDS) }));
|
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Swords.Listener"), profile.getSkillLevel(SkillType.SWORDS), profile.getSkillXpLevel(SkillType.SWORDS), profile.getXpToLevel(SkillType.SWORDS) }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().taming(inspect)) {
|
if (Permissions.taming(inspect)) {
|
||||||
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Taming.Listener"), profile.getSkillLevel(SkillType.TAMING), profile.getSkillXpLevel(SkillType.TAMING), profile.getXpToLevel(SkillType.TAMING) }));
|
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Taming.Listener"), profile.getSkillLevel(SkillType.TAMING), profile.getSkillXpLevel(SkillType.TAMING), profile.getXpToLevel(SkillType.TAMING) }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().unarmed(inspect)) {
|
if (Permissions.unarmed(inspect)) {
|
||||||
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Unarmed.Listener"), profile.getSkillLevel(SkillType.UNARMED), profile.getSkillXpLevel(SkillType.UNARMED), profile.getXpToLevel(SkillType.UNARMED) }));
|
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Unarmed.Listener"), profile.getSkillLevel(SkillType.UNARMED), profile.getSkillXpLevel(SkillType.UNARMED), profile.getXpToLevel(SkillType.UNARMED) }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -144,11 +144,11 @@ public class CommandHelper {
|
|||||||
|
|
||||||
display.sendMessage(LocaleLoader.getString("Stats.Header.Misc"));
|
display.sendMessage(LocaleLoader.getString("Stats.Header.Misc"));
|
||||||
|
|
||||||
if (Permissions.getInstance().acrobatics(inspect)) {
|
if (Permissions.acrobatics(inspect)) {
|
||||||
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Acrobatics.Listener"), profile.getSkillLevel(SkillType.ACROBATICS), profile.getSkillXpLevel(SkillType.ACROBATICS), profile.getXpToLevel(SkillType.ACROBATICS) }));
|
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Acrobatics.Listener"), profile.getSkillLevel(SkillType.ACROBATICS), profile.getSkillXpLevel(SkillType.ACROBATICS), profile.getXpToLevel(SkillType.ACROBATICS) }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().repair(inspect)) {
|
if (Permissions.repair(inspect)) {
|
||||||
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Repair.Listener"), profile.getSkillLevel(SkillType.REPAIR), profile.getSkillXpLevel(SkillType.REPAIR), profile.getXpToLevel(SkillType.REPAIR) }));
|
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Repair.Listener"), profile.getSkillLevel(SkillType.REPAIR), profile.getSkillXpLevel(SkillType.REPAIR), profile.getXpToLevel(SkillType.REPAIR) }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,6 @@ public abstract class SkillCommand implements CommandExecutor {
|
|||||||
protected float skillValue;
|
protected float skillValue;
|
||||||
|
|
||||||
protected DecimalFormat percent = new DecimalFormat("##0.00%");
|
protected DecimalFormat percent = new DecimalFormat("##0.00%");
|
||||||
protected Permissions permInstance = Permissions.getInstance();
|
|
||||||
|
|
||||||
public SkillCommand(SkillType skill) {
|
public SkillCommand(SkillType skill) {
|
||||||
this.skill = skill;
|
this.skill = skill;
|
||||||
|
@ -30,7 +30,7 @@ public class InspectCommand implements CommandExecutor {
|
|||||||
if (mcmmoPlayer != null) {
|
if (mcmmoPlayer != null) {
|
||||||
Player target = mcmmoPlayer.getPlayer();
|
Player target = mcmmoPlayer.getPlayer();
|
||||||
|
|
||||||
if (sender instanceof Player && !sender.isOp() && !Misc.isNear(((Player) sender).getLocation(), target.getLocation(), 5.0) && !Permissions.getInstance().inspectDistanceBypass((Player) sender)) {
|
if (sender instanceof Player && !sender.isOp() && !Misc.isNear(((Player) sender).getLocation(), target.getLocation(), 5.0) && !Permissions.inspectDistanceBypass((Player) sender)) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Inspect.TooFar"));
|
sender.sendMessage(LocaleLoader.getString("Inspect.TooFar"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@ public class InspectCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (sender instanceof Player && !sender.isOp() && !Permissions.getInstance().inspectOfflineBypass((Player) sender)) {
|
if (sender instanceof Player && !sender.isOp() && !Permissions.inspectOfflineBypass((Player) sender)) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Inspect.Offline"));
|
sender.sendMessage(LocaleLoader.getString("Inspect.Offline"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -24,19 +24,19 @@ public class MccCommand implements CommandExecutor {
|
|||||||
|
|
||||||
player.sendMessage(ChatColor.RED + "---[]" + ChatColor.YELLOW + "mcMMO Commands" + ChatColor.RED + "[]---"); //TODO: Needs more locale.
|
player.sendMessage(ChatColor.RED + "---[]" + ChatColor.YELLOW + "mcMMO Commands" + ChatColor.RED + "[]---"); //TODO: Needs more locale.
|
||||||
|
|
||||||
if (Permissions.getInstance().party(player)) {
|
if (Permissions.party(player)) {
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Commands"));
|
player.sendMessage(LocaleLoader.getString("Commands.Party.Commands"));
|
||||||
player.sendMessage("/party " + LocaleLoader.getString("Commands.Party"));
|
player.sendMessage("/party " + LocaleLoader.getString("Commands.Party"));
|
||||||
player.sendMessage("/party q " + LocaleLoader.getString("Commands.Party.Quit"));
|
player.sendMessage("/party q " + LocaleLoader.getString("Commands.Party.Quit"));
|
||||||
|
|
||||||
if (Permissions.getInstance().partyChat(player)) {
|
if (Permissions.partyChat(player)) {
|
||||||
player.sendMessage("/p " + LocaleLoader.getString("Commands.Party.Toggle"));
|
player.sendMessage("/p " + LocaleLoader.getString("Commands.Party.Toggle"));
|
||||||
}
|
}
|
||||||
|
|
||||||
player.sendMessage("/invite " + LocaleLoader.getString("Commands.Party.Invite"));
|
player.sendMessage("/invite " + LocaleLoader.getString("Commands.Party.Invite"));
|
||||||
player.sendMessage("/accept " + LocaleLoader.getString("Commands.Party.Accept"));
|
player.sendMessage("/accept " + LocaleLoader.getString("Commands.Party.Accept"));
|
||||||
|
|
||||||
if (Permissions.getInstance().partyTeleport(player)) {
|
if (Permissions.partyTeleport(player)) {
|
||||||
player.sendMessage("/ptp " + LocaleLoader.getString("Commands.Party.Teleport"));
|
player.sendMessage("/ptp " + LocaleLoader.getString("Commands.Party.Teleport"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -45,27 +45,27 @@ public class MccCommand implements CommandExecutor {
|
|||||||
player.sendMessage("/mcstats " + LocaleLoader.getString("Commands.Stats"));
|
player.sendMessage("/mcstats " + LocaleLoader.getString("Commands.Stats"));
|
||||||
player.sendMessage("/mctop " + LocaleLoader.getString("Commands.Leaderboards"));
|
player.sendMessage("/mctop " + LocaleLoader.getString("Commands.Leaderboards"));
|
||||||
|
|
||||||
if (Config.getInstance().getCommandSkillResetEnabled() && Permissions.getInstance().skillReset(player)) {
|
if (Config.getInstance().getCommandSkillResetEnabled() && Permissions.skillReset(player)) {
|
||||||
player.sendMessage("/skillreset <skill|all> " + LocaleLoader.getString("Commands.Reset"));
|
player.sendMessage("/skillreset <skill|all> " + LocaleLoader.getString("Commands.Reset"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().mcAbility(player)) {
|
if (Permissions.mcAbility(player)) {
|
||||||
player.sendMessage("/mcability " + LocaleLoader.getString("Commands.ToggleAbility"));
|
player.sendMessage("/mcability " + LocaleLoader.getString("Commands.ToggleAbility"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().adminChat(player)) {
|
if (Permissions.adminChat(player)) {
|
||||||
player.sendMessage("/a " + LocaleLoader.getString("Commands.AdminToggle"));
|
player.sendMessage("/a " + LocaleLoader.getString("Commands.AdminToggle"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().inspect(player)) {
|
if (Permissions.inspect(player)) {
|
||||||
player.sendMessage("/inspect " + LocaleLoader.getString("Commands.Inspect"));
|
player.sendMessage("/inspect " + LocaleLoader.getString("Commands.Inspect"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().mmoedit(player)) {
|
if (Permissions.mmoedit(player)) {
|
||||||
player.sendMessage("/mmoedit " + LocaleLoader.getString("Commands.mmoedit"));
|
player.sendMessage("/mmoedit " + LocaleLoader.getString("Commands.mmoedit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().mcgod(player)) {
|
if (Permissions.mcgod(player)) {
|
||||||
player.sendMessage("/mcgod " + LocaleLoader.getString("Commands.mcgod"));
|
player.sendMessage("/mcgod " + LocaleLoader.getString("Commands.mcgod"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ public class ACommand implements CommandExecutor {
|
|||||||
plugin.getLogger().info("[A]<" + player.getName() + "> " + message);
|
plugin.getLogger().info("[A]<" + player.getName() + "> " + message);
|
||||||
|
|
||||||
for (Player otherPlayer : plugin.getServer().getOnlinePlayers()) {
|
for (Player otherPlayer : plugin.getServer().getOnlinePlayers()) {
|
||||||
if (Permissions.getInstance().adminChat(otherPlayer) || otherPlayer.isOp()) {
|
if (Permissions.adminChat(otherPlayer) || otherPlayer.isOp()) {
|
||||||
otherPlayer.sendMessage(prefix + message);
|
otherPlayer.sendMessage(prefix + message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ public class ACommand implements CommandExecutor {
|
|||||||
plugin.getLogger().info("[A]<*Console*> " + message);
|
plugin.getLogger().info("[A]<*Console*> " + message);
|
||||||
|
|
||||||
for (Player player : plugin.getServer().getOnlinePlayers()) {
|
for (Player player : plugin.getServer().getOnlinePlayers()) {
|
||||||
if (Permissions.getInstance().adminChat(player) || player.isOp()) {
|
if (Permissions.adminChat(player) || player.isOp()) {
|
||||||
player.sendMessage(prefix + message);
|
player.sendMessage(prefix + message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import com.gmail.nossr50.commands.SkillCommand;
|
|||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
import com.gmail.nossr50.datatypes.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class AcrobaticsCommand extends SkillCommand {
|
public class AcrobaticsCommand extends SkillCommand {
|
||||||
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||||
@ -26,6 +27,7 @@ public class AcrobaticsCommand extends SkillCommand {
|
|||||||
private boolean canDodge;
|
private boolean canDodge;
|
||||||
private boolean canRoll;
|
private boolean canRoll;
|
||||||
private boolean canGracefulRoll;
|
private boolean canGracefulRoll;
|
||||||
|
private boolean lucky;
|
||||||
|
|
||||||
public AcrobaticsCommand() {
|
public AcrobaticsCommand() {
|
||||||
super(SkillType.ACROBATICS);
|
super(SkillType.ACROBATICS);
|
||||||
@ -47,9 +49,10 @@ public class AcrobaticsCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck() {
|
protected void permissionsCheck() {
|
||||||
canDodge = permInstance.dodge(player);
|
canDodge = Permissions.dodge(player);
|
||||||
canRoll = permInstance.roll(player);
|
canRoll = Permissions.roll(player);
|
||||||
canGracefulRoll = permInstance.gracefulRoll(player);
|
canGracefulRoll = Permissions.gracefulRoll(player);
|
||||||
|
lucky = Permissions.luckyAcrobatics(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -59,7 +62,7 @@ public class AcrobaticsCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void effectsDisplay() {
|
protected void effectsDisplay() {
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.acrobatics")) {
|
if (lucky) {
|
||||||
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Acrobatics" }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Acrobatics" }) }));
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import com.gmail.nossr50.commands.SkillCommand;
|
|||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
import com.gmail.nossr50.datatypes.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class ArcheryCommand extends SkillCommand {
|
public class ArcheryCommand extends SkillCommand {
|
||||||
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||||
@ -30,6 +31,7 @@ public class ArcheryCommand extends SkillCommand {
|
|||||||
private boolean canSkillShot;
|
private boolean canSkillShot;
|
||||||
private boolean canDaze;
|
private boolean canDaze;
|
||||||
private boolean canRetrieve;
|
private boolean canRetrieve;
|
||||||
|
private boolean lucky;
|
||||||
|
|
||||||
public ArcheryCommand() {
|
public ArcheryCommand() {
|
||||||
super(SkillType.ARCHERY);
|
super(SkillType.ARCHERY);
|
||||||
@ -54,9 +56,10 @@ public class ArcheryCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck() {
|
protected void permissionsCheck() {
|
||||||
canSkillShot = permInstance.archeryBonus(player);
|
canSkillShot = Permissions.archeryBonus(player);
|
||||||
canDaze = permInstance.daze(player);
|
canDaze = Permissions.daze(player);
|
||||||
canRetrieve = permInstance.trackArrows(player);
|
canRetrieve = Permissions.trackArrows(player);
|
||||||
|
lucky = Permissions.luckyArchery(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -66,7 +69,7 @@ public class ArcheryCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void effectsDisplay() {
|
protected void effectsDisplay() {
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.archery")) {
|
if (lucky) {
|
||||||
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Archery" }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Archery" }) }));
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
|
|||||||
import com.gmail.nossr50.datatypes.SkillType;
|
import com.gmail.nossr50.datatypes.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class AxesCommand extends SkillCommand {
|
public class AxesCommand extends SkillCommand {
|
||||||
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||||
@ -32,6 +33,7 @@ public class AxesCommand extends SkillCommand {
|
|||||||
private boolean canBonusDamage;
|
private boolean canBonusDamage;
|
||||||
private boolean canImpact;
|
private boolean canImpact;
|
||||||
private boolean canGreaterImpact;
|
private boolean canGreaterImpact;
|
||||||
|
private boolean lucky;
|
||||||
|
|
||||||
public AxesCommand() {
|
public AxesCommand() {
|
||||||
super(SkillType.AXES);
|
super(SkillType.AXES);
|
||||||
@ -54,11 +56,12 @@ public class AxesCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck() {
|
protected void permissionsCheck() {
|
||||||
canSkullSplitter = permInstance.skullSplitter(player);
|
canSkullSplitter = Permissions.skullSplitter(player);
|
||||||
canCritical = permInstance.criticalHit(player);
|
canCritical = Permissions.criticalHit(player);
|
||||||
canBonusDamage = permInstance.axeBonus(player);
|
canBonusDamage = Permissions.axeBonus(player);
|
||||||
canImpact = permInstance.impact(player);
|
canImpact = Permissions.impact(player);
|
||||||
canGreaterImpact = permInstance.greaterImpact(player);
|
canGreaterImpact = Permissions.greaterImpact(player);
|
||||||
|
lucky = Permissions.luckyAxes(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -68,7 +71,7 @@ public class AxesCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void effectsDisplay() {
|
protected void effectsDisplay() {
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.axes")) {
|
if (lucky) {
|
||||||
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Axes" }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Axes" }) }));
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import com.gmail.nossr50.commands.SkillCommand;
|
|||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
import com.gmail.nossr50.datatypes.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class ExcavationCommand extends SkillCommand {
|
public class ExcavationCommand extends SkillCommand {
|
||||||
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||||
@ -15,6 +16,7 @@ public class ExcavationCommand extends SkillCommand {
|
|||||||
|
|
||||||
private boolean canGigaDrill;
|
private boolean canGigaDrill;
|
||||||
private boolean canTreasureHunt;
|
private boolean canTreasureHunt;
|
||||||
|
private boolean lucky;
|
||||||
|
|
||||||
public ExcavationCommand() {
|
public ExcavationCommand() {
|
||||||
super(SkillType.EXCAVATION);
|
super(SkillType.EXCAVATION);
|
||||||
@ -27,8 +29,9 @@ public class ExcavationCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck() {
|
protected void permissionsCheck() {
|
||||||
canGigaDrill = permInstance.gigaDrillBreaker(player);
|
canGigaDrill = Permissions.gigaDrillBreaker(player);
|
||||||
canTreasureHunt = permInstance.excavationTreasures(player);
|
canTreasureHunt = Permissions.excavationTreasures(player);
|
||||||
|
lucky = Permissions.luckyExcavation(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -38,7 +41,7 @@ public class ExcavationCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void effectsDisplay() {
|
protected void effectsDisplay() {
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.excavation")) {
|
if (lucky) {
|
||||||
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Excavation" }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Excavation" }) }));
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
|
|||||||
import com.gmail.nossr50.datatypes.SkillType;
|
import com.gmail.nossr50.datatypes.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.gathering.Fishing;
|
import com.gmail.nossr50.skills.gathering.Fishing;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class FishingCommand extends SkillCommand {
|
public class FishingCommand extends SkillCommand {
|
||||||
|
|
||||||
@ -22,6 +23,7 @@ public class FishingCommand extends SkillCommand {
|
|||||||
private boolean canMagicHunt;
|
private boolean canMagicHunt;
|
||||||
private boolean canShake;
|
private boolean canShake;
|
||||||
private boolean canFishermansDiet;
|
private boolean canFishermansDiet;
|
||||||
|
private boolean lucky;
|
||||||
|
|
||||||
public FishingCommand() {
|
public FishingCommand() {
|
||||||
super(SkillType.FISHING);
|
super(SkillType.FISHING);
|
||||||
@ -32,7 +34,7 @@ public class FishingCommand extends SkillCommand {
|
|||||||
lootTier = Fishing.getFishingLootTier(profile);
|
lootTier = Fishing.getFishingLootTier(profile);
|
||||||
magicChance = percent.format(lootTier / 15D);
|
magicChance = percent.format(lootTier / 15D);
|
||||||
int dropChance = Fishing.getShakeChance(lootTier);
|
int dropChance = Fishing.getShakeChance(lootTier);
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.fishing")) {
|
if (Permissions.luckyFishing(player)) {
|
||||||
dropChance = (int) (dropChance * 1.25D);
|
dropChance = (int) (dropChance * 1.25D);
|
||||||
}
|
}
|
||||||
shakeChance = String.valueOf(dropChance);
|
shakeChance = String.valueOf(dropChance);
|
||||||
@ -57,10 +59,11 @@ public class FishingCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck() {
|
protected void permissionsCheck() {
|
||||||
canTreasureHunt = permInstance.fishingTreasures(player);
|
canTreasureHunt = Permissions.fishingTreasures(player);
|
||||||
canMagicHunt = permInstance.fishingMagic(player);
|
canMagicHunt = Permissions.fishingMagic(player);
|
||||||
canShake = permInstance.shakeMob(player);
|
canShake = Permissions.shakeMob(player);
|
||||||
canFishermansDiet = permInstance.fishermansDiet(player);
|
canFishermansDiet = Permissions.fishermansDiet(player);
|
||||||
|
lucky = Permissions.luckyFishing(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -70,7 +73,7 @@ public class FishingCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void effectsDisplay() {
|
protected void effectsDisplay() {
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.fishing")) {
|
if (lucky) {
|
||||||
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Fishing" }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Fishing" }) }));
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
|
|||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
import com.gmail.nossr50.datatypes.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class HerbalismCommand extends SkillCommand {
|
public class HerbalismCommand extends SkillCommand {
|
||||||
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||||
@ -35,6 +36,7 @@ public class HerbalismCommand extends SkillCommand {
|
|||||||
private boolean canFarmersDiet;
|
private boolean canFarmersDiet;
|
||||||
private boolean canDoubleDrop;
|
private boolean canDoubleDrop;
|
||||||
private boolean doubleDropsDisabled;
|
private boolean doubleDropsDisabled;
|
||||||
|
private boolean lucky;
|
||||||
|
|
||||||
public HerbalismCommand() {
|
public HerbalismCommand() {
|
||||||
super(SkillType.HERBALISM);
|
super(SkillType.HERBALISM);
|
||||||
@ -63,12 +65,13 @@ public class HerbalismCommand extends SkillCommand {
|
|||||||
protected void permissionsCheck() {
|
protected void permissionsCheck() {
|
||||||
Config configInstance = Config.getInstance();
|
Config configInstance = Config.getInstance();
|
||||||
|
|
||||||
canGreenTerra = permInstance.greenTerra(player);
|
canGreenTerra = Permissions.greenTerra(player);
|
||||||
canGreenThumbWheat = permInstance.greenThumbWheat(player);
|
canGreenThumbWheat = Permissions.greenThumbWheat(player);
|
||||||
canGreenThumbBlocks = permInstance.greenThumbBlocks(player);
|
canGreenThumbBlocks = Permissions.greenThumbBlocks(player);
|
||||||
canFarmersDiet = permInstance.farmersDiet(player);
|
canFarmersDiet = Permissions.farmersDiet(player);
|
||||||
canDoubleDrop = permInstance.herbalismDoubleDrops(player);
|
canDoubleDrop = Permissions.herbalismDoubleDrops(player);
|
||||||
doubleDropsDisabled = configInstance.herbalismDoubleDropsDisabled();
|
doubleDropsDisabled = configInstance.herbalismDoubleDropsDisabled();
|
||||||
|
lucky = Permissions.luckyHerbalism(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -78,7 +81,7 @@ public class HerbalismCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void effectsDisplay() {
|
protected void effectsDisplay() {
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.herbalism")) {
|
if (lucky) {
|
||||||
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Herbalism" }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Herbalism" }) }));
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import com.gmail.nossr50.config.Config;
|
|||||||
import com.gmail.nossr50.datatypes.SkillType;
|
import com.gmail.nossr50.datatypes.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class MiningCommand extends SkillCommand {
|
public class MiningCommand extends SkillCommand {
|
||||||
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||||
@ -38,6 +39,7 @@ public class MiningCommand extends SkillCommand {
|
|||||||
private boolean canBiggerBombs;
|
private boolean canBiggerBombs;
|
||||||
private boolean canDemoExpert;
|
private boolean canDemoExpert;
|
||||||
private boolean doubleDropsDisabled;
|
private boolean doubleDropsDisabled;
|
||||||
|
private boolean lucky;
|
||||||
|
|
||||||
public MiningCommand() {
|
public MiningCommand() {
|
||||||
super(SkillType.MINING);
|
super(SkillType.MINING);
|
||||||
@ -101,12 +103,13 @@ public class MiningCommand extends SkillCommand {
|
|||||||
protected void permissionsCheck() {
|
protected void permissionsCheck() {
|
||||||
Config configInstance = Config.getInstance();
|
Config configInstance = Config.getInstance();
|
||||||
|
|
||||||
canBiggerBombs = permInstance.biggerBombs(player);
|
canBiggerBombs = Permissions.biggerBombs(player);
|
||||||
canBlast = permInstance.blastMining(player);
|
canBlast = Permissions.blastMining(player);
|
||||||
canDemoExpert = permInstance.demolitionsExpertise(player);
|
canDemoExpert = Permissions.demolitionsExpertise(player);
|
||||||
canDoubleDrop = permInstance.miningDoubleDrops(player);
|
canDoubleDrop = Permissions.miningDoubleDrops(player);
|
||||||
canSuperBreaker = permInstance.superBreaker(player);
|
canSuperBreaker = Permissions.superBreaker(player);
|
||||||
doubleDropsDisabled = configInstance.miningDoubleDropsDisabled();
|
doubleDropsDisabled = configInstance.miningDoubleDropsDisabled();
|
||||||
|
lucky = Permissions.luckyMining(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -116,7 +119,7 @@ public class MiningCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void effectsDisplay() {
|
protected void effectsDisplay() {
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.mining")) {
|
if (lucky) {
|
||||||
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Mining" }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Mining" }) }));
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ import com.gmail.nossr50.datatypes.SkillType;
|
|||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.repair.Repair;
|
import com.gmail.nossr50.skills.repair.Repair;
|
||||||
import com.gmail.nossr50.skills.repair.Repairable;
|
import com.gmail.nossr50.skills.repair.Repairable;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class RepairCommand extends SkillCommand {
|
public class RepairCommand extends SkillCommand {
|
||||||
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||||
@ -36,6 +37,7 @@ public class RepairCommand extends SkillCommand {
|
|||||||
private boolean canRepairLeather;
|
private boolean canRepairLeather;
|
||||||
private boolean canRepairWood;
|
private boolean canRepairWood;
|
||||||
private boolean arcaneBypass;
|
private boolean arcaneBypass;
|
||||||
|
private boolean lucky;
|
||||||
|
|
||||||
private int salvageLevel;
|
private int salvageLevel;
|
||||||
private int diamondLevel;
|
private int diamondLevel;
|
||||||
@ -74,18 +76,19 @@ public class RepairCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck() {
|
protected void permissionsCheck() {
|
||||||
canSuperRepair = permInstance.repairBonus(player);
|
canSuperRepair = Permissions.repairBonus(player);
|
||||||
canMasterRepair = permInstance.repairMastery(player);
|
canMasterRepair = Permissions.repairMastery(player);
|
||||||
canArcaneForge = permInstance.arcaneForging(player);
|
canArcaneForge = Permissions.arcaneForging(player);
|
||||||
canSalvage = permInstance.salvage(player);
|
canSalvage = Permissions.salvage(player);
|
||||||
canRepairDiamond = permInstance.diamondRepair(player);
|
canRepairDiamond = Permissions.diamondRepair(player);
|
||||||
canRepairGold = permInstance.goldRepair(player);
|
canRepairGold = Permissions.goldRepair(player);
|
||||||
canRepairIron = permInstance.ironRepair(player);
|
canRepairIron = Permissions.ironRepair(player);
|
||||||
canRepairStone = permInstance.stoneRepair(player);
|
canRepairStone = Permissions.stoneRepair(player);
|
||||||
canRepairString = permInstance.stringRepair(player);
|
canRepairString = Permissions.stringRepair(player);
|
||||||
canRepairLeather = permInstance.leatherRepair(player);
|
canRepairLeather = Permissions.leatherRepair(player);
|
||||||
canRepairWood = permInstance.woodRepair(player);
|
canRepairWood = Permissions.woodRepair(player);
|
||||||
arcaneBypass = permInstance.arcaneBypass(player);
|
arcaneBypass = Permissions.arcaneBypass(player);
|
||||||
|
lucky = Permissions.luckyRepair(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -95,7 +98,7 @@ public class RepairCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void effectsDisplay() {
|
protected void effectsDisplay() {
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.repair")) {
|
if (lucky) {
|
||||||
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Repair" }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Repair" }) }));
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import com.gmail.nossr50.commands.SkillCommand;
|
|||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
import com.gmail.nossr50.datatypes.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class SwordsCommand extends SkillCommand {
|
public class SwordsCommand extends SkillCommand {
|
||||||
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||||
@ -29,6 +30,7 @@ public class SwordsCommand extends SkillCommand {
|
|||||||
private boolean canCounter;
|
private boolean canCounter;
|
||||||
private boolean canSerratedStrike;
|
private boolean canSerratedStrike;
|
||||||
private boolean canBleed;
|
private boolean canBleed;
|
||||||
|
private boolean lucky;
|
||||||
|
|
||||||
public SwordsCommand() {
|
public SwordsCommand() {
|
||||||
super(SkillType.SWORDS);
|
super(SkillType.SWORDS);
|
||||||
@ -53,9 +55,10 @@ public class SwordsCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck() {
|
protected void permissionsCheck() {
|
||||||
canBleed = permInstance.swordsBleed(player);
|
canBleed = Permissions.swordsBleed(player);
|
||||||
canCounter = permInstance.counterAttack(player);
|
canCounter = Permissions.counterAttack(player);
|
||||||
canSerratedStrike = permInstance.serratedStrikes(player);
|
canSerratedStrike = Permissions.serratedStrikes(player);
|
||||||
|
lucky = Permissions.luckySwords(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -65,7 +68,7 @@ public class SwordsCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void effectsDisplay() {
|
protected void effectsDisplay() {
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.swords")) {
|
if (lucky) {
|
||||||
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Swords" }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Swords" }) }));
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
|
|||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
import com.gmail.nossr50.datatypes.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class TamingCommand extends SkillCommand {
|
public class TamingCommand extends SkillCommand {
|
||||||
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||||
@ -31,6 +32,7 @@ public class TamingCommand extends SkillCommand {
|
|||||||
private boolean canShockProof;
|
private boolean canShockProof;
|
||||||
private boolean canCallWild;
|
private boolean canCallWild;
|
||||||
private boolean canFastFood;
|
private boolean canFastFood;
|
||||||
|
private boolean lucky;
|
||||||
|
|
||||||
public TamingCommand() {
|
public TamingCommand() {
|
||||||
super(SkillType.TAMING);
|
super(SkillType.TAMING);
|
||||||
@ -45,14 +47,15 @@ public class TamingCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck() {
|
protected void permissionsCheck() {
|
||||||
canBeastLore = permInstance.beastLore(player);
|
canBeastLore = Permissions.beastLore(player);
|
||||||
canCallWild = permInstance.callOfTheWild(player);
|
canCallWild = Permissions.callOfTheWild(player);
|
||||||
canEnvironmentallyAware = permInstance.environmentallyAware(player);
|
canEnvironmentallyAware = Permissions.environmentallyAware(player);
|
||||||
canFastFood = permInstance.fastFoodService(player);
|
canFastFood = Permissions.fastFoodService(player);
|
||||||
canGore = permInstance.gore(player);
|
canGore = Permissions.gore(player);
|
||||||
canSharpenedClaws = permInstance.sharpenedClaws(player);
|
canSharpenedClaws = Permissions.sharpenedClaws(player);
|
||||||
canShockProof = permInstance.shockProof(player);
|
canShockProof = Permissions.shockProof(player);
|
||||||
canThickFur = permInstance.thickFur(player);
|
canThickFur = Permissions.thickFur(player);
|
||||||
|
lucky = Permissions.luckyTaming(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -62,7 +65,7 @@ public class TamingCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void effectsDisplay() {
|
protected void effectsDisplay() {
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.taming")) {
|
if (lucky) {
|
||||||
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Taming" }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Taming" }) }));
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import com.gmail.nossr50.commands.SkillCommand;
|
|||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
import com.gmail.nossr50.datatypes.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class UnarmedCommand extends SkillCommand {
|
public class UnarmedCommand extends SkillCommand {
|
||||||
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||||
@ -28,6 +29,7 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
private boolean canDisarm;
|
private boolean canDisarm;
|
||||||
private boolean canBonusDamage;
|
private boolean canBonusDamage;
|
||||||
private boolean canDeflect;
|
private boolean canDeflect;
|
||||||
|
private boolean lucky;
|
||||||
|
|
||||||
public UnarmedCommand() {
|
public UnarmedCommand() {
|
||||||
super(SkillType.UNARMED);
|
super(SkillType.UNARMED);
|
||||||
@ -50,10 +52,11 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck() {
|
protected void permissionsCheck() {
|
||||||
canBerserk = permInstance.berserk(player);
|
canBerserk = Permissions.berserk(player);
|
||||||
canBonusDamage = permInstance.unarmedBonus(player);
|
canBonusDamage = Permissions.unarmedBonus(player);
|
||||||
canDeflect = permInstance.deflect(player);
|
canDeflect = Permissions.deflect(player);
|
||||||
canDisarm = permInstance.disarm(player);
|
canDisarm = Permissions.disarm(player);
|
||||||
|
lucky = Permissions.luckyUnarmed(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -63,7 +66,7 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void effectsDisplay() {
|
protected void effectsDisplay() {
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.unarmed")) {
|
if (lucky) {
|
||||||
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Unarmed" }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Unarmed" }) }));
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
|
|||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
import com.gmail.nossr50.datatypes.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class WoodcuttingCommand extends SkillCommand {
|
public class WoodcuttingCommand extends SkillCommand {
|
||||||
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||||
@ -24,6 +25,7 @@ public class WoodcuttingCommand extends SkillCommand {
|
|||||||
private boolean canLeafBlow;
|
private boolean canLeafBlow;
|
||||||
private boolean canDoubleDrop;
|
private boolean canDoubleDrop;
|
||||||
private boolean doubleDropsDisabled;
|
private boolean doubleDropsDisabled;
|
||||||
|
private boolean lucky;
|
||||||
|
|
||||||
public WoodcuttingCommand() {
|
public WoodcuttingCommand() {
|
||||||
super(SkillType.WOODCUTTING);
|
super(SkillType.WOODCUTTING);
|
||||||
@ -42,10 +44,11 @@ public class WoodcuttingCommand extends SkillCommand {
|
|||||||
protected void permissionsCheck() {
|
protected void permissionsCheck() {
|
||||||
Config configInstance = Config.getInstance();
|
Config configInstance = Config.getInstance();
|
||||||
|
|
||||||
canTreeFell = permInstance.treeFeller(player);
|
canTreeFell = Permissions.treeFeller(player);
|
||||||
canDoubleDrop = permInstance.woodcuttingDoubleDrops(player);
|
canDoubleDrop = Permissions.woodcuttingDoubleDrops(player);
|
||||||
canLeafBlow = permInstance.leafBlower(player);
|
canLeafBlow = Permissions.leafBlower(player);
|
||||||
doubleDropsDisabled = configInstance.woodcuttingDoubleDropsDisabled();
|
doubleDropsDisabled = configInstance.woodcuttingDoubleDropsDisabled();
|
||||||
|
lucky = Permissions.luckyWoodcutting(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -55,7 +58,7 @@ public class WoodcuttingCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void effectsDisplay() {
|
protected void effectsDisplay() {
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.woodcutting")) {
|
if (lucky) {
|
||||||
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Woodcutting" }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Woodcutting" }) }));
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ public class XplockCommand implements CommandExecutor {
|
|||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
if (Skills.isSkill(args[0])) {
|
if (Skills.isSkill(args[0])) {
|
||||||
if (Permissions.getInstance().permission(player, "mcmmo.skills." + args[0].toLowerCase())) {
|
if (Permissions.hasPermission(player, "mcmmo.skills." + args[0].toLowerCase())) {
|
||||||
spoutHud.setXpBarLocked(true);
|
spoutHud.setXpBarLocked(true);
|
||||||
spoutHud.setSkillLock(Skills.getSkillType(args[0]));
|
spoutHud.setSkillLock(Skills.getSkillType(args[0]));
|
||||||
spoutHud.updateXpBar();
|
spoutHud.updateXpBar();
|
||||||
|
@ -144,35 +144,34 @@ public enum AbilityType {
|
|||||||
* @return true if the player has permissions, false otherwise
|
* @return true if the player has permissions, false otherwise
|
||||||
*/
|
*/
|
||||||
public boolean getPermissions(Player player) {
|
public boolean getPermissions(Player player) {
|
||||||
Permissions permInstance = Permissions.getInstance();
|
|
||||||
|
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case BERSERK:
|
case BERSERK:
|
||||||
return permInstance.berserk(player);
|
return Permissions.berserk(player);
|
||||||
|
|
||||||
case BLAST_MINING:
|
case BLAST_MINING:
|
||||||
return permInstance.blastMining(player);
|
return Permissions.blastMining(player);
|
||||||
|
|
||||||
case GIGA_DRILL_BREAKER:
|
case GIGA_DRILL_BREAKER:
|
||||||
return permInstance.gigaDrillBreaker(player);
|
return Permissions.gigaDrillBreaker(player);
|
||||||
|
|
||||||
case GREEN_TERRA:
|
case GREEN_TERRA:
|
||||||
return permInstance.greenTerra(player);
|
return Permissions.greenTerra(player);
|
||||||
|
|
||||||
case LEAF_BLOWER:
|
case LEAF_BLOWER:
|
||||||
return permInstance.leafBlower(player);
|
return Permissions.leafBlower(player);
|
||||||
|
|
||||||
case SERRATED_STRIKES:
|
case SERRATED_STRIKES:
|
||||||
return permInstance.serratedStrikes(player);
|
return Permissions.serratedStrikes(player);
|
||||||
|
|
||||||
case SKULL_SPLIITER:
|
case SKULL_SPLIITER:
|
||||||
return permInstance.skullSplitter(player);
|
return Permissions.skullSplitter(player);
|
||||||
|
|
||||||
case SUPER_BREAKER:
|
case SUPER_BREAKER:
|
||||||
return permInstance.superBreaker(player);
|
return Permissions.superBreaker(player);
|
||||||
|
|
||||||
case TREE_FELLER:
|
case TREE_FELLER:
|
||||||
return permInstance.treeFeller(player);
|
return Permissions.treeFeller(player);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
@ -12,6 +12,7 @@ import com.gmail.nossr50.party.Party;
|
|||||||
import com.gmail.nossr50.party.PartyManager;
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.gmail.nossr50.util.ModChecks;
|
import com.gmail.nossr50.util.ModChecks;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.Users;
|
import com.gmail.nossr50.util.Users;
|
||||||
|
|
||||||
public class McMMOPlayer {
|
public class McMMOPlayer {
|
||||||
@ -154,19 +155,19 @@ public class McMMOPlayer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.xp.quadruple")) {
|
if (Permissions.xpQuadruple(player)) {
|
||||||
xp = xp * 4;
|
xp = xp * 4;
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.xp.triple")) {
|
else if (Permissions.xpTriple(player)) {
|
||||||
xp = xp * 3;
|
xp = xp * 3;
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.xp.150percentboost")) {
|
else if (Permissions.xpDoubleAndOneHalf(player)) {
|
||||||
xp = (int) (xp * 2.5);
|
xp = (int) (xp * 2.5);
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.xp.double")) {
|
else if (Permissions.xpDouble(player)) {
|
||||||
xp = xp * 2;
|
xp = xp * 2;
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.xp.50percentboost")) {
|
else if (Permissions.xpOneAndOneHalf(player)) {
|
||||||
xp = (int) (xp * 1.5);
|
xp = (int) (xp * 1.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,40 +75,40 @@ public enum SkillType {
|
|||||||
public boolean getPermissions(Player player) {
|
public boolean getPermissions(Player player) {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case ACROBATICS:
|
case ACROBATICS:
|
||||||
return Permissions.getInstance().acrobatics(player);
|
return Permissions.acrobatics(player);
|
||||||
|
|
||||||
case ARCHERY:
|
case ARCHERY:
|
||||||
return Permissions.getInstance().archery(player);
|
return Permissions.archery(player);
|
||||||
|
|
||||||
case AXES:
|
case AXES:
|
||||||
return Permissions.getInstance().axes(player);
|
return Permissions.axes(player);
|
||||||
|
|
||||||
case EXCAVATION:
|
case EXCAVATION:
|
||||||
return Permissions.getInstance().excavation(player);
|
return Permissions.excavation(player);
|
||||||
|
|
||||||
case FISHING:
|
case FISHING:
|
||||||
return Permissions.getInstance().fishing(player);
|
return Permissions.fishing(player);
|
||||||
|
|
||||||
case HERBALISM:
|
case HERBALISM:
|
||||||
return Permissions.getInstance().herbalism(player);
|
return Permissions.herbalism(player);
|
||||||
|
|
||||||
case MINING:
|
case MINING:
|
||||||
return Permissions.getInstance().mining(player);
|
return Permissions.mining(player);
|
||||||
|
|
||||||
case REPAIR:
|
case REPAIR:
|
||||||
return Permissions.getInstance().repair(player);
|
return Permissions.repair(player);
|
||||||
|
|
||||||
case SWORDS:
|
case SWORDS:
|
||||||
return Permissions.getInstance().swords(player);
|
return Permissions.swords(player);
|
||||||
|
|
||||||
case TAMING:
|
case TAMING:
|
||||||
return Permissions.getInstance().taming(player);
|
return Permissions.taming(player);
|
||||||
|
|
||||||
case UNARMED:
|
case UNARMED:
|
||||||
return Permissions.getInstance().unarmed(player);
|
return Permissions.unarmed(player);
|
||||||
|
|
||||||
case WOODCUTTING:
|
case WOODCUTTING:
|
||||||
return Permissions.getInstance().woodcutting(player);
|
return Permissions.woodcutting(player);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
@ -184,12 +184,11 @@ public class BlockListener implements Listener {
|
|||||||
ItemStack inHand = player.getItemInHand();
|
ItemStack inHand = player.getItemInHand();
|
||||||
|
|
||||||
Config configInstance = Config.getInstance();
|
Config configInstance = Config.getInstance();
|
||||||
Permissions permInstance = Permissions.getInstance();
|
|
||||||
|
|
||||||
/* HERBALISM */
|
/* HERBALISM */
|
||||||
if (BlockChecks.canBeGreenTerra(block)) {
|
if (BlockChecks.canBeGreenTerra(block)) {
|
||||||
/* Green Terra */
|
/* Green Terra */
|
||||||
if (profile.getToolPreparationMode(ToolType.HOE) && permInstance.greenTerra(player)) {
|
if (profile.getToolPreparationMode(ToolType.HOE) && Permissions.greenTerra(player)) {
|
||||||
Skills.abilityCheck(player, SkillType.HERBALISM);
|
Skills.abilityCheck(player, SkillType.HERBALISM);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,13 +197,13 @@ public class BlockListener implements Listener {
|
|||||||
Herbalism.herbalismProcCheck(block, player, event, plugin);
|
Herbalism.herbalismProcCheck(block, player, event, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (permInstance.herbalism(player)) {
|
if (Permissions.herbalism(player)) {
|
||||||
Herbalism.herbalismProcCheck(block, player, event, plugin);
|
Herbalism.herbalismProcCheck(block, player, event, plugin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* MINING */
|
/* MINING */
|
||||||
else if (BlockChecks.canBeSuperBroken(block) && permInstance.mining(player)) {
|
else if (BlockChecks.canBeSuperBroken(block) && Permissions.mining(player)) {
|
||||||
if (configInstance.getMiningRequiresTool()) {
|
if (configInstance.getMiningRequiresTool()) {
|
||||||
if (ItemChecks.isPickaxe(inHand)) {
|
if (ItemChecks.isPickaxe(inHand)) {
|
||||||
Mining.miningBlockCheck(player, block);
|
Mining.miningBlockCheck(player, block);
|
||||||
@ -216,7 +215,7 @@ public class BlockListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* WOOD CUTTING */
|
/* WOOD CUTTING */
|
||||||
else if (BlockChecks.isLog(block) && permInstance.woodcutting(player)) {
|
else if (BlockChecks.isLog(block) && Permissions.woodcutting(player)) {
|
||||||
if (configInstance.getWoodcuttingRequiresTool()) {
|
if (configInstance.getWoodcuttingRequiresTool()) {
|
||||||
if (ItemChecks.isAxe(inHand)) {
|
if (ItemChecks.isAxe(inHand)) {
|
||||||
WoodCutting.woodcuttingBlockCheck(player, block);
|
WoodCutting.woodcuttingBlockCheck(player, block);
|
||||||
@ -226,13 +225,13 @@ public class BlockListener implements Listener {
|
|||||||
WoodCutting.woodcuttingBlockCheck(player, block);
|
WoodCutting.woodcuttingBlockCheck(player, block);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profile.getAbilityMode(AbilityType.TREE_FELLER) && permInstance.treeFeller(player) && ItemChecks.isAxe(inHand)) {
|
if (profile.getAbilityMode(AbilityType.TREE_FELLER) && Permissions.treeFeller(player) && ItemChecks.isAxe(inHand)) {
|
||||||
WoodCutting.treeFeller(event);
|
WoodCutting.treeFeller(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EXCAVATION */
|
/* EXCAVATION */
|
||||||
else if (BlockChecks.canBeGigaDrillBroken(block) && permInstance.excavation(player) && !mcMMO.placeStore.isTrue(block)) {
|
else if (BlockChecks.canBeGigaDrillBroken(block) && Permissions.excavation(player) && !mcMMO.placeStore.isTrue(block)) {
|
||||||
if (configInstance.getExcavationRequiresTool()) {
|
if (configInstance.getExcavationRequiresTool()) {
|
||||||
if (ItemChecks.isShovel(inHand)) {
|
if (ItemChecks.isShovel(inHand)) {
|
||||||
Excavation.excavationProcCheck(block, player);
|
Excavation.excavationProcCheck(block, player);
|
||||||
@ -298,7 +297,6 @@ public class BlockListener implements Listener {
|
|||||||
Material material = block.getType();
|
Material material = block.getType();
|
||||||
|
|
||||||
Config configInstance = Config.getInstance();
|
Config configInstance = Config.getInstance();
|
||||||
Permissions permInstance = Permissions.getInstance();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ABILITY PREPARATION CHECKS
|
* ABILITY PREPARATION CHECKS
|
||||||
@ -307,7 +305,7 @@ public class BlockListener implements Listener {
|
|||||||
if (profile.getToolPreparationMode(ToolType.HOE) && (BlockChecks.canBeGreenTerra(block) || BlockChecks.makeMossy(block))) {
|
if (profile.getToolPreparationMode(ToolType.HOE) && (BlockChecks.canBeGreenTerra(block) || BlockChecks.makeMossy(block))) {
|
||||||
Skills.abilityCheck(player, SkillType.HERBALISM);
|
Skills.abilityCheck(player, SkillType.HERBALISM);
|
||||||
}
|
}
|
||||||
else if (profile.getToolPreparationMode(ToolType.AXE) && BlockChecks.isLog(block) && permInstance.treeFeller(player)) { //TODO: Why are we checking the permissions here?
|
else if (profile.getToolPreparationMode(ToolType.AXE) && BlockChecks.isLog(block) && Permissions.treeFeller(player)) { //TODO: Why are we checking the permissions here?
|
||||||
Skills.abilityCheck(player, SkillType.WOODCUTTING);
|
Skills.abilityCheck(player, SkillType.WOODCUTTING);
|
||||||
}
|
}
|
||||||
else if (profile.getToolPreparationMode(ToolType.PICKAXE) && BlockChecks.canBeSuperBroken(block)) {
|
else if (profile.getToolPreparationMode(ToolType.PICKAXE) && BlockChecks.canBeSuperBroken(block)) {
|
||||||
@ -329,7 +327,7 @@ public class BlockListener implements Listener {
|
|||||||
/*
|
/*
|
||||||
* ABILITY TRIGGER CHECKS
|
* ABILITY TRIGGER CHECKS
|
||||||
*/
|
*/
|
||||||
if (profile.getAbilityMode(AbilityType.GREEN_TERRA) && permInstance.greenTerra(player) && BlockChecks.makeMossy(block)) {
|
if (profile.getAbilityMode(AbilityType.GREEN_TERRA) && Permissions.greenTerra(player) && BlockChecks.makeMossy(block)) {
|
||||||
Herbalism.greenTerra(player, block);
|
Herbalism.greenTerra(player, block);
|
||||||
}
|
}
|
||||||
else if (profile.getAbilityMode(AbilityType.GIGA_DRILL_BREAKER) && Skills.triggerCheck(player, block, AbilityType.GIGA_DRILL_BREAKER)) {
|
else if (profile.getAbilityMode(AbilityType.GIGA_DRILL_BREAKER) && Skills.triggerCheck(player, block, AbilityType.GIGA_DRILL_BREAKER)) {
|
||||||
|
@ -151,7 +151,7 @@ public class EntityListener implements Listener {
|
|||||||
AcrobaticsManager acroManager = new AcrobaticsManager(player);
|
AcrobaticsManager acroManager = new AcrobaticsManager(player);
|
||||||
acroManager.rollCheck(event);
|
acroManager.rollCheck(event);
|
||||||
}
|
}
|
||||||
else if (cause == DamageCause.BLOCK_EXPLOSION && Permissions.getInstance().demolitionsExpertise(player)) {
|
else if (cause == DamageCause.BLOCK_EXPLOSION && Permissions.demolitionsExpertise(player)) {
|
||||||
BlastMining.demolitionsExpertise(player, event);
|
BlastMining.demolitionsExpertise(player, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,7 +219,7 @@ public class EntityListener implements Listener {
|
|||||||
if (plugin.tntIsTracked(id)) {
|
if (plugin.tntIsTracked(id)) {
|
||||||
Player player = plugin.getTNTPlayer(id);
|
Player player = plugin.getTNTPlayer(id);
|
||||||
|
|
||||||
if (Permissions.getInstance().biggerBombs(player)) {
|
if (Permissions.biggerBombs(player)) {
|
||||||
BlastMining.biggerBombs(player, event);
|
BlastMining.biggerBombs(player, event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -363,10 +363,10 @@ public class EntityListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (herb && !Permissions.getInstance().farmersDiet(player)) {
|
if (herb && !Permissions.farmersDiet(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (fish && !Permissions.getInstance().fishermansDiet(player)) {
|
else if (fish && !Permissions.fishermansDiet(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -399,7 +399,7 @@ public class EntityListener implements Listener {
|
|||||||
|
|
||||||
if(player.hasMetadata("NPC")) return; // Check if this player is a Citizens NPC
|
if(player.hasMetadata("NPC")) return; // Check if this player is a Citizens NPC
|
||||||
|
|
||||||
if (Permissions.getInstance().taming(player) && !mcMMO.p.placeStore.isSpawnedPet((Entity) event.getEntity())) {
|
if (Permissions.taming(player) && !mcMMO.p.placeStore.isSpawnedPet((Entity) event.getEntity())) {
|
||||||
PlayerProfile profile = Users.getProfile(player);
|
PlayerProfile profile = Users.getProfile(player);
|
||||||
EntityType type = event.getEntityType();
|
EntityType type = event.getEntityType();
|
||||||
int xp = 0;
|
int xp = 0;
|
||||||
|
@ -23,7 +23,7 @@ public class HardcoreListener implements Listener {
|
|||||||
|
|
||||||
if(player.hasMetadata("NPC")) return; // Check if this player is a Citizens NPC
|
if(player.hasMetadata("NPC")) return; // Check if this player is a Citizens NPC
|
||||||
|
|
||||||
if (!Permissions.getInstance().hardcoremodeBypass(player)) {
|
if (!Permissions.hardcoremodeBypass(player)) {
|
||||||
if (player.getKiller() != null && Config.getInstance().getHardcoreVampirismEnabled()) {
|
if (player.getKiller() != null && Config.getInstance().getHardcoreVampirismEnabled()) {
|
||||||
Hardcore.invokeVampirism(player.getKiller(), player);
|
Hardcore.invokeVampirism(player.getKiller(), player);
|
||||||
}
|
}
|
||||||
|
@ -72,14 +72,14 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (profile.getGodMode()) {
|
if (profile.getGodMode()) {
|
||||||
if (!Permissions.getInstance().mcgod(player)) {
|
if (!Permissions.mcgod(player)) {
|
||||||
profile.toggleGodMode();
|
profile.toggleGodMode();
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.GodMode.Forbidden"));
|
player.sendMessage(LocaleLoader.getString("Commands.GodMode.Forbidden"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profile.inParty()) {
|
if (profile.inParty()) {
|
||||||
if (!Permissions.getInstance().party(player)) {
|
if (!Permissions.party(player)) {
|
||||||
profile.removeParty();
|
profile.removeParty();
|
||||||
player.sendMessage(LocaleLoader.getString("Party.Forbidden"));
|
player.sendMessage(LocaleLoader.getString("Party.Forbidden"));
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ public class PlayerListener implements Listener {
|
|||||||
|
|
||||||
if(player.hasMetadata("NPC")) return; // Check if this player is a Citizens NPC
|
if(player.hasMetadata("NPC")) return; // Check if this player is a Citizens NPC
|
||||||
|
|
||||||
if (Permissions.getInstance().fishing(player)) {
|
if (Permissions.fishing(player)) {
|
||||||
State state = event.getState();
|
State state = event.getState();
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
@ -112,7 +112,7 @@ public class PlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Users.getProfile(player).getSkillLevel(SkillType.FISHING) >= shakeUnlockLevel && Permissions.getInstance().shakeMob(player)) {
|
if (Users.getProfile(player).getSkillLevel(SkillType.FISHING) >= shakeUnlockLevel && Permissions.shakeMob(player)) {
|
||||||
Fishing.shakeMob(event);
|
Fishing.shakeMob(event);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -184,7 +184,7 @@ public class PlayerListener implements Listener {
|
|||||||
if(player.hasMetadata("NPC")) return; // Check if this player is a Citizens NPC
|
if(player.hasMetadata("NPC")) return; // Check if this player is a Citizens NPC
|
||||||
|
|
||||||
//TODO: Locale ALL the things.
|
//TODO: Locale ALL the things.
|
||||||
if (Config.getInstance().getMOTDEnabled() && Permissions.getInstance().motd(player)) {
|
if (Config.getInstance().getMOTDEnabled() && Permissions.motd(player)) {
|
||||||
String prefix = ChatColor.GOLD + "[mcMMO] ";
|
String prefix = ChatColor.GOLD + "[mcMMO] ";
|
||||||
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
|
||||||
|
|
||||||
@ -201,76 +201,76 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.xp.quadruple")) {
|
if (Permissions.xpQuadruple(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", new Object[] { 4 }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", new Object[] { 4 }) }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.xp.triple")) {
|
else if (Permissions.xpTriple(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", new Object[] { 3 }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", new Object[] { 3 }) }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.xp.150percentboost")) {
|
else if (Permissions.xpDoubleAndOneHalf(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", new Object[] { 2.5 }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", new Object[] { 2.5 }) }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.xp.double")) {
|
else if (Permissions.xpDouble(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", new Object[] { 2 }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", new Object[] { 2 }) }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.xp.50percentboost")) {
|
else if (Permissions.xpOneAndOneHalf(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", new Object[] { 1.5 }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", new Object[] { 1.5 }) }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.cooldowns.halved")) {
|
if (Permissions.cooldownsHalved(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.cooldowns.name"), LocaleLoader.getString("Perks.cooldowns.desc", new Object[] { "1/2" }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.cooldowns.name"), LocaleLoader.getString("Perks.cooldowns.desc", new Object[] { "1/2" }) }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.cooldowns.thirded")) {
|
else if (Permissions.cooldownsThirded(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.cooldowns.name"), LocaleLoader.getString("Perks.cooldowns.desc", new Object[] { "1/3" }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.cooldowns.name"), LocaleLoader.getString("Perks.cooldowns.desc", new Object[] { "1/3" }) }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.cooldowns.quartered")) {
|
else if (Permissions.cooldownsQuartered(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.cooldowns.name"), LocaleLoader.getString("Perks.cooldowns.desc", new Object[] { "1/4" }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.cooldowns.name"), LocaleLoader.getString("Perks.cooldowns.desc", new Object[] { "1/4" }) }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.activationtime.twelveseconds")) {
|
if (Permissions.activationTwelve(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.activationtime.name"), LocaleLoader.getString("Perks.activationtime.desc", new Object[] { 12 }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.activationtime.name"), LocaleLoader.getString("Perks.activationtime.desc", new Object[] { 12 }) }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.activationtime.eightseconds")) {
|
else if (Permissions.activationEight(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.activationtime.name"), LocaleLoader.getString("Perks.activationtime.desc", new Object[] { 8 }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.activationtime.name"), LocaleLoader.getString("Perks.activationtime.desc", new Object[] { 8 }) }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.activationtime.fourseconds")) {
|
else if (Permissions.activationFour(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.activationtime.name"), LocaleLoader.getString("Perks.activationtime.desc", new Object[] { 4 }) }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.activationtime.name"), LocaleLoader.getString("Perks.activationtime.desc", new Object[] { 4 }) }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.acrobatics")) {
|
if (Permissions.luckyAcrobatics(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.lucky.archery")) {
|
else if (Permissions.luckyArchery(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.lucky.axes")) {
|
else if (Permissions.luckyAxes(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.lucky.excavation")) {
|
else if (Permissions.luckyExcavation(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.lucky.fishing")) {
|
else if (Permissions.luckyFishing(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.lucky.herbalism")) {
|
else if (Permissions.luckyHerbalism(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.lucky.mining")) {
|
else if (Permissions.luckyMining(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.lucky.repair")) {
|
else if (Permissions.luckyRepair(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.lucky.swords")) {
|
else if (Permissions.luckySwords(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.lucky.taming")) {
|
else if (Permissions.luckyTaming(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.lucky.unarmed")) {
|
else if (Permissions.luckyUnarmed(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.lucky.woodcutting")) {
|
else if (Permissions.luckyWoodcutting(player)) {
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,7 +321,7 @@ public class PlayerListener implements Listener {
|
|||||||
case RIGHT_CLICK_BLOCK:
|
case RIGHT_CLICK_BLOCK:
|
||||||
|
|
||||||
/* REPAIR CHECKS */
|
/* REPAIR CHECKS */
|
||||||
if (Permissions.getInstance().repair(player) && block.getTypeId() == Config.getInstance().getRepairAnvilId()) {
|
if (Permissions.repair(player) && block.getTypeId() == Config.getInstance().getRepairAnvilId()) {
|
||||||
if (mcMMO.repairManager.isRepairable(inHand)) {
|
if (mcMMO.repairManager.isRepairable(inHand)) {
|
||||||
mcMMO.repairManager.handleRepair(player, inHand);
|
mcMMO.repairManager.handleRepair(player, inHand);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
@ -329,7 +329,7 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* SALVAGE CHECKS */
|
/* SALVAGE CHECKS */
|
||||||
if (Permissions.getInstance().salvage(player) && block.getTypeId() == Config.getInstance().getSalvageAnvilId()) {
|
if (Permissions.salvage(player) && block.getTypeId() == Config.getInstance().getSalvageAnvilId()) {
|
||||||
if (Salvage.isSalvageable(inHand)) {
|
if (Salvage.isSalvageable(inHand)) {
|
||||||
final Location location = block.getLocation();
|
final Location location = block.getLocation();
|
||||||
Salvage.handleSalvage(player, location, inHand);
|
Salvage.handleSalvage(player, location, inHand);
|
||||||
@ -353,7 +353,7 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* GREEN THUMB CHECK */
|
/* GREEN THUMB CHECK */
|
||||||
if (inHand.getType().equals(Material.SEEDS) && BlockChecks.makeMossy(block) && Permissions.getInstance().greenThumbBlocks(player)) {
|
if (inHand.getType().equals(Material.SEEDS) && BlockChecks.makeMossy(block) && Permissions.greenThumbBlocks(player)) {
|
||||||
Herbalism.greenThumbBlocks(inHand, player, block);
|
Herbalism.greenThumbBlocks(inHand, player, block);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -363,7 +363,7 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* BLAST MINING CHECK */
|
/* BLAST MINING CHECK */
|
||||||
if (player.isSneaking() && inHand.getTypeId() == Config.getInstance().getDetonatorItemID() && Permissions.getInstance().blastMining(player)) {
|
if (player.isSneaking() && inHand.getTypeId() == Config.getInstance().getDetonatorItemID() && Permissions.blastMining(player)) {
|
||||||
BlastMining.detonate(event, player, plugin);
|
BlastMining.detonate(event, player, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -386,7 +386,7 @@ public class PlayerListener implements Listener {
|
|||||||
Item.itemChecks(player);
|
Item.itemChecks(player);
|
||||||
|
|
||||||
/* BLAST MINING CHECK */
|
/* BLAST MINING CHECK */
|
||||||
if (player.isSneaking() && inHand.getTypeId() == Config.getInstance().getDetonatorItemID() && Permissions.getInstance().blastMining(player)) {
|
if (player.isSneaking() && inHand.getTypeId() == Config.getInstance().getDetonatorItemID() && Permissions.blastMining(player)) {
|
||||||
BlastMining.detonate(event, player, plugin);
|
BlastMining.detonate(event, player, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -474,7 +474,7 @@ public class PlayerListener implements Listener {
|
|||||||
plugin.getLogger().info("[A]<" + playerName + "> " + chatEvent.getMessage());
|
plugin.getLogger().info("[A]<" + playerName + "> " + chatEvent.getMessage());
|
||||||
|
|
||||||
for (Player otherPlayer : plugin.getServer().getOnlinePlayers()) {
|
for (Player otherPlayer : plugin.getServer().getOnlinePlayers()) {
|
||||||
if (Permissions.getInstance().adminChat(otherPlayer) || otherPlayer.isOp()) {
|
if (Permissions.adminChat(otherPlayer) || otherPlayer.isOp()) {
|
||||||
otherPlayer.sendMessage(prefix + chatEvent.getMessage());
|
otherPlayer.sendMessage(prefix + chatEvent.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,6 @@ public class AcrobaticsManager {
|
|||||||
private Player player;
|
private Player player;
|
||||||
private PlayerProfile profile;
|
private PlayerProfile profile;
|
||||||
private int skillLevel;
|
private int skillLevel;
|
||||||
private Permissions permissionInstance = Permissions.getInstance();
|
|
||||||
|
|
||||||
public AcrobaticsManager (Player player) {
|
public AcrobaticsManager (Player player) {
|
||||||
this.player = player;
|
this.player = player;
|
||||||
@ -30,7 +29,7 @@ public class AcrobaticsManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!permissionInstance.roll(player)) {
|
if (!Permissions.roll(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +40,7 @@ public class AcrobaticsManager {
|
|||||||
|
|
||||||
int randomChance = 1000;
|
int randomChance = 1000;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.acrobatics")) {
|
if (Permissions.luckyAcrobatics(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +63,7 @@ public class AcrobaticsManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!permissionInstance.dodge(player)) {
|
if (!Permissions.dodge(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,7 +71,7 @@ public class AcrobaticsManager {
|
|||||||
|
|
||||||
int randomChance = 4000;
|
int randomChance = 4000;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.acrobatics")) {
|
if (Permissions.luckyAcrobatics(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ public class RollEventHandler extends AcrobaticsEventHandler {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Permissions.getInstance().gracefulRoll(player)) {
|
if (Permissions.gracefulRoll(player)) {
|
||||||
this.isGraceful = player.isSneaking();
|
this.isGraceful = player.isSneaking();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -16,7 +16,6 @@ public class ArcheryManager {
|
|||||||
private Player player;
|
private Player player;
|
||||||
private PlayerProfile profile;
|
private PlayerProfile profile;
|
||||||
private int skillLevel;
|
private int skillLevel;
|
||||||
private Permissions permissionsInstance;
|
|
||||||
|
|
||||||
private float dazeBonusMax = advancedConfig.getDazeBonusMax();
|
private float dazeBonusMax = advancedConfig.getDazeBonusMax();
|
||||||
private float dazeMaxBonusLevel = advancedConfig.getDazeMaxBonusLevel();
|
private float dazeMaxBonusLevel = advancedConfig.getDazeMaxBonusLevel();
|
||||||
@ -32,7 +31,6 @@ public class ArcheryManager {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
this.skillLevel = profile.getSkillLevel(SkillType.ARCHERY);
|
this.skillLevel = profile.getSkillLevel(SkillType.ARCHERY);
|
||||||
this.permissionsInstance = Permissions.getInstance();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -44,17 +42,14 @@ public class ArcheryManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.trackArrows(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.trackArrows(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrowTrackingEventHandler eventHandler = new ArrowTrackingEventHandler(this, livingEntity);
|
ArrowTrackingEventHandler eventHandler = new ArrowTrackingEventHandler(this, livingEntity);
|
||||||
|
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.archery")) {
|
if (Permissions.luckyArchery(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
final float chance = (float) (((double) retrieveBonusMax / (double) retrieveMaxBonusLevel) * skillLevel);
|
final float chance = (float) (((double) retrieveBonusMax / (double) retrieveMaxBonusLevel) * skillLevel);
|
||||||
@ -73,10 +68,7 @@ public class ArcheryManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.daze(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.daze(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +76,7 @@ public class ArcheryManager {
|
|||||||
|
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.archery")) {
|
if (Permissions.luckyArchery(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,10 +96,7 @@ public class ArcheryManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.archeryBonus(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.archeryBonus(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ public class Axes {
|
|||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
double chance = (MAX_CHANCE / MAX_BONUS_LEVEL) * skillCheck;
|
double chance = (MAX_CHANCE / MAX_BONUS_LEVEL) * skillCheck;
|
||||||
|
|
||||||
if (attacker.hasPermission("mcmmo.perks.lucky.axes")) {
|
if (Permissions.luckyAxes(attacker)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,13 +179,13 @@ public class Axes {
|
|||||||
final double GREATER_IMPACT_MULTIPLIER = advancedConfig.getGreaterImpactModifier();
|
final double GREATER_IMPACT_MULTIPLIER = advancedConfig.getGreaterImpactModifier();
|
||||||
final int GREATER_IMPACT_DAMAGE = advancedConfig.getGreaterImpactBonusDamage();
|
final int GREATER_IMPACT_DAMAGE = advancedConfig.getGreaterImpactBonusDamage();
|
||||||
|
|
||||||
if (!Permissions.getInstance().greaterImpact(attacker)) {
|
if (!Permissions.greaterImpact(attacker)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (attacker.hasPermission("mcmmo.perks.lucky.axes")) {
|
if (Permissions.luckyAxes(attacker)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ public class Excavation {
|
|||||||
xp = Config.getInstance().getExcavationBaseXP();
|
xp = Config.getInstance().getExcavationBaseXP();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().excavationTreasures(player)) {
|
if (Permissions.excavationTreasures(player)) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case DIRT:
|
case DIRT:
|
||||||
treasures = TreasuresConfig.getInstance().excavationFromDirt;
|
treasures = TreasuresConfig.getInstance().excavationFromDirt;
|
||||||
@ -99,7 +99,7 @@ public class Excavation {
|
|||||||
if (skillLevel >= treasure.getDropLevel()) {
|
if (skillLevel >= treasure.getDropLevel()) {
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.excavation")) {
|
if (Permissions.luckyExcavation(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,13 +107,13 @@ public class Fishing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Config.getInstance().getFishingDropsEnabled() && rewards.size() > 0
|
if (Config.getInstance().getFishingDropsEnabled() && rewards.size() > 0
|
||||||
&& Permissions.getInstance().fishingTreasures(player)) {
|
&& Permissions.fishingTreasures(player)) {
|
||||||
FishingTreasure treasure = rewards.get(random.nextInt(rewards
|
FishingTreasure treasure = rewards.get(random.nextInt(rewards
|
||||||
.size()));
|
.size()));
|
||||||
|
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.fishing")) {
|
if (Permissions.luckyFishing(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,12 +167,12 @@ public class Fishing {
|
|||||||
if (ItemChecks.isEnchantable(fishingResults)) {
|
if (ItemChecks.isEnchantable(fishingResults)) {
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.fishing")) {
|
if (Permissions.luckyFishing(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (random.nextInt(randomChance) <= ENCHANTMENT_CHANCE
|
if (random.nextInt(randomChance) <= ENCHANTMENT_CHANCE
|
||||||
&& Permissions.getInstance().fishingMagic(player)) {
|
&& Permissions.fishingMagic(player)) {
|
||||||
for (Enchantment newEnchant : Enchantment.values()) {
|
for (Enchantment newEnchant : Enchantment.values()) {
|
||||||
if (newEnchant.canEnchantItem(fishingResults)) {
|
if (newEnchant.canEnchantItem(fishingResults)) {
|
||||||
Map<Enchantment, Integer> resultEnchantments = fishingResults
|
Map<Enchantment, Integer> resultEnchantments = fishingResults
|
||||||
@ -226,7 +226,7 @@ public class Fishing {
|
|||||||
public static void shakeMob(PlayerFishEvent event) {
|
public static void shakeMob(PlayerFishEvent event) {
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (event.getPlayer().hasPermission("mcmmo.perks.lucky.fishing")) {
|
if (Permissions.luckyFishing(event.getPlayer())) {
|
||||||
randomChance = (int) (randomChance * 1.25);
|
randomChance = (int) (randomChance * 1.25);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ public class Fishing {
|
|||||||
|
|
||||||
int dropChance = getShakeChance(lootTier);
|
int dropChance = getShakeChance(lootTier);
|
||||||
|
|
||||||
if (event.getPlayer().hasPermission("mcmmo.perks.lucky.fishing")) {
|
if (Permissions.luckyFishing(player)) {
|
||||||
dropChance = (int) (dropChance * 1.25); // With lucky perk on max
|
dropChance = (int) (dropChance * 1.25); // With lucky perk on max
|
||||||
// level tier, its 100%
|
// level tier, its 100%
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ public class Herbalism {
|
|||||||
|
|
||||||
int randomChance = 1000;
|
int randomChance = 1000;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.herbalism")) {
|
if (Permissions.luckyHerbalism(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ public class Herbalism {
|
|||||||
mat = Material.WHEAT;
|
mat = Material.WHEAT;
|
||||||
xp = Config.getInstance().getHerbalismXPWheat();
|
xp = Config.getInstance().getHerbalismXPWheat();
|
||||||
|
|
||||||
if (Permissions.getInstance().greenThumbWheat(player)) {
|
if (Permissions.greenThumbWheat(player)) {
|
||||||
greenThumbWheat(block, player, event, plugin);
|
greenThumbWheat(block, player, event, plugin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ public class Herbalism {
|
|||||||
mat = Material.NETHER_STALK;
|
mat = Material.NETHER_STALK;
|
||||||
xp = Config.getInstance().getHerbalismXPNetherWart();
|
xp = Config.getInstance().getHerbalismXPNetherWart();
|
||||||
|
|
||||||
if (Permissions.getInstance().greenThumbNetherwart(player)) {
|
if (Permissions.greenThumbNetherwart(player)) {
|
||||||
greenThumbWheat(block, player, event, plugin);
|
greenThumbWheat(block, player, event, plugin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -211,7 +211,7 @@ public class Herbalism {
|
|||||||
xp = Config.getInstance().getHerbalismXPCocoa();
|
xp = Config.getInstance().getHerbalismXPCocoa();
|
||||||
|
|
||||||
|
|
||||||
if (Permissions.getInstance().greenThumbCocoa(player)) {
|
if (Permissions.greenThumbCocoa(player)) {
|
||||||
greenThumbWheat(block, player, event, plugin);
|
greenThumbWheat(block, player, event, plugin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -223,7 +223,7 @@ public class Herbalism {
|
|||||||
xp = Config.getInstance().getHerbalismXPCarrot();
|
xp = Config.getInstance().getHerbalismXPCarrot();
|
||||||
|
|
||||||
|
|
||||||
if (Permissions.getInstance().greenThumbCarrots(player)) {
|
if (Permissions.greenThumbCarrots(player)) {
|
||||||
greenThumbWheat(block, player, event, plugin);
|
greenThumbWheat(block, player, event, plugin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -234,7 +234,7 @@ public class Herbalism {
|
|||||||
mat = Material.POTATO;
|
mat = Material.POTATO;
|
||||||
xp = Config.getInstance().getHerbalismXPPotato();
|
xp = Config.getInstance().getHerbalismXPPotato();
|
||||||
|
|
||||||
if (Permissions.getInstance().greenThumbPotatoes(player)) {
|
if (Permissions.greenThumbPotatoes(player)) {
|
||||||
greenThumbWheat(block, player, event, plugin);
|
greenThumbWheat(block, player, event, plugin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -254,7 +254,7 @@ public class Herbalism {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().herbalismDoubleDrops(player)) {
|
if (Permissions.herbalismDoubleDrops(player)) {
|
||||||
ItemStack is = null;
|
ItemStack is = null;
|
||||||
|
|
||||||
if (customPlant) {
|
if (customPlant) {
|
||||||
@ -431,7 +431,7 @@ public class Herbalism {
|
|||||||
|
|
||||||
int randomChance = 1500;
|
int randomChance = 1500;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.herbalism")) {
|
if (Permissions.luckyHerbalism(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -491,7 +491,7 @@ public class Herbalism {
|
|||||||
|
|
||||||
int randomChance = 1500;
|
int randomChance = 1500;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.herbalism")) {
|
if (Permissions.luckyHerbalism(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,11 +336,11 @@ public class Mining {
|
|||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
int chance = (int) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * skillCheck);
|
int chance = (int) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * skillCheck);
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.mining")) {
|
if (Permissions.luckyMining(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chance > random.nextInt(randomChance) && Permissions.getInstance().miningDoubleDrops(player)) {
|
if (chance > random.nextInt(randomChance) && Permissions.miningDoubleDrops(player)) {
|
||||||
if (player.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)) {
|
if (player.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)) {
|
||||||
silkTouchDrops(block);
|
silkTouchDrops(block);
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ public class WoodCutting {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.getInstance().woodcutting(player)) {
|
if (Permissions.woodcutting(player)) {
|
||||||
Skills.xpProcessing(player, profile, SkillType.WOODCUTTING, xp);
|
Skills.xpProcessing(player, profile, SkillType.WOODCUTTING, xp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -353,11 +353,11 @@ public class WoodCutting {
|
|||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
int chance = (int) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * skillLevel);
|
int chance = (int) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * skillLevel);
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.woodcutting")) {
|
if (Permissions.luckyWoodcutting(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chance > random.nextInt(randomChance) && Permissions.getInstance().woodcuttingDoubleDrops(player)) {
|
if (chance > random.nextInt(randomChance) && Permissions.woodcuttingDoubleDrops(player)) {
|
||||||
Config configInstance = Config.getInstance();
|
Config configInstance = Config.getInstance();
|
||||||
ItemStack item;
|
ItemStack item;
|
||||||
Location location;
|
Location location;
|
||||||
|
@ -27,7 +27,6 @@ public class Repair {
|
|||||||
|
|
||||||
private static Random random = new Random();
|
private static Random random = new Random();
|
||||||
private static Config configInstance = Config.getInstance();
|
private static Config configInstance = Config.getInstance();
|
||||||
private static Permissions permInstance = Permissions.getInstance();
|
|
||||||
|
|
||||||
static AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
static AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||||
|
|
||||||
@ -92,7 +91,7 @@ public class Repair {
|
|||||||
* @param is Item being repaired
|
* @param is Item being repaired
|
||||||
*/
|
*/
|
||||||
protected static void addEnchants(Player player, ItemStack is) {
|
protected static void addEnchants(Player player, ItemStack is) {
|
||||||
if(permInstance.arcaneBypass(player)) {
|
if(Permissions.arcaneBypass(player)) {
|
||||||
player.sendMessage(LocaleLoader.getString("Repair.Arcane.Perfect"));
|
player.sendMessage(LocaleLoader.getString("Repair.Arcane.Perfect"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -104,7 +103,7 @@ public class Repair {
|
|||||||
|
|
||||||
int rank = getArcaneForgingRank(Users.getProfile(player));
|
int rank = getArcaneForgingRank(Users.getProfile(player));
|
||||||
|
|
||||||
if (rank == 0 || !permInstance.arcaneForging(player)) {
|
if (rank == 0 || !Permissions.arcaneForging(player)) {
|
||||||
for (Enchantment x : enchants.keySet()) {
|
for (Enchantment x : enchants.keySet()) {
|
||||||
is.removeEnchantment(x);
|
is.removeEnchantment(x);
|
||||||
}
|
}
|
||||||
@ -120,7 +119,7 @@ public class Repair {
|
|||||||
|
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.repair")) {
|
if (Permissions.luckyRepair(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,7 +243,7 @@ public class Repair {
|
|||||||
if(skillLevel >= repairMasteryMaxBonusLevel) bonus = ((float) repairMasteryChanceMax / 100F);
|
if(skillLevel >= repairMasteryMaxBonusLevel) bonus = ((float) repairMasteryChanceMax / 100F);
|
||||||
else bonus = (((float) skillLevel) / ((float) repairMasteryMaxBonusLevel)) * (((float) repairMasteryChanceMax) / 100F);
|
else bonus = (((float) skillLevel) / ((float) repairMasteryMaxBonusLevel)) * (((float) repairMasteryChanceMax) / 100F);
|
||||||
|
|
||||||
if (permInstance.repairMastery(player)) {
|
if (Permissions.repairMastery(player)) {
|
||||||
bonus = (((float) repairAmount) * bonus);
|
bonus = (((float) repairAmount) * bonus);
|
||||||
repairAmount += (int) bonus;
|
repairAmount += (int) bonus;
|
||||||
}
|
}
|
||||||
@ -281,9 +280,9 @@ public class Repair {
|
|||||||
int chance = (int) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * skillLevel);
|
int chance = (int) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * skillLevel);
|
||||||
if (skillLevel >= MAX_BONUS_LEVEL) chance = MAX_CHANCE;
|
if (skillLevel >= MAX_BONUS_LEVEL) chance = MAX_CHANCE;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.repair")) randomChance = (int) (randomChance * 0.75);
|
if (Permissions.luckyRepair(player)) randomChance = (int) (randomChance * 0.75);
|
||||||
|
|
||||||
if (chance > random.nextInt(randomChance) && permInstance.repairBonus(player)){
|
if (chance > random.nextInt(randomChance) && Permissions.repairBonus(player)){
|
||||||
player.sendMessage(LocaleLoader.getString("Repair.Skills.FeltEasy"));
|
player.sendMessage(LocaleLoader.getString("Repair.Skills.FeltEasy"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -18,13 +18,13 @@ public enum RepairItemType {
|
|||||||
public boolean getPermissions(Player player) {
|
public boolean getPermissions(Player player) {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case ARMOR:
|
case ARMOR:
|
||||||
return Permissions.getInstance().armorRepair(player);
|
return Permissions.armorRepair(player);
|
||||||
|
|
||||||
case TOOL:
|
case TOOL:
|
||||||
return Permissions.getInstance().toolRepair(player);
|
return Permissions.toolRepair(player);
|
||||||
|
|
||||||
case OTHER:
|
case OTHER:
|
||||||
return Permissions.getInstance().otherRepair(player);
|
return Permissions.otherRepair(player);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
@ -23,28 +23,28 @@ public enum RepairMaterialType {
|
|||||||
public boolean getPermissions(Player player) {
|
public boolean getPermissions(Player player) {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case STRING:
|
case STRING:
|
||||||
return Permissions.getInstance().stringRepair(player);
|
return Permissions.stringRepair(player);
|
||||||
|
|
||||||
case LEATHER:
|
case LEATHER:
|
||||||
return Permissions.getInstance().leatherRepair(player);
|
return Permissions.leatherRepair(player);
|
||||||
|
|
||||||
case WOOD:
|
case WOOD:
|
||||||
return Permissions.getInstance().woodRepair(player);
|
return Permissions.woodRepair(player);
|
||||||
|
|
||||||
case STONE:
|
case STONE:
|
||||||
return Permissions.getInstance().stoneRepair(player);
|
return Permissions.stoneRepair(player);
|
||||||
|
|
||||||
case IRON:
|
case IRON:
|
||||||
return Permissions.getInstance().ironRepair(player);
|
return Permissions.ironRepair(player);
|
||||||
|
|
||||||
case GOLD:
|
case GOLD:
|
||||||
return Permissions.getInstance().goldRepair(player);
|
return Permissions.goldRepair(player);
|
||||||
|
|
||||||
case DIAMOND:
|
case DIAMOND:
|
||||||
return Permissions.getInstance().diamondRepair(player);
|
return Permissions.diamondRepair(player);
|
||||||
|
|
||||||
case OTHER:
|
case OTHER:
|
||||||
return Permissions.getInstance().otherMaterialRepair(player);
|
return Permissions.otherMaterialRepair(player);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
@ -21,10 +21,9 @@ import com.gmail.nossr50.util.Users;
|
|||||||
public class Salvage {
|
public class Salvage {
|
||||||
|
|
||||||
private static Config configInstance = Config.getInstance();
|
private static Config configInstance = Config.getInstance();
|
||||||
private static Permissions permInstance = Permissions.getInstance();
|
|
||||||
|
|
||||||
public static void handleSalvage(final Player player, final Location location, final ItemStack inHand) {
|
public static void handleSalvage(final Player player, final Location location, final ItemStack inHand) {
|
||||||
if (!permInstance.salvage(player) || !configInstance.getSalvageEnabled()) {
|
if (!Permissions.salvage(player) || !configInstance.getSalvageEnabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ public class SimpleRepairManager implements RepairManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle the enchants
|
// Handle the enchants
|
||||||
if (Config.getInstance().getArcaneForgingEnchantLossEnabled() && !Permissions.getInstance().arcaneBypass(player)) {
|
if (Config.getInstance().getArcaneForgingEnchantLossEnabled() && !Permissions.arcaneBypass(player)) {
|
||||||
// Generalize away enchantment work
|
// Generalize away enchantment work
|
||||||
Repair.addEnchants(player, item);
|
Repair.addEnchants(player, item);
|
||||||
}
|
}
|
||||||
|
@ -14,13 +14,11 @@ public class SwordsManager {
|
|||||||
private Player player;
|
private Player player;
|
||||||
private PlayerProfile profile;
|
private PlayerProfile profile;
|
||||||
private int skillLevel;
|
private int skillLevel;
|
||||||
private Permissions permissionsInstance;
|
|
||||||
|
|
||||||
public SwordsManager (Player player) {
|
public SwordsManager (Player player) {
|
||||||
this.player = player;
|
this.player = player;
|
||||||
this.profile = Users.getProfile(player);
|
this.profile = Users.getProfile(player);
|
||||||
this.skillLevel = profile.getSkillLevel(SkillType.SWORDS);
|
this.skillLevel = profile.getSkillLevel(SkillType.SWORDS);
|
||||||
this.permissionsInstance = Permissions.getInstance();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -32,10 +30,7 @@ public class SwordsManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.swordsBleed(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.swordsBleed(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,7 +41,7 @@ public class SwordsManager {
|
|||||||
int bleedMaxLevel = AdvancedConfig.getInstance().getBleedMaxBonusLevel();
|
int bleedMaxLevel = AdvancedConfig.getInstance().getBleedMaxBonusLevel();
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.swords")) {
|
if (Permissions.luckySwords(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,10 +57,7 @@ public class SwordsManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.counterAttack(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.counterAttack(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +69,7 @@ public class SwordsManager {
|
|||||||
int counterMaxLevel = AdvancedConfig.getInstance().getCounterMaxBonusLevel();
|
int counterMaxLevel = AdvancedConfig.getInstance().getCounterMaxBonusLevel();
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.swords")) {
|
if (Permissions.luckySwords(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,10 +85,7 @@ public class SwordsManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.serratedStrikes(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.serratedStrikes(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,14 +19,12 @@ public class TamingManager {
|
|||||||
private Player player;
|
private Player player;
|
||||||
private PlayerProfile profile;
|
private PlayerProfile profile;
|
||||||
private int skillLevel;
|
private int skillLevel;
|
||||||
private Permissions permissionsInstance;
|
|
||||||
private Config configInstance;
|
private Config configInstance;
|
||||||
|
|
||||||
public TamingManager (Player player) {
|
public TamingManager (Player player) {
|
||||||
this.player = player;
|
this.player = player;
|
||||||
this.profile = Users.getProfile(player);
|
this.profile = Users.getProfile(player);
|
||||||
this.skillLevel = profile.getSkillLevel(SkillType.TAMING);
|
this.skillLevel = profile.getSkillLevel(SkillType.TAMING);
|
||||||
this.permissionsInstance = Permissions.getInstance();
|
|
||||||
this.configInstance = Config.getInstance();
|
this.configInstance = Config.getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,17 +38,14 @@ public class TamingManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.fastFoodService(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.fastFoodService(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skillLevel >= Taming.FAST_FOOD_SERVICE_ACTIVATION_LEVEL) {
|
if (skillLevel >= Taming.FAST_FOOD_SERVICE_ACTIVATION_LEVEL) {
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.taming")) {
|
if (Permissions.luckyTaming(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,10 +66,7 @@ public class TamingManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.sharpenedClaws(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.sharpenedClaws(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,10 +86,7 @@ public class TamingManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.gore(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.gore(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,7 +96,7 @@ public class TamingManager {
|
|||||||
int goreMaxLevel = AdvancedConfig.getInstance().getGoreMaxBonusLevel();
|
int goreMaxLevel = AdvancedConfig.getInstance().getGoreMaxBonusLevel();
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.taming")) {
|
if (Permissions.luckyTaming(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,10 +164,7 @@ public class TamingManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.beastLore(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.beastLore(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,10 +183,7 @@ public class TamingManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.callOfTheWild(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.callOfTheWild(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,10 +218,7 @@ public class TamingManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.environmentallyAware(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.environmentallyAware(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,10 +253,7 @@ public class TamingManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.thickFur(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.thickFur(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,10 +273,7 @@ public class TamingManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.shockProof(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.shockProof(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,13 +13,11 @@ public class UnarmedManager {
|
|||||||
private Player player;
|
private Player player;
|
||||||
private PlayerProfile profile;
|
private PlayerProfile profile;
|
||||||
private int skillLevel;
|
private int skillLevel;
|
||||||
private Permissions permissionsInstance;
|
|
||||||
|
|
||||||
public UnarmedManager (Player player) {
|
public UnarmedManager (Player player) {
|
||||||
this.player = player;
|
this.player = player;
|
||||||
this.profile = Users.getProfile(player);
|
this.profile = Users.getProfile(player);
|
||||||
this.skillLevel = profile.getSkillLevel(SkillType.UNARMED);
|
this.skillLevel = profile.getSkillLevel(SkillType.UNARMED);
|
||||||
this.permissionsInstance = Permissions.getInstance();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,10 +29,7 @@ public class UnarmedManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.disarm(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.disarm(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,7 +42,7 @@ public class UnarmedManager {
|
|||||||
int disarmMaxLevel = AdvancedConfig.getInstance().getDisarmMaxBonusLevel();
|
int disarmMaxLevel = AdvancedConfig.getInstance().getDisarmMaxBonusLevel();
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.unarmed")) {
|
if (Permissions.luckyUnarmed(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,10 +66,7 @@ public class UnarmedManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.deflect(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.deflect(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +76,7 @@ public class UnarmedManager {
|
|||||||
int deflectMaxLevel = AdvancedConfig.getInstance().getDeflectMaxBonusLevel();
|
int deflectMaxLevel = AdvancedConfig.getInstance().getDeflectMaxBonusLevel();
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.lucky.unarmed")) {
|
if (Permissions.luckyUnarmed(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,10 +96,7 @@ public class UnarmedManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.unarmedBonus(player)) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (!permissionsInstance.unarmedBonus(player)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,10 +116,7 @@ public class UnarmedManager {
|
|||||||
if(defender == null)
|
if(defender == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if(permissionsInstance == null)
|
if (!Permissions.ironGrip(defender)) {
|
||||||
return false;
|
|
||||||
|
|
||||||
if (!permissionsInstance.ironGrip(defender)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,7 +126,7 @@ public class UnarmedManager {
|
|||||||
int ironGripMaxLevel = AdvancedConfig.getInstance().getIronGripMaxBonusLevel();
|
int ironGripMaxLevel = AdvancedConfig.getInstance().getIronGripMaxBonusLevel();
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (defender.hasPermission("mcmmo.perks.lucky.unarmed")) {
|
if (Permissions.luckyUnarmed(defender)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = (int) (randomChance * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,6 @@ import com.gmail.nossr50.skills.unarmed.UnarmedManager;
|
|||||||
|
|
||||||
public class Combat {
|
public class Combat {
|
||||||
private static Config configInstance = Config.getInstance();
|
private static Config configInstance = Config.getInstance();
|
||||||
private static Permissions permInstance = Permissions.getInstance();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply combat modifiers and process and XP gain.
|
* Apply combat modifiers and process and XP gain.
|
||||||
@ -86,7 +85,7 @@ public class Combat {
|
|||||||
|
|
||||||
startGainXp(attacker, attackerProfile, target, SkillType.SWORDS);
|
startGainXp(attacker, attackerProfile, target, SkillType.SWORDS);
|
||||||
}
|
}
|
||||||
else if (ItemChecks.isAxe(itemInHand) && permInstance.axes(attacker)) {
|
else if (ItemChecks.isAxe(itemInHand) && Permissions.axes(attacker)) {
|
||||||
if (targetIsPlayer || targetIsTamedPet) {
|
if (targetIsPlayer || targetIsTamedPet) {
|
||||||
if (!configInstance.getAxesPVP()) {
|
if (!configInstance.getAxesPVP()) {
|
||||||
return;
|
return;
|
||||||
@ -98,25 +97,25 @@ public class Combat {
|
|||||||
|
|
||||||
Skills.abilityCheck(attacker, SkillType.AXES);
|
Skills.abilityCheck(attacker, SkillType.AXES);
|
||||||
|
|
||||||
if (permInstance.axeBonus(attacker)) {
|
if (Permissions.axeBonus(attacker)) {
|
||||||
Axes.axesBonus(attacker, event);
|
Axes.axesBonus(attacker, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (permInstance.criticalHit(attacker)) {
|
if (Permissions.criticalHit(attacker)) {
|
||||||
Axes.axeCriticalCheck(attacker, event);
|
Axes.axeCriticalCheck(attacker, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (permInstance.impact(attacker)) {
|
if (Permissions.impact(attacker)) {
|
||||||
Axes.impact(attacker, target, event);
|
Axes.impact(attacker, target, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (attackerProfile.getAbilityMode(AbilityType.SKULL_SPLIITER) && permInstance.skullSplitter(attacker)) {
|
if (attackerProfile.getAbilityMode(AbilityType.SKULL_SPLIITER) && Permissions.skullSplitter(attacker)) {
|
||||||
applyAbilityAoE(attacker, target, event.getDamage() / 2, SkillType.AXES);
|
applyAbilityAoE(attacker, target, event.getDamage() / 2, SkillType.AXES);
|
||||||
}
|
}
|
||||||
|
|
||||||
startGainXp(attacker, attackerProfile, target, SkillType.AXES);
|
startGainXp(attacker, attackerProfile, target, SkillType.AXES);
|
||||||
}
|
}
|
||||||
else if (itemInHand.getType() == Material.AIR && permInstance.unarmed(attacker)) {
|
else if (itemInHand.getType() == Material.AIR && Permissions.unarmed(attacker)) {
|
||||||
if (targetIsPlayer || targetIsTamedPet) {
|
if (targetIsPlayer || targetIsTamedPet) {
|
||||||
if (!configInstance.getUnarmedPVP()) {
|
if (!configInstance.getUnarmedPVP()) {
|
||||||
return;
|
return;
|
||||||
@ -132,7 +131,7 @@ public class Combat {
|
|||||||
|
|
||||||
unarmedManager.bonusDamage(event);
|
unarmedManager.bonusDamage(event);
|
||||||
|
|
||||||
if (attackerProfile.getAbilityMode(AbilityType.BERSERK) && permInstance.berserk(attacker)) {
|
if (attackerProfile.getAbilityMode(AbilityType.BERSERK) && Permissions.berserk(attacker)) {
|
||||||
event.setDamage((int) (event.getDamage() * 1.5));
|
event.setDamage((int) (event.getDamage() * 1.5));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ public class Item {
|
|||||||
Block block = player.getLocation().getBlock();
|
Block block = player.getLocation().getBlock();
|
||||||
int amount = inHand.getAmount();
|
int amount = inHand.getAmount();
|
||||||
|
|
||||||
if (Permissions.getInstance().chimaeraWing(player) && inHand.getTypeId() == Config.getInstance().getChimaeraItemId()) {
|
if (Permissions.chimaeraWing(player) && inHand.getTypeId() == Config.getInstance().getChimaeraItemId()) {
|
||||||
if (Skills.cooldownOver(profile.getRecentlyHurt(), 60, player) && amount >= Config.getInstance().getChimaeraCost()) {
|
if (Skills.cooldownOver(profile.getRecentlyHurt(), 60, player) && amount >= Config.getInstance().getChimaeraCost()) {
|
||||||
player.setItemInHand(new ItemStack(Config.getInstance().getChimaeraItemId(), amount - Config.getInstance().getChimaeraCost()));
|
player.setItemInHand(new ItemStack(Config.getInstance().getChimaeraItemId(), amount - Config.getInstance().getChimaeraCost()));
|
||||||
|
|
||||||
|
@ -1,219 +1,332 @@
|
|||||||
package com.gmail.nossr50.util;
|
package com.gmail.nossr50.util;
|
||||||
|
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public class Permissions {
|
public class Permissions {
|
||||||
private static volatile Permissions instance;
|
private static volatile Permissions instance;
|
||||||
|
|
||||||
public boolean permission(Player player, String perm) {
|
public static boolean hasPermission(CommandSender sender, String perm)
|
||||||
return player.hasPermission(perm);
|
{
|
||||||
|
if(sender.hasPermission(perm))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Permissions getInstance() {
|
public static boolean hasPermission(Player sender, String perm)
|
||||||
if (instance == null) {
|
{
|
||||||
instance = new Permissions();
|
if(sender.hasPermission(perm))
|
||||||
}
|
return true;
|
||||||
|
|
||||||
return instance;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GENERIC PERMISSIONS
|
* GENERIC PERMISSIONS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean motd(Player player) {
|
public static boolean motd(Player player) {
|
||||||
return player.hasPermission("mcmmo.motd");
|
return hasPermission(player, "mcmmo.motd");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean admin(Player player) {
|
public static boolean admin(Player player) {
|
||||||
return player.hasPermission("mcmmo.admin");
|
return hasPermission(player, "mcmmo.admin");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.BYPASS.*
|
* MCMMO.BYPASS.*
|
||||||
*/
|
*/
|
||||||
public boolean hardcoremodeBypass(Player player) {
|
public static boolean hardcoremodeBypass(Player player) {
|
||||||
return player.hasPermission("mcmmo.bypass.hardcoremode");
|
return hasPermission(player, "mcmmo.bypass.hardcoremode");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean arcaneBypass(Player player) {
|
public static boolean arcaneBypass(Player player) {
|
||||||
return player.hasPermission("mcmmo.bypass.arcanebypass");
|
return hasPermission(player, "mcmmo.bypass.arcanebypass");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean inspectDistanceBypass(Player player) {
|
public static boolean inspectDistanceBypass(Player player) {
|
||||||
return player.hasPermission("mcmmo.bypass.inspect.distance");
|
return hasPermission(player, "mcmmo.bypass.inspect.distance");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean inspectOfflineBypass(Player player) {
|
public static boolean inspectOfflineBypass(Player player) {
|
||||||
return player.hasPermission("mcmmo.bypass.inspect.offline");
|
return hasPermission(player, "mcmmo.bypass.inspect.offline");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.TOOLS.*
|
* MCMMO.TOOLS.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean mcrefresh(Player player) {
|
public static boolean mcrefresh(Player player) {
|
||||||
return player.hasPermission("mcmmo.tools.mcrefresh");
|
return hasPermission(player, "mcmmo.tools.mcrefresh");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean mcremove(Player player) {
|
public static boolean mcremove(Player player) {
|
||||||
return player.hasPermission("mcmmo.tools.mcremove");
|
return hasPermission(player, "mcmmo.tools.mcremove");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean mmoedit(Player player) {
|
public static boolean mmoedit(Player player) {
|
||||||
return player.hasPermission("mcmmo.tools.mmoedit");
|
return hasPermission(player, "mcmmo.tools.mmoedit");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean mcgod(Player player) {
|
public static boolean mcgod(Player player) {
|
||||||
return player.hasPermission("mcmmo.tools.mcgod");
|
return hasPermission(player, "mcmmo.tools.mcgod");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MCMMO.PERKS.LUCKY*
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static boolean luckyAcrobatics(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.lucky.acrobatics");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean luckyArchery(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.lucky.archery");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean luckyAxes(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.lucky.axes");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean luckyExcavation(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.lucky.excavation");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean luckyFishing(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.lucky.fishing");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean luckyHerbalism(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.lucky.herbalism");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean luckyMining(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.lucky.mining");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean luckyRepair(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.lucky.repair");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean luckySwords(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.lucky.swords");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean luckyTaming(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.lucky.taming");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean luckyUnarmed(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.lucky.unarmed");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean luckyWoodcutting(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.lucky.woodcutting");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MCMMO.PERKS.XP*
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static boolean xpQuadruple(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.xp.quadruple");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean xpTriple(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.xp.triple");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean xpDoubleAndOneHalf(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.xp.150percentboost");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean xpDouble(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.xp.double");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean xpOneAndOneHalf(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.xp.50percentboost");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MCMMO.PERKS.COOLDOWNS*
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static boolean cooldownsHalved(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.cooldowns.halved");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean cooldownsThirded(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.cooldowns.thirded");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean cooldownsQuartered(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.cooldowns.quartered");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MCMMO.PERKS.ACTIVATIONTIME*
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static boolean activationTwelve(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.activationtime.twelveseconds");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean activationEight(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.activationtime.eightseconds");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean activationFour(Player player) {
|
||||||
|
return hasPermission(player, "mcmmo.perks.activationtime.fourseconds");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.TAMING.*
|
* MCMMO.ABILITY.TAMING.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean fastFoodService(Player player) {
|
public static boolean fastFoodService(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.taming.fastfoodservice");
|
return hasPermission(player, "mcmmo.ability.taming.fastfoodservice");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean sharpenedClaws(Player player) {
|
public static boolean sharpenedClaws(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.taming.sharpenedclaws");
|
return hasPermission(player, "mcmmo.ability.taming.sharpenedclaws");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean gore(Player player) {
|
public static boolean gore(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.taming.gore");
|
return hasPermission(player, "mcmmo.ability.taming.gore");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean callOfTheWild(Player player) {
|
public static boolean callOfTheWild(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.taming.callofthewild");
|
return hasPermission(player, "mcmmo.ability.taming.callofthewild");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean environmentallyAware(Player player) {
|
public static boolean environmentallyAware(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.taming.environmentallyaware");
|
return hasPermission(player, "mcmmo.ability.taming.environmentallyaware");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean thickFur(Player player) {
|
public static boolean thickFur(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.taming.thickfur");
|
return hasPermission(player, "mcmmo.ability.taming.thickfur");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean shockProof(Player player) {
|
public static boolean shockProof(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.taming.shockproof");
|
return hasPermission(player, "mcmmo.ability.taming.shockproof");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean beastLore(Player player) {
|
public static boolean beastLore(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.taming.beastlore");
|
return hasPermission(player, "mcmmo.ability.taming.beastlore");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.FISHING.*
|
* MCMMO.ABILITY.FISHING.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean shakeMob(Player player) {
|
public static boolean shakeMob(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.fishing.shakemob");
|
return hasPermission(player, "mcmmo.ability.fishing.shakemob");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean fishingTreasures(Player player) {
|
public static boolean fishingTreasures(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.fishing.treasures");
|
return hasPermission(player, "mcmmo.ability.fishing.treasures");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean fishingMagic(Player player) {
|
public static boolean fishingMagic(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.fishing.magic");
|
return hasPermission(player, "mcmmo.ability.fishing.magic");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean fishermansDiet(Player player) {
|
public static boolean fishermansDiet(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.fishing.fishermansdiet");
|
return hasPermission(player, "mcmmo.ability.fishing.fishermansdiet");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.MINING.*
|
* MCMMO.ABILITY.MINING.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean superBreaker(Player player) {
|
public static boolean superBreaker(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.mining.superbreaker");
|
return hasPermission(player, "mcmmo.ability.mining.superbreaker");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean miningDoubleDrops(Player player) {
|
public static boolean miningDoubleDrops(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.mining.doubledrops");
|
return hasPermission(player, "mcmmo.ability.mining.doubledrops");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.WOODCUTTING.*
|
* MCMMO.ABILITY.WOODCUTTING.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean treeFeller(Player player) {
|
public static boolean treeFeller(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.woodcutting.treefeller");
|
return hasPermission(player, "mcmmo.ability.woodcutting.treefeller");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean leafBlower(Player player) {
|
public static boolean leafBlower(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.woodcutting.leafblower");
|
return hasPermission(player, "mcmmo.ability.woodcutting.leafblower");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean woodcuttingDoubleDrops(Player player) {
|
public static boolean woodcuttingDoubleDrops(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.woodcutting.doubledrops");
|
return hasPermission(player, "mcmmo.ability.woodcutting.doubledrops");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.REPAIR.*
|
* MCMMO.ABILITY.REPAIR.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean repairBonus(Player player) {
|
public static boolean repairBonus(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.repairbonus");
|
return hasPermission(player, "mcmmo.ability.repair.repairbonus");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean repairMastery(Player player) {
|
public static boolean repairMastery(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.repairmastery");
|
return hasPermission(player, "mcmmo.ability.repair.repairmastery");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean arcaneForging(Player player) {
|
public static boolean arcaneForging(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.arcaneforging");
|
return hasPermission(player, "mcmmo.ability.repair.arcaneforging");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean woodRepair(Player player) {
|
public static boolean woodRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.woodrepair");
|
return hasPermission(player, "mcmmo.ability.repair.woodrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean stoneRepair(Player player) {
|
public static boolean stoneRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.stonerepair");
|
return hasPermission(player, "mcmmo.ability.repair.stonerepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean leatherRepair(Player player) {
|
public static boolean leatherRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.leatherrepair");
|
return hasPermission(player, "mcmmo.ability.repair.leatherrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean ironRepair(Player player) {
|
public static boolean ironRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.ironrepair");
|
return hasPermission(player, "mcmmo.ability.repair.ironrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean goldRepair(Player player) {
|
public static boolean goldRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.goldrepair");
|
return hasPermission(player, "mcmmo.ability.repair.goldrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean diamondRepair(Player player) {
|
public static boolean diamondRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.diamondrepair");
|
return hasPermission(player, "mcmmo.ability.repair.diamondrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean armorRepair(Player player) {
|
public static boolean armorRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.armorrepair");
|
return hasPermission(player, "mcmmo.ability.repair.armorrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean toolRepair(Player player) {
|
public static boolean toolRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.toolrepair");
|
return hasPermission(player, "mcmmo.ability.repair.toolrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean otherMaterialRepair(Player player) {
|
public static boolean otherMaterialRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.othermaterialrepair");
|
return hasPermission(player, "mcmmo.ability.repair.othermaterialrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean otherRepair(Player player) {
|
public static boolean otherRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.otherrepair");
|
return hasPermission(player, "mcmmo.ability.repair.otherrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean stringRepair(Player player) {
|
public static boolean stringRepair(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.stringrepair");
|
return hasPermission(player, "mcmmo.ability.repair.stringrepair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean salvage(Player player) {
|
public static boolean salvage(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.repair.salvage");
|
return hasPermission(player, "mcmmo.ability.repair.salvage");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -221,196 +334,196 @@ public class Permissions {
|
|||||||
* MCMMO.ABILITY.UNARMED.*
|
* MCMMO.ABILITY.UNARMED.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean unarmedBonus(Player player) {
|
public static boolean unarmedBonus(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.unarmed.bonusdamage");
|
return hasPermission(player, "mcmmo.ability.unarmed.bonusdamage");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean disarm(Player player) {
|
public static boolean disarm(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.unarmed.disarm");
|
return hasPermission(player, "mcmmo.ability.unarmed.disarm");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean berserk(Player player) {
|
public static boolean berserk(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.unarmed.berserk");
|
return hasPermission(player, "mcmmo.ability.unarmed.berserk");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean deflect(Player player) {
|
public static boolean deflect(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.unarmed.deflect");
|
return hasPermission(player, "mcmmo.ability.unarmed.deflect");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean ironGrip(Player player) {
|
public static boolean ironGrip(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.unarmed.irongrip");
|
return hasPermission(player, "mcmmo.ability.unarmed.irongrip");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.ARCHERY.*
|
* MCMMO.ABILITY.ARCHERY.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean trackArrows(Player player) {
|
public static boolean trackArrows(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.archery.trackarrows");
|
return hasPermission(player, "mcmmo.ability.archery.trackarrows");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean daze(Player player) {
|
public static boolean daze(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.archery.daze");
|
return hasPermission(player, "mcmmo.ability.archery.daze");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean archeryBonus(Player player) {
|
public static boolean archeryBonus(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.archery.bonusdamage");
|
return hasPermission(player, "mcmmo.ability.archery.bonusdamage");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.HERBALISM.*
|
* MCMMO.ABILITY.HERBALISM.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean herbalismDoubleDrops(Player player) {
|
public static boolean herbalismDoubleDrops(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.herbalism.doubledrops");
|
return hasPermission(player, "mcmmo.ability.herbalism.doubledrops");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean greenTerra(Player player) {
|
public static boolean greenTerra(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.herbalism.greenterra");
|
return hasPermission(player, "mcmmo.ability.herbalism.greenterra");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean greenThumbBlocks(Player player) {
|
public static boolean greenThumbBlocks(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.herbalism.greenthumbblocks");
|
return hasPermission(player, "mcmmo.ability.herbalism.greenthumbblocks");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean greenThumbCarrots(Player player) {
|
public static boolean greenThumbCarrots(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.herbalism.greenthumbcarrots");
|
return hasPermission(player, "mcmmo.ability.herbalism.greenthumbcarrots");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean greenThumbCocoa(Player player) {
|
public static boolean greenThumbCocoa(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.herbalism.greenthumbcocoa");
|
return hasPermission(player, "mcmmo.ability.herbalism.greenthumbcocoa");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean greenThumbNetherwart(Player player) {
|
public static boolean greenThumbNetherwart(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.herbalism.greenthumbnetherwart");
|
return hasPermission(player, "mcmmo.ability.herbalism.greenthumbnetherwart");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean greenThumbPotatoes(Player player) {
|
public static boolean greenThumbPotatoes(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.herbalism.greenthumbpotatoes");
|
return hasPermission(player, "mcmmo.ability.herbalism.greenthumbpotatoes");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean greenThumbWheat(Player player) {
|
public static boolean greenThumbWheat(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.herbalism.greenthumbwheat");
|
return hasPermission(player, "mcmmo.ability.herbalism.greenthumbwheat");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean farmersDiet(Player player) {
|
public static boolean farmersDiet(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.herbalism.farmersdiet");
|
return hasPermission(player, "mcmmo.ability.herbalism.farmersdiet");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.EXCAVATION.*
|
* MCMMO.ABILITY.EXCAVATION.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean gigaDrillBreaker(Player player) {
|
public static boolean gigaDrillBreaker(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.excavation.gigadrillbreaker");
|
return hasPermission(player, "mcmmo.ability.excavation.gigadrillbreaker");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean excavationTreasures(Player player) {
|
public static boolean excavationTreasures(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.excavation.treasures");
|
return hasPermission(player, "mcmmo.ability.excavation.treasures");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.SWORDS.*
|
* MCMMO.ABILITY.SWORDS.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean swordsBleed(Player player) {
|
public static boolean swordsBleed(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.swords.bleed");
|
return hasPermission(player, "mcmmo.ability.swords.bleed");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean serratedStrikes(Player player) {
|
public static boolean serratedStrikes(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.swords.serratedstrikes");
|
return hasPermission(player, "mcmmo.ability.swords.serratedstrikes");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean counterAttack(Player player) {
|
public static boolean counterAttack(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.swords.counterattack");
|
return hasPermission(player, "mcmmo.ability.swords.counterattack");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.AXES.*
|
* MCMMO.ABILITY.AXES.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean skullSplitter(Player player) {
|
public static boolean skullSplitter(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.axes.skullsplitter");
|
return hasPermission(player, "mcmmo.ability.axes.skullsplitter");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean axeBonus(Player player) {
|
public static boolean axeBonus(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.axes.bonusdamage");
|
return hasPermission(player, "mcmmo.ability.axes.bonusdamage");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean criticalHit(Player player) {
|
public static boolean criticalHit(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.axes.criticalhit");
|
return hasPermission(player, "mcmmo.ability.axes.criticalhit");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean impact(Player player) {
|
public static boolean impact(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.axes.impact");
|
return hasPermission(player, "mcmmo.ability.axes.impact");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean greaterImpact(Player player) {
|
public static boolean greaterImpact(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.axes.greaterimpact");
|
return hasPermission(player, "mcmmo.ability.axes.greaterimpact");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.ACROBATICS.*
|
* MCMMO.ABILITY.ACROBATICS.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean roll(Player player) {
|
public static boolean roll(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.acrobatics.roll");
|
return hasPermission(player, "mcmmo.ability.acrobatics.roll");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean gracefulRoll(Player player) {
|
public static boolean gracefulRoll(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.acrobatics.gracefulroll");
|
return hasPermission(player, "mcmmo.ability.acrobatics.gracefulroll");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean dodge(Player player) {
|
public static boolean dodge(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.acrobatics.dodge");
|
return hasPermission(player, "mcmmo.ability.acrobatics.dodge");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ABILITY.BLASTMINING.*
|
* MCMMO.ABILITY.BLASTMINING.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean biggerBombs(Player player) {
|
public static boolean biggerBombs(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.blastmining.biggerbombs");
|
return hasPermission(player, "mcmmo.ability.blastmining.biggerbombs");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean demolitionsExpertise(Player player) {
|
public static boolean demolitionsExpertise(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.blastmining.demolitionsexpertise");
|
return hasPermission(player, "mcmmo.ability.blastmining.demolitionsexpertise");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean blastMining(Player player) {
|
public static boolean blastMining(Player player) {
|
||||||
return player.hasPermission("mcmmo.ability.blastmining.detonate");
|
return hasPermission(player, "mcmmo.ability.blastmining.detonate");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.ITEM.*
|
* MCMMO.ITEM.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean chimaeraWing(Player player) {
|
public static boolean chimaeraWing(Player player) {
|
||||||
return player.hasPermission("mcmmo.item.chimaerawing");
|
return hasPermission(player, "mcmmo.item.chimaerawing");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.COMMANDS.*
|
* MCMMO.COMMANDS.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean mcAbility(Player player) {
|
public static boolean mcAbility(Player player) {
|
||||||
return player.hasPermission("mcmmo.commands.ability");
|
return hasPermission(player, "mcmmo.commands.ability");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean partyTeleport(Player player) {
|
public static boolean partyTeleport(Player player) {
|
||||||
return player.hasPermission("mcmmo.commands.ptp");
|
return hasPermission(player, "mcmmo.commands.ptp");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean inspect(Player player) {
|
public static boolean inspect(Player player) {
|
||||||
return player.hasPermission("mcmmo.commands.inspect");
|
return hasPermission(player, "mcmmo.commands.inspect");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean party(Player player) {
|
public static boolean party(Player player) {
|
||||||
return player.hasPermission("mcmmo.commands.party");
|
return hasPermission(player, "mcmmo.commands.party");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean skillReset(Player player) {
|
public static boolean skillReset(Player player) {
|
||||||
return player.hasPermission("mcmmo.skillreset");
|
return hasPermission(player, "mcmmo.skillreset");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -418,67 +531,67 @@ public class Permissions {
|
|||||||
* MCMMO.CHAT.*
|
* MCMMO.CHAT.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean partyChat(Player player) {
|
public static boolean partyChat(Player player) {
|
||||||
return player.hasPermission("mcmmo.chat.partychat");
|
return hasPermission(player, "mcmmo.chat.partychat");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean partyLock(Player player) {
|
public static boolean partyLock(Player player) {
|
||||||
return player.hasPermission("mcmmo.chat.partylock");
|
return hasPermission(player, "mcmmo.chat.partylock");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean adminChat(Player player) {
|
public static boolean adminChat(Player player) {
|
||||||
return player.hasPermission("mcmmo.chat.adminchat");
|
return hasPermission(player, "mcmmo.chat.adminchat");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MCMMO.SKILLS.*
|
* MCMMO.SKILLS.*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean taming(Player player) {
|
public static boolean taming(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.taming");
|
return hasPermission(player, "mcmmo.skills.taming");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean mining(Player player) {
|
public static boolean mining(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.mining");
|
return hasPermission(player, "mcmmo.skills.mining");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean fishing(Player player) {
|
public static boolean fishing(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.fishing");
|
return hasPermission(player, "mcmmo.skills.fishing");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean woodcutting(Player player) {
|
public static boolean woodcutting(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.woodcutting");
|
return hasPermission(player, "mcmmo.skills.woodcutting");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean repair(Player player) {
|
public static boolean repair(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.repair");
|
return hasPermission(player, "mcmmo.skills.repair");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean unarmed(Player player) {
|
public static boolean unarmed(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.unarmed");
|
return hasPermission(player, "mcmmo.skills.unarmed");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean archery(Player player) {
|
public static boolean archery(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.archery");
|
return hasPermission(player, "mcmmo.skills.archery");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean herbalism(Player player) {
|
public static boolean herbalism(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.herbalism");
|
return hasPermission(player, "mcmmo.skills.herbalism");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean excavation(Player player) {
|
public static boolean excavation(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.excavation");
|
return hasPermission(player, "mcmmo.skills.excavation");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean swords(Player player) {
|
public static boolean swords(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.swords");
|
return hasPermission(player, "mcmmo.skills.swords");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean axes(Player player) {
|
public static boolean axes(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.axes");
|
return hasPermission(player, "mcmmo.skills.axes");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean acrobatics(Player player) {
|
public static boolean acrobatics(Player player) {
|
||||||
return player.hasPermission("mcmmo.skills.acrobatics");
|
return hasPermission(player, "mcmmo.skills.acrobatics");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,13 +46,13 @@ public class Skills {
|
|||||||
int adjustedCooldown = cooldown;
|
int adjustedCooldown = cooldown;
|
||||||
|
|
||||||
//Reduced Cooldown Donor Perks
|
//Reduced Cooldown Donor Perks
|
||||||
if (player.hasPermission("mcmmo.perks.cooldowns.halved")) {
|
if (Permissions.cooldownsHalved(player)) {
|
||||||
adjustedCooldown = (int) (adjustedCooldown * 0.5);
|
adjustedCooldown = (int) (adjustedCooldown * 0.5);
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.cooldowns.thirded")) {
|
else if (Permissions.cooldownsThirded(player)) {
|
||||||
adjustedCooldown = (int) (adjustedCooldown * 0.66);
|
adjustedCooldown = (int) (adjustedCooldown * 0.66);
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.cooldowns.quartered")) {
|
else if (Permissions.cooldownsQuartered(player)) {
|
||||||
adjustedCooldown = (int) (adjustedCooldown * 0.75);
|
adjustedCooldown = (int) (adjustedCooldown * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,13 +75,13 @@ public class Skills {
|
|||||||
int adjustedCooldown = cooldown;
|
int adjustedCooldown = cooldown;
|
||||||
|
|
||||||
//Reduced Cooldown Donor Perks
|
//Reduced Cooldown Donor Perks
|
||||||
if (player.hasPermission("mcmmo.perks.cooldowns.halved")) {
|
if (Permissions.cooldownsHalved(player)) {
|
||||||
adjustedCooldown = (int) (adjustedCooldown * 0.5);
|
adjustedCooldown = (int) (adjustedCooldown * 0.5);
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.cooldowns.thirded")) {
|
else if (Permissions.cooldownsThirded(player)) {
|
||||||
adjustedCooldown = (int) (adjustedCooldown * 0.66);
|
adjustedCooldown = (int) (adjustedCooldown * 0.66);
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.cooldowns.quartered")) {
|
else if (Permissions.cooldownsQuartered(player)) {
|
||||||
adjustedCooldown = (int) (adjustedCooldown * 0.75);
|
adjustedCooldown = (int) (adjustedCooldown * 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,11 +343,11 @@ public class Skills {
|
|||||||
* @return true if the player has combat skills, false otherwise
|
* @return true if the player has combat skills, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean hasCombatSkills(Player player) {
|
public static boolean hasCombatSkills(Player player) {
|
||||||
if (Permissions.getInstance().axes(player)
|
if (Permissions.axes(player)
|
||||||
|| Permissions.getInstance().archery(player)
|
|| Permissions.archery(player)
|
||||||
|| Permissions.getInstance().swords(player)
|
|| Permissions.swords(player)
|
||||||
|| Permissions.getInstance().taming(player)
|
|| Permissions.taming(player)
|
||||||
|| Permissions.getInstance().unarmed(player)) {
|
|| Permissions.unarmed(player)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -362,11 +362,11 @@ public class Skills {
|
|||||||
* @return true if the player has gathering skills, false otherwise
|
* @return true if the player has gathering skills, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean hasGatheringSkills(Player player) {
|
public static boolean hasGatheringSkills(Player player) {
|
||||||
if (Permissions.getInstance().excavation(player)
|
if (Permissions.excavation(player)
|
||||||
|| Permissions.getInstance().fishing(player)
|
|| Permissions.fishing(player)
|
||||||
|| Permissions.getInstance().herbalism(player)
|
|| Permissions.herbalism(player)
|
||||||
|| Permissions.getInstance().mining(player)
|
|| Permissions.mining(player)
|
||||||
|| Permissions.getInstance().woodcutting(player)) {
|
|| Permissions.woodcutting(player)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -381,7 +381,7 @@ public class Skills {
|
|||||||
* @return true if the player has misc skills, false otherwise
|
* @return true if the player has misc skills, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean hasMiscSkills(Player player) {
|
public static boolean hasMiscSkills(Player player) {
|
||||||
if (Permissions.getInstance().acrobatics(player) || Permissions.getInstance().repair(player)) {
|
if (Permissions.acrobatics(player) || Permissions.repair(player)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -440,13 +440,13 @@ public class Skills {
|
|||||||
|
|
||||||
int ticks = 2 + (profile.getSkillLevel(type) / abilityLengthIncreaseLevel);
|
int ticks = 2 + (profile.getSkillLevel(type) / abilityLengthIncreaseLevel);
|
||||||
|
|
||||||
if (player.hasPermission("mcmmo.perks.activationtime.twelveseconds")) {
|
if (Permissions.activationTwelve(player)) {
|
||||||
ticks = ticks + 12;
|
ticks = ticks + 12;
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.activationtime.eightseconds")) {
|
else if (Permissions.activationEight(player)) {
|
||||||
ticks = ticks + 8;
|
ticks = ticks + 8;
|
||||||
}
|
}
|
||||||
else if (player.hasPermission("mcmmo.perks.activationtime.fourseconds")) {
|
else if (Permissions.activationFour(player)) {
|
||||||
ticks = ticks + 4;
|
ticks = ticks + 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
name: mcMMO
|
name: mcMMO
|
||||||
version: ${project.version}-b${BUILD_NUMBER}
|
version: ${project.version}-b${BUILD_NUMBER}
|
||||||
description: mcMMO takes core Minecraft game mechanics and expands them to add an extensive RPG experience, the goal of the project has always been a quality RPG experience. Everything in mcMMO is carefully thought out and is constantly improving. mcMMO adds eleven skills to train in and level in, while also offering a high level of customization for server admins. There are countless features, including custom sounds, graphical elements, and more added when running mcMMO in conjunction with Spout. I carefully read feedback and evaluate the mechanics of mcMMO in every update to provide an ever-evolving experience.
|
description: >
|
||||||
|
mcMMO takes core Minecraft game mechanics and expands them to add an extensive
|
||||||
|
RPG experience, the goal of the project has always been a quality RPG
|
||||||
|
experience. Everything in mcMMO is carefully thought out and is constantly
|
||||||
|
improving. mcMMO adds eleven skills to train in and level in, while also
|
||||||
|
offering a high level of customization for server admins. There are countless
|
||||||
|
features, including custom sounds, graphical elements, and more added when
|
||||||
|
running mcMMO in conjunction with Spout. I carefully read feedback and
|
||||||
|
evaluate the mechanics of mcMMO in every update to provide an ever-evolving
|
||||||
|
experience.
|
||||||
|
|
||||||
author: nossr50
|
author: nossr50
|
||||||
authors: [NuclearW, gmcferrin, bm01]
|
authors: [NuclearW, gmcferrin, bm01, Glitchfinder, TfT_02]
|
||||||
website: http://forums.bukkit.org/threads/rpg-mech-mcmmo-v1-3-05-rpg-addiction-redefined-multi-lingual-1-2-5-r1-0.68601/
|
website: http://dev.bukkit.org/server-mods/mcmmo/
|
||||||
|
|
||||||
main: com.gmail.nossr50.mcMMO
|
main: com.gmail.nossr50.mcMMO
|
||||||
softdepend: [Spout]
|
softdepend: [Spout]
|
||||||
@ -117,31 +126,54 @@ commands:
|
|||||||
description: Toggle Admin chat or send admin chat messages
|
description: Toggle Admin chat or send admin chat messages
|
||||||
permissions:
|
permissions:
|
||||||
mcmmo.*:
|
mcmmo.*:
|
||||||
|
description: Implies all mcmmo permissions.
|
||||||
|
children:
|
||||||
|
mcmmo.all: true
|
||||||
|
mcmmo.all:
|
||||||
description: Implies all mcmmo permissions.
|
description: Implies all mcmmo permissions.
|
||||||
children:
|
children:
|
||||||
mcmmo.defaults: true
|
mcmmo.defaults: true
|
||||||
mcmmo.tools.*: true
|
mcmmo.defaultsop: true
|
||||||
mcmmo.chat.adminchat: true
|
mcmmo.perks.all: true
|
||||||
|
mcmmo.bypass.all: true
|
||||||
mcmmo.defaults:
|
mcmmo.defaults:
|
||||||
default: true
|
default: true
|
||||||
description: mcmmo permisions that default to true
|
description: mcmmo permisions that default to true
|
||||||
children:
|
children:
|
||||||
mcmmo.ability.*: true
|
mcmmo.ability.all: true
|
||||||
mcmmo.item.*: true
|
mcmmo.item.all: true
|
||||||
mcmmo.motd: true
|
mcmmo.motd: true
|
||||||
mcmmo.commands.*: true
|
mcmmo.commands.all: true
|
||||||
mcmmo.chat.partychat: true
|
mcmmo.chat.partychat: true
|
||||||
mcmmo.skills.*: true
|
mcmmo.skills.all: true
|
||||||
mcmmo.defaultsop:
|
mcmmo.defaultsop:
|
||||||
default: op
|
default: op
|
||||||
description: mcmmo permissions that default to op
|
description: mcmmo permissions that default to op
|
||||||
children:
|
children:
|
||||||
mcmmo.chat.adminchat: true
|
mcmmo.chat.adminchat: true
|
||||||
mcmmo.admin: true
|
mcmmo.admin: true
|
||||||
mcmmo.tools.*: true
|
mcmmo.tools.all: true
|
||||||
mcmmo.admin:
|
mcmmo.admin:
|
||||||
description: Allows access to mmoupdate and other sensitive commands
|
description: Allows access to mmoupdate and other sensitive commands
|
||||||
mcmmo.perks.activationtime:
|
mcmmo.perks.*:
|
||||||
|
default: false
|
||||||
|
description: implies access to all mcmmo perks
|
||||||
|
children:
|
||||||
|
mcmmo.perks.all: true
|
||||||
|
mcmmo.perks.all:
|
||||||
|
default: false
|
||||||
|
description: implies access to all mcmmo perks
|
||||||
|
children:
|
||||||
|
mcmmo.perks.activationtime.all: true
|
||||||
|
mcmmo.perks.cooldowns.all: true
|
||||||
|
mcmmo.perks.xp.all: true
|
||||||
|
mcmmo.perks.lucky.all: true
|
||||||
|
mcmmo.perks.activationtime.*:
|
||||||
|
default: false
|
||||||
|
description: Increased activation time perks typically given to donors or VIPs
|
||||||
|
children:
|
||||||
|
mcmmo.perks.activationtime.all: true
|
||||||
|
mcmmo.perks.activationtime.all:
|
||||||
default: false
|
default: false
|
||||||
description: Increased activation time perks typically given to donors or VIPs
|
description: Increased activation time perks typically given to donors or VIPs
|
||||||
children:
|
children:
|
||||||
@ -157,7 +189,12 @@ permissions:
|
|||||||
mcmmo.perks.activationtime.fourseconds:
|
mcmmo.perks.activationtime.fourseconds:
|
||||||
default: false
|
default: false
|
||||||
description: Increases activation time by 4 seconds
|
description: Increases activation time by 4 seconds
|
||||||
mcmmo.perks.cooldowns:
|
mcmmo.perks.cooldowns.*:
|
||||||
|
default: false
|
||||||
|
description: Reduced cooldown perks typically given to donors or VIPs
|
||||||
|
children:
|
||||||
|
mcmmo.perks.cooldowns.all: true
|
||||||
|
mcmmo.perks.cooldowns.all:
|
||||||
default: false
|
default: false
|
||||||
description: Reduced cooldown perks typically given to donors or VIPs
|
description: Reduced cooldown perks typically given to donors or VIPs
|
||||||
children:
|
children:
|
||||||
@ -173,7 +210,12 @@ permissions:
|
|||||||
mcmmo.perks.cooldowns.halved:
|
mcmmo.perks.cooldowns.halved:
|
||||||
default: false
|
default: false
|
||||||
description: Cuts cooldowns down by 1/2
|
description: Cuts cooldowns down by 1/2
|
||||||
mcmmo.perks.xp:
|
mcmmo.perks.xp.*:
|
||||||
|
default: false
|
||||||
|
description: XP Perks typically given to donors or VIPs
|
||||||
|
children:
|
||||||
|
mcmmo.perks.xp.all: true
|
||||||
|
mcmmo.perks.xp.all:
|
||||||
default: false
|
default: false
|
||||||
description: XP Perks typically given to donors or VIPs
|
description: XP Perks typically given to donors or VIPs
|
||||||
children:
|
children:
|
||||||
@ -198,6 +240,11 @@ permissions:
|
|||||||
default: false
|
default: false
|
||||||
description: Mulitplies incoming XP by 1.5
|
description: Mulitplies incoming XP by 1.5
|
||||||
mcmmo.perks.lucky.*:
|
mcmmo.perks.lucky.*:
|
||||||
|
default: false
|
||||||
|
description: Gives all abilities & skills a 33.3% better chance to activate.
|
||||||
|
children:
|
||||||
|
mcmmo.perks.lucky.all: true
|
||||||
|
mcmmo.perks.lucky.all:
|
||||||
default: false
|
default: false
|
||||||
description: Gives all abilities & skills a 33.3% better chance to activate.
|
description: Gives all abilities & skills a 33.3% better chance to activate.
|
||||||
children:
|
children:
|
||||||
@ -250,6 +297,11 @@ permissions:
|
|||||||
default: false
|
default: false
|
||||||
description: Gives Woodcutting abilities & skills a 33.3% better chance to activate.
|
description: Gives Woodcutting abilities & skills a 33.3% better chance to activate.
|
||||||
mcmmo.bypass.*:
|
mcmmo.bypass.*:
|
||||||
|
default: false
|
||||||
|
description: Implies all bypass permissions.
|
||||||
|
children:
|
||||||
|
mcmmo.bypass.all: true
|
||||||
|
mcmmo.bypass.all:
|
||||||
default: false
|
default: false
|
||||||
description: Implies all bypass permissions.
|
description: Implies all bypass permissions.
|
||||||
children:
|
children:
|
||||||
@ -270,6 +322,10 @@ permissions:
|
|||||||
default: op
|
default: op
|
||||||
description: Allows user to bypass Inspect's offline player requirements
|
description: Allows user to bypass Inspect's offline player requirements
|
||||||
mcmmo.tools.*:
|
mcmmo.tools.*:
|
||||||
|
description: Implies all mcmmo.tools permissions.
|
||||||
|
children:
|
||||||
|
mcmmo.tools.all: true
|
||||||
|
mcmmo.tools.all:
|
||||||
description: Implies all mcmmo.tools permissions.
|
description: Implies all mcmmo.tools permissions.
|
||||||
children:
|
children:
|
||||||
mcmmo.tools.mcrefresh: true
|
mcmmo.tools.mcrefresh: true
|
||||||
@ -287,20 +343,28 @@ permissions:
|
|||||||
mcmmo.ability.*:
|
mcmmo.ability.*:
|
||||||
description: Implies all mcmmo.ability permissions.
|
description: Implies all mcmmo.ability permissions.
|
||||||
children:
|
children:
|
||||||
mcmmo.ability.taming.*: true
|
mcmmo.ability.all: true
|
||||||
mcmmo.ability.fishing.*: true
|
mcmmo.ability.all:
|
||||||
mcmmo.ability.mining.*: true
|
description: Implies all mcmmo.ability permissions.
|
||||||
mcmmo.ability.woodcutting.*: true
|
children:
|
||||||
mcmmo.ability.repair.*: true
|
mcmmo.ability.taming.all: true
|
||||||
mcmmo.ability.unarmed.*: true
|
mcmmo.ability.fishing.all: true
|
||||||
mcmmo.ability.archery.*: true
|
mcmmo.ability.mining.all: true
|
||||||
mcmmo.ability.herbalism.*: true
|
mcmmo.ability.woodcutting.all: true
|
||||||
mcmmo.ability.excavation.*: true
|
mcmmo.ability.repair.all: true
|
||||||
mcmmo.ability.swords.*: true
|
mcmmo.ability.unarmed.all: true
|
||||||
mcmmo.ability.axes.*: true
|
mcmmo.ability.archery.all: true
|
||||||
mcmmo.ability.acrobatics.*: true
|
mcmmo.ability.herbalism.all: true
|
||||||
mcmmo.ability.blastmining.*: true
|
mcmmo.ability.excavation.all: true
|
||||||
|
mcmmo.ability.swords.all: true
|
||||||
|
mcmmo.ability.axes.all: true
|
||||||
|
mcmmo.ability.acrobatics.all: true
|
||||||
|
mcmmo.ability.blastmining.all: true
|
||||||
mcmmo.ability.taming.*:
|
mcmmo.ability.taming.*:
|
||||||
|
description: Allows access to all Taming abilities
|
||||||
|
children:
|
||||||
|
mcmmo.ability.taming.all: true
|
||||||
|
mcmmo.ability.taming.all:
|
||||||
description: Allows access to all Taming abilities
|
description: Allows access to all Taming abilities
|
||||||
children:
|
children:
|
||||||
mcmmo.ability.taming.fastfoodservice: true
|
mcmmo.ability.taming.fastfoodservice: true
|
||||||
@ -328,6 +392,10 @@ permissions:
|
|||||||
mcmmo.ability.taming.beastlore:
|
mcmmo.ability.taming.beastlore:
|
||||||
description: Allows access to the Beast Lore ability
|
description: Allows access to the Beast Lore ability
|
||||||
mcmmo.ability.fishing.*:
|
mcmmo.ability.fishing.*:
|
||||||
|
description: Allows access to all Fishing abilities
|
||||||
|
children:
|
||||||
|
mcmmo.ability.fishing.all: true
|
||||||
|
mcmmo.ability.fishing.all:
|
||||||
description: Allows access to all Fishing abilities
|
description: Allows access to all Fishing abilities
|
||||||
children:
|
children:
|
||||||
mcmmo.ability.fishing.shakemob: true
|
mcmmo.ability.fishing.shakemob: true
|
||||||
@ -343,6 +411,10 @@ permissions:
|
|||||||
mcmmo.ability.fishing.fishermansdiet:
|
mcmmo.ability.fishing.fishermansdiet:
|
||||||
description: Allows access to the Fishermans's Diet ability
|
description: Allows access to the Fishermans's Diet ability
|
||||||
mcmmo.ability.mining.*:
|
mcmmo.ability.mining.*:
|
||||||
|
description: Allows access to all Mining abilities
|
||||||
|
children:
|
||||||
|
mcmmo.ability.mining.all: true
|
||||||
|
mcmmo.ability.mining.all:
|
||||||
description: Allows access to all Mining abilities
|
description: Allows access to all Mining abilities
|
||||||
children:
|
children:
|
||||||
mcmmo.ability.mining.superbreaker: true
|
mcmmo.ability.mining.superbreaker: true
|
||||||
@ -352,6 +424,10 @@ permissions:
|
|||||||
mcmmo.ability.mining.doubledrops:
|
mcmmo.ability.mining.doubledrops:
|
||||||
description: Allows double drop chance when mining
|
description: Allows double drop chance when mining
|
||||||
mcmmo.ability.woodcutting.*:
|
mcmmo.ability.woodcutting.*:
|
||||||
|
description: Allows access to all Woodcutting abilities
|
||||||
|
children:
|
||||||
|
mcmmo.ability.woodcutting.all: true
|
||||||
|
mcmmo.ability.woodcutting.all:
|
||||||
description: Allows access to all Woodcutting abilities
|
description: Allows access to all Woodcutting abilities
|
||||||
children:
|
children:
|
||||||
mcmmo.ability.woodcutting.treefeller: true
|
mcmmo.ability.woodcutting.treefeller: true
|
||||||
@ -364,6 +440,10 @@ permissions:
|
|||||||
mcmmo.ability.woodcutting.doubledrops:
|
mcmmo.ability.woodcutting.doubledrops:
|
||||||
description: Allows double drop chance when woodcutting
|
description: Allows double drop chance when woodcutting
|
||||||
mcmmo.ability.repair.*:
|
mcmmo.ability.repair.*:
|
||||||
|
description: Allows access to all Repair abilities
|
||||||
|
children:
|
||||||
|
mcmmo.ability.repair.all: true
|
||||||
|
mcmmo.ability.repair.all:
|
||||||
description: Allows access to all Repair abilities
|
description: Allows access to all Repair abilities
|
||||||
children:
|
children:
|
||||||
mcmmo.ability.repair.repairbonus: true
|
mcmmo.ability.repair.repairbonus: true
|
||||||
@ -412,6 +492,10 @@ permissions:
|
|||||||
mcmmo.ability.repair.otherrepair:
|
mcmmo.ability.repair.otherrepair:
|
||||||
description: Allows ability to repair items of type OTHER
|
description: Allows ability to repair items of type OTHER
|
||||||
mcmmo.ability.unarmed.*:
|
mcmmo.ability.unarmed.*:
|
||||||
|
description: Allows access to all Unarmed abilities
|
||||||
|
children:
|
||||||
|
mcmmo.ability.unarmed.all: true
|
||||||
|
mcmmo.ability.unarmed.all:
|
||||||
description: Allows access to all Unarmed abilities
|
description: Allows access to all Unarmed abilities
|
||||||
children:
|
children:
|
||||||
mcmmo.ability.unarmed.bonusdamage: true
|
mcmmo.ability.unarmed.bonusdamage: true
|
||||||
@ -430,6 +514,10 @@ permissions:
|
|||||||
mcmmo.ability.unarmed.irongrip:
|
mcmmo.ability.unarmed.irongrip:
|
||||||
description: Allows access to the Iron Grip ability
|
description: Allows access to the Iron Grip ability
|
||||||
mcmmo.ability.archery.*:
|
mcmmo.ability.archery.*:
|
||||||
|
description: Allows access to all Archery abilities
|
||||||
|
children:
|
||||||
|
mcmmo.ability.archery.all: true
|
||||||
|
mcmmo.ability.archery.all:
|
||||||
description: Allows access to all Archery abilities
|
description: Allows access to all Archery abilities
|
||||||
children:
|
children:
|
||||||
mcmmo.ability.archery.trackarrows: true
|
mcmmo.ability.archery.trackarrows: true
|
||||||
@ -442,6 +530,10 @@ permissions:
|
|||||||
mcmmo.ability.archery.bonusdamage:
|
mcmmo.ability.archery.bonusdamage:
|
||||||
description: Allows bonus damage from Archery
|
description: Allows bonus damage from Archery
|
||||||
mcmmo.ability.herbalism.*:
|
mcmmo.ability.herbalism.*:
|
||||||
|
description: Allows access to all Herbalism abilities
|
||||||
|
children:
|
||||||
|
mcmmo.ability.herbalism.all: true
|
||||||
|
mcmmo.ability.herbalism.all:
|
||||||
description: Allows access to all Herbalism abilities
|
description: Allows access to all Herbalism abilities
|
||||||
children:
|
children:
|
||||||
mcmmo.ability.herbalism.doubledrops: true
|
mcmmo.ability.herbalism.doubledrops: true
|
||||||
@ -469,6 +561,10 @@ permissions:
|
|||||||
mcmmo.ability.herbalism.farmersdiet:
|
mcmmo.ability.herbalism.farmersdiet:
|
||||||
description: Allows access to the Farmer's Diet ability
|
description: Allows access to the Farmer's Diet ability
|
||||||
mcmmo.ability.excavation.*:
|
mcmmo.ability.excavation.*:
|
||||||
|
description: Allows access to all Excavation abilities
|
||||||
|
children:
|
||||||
|
mcmmo.ability.excavation.all: true
|
||||||
|
mcmmo.ability.excavation.all:
|
||||||
description: Allows access to all Excavation abilities
|
description: Allows access to all Excavation abilities
|
||||||
children:
|
children:
|
||||||
mcmmo.ability.excavation.gigadrillbreaker: true
|
mcmmo.ability.excavation.gigadrillbreaker: true
|
||||||
@ -478,6 +574,10 @@ permissions:
|
|||||||
mcmmo.ability.excavation.treasures:
|
mcmmo.ability.excavation.treasures:
|
||||||
description: Allows treasure drops from Excavation
|
description: Allows treasure drops from Excavation
|
||||||
mcmmo.ability.swords.*:
|
mcmmo.ability.swords.*:
|
||||||
|
description: Allows access to all Swords abilities
|
||||||
|
children:
|
||||||
|
mcmmo.ability.swords.all: true
|
||||||
|
mcmmo.ability.swords.all:
|
||||||
description: Allows access to all Swords abilities
|
description: Allows access to all Swords abilities
|
||||||
children:
|
children:
|
||||||
mcmmo.ability.swords.bleed: true
|
mcmmo.ability.swords.bleed: true
|
||||||
@ -490,6 +590,10 @@ permissions:
|
|||||||
mcmmo.ability.swords.counterattack:
|
mcmmo.ability.swords.counterattack:
|
||||||
description: Allows access to the Counter Attack ability
|
description: Allows access to the Counter Attack ability
|
||||||
mcmmo.ability.axes.*:
|
mcmmo.ability.axes.*:
|
||||||
|
description: Allows access to all Axes abilities
|
||||||
|
children:
|
||||||
|
mcmmo.ability.axes.all: true
|
||||||
|
mcmmo.ability.axes.all:
|
||||||
description: Allows access to all Axes abilities
|
description: Allows access to all Axes abilities
|
||||||
children:
|
children:
|
||||||
mcmmo.ability.axes.skullsplitter: true
|
mcmmo.ability.axes.skullsplitter: true
|
||||||
@ -508,6 +612,10 @@ permissions:
|
|||||||
mcmmo.ability.axes.greaterimpact:
|
mcmmo.ability.axes.greaterimpact:
|
||||||
description: Allows access to the Greater Impact ability
|
description: Allows access to the Greater Impact ability
|
||||||
mcmmo.ability.acrobatics.*:
|
mcmmo.ability.acrobatics.*:
|
||||||
|
description: Allows access to all Acrobatics abilities
|
||||||
|
children:
|
||||||
|
mcmmo.ability.acrobatics.all: true
|
||||||
|
mcmmo.ability.acrobatics.all:
|
||||||
description: Allows access to all Acrobatics abilities
|
description: Allows access to all Acrobatics abilities
|
||||||
children:
|
children:
|
||||||
mcmmo.ability.acrobatics.roll: true
|
mcmmo.ability.acrobatics.roll: true
|
||||||
@ -520,6 +628,10 @@ permissions:
|
|||||||
mcmmo.ability.acrobatics.dodge:
|
mcmmo.ability.acrobatics.dodge:
|
||||||
description: Allows access to the Dodge ability
|
description: Allows access to the Dodge ability
|
||||||
mcmmo.ability.blastmining.*:
|
mcmmo.ability.blastmining.*:
|
||||||
|
description: Allows access to all Blast Mining abilities
|
||||||
|
children:
|
||||||
|
mcmmo.ability.blastmining.all: true
|
||||||
|
mcmmo.ability.blastmining.all:
|
||||||
description: Allows access to all Blast Mining abilities
|
description: Allows access to all Blast Mining abilities
|
||||||
children:
|
children:
|
||||||
mcmmo.ability.blastmining.biggerbombs: true
|
mcmmo.ability.blastmining.biggerbombs: true
|
||||||
@ -532,6 +644,10 @@ permissions:
|
|||||||
mcmmo.ability.blastmining.detonate:
|
mcmmo.ability.blastmining.detonate:
|
||||||
description: Allows for remote TNT detonation
|
description: Allows for remote TNT detonation
|
||||||
mcmmo.item.*:
|
mcmmo.item.*:
|
||||||
|
description: Implies all mcmmo.item permissions
|
||||||
|
children:
|
||||||
|
mcmmo.item.all: true
|
||||||
|
mcmmo.item.all:
|
||||||
description: Implies all mcmmo.item permissions
|
description: Implies all mcmmo.item permissions
|
||||||
children:
|
children:
|
||||||
mcmmo.item.chimaerawing: true
|
mcmmo.item.chimaerawing: true
|
||||||
@ -540,6 +656,10 @@ permissions:
|
|||||||
mcmmo.motd:
|
mcmmo.motd:
|
||||||
description: Allows access to the motd
|
description: Allows access to the motd
|
||||||
mcmmo.commands.*:
|
mcmmo.commands.*:
|
||||||
|
description: Implies all mcmmo.commands permissions.
|
||||||
|
children:
|
||||||
|
mcmmo.commands.all: true
|
||||||
|
mcmmo.commands.all:
|
||||||
description: Implies all mcmmo.commands permissions.
|
description: Implies all mcmmo.commands permissions.
|
||||||
children:
|
children:
|
||||||
mcmmo.commands.ability: true
|
mcmmo.commands.ability: true
|
||||||
@ -555,6 +675,10 @@ permissions:
|
|||||||
mcmmo.commands.party:
|
mcmmo.commands.party:
|
||||||
description: Allows acces to the party command
|
description: Allows acces to the party command
|
||||||
mcmmo.chat.*:
|
mcmmo.chat.*:
|
||||||
|
description: Implies all mcmmo.chat permissions. (Warning, contains adminchat)
|
||||||
|
children:
|
||||||
|
mcmmo.chat.all: true
|
||||||
|
mcmmo.chat.all:
|
||||||
description: Implies all mcmmo.chat permissions. (Warning, contains adminchat)
|
description: Implies all mcmmo.chat permissions. (Warning, contains adminchat)
|
||||||
children:
|
children:
|
||||||
mcmmo.chat.adminchat: true
|
mcmmo.chat.adminchat: true
|
||||||
@ -564,6 +688,10 @@ permissions:
|
|||||||
mcmmo.chat.partychat:
|
mcmmo.chat.partychat:
|
||||||
description: Allows participation in party chat
|
description: Allows participation in party chat
|
||||||
mcmmo.skills.*:
|
mcmmo.skills.*:
|
||||||
|
description: Implies all mcmmo.skills permissions.
|
||||||
|
children:
|
||||||
|
mcmmo.skills.all: true
|
||||||
|
mcmmo.skills.all:
|
||||||
description: Implies all mcmmo.skills permissions.
|
description: Implies all mcmmo.skills permissions.
|
||||||
children:
|
children:
|
||||||
mcmmo.skills.fishing: true
|
mcmmo.skills.fishing: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user