mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Fixed a NPE that could occur if Roll was disabled in coreskills.yml
This commit is contained in:
parent
a677450d50
commit
2be67bae19
@ -1,5 +1,6 @@
|
|||||||
Version 2.1.72
|
Version 2.1.72
|
||||||
Fixed a NPE if a server shutdown with no player data needing to be saved (the error is harmless but spammy)
|
Fixed a NPE if a server shutdown with no player data needing to be saved (the error is harmless but spammy)
|
||||||
|
Fixed a NPE that could occur if Roll was disabled in coreskills.yml
|
||||||
|
|
||||||
Version 2.1.71
|
Version 2.1.71
|
||||||
Salvage will now always ask for confirmation before breaking your items (instead of only asking for enchanted items)
|
Salvage will now always ask for confirmation before breaking your items (instead of only asking for enchanted items)
|
||||||
|
@ -15,12 +15,7 @@ public class InteractionManager {
|
|||||||
private static HashMap<String, AbstractSubSkill> subSkillNameMap; //Used for mmoinfo optimization
|
private static HashMap<String, AbstractSubSkill> subSkillNameMap; //Used for mmoinfo optimization
|
||||||
private static ArrayList<AbstractSubSkill> subSkillList;
|
private static ArrayList<AbstractSubSkill> subSkillList;
|
||||||
|
|
||||||
/**
|
public static void initMaps() {
|
||||||
* Registers subskills with the Interaction registration
|
|
||||||
* @param abstractSubSkill the target subskill to register
|
|
||||||
*/
|
|
||||||
public static void registerSubSkill(AbstractSubSkill abstractSubSkill)
|
|
||||||
{
|
|
||||||
/* INIT MAPS */
|
/* INIT MAPS */
|
||||||
if(interactRegister == null)
|
if(interactRegister == null)
|
||||||
interactRegister = new HashMap<>();
|
interactRegister = new HashMap<>();
|
||||||
@ -30,7 +25,14 @@ public class InteractionManager {
|
|||||||
|
|
||||||
if(subSkillNameMap == null)
|
if(subSkillNameMap == null)
|
||||||
subSkillNameMap = new HashMap<>();
|
subSkillNameMap = new HashMap<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers subskills with the Interaction registration
|
||||||
|
* @param abstractSubSkill the target subskill to register
|
||||||
|
*/
|
||||||
|
public static void registerSubSkill(AbstractSubSkill abstractSubSkill)
|
||||||
|
{
|
||||||
//Store a unique copy of each subskill
|
//Store a unique copy of each subskill
|
||||||
if(!subSkillList.contains(abstractSubSkill))
|
if(!subSkillList.contains(abstractSubSkill))
|
||||||
subSkillList.add(abstractSubSkill);
|
subSkillList.add(abstractSubSkill);
|
||||||
|
@ -216,6 +216,8 @@ public class mcMMO extends JavaPlugin {
|
|||||||
Permissions.generateWorldTeleportPermissions();
|
Permissions.generateWorldTeleportPermissions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InteractionManager.initMaps(); //Init maps before populating ranks
|
||||||
|
|
||||||
//Populate Ranked Skill Maps (DO THIS LAST)
|
//Populate Ranked Skill Maps (DO THIS LAST)
|
||||||
RankUtils.populateRanks();
|
RankUtils.populateRanks();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user