mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 06:06:45 +01:00
Add Tridents/Xbows (WIP)
This commit is contained in:
parent
02c5aa4628
commit
8bb50fb53c
@ -0,0 +1,51 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.skills.RankUtils;
|
||||
import com.gmail.nossr50.util.text.TextComponentFactory;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CrossbowsCommand extends SkillCommand {
|
||||
private boolean canSSG;
|
||||
|
||||
public CrossbowsCommand() {
|
||||
super(PrimarySkillType.CROSSBOWS);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations(Player player, float skillValue) {
|
||||
// TODO: Implement data calculations
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canSSG = RankUtils.hasUnlockedSubskill(player, SubSkillType.CROSSBOWS_SUPER_SHOTGUN)
|
||||
&& Permissions.superShotgun(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<>();
|
||||
|
||||
if (canSSG) {
|
||||
//TODO: Implement SSG
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<Component> getTextComponents(Player player) {
|
||||
List<Component> textComponents = new ArrayList<>();
|
||||
|
||||
TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.CROSSBOWS);
|
||||
|
||||
return textComponents;
|
||||
}
|
||||
}
|
@ -7,7 +7,6 @@ import co.aikar.commands.annotation.CommandPermission;
|
||||
import co.aikar.commands.annotation.Conditions;
|
||||
import co.aikar.commands.annotation.Default;
|
||||
import com.gmail.nossr50.commands.CommandManager;
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
@ -5,10 +5,9 @@ import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.HashSet;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public abstract class BukkitConfig {
|
||||
public static final String CONFIG_PATCH_PREFIX = "ConfigPatchVersion:";
|
||||
|
@ -79,8 +79,14 @@ public final class FlatFileDatabaseManager implements DatabaseManager {
|
||||
public static final int SCOREBOARD_TIPS = 42;
|
||||
public static final int COOLDOWN_CHIMAERA_WING = 43;
|
||||
public static final int OVERHAUL_LAST_LOGIN = 44;
|
||||
public static final int EXP_CROSSBOWS = 45;
|
||||
public static final int SKILLS_CROSSBOWS = 46;
|
||||
public static final int EXP_TRIDENTS = 47;
|
||||
public static final int SKILLS_TRIDENTS = 48;
|
||||
public static final int COOLDOWN_SUPER_SHOTGUN = 49;
|
||||
public static final int COOLDOWN_TRIDENTS = 50;
|
||||
|
||||
public static final int DATA_ENTRY_COUNT = OVERHAUL_LAST_LOGIN + 1; //Update this everytime new data is added
|
||||
public static final int DATA_ENTRY_COUNT = COOLDOWN_TRIDENTS + 1; //Update this everytime new data is added
|
||||
|
||||
protected FlatFileDatabaseManager(@NotNull File usersFile, @NotNull Logger logger, long purgeTime, int startingLevel, boolean testing) {
|
||||
this.usersFile = usersFile;
|
||||
@ -465,6 +471,10 @@ public final class FlatFileDatabaseManager implements DatabaseManager {
|
||||
appendable.append(String.valueOf(profile.getScoreboardTipsShown())).append(":");
|
||||
appendable.append(String.valueOf(profile.getUniqueData(UniqueDataType.CHIMAERA_WING_DATS))).append(":");
|
||||
appendable.append(String.valueOf(profile.getLastLogin())).append(":"); //overhaul last login
|
||||
appendable.append(String.valueOf(profile.getSkillXpLevel(PrimarySkillType.CROSSBOWS))).append(":");
|
||||
appendable.append(String.valueOf(profile.getSkillLevel(PrimarySkillType.CROSSBOWS))).append(":");
|
||||
appendable.append(String.valueOf(profile.getSkillXpLevel(PrimarySkillType.TRIDENTS))).append(":");
|
||||
appendable.append(String.valueOf(profile.getSkillLevel(PrimarySkillType.TRIDENTS))).append(":");
|
||||
appendable.append("\r\n");
|
||||
}
|
||||
|
||||
@ -1222,6 +1232,8 @@ public final class FlatFileDatabaseManager implements DatabaseManager {
|
||||
tryLoadSkillFloatValuesFromRawData(skillsXp, character, PrimarySkillType.ACROBATICS, EXP_ACROBATICS, username);
|
||||
tryLoadSkillFloatValuesFromRawData(skillsXp, character, PrimarySkillType.FISHING, EXP_FISHING, username);
|
||||
tryLoadSkillFloatValuesFromRawData(skillsXp, character, PrimarySkillType.ALCHEMY, EXP_ALCHEMY, username);
|
||||
tryLoadSkillFloatValuesFromRawData(skillsXp, character, PrimarySkillType.CROSSBOWS, EXP_CROSSBOWS, username);
|
||||
tryLoadSkillFloatValuesFromRawData(skillsXp, character, PrimarySkillType.TRIDENTS, EXP_TRIDENTS, username);
|
||||
|
||||
// Taming - Unused
|
||||
tryLoadSkillCooldownFromRawData(skillsDATS, character, SuperAbilityType.SUPER_BREAKER, COOLDOWN_SUPER_BREAKER, username);
|
||||
@ -1235,6 +1247,8 @@ public final class FlatFileDatabaseManager implements DatabaseManager {
|
||||
tryLoadSkillCooldownFromRawData(skillsDATS, character, SuperAbilityType.SKULL_SPLITTER, COOLDOWN_SKULL_SPLITTER, username);
|
||||
// Acrobatics - Unused
|
||||
tryLoadSkillCooldownFromRawData(skillsDATS, character, SuperAbilityType.BLAST_MINING, COOLDOWN_BLAST_MINING, username);
|
||||
tryLoadSkillCooldownFromRawData(skillsDATS, character, SuperAbilityType.SUPER_SHOTGUN, COOLDOWN_SUPER_SHOTGUN, username);
|
||||
tryLoadSkillCooldownFromRawData(skillsDATS, character, SuperAbilityType.TRIDENT_ABILITY, COOLDOWN_TRIDENTS, username);
|
||||
|
||||
UUID uuid;
|
||||
try {
|
||||
@ -1315,6 +1329,8 @@ public final class FlatFileDatabaseManager implements DatabaseManager {
|
||||
tryLoadSkillIntValuesFromRawData(skills, character, PrimarySkillType.AXES, SKILLS_AXES, username);
|
||||
tryLoadSkillIntValuesFromRawData(skills, character, PrimarySkillType.FISHING, SKILLS_FISHING, username);
|
||||
tryLoadSkillIntValuesFromRawData(skills, character, PrimarySkillType.ALCHEMY, SKILLS_ALCHEMY, username);
|
||||
tryLoadSkillIntValuesFromRawData(skills, character, PrimarySkillType.CROSSBOWS, SKILLS_CROSSBOWS, username);
|
||||
tryLoadSkillIntValuesFromRawData(skills, character, PrimarySkillType.TRIDENTS, SKILLS_TRIDENTS, username);
|
||||
|
||||
return skills;
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ import com.gmail.nossr50.skills.alchemy.AlchemyManager;
|
||||
import com.gmail.nossr50.skills.archery.ArcheryManager;
|
||||
import com.gmail.nossr50.skills.axes.AxesManager;
|
||||
import com.gmail.nossr50.skills.child.FamilyTree;
|
||||
import com.gmail.nossr50.skills.crossbows.CrossbowsManager;
|
||||
import com.gmail.nossr50.skills.excavation.ExcavationManager;
|
||||
import com.gmail.nossr50.skills.fishing.FishingManager;
|
||||
import com.gmail.nossr50.skills.herbalism.HerbalismManager;
|
||||
@ -39,6 +40,7 @@ import com.gmail.nossr50.skills.salvage.SalvageManager;
|
||||
import com.gmail.nossr50.skills.smelting.SmeltingManager;
|
||||
import com.gmail.nossr50.skills.swords.SwordsManager;
|
||||
import com.gmail.nossr50.skills.taming.TamingManager;
|
||||
import com.gmail.nossr50.skills.tridents.TridentsManager;
|
||||
import com.gmail.nossr50.skills.unarmed.UnarmedManager;
|
||||
import com.gmail.nossr50.skills.woodcutting.WoodcuttingManager;
|
||||
import com.gmail.nossr50.util.*;
|
||||
@ -180,6 +182,9 @@ public class McMMOPlayer implements Identified {
|
||||
case AXES:
|
||||
skillManagers.put(primarySkillType, new AxesManager(this));
|
||||
break;
|
||||
case CROSSBOWS:
|
||||
skillManagers.put(primarySkillType, new CrossbowsManager(this));
|
||||
break;
|
||||
case EXCAVATION:
|
||||
skillManagers.put(primarySkillType, new ExcavationManager(this));
|
||||
break;
|
||||
@ -207,6 +212,8 @@ public class McMMOPlayer implements Identified {
|
||||
case TAMING:
|
||||
skillManagers.put(primarySkillType, new TamingManager(this));
|
||||
break;
|
||||
case TRIDENTS:
|
||||
skillManagers.put(primarySkillType, new TridentsManager(this));
|
||||
case UNARMED:
|
||||
skillManagers.put(primarySkillType, new UnarmedManager(this));
|
||||
break;
|
||||
|
@ -16,6 +16,7 @@ public enum PrimarySkillType {
|
||||
ALCHEMY,
|
||||
ARCHERY,
|
||||
AXES,
|
||||
CROSSBOWS,
|
||||
EXCAVATION,
|
||||
FISHING,
|
||||
HERBALISM,
|
||||
@ -25,6 +26,7 @@ public enum PrimarySkillType {
|
||||
SMELTING,
|
||||
SWORDS,
|
||||
TAMING,
|
||||
TRIDENTS,
|
||||
UNARMED,
|
||||
WOODCUTTING;
|
||||
|
||||
|
@ -31,6 +31,9 @@ public enum SubSkillType {
|
||||
AXES_GREATER_IMPACT(1),
|
||||
AXES_SKULL_SPLITTER(1),
|
||||
|
||||
/* CROSSBOWS */
|
||||
CROSSBOWS_SUPER_SHOTGUN(1),
|
||||
|
||||
/* Excavation */
|
||||
EXCAVATION_ARCHAEOLOGY(8),
|
||||
EXCAVATION_GIGA_DRILL_BREAKER(1),
|
||||
|
@ -65,6 +65,20 @@ public enum SuperAbilityType {
|
||||
"Swords.Skills.SS.Refresh",
|
||||
"Swords.Skills.SS.Other.Off",
|
||||
"Swords.SubSkill.SerratedStrikes.Name"),
|
||||
SUPER_SHOTGUN(
|
||||
null,
|
||||
null,
|
||||
"Crossbows.Skills.SSG.Other.On",
|
||||
"Crossbows.Skills.SSG.Refresh",
|
||||
null,
|
||||
"Crossbows.SubSkill.SuperShotgun.Name"),
|
||||
TRIDENT_ABILITY(
|
||||
"Tridents.Skills.TA.On",
|
||||
"Tridents.Skills.TA.Off",
|
||||
"Tridents.Skills.TA.Other.On",
|
||||
"Tridents.Skills.TA.Refresh",
|
||||
"Tridents.Skills.TA.Other.Off",
|
||||
"Tridents.SubSkill.TridentAbility.Name"),
|
||||
|
||||
/**
|
||||
* Has cooldown - but has to share a skill with Super Breaker, so needs special treatment
|
||||
|
@ -10,7 +10,9 @@ public enum ToolType {
|
||||
HOE("Herbalism.Ability.Lower", "Herbalism.Ability.Ready"),
|
||||
PICKAXE("Mining.Ability.Lower", "Mining.Ability.Ready"),
|
||||
SHOVEL("Excavation.Ability.Lower", "Excavation.Ability.Ready"),
|
||||
SWORD("Swords.Ability.Lower", "Swords.Ability.Ready");
|
||||
SWORD("Swords.Ability.Lower", "Swords.Ability.Ready"),
|
||||
CROSSBOWS("Crossbows.Ability.Lower", "Crossbows.Ability.Ready"),
|
||||
TRIDENTS("Tridents.Ability.Lower", "Tridents.Ability.Ready");
|
||||
|
||||
private final String lowerTool;
|
||||
private final String raiseTool;
|
||||
@ -38,6 +40,10 @@ public enum ToolType {
|
||||
switch (this) {
|
||||
case AXE:
|
||||
return ItemUtils.isAxe(itemStack);
|
||||
case CROSSBOWS:
|
||||
return ItemUtils.isCrossbow(itemStack);
|
||||
case TRIDENTS:
|
||||
return ItemUtils.isTrident(itemStack);
|
||||
|
||||
case FISTS:
|
||||
return itemStack.getType() == Material.AIR;
|
||||
|
@ -38,7 +38,6 @@ import org.bukkit.event.block.*;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
|
||||
public class BlockListener implements Listener {
|
||||
private final mcMMO plugin;
|
||||
|
@ -16,7 +16,6 @@ import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
import com.gmail.nossr50.worldguard.WorldGuardManager;
|
||||
import com.gmail.nossr50.worldguard.WorldGuardUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
|
@ -1,9 +1,7 @@
|
||||
package com.gmail.nossr50.listeners;
|
||||
|
||||
import com.gmail.nossr50.config.WorldBlacklist;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.block.BlockState;
|
||||
@ -13,7 +11,6 @@ import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.world.ChunkUnloadEvent;
|
||||
import org.bukkit.event.world.StructureGrowEvent;
|
||||
import org.bukkit.event.world.WorldUnloadEvent;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
public class WorldListener implements Listener {
|
||||
private final mcMMO plugin;
|
||||
|
@ -68,7 +68,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.gmail.nossr50.runnables.skills;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||
import com.gmail.nossr50.datatypes.experience.XPGainSource;
|
||||
|
@ -0,0 +1,11 @@
|
||||
package com.gmail.nossr50.skills.crossbows;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
|
||||
public class CrossbowsManager extends SkillManager {
|
||||
public CrossbowsManager(McMMOPlayer mmoPlayer) {
|
||||
super(mmoPlayer, PrimarySkillType.CROSSBOWS);
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package com.gmail.nossr50.skills.mining;
|
||||
|
||||
import com.gmail.nossr50.api.ItemSpawnReason;
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||
|
@ -0,0 +1,11 @@
|
||||
package com.gmail.nossr50.skills.tridents;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
|
||||
public class TridentsManager extends SkillManager {
|
||||
public TridentsManager(McMMOPlayer mmoPlayer) {
|
||||
super(mmoPlayer, PrimarySkillType.TRIDENTS);
|
||||
}
|
||||
}
|
@ -44,8 +44,6 @@ import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.player.PlayerAnimationEvent;
|
||||
import org.bukkit.event.player.PlayerAnimationType;
|
||||
import org.bukkit.event.player.PlayerFishEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
@ -22,7 +22,6 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public final class ItemUtils {
|
||||
/**
|
||||
@ -45,6 +44,10 @@ public final class ItemUtils {
|
||||
return mcMMO.getMaterialMapStore().isCrossbow(item.getType().getKey().getKey());
|
||||
}
|
||||
|
||||
public static boolean isTrident(@NotNull ItemStack item) {
|
||||
return mcMMO.getMaterialMapStore().isTrident(item.getType().getKey().getKey());
|
||||
}
|
||||
|
||||
public static boolean hasItemInEitherHand(@NotNull Player player, Material material) {
|
||||
return player.getInventory().getItemInMainHand().getType() == material || player.getInventory().getItemInOffHand().getType() == material;
|
||||
}
|
||||
|
@ -10,9 +10,6 @@ import java.util.Locale;
|
||||
/**
|
||||
* Stores hash tables for item and block names
|
||||
* This allows for better support across multiple versions of Minecraft
|
||||
*
|
||||
* This is a temporary class, mcMMO is spaghetti and I'l clean it up later
|
||||
*
|
||||
*/
|
||||
public class MaterialMapStore {
|
||||
|
||||
@ -52,7 +49,6 @@ public class MaterialMapStore {
|
||||
private final @NotNull HashSet<String> bows;
|
||||
private final @NotNull HashSet<String> crossbows;
|
||||
private final @NotNull HashSet<String> tools;
|
||||
|
||||
private final @NotNull HashSet<String> enchantables;
|
||||
|
||||
private final @NotNull HashSet<String> ores;
|
||||
@ -819,6 +815,14 @@ public class MaterialMapStore {
|
||||
return crossbows.contains(id);
|
||||
}
|
||||
|
||||
public boolean isTrident(@NotNull Material material) {
|
||||
return isTrident(material.getKey().getKey());
|
||||
}
|
||||
|
||||
public boolean isTrident(@NotNull String id) {
|
||||
return tridents.contains(id);
|
||||
}
|
||||
|
||||
public boolean isLeatherArmor(@NotNull Material material) {
|
||||
return isLeatherArmor(material.getKey().getKey());
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import com.gmail.nossr50.datatypes.skills.ItemType;
|
||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.skills.RankUtils;
|
||||
import org.bukkit.Material;
|
||||
@ -226,6 +225,8 @@ 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"); }
|
||||
|
||||
/*
|
||||
* PARTY
|
||||
|
@ -61,6 +61,9 @@ public final class CommandRegistrationManager {
|
||||
case AXES:
|
||||
command.setExecutor(new AxesCommand());
|
||||
break;
|
||||
case CROSSBOWS:
|
||||
command.setExecutor(new CrossbowsCommand());
|
||||
break;
|
||||
|
||||
case EXCAVATION:
|
||||
command.setExecutor(new ExcavationCommand());
|
||||
@ -97,6 +100,9 @@ public final class CommandRegistrationManager {
|
||||
case TAMING:
|
||||
command.setExecutor(new TamingCommand());
|
||||
break;
|
||||
case TRIDENTS:
|
||||
// TODO: Implement
|
||||
break;
|
||||
|
||||
case UNARMED:
|
||||
command.setExecutor(new UnarmedCommand());
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.gmail.nossr50.util.random;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.VisibleForTesting;
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
|
@ -77,6 +77,10 @@ Experience_Bars:
|
||||
Enable: true
|
||||
Color: BLUE
|
||||
BarStyle: SEGMENTED_6
|
||||
Crossbows:
|
||||
Enable: true
|
||||
Color: BLUE
|
||||
BarStyle: SEGMENTED_6
|
||||
Excavation:
|
||||
Enable: true
|
||||
Color: YELLOW
|
||||
@ -113,6 +117,10 @@ Experience_Bars:
|
||||
Enable: true
|
||||
Color: RED
|
||||
BarStyle: SEGMENTED_6
|
||||
Tridents:
|
||||
Enable: true
|
||||
Color: BLUE
|
||||
BarStyle: SEGMENTED_6
|
||||
Unarmed:
|
||||
Enable: true
|
||||
Color: BLUE
|
||||
|
@ -410,6 +410,17 @@ Salvage.Skills.Lottery.Perfect=&a&lPerfect!&r&6 You salvaged &3{1}&6 effortlessl
|
||||
Salvage.Skills.Lottery.Untrained=&7You aren't properly trained in salvaging. You were only able to recover &c{0}&7 materials from &a{1}&7.
|
||||
#Anvil (Shared between SALVAGE and REPAIR)
|
||||
Anvil.Unbreakable=This item is unbreakable!
|
||||
#CROSSBOWS
|
||||
Crossbows.Ability.Lower=&7You lower your crossbow.
|
||||
Crossbows.Ability.Ready=&3You &6ready&3 your Crossbow.
|
||||
Crossbows.Skills.SSG.Refresh=&aYour &eSuper Shotgun &aability is refreshed!
|
||||
Crossbows.Skills.SSG.Other.On=&a{0}&2 used &Super Shotgun!
|
||||
#TRIDENTS
|
||||
Tridents.Ability.Lower=&7You lower your trident.
|
||||
Tridents.Ability.Ready=&3You &6ready&3 your Trident.
|
||||
Tridents.Skills.TA.Refresh=&aYour &eSuper &aability is refreshed!
|
||||
Tridents.Skills.TA.Other.On=&a{0}&2 used Trident &Super!
|
||||
|
||||
#SWORDS
|
||||
Swords.Ability.Lower=&7You lower your sword.
|
||||
Swords.Ability.Ready=&3You &6ready&3 your Sword.
|
||||
|
@ -258,9 +258,6 @@ permissions:
|
||||
children:
|
||||
mcmmo.ability.acrobatics.dodge: true
|
||||
mcmmo.ability.acrobatics.roll: true
|
||||
mcmmo.ability.acrobatics.mastery: true
|
||||
mcmmo.ability.acrobatics.mastery:
|
||||
description: Allows access to end game progression for Acrobatics
|
||||
mcmmo.ability.acrobatics.dodge:
|
||||
description: Allows access to the Dodge ability
|
||||
mcmmo.ability.acrobatics.roll:
|
||||
@ -275,9 +272,6 @@ permissions:
|
||||
children:
|
||||
mcmmo.ability.alchemy.catalysis: true
|
||||
mcmmo.ability.alchemy.concoctions: true
|
||||
mcmmo.ability.alchemy.mastery: true
|
||||
mcmmo.ability.alchemy.mastery:
|
||||
description: Allows access to end game progression for Alchemy
|
||||
mcmmo.ability.alchemy.catalysis:
|
||||
description: Allows access to the Catalysis ability
|
||||
mcmmo.ability.alchemy.concoctions:
|
||||
@ -294,9 +288,6 @@ permissions:
|
||||
mcmmo.ability.archery.daze: true
|
||||
mcmmo.ability.archery.arrowretrieval: true
|
||||
mcmmo.ability.archery.archerylimitbreak: true
|
||||
mcmmo.ability.archery.mastery: true
|
||||
mcmmo.ability.archery.mastery:
|
||||
description: Allows access to end game progression for Archery
|
||||
mcmmo.ability.archery.archerylimitbreak:
|
||||
description: Adds damage to bows and crossbows
|
||||
mcmmo.ability.archery.skillshot:
|
||||
@ -319,9 +310,6 @@ permissions:
|
||||
mcmmo.ability.axes.armorimpact: true
|
||||
mcmmo.ability.axes.skullsplitter: true
|
||||
mcmmo.ability.axes.axeslimitbreak: true
|
||||
mcmmo.ability.axes.mastery: true
|
||||
mcmmo.ability.axes.mastery:
|
||||
description: Allows access to end game progression for Axes
|
||||
mcmmo.ability.axes.axeslimitbreak:
|
||||
description: Adds damage to axes
|
||||
mcmmo.ability.axes.axemastery:
|
||||
@ -344,9 +332,6 @@ permissions:
|
||||
children:
|
||||
mcmmo.ability.excavation.gigadrillbreaker: true
|
||||
mcmmo.ability.excavation.archaeology: true
|
||||
mcmmo.ability.excavation.mastery: true
|
||||
mcmmo.ability.excavation.mastery:
|
||||
description: Allows access to end game progression for Excavation
|
||||
mcmmo.ability.excavation.gigadrillbreaker:
|
||||
description: Allows access to the Giga Drill Breaker ability
|
||||
mcmmo.ability.excavation.archaeology:
|
||||
@ -366,9 +351,6 @@ permissions:
|
||||
mcmmo.ability.fishing.shake: true
|
||||
mcmmo.ability.fishing.treasurehunter: true
|
||||
mcmmo.ability.fishing.vanillaxpboost: true
|
||||
mcmmo.ability.fishing.mastery: true
|
||||
mcmmo.ability.fishing.mastery:
|
||||
description: Allows access to end game progression for Fishing
|
||||
mcmmo.ability.fishing.fishermansdiet:
|
||||
description: Allows access to the Fishermans's Diet ability
|
||||
mcmmo.ability.fishing.icefishing:
|
||||
@ -528,9 +510,6 @@ permissions:
|
||||
mcmmo.ability.repair.stringrepair: true
|
||||
mcmmo.ability.repair.toolrepair: true
|
||||
mcmmo.ability.repair.woodrepair: true
|
||||
mcmmo.ability.repair.mastery: true
|
||||
mcmmo.ability.repair.mastery:
|
||||
description: Allows access to end game progression for Repair
|
||||
mcmmo.ability.repair.arcaneforging:
|
||||
description: Allows access to the Arcane Forging ability
|
||||
mcmmo.ability.repair.armorrepair:
|
||||
@ -583,9 +562,6 @@ permissions:
|
||||
mcmmo.ability.salvage.stringsalvage: true
|
||||
mcmmo.ability.salvage.toolsalvage: true
|
||||
mcmmo.ability.salvage.woodsalvage: true
|
||||
mcmmo.ability.salvage.mastery: true
|
||||
mcmmo.ability.salvage.mastery:
|
||||
description: Allows access to end game progression for Salvage
|
||||
mcmmo.ability.salvage.scrapcollector:
|
||||
description: Allows access to the Scrap Collector ability
|
||||
mcmmo.ability.salvage.arcanesalvage:
|
||||
@ -626,9 +602,6 @@ permissions:
|
||||
mcmmo.ability.smelting.fluxmining: true
|
||||
mcmmo.ability.smelting.fuelefficiency: true
|
||||
mcmmo.ability.smelting.vanillaxpboost: true
|
||||
mcmmo.ability.smelting.mastery: true
|
||||
mcmmo.ability.smelting.mastery:
|
||||
description: Allows access to end game progression for Smelting
|
||||
mcmmo.ability.smelting.fluxmining:
|
||||
description: Allows access to the Flux Mining ability
|
||||
mcmmo.ability.smelting.fuelefficiency:
|
||||
@ -650,9 +623,6 @@ permissions:
|
||||
mcmmo.ability.swords.counterattack: true
|
||||
mcmmo.ability.swords.serratedstrikes: true
|
||||
mcmmo.ability.swords.swordslimitbreak: true
|
||||
mcmmo.ability.swords.mastery: true
|
||||
mcmmo.ability.swords.mastery:
|
||||
description: Allows access to end game progression for Swords
|
||||
mcmmo.ability.swords.stab:
|
||||
description: Adds damage to swords
|
||||
mcmmo.ability.swords.swordslimitbreak:
|
||||
@ -681,9 +651,6 @@ permissions:
|
||||
mcmmo.ability.taming.shockproof: true
|
||||
mcmmo.ability.taming.thickfur: true
|
||||
mcmmo.ability.taming.pummel: true
|
||||
mcmmo.ability.taming.mastery: true
|
||||
mcmmo.ability.taming.mastery:
|
||||
description: Allows access to end game progression for Taming
|
||||
mcmmo.ability.taming.beastlore:
|
||||
description: Allows access to the Beast Lore ability
|
||||
mcmmo.ability.taming.callofthewild.*:
|
||||
@ -734,9 +701,6 @@ permissions:
|
||||
mcmmo.ability.unarmed.disarm: true
|
||||
mcmmo.ability.unarmed.irongrip: true
|
||||
mcmmo.ability.unarmed.unarmedlimitbreak: true
|
||||
mcmmo.ability.unarmed.mastery: true
|
||||
mcmmo.ability.unarmed.mastery:
|
||||
description: Allows access to end game progression for Unarmed
|
||||
mcmmo.ability.unarmed.unarmedlimitbreak:
|
||||
description: Adds damage to unarmed attacks
|
||||
mcmmo.ability.unarmed.berserk:
|
||||
|
@ -201,6 +201,12 @@ Axes:
|
||||
Rank_2: 100
|
||||
Rank_3: 150
|
||||
Rank_4: 200
|
||||
Crossbows:
|
||||
SuperShotgun:
|
||||
Standard:
|
||||
Rank_1: 5
|
||||
RetroMode:
|
||||
Rank_1: 50
|
||||
Taming:
|
||||
BeastLore:
|
||||
Standard:
|
||||
|
@ -52,16 +52,19 @@ class FlatFileDatabaseManagerTest {
|
||||
int expectedLvlMining = 1, expectedLvlWoodcutting = 2, expectedLvlRepair = 3,
|
||||
expectedLvlUnarmed = 4, expectedLvlHerbalism = 5, expectedLvlExcavation = 6,
|
||||
expectedLvlArchery = 7, expectedLvlSwords = 8, expectedLvlAxes = 9, expectedLvlAcrobatics = 10,
|
||||
expectedLvlTaming = 11, expectedLvlFishing = 12, expectedLvlAlchemy = 13;
|
||||
expectedLvlTaming = 11, expectedLvlFishing = 12, expectedLvlAlchemy = 13, expectedLvlCrossbows = 14,
|
||||
expectedLvlTridents = 15;
|
||||
|
||||
float expectedExpMining = 10, expectedExpWoodcutting = 20, expectedExpRepair = 30,
|
||||
expectedExpUnarmed = 40, expectedExpHerbalism = 50, expectedExpExcavation = 60,
|
||||
expectedExpArchery = 70, expectedExpSwords = 80, expectedExpAxes = 90, expectedExpAcrobatics = 100,
|
||||
expectedExpTaming = 110, expectedExpFishing = 120, expectedExpAlchemy = 130;
|
||||
expectedExpTaming = 110, expectedExpFishing = 120, expectedExpAlchemy = 130, expectedExpCrossbows = 140,
|
||||
expectedExpTridents = 150;
|
||||
|
||||
long expectedBerserkCd = 111, expectedGigaDrillBreakerCd = 222, expectedTreeFellerCd = 333,
|
||||
expectedGreenTerraCd = 444, expectedSerratedStrikesCd = 555, expectedSkullSplitterCd = 666,
|
||||
expectedSuperBreakerCd = 777, expectedBlastMiningCd = 888, expectedChimaeraWingCd = 999;
|
||||
expectedSuperBreakerCd = 777, expectedBlastMiningCd = 888, expectedChimaeraWingCd = 999,
|
||||
expectedSSGCd = 1111, expectedTridentSuperCd = 2222;
|
||||
|
||||
int expectedScoreboardTips = 1111;
|
||||
Long expectedLastLogin = 2020L;
|
||||
|
@ -22,13 +22,13 @@ import org.bukkit.Server;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.PlayerInventory;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.mockito.MockedStatic;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
|
@ -1,12 +1,9 @@
|
||||
package com.gmail.nossr50.util.random;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
|
@ -1,3 +1,3 @@
|
||||
nossr50:1:IGNORED:IGNORED:10:2:20:3:4:5:6:7:8:9:10:30:40:50:60:70:80:90:100:IGNORED:11:110:111:222:333:444:555:666:777:IGNORED:12:120:888:IGNORED:HEARTS:13:130:588fe472-1c82-4c4e-9aa1-7eefccb277e3:1111:999:2020:
|
||||
mrfloris:2420:::0:2452:0:1983:1937:1790:3042:1138:3102:2408:3411:0:0:0:0:0:0:0:0::642:0:1617583171:0:1617165043:0:1617583004:1617563189:1616785408::2184:0:0:1617852413:HEARTS:415:0:631e3896-da2a-4077-974b-d047859d76bc:5:1600906906:3030:
|
||||
powerless:0:::0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0::0:0:0:0:0:0:0:0:0::0:0:0:1337:HEARTS:0:0:e0d07db8-f7e8-43c7-9ded-864dfc6f3b7c:5:1600906906:4040:
|
||||
nossr50:1:IGNORED:IGNORED:10:2:20:3:4:5:6:7:8:9:10:30:40:50:60:70:80:90:100:IGNORED:11:110:111:222:333:444:555:666:777:IGNORED:12:120:888:IGNORED:HEARTS:13:130:588fe472-1c82-4c4e-9aa1-7eefccb277e3:1111:999:2020:140:14:150:15:1111:2222:
|
||||
mrfloris:2420:::0:2452:0:1983:1937:1790:3042:1138:3102:2408:3411:0:0:0:0:0:0:0:0::642:0:1617583171:0:1617165043:0:1617583004:1617563189:1616785408::2184:0:0:1617852413:HEARTS:415:0:631e3896-da2a-4077-974b-d047859d76bc:5:1600906906:3030:0:0:0:0:0:0:
|
||||
powerless:0:::0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0::0:0:0:0:0:0:0:0:0::0:0:0:1337:HEARTS:0:0:e0d07db8-f7e8-43c7-9ded-864dfc6f3b7c:5:1600906906:4040:0:0:0:0:0:0:
|
3
src/test/resources/olderdb.users
Normal file
3
src/test/resources/olderdb.users
Normal file
@ -0,0 +1,3 @@
|
||||
nossr50:1:IGNORED:IGNORED:10:2:20:3:4:5:6:7:8:9:10:30:40:50:60:70:80:90:100:IGNORED:11:110:111:222:333:444:555:666:777:IGNORED:12:120:888:IGNORED:HEARTS:13:130:588fe472-1c82-4c4e-9aa1-7eefccb277e3:1111:999:2020:
|
||||
mrfloris:2420:::0:2452:0:1983:1937:1790:3042:1138:3102:2408:3411:0:0:0:0:0:0:0:0::642:0:1617583171:0:1617165043:0:1617583004:1617563189:1616785408::2184:0:0:1617852413:HEARTS:415:0:631e3896-da2a-4077-974b-d047859d76bc:5:1600906906:3030:
|
||||
powerless:0:::0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0::0:0:0:0:0:0:0:0:0::0:0:0:1337:HEARTS:0:0:e0d07db8-f7e8-43c7-9ded-864dfc6f3b7c:5:1600906906:4040:
|
Loading…
Reference in New Issue
Block a user