mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 06:06:45 +01:00
Hack to disable supers that aren't ready yet
This commit is contained in:
parent
826d16d916
commit
fdc308762c
@ -168,7 +168,12 @@ public final class Permissions {
|
||||
|
||||
public static boolean skillEnabled(Permissible permissible, PrimarySkillType skill) {return permissible.hasPermission("mcmmo.skills." + skill.toString().toLowerCase(Locale.ENGLISH)); }
|
||||
public static boolean vanillaXpBoost(Permissible permissible, PrimarySkillType skill) { return permissible.hasPermission("mcmmo.ability." + skill.toString().toLowerCase(Locale.ENGLISH) + ".vanillaxpboost"); }
|
||||
public static boolean isSubSkillEnabled(Permissible permissible, SubSkillType subSkillType) { return permissible.hasPermission(subSkillType.getPermissionNodeAddress()); }
|
||||
public static boolean isSubSkillEnabled(Permissible permissible, SubSkillType subSkillType) {
|
||||
// hack to disable supers that aren't coded yet
|
||||
if(subSkillType == SubSkillType.TRIDENTS_SUPER || subSkillType == SubSkillType.CROSSBOWS_SUPER_SHOTGUN)
|
||||
return false;
|
||||
return permissible.hasPermission(subSkillType.getPermissionNodeAddress());
|
||||
}
|
||||
|
||||
/* ACROBATICS */
|
||||
public static boolean dodge(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.acrobatics.dodge"); }
|
||||
@ -227,12 +232,18 @@ public final class Permissions {
|
||||
/* WOODCUTTING */
|
||||
public static boolean treeFeller(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.woodcutting.treefeller"); }
|
||||
/* CROSSBOWS */
|
||||
public static boolean superShotgun(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.crossbows.supershotgun"); }
|
||||
public static boolean superShotgun(Permissible permissible) {
|
||||
return false;
|
||||
// return permissible.hasPermission("mcmmo.ability.crossbows.supershotgun");
|
||||
}
|
||||
public static boolean trickShot(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.crossbows.trickshot"); }
|
||||
public static boolean poweredShot(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.crossbows.poweredshot"); }
|
||||
|
||||
/* TRIDENTS */
|
||||
public static boolean tridentsSuper(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.tridents.superability"); }
|
||||
public static boolean tridentsSuper(Permissible permissible) {
|
||||
return false;
|
||||
// return permissible.hasPermission("mcmmo.ability.tridents.superability");
|
||||
}
|
||||
public static boolean tridentsLimitBreak(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.tridents.superability"); }
|
||||
|
||||
/*
|
||||
|
@ -34,6 +34,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
public final class SkillUtils {
|
||||
/**
|
||||
* This is a static utility class, therefore we don't want any instances of
|
||||
@ -362,6 +364,11 @@ public final class SkillUtils {
|
||||
*/
|
||||
public static boolean canUseSubskill(Player player, SubSkillType subSkillType)
|
||||
{
|
||||
requireNonNull(subSkillType, "subSkillType cannot be null");
|
||||
// hack to disable supers that aren't coded yet
|
||||
if(subSkillType == SubSkillType.TRIDENTS_SUPER || subSkillType == SubSkillType.CROSSBOWS_SUPER_SHOTGUN)
|
||||
return false;
|
||||
|
||||
return Permissions.isSubSkillEnabled(player, subSkillType) && RankUtils.hasUnlockedSubskill(player, subSkillType);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user