Files per version

This commit is contained in:
Esophose 2019-08-03 23:14:44 -06:00
parent 2192ee683b
commit 84b24d1aae
32 changed files with 3924 additions and 15 deletions

View File

@ -4,7 +4,7 @@ stages:
variables:
name: "EpicBosses"
path: "/builds/$CI_PROJECT_PATH"
version: "1.1.1"
version: "1.2"
build:
stage: build

View File

@ -0,0 +1,155 @@
{
"SkeletonTableGive": {
"dropType": "GIVE",
"rewards": {
"giveRewards": {
"1": {
"1": {
"items": {
"SKEco500": 30.0,
"SKEco2500": 50.0,
"SKEco5000": 10.0
},
"commands": {
"SKEco500": 30.0,
"SKEco2500": 50.0,
"SKEco5000": 10.0
},
"maxDrops": 3,
"maxCommands": 1,
"randomDrops": true,
"randomCommands": true,
"requiredPercentage": 80.0
},
"2": {
"items": {
"SKCustomDrop1": 50.0
},
"commands": {},
"maxDrops": 1,
"maxCommands": 0,
"randomDrops": false,
"randomCommands": false,
"requiredPercentage": 50.0
},
"3": {
"items": {
"SKCustomDrop1": 100.0
},
"commands": {},
"maxDrops": 1,
"maxCommands": 0,
"randomDrops": false,
"randomCommands": false,
"requiredPercentage": 0.0
}
},
"2": {
"1": {
"items": {
"SKMainHand": 8.0,
"SKOffHand": 8.0,
"SKHelmet": 8.0,
"SKLeggings": 20.0,
"SKChestplate": 20.0,
"SKBoots": 20.0
},
"commands": {},
"maxDrops": -1,
"maxCommands": 0,
"randomDrops": false,
"randomCommands": false,
"requiredPercentage": 0.0
}
},
"3": {
"1": {
"items": {
"SKMainHand": 5.0,
"SKOffHand": 5.0,
"SKHelmet": 5.0,
"SKLeggings": 15.0,
"SKChestplate": 15.0,
"SKBoots": 15.0
},
"commands": {},
"maxDrops": -1,
"maxCommands": 0,
"randomDrops": false,
"randomCommands": false,
"requiredPercentage": 0.0
}
},
"4": {
"1": {
"items": {
"SKMainHand": 3.0,
"SKOffHand": 3.0,
"SKHelmet": 3.0,
"SKLeggings": 10.0,
"SKChestplate": 10.0,
"SKBoots": 10.0
},
"commands": {},
"maxDrops": -1,
"maxCommands": 0,
"randomDrops": false,
"randomCommands": false,
"requiredPercentage": 0.0
}
},
"5": {
"1": {
"items": {
"SKMainHand": 1.0,
"SKOffHand": 1.0,
"SKHelmet": 1.0,
"SKLeggings": 5.0,
"SKChestplate": 5.0,
"SKBoots": 5.0
},
"commands": {},
"maxDrops": -1,
"maxCommands": 0,
"randomDrops": false,
"randomCommands": false,
"requiredPercentage": 0.0
}
}
}
}
},
"SkeletonTableDrop": {
"dropType": "DROP",
"rewards": {
"dropRewards": {
"SKSpawnItem": 10.0,
"SKHelmet": 45.0,
"SKChestplate": 45.0,
"SKLeggings": 45.0,
"SKBoots": 45.0,
"SKMainHand": 30.0,
"SKOffHand": 30.0
},
"randomDrops": true,
"dropMaxDrops": 4
}
},
"SkeletonTableSpray": {
"dropType": "SPRAY",
"rewards": {
"sprayRewards": {
"SKSpawnItem": 10.0,
"SKHelmet": 45.0,
"SKChestplate": 45.0,
"SKLeggings": 45.0,
"SKBoots": 45.0,
"SKMainHand": 30.0,
"SKOffHand": 30.0
},
"randomSprayDrops": true,
"sprayMaxDistance": 10,
"sprayMaxDrops": 5
}
}
}

View File

