mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 22:26:46 +01:00
More work on new super abilities
This commit is contained in:
parent
ea2e2bdc9a
commit
916a747f88
@ -563,7 +563,7 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getLevelCap(PrimarySkillType skill) {
|
public int getLevelCap(PrimarySkillType skill) {
|
||||||
int cap = config.getInt("Skills." + StringUtils.getCapitalized(skill.toString()) + ".Level_Cap");
|
int cap = config.getInt("Skills." + StringUtils.getCapitalized(skill.toString()) + ".Level_Cap", 0);
|
||||||
return (cap <= 0) ? Integer.MAX_VALUE : cap;
|
return (cap <= 0) ? Integer.MAX_VALUE : cap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +30,72 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
private final File usersFile;
|
private final File usersFile;
|
||||||
private static final Object fileWritingLock = new Object();
|
private static final Object fileWritingLock = new Object();
|
||||||
|
|
||||||
|
//Used to map out the split data in the FFDB
|
||||||
|
public static int USERNAME = 0;
|
||||||
|
public static int SKILLS_MINING = 1;
|
||||||
|
public static int EXP_MINING = 4;
|
||||||
|
public static int SKILLS_WOODCUTTING = 5;
|
||||||
|
public static int EXP_WOODCUTTING = 6;
|
||||||
|
public static int SKILLS_REPAIR = 7;
|
||||||
|
public static int SKILLS_UNARMED = 8;
|
||||||
|
public static int SKILLS_HERBALISM = 9;
|
||||||
|
public static int SKILLS_EXCAVATION = 10;
|
||||||
|
public static int SKILLS_ARCHERY = 11;
|
||||||
|
public static int SKILLS_SWORDS = 12;
|
||||||
|
public static int SKILLS_AXES = 13;
|
||||||
|
public static int SKILLS_ACROBATICS = 14;
|
||||||
|
public static int EXP_REPAIR = 15;
|
||||||
|
public static int EXP_UNARMED = 16;
|
||||||
|
public static int EXP_HERBALISM = 17;
|
||||||
|
public static int EXP_EXCAVATION = 18;
|
||||||
|
public static int EXP_ARCHERY = 19;
|
||||||
|
public static int EXP_SWORDS = 20;
|
||||||
|
public static int EXP_AXES = 21;
|
||||||
|
public static int EXP_ACROBATICS = 22;
|
||||||
|
public static int SKILLS_TAMING = 24;
|
||||||
|
public static int EXP_TAMING = 25;
|
||||||
|
public static int COOLDOWN_BERSERK = 26;
|
||||||
|
public static int COOLDOWN_GIGA_DRILL_BREAKER = 27;
|
||||||
|
public static int COOLDOWN_TREE_FELLER = 28;
|
||||||
|
public static int COOLDOWN_GREEN_TERRA = 29;
|
||||||
|
public static int COOLDOWN_SERRATED_STRIKES = 30;
|
||||||
|
public static int COOLDOWN_SKULL_SPLITTER = 31;
|
||||||
|
public static int COOLDOWN_SUPER_BREAKER = 32;
|
||||||
|
public static int SKILLS_FISHING = 34;
|
||||||
|
public static int EXP_FISHING = 35;
|
||||||
|
public static int COOLDOWN_BLAST_MINING = 36;
|
||||||
|
public static int LAST_LOGIN = 37;
|
||||||
|
public static int HEALTHBAR = 38;
|
||||||
|
public static int SKILLS_ALCHEMY = 39;
|
||||||
|
public static int EXP_ALCHEMY = 40;
|
||||||
|
public static int UUID_INDEX = 41;
|
||||||
|
public static int SCOREBOARD_TIPS = 42;
|
||||||
|
public static int COOLDOWN_CHIMAERA_WING = 43;
|
||||||
|
public static int SKILLS_TRIDENTS = 44;
|
||||||
|
public static int EXP_TRIDENTS = 45;
|
||||||
|
public static int SKILLS_CROSSBOWS = 46;
|
||||||
|
public static int EXP_CROSSBOWS = 47;
|
||||||
|
public static int BARSTATE_ACROBATICS = 48;
|
||||||
|
public static int BARSTATE_ALCHEMY = 49;
|
||||||
|
public static int BARSTATE_ARCHERY = 50;
|
||||||
|
public static int BARSTATE_AXES = 51;
|
||||||
|
public static int BARSTATE_EXCAVATION = 52;
|
||||||
|
public static int BARSTATE_FISHING = 53;
|
||||||
|
public static int BARSTATE_HERBALISM = 54;
|
||||||
|
public static int BARSTATE_MINING = 55;
|
||||||
|
public static int BARSTATE_REPAIR = 56;
|
||||||
|
public static int BARSTATE_SALVAGE = 57;
|
||||||
|
public static int BARSTATE_SMELTING = 58;
|
||||||
|
public static int BARSTATE_SWORDS = 59;
|
||||||
|
public static int BARSTATE_TAMING = 60;
|
||||||
|
public static int BARSTATE_UNARMED = 61;
|
||||||
|
public static int BARSTATE_WOODCUTTING = 62;
|
||||||
|
public static int BARSTATE_TRIDENTS = 63;
|
||||||
|
public static int BARSTATE_CROSSBOWS = 64;
|
||||||
|
public static int COOLDOWN_ARCHERY_SUPER_1 = 65;
|
||||||
|
public static int COOLDOWN_CROSSBOWS_SUPER_1 = 66;
|
||||||
|
public static int COOLDOWN_TRIDENTS_SUPER_1 = 67;
|
||||||
|
|
||||||
protected FlatfileDatabaseManager() {
|
protected FlatfileDatabaseManager() {
|
||||||
usersFile = new File(mcMMO.getUsersFilePath());
|
usersFile = new File(mcMMO.getUsersFilePath());
|
||||||
checkStructure();
|
checkStructure();
|
||||||
@ -491,6 +557,11 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
out.append("0:"); // Scoreboard tips shown
|
out.append("0:"); // Scoreboard tips shown
|
||||||
out.append("0:"); // Chimaera Wing Dats
|
out.append("0:"); // Chimaera Wing Dats
|
||||||
|
|
||||||
|
out.append("0:"); // Tridents Skill Level
|
||||||
|
out.append("0:"); // Tridents XP
|
||||||
|
out.append("0:"); // Crossbow Skill Level
|
||||||
|
out.append("0:"); // Crossbow XP Level
|
||||||
|
|
||||||
//Barstates for the 15 currently existing skills by ordinal value
|
//Barstates for the 15 currently existing skills by ordinal value
|
||||||
out.append("NORMAL:"); // Acrobatics
|
out.append("NORMAL:"); // Acrobatics
|
||||||
out.append("NORMAL:"); // Alchemy
|
out.append("NORMAL:"); // Alchemy
|
||||||
@ -860,6 +931,8 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
powerLevel += putStat(taming, playerName, skills.get(PrimarySkillType.TAMING));
|
powerLevel += putStat(taming, playerName, skills.get(PrimarySkillType.TAMING));
|
||||||
powerLevel += putStat(unarmed, playerName, skills.get(PrimarySkillType.UNARMED));
|
powerLevel += putStat(unarmed, playerName, skills.get(PrimarySkillType.UNARMED));
|
||||||
powerLevel += putStat(woodcutting, playerName, skills.get(PrimarySkillType.WOODCUTTING));
|
powerLevel += putStat(woodcutting, playerName, skills.get(PrimarySkillType.WOODCUTTING));
|
||||||
|
powerLevel += putStat(woodcutting, playerName, skills.get(PrimarySkillType.CROSSBOWS));
|
||||||
|
powerLevel += putStat(woodcutting, playerName, skills.get(PrimarySkillType.TRIDENTS));
|
||||||
|
|
||||||
putStat(powerLevels, playerName, powerLevel);
|
putStat(powerLevels, playerName, powerLevel);
|
||||||
}
|
}
|
||||||
@ -940,6 +1013,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
}
|
}
|
||||||
boolean updated = false;
|
boolean updated = false;
|
||||||
String[] character = line.split(":");
|
String[] character = line.split(":");
|
||||||
|
int originalLength = character.length;
|
||||||
|
|
||||||
// Prevent the same username from being present multiple times
|
// Prevent the same username from being present multiple times
|
||||||
if (!usernames.add(character[USERNAME])) {
|
if (!usernames.add(character[USERNAME])) {
|
||||||
@ -950,10 +1024,6 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent the same player from being present multiple times
|
|
||||||
if (character.length >= 42 && (!character[UUID_INDEX].isEmpty() && !character[UUID_INDEX].equals("NULL") && !players.add(character[UUID_INDEX]))) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (character.length < 33) {
|
if (character.length < 33) {
|
||||||
// Before Version 1.0 - Drop
|
// Before Version 1.0 - Drop
|
||||||
@ -968,34 +1038,10 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
// Version 1.4.07-dev2
|
// Version 1.4.07-dev2
|
||||||
// commit 7bac0e2ca5143bce84dc160617fed97f0b1cb968
|
// commit 7bac0e2ca5143bce84dc160617fed97f0b1cb968
|
||||||
character[33] = "";
|
character[33] = "";
|
||||||
if (oldVersion == null) {
|
oldVersion = "1.4.07";
|
||||||
oldVersion = "1.4.07";
|
|
||||||
}
|
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: If new skills are added this needs to be rewritten
|
|
||||||
if (Config.getInstance().getTruncateSkills()) {
|
|
||||||
for (PrimarySkillType skill : PrimarySkillType.NON_CHILD_SKILLS) {
|
|
||||||
int index = getSkillIndex(skill);
|
|
||||||
if (index >= character.length) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
int cap = Config.getInstance().getLevelCap(skill);
|
|
||||||
if (Integer.parseInt(character[index]) > cap) {
|
|
||||||
mcMMO.p.getLogger().warning("Truncating " + skill.getName() + " to configured max level for player " + character[USERNAME]);
|
|
||||||
character[index] = cap + "";
|
|
||||||
updated = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If they're valid, rewrite them to the file.
|
|
||||||
if (!updated && character.length == 43) {
|
|
||||||
writer.append(line).append("\r\n");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (character.length <= 33) {
|
if (character.length <= 33) {
|
||||||
// Introduction of HUDType
|
// Introduction of HUDType
|
||||||
// Version 1.1.06
|
// Version 1.1.06
|
||||||
@ -1003,6 +1049,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
character = Arrays.copyOf(character, character.length + 1);
|
character = Arrays.copyOf(character, character.length + 1);
|
||||||
character[character.length - 1] = "";
|
character[character.length - 1] = "";
|
||||||
oldVersion = "1.1.06";
|
oldVersion = "1.1.06";
|
||||||
|
updated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (character.length <= 35) {
|
if (character.length <= 35) {
|
||||||
@ -1015,6 +1062,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
if (oldVersion == null) {
|
if (oldVersion == null) {
|
||||||
oldVersion = "1.2.00";
|
oldVersion = "1.2.00";
|
||||||
}
|
}
|
||||||
|
updated = true;
|
||||||
}
|
}
|
||||||
if (character.length <= 36) {
|
if (character.length <= 36) {
|
||||||
// Introduction of Blast Mining cooldowns
|
// Introduction of Blast Mining cooldowns
|
||||||
@ -1025,6 +1073,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
if (oldVersion == null) {
|
if (oldVersion == null) {
|
||||||
oldVersion = "1.3.00";
|
oldVersion = "1.3.00";
|
||||||
}
|
}
|
||||||
|
updated = true;
|
||||||
}
|
}
|
||||||
if (character.length <= 37) {
|
if (character.length <= 37) {
|
||||||
// Making old-purge work with flatfile
|
// Making old-purge work with flatfile
|
||||||
@ -1036,6 +1085,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
if (oldVersion == null) {
|
if (oldVersion == null) {
|
||||||
oldVersion = "1.4.00";
|
oldVersion = "1.4.00";
|
||||||
}
|
}
|
||||||
|
updated = true;
|
||||||
}
|
}
|
||||||
if (character.length <= 38) {
|
if (character.length <= 38) {
|
||||||
// Addition of mob healthbars
|
// Addition of mob healthbars
|
||||||
@ -1046,6 +1096,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
if (oldVersion == null) {
|
if (oldVersion == null) {
|
||||||
oldVersion = "1.4.06";
|
oldVersion = "1.4.06";
|
||||||
}
|
}
|
||||||
|
updated = true;
|
||||||
}
|
}
|
||||||
if (character.length <= 39) {
|
if (character.length <= 39) {
|
||||||
// Addition of Alchemy
|
// Addition of Alchemy
|
||||||
@ -1056,6 +1107,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
if (oldVersion == null) {
|
if (oldVersion == null) {
|
||||||
oldVersion = "1.4.08";
|
oldVersion = "1.4.08";
|
||||||
}
|
}
|
||||||
|
updated = true;
|
||||||
}
|
}
|
||||||
if (character.length <= 41) {
|
if (character.length <= 41) {
|
||||||
// Addition of UUIDs
|
// Addition of UUIDs
|
||||||
@ -1066,6 +1118,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
if (oldVersion == null) {
|
if (oldVersion == null) {
|
||||||
oldVersion = "1.5.01";
|
oldVersion = "1.5.01";
|
||||||
}
|
}
|
||||||
|
updated = true;
|
||||||
}
|
}
|
||||||
if (character.length <= 42) {
|
if (character.length <= 42) {
|
||||||
// Addition of scoreboard tips auto disable
|
// Addition of scoreboard tips auto disable
|
||||||
@ -1076,6 +1129,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
if (oldVersion == null) {
|
if (oldVersion == null) {
|
||||||
oldVersion = "1.5.02";
|
oldVersion = "1.5.02";
|
||||||
}
|
}
|
||||||
|
updated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(character.length <= 43) {
|
if(character.length <= 43) {
|
||||||
@ -1086,15 +1140,16 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
if (oldVersion == null) {
|
if (oldVersion == null) {
|
||||||
oldVersion = "2.1.133";
|
oldVersion = "2.1.133";
|
||||||
}
|
}
|
||||||
|
updated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(character.length <= 65) {
|
if(character.length <= 67) {
|
||||||
|
|
||||||
if (oldVersion == null) {
|
if (oldVersion == null) {
|
||||||
oldVersion = "2.1.133";
|
oldVersion = "2.1.134";
|
||||||
}
|
}
|
||||||
|
|
||||||
character = Arrays.copyOf(character, 64); // new array size
|
character = Arrays.copyOf(character, 68); // new array size
|
||||||
|
|
||||||
/*
|
/*
|
||||||
public static int SKILLS_TRIDENTS = 44;
|
public static int SKILLS_TRIDENTS = 44;
|
||||||
@ -1120,33 +1175,64 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
public static int BARSTATE_CROSSBOWS = 64;
|
public static int BARSTATE_CROSSBOWS = 64;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
character[44-1] = "0"; //trident skill lvl
|
character[SKILLS_TRIDENTS] = "0"; //trident skill lvl
|
||||||
character[45-1] = "0"; //trident xp value
|
character[EXP_TRIDENTS] = "0"; //trident xp value
|
||||||
character[46-1] = "0"; //xbow skill lvl
|
character[SKILLS_CROSSBOWS] = "0"; //xbow skill lvl
|
||||||
character[47-1] = "0"; //xbow xp lvl
|
character[EXP_CROSSBOWS] = "0"; //xbow xp lvl
|
||||||
|
|
||||||
//Barstates 48-64
|
//Barstates 48-64
|
||||||
character[48-1] = "NORMAL";
|
character[BARSTATE_ACROBATICS] = "NORMAL";
|
||||||
character[49-1] = "NORMAL";
|
character[BARSTATE_ALCHEMY] = "NORMAL";
|
||||||
character[50-1] = "NORMAL";
|
character[BARSTATE_ARCHERY] = "NORMAL";
|
||||||
character[51-1] = "NORMAL";
|
character[BARSTATE_AXES] = "NORMAL";
|
||||||
character[52-1] = "NORMAL";
|
character[BARSTATE_EXCAVATION] = "NORMAL";
|
||||||
character[53-1] = "NORMAL";
|
character[BARSTATE_FISHING] = "NORMAL";
|
||||||
character[54-1] = "NORMAL";
|
character[BARSTATE_HERBALISM] = "NORMAL";
|
||||||
character[55-1] = "NORMAL";
|
character[BARSTATE_MINING] = "NORMAL";
|
||||||
character[56-1] = "NORMAL";
|
character[BARSTATE_REPAIR] = "NORMAL";
|
||||||
character[57-1] = "DISABLED"; //Child skills
|
character[BARSTATE_SALVAGE] = "DISABLED"; //Child skills
|
||||||
character[58-1] = "DISABLED"; //Child skills
|
character[BARSTATE_SMELTING] = "DISABLED"; //Child skills
|
||||||
character[59-1] = "NORMAL";
|
character[BARSTATE_SWORDS] = "NORMAL";
|
||||||
character[60-1] = "NORMAL";
|
character[BARSTATE_TAMING] = "NORMAL";
|
||||||
character[61-1] = "NORMAL";
|
character[BARSTATE_UNARMED] = "NORMAL";
|
||||||
character[62-1] = "NORMAL";
|
character[BARSTATE_WOODCUTTING] = "NORMAL";
|
||||||
character[63-1] = "NORMAL";
|
character[BARSTATE_TRIDENTS] = "NORMAL";
|
||||||
character[64-1] = "NORMAL";
|
character[BARSTATE_CROSSBOWS] = "NORMAL";
|
||||||
|
|
||||||
|
character[COOLDOWN_ARCHERY_SUPER_1] = "0";
|
||||||
|
character[COOLDOWN_CROSSBOWS_SUPER_1] = "0";
|
||||||
|
character[COOLDOWN_TRIDENTS_SUPER_1] = "0";
|
||||||
|
updated = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO: If new skills are added this needs to be rewritten
|
||||||
|
if (Config.getInstance().getTruncateSkills()) {
|
||||||
|
for (PrimarySkillType skill : PrimarySkillType.NON_CHILD_SKILLS) {
|
||||||
|
int index = getSkillIndex(skill);
|
||||||
|
if (index >= character.length) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
int cap = Config.getInstance().getLevelCap(skill);
|
||||||
|
if (Integer.parseInt(character[index]) > cap) {
|
||||||
|
mcMMO.p.getLogger().warning("Truncating " + skill.getName() + " to configured max level for player " + character[USERNAME]);
|
||||||
|
character[index] = cap + "";
|
||||||
|
updated = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean corrupted = false;
|
boolean corrupted = false;
|
||||||
|
|
||||||
|
//TODO: Update this corruption code, its super out of date
|
||||||
|
//TODO: Update this corruption code, its super out of date
|
||||||
|
//TODO: Update this corruption code, its super out of date
|
||||||
|
//TODO: Update this corruption code, its super out of date
|
||||||
|
//TODO: Update this corruption code, its super out of date
|
||||||
|
//TODO: Update this corruption code, its super out of date
|
||||||
|
//TODO: Update this corruption code, its super out of date
|
||||||
|
//TODO: Update this corruption code, its super out of date
|
||||||
|
//TODO: Update this corruption code, its super out of dated
|
||||||
|
|
||||||
for (int i = 0; i < character.length; i++) {
|
for (int i = 0; i < character.length; i++) {
|
||||||
//Sigh... this code
|
//Sigh... this code
|
||||||
if (character[i].isEmpty() && !(i == 2 || i == 3 || i == 23 || i == 33 || i == 41)) {
|
if (character[i].isEmpty() && !(i == 2 || i == 3 || i == 23 || i == 33 || i == 41)) {
|
||||||
@ -1199,6 +1285,14 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
line = org.apache.commons.lang.StringUtils.join(character, ":") + ":";
|
line = org.apache.commons.lang.StringUtils.join(character, ":") + ":";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prevent the same player from being present multiple times
|
||||||
|
if (character.length == originalLength //If the length changed then the schema was expanded
|
||||||
|
&& (!character[UUID_INDEX].isEmpty()
|
||||||
|
&& !character[UUID_INDEX].equals("NULL")
|
||||||
|
&& !players.add(character[UUID_INDEX]))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
writer.append(line).append("\r\n");
|
writer.append(line).append("\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1314,11 +1408,14 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
skillsDATS.put(SuperAbilityType.BERSERK, Integer.valueOf(character[COOLDOWN_BERSERK]));
|
skillsDATS.put(SuperAbilityType.BERSERK, Integer.valueOf(character[COOLDOWN_BERSERK]));
|
||||||
skillsDATS.put(SuperAbilityType.GREEN_TERRA, Integer.valueOf(character[COOLDOWN_GREEN_TERRA]));
|
skillsDATS.put(SuperAbilityType.GREEN_TERRA, Integer.valueOf(character[COOLDOWN_GREEN_TERRA]));
|
||||||
skillsDATS.put(SuperAbilityType.GIGA_DRILL_BREAKER, Integer.valueOf(character[COOLDOWN_GIGA_DRILL_BREAKER]));
|
skillsDATS.put(SuperAbilityType.GIGA_DRILL_BREAKER, Integer.valueOf(character[COOLDOWN_GIGA_DRILL_BREAKER]));
|
||||||
// Archery - Unused
|
|
||||||
skillsDATS.put(SuperAbilityType.SERRATED_STRIKES, Integer.valueOf(character[COOLDOWN_SERRATED_STRIKES]));
|
skillsDATS.put(SuperAbilityType.SERRATED_STRIKES, Integer.valueOf(character[COOLDOWN_SERRATED_STRIKES]));
|
||||||
skillsDATS.put(SuperAbilityType.SKULL_SPLITTER, Integer.valueOf(character[COOLDOWN_SKULL_SPLITTER]));
|
skillsDATS.put(SuperAbilityType.SKULL_SPLITTER, Integer.valueOf(character[COOLDOWN_SKULL_SPLITTER]));
|
||||||
// Acrobatics - Unused
|
// Acrobatics - Unused
|
||||||
skillsDATS.put(SuperAbilityType.BLAST_MINING, Integer.valueOf(character[COOLDOWN_BLAST_MINING]));
|
skillsDATS.put(SuperAbilityType.BLAST_MINING, Integer.valueOf(character[COOLDOWN_BLAST_MINING]));
|
||||||
|
skillsDATS.put(SuperAbilityType.ARCHERY_SUPER, Integer.valueOf(character[COOLDOWN_ARCHERY_SUPER_1]));
|
||||||
|
skillsDATS.put(SuperAbilityType.SUPER_SHOTGUN, Integer.valueOf(character[COOLDOWN_CROSSBOWS_SUPER_1]));
|
||||||
|
skillsDATS.put(SuperAbilityType.TRIDENT_SUPER, Integer.valueOf(character[COOLDOWN_TRIDENTS_SUPER_1]));
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
mobHealthbarType = MobHealthbarType.valueOf(character[HEALTHBAR]);
|
mobHealthbarType = MobHealthbarType.valueOf(character[HEALTHBAR]);
|
||||||
@ -1401,9 +1498,6 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
return DatabaseType.FLATFILE;
|
return DatabaseType.FLATFILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDisable() { }
|
|
||||||
|
|
||||||
private int getSkillIndex(PrimarySkillType skill) {
|
private int getSkillIndex(PrimarySkillType skill) {
|
||||||
switch (skill) {
|
switch (skill) {
|
||||||
case ACROBATICS:
|
case ACROBATICS:
|
||||||
@ -1438,71 +1532,12 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
return SKILLS_CROSSBOWS;
|
return SKILLS_CROSSBOWS;
|
||||||
default:
|
default:
|
||||||
throw new RuntimeException("Primary Skills only");
|
throw new RuntimeException("Primary Skills only");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int USERNAME = 0;
|
@Override
|
||||||
public static int SKILLS_MINING = 1;
|
public void onDisable() { }
|
||||||
public static int EXP_MINING = 4;
|
|
||||||
public static int SKILLS_WOODCUTTING = 5;
|
|
||||||
public static int EXP_WOODCUTTING = 6;
|
|
||||||
public static int SKILLS_REPAIR = 7;
|
|
||||||
public static int SKILLS_UNARMED = 8;
|
|
||||||
public static int SKILLS_HERBALISM = 9;
|
|
||||||
public static int SKILLS_EXCAVATION = 10;
|
|
||||||
public static int SKILLS_ARCHERY = 11;
|
|
||||||
public static int SKILLS_SWORDS = 12;
|
|
||||||
public static int SKILLS_AXES = 13;
|
|
||||||
public static int SKILLS_ACROBATICS = 14;
|
|
||||||
public static int EXP_REPAIR = 15;
|
|
||||||
public static int EXP_UNARMED = 16;
|
|
||||||
public static int EXP_HERBALISM = 17;
|
|
||||||
public static int EXP_EXCAVATION = 18;
|
|
||||||
public static int EXP_ARCHERY = 19;
|
|
||||||
public static int EXP_SWORDS = 20;
|
|
||||||
public static int EXP_AXES = 21;
|
|
||||||
public static int EXP_ACROBATICS = 22;
|
|
||||||
public static int SKILLS_TAMING = 24;
|
|
||||||
public static int EXP_TAMING = 25;
|
|
||||||
public static int COOLDOWN_BERSERK = 26;
|
|
||||||
public static int COOLDOWN_GIGA_DRILL_BREAKER = 27;
|
|
||||||
public static int COOLDOWN_TREE_FELLER = 28;
|
|
||||||
public static int COOLDOWN_GREEN_TERRA = 29;
|
|
||||||
public static int COOLDOWN_SERRATED_STRIKES = 30;
|
|
||||||
public static int COOLDOWN_SKULL_SPLITTER = 31;
|
|
||||||
public static int COOLDOWN_SUPER_BREAKER = 32;
|
|
||||||
public static int SKILLS_FISHING = 34;
|
|
||||||
public static int EXP_FISHING = 35;
|
|
||||||
public static int COOLDOWN_BLAST_MINING = 36;
|
|
||||||
public static int LAST_LOGIN = 37;
|
|
||||||
public static int HEALTHBAR = 38;
|
|
||||||
public static int SKILLS_ALCHEMY = 39;
|
|
||||||
public static int EXP_ALCHEMY = 40;
|
|
||||||
public static int UUID_INDEX = 41;
|
|
||||||
public static int SCOREBOARD_TIPS = 42;
|
|
||||||
public static int COOLDOWN_CHIMAERA_WING = 43;
|
|
||||||
public static int SKILLS_TRIDENTS = 44;
|
|
||||||
public static int EXP_TRIDENTS = 45;
|
|
||||||
public static int SKILLS_CROSSBOWS = 46;
|
|
||||||
public static int EXP_CROSSBOWS = 47;
|
|
||||||
public static int BARSTATE_ACROBATICS = 48;
|
|
||||||
public static int BARSTATE_ALCHEMY = 49;
|
|
||||||
public static int BARSTATE_ARCHERY = 50;
|
|
||||||
public static int BARSTATE_AXES = 51;
|
|
||||||
public static int BARSTATE_EXCAVATION = 52;
|
|
||||||
public static int BARSTATE_FISHING = 53;
|
|
||||||
public static int BARSTATE_HERBALISM = 54;
|
|
||||||
public static int BARSTATE_MINING = 55;
|
|
||||||
public static int BARSTATE_REPAIR = 56;
|
|
||||||
public static int BARSTATE_SALVAGE = 57;
|
|
||||||
public static int BARSTATE_SMELTING = 58;
|
|
||||||
public static int BARSTATE_SWORDS = 59;
|
|
||||||
public static int BARSTATE_TAMING = 60;
|
|
||||||
public static int BARSTATE_UNARMED = 61;
|
|
||||||
public static int BARSTATE_WOODCUTTING = 62;
|
|
||||||
public static int BARSTATE_TRIDENTS = 63;
|
|
||||||
public static int BARSTATE_CROSSBOWS = 64;
|
|
||||||
|
|
||||||
public void resetMobHealthSettings() {
|
public void resetMobHealthSettings() {
|
||||||
BufferedReader in = null;
|
BufferedReader in = null;
|
||||||
|
@ -77,6 +77,31 @@ public enum SuperAbilityType {
|
|||||||
"Mining.Blast.Refresh",
|
"Mining.Blast.Refresh",
|
||||||
null,
|
null,
|
||||||
"Mining.SubSkill.BlastMining.Name"),
|
"Mining.SubSkill.BlastMining.Name"),
|
||||||
|
|
||||||
|
ARCHERY_SUPER(
|
||||||
|
"Archery.SuperAbility.SuperAbilityName.On",
|
||||||
|
"Archery.SuperAbility.SuperAbilityName.Off",
|
||||||
|
"Archery.SuperAbility.SuperAbilityName.InformOthers.On",
|
||||||
|
"Archery.SuperAbility.SuperAbilityName.Refresh",
|
||||||
|
"Archery.SuperAbility.SuperAbilityName.InformOthers.Off",
|
||||||
|
"Archery.SuperAbility.SuperAbilityName.Name"
|
||||||
|
),
|
||||||
|
SUPER_SHOTGUN(
|
||||||
|
"Crossbows.SuperAbility.SuperShotgun.On",
|
||||||
|
"Crossbows.SuperAbility.SuperShotgun.Off",
|
||||||
|
"Crossbows.SuperAbility.SuperShotgun.InformOthers.On",
|
||||||
|
"Crossbows.SuperAbility.SuperShotgun.Refresh",
|
||||||
|
"Crossbows.SuperAbility.SuperShotgun.InformOthers.Off",
|
||||||
|
"Crossbows.SuperAbility.SuperShotgun.Name"
|
||||||
|
),
|
||||||
|
TRIDENT_SUPER(
|
||||||
|
"Tridents.SuperAbility.SuperAbilityName.On",
|
||||||
|
"Tridents.SuperAbility.SuperAbilityName.Off",
|
||||||
|
"Tridents.SuperAbility.SuperAbilityName.InformOthers.On",
|
||||||
|
"Tridents.SuperAbility.SuperAbilityName.Refresh",
|
||||||
|
"Tridents.SuperAbility.SuperAbilityName.InformOthers.Off",
|
||||||
|
"Tridents.SuperAbility.SuperAbilityName.Name"
|
||||||
|
),
|
||||||
;
|
;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -16,7 +16,6 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
import org.bukkit.entity.Item;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
@ -7,16 +7,9 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
|||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||||
import com.gmail.nossr50.datatypes.skills.ToolType;
|
import com.gmail.nossr50.datatypes.skills.ToolType;
|
||||||
import com.gmail.nossr50.datatypes.skills.subskills.taming.CallOfTheWildType;
|
|
||||||
import com.gmail.nossr50.events.fake.FakePlayerAnimationEvent;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.runnables.skills.AbilityDisableTask;
|
import com.gmail.nossr50.runnables.skills.AbilityDisableTask;
|
||||||
import com.gmail.nossr50.runnables.skills.ToolLowerTask;
|
import com.gmail.nossr50.runnables.skills.ToolLowerTask;
|
||||||
import com.gmail.nossr50.skills.herbalism.HerbalismManager;
|
|
||||||
import com.gmail.nossr50.skills.mining.MiningManager;
|
|
||||||
import com.gmail.nossr50.skills.taming.TamingManager;
|
|
||||||
import com.gmail.nossr50.util.BlockUtils;
|
|
||||||
import com.gmail.nossr50.util.ChimaeraWing;
|
|
||||||
import com.gmail.nossr50.util.EventUtils;
|
import com.gmail.nossr50.util.EventUtils;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.gmail.nossr50.util.player.NotificationManager;
|
import com.gmail.nossr50.util.player.NotificationManager;
|
||||||
@ -25,12 +18,7 @@ import com.gmail.nossr50.util.skills.RankUtils;
|
|||||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||||
import com.gmail.nossr50.util.sounds.SoundManager;
|
import com.gmail.nossr50.util.sounds.SoundManager;
|
||||||
import com.gmail.nossr50.util.sounds.SoundType;
|
import com.gmail.nossr50.util.sounds.SoundType;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.block.BlockState;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -238,8 +238,6 @@ Items:
|
|||||||
Recipe_Cost: 5
|
Recipe_Cost: 5
|
||||||
Item_Name: FEATHER
|
Item_Name: FEATHER
|
||||||
Sound_Enabled: true
|
Sound_Enabled: true
|
||||||
Flux_Pickaxe:
|
|
||||||
Sound_Enabled: true
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for Parties
|
# Settings for Parties
|
||||||
@ -297,6 +295,9 @@ Abilities:
|
|||||||
Skull_Splitter: 240
|
Skull_Splitter: 240
|
||||||
Super_Breaker: 240
|
Super_Breaker: 240
|
||||||
Tree_Feller: 240
|
Tree_Feller: 240
|
||||||
|
Super_Shotgun: 240
|
||||||
|
Archery_Super: 240
|
||||||
|
Tridents_Super: 240
|
||||||
Max_Seconds:
|
Max_Seconds:
|
||||||
Berserk: 0
|
Berserk: 0
|
||||||
Blast_Mining: 0
|
Blast_Mining: 0
|
||||||
@ -306,6 +307,9 @@ Abilities:
|
|||||||
Skull_Splitter: 0
|
Skull_Splitter: 0
|
||||||
Super_Breaker: 0
|
Super_Breaker: 0
|
||||||
Tree_Feller: 0
|
Tree_Feller: 0
|
||||||
|
Super_Shotgun: 0
|
||||||
|
Archery_Super: 0
|
||||||
|
Tridents_Super: 0
|
||||||
Limits:
|
Limits:
|
||||||
Tree_Feller_Threshold: 500
|
Tree_Feller_Threshold: 500
|
||||||
Tools:
|
Tools:
|
||||||
|
@ -558,6 +558,9 @@ Woodcutting.Skills.TreeFeller.Threshold=That tree is too large!
|
|||||||
Tridents.SubSkill.TridentsLimitBreak.Name=Tridents Limit Break
|
Tridents.SubSkill.TridentsLimitBreak.Name=Tridents Limit Break
|
||||||
Tridents.SubSkill.TridentsLimitBreak.Description=Breaking your limits. Increased damage against tough opponents. Intended for PVP, up to server settings for whether or not it will boost damage in PVE.
|
Tridents.SubSkill.TridentsLimitBreak.Description=Breaking your limits. Increased damage against tough opponents. Intended for PVP, up to server settings for whether or not it will boost damage in PVE.
|
||||||
Tridents.SubSkill.TridentsLimitBreak.Stat=Limit Break Max DMG
|
Tridents.SubSkill.TridentsLimitBreak.Stat=Limit Break Max DMG
|
||||||
|
Tridents.SubSkill.MultiTasking.Name=Multi Tasking
|
||||||
|
Tridents.SubSkill.MultiTasking.Description=Hit additional targets
|
||||||
|
Tridents.SubSkill.MultiTasking.Stat=Additional targets
|
||||||
Tridents.Listener=Tridents:
|
Tridents.Listener=Tridents:
|
||||||
Tridents.SkillName=TRIDENTS
|
Tridents.SkillName=TRIDENTS
|
||||||
|
|
||||||
@ -1140,4 +1143,26 @@ Commands.Description.mmoxpbar=Player settings for mcMMO XP bars
|
|||||||
Commands.Description.mmocompat=Information about mcMMO and whether or not its in compatibility mode or fully functional.
|
Commands.Description.mmocompat=Information about mcMMO and whether or not its in compatibility mode or fully functional.
|
||||||
Compatibility.Layer.Unsupported=[[GOLD]]Compatibility for [[GREEN]]{0}[[GOLD]] is not supported by this version of Minecraft.
|
Compatibility.Layer.Unsupported=[[GOLD]]Compatibility for [[GREEN]]{0}[[GOLD]] is not supported by this version of Minecraft.
|
||||||
Compatibility.Layer.PartialSupport=[[GOLD]]Compatibility for [[GREEN]]{0}[[GOLD]] is not fully supported by this version of Minecraft, but mcMMO is running a secondary system to emulate some of the missing features.
|
Compatibility.Layer.PartialSupport=[[GOLD]]Compatibility for [[GREEN]]{0}[[GOLD]] is not fully supported by this version of Minecraft, but mcMMO is running a secondary system to emulate some of the missing features.
|
||||||
Commands.XPBar.DisableAll=[[GOLD]] All mcMMO XP bars are now disabled, use /mmoxpbar reset to restore default settings.
|
Commands.XPBar.DisableAll=[[GOLD]] All mcMMO XP bars are now disabled, use /mmoxpbar reset to restore default settings.
|
||||||
|
|
||||||
|
Archery.SuperAbility.SuperAbilityName.On=&a**SUPER ABILITY ACTIVATED**
|
||||||
|
Archery.SuperAbility.SuperAbilityName.Off=**Super Ability has worn off**
|
||||||
|
Archery.SuperAbility.SuperAbilityName.InformOthers.On=&a{0}[[DARK_GREEN]] has used [[RED]]Super Ability!
|
||||||
|
Archery.SuperAbility.SuperAbilityName.InformOthers.Off=Super Ability &ahas worn off for [[YELLOW]]{0}
|
||||||
|
Archery.SuperAbility.SuperAbilityName.Refresh=&aYour [[YELLOW]]Super Ability &ais refreshed!
|
||||||
|
Archery.SuperAbility.SuperAbilityName.Name=Archery Super
|
||||||
|
|
||||||
|
Crossbows.SuperAbility.SuperShotgun.On=&a**SUPER SHOTGUN ACTIVATED**
|
||||||
|
Crossbows.SuperAbility.SuperShotgun.Off=**Super Shotgun has worn off**
|
||||||
|
Crossbows.SuperAbility.SuperShotgun.InformOthers.On=&a{0}[[DARK_GREEN]] has used [[RED]]SSG!
|
||||||
|
Crossbows.SuperAbility.SuperShotgun.InformOthers.Off=Super Ability &ahas worn off for [[YELLOW]]{0}
|
||||||
|
Crossbows.SuperAbility.SuperShotgun.Refresh=&aYour [[YELLOW]]Super Shotgun &ais refreshed!
|
||||||
|
Crossbows.SuperAbility.SuperShotgun.Name=Super Shotgun
|
||||||
|
|
||||||
|
Tridents.SuperAbility.SuperAbilityName.On=&a**SUPER ABILITY ACTIVATED**
|
||||||
|
Tridents.SuperAbility.SuperAbilityName.Off=**Super Ability has worn off**
|
||||||
|
Tridents.SuperAbility.SuperAbilityName.InformOthers.On=&a{0}[[DARK_GREEN]] has used [[RED]]Super Ability!
|
||||||
|
Tridents.SuperAbility.SuperAbilityName.InformOthers.Off=Super Ability &ahas worn off for [[YELLOW]]{0}
|
||||||
|
Tridents.SuperAbility.SuperAbilityName.Refresh=&aYour [[YELLOW]]Super Ability &ais refreshed!
|
||||||
|
Tridents.SuperAbility.SuperAbilityName.Name=Tridents Super
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user