mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Added some missing config items
This commit is contained in:
parent
d141a28747
commit
1d62f8b177
@ -695,31 +695,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
/* Interaction Settings */
|
||||
public boolean doesNotificationUseActionBar(NotificationType notificationType)
|
||||
{
|
||||
String key = "";
|
||||
|
||||
switch(notificationType)
|
||||
{
|
||||
case XP_GAIN:
|
||||
key = "ExperienceGain";
|
||||
break;
|
||||
case LEVEL_UP_MESSAGE:
|
||||
key = "LevelUp";
|
||||
break;
|
||||
case SUBSKILL_MESSAGE:
|
||||
key = "SubSkillInteraction";
|
||||
break;
|
||||
case SUBSKILL_UNLOCKED:
|
||||
key = "SubSkillUnlocked";
|
||||
break;
|
||||
case TOOL:
|
||||
key = "ToolReady";
|
||||
break;
|
||||
case SUPER_ABILITY:
|
||||
key = "SuperAbilityInteraction";
|
||||
break;
|
||||
}
|
||||
|
||||
return config.getBoolean("Skills.FeedBack.ActionBarNotifications."+key, true);
|
||||
return config.getBoolean("Skills.FeedBack.ActionBarNotifications."+notificationType.toString(), true);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -4,6 +4,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill;
|
||||
import com.gmail.nossr50.datatypes.skills.subskills.interfaces.InteractType;
|
||||
import com.gmail.nossr50.datatypes.skills.subskills.interfaces.Interaction;
|
||||
@ -172,6 +173,16 @@ public class InteractionManager {
|
||||
return subSkillList;
|
||||
}
|
||||
|
||||
public static boolean hasSubSkill(String name)
|
||||
{
|
||||
return getAbstractByName(name) != null;
|
||||
}
|
||||
|
||||
public static boolean hasSubSkill(SubSkillType subSkillType)
|
||||
{
|
||||
return hasSubSkill(subSkillType.getNiceNameNoSpaces(subSkillType));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the associative map which contains all registered interactions
|
||||
* @return the interact register
|
||||
|
@ -580,8 +580,8 @@ public class TextComponentFactory {
|
||||
{
|
||||
if(Permissions.isSubSkillEnabled(player, subSkillType))
|
||||
{
|
||||
if(InteractionManager.getInteractRegister().get(subSkillType.getNiceNameNoSpaces(subSkillType)) == null)
|
||||
textComponents.add(TextComponentFactory.getSubSkillTextComponent(player, subSkillType));
|
||||
if(!InteractionManager.hasSubSkill(subSkillType))
|
||||
textComponents.add(TextComponentFactory.getSubSkillTextComponent(player, subSkillType));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,11 +17,15 @@ Skills:
|
||||
Feedback:
|
||||
# Turning these to false will have them printed in chat instead
|
||||
ActionBarNotifications:
|
||||
AbilityOff: true
|
||||
LevelRequirementNotMet: true
|
||||
AbilityCoolDown: true
|
||||
LevelUps: true
|
||||
ToolReady: true
|
||||
SubSkillInteraction: true
|
||||
SubSkillUnlocked: true
|
||||
SuperAbilityInteraction: true
|
||||
SuperAbilityAlertOthers: true
|
||||
ExperienceGain: true
|
||||
General:
|
||||
Ability:
|
||||
|
Loading…
Reference in New Issue
Block a user