@ -0,0 +1,93 @@
{
"DefaultAutoSpawnListItem": {
"type": "GRASS_BLOCK",
"name": "&c&lDefault AutoSpawn List Item"
},
"DefaultDropTableRewardItem": {
"type": "DIAMOND",
"name": "&c&lDefault DropTable Reward Item"
},
"DefaultDropTableRewardsListItem": {
"type": "CHEST",
"name": "&c&lDefault DropTable Rewards List Item"
},
"DefaultMinionMenuSpawnItem": {
"type": "ZOMBIE_SPAWN_EGG",
"name": "&c&lDefault Minion Menu Spawn Item"
},
"DefaultTextMenuItem": {
"type": "BOOK",
"name": "&c&lDefault Text Menu Item"
},
"DefaultBossMenuItem": {
"type": "BARRIER",
"name": "&c&lDefault Boss Menu Item"
},
"DefaultDropTableMenuItem": {
"type": "OAK_PRESSURE_PLATE",
"name": "&c&lDefault Drop Table Menu Item"
},
"DefaultCustomSkillTypeItem": {
"type": "STICK",
"name": "&c&lDefault Custom Skill Type Item"
},
"DefaultSelectedTargetingItem": {
"type": "EMERALD_BLOCK",
"name": "&c&lDefault Selected Targeting System Item"
},
"DefaultSelectedCustomSkillTypeItem": {
"type": "BLAZE_ROD",
"name": "&c&lDefault Selected Custom Skill Type Item"
},
"DefaultSelectedDropTableItem": {
"type": "LIGHT_WEIGHTED_PRESSURE_PLATE",
"name": "&c&lSelected Default Drop Table Menu Item"
},
"DefaultSkillMenuItem": {
"type": "BLAZE_POWDER",
"name": "&c&lDefault Skill Menu Item"
},
"DefaultBossListEditorMenuItem": {
"type": "ZOMBIE_SPAWN_EGG",
"name": "&c&lDefault Boss List Editor Menu Item"
},
"SKSpawnItem": {
"type": "SKELETON_SPAWN_EGG",
"name": "&6&lSkeleton King Boss Spawn Egg",
"lore": [
"&7Right click a block to spawn",
"&7the boss as that location."
]
},
"SKHelmet": {
"type": "GOLDEN_HELMET",
"enchants": [ "protection:4", "unbreaking:3" ]
},
"SKChestplate": {
"type": "GOLDEN_CHESTPLATE",
"enchants": [ "protection:4", "unbreaking:3" ]
},
"SKLeggings": {
"type": "GOLDEN_LEGGINGS",
"enchants": [ "protection:4", "unbreaking:3" ]
},
"SKBoots": {
"type": "DIAMOND_BOOTS",
"enchants": [ "protection:4", "unbreaking:3" ]
},
"SKMainHand": {
"type": "DIAMOND_SWORD",
"enchants": [ "sharpness:4", "unbreaking:3" ]
},
"SKOffHand": {
"type": "SHIELD"
},
"SKCustomDrop1": {
"type": "STONE",
"name": "&5Skeleton King Stone",
"lore": [
"&7This stone will bring you",
"&7great luck in battle."
]
}
}

View File

@ -0,0 +1,196 @@
{
"Blind1": {
"mode": "ALL",
"type": "POTION",
"displayName": "Blind",
"customMessage": "BlindMessage",
"radius": 10,
"customData": {
"potions": [
{
"type": "blind",
"level": 2,
"duration": 10
}
]
}
},
"Guts1": {
"mode": "ALL",
"type": "COMMAND",
"radius": 10,
"displayName": "Guts",
"customMessage": "GutsMessage",
"customData": {
"commands": [
{
"name": "a",
"chance": 25,
"commands": [
"Guts1",
"Guts2"
]
},
{
"name": "b",
"chance": 10,
"commands": [
"Guts3"
]
}
]
}
},
"Cage1": {
"mode": "ALL",
"type": "CUSTOM",
"radius": 10,
"displayName": "Cage",
"customData": {
"custom": {
"type": "CAGE",
"multiplier": 0.0,
"otherSkillData": {
"flatType": "IRON_BLOCK",
"wallType": "IRON_BARS",
"insideType": "WATER",
"duration": 5
}
}
}
},
"Disarm1": {
"mode": "ONE",
"type": "CUSTOM",
"radius": 10,
"displayName": "Disarm",
"customMessage": null,
"customData": {
"custom": {
"type": "DISARM",
"multiplier": null
}
}
},
"Fireball1": {
"mode": "RANDOM",
"type": "CUSTOM",
"radius": 10,
"displayName": "Fireball",
"customMessage": null,
"customData": {
"custom": {
"type": "FIREBALL",
"multiplier": 3.0
}
}
},
"Grapple1": {
"mode": "RANDOM",
"type": "CUSTOM",
"radius": 10,
"displayName": "Grapple",
"customMessage": null,
"customData": {
"custom": {
"type": "GRAPPLE",
"multiplier": 3.0
}
}
},
"Insidious1": {
"mode": "RANDOM",
"type": "CUSTOM",
"radius": 10,
"displayName": "Insidious",
"customMessage": null,
"customData": {
"custom": {
"type": "INSIDIOUS",
"multiplier": 2.5
}
}
},
"Knockback1": {
"mode": "ALL",
"type": "CUSTOM",
"radius": 10,
"displayName": "Knockback",
"customMessage": null,
"customData": {
"custom": {
"type": "KNOCKBACK",
"multiplier": 2.5
}
}
},
"Launch1": {
"mode": "ALL",
"type": "CUSTOM",
"radius": 10,
"displayName": "Launch",
"customMessage": null,
"customData": {
"custom": {
"type": "LAUNCH",
"multiplier": 3.0
}
}
},
"Lightning1": {
"mode": "ALL",
"type": "CUSTOM",
"radius": 10,
"displayName": "Lightning",
"customMessage": null,
"customData": {
"custom": {
"type": "LIGHTNING",
"multiplier": null
}
}
},
"Minions1": {
"mode": "ALL",
"type": "CUSTOM",
"radius": 10,
"displayName": "Minions",
"customMessage": null,
"customData": {
"custom": {
"type": "MINIONS",
"multiplier": null,
"otherSkillData": {
"amount": 5,
"minionToSpawn": "SkeletonKingMinion"
}
}
}
},
"Warp1": {
"mode": "ONE",
"type": "CUSTOM",
"radius": 10,
"displayName": "Warp",
"customMessage": null,
"customData": {
"custom": {
"type": "WARP",
"multiplier": null
}
}
},
"Shazaam1": {
"mode": "ALL",
"type": "GROUP",
"radius": 10,
"displayName": "Shazaam",
"customMessage": "ShazaamMessage",
"customData": {
"groupedSkills": [
"Blind1",
"Knockback1"
]
}
}
}

View File

@ -0,0 +1,23 @@
{
"MiddleOfTheEarth": {
"editing": true,
"type": "INTERVAL",
"entities": [
"SkeletonKing"
],
"autoSpawnSettings": {
"shuffleEntitiesList": true,
"maxAliveAtOnce": 1,
"amountPerSpawn": 1,
"spawnWhenChunkIsntLoaded": false,
"overrideDefaultSpawnMessage": true,
"spawnMessage": "MiddleOfTheEarthSpawnMessage"
},
"customData": {
"spawnAfterLastBossIsKilled": false,
"location": "world,0,150,0",
"placeholder": "{customBosses_1}",
"spawnRate": 30
}
}
}

View File

@ -0,0 +1,77 @@
{
"SkeletonKing": {
"spawnItem": "SKSpawnItem",
"targeting": "RandomNearby",
"editing": true,
"buyable": true,
"price": 500000.0,
"entityStats": [
{
"mainStats": {
"position": 1,
"entityType": "SKELETON",
"health": 50,
"displayName": "&6&lSkeleton King Boss"
},
"equipment": {
"helmet": "SKHelmet",
"chestplate": "SKChestplate",
"leggings": "SKLeggings",
"boots": "SKBoots"
},
"hands": {
"mainHand": "SKMainHand",
"offHand": "SKOffHand"
},
"potions": [
{
"type": "resistance",
"level": 3,
"duration": -1
},
{
"type": "speed",
"level": 1,
"duration": 500
}
]
}
],
"skills": {
"overallChance": 35.5,
"masterMessage": "SKMainSkillMessage",
"skills": [
"Minions1"
]
},
"drops": {
"naturalDrops": false,
"dropExp": false,
"dropTable": "SkeletonTableSpray"
},
"messages": {
"onSpawn": {
"message": "SKOnSpawn",
"radius": -1
},
"onDeath": {
"message": "SKOnDeath",
"positionMessage": "SKPosition",
"radius": -1,
"onlyShow": 3
},
"taunts": {
"delay": 60,
"radius": 100,
"taunts": [
"SKTaunt1",
"SKTaunt2"
]
}
},
"commands": {
"onSpawn": "SKOnSpawn",
"onDeath": "SKOnDeath"
}
}
}

View File

@ -0,0 +1,26 @@
{
"SKOnSpawn": [
"broadcast this is a default command that is broadcasted when the Skeleton King is spawned."
],
"SKOnDeath": [
"broadcast this is the default command when the Skeleton King is defeated!"
],
"SKEco500": [
"eco give %player% 500"
],
"SKEco2500": [
"eco give %player% 2500"
],
"SKEco5000": [
"eco give %player% 5000"
],
"Guts1": [
"give %player% bone 3 name:&eSpecial_Bone lore:&7This_bone_was_obtained_from_the|&7skeleton_king_when_you_rattled_him."
],
"Guts2": [
"give %player% ironingot 1 name:&eSpecial_Ingot lore:&7This_ingot_was_obtained_from_the|&7skeleton_king_when_you_rattled_him."
],
"Guts3": [
"give %player% diamond 1 name:&eSpecial_Diamond lore:&7This_diamond_was_obtained_from_the|&7skeleton_king_when_you_rattled_him."
]
}

View File

@ -0,0 +1,40 @@
{
"MiddleOfTheEarthSpawnMessage": [
"&6&lEpicBosses &8» &fA mysterious boss has just been spawned at the middle of the earth in the world &e{world} at the coordinates &e{x}, {y}, {z}&f!"
],
"SKMainSkillMessage": [
"&6&l{boss} &7has used the &e{skill} &7skill."
],
"SKOnSpawn": [
"&8&m-----*--------------------*-----",
"&7",
"&fA &e{boss} &fhas been spawned by &e{name} &fat &e{location}&f!",
"&7",
"&8&m-----*--------------------*-----"
],
"SKOnDeath": [
"&8&m-----*--------------------*-----",
"&7",
"&e{boss}&f has been killed,",
"&fbelow are the top damagers:",
"&7",
"{positions}",
"&7",
"&8&m-----*--------------------*-----"
],
"SKPosition": [
"&6&l#{pos} &e{name}&f - &e{percent}% &f(&e{dmg} dmg&f)"
],
"SKTaunt1": [
"&6&lSkeleton King &f» &7My pocket knife is sharper then that sword! &o*cackle*"
],
"SKTaunt2": [
"&6&lSkeleton King &f» &7You think you humans can defeat me?! I am the notorious Skeleton King!"
],
"BlindMessage": [
"&6&lSkeleton King &f» &7I curse you all with blindness!!"
],
"GutsMessage": [
"&6&lSkeleton King &f» &7Oh no! You rattled up my skeleton and some of my goods fell!"
]
}

View File

@ -0,0 +1,38 @@
{
"SkeletonKingMinion": {
"editing": false,
"targeting": "RandomNearby",
"entityStats": [
{
"mainStats": {
"position": 1,
"entityType": "SKELETON",
"health": 500,
"displayName": "&6&lSkeleton King Boss Minion"
},
"equipment": {
"helmet": "SKHelmet",
"chestplate": "SKChestplate",
"leggings": "SKLeggings",
"boots": "SKBoots"
},
"hands": {
"mainHand": "SKMainHand",
"offHand": "SKOffHand"
},
"potions": [
{
"type": "resistance",
"level": 3,
"duration": -1
},
{
"type": "speed",
"level": 1,
"duration": 500
}
]
}
]
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,259 @@
Settings:
debug: true
bossTargetRange: 50.0
defaultNearbyRadius: 250.0
nearbyFormat: '{name} ({distance}m)'
BlockedWorlds:
enabled: false
worlds:
- 'world_the_end'
- 'world_nether'
Toggles:
bossShop: true
endermanTeleporting: true
potionsAffectingBoss: true
Limits:
maxNearbyRadius: 500.0
Hooks:
ASkyBlock:
enabled: false
onOwnIsland: false
Factions:
enabled: false
useWarzoneSpawnRegion: false
HolographicDisplays:
enabled: false
StackMob:
enabled: false
WorldGuard:
enabled: true
spawnRegions:
- 'spawn_region1'
- 'spawn_region2'
blockedRegions:
- 'blocked_region1'
- 'blocked_region2'
Display:
Boss:
Text:
menuName: '&b&l{name} Editor'
selectedName: '&bMessage: &f{name} &a&l** Selected **'
name: '&bMessage: &f{name}'
lore:
- '&fStrings within this section:'
- '{message}'
Commands:
menuName: '&b&l{name} Editor'
selectedName: '&bCommand: &f{name} &a&l** Selected **'
name: '&bCommand: &f{name}'
lore:
- '&fCommands within this section:'
- '{commands}'
Taunts:
menuName: '&b&l{name} Editor'
Drops:
name: '&bDropTable: &f{name}'
lore:
- '&3Type: &7{type}'
- '&7'
- '&7Click here to select this drop'
- '&7table as the current one.'
Equipment:
name: '{name} &a&l** Selected **'
EntityType:
menuName: '&b&l{name} Editor'
selectedName: '&f{name} Entity &a&l** Selected **'
name: '&f{name} Entity'
List:
name: '&3{position} Entity'
lore:
- '&3Left Click &8»'
- '&7Edit the {targetType} for this'
- '&7entity in the section.'
- '&7'
- '&3Right Click &8»'
- '&7Remove this section, can be done'
- '&7to anything above the first one.'
Skills:
menuName: '&b&l{name} Editor'
selectedName: '&b&l{name} Skill &a&l** Selected **'
name: '&b&l{name} Skill'
lore:
- '&3Type: &7{type}'
- '&3Display Name: &7{displayName}'
- '&3Custom Message: &7{customMessage}'
- '&3Radius: &7{radius}'
- '&7'
- '&7Click to add/remove the skill to'
- '&7or from the boss skill list.'
AutoSpawns:
Main:
menuName: '&b&lEpicBosses &3&lAutoSpawns'
name: '&bAuto Spawn: &f{name}'
lore:
- '&3Editing: &f{enabled}'
- '&7'
- '&3Spawn Type: &f{type}'
- '&3Entities: &f{entities}'
- '&7'
- '&3Max Alive: &f{maxAlive}'
- '&3Amount per Spawn: &f{amountPerSpawn}'
- '&3When Chunk Isnt Loaded: &f{chunkIsntLoaded}'
- '&3Override Spawn Messages: &f{overrideSpawnMessages}'
- '&3Shuffle Entities: &f{shuffleEntities}'
- '&3Custom Spawn Message: &f{customSpawnMessage}'
Entities:
selectedName: '&bBoss: &f{name} &a** Selected **'
name: '&bBoss: &f{name}'
lore:
- '&3Editing: &f{editing}'
- '&3Targeting: &f{targeting}'
- '&3Drop Table: &f{dropTable}'
- '&7'
- '&7Click to select or deselect this boss.'
CustomSettings:
name: '&bCustom Setting: &f{name}'
lore:
- '&3Currently: &f{currently}'
- '{extraInformation}'
SpawnMessage:
menuName: '&b&l{name} AutoSpawn'
selectedName: '&bMessage: &f{name} &a** Selected **'
name: '&bMessage: &f{name}'
lore:
- '&fStrings within this section:'
- '{message}'
Bosses:
menuName: '&b&lEpicBosses &3&lBosses'
name: '&b&l{name}'
lore:
- '&3Editing: &f{enabled}'
- '&7'
- '&3Left Click &8»'
- '&7Get spawn item for custom'
- '&7boss.'
- '&7'
- '&3Right Click &8»'
- '&7Edit the custom boss.'
DropTable:
Main:
menuName: '&b&lEpicBosses &3&lDropTables'
name: '&b&l{name} Drop Table'
lore:
- '&3Type: &7{type}'
- '&7'
- '&7Click to edit the drop table.'
RewardList:
name: '&bReward Section'
lore:
- '&3Selected Item: &f{itemName}'
- '&3Chance: &f{chance}%'
- '&7'
- '&7Click to modify this reward.'
CommandRewardList:
name: '&bReward Section'
lore:
- '&3Selected Command: &f{commandName}'
- '&3Chance: &f{chance}%'
- '&7'
- '&7Click to modify this reward.'
GivePositionList:
name: '&bReward Section'
lore:
- '&3Position: &f{position}'
- '&3Drops: &f{dropAmount}'
- '&7'
- '&7Shift Right-Click to remove.'
- '&7Left-Click to edit.'
GiveRewardsList:
name: '&bReward Section'
lore:
- '&3Position: &f{position}'
- '&3Required Percentage: &f{percentage}%'
- '&7'
- '&3Item Drops: &f{items}'
- '&3Max Drops: &f{maxDrops}'
- '&3Random Drops: &f{randomDrops}'
- '&7'
- '&3Command Drops: &f{commands}'
- '&3Max Commands: &f{maxCommands}'
- '&3Random Commands: &f{randomCommands}'
- '&7'
- '&7Shift Right-Click to remove.'
- '&7Left-Click to edit.'
Shop:
name: '&b&lBuy {name}''s Egg'
lore:
- '&3Cost: &a$&f{price}'
Skills:
Main:
menuName: '&b&lEpicBosses &3&lSkills'
name: '&b&l{name} Skill'
lore:
- '&3Type: &7{type}'
- '&3Display Name: &7{displayName}'
- '&3Custom Message: &7{customMessage}'
- '&3Radius: &7{radius}'
- '&7'
- '&7Click to edit the custom skill.'
MainEdit:
menuName: '&b&l{name} Skill Editor'
Potions:
name: '&b&l{effect} Potion Effect'
lore:
- '&3Duration: &7{duration}'
- '&3Level: &7{level}'
- '&7'
- '&7Click to remove potion effect.'
CreatePotion:
menuName: '&b&lSelect Potion Effect Type'
name: '&bEffect: &f{effect}'
selectedName: '&bEffect: &f{effect} &a&l** Selected **'
Commands:
name: '&b&lCommand Section'
lore:
- '&3Chance &8» &f{chance}%'
- '&7'
- '&3Commands &8»'
- '&f{commands}'
- '&7'
- '&7Click to edit command section.'
CommandList:
menuName: '&b&l{name} Skill Editor'
selectedName: '&bCommand: &f{name} &a&l** Selected **'
name: '&bCommand: &f{name}'
lore:
- '&fCommands within this section:'
- '{commands}'
Group:
menuName: '&b&l{name} Skill Editor'
selectedName: '&bSkill: &f{name} &a&l** Selected **'
name: '&bSkill: &f{name}'
lore:
- '&3Mode: &7{mode}'
- '&3Type: &7{type}'
- '&3Display Name: &7{displayName}'
- '&3Custom Message: &7{customMessage}'
- '&3Radius: &7{radius}'
CustomType:
selectedName: '&bCustom Skill: &f{name} &a** Selected **'
name: '&bCustom Skill: &f{name}'
lore:
- '&3Uses Multiplier: &7{multiplier}'
- '&3Has Custom Data: &7{customData}'
Material:
menuName: '&b&lSelect Material'
selectedName: '&bMaterial: &f{type} &a** Selected **'
name: '&bMaterial: &f{type}'
MinionList:
menuName: '&b&lSelect Minion For Skill'
selectedName: '&bMinion: &f{name} &a** Selected **'
name: '&bMinion: &f{name}'
lore:
- '&3Editing: &7{editing}'
- '&3Targeting: &7{targeting}'
CustomSetting:
name: '&bSetting: &f{setting}'
lore:
- '&3Currently: &7{currently}'

View File

@ -1,6 +1,8 @@
package com.songoda.epicbosses.file;
import com.songoda.epicbosses.utils.Versions;
import com.songoda.epicbosses.utils.file.YmlFileHandler;
import com.songoda.epicbosses.utils.version.VersionHandler;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.File;
@ -13,6 +15,6 @@ import java.io.File;
public class ConfigFileHandler extends YmlFileHandler {
public ConfigFileHandler(JavaPlugin javaPlugin) {
super(javaPlugin, true, new File(javaPlugin.getDataFolder(), "config.yml"));
super(javaPlugin, true, new File(javaPlugin.getDataFolder(), new VersionHandler().getVersion().isHigherThanOrEqualTo(Versions.v1_13_R1) ? "current" : "legacy" + "/config.yml"));
}
}

View File

@ -1,6 +1,8 @@
package com.songoda.epicbosses.file;
import com.songoda.epicbosses.utils.Versions;
import com.songoda.epicbosses.utils.file.YmlFileHandler;
import com.songoda.epicbosses.utils.version.VersionHandler;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.File;
@ -13,7 +15,7 @@ import java.io.File;
public class EditorFileHandler extends YmlFileHandler {
public EditorFileHandler(JavaPlugin javaPlugin) {
super(javaPlugin, true, new File(javaPlugin.getDataFolder(), "editor.yml"));
super(javaPlugin, true, new File(javaPlugin.getDataFolder(), new VersionHandler().getVersion().isHigherThanOrEqualTo(Versions.v1_13_R1) ? "current" : "legacy" + "/editor.yml"));
}
}

View File

@ -6,6 +6,8 @@ import com.songoda.epicbosses.file.AutoSpawnFileHandler;
import com.songoda.epicbosses.utils.ILoadable;
import com.songoda.epicbosses.utils.IReloadable;
import com.songoda.epicbosses.utils.ISavable;
import com.songoda.epicbosses.utils.Versions;
import com.songoda.epicbosses.utils.version.VersionHandler;
import java.io.File;
import java.util.HashMap;
@ -22,7 +24,7 @@ public class AutoSpawnFileManager implements ILoadable, ISavable, IReloadable {
private AutoSpawnFileHandler autoSpawnFileHandler;
public AutoSpawnFileManager(CustomBosses plugin) {
File file = new File(plugin.getDataFolder(), "autospawns.json");
File file = new File(plugin.getDataFolder(), new VersionHandler().getVersion().isHigherThanOrEqualTo(Versions.v1_13_R1) ? "current" : "legacy" + "/autospawns.json");
this.autoSpawnFileHandler = new AutoSpawnFileHandler(plugin, true, file);
}

View File

@ -7,6 +7,8 @@ import com.songoda.epicbosses.file.BossesFileHandler;
import com.songoda.epicbosses.utils.ILoadable;
import com.songoda.epicbosses.utils.IReloadable;
import com.songoda.epicbosses.utils.ISavable;
import com.songoda.epicbosses.utils.Versions;
import com.songoda.epicbosses.utils.version.VersionHandler;
import java.io.File;
import java.util.ArrayList;
@ -25,7 +27,7 @@ public class BossesFileManager implements ILoadable, ISavable, IReloadable {
private BossesFileHandler bossesFileHandler;
public BossesFileManager(CustomBosses customBosses) {
File file = new File(customBosses.getDataFolder(), "bosses.json");
File file = new File(customBosses.getDataFolder(), new VersionHandler().getVersion().isHigherThanOrEqualTo(Versions.v1_13_R1) ? "current" : "legacy" + "/bosses.json");
this.bossesFileHandler = new BossesFileHandler(customBosses, true, file);
this.bossEntityContainer = customBosses.getBossEntityContainer();

View File

@ -5,6 +5,8 @@ import com.songoda.epicbosses.file.CommandsFileHandler;
import com.songoda.epicbosses.utils.ILoadable;
import com.songoda.epicbosses.utils.IReloadable;
import com.songoda.epicbosses.utils.ISavable;
import com.songoda.epicbosses.utils.Versions;
import com.songoda.epicbosses.utils.version.VersionHandler;
import java.io.File;
import java.util.HashMap;
@ -22,7 +24,7 @@ public class CommandsFileManager implements ILoadable, ISavable, IReloadable {
private CommandsFileHandler commandsFileHandler;
public CommandsFileManager(CustomBosses customBosses) {
File file = new File(customBosses.getDataFolder(), "commands.json");
File file = new File(customBosses.getDataFolder(), new VersionHandler().getVersion().isHigherThanOrEqualTo(Versions.v1_13_R1) ? "current" : "legacy" + "/commands.json");
this.commandsFileHandler = new CommandsFileHandler(customBosses, true, file);
}

View File

@ -5,6 +5,8 @@ import com.songoda.epicbosses.file.DropTableFileHandler;
import com.songoda.epicbosses.utils.ILoadable;
import com.songoda.epicbosses.utils.IReloadable;
import com.songoda.epicbosses.utils.ISavable;
import com.songoda.epicbosses.utils.Versions;
import com.songoda.epicbosses.utils.version.VersionHandler;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.File;
@ -22,7 +24,7 @@ public class DropTableFileManager implements ILoadable, ISavable, IReloadable {
private DropTableFileHandler dropTableFileHandler;
public DropTableFileManager(JavaPlugin javaPlugin) {
File file = new File(javaPlugin.getDataFolder(), "droptables.json");
File file = new File(javaPlugin.getDataFolder(), new VersionHandler().getVersion().isHigherThanOrEqualTo(Versions.v1_13_R1) ? "current" : "legacy" + "/droptables.json");
this.dropTableFileHandler = new DropTableFileHandler(javaPlugin, true, file);
}

View File

@ -1,5 +1,7 @@
package com.songoda.epicbosses.managers.files;
import com.songoda.epicbosses.utils.Versions;
import com.songoda.epicbosses.utils.version.VersionHandler;
import lombok.Getter;
import com.songoda.epicbosses.utils.ILoadable;
import com.songoda.epicbosses.utils.IReloadable;
@ -27,7 +29,7 @@ public class ItemsFileManager implements ILoadable, ISavable, IReloadable {
private ItemStackFileHandler itemStackFileHandler;
public ItemsFileManager(JavaPlugin javaPlugin) {
File file = new File(javaPlugin.getDataFolder(), "items.json");
File file = new File(javaPlugin.getDataFolder(), new VersionHandler().getVersion().isHigherThanOrEqualTo(Versions.v1_13_R1) ? "current" : "legacy" + "/items.json");
this.itemStackFileHandler = new ItemStackFileHandler(javaPlugin, file, true);
}

View File

@ -5,6 +5,8 @@ import com.songoda.epicbosses.file.MessagesFileHandler;
import com.songoda.epicbosses.utils.ILoadable;
import com.songoda.epicbosses.utils.IReloadable;
import com.songoda.epicbosses.utils.ISavable;
import com.songoda.epicbosses.utils.Versions;
import com.songoda.epicbosses.utils.version.VersionHandler;
import java.io.File;
import java.util.HashMap;
@ -22,7 +24,7 @@ public class MessagesFileManager implements ILoadable, ISavable, IReloadable {
private MessagesFileHandler messagesFileHandler;
public MessagesFileManager(CustomBosses customBosses) {
File file = new File(customBosses.getDataFolder(), "messages.json");
File file = new File(customBosses.getDataFolder(), new VersionHandler().getVersion().isHigherThanOrEqualTo(Versions.v1_13_R1) ? "current" : "legacy" + "/messages.json");
this.messagesFileHandler = new MessagesFileHandler(customBosses, true, file);
}

View File

@ -7,6 +7,8 @@ import com.songoda.epicbosses.file.MinionsFileHandler;
import com.songoda.epicbosses.utils.ILoadable;
import com.songoda.epicbosses.utils.IReloadable;
import com.songoda.epicbosses.utils.ISavable;
import com.songoda.epicbosses.utils.Versions;
import com.songoda.epicbosses.utils.version.VersionHandler;
import java.io.File;
import java.util.Map;
@ -22,7 +24,7 @@ public class MinionsFileManager implements ILoadable, ISavable, IReloadable {
private MinionsFileHandler minionsFileHandler;
public MinionsFileManager(CustomBosses customBosses) {
File file = new File(customBosses.getDataFolder(), "minions.json");
File file = new File(customBosses.getDataFolder(), new VersionHandler().getVersion().isHigherThanOrEqualTo(Versions.v1_13_R1) ? "current" : "legacy" + "/minions.json");
this.minionsFileHandler = new MinionsFileHandler(customBosses, true, file);
this.minionEntityContainer = customBosses.getMinionEntityContainer();

View File

@ -6,7 +6,8 @@ import com.songoda.epicbosses.skills.Skill;
import com.songoda.epicbosses.utils.ILoadable;
import com.songoda.epicbosses.utils.IReloadable;
import com.songoda.epicbosses.utils.ISavable;
import lombok.var;
import com.songoda.epicbosses.utils.Versions;
import com.songoda.epicbosses.utils.version.VersionHandler;
import java.io.File;
import java.util.HashMap;
@ -23,7 +24,7 @@ public class SkillsFileManager implements ILoadable, IReloadable, ISavable {
private SkillsFileHandler skillsFileHandler;
public SkillsFileManager(CustomBosses plugin) {
File file = new File(plugin.getDataFolder(), "skills.json");
File file = new File(plugin.getDataFolder(), new VersionHandler().getVersion().isHigherThanOrEqualTo(Versions.v1_13_R1) ? "current" : "legacy" + "/skills.json");
this.skillsFileHandler = new SkillsFileHandler(plugin, true, file);
}

View File

@ -199,15 +199,14 @@
<resource>
<directory>resources-json</directory>
<includes>
<include>*.json</include>
<include>**/*.json</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>resources-yml</directory>
<includes>
<include>*.yml</include>
<include>*.csv</include>
<include>**/*.yml</include>
</includes>
<filtering>true</filtering>
</resource>