- Added SongodaCore
- Removed Lombok - Redid worldguard system - Removed a lot of useless/unused code. - Added compatibility with PlayerPoints and The Reserve.
This commit is contained in:
parent
1b7be6cfc0
commit
6135f9c257
|
@ -1,42 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>EpicBosses</artifactId>
|
||||
<groupId>com.songoda.epicbosses</groupId>
|
||||
<version>maven-version-number</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>WorldGuard-Legacy</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.12.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.songoda.epicbosses</groupId>
|
||||
<artifactId>WorldGuardHelper</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sk89q</groupId>
|
||||
<artifactId>worldedit</artifactId>
|
||||
<version>6.1.9</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sk89q</groupId>
|
||||
<artifactId>worldguard</artifactId>
|
||||
<version>6.2.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -1,122 +0,0 @@
|
|||
package com.songoda.epicbosses.utils.dependencies;
|
||||
|
||||
import com.sk89q.worldguard.bukkit.WGBukkit;
|
||||
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
|
||||
import com.sk89q.worldguard.protection.ApplicableRegionSet;
|
||||
import com.sk89q.worldguard.protection.flags.DefaultFlag;
|
||||
import com.sk89q.worldguard.protection.flags.StateFlag;
|
||||
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
|
||||
import com.songoda.epicbosses.utils.IWorldGuardHelper;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 16-Oct-18
|
||||
*/
|
||||
public class WorldGuardLegacyHelper implements IWorldGuardHelper {
|
||||
|
||||
private WorldGuardPlugin worldGuard;
|
||||
|
||||
@Override
|
||||
public boolean isPvpAllowed(Location loc) {
|
||||
if(Bukkit.getServer().getPluginManager().getPlugin("WorldGuard") != null) {
|
||||
if(worldGuard == null) {
|
||||
this.worldGuard = WGBukkit.getPlugin();
|
||||
}
|
||||
ApplicableRegionSet applicableRegionSet = this.worldGuard.getRegionManager(loc.getWorld()).getApplicableRegions(loc);
|
||||
StateFlag.State state = applicableRegionSet.queryState(null, DefaultFlag.PVP);
|
||||
|
||||
return state != StateFlag.State.DENY;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBreakAllowed(Location loc) {
|
||||
if(Bukkit.getServer().getPluginManager().getPlugin("WorldGuard") != null) {
|
||||
if(worldGuard == null) {
|
||||
this.worldGuard = WGBukkit.getPlugin();
|
||||
}
|
||||
|
||||
ApplicableRegionSet applicableRegionSet = this.worldGuard.getRegionManager(loc.getWorld()).getApplicableRegions(loc);
|
||||
StateFlag.State state = applicableRegionSet.queryState(null, DefaultFlag.BLOCK_BREAK);
|
||||
|
||||
return state != StateFlag.State.DENY;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExplosionsAllowed(Location loc) {
|
||||
if(Bukkit.getServer().getPluginManager().getPlugin("WorldGuard") != null) {
|
||||
if(worldGuard == null) {
|
||||
this.worldGuard = WGBukkit.getPlugin();
|
||||
}
|
||||
|
||||
ApplicableRegionSet applicableRegionSet = this.worldGuard.getRegionManager(loc.getWorld()).getApplicableRegions(loc);
|
||||
StateFlag.State state = applicableRegionSet.queryState(null, DefaultFlag.OTHER_EXPLOSION);
|
||||
|
||||
return state != StateFlag.State.DENY;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getRegionNames(Location loc) {
|
||||
if(Bukkit.getServer().getPluginManager().getPlugin("WorldGuard") != null) {
|
||||
if(worldGuard == null) {
|
||||
this.worldGuard = WGBukkit.getPlugin();
|
||||
}
|
||||
|
||||
List<String> regions = new ArrayList<>();
|
||||
List<String> parentNames = new ArrayList<>();
|
||||
// this prototype is different from v5 to v6, but they're both Iterable
|
||||
Iterable<ProtectedRegion> set = (Iterable<ProtectedRegion>) this.worldGuard.getRegionManager(loc.getWorld()).getApplicableRegions(loc);
|
||||
|
||||
for (ProtectedRegion region : set) {
|
||||
String id = region.getId();
|
||||
|
||||
regions.add(id);
|
||||
|
||||
ProtectedRegion parent = region.getParent();
|
||||
|
||||
while (parent != null) {
|
||||
parentNames.add(parent.getId());
|
||||
parent = parent.getParent();
|
||||
}
|
||||
}
|
||||
|
||||
for (String name : parentNames) {
|
||||
regions.remove(name);
|
||||
}
|
||||
|
||||
return regions;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMobSpawningAllowed(Location loc) {
|
||||
if(Bukkit.getServer().getPluginManager().getPlugin("WorldGuard") != null) {
|
||||
if(worldGuard == null) {
|
||||
this.worldGuard = WGBukkit.getPlugin();
|
||||
}
|
||||
|
||||
ApplicableRegionSet applicableRegionSet = this.worldGuard.getRegionManager(loc.getWorld()).getApplicableRegions(loc);
|
||||
StateFlag.State state = applicableRegionSet.queryState(null, DefaultFlag.MOB_SPAWNING);
|
||||
|
||||
return state != StateFlag.State.DENY;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>EpicBosses</artifactId>
|
||||
<groupId>com.songoda.epicbosses</groupId>
|
||||
<version>maven-version-number</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>WorldGuard</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.14.4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.songoda.epicbosses</groupId>
|
||||
<artifactId>WorldGuardHelper</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sk89q</groupId>
|
||||
<artifactId>worldedit</artifactId>
|
||||
<version>7.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sk89q</groupId>
|
||||
<artifactId>worldguard</artifactId>
|
||||
<version>7.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -1,134 +0,0 @@
|
|||
package com.songoda.epicbosses.utils.dependencies;
|
||||
|
||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldguard.WorldGuard;
|
||||
import com.sk89q.worldguard.protection.ApplicableRegionSet;
|
||||
import com.sk89q.worldguard.protection.flags.Flags;
|
||||
import com.sk89q.worldguard.protection.flags.StateFlag;
|
||||
import com.sk89q.worldguard.protection.managers.RegionManager;
|
||||
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
|
||||
import com.sk89q.worldguard.protection.regions.RegionQuery;
|
||||
import com.songoda.epicbosses.utils.IWorldGuardHelper;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 16-Oct-18
|
||||
*/
|
||||
public class WorldGuardHelper implements IWorldGuardHelper {
|
||||
|
||||
private WorldGuard worldGuard;
|
||||
|
||||
@Override
|
||||
public boolean isPvpAllowed(Location loc) {
|
||||
if(Bukkit.getServer().getPluginManager().getPlugin("WorldGuard") != null) {
|
||||
if(worldGuard == null) {
|
||||
this.worldGuard = WorldGuard.getInstance();
|
||||
}
|
||||
|
||||
RegionQuery regionQuery = this.worldGuard.getPlatform().getRegionContainer().createQuery();
|
||||
ApplicableRegionSet applicableRegionSet = regionQuery.getApplicableRegions(BukkitAdapter.adapt(loc));
|
||||
StateFlag.State state = applicableRegionSet.queryState(null, Flags.PVP);
|
||||
|
||||
return state != StateFlag.State.DENY;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBreakAllowed(Location loc) {
|
||||
if(Bukkit.getServer().getPluginManager().getPlugin("WorldGuard") != null) {
|
||||
if(worldGuard == null) {
|
||||
this.worldGuard = WorldGuard.getInstance();
|
||||
}
|
||||
|
||||
RegionQuery regionQuery = this.worldGuard.getPlatform().getRegionContainer().createQuery();
|
||||
ApplicableRegionSet applicableRegionSet = regionQuery.getApplicableRegions(BukkitAdapter.adapt(loc));
|
||||
StateFlag.State state = applicableRegionSet.queryState(null, Flags.BLOCK_BREAK);
|
||||
|
||||
return state != StateFlag.State.DENY;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExplosionsAllowed(Location loc) {
|
||||
if(Bukkit.getServer().getPluginManager().getPlugin("WorldGuard") != null) {
|
||||
if(worldGuard == null) {
|
||||
this.worldGuard = WorldGuard.getInstance();
|
||||
}
|
||||
|
||||
RegionQuery regionQuery = this.worldGuard.getPlatform().getRegionContainer().createQuery();
|
||||
ApplicableRegionSet applicableRegionSet = regionQuery.getApplicableRegions(BukkitAdapter.adapt(loc));
|
||||
StateFlag.State state = applicableRegionSet.queryState(null, Flags.OTHER_EXPLOSION);
|
||||
|
||||
return state != StateFlag.State.DENY;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getRegionNames(Location loc) {
|
||||
if(Bukkit.getServer().getPluginManager().getPlugin("WorldGuard") != null) {
|
||||
if (worldGuard == null) {
|
||||
this.worldGuard = WorldGuard.getInstance();
|
||||
}
|
||||
|
||||
List<String> regions = new ArrayList<>();
|
||||
List<String> parentNames = new ArrayList<>();
|
||||
World world = BukkitAdapter.adapt(loc.getWorld());
|
||||
RegionManager regionManager = this.worldGuard.getPlatform().getRegionContainer().get(world);
|
||||
|
||||
if (regionManager == null) return null;
|
||||
|
||||
ApplicableRegionSet set = regionManager.getApplicableRegions(BukkitAdapter.asBlockVector(loc));
|
||||
|
||||
for (ProtectedRegion region : set) {
|
||||
String id = region.getId();
|
||||
|
||||
regions.add(id);
|
||||
|
||||
ProtectedRegion parent = region.getParent();
|
||||
|
||||
while (parent != null) {
|
||||
parentNames.add(parent.getId());
|
||||
parent = parent.getParent();
|
||||
}
|
||||
}
|
||||
|
||||
for (String name : parentNames) {
|
||||
regions.remove(name);
|
||||
}
|
||||
|
||||
return regions;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMobSpawningAllowed(Location loc) {
|
||||
if(Bukkit.getServer().getPluginManager().getPlugin("WorldGuard") != null) {
|
||||
if(worldGuard == null) {
|
||||
this.worldGuard = WorldGuard.getInstance();
|
||||
}
|
||||
|
||||
RegionQuery regionQuery = this.worldGuard.getPlatform().getRegionContainer().createQuery();
|
||||
ApplicableRegionSet applicableRegionSet = regionQuery.getApplicableRegions(BukkitAdapter.adapt(loc));
|
||||
StateFlag.State state = applicableRegionSet.queryState(null, Flags.MOB_SPAWNING);
|
||||
|
||||
return state != StateFlag.State.DENY;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -20,6 +20,12 @@
|
|||
<version>1.14.4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore</artifactId>
|
||||
<version>LATEST</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>FactionHelper</artifactId>
|
||||
|
@ -50,24 +56,6 @@
|
|||
<version>${project.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>WorldGuardHelper</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>WorldGuard</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>WorldGuard-Legacy</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -89,8 +77,8 @@
|
|||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>org.bstats</pattern>
|
||||
<shadedPattern>com.songoda.epicbosses.utils.bstats</shadedPattern>
|
||||
<pattern>com.songoda.core</pattern>
|
||||
<shadedPattern>com.songoda.epicbosses.core</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>utils.factions</pattern>
|
||||
|
@ -107,24 +95,6 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!--<plugin>-->
|
||||
<!--<groupId>org.apache.maven.plugins</groupId>-->
|
||||
<!--<artifactId>maven-antrun-plugin</artifactId>-->
|
||||
<!--<version>1.8</version>-->
|
||||
<!--<executions>-->
|
||||
<!--<execution>-->
|
||||
<!--<phase>install</phase>-->
|
||||
<!--<configuration>-->
|
||||
<!--<target>-->
|
||||
<!--<copy file="target/${build.finalName}.jar" tofile="D:/Servers/1.13.2/plugins/${build.finalName}.jar"/>-->
|
||||
<!--</target>-->
|
||||
<!--</configuration>-->
|
||||
<!--<goals>-->
|
||||
<!--<goal>run</goal>-->
|
||||
<!--</goals>-->
|
||||
<!--</execution>-->
|
||||
<!--</executions>-->
|
||||
<!--</plugin>-->
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"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
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,77 +0,0 @@
|
|||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
"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."
|
||||
]
|
||||
}
|
|
@ -1,158 +0,0 @@
|
|||
{
|
||||
"SkeletonTableGive": {
|
||||
"dropType": "GIVE",
|
||||
"rewards": {
|
||||
"giveRewards": {
|
||||
"1": {
|
||||
"1": {
|
||||
"items": {
|
||||
"SKMainHand": 15.0,
|
||||
"SKOffHand": 15.0,
|
||||
"SKHelmet": 15.0,
|
||||
"SKLeggings": 30.0,
|
||||
"SKChestplate": 30.0,
|
||||
"SKBoots": 30.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
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
{
|
||||
"DefaultAutoSpawnListItem": {
|
||||
"type": "GRASS",
|
||||
"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": "MONSTER_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": "WOOD_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": "GOLD_PLATE",
|
||||
"name": "&c&lSelected Default Drop Table Menu Item"
|
||||
},
|
||||
"DefaultSkillMenuItem": {
|
||||
"type": "BLAZE_POWDER",
|
||||
"name": "&c&lDefault Skill Menu Item"
|
||||
},
|
||||
"DefaultBossListEditorMenuItem": {
|
||||
"type": "MONSTER_EGG",
|
||||
"name": "&c&lDefault Boss List Editor Menu Item"
|
||||
},
|
||||
"SKSpawnItem": {
|
||||
"type": "MONSTER_EGG",
|
||||
"durability": 51,
|
||||
"name": "&6&lSkeleton King Boss Spawn Egg",
|
||||
"lore": [
|
||||
"&7Right click a block to spawn",
|
||||
"&7the boss as that location."
|
||||
]
|
||||
},
|
||||
"SKHelmet": {
|
||||
"type": "GOLD_HELMET",
|
||||
"enchants": [ "protection:4", "unbreaking:3" ]
|
||||
},
|
||||
"SKChestplate": {
|
||||
"type": "GOLD_CHESTPLATE",
|
||||
"enchants": [ "protection:4", "unbreaking:3" ]
|
||||
},
|
||||
"SKLeggings": {
|
||||
"type": "GOLD_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": "STICK"
|
||||
},
|
||||
"SKCustomDrop1": {
|
||||
"type": "STONE",
|
||||
"name": "&5Skeleton King Stone",
|
||||
"lore": [
|
||||
"&7This stone will bring you",
|
||||
"&7great luck in battle."
|
||||
]
|
||||
}
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
{
|
||||
"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 than 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!"
|
||||
]
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -1,196 +0,0 @@
|
|||
{
|
||||
"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_FENCE",
|
||||
"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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,39 +1,3 @@
|
|||
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:
|
|
@ -956,7 +956,7 @@ TargetingPanel:
|
|||
- '&7'
|
||||
- '&7The default boss target range is'
|
||||
- '&f50 blocks&7. However this can be'
|
||||
- '&7adjusted in the config.yml.'
|
||||
- '&7adjusted in the display.yml.'
|
||||
'27':
|
||||
type: PAPER
|
||||
name: '&e&lGo Back'
|
|
@ -1,259 +0,0 @@
|
|||
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}'
|
File diff suppressed because it is too large
Load Diff
|
@ -1,244 +0,0 @@
|
|||
package com.songoda.epicbosses;
|
||||
|
||||
import com.songoda.epicbosses.container.MinionEntityContainer;
|
||||
import com.songoda.epicbosses.utils.*;
|
||||
import com.songoda.epicbosses.utils.dependencies.HolographicDisplayHelper;
|
||||
import com.songoda.epicbosses.utils.dependencies.VaultHelper;
|
||||
import lombok.Getter;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.commands.BossCmd;
|
||||
import com.songoda.epicbosses.container.BossEntityContainer;
|
||||
import com.songoda.epicbosses.file.ConfigFileHandler;
|
||||
import com.songoda.epicbosses.file.EditorFileHandler;
|
||||
import com.songoda.epicbosses.file.LangFileHandler;
|
||||
import com.songoda.epicbosses.managers.*;
|
||||
import com.songoda.epicbosses.managers.files.*;
|
||||
import com.songoda.epicbosses.utils.file.YmlFileHandler;
|
||||
import com.songoda.epicbosses.utils.version.VersionHandler;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
/**
|
||||
* @author AMinecraftDev
|
||||
* @version 1.0.0
|
||||
* @since 06-Sep-17
|
||||
*/
|
||||
public class CustomBosses extends JavaPlugin implements IReloadable {
|
||||
|
||||
private static CustomBosses instance;
|
||||
|
||||
@Getter private MessagesFileManager bossMessagesFileManager;
|
||||
@Getter private CommandsFileManager bossCommandFileManager;
|
||||
@Getter private AutoSpawnFileManager autoSpawnFileManager;
|
||||
@Getter private DropTableFileManager dropTableFileManager;
|
||||
@Getter private MinionsFileManager minionsFileManager;
|
||||
@Getter private BossesFileManager bossesFileManager;
|
||||
@Getter private SkillsFileManager skillsFileManager;
|
||||
@Getter private ItemsFileManager itemStackManager;
|
||||
|
||||
@Getter private BossDropTableManager bossDropTableManager;
|
||||
@Getter private BossEntityContainer bossEntityContainer;
|
||||
@Getter private BossMechanicManager bossMechanicManager;
|
||||
@Getter private BossLocationManager bossLocationManager;
|
||||
@Getter private BossListenerManager bossListenerManager;
|
||||
@Getter private BossCommandManager bossCommandManager;
|
||||
@Getter private BossEntityManager bossEntityManager;
|
||||
@Getter private BossTargetManager bossTargetManager;
|
||||
@Getter private BossPanelManager bossPanelManager;
|
||||
@Getter private BossSkillManager bossSkillManager;
|
||||
@Getter private BossTauntManager bossTauntManager;
|
||||
@Getter private BossHookManager bossHookManager;
|
||||
|
||||
@Getter private AutoSpawnManager autoSpawnManager;
|
||||
@Getter private PlaceholderManager placeholderManager;
|
||||
|
||||
@Getter private MinionMechanicManager minionMechanicManager;
|
||||
@Getter private MinionEntityContainer minionEntityContainer;
|
||||
|
||||
@Getter private VersionHandler versionHandler = new VersionHandler();
|
||||
@Getter private DebugManager debugManager = new DebugManager();
|
||||
|
||||
@Getter private YmlFileHandler langFileHandler, editorFileHandler, configFileHandler;
|
||||
@Getter private FileConfiguration lang, editor, config;
|
||||
|
||||
@Getter private HolographicDisplayHelper holographicDisplayHelper;
|
||||
@Getter private VaultHelper vaultHelper;
|
||||
|
||||
@Getter private boolean debug = true;
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
ConsoleCommandSender console = Bukkit.getConsoleSender();
|
||||
|
||||
console.sendMessage(StringUtils.get().translateColor("&a============================="));
|
||||
console.sendMessage(StringUtils.get().translateColor("&7EpicBosses " + getDescription().getVersion() + " by &5Songoda <3&7!"));
|
||||
console.sendMessage(StringUtils.get().translateColor("&7Action: &aDisabling&7..."));
|
||||
|
||||
this.autoSpawnManager.stopIntervalSystems();
|
||||
this.bossEntityManager.killAllHolders((World) null);
|
||||
|
||||
console.sendMessage(StringUtils.get().translateColor("&a============================="));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
ConsoleCommandSender console = Bukkit.getConsoleSender();
|
||||
|
||||
console.sendMessage(StringUtils.get().translateColor("&a============================="));
|
||||
console.sendMessage(StringUtils.get().translateColor("&7EpicBosses " + getDescription().getVersion() + " by &5Songoda <3&7!"));
|
||||
console.sendMessage(StringUtils.get().translateColor("&7Action: &aEnabling&7..."));
|
||||
|
||||
if (!this.getDataFolder().exists())
|
||||
this.getDataFolder().mkdir();
|
||||
|
||||
Debug.setPlugin(this);
|
||||
|
||||
instance = this;
|
||||
|
||||
this.vaultHelper = new VaultHelper();
|
||||
this.holographicDisplayHelper = new HolographicDisplayHelper();
|
||||
|
||||
long beginMs = System.currentTimeMillis();
|
||||
|
||||
if(!this.vaultHelper.isConnected()) {
|
||||
Debug.FAILED_TO_CONNECT_TO_VAULT.debug();
|
||||
Bukkit.getPluginManager().disablePlugin(this);
|
||||
return;
|
||||
}
|
||||
|
||||
new BossAPI(this);
|
||||
new Metrics(this);
|
||||
new ServerUtils(this);
|
||||
|
||||
this.bossSkillManager = new BossSkillManager(this);
|
||||
this.bossHookManager = new BossHookManager(this);
|
||||
this.bossTauntManager = new BossTauntManager(this);
|
||||
this.bossTargetManager = new BossTargetManager(this);
|
||||
this.bossEntityContainer = new BossEntityContainer();
|
||||
this.minionEntityContainer = new MinionEntityContainer();
|
||||
this.bossMechanicManager = new BossMechanicManager(this);
|
||||
this.minionMechanicManager = new MinionMechanicManager(this);
|
||||
this.bossLocationManager = new BossLocationManager(this);
|
||||
|
||||
loadFileManagersAndHandlers();
|
||||
|
||||
//Managers that rely on Files
|
||||
this.bossDropTableManager = new BossDropTableManager(this);
|
||||
this.bossPanelManager = new BossPanelManager(this);
|
||||
this.bossEntityManager = new BossEntityManager(this);
|
||||
|
||||
this.autoSpawnManager = new AutoSpawnManager(this);
|
||||
|
||||
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
|
||||
this.placeholderManager = new PlaceholderManager(this);
|
||||
this.placeholderManager.register();
|
||||
}
|
||||
|
||||
createFiles();
|
||||
reloadFiles();
|
||||
|
||||
this.debug = getConfig().getBoolean("Settings.debug", false);
|
||||
|
||||
this.itemStackManager.reload();
|
||||
this.bossesFileManager.reload();
|
||||
this.minionsFileManager.reload();
|
||||
this.skillsFileManager.reload();
|
||||
this.bossCommandFileManager.reload();
|
||||
this.bossMessagesFileManager.reload();
|
||||
this.dropTableFileManager.reload();
|
||||
this.autoSpawnFileManager.reload();
|
||||
|
||||
this.bossCommandManager = new BossCommandManager(new BossCmd(), this);
|
||||
this.bossListenerManager = new BossListenerManager(this);
|
||||
|
||||
this.bossPanelManager.load();
|
||||
|
||||
//RELOAD/LOAD ALL MANAGERS
|
||||
this.bossSkillManager.load();
|
||||
this.bossHookManager.reload();
|
||||
this.bossLocationManager.reload();
|
||||
this.bossMechanicManager.load();
|
||||
this.minionMechanicManager.load();
|
||||
|
||||
saveMessagesToFile();
|
||||
|
||||
this.bossCommandManager.load();
|
||||
this.bossListenerManager.load();
|
||||
|
||||
this.autoSpawnManager.startIntervalSystems();
|
||||
|
||||
ServerUtils.get().logDebug("Loaded all fields and managers, saved messages and plugin is initialized and ready to go. (took " + (System.currentTimeMillis() - beginMs) + "ms).");
|
||||
console.sendMessage(StringUtils.get().translateColor("&a============================="));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
this.itemStackManager.reload();
|
||||
this.bossesFileManager.reload();
|
||||
this.minionsFileManager.reload();
|
||||
this.skillsFileManager.reload();
|
||||
this.bossCommandFileManager.reload();
|
||||
this.bossMessagesFileManager.reload();
|
||||
this.dropTableFileManager.reload();
|
||||
this.autoSpawnFileManager.reload();
|
||||
|
||||
this.bossMechanicManager.load();
|
||||
|
||||
reloadFiles();
|
||||
|
||||
this.bossPanelManager.reload();
|
||||
this.bossHookManager.reload();
|
||||
this.bossLocationManager.reload();
|
||||
this.debug = getConfig().getBoolean("Settings.debug", false);
|
||||
|
||||
Message.setFile(getLang());
|
||||
}
|
||||
|
||||
private void loadFileManagersAndHandlers() {
|
||||
this.itemStackManager = new ItemsFileManager(this);
|
||||
this.bossesFileManager = new BossesFileManager(this);
|
||||
this.minionsFileManager = new MinionsFileManager(this);
|
||||
this.bossCommandFileManager = new CommandsFileManager(this);
|
||||
this.bossMessagesFileManager = new MessagesFileManager(this);
|
||||
this.dropTableFileManager = new DropTableFileManager(this);
|
||||
this.skillsFileManager = new SkillsFileManager(this);
|
||||
this.autoSpawnFileManager = new AutoSpawnFileManager(this);
|
||||
|
||||
this.langFileHandler = new LangFileHandler(this);
|
||||
this.editorFileHandler = new EditorFileHandler(this);
|
||||
this.configFileHandler = new ConfigFileHandler(this);
|
||||
}
|
||||
|
||||
private void reloadFiles() {
|
||||
this.lang = this.langFileHandler.loadFile();
|
||||
this.editor = this.editorFileHandler.loadFile();
|
||||
this.config = this.configFileHandler.loadFile();
|
||||
}
|
||||
|
||||
private void createFiles() {
|
||||
this.editorFileHandler.createFile();
|
||||
this.langFileHandler.createFile();
|
||||
this.configFileHandler.createFile();
|
||||
}
|
||||
|
||||
private void saveMessagesToFile() {
|
||||
FileConfiguration lang = getLang();
|
||||
|
||||
for(Message message : Message.values()) {
|
||||
if(!lang.contains(message.getPath())) {
|
||||
lang.set(message.getPath(), message.getDefault());
|
||||
}
|
||||
}
|
||||
|
||||
this.langFileHandler.saveFile(lang);
|
||||
Message.setFile(lang);
|
||||
}
|
||||
|
||||
public static CustomBosses get() {
|
||||
return instance;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,384 @@
|
|||
package com.songoda.epicbosses;
|
||||
|
||||
import com.songoda.core.SongodaCore;
|
||||
import com.songoda.core.SongodaPlugin;
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.core.configuration.Config;
|
||||
import com.songoda.core.hooks.EconomyManager;
|
||||
import com.songoda.core.hooks.WorldGuardHook;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.commands.BossCmd;
|
||||
import com.songoda.epicbosses.container.BossEntityContainer;
|
||||
import com.songoda.epicbosses.container.MinionEntityContainer;
|
||||
import com.songoda.epicbosses.file.DisplayFileHandler;
|
||||
import com.songoda.epicbosses.file.EditorFileHandler;
|
||||
import com.songoda.epicbosses.file.LangFileHandler;
|
||||
import com.songoda.epicbosses.managers.*;
|
||||
import com.songoda.epicbosses.managers.files.*;
|
||||
import com.songoda.epicbosses.settings.Settings;
|
||||
import com.songoda.epicbosses.utils.Debug;
|
||||
import com.songoda.epicbosses.utils.IReloadable;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import com.songoda.epicbosses.utils.file.YmlFileHandler;
|
||||
import com.songoda.epicbosses.utils.version.VersionHandler;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author AMinecraftDev
|
||||
* @version 1.0.0
|
||||
* @since 06-Sep-17
|
||||
*/
|
||||
public class EpicBosses extends SongodaPlugin implements IReloadable {
|
||||
|
||||
private static EpicBosses INSTANCE;
|
||||
|
||||
private MessagesFileManager bossMessagesFileManager;
|
||||
private CommandsFileManager bossCommandFileManager;
|
||||
private AutoSpawnFileManager autoSpawnFileManager;
|
||||
private DropTableFileManager dropTableFileManager;
|
||||
private MinionsFileManager minionsFileManager;
|
||||
private BossesFileManager bossesFileManager;
|
||||
private SkillsFileManager skillsFileManager;
|
||||
private ItemsFileManager itemStackManager;
|
||||
|
||||
private BossDropTableManager bossDropTableManager;
|
||||
private BossEntityContainer bossEntityContainer;
|
||||
private BossMechanicManager bossMechanicManager;
|
||||
private BossLocationManager bossLocationManager;
|
||||
private BossListenerManager bossListenerManager;
|
||||
private BossCommandManager bossCommandManager;
|
||||
private BossEntityManager bossEntityManager;
|
||||
private BossTargetManager bossTargetManager;
|
||||
private BossPanelManager bossPanelManager;
|
||||
private BossSkillManager bossSkillManager;
|
||||
private BossTauntManager bossTauntManager;
|
||||
private BossHookManager bossHookManager;
|
||||
|
||||
private AutoSpawnManager autoSpawnManager;
|
||||
private PlaceholderManager placeholderManager;
|
||||
|
||||
private MinionMechanicManager minionMechanicManager;
|
||||
private MinionEntityContainer minionEntityContainer;
|
||||
|
||||
private VersionHandler versionHandler = new VersionHandler();
|
||||
private DebugManager debugManager = new DebugManager();
|
||||
|
||||
private YmlFileHandler langFileHandler, editorFileHandler, displayFileHandler;
|
||||
private FileConfiguration lang, editor, display;
|
||||
|
||||
private boolean debug = true;
|
||||
|
||||
@Override
|
||||
public void onPluginLoad() {
|
||||
INSTANCE = this;
|
||||
|
||||
// Register WorldGuard
|
||||
WorldGuardHook.addHook("boss-spawn-region", true);
|
||||
WorldGuardHook.addHook("boss-blocked-region", false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPluginDisable() {
|
||||
this.autoSpawnManager.stopIntervalSystems();
|
||||
this.bossEntityManager.killAllHolders((World) null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPluginEnable() {
|
||||
// Run Songoda Updater
|
||||
SongodaCore.registerPlugin(this, 19, CompatibleMaterial.ZOMBIE_SPAWN_EGG);
|
||||
|
||||
// Load Economy
|
||||
EconomyManager.load();
|
||||
|
||||
// Setup Config
|
||||
Settings.setupConfig();
|
||||
|
||||
// Set economy preference
|
||||
EconomyManager.getManager().setPreferredHook(Settings.ECONOMY_PLUGIN.getString());
|
||||
|
||||
if (!this.getDataFolder().exists())
|
||||
this.getDataFolder().mkdir();
|
||||
|
||||
Debug.setPlugin(this);
|
||||
|
||||
long beginMs = System.currentTimeMillis();
|
||||
|
||||
new BossAPI(this);
|
||||
new ServerUtils(this);
|
||||
|
||||
this.bossSkillManager = new BossSkillManager(this);
|
||||
this.bossHookManager = new BossHookManager(this);
|
||||
this.bossTauntManager = new BossTauntManager(this);
|
||||
this.bossTargetManager = new BossTargetManager(this);
|
||||
this.bossEntityContainer = new BossEntityContainer();
|
||||
this.minionEntityContainer = new MinionEntityContainer();
|
||||
this.bossMechanicManager = new BossMechanicManager(this);
|
||||
this.minionMechanicManager = new MinionMechanicManager(this);
|
||||
this.bossLocationManager = new BossLocationManager(this);
|
||||
|
||||
loadFileManagersAndHandlers();
|
||||
|
||||
//Managers that rely on Files
|
||||
this.bossDropTableManager = new BossDropTableManager(this);
|
||||
this.bossPanelManager = new BossPanelManager(this);
|
||||
this.bossEntityManager = new BossEntityManager(this);
|
||||
|
||||
this.autoSpawnManager = new AutoSpawnManager(this);
|
||||
|
||||
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
|
||||
this.placeholderManager = new PlaceholderManager(this);
|
||||
this.placeholderManager.register();
|
||||
}
|
||||
|
||||
createFiles();
|
||||
reloadFiles();
|
||||
|
||||
this.debug = getConfig().getBoolean("Settings.debug", false);
|
||||
|
||||
this.itemStackManager.reload();
|
||||
this.bossesFileManager.reload();
|
||||
this.minionsFileManager.reload();
|
||||
this.skillsFileManager.reload();
|
||||
this.bossCommandFileManager.reload();
|
||||
this.bossMessagesFileManager.reload();
|
||||
this.dropTableFileManager.reload();
|
||||
this.autoSpawnFileManager.reload();
|
||||
|
||||
this.bossCommandManager = new BossCommandManager(new BossCmd(), this);
|
||||
this.bossListenerManager = new BossListenerManager(this);
|
||||
|
||||
this.bossPanelManager.load();
|
||||
|
||||
//RELOAD/LOAD ALL MANAGERS
|
||||
this.bossSkillManager.load();
|
||||
this.bossHookManager.reload();
|
||||
this.bossLocationManager.reload();
|
||||
this.bossMechanicManager.load();
|
||||
this.minionMechanicManager.load();
|
||||
|
||||
saveMessagesToFile();
|
||||
|
||||
this.bossCommandManager.load();
|
||||
this.bossListenerManager.load();
|
||||
|
||||
this.autoSpawnManager.startIntervalSystems();
|
||||
|
||||
ServerUtils.get().logDebug("Loaded all fields and managers, saved messages and plugin is initialized and ready to go. (took " + (System.currentTimeMillis() - beginMs) + "ms).");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Config> getExtraConfig() {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigReload() {
|
||||
this.itemStackManager.reload();
|
||||
this.bossesFileManager.reload();
|
||||
this.minionsFileManager.reload();
|
||||
this.skillsFileManager.reload();
|
||||
this.bossCommandFileManager.reload();
|
||||
this.bossMessagesFileManager.reload();
|
||||
this.dropTableFileManager.reload();
|
||||
this.autoSpawnFileManager.reload();
|
||||
|
||||
this.bossMechanicManager.load();
|
||||
|
||||
reloadFiles();
|
||||
|
||||
this.bossPanelManager.reload();
|
||||
this.bossHookManager.reload();
|
||||
this.bossLocationManager.reload();
|
||||
this.debug = getConfig().getBoolean("Settings.debug", false);
|
||||
|
||||
Message.setFile(getLang());
|
||||
}
|
||||
|
||||
private void loadFileManagersAndHandlers() {
|
||||
this.itemStackManager = new ItemsFileManager(this);
|
||||
this.bossesFileManager = new BossesFileManager(this);
|
||||
this.minionsFileManager = new MinionsFileManager(this);
|
||||
this.bossCommandFileManager = new CommandsFileManager(this);
|
||||
this.bossMessagesFileManager = new MessagesFileManager(this);
|
||||
this.dropTableFileManager = new DropTableFileManager(this);
|
||||
this.skillsFileManager = new SkillsFileManager(this);
|
||||
this.autoSpawnFileManager = new AutoSpawnFileManager(this);
|
||||
|
||||
this.langFileHandler = new LangFileHandler(this);
|
||||
this.editorFileHandler = new EditorFileHandler(this);
|
||||
this.displayFileHandler = new DisplayFileHandler(this);
|
||||
}
|
||||
|
||||
private void reloadFiles() {
|
||||
this.lang = this.langFileHandler.loadFile();
|
||||
this.editor = this.editorFileHandler.loadFile();
|
||||
this.display = this.displayFileHandler.loadFile();
|
||||
}
|
||||
|
||||
private void createFiles() {
|
||||
this.editorFileHandler.createFile();
|
||||
this.langFileHandler.createFile();
|
||||
this.displayFileHandler.createFile();
|
||||
}
|
||||
|
||||
private void saveMessagesToFile() {
|
||||
FileConfiguration lang = getLang();
|
||||
|
||||
for (Message message : Message.values()) {
|
||||
if (!lang.contains(message.getPath())) {
|
||||
lang.set(message.getPath(), message.getDefault());
|
||||
}
|
||||
}
|
||||
|
||||
this.langFileHandler.saveFile(lang);
|
||||
Message.setFile(lang);
|
||||
}
|
||||
|
||||
public static EpicBosses getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
public MessagesFileManager getBossMessagesFileManager() {
|
||||
return this.bossMessagesFileManager;
|
||||
}
|
||||
|
||||
public CommandsFileManager getBossCommandFileManager() {
|
||||
return this.bossCommandFileManager;
|
||||
}
|
||||
|
||||
public AutoSpawnFileManager getAutoSpawnFileManager() {
|
||||
return this.autoSpawnFileManager;
|
||||
}
|
||||
|
||||
public DropTableFileManager getDropTableFileManager() {
|
||||
return this.dropTableFileManager;
|
||||
}
|
||||
|
||||
public MinionsFileManager getMinionsFileManager() {
|
||||
return this.minionsFileManager;
|
||||
}
|
||||
|
||||
public BossesFileManager getBossesFileManager() {
|
||||
return this.bossesFileManager;
|
||||
}
|
||||
|
||||
public SkillsFileManager getSkillsFileManager() {
|
||||
return this.skillsFileManager;
|
||||
}
|
||||
|
||||
public ItemsFileManager getItemStackManager() {
|
||||
return this.itemStackManager;
|
||||
}
|
||||
|
||||
public BossDropTableManager getBossDropTableManager() {
|
||||
return this.bossDropTableManager;
|
||||
}
|
||||
|
||||
public BossEntityContainer getBossEntityContainer() {
|
||||
return this.bossEntityContainer;
|
||||
}
|
||||
|
||||
public BossMechanicManager getBossMechanicManager() {
|
||||
return this.bossMechanicManager;
|
||||
}
|
||||
|
||||
public BossLocationManager getBossLocationManager() {
|
||||
return this.bossLocationManager;
|
||||
}
|
||||
|
||||
public BossListenerManager getBossListenerManager() {
|
||||
return this.bossListenerManager;
|
||||
}
|
||||
|
||||
public BossCommandManager getBossCommandManager() {
|
||||
return this.bossCommandManager;
|
||||
}
|
||||
|
||||
public BossEntityManager getBossEntityManager() {
|
||||
return this.bossEntityManager;
|
||||
}
|
||||
|
||||
public BossTargetManager getBossTargetManager() {
|
||||
return this.bossTargetManager;
|
||||
}
|
||||
|
||||
public BossPanelManager getBossPanelManager() {
|
||||
return this.bossPanelManager;
|
||||
}
|
||||
|
||||
public BossSkillManager getBossSkillManager() {
|
||||
return this.bossSkillManager;
|
||||
}
|
||||
|
||||
public BossTauntManager getBossTauntManager() {
|
||||
return this.bossTauntManager;
|
||||
}
|
||||
|
||||
public BossHookManager getBossHookManager() {
|
||||
return this.bossHookManager;
|
||||
}
|
||||
|
||||
public AutoSpawnManager getAutoSpawnManager() {
|
||||
return this.autoSpawnManager;
|
||||
}
|
||||
|
||||
public PlaceholderManager getPlaceholderManager() {
|
||||
return this.placeholderManager;
|
||||
}
|
||||
|
||||
public MinionMechanicManager getMinionMechanicManager() {
|
||||
return this.minionMechanicManager;
|
||||
}
|
||||
|
||||
public MinionEntityContainer getMinionEntityContainer() {
|
||||
return this.minionEntityContainer;
|
||||
}
|
||||
|
||||
public VersionHandler getVersionHandler() {
|
||||
return this.versionHandler;
|
||||
}
|
||||
|
||||
public DebugManager getDebugManager() {
|
||||
return this.debugManager;
|
||||
}
|
||||
|
||||
public YmlFileHandler getLangFileHandler() {
|
||||
return this.langFileHandler;
|
||||
}
|
||||
|
||||
public YmlFileHandler getEditorFileHandler() {
|
||||
return this.editorFileHandler;
|
||||
}
|
||||
|
||||
public YmlFileHandler getDisplayFileHandler() {
|
||||
return this.displayFileHandler;
|
||||
}
|
||||
|
||||
public FileConfiguration getLang() {
|
||||
return this.lang;
|
||||
}
|
||||
|
||||
public FileConfiguration getEditor() {
|
||||
return this.editor;
|
||||
}
|
||||
|
||||
public FileConfiguration getDisplay() {
|
||||
return this.display;
|
||||
}
|
||||
|
||||
public boolean isDebug() {
|
||||
return this.debug;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
reloadConfig();
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@ package com.songoda.epicbosses.api;
|
|||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.autospawns.AutoSpawn;
|
||||
import com.songoda.epicbosses.autospawns.settings.AutoSpawnSettings;
|
||||
import com.songoda.epicbosses.autospawns.types.IntervalSpawnElement;
|
||||
|
@ -16,13 +16,11 @@ import com.songoda.epicbosses.entity.elements.*;
|
|||
import com.songoda.epicbosses.events.PreBossSpawnEvent;
|
||||
import com.songoda.epicbosses.events.PreBossSpawnItemEvent;
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import com.songoda.epicbosses.holder.ActiveMinionHolder;
|
||||
import com.songoda.epicbosses.managers.files.CommandsFileManager;
|
||||
import com.songoda.epicbosses.managers.files.ItemsFileManager;
|
||||
import com.songoda.epicbosses.managers.files.MessagesFileManager;
|
||||
import com.songoda.epicbosses.skills.CustomSkillHandler;
|
||||
import com.songoda.epicbosses.skills.Skill;
|
||||
import com.songoda.epicbosses.skills.custom.Minions;
|
||||
import com.songoda.epicbosses.skills.elements.CustomMinionSkillElement;
|
||||
import com.songoda.epicbosses.skills.elements.SubCustomSkillElement;
|
||||
import com.songoda.epicbosses.skills.types.CommandSkillElement;
|
||||
|
@ -51,7 +49,7 @@ import java.util.Map;
|
|||
*/
|
||||
public class BossAPI {
|
||||
|
||||
private static CustomBosses PLUGIN;
|
||||
private static EpicBosses PLUGIN;
|
||||
|
||||
/**
|
||||
* Used to update the variable to the
|
||||
|
@ -64,7 +62,7 @@ public class BossAPI {
|
|||
*
|
||||
* @param plugin - the plugin instance.
|
||||
*/
|
||||
public BossAPI(CustomBosses plugin) {
|
||||
public BossAPI(EpicBosses plugin) {
|
||||
if(PLUGIN != null) {
|
||||
Debug.ATTEMPTED_TO_UPDATE_PLUGIN.debug();
|
||||
return;
|
||||
|
|
|
@ -5,8 +5,6 @@ import com.google.gson.annotations.Expose;
|
|||
import com.songoda.epicbosses.autospawns.settings.AutoSpawnSettings;
|
||||
import com.songoda.epicbosses.autospawns.types.IntervalSpawnElement;
|
||||
import com.songoda.epicbosses.utils.BossesGson;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -17,11 +15,16 @@ import java.util.List;
|
|||
*/
|
||||
public class AutoSpawn {
|
||||
|
||||
@Expose @Getter @Setter private boolean editing;
|
||||
@Expose @Getter @Setter private String type;
|
||||
@Expose @Getter @Setter private List<String> entities;
|
||||
@Expose @Getter @Setter private AutoSpawnSettings autoSpawnSettings;
|
||||
@Expose @Getter @Setter private JsonObject customData;
|
||||
@Expose
|
||||
private boolean editing;
|
||||
@Expose
|
||||
private String type;
|
||||
@Expose
|
||||
private List<String> entities;
|
||||
@Expose
|
||||
private AutoSpawnSettings autoSpawnSettings;
|
||||
@Expose
|
||||
private JsonObject customData;
|
||||
|
||||
public AutoSpawn(boolean editing, List<String> entities, AutoSpawnSettings autoSpawnSettings) {
|
||||
this.editing = editing;
|
||||
|
@ -47,4 +50,43 @@ public class AutoSpawn {
|
|||
return true;
|
||||
}
|
||||
|
||||
public boolean isEditing() {
|
||||
return this.editing;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
public List<String> getEntities() {
|
||||
return this.entities;
|
||||
}
|
||||
|
||||
public AutoSpawnSettings getAutoSpawnSettings() {
|
||||
return this.autoSpawnSettings;
|
||||
}
|
||||
|
||||
public JsonObject getCustomData() {
|
||||
return this.customData;
|
||||
}
|
||||
|
||||
public void setEditing(boolean editing) {
|
||||
this.editing = editing;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public void setEntities(List<String> entities) {
|
||||
this.entities = entities;
|
||||
}
|
||||
|
||||
public void setAutoSpawnSettings(AutoSpawnSettings autoSpawnSettings) {
|
||||
this.autoSpawnSettings = autoSpawnSettings;
|
||||
}
|
||||
|
||||
public void setCustomData(JsonObject customData) {
|
||||
this.customData = customData;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,20 +1,24 @@
|
|||
package com.songoda.epicbosses.autospawns.handlers;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.autospawns.AutoSpawn;
|
||||
import com.songoda.epicbosses.autospawns.types.IntervalSpawnElement;
|
||||
import com.songoda.epicbosses.handlers.AutoSpawnVariableHandler;
|
||||
import com.songoda.epicbosses.handlers.variables.AutoSpawnLocationVariableHandler;
|
||||
import com.songoda.epicbosses.handlers.variables.AutoSpawnPlaceholderVariableHandler;
|
||||
import com.songoda.epicbosses.utils.*;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.NumberUtils;
|
||||
import com.songoda.epicbosses.utils.ObjectUtils;
|
||||
import com.songoda.epicbosses.utils.panel.base.ClickAction;
|
||||
import com.songoda.epicbosses.utils.panel.base.handlers.VariablePanelHandler;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
|
@ -29,7 +33,7 @@ public class IntervalSpawnHandler {
|
|||
|
||||
intervalSpawnElement.setSpawnAfterLastBossIsKilled(!ObjectUtils.getValue(intervalSpawnElement.getSpawnAfterLastBossIsKilled(), false));
|
||||
autoSpawn.setCustomData(BossAPI.convertObjectToJsonObject(intervalSpawnElement));
|
||||
CustomBosses.get().getAutoSpawnFileManager().save();
|
||||
EpicBosses.getInstance().getAutoSpawnFileManager().save();
|
||||
|
||||
panelHandler.openFor(player, autoSpawn);
|
||||
};
|
||||
|
@ -42,7 +46,7 @@ public class IntervalSpawnHandler {
|
|||
public ClickAction getLocationAction(IntervalSpawnElement intervalSpawnElement, AutoSpawn autoSpawn, VariablePanelHandler<AutoSpawn> variablePanelHandler) {
|
||||
return event -> {
|
||||
Player player = (Player) event.getWhoClicked();
|
||||
AutoSpawnVariableHandler autoSpawnVariableHandler = new AutoSpawnLocationVariableHandler(player, autoSpawn, intervalSpawnElement, CustomBosses.get().getAutoSpawnFileManager(), variablePanelHandler);
|
||||
AutoSpawnVariableHandler autoSpawnVariableHandler = new AutoSpawnLocationVariableHandler(player, autoSpawn, intervalSpawnElement, EpicBosses.getInstance().getAutoSpawnFileManager(), variablePanelHandler);
|
||||
|
||||
Message.Boss_AutoSpawn_SetLocation.msg(player);
|
||||
autoSpawnVariableHandler.handle();
|
||||
|
@ -57,7 +61,7 @@ public class IntervalSpawnHandler {
|
|||
public ClickAction getPlaceholderAction(IntervalSpawnElement intervalSpawnElement, AutoSpawn autoSpawn, VariablePanelHandler<AutoSpawn> variablePanelHandler) {
|
||||
return event -> {
|
||||
Player player = (Player) event.getWhoClicked();
|
||||
AutoSpawnVariableHandler autoSpawnVariableHandler = new AutoSpawnPlaceholderVariableHandler(player, autoSpawn, intervalSpawnElement, CustomBosses.get().getAutoSpawnFileManager(), variablePanelHandler);
|
||||
AutoSpawnVariableHandler autoSpawnVariableHandler = new AutoSpawnPlaceholderVariableHandler(player, autoSpawn, intervalSpawnElement, EpicBosses.getInstance().getAutoSpawnFileManager(), variablePanelHandler);
|
||||
|
||||
Message.Boss_AutoSpawn_SetPlaceholder.msg(player);
|
||||
autoSpawnVariableHandler.handle();
|
||||
|
@ -105,7 +109,7 @@ public class IntervalSpawnHandler {
|
|||
JsonObject jsonObject = BossAPI.convertObjectToJsonObject(intervalSpawnElement);
|
||||
|
||||
autoSpawn.setCustomData(jsonObject);
|
||||
CustomBosses.get().getAutoSpawnFileManager().save();
|
||||
EpicBosses.getInstance().getAutoSpawnFileManager().save();
|
||||
Message.Boss_AutoSpawn_SpawnRate.msg(event.getWhoClicked(), modifyValue, NumberUtils.get().formatDouble(newAmount));
|
||||
panelHandler.openFor((Player) event.getWhoClicked(), autoSpawn);
|
||||
};
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.songoda.epicbosses.autospawns.settings;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
|
@ -11,9 +9,12 @@ import lombok.Setter;
|
|||
*/
|
||||
public class AutoSpawnSettings {
|
||||
|
||||
@Expose @Getter @Setter private Integer maxAliveAtOnce, amountPerSpawn;
|
||||
@Expose @Getter @Setter private Boolean spawnWhenChunkIsntLoaded, overrideDefaultSpawnMessage, shuffleEntitiesList;
|
||||
@Expose @Getter @Setter private String spawnMessage;
|
||||
@Expose
|
||||
private Integer maxAliveAtOnce, amountPerSpawn;
|
||||
@Expose
|
||||
private Boolean spawnWhenChunkIsntLoaded, overrideDefaultSpawnMessage, shuffleEntitiesList;
|
||||
@Expose
|
||||
private String spawnMessage;
|
||||
|
||||
public AutoSpawnSettings(int maxAliveAtOnce, int amountPerSpawn, boolean spawnWhenChunkIsntLoaded, boolean shuffleEntitiesList) {
|
||||
this.maxAliveAtOnce = maxAliveAtOnce;
|
||||
|
@ -22,4 +23,51 @@ public class AutoSpawnSettings {
|
|||
this.shuffleEntitiesList = shuffleEntitiesList;
|
||||
}
|
||||
|
||||
public Integer getMaxAliveAtOnce() {
|
||||
return this.maxAliveAtOnce;
|
||||
}
|
||||
|
||||
public Integer getAmountPerSpawn() {
|
||||
return this.amountPerSpawn;
|
||||
}
|
||||
|
||||
public Boolean getSpawnWhenChunkIsntLoaded() {
|
||||
return this.spawnWhenChunkIsntLoaded;
|
||||
}
|
||||
|
||||
public Boolean getOverrideDefaultSpawnMessage() {
|
||||
return this.overrideDefaultSpawnMessage;
|
||||
}
|
||||
|
||||
public Boolean getShuffleEntitiesList() {
|
||||
return this.shuffleEntitiesList;
|
||||
}
|
||||
|
||||
public String getSpawnMessage() {
|
||||
return this.spawnMessage;
|
||||
}
|
||||
|
||||
public void setMaxAliveAtOnce(Integer maxAliveAtOnce) {
|
||||
this.maxAliveAtOnce = maxAliveAtOnce;
|
||||
}
|
||||
|
||||
public void setAmountPerSpawn(Integer amountPerSpawn) {
|
||||
this.amountPerSpawn = amountPerSpawn;
|
||||
}
|
||||
|
||||
public void setSpawnWhenChunkIsntLoaded(Boolean spawnWhenChunkIsntLoaded) {
|
||||
this.spawnWhenChunkIsntLoaded = spawnWhenChunkIsntLoaded;
|
||||
}
|
||||
|
||||
public void setOverrideDefaultSpawnMessage(Boolean overrideDefaultSpawnMessage) {
|
||||
this.overrideDefaultSpawnMessage = overrideDefaultSpawnMessage;
|
||||
}
|
||||
|
||||
public void setShuffleEntitiesList(Boolean shuffleEntitiesList) {
|
||||
this.shuffleEntitiesList = shuffleEntitiesList;
|
||||
}
|
||||
|
||||
public void setSpawnMessage(String spawnMessage) {
|
||||
this.spawnMessage = spawnMessage;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,8 +16,6 @@ import com.songoda.epicbosses.skills.interfaces.ICustomSettingAction;
|
|||
import com.songoda.epicbosses.utils.*;
|
||||
import com.songoda.epicbosses.utils.panel.base.ClickAction;
|
||||
import com.songoda.epicbosses.utils.panel.base.handlers.VariablePanelHandler;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
@ -31,9 +29,12 @@ import java.util.*;
|
|||
*/
|
||||
public class IntervalSpawnElement implements IAutoSpawnCustomSettingsHandler {
|
||||
|
||||
@Expose @Getter @Setter private Boolean spawnAfterLastBossIsKilled;
|
||||
@Expose @Getter @Setter private String location, placeholder;
|
||||
@Expose @Getter @Setter private Integer spawnRate;
|
||||
@Expose
|
||||
private Boolean spawnAfterLastBossIsKilled;
|
||||
@Expose
|
||||
private String location, placeholder;
|
||||
@Expose
|
||||
private Integer spawnRate;
|
||||
|
||||
public IntervalSpawnElement(String location, String placeholder, Integer spawnRate, boolean spawnAfterLastBossIsKilled) {
|
||||
this.location = location;
|
||||
|
@ -117,4 +118,36 @@ public class IntervalSpawnElement implements IAutoSpawnCustomSettingsHandler {
|
|||
public Location getSpawnLocation() {
|
||||
return StringUtils.get().fromStringToLocation(this.location);
|
||||
}
|
||||
|
||||
public Boolean getSpawnAfterLastBossIsKilled() {
|
||||
return this.spawnAfterLastBossIsKilled;
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
return this.location;
|
||||
}
|
||||
|
||||
public String getPlaceholder() {
|
||||
return this.placeholder;
|
||||
}
|
||||
|
||||
public Integer getSpawnRate() {
|
||||
return this.spawnRate;
|
||||
}
|
||||
|
||||
public void setSpawnAfterLastBossIsKilled(Boolean spawnAfterLastBossIsKilled) {
|
||||
this.spawnAfterLastBossIsKilled = spawnAfterLastBossIsKilled;
|
||||
}
|
||||
|
||||
public void setLocation(String location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public void setPlaceholder(String placeholder) {
|
||||
this.placeholder = placeholder;
|
||||
}
|
||||
|
||||
public void setSpawnRate(Integer spawnRate) {
|
||||
this.spawnRate = spawnRate;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ import com.songoda.epicbosses.utils.Permission;
|
|||
import com.songoda.epicbosses.utils.StringUtils;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.container.BossEntityContainer;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.managers.BossPanelManager;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.NumberUtils;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
|
@ -49,7 +49,7 @@ public class BossHelpCmd extends SubCommand {
|
|||
return;
|
||||
}
|
||||
|
||||
sender.sendMessage(StringUtils.get().translateColor("EpicBosses &7Version " + CustomBosses.get().getDescription().getVersion() + " Created with <3 by &5&l&oSongoda"));
|
||||
sender.sendMessage(StringUtils.get().translateColor("EpicBosses &7Version " + EpicBosses.getInstance().getDescription().getVersion() + " Created with <3 by &5&l&oSongoda"));
|
||||
Message.Boss_Help_NoPermission.msg(sender);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.file.ConfigFileHandler;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import com.songoda.epicbosses.utils.*;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
|
@ -20,9 +19,9 @@ import java.util.Map;
|
|||
*/
|
||||
public class BossNearbyCmd extends SubCommand {
|
||||
|
||||
private CustomBosses plugin;
|
||||
private EpicBosses plugin;
|
||||
|
||||
public BossNearbyCmd(CustomBosses plugin) {
|
||||
public BossNearbyCmd(EpicBosses plugin) {
|
||||
super("nearby");
|
||||
|
||||
this.plugin = plugin;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.autospawns.AutoSpawn;
|
||||
import com.songoda.epicbosses.autospawns.SpawnType;
|
||||
import com.songoda.epicbosses.droptable.DropTable;
|
||||
import com.songoda.epicbosses.managers.BossDropTableManager;
|
||||
import com.songoda.epicbosses.managers.BossSkillManager;
|
||||
|
@ -40,7 +39,7 @@ public class BossNewCmd extends SubCommand {
|
|||
private SkillsFileManager skillsFileManager;
|
||||
private BossSkillManager bossSkillManager;
|
||||
|
||||
public BossNewCmd(CustomBosses plugin) {
|
||||
public BossNewCmd(EpicBosses plugin) {
|
||||
super("new");
|
||||
|
||||
this.bossSkillManager = plugin.getBossSkillManager();
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.managers.BossEntityManager;
|
||||
import com.songoda.epicbosses.utils.IReloadable;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
|
@ -14,9 +14,9 @@ import org.bukkit.entity.Player;
|
|||
*/
|
||||
public class BossShopCmd extends SubCommand {
|
||||
|
||||
private CustomBosses plugin;
|
||||
private EpicBosses plugin;
|
||||
|
||||
public BossShopCmd(CustomBosses plugin) {
|
||||
public BossShopCmd(EpicBosses plugin) {
|
||||
super("shop", "buy", "store");
|
||||
|
||||
this.plugin = plugin;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.holder.ActiveAutoSpawnHolder;
|
||||
import com.songoda.epicbosses.holder.autospawn.ActiveIntervalAutoSpawnHolder;
|
||||
import com.songoda.epicbosses.managers.AutoSpawnManager;
|
||||
|
@ -23,7 +23,7 @@ public class BossTimeCmd extends SubCommand {
|
|||
|
||||
private AutoSpawnManager autoSpawnManager;
|
||||
|
||||
public BossTimeCmd(CustomBosses plugin) {
|
||||
public BossTimeCmd(EpicBosses plugin) {
|
||||
super("time");
|
||||
|
||||
this.autoSpawnManager = plugin.getAutoSpawnManager();
|
||||
|
|
|
@ -6,8 +6,6 @@ import com.songoda.epicbosses.droptable.elements.DropTableElement;
|
|||
import com.songoda.epicbosses.droptable.elements.GiveTableElement;
|
||||
import com.songoda.epicbosses.droptable.elements.SprayTableElement;
|
||||
import com.songoda.epicbosses.utils.BossesGson;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
|
@ -16,8 +14,10 @@ import lombok.Setter;
|
|||
*/
|
||||
public class DropTable {
|
||||
|
||||
@Expose @Getter @Setter private String dropType;
|
||||
@Expose @Getter @Setter private JsonObject rewards;
|
||||
@Expose
|
||||
private String dropType;
|
||||
@Expose
|
||||
private JsonObject rewards;
|
||||
|
||||
public DropTable(String dropType, JsonObject rewards) {
|
||||
this.dropType = dropType;
|
||||
|
@ -48,4 +48,19 @@ public class DropTable {
|
|||
return null;
|
||||
}
|
||||
|
||||
public String getDropType() {
|
||||
return this.dropType;
|
||||
}
|
||||
|
||||
public JsonObject getRewards() {
|
||||
return this.rewards;
|
||||
}
|
||||
|
||||
public void setDropType(String dropType) {
|
||||
this.dropType = dropType;
|
||||
}
|
||||
|
||||
public void setRewards(JsonObject rewards) {
|
||||
this.rewards = rewards;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.songoda.epicbosses.droptable.elements;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -13,9 +11,12 @@ import java.util.Map;
|
|||
*/
|
||||
public class DropTableElement {
|
||||
|
||||
@Expose @Getter @Setter private Map<String, Double> dropRewards;
|
||||
@Expose @Getter @Setter private Boolean randomDrops;
|
||||
@Expose @Getter @Setter private Integer dropMaxDrops;
|
||||
@Expose
|
||||
private Map<String, Double> dropRewards;
|
||||
@Expose
|
||||
private Boolean randomDrops;
|
||||
@Expose
|
||||
private Integer dropMaxDrops;
|
||||
|
||||
public DropTableElement(Map<String, Double> dropRewards, Boolean randomDrops, Integer dropMaxDrops) {
|
||||
this.dropRewards = dropRewards;
|
||||
|
@ -23,4 +24,27 @@ public class DropTableElement {
|
|||
this.dropMaxDrops = dropMaxDrops;
|
||||
}
|
||||
|
||||
public Map<String, Double> getDropRewards() {
|
||||
return this.dropRewards;
|
||||
}
|
||||
|
||||
public Boolean getRandomDrops() {
|
||||
return this.randomDrops;
|
||||
}
|
||||
|
||||
public Integer getDropMaxDrops() {
|
||||
return this.dropMaxDrops;
|
||||
}
|
||||
|
||||
public void setDropRewards(Map<String, Double> dropRewards) {
|
||||
this.dropRewards = dropRewards;
|
||||
}
|
||||
|
||||
public void setRandomDrops(Boolean randomDrops) {
|
||||
this.randomDrops = randomDrops;
|
||||
}
|
||||
|
||||
public void setDropMaxDrops(Integer dropMaxDrops) {
|
||||
this.dropMaxDrops = dropMaxDrops;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.songoda.epicbosses.droptable.elements;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -13,10 +11,18 @@ import java.util.Map;
|
|||
*/
|
||||
public class GiveTableElement {
|
||||
|
||||
@Expose @Getter @Setter private Map<String, Map<String, GiveTableSubElement>> giveRewards;
|
||||
@Expose
|
||||
private Map<String, Map<String, GiveTableSubElement>> giveRewards;
|
||||
|
||||
public GiveTableElement(Map<String, Map<String, GiveTableSubElement>> giveRewards) {
|
||||
this.giveRewards = giveRewards;
|
||||
}
|
||||
|
||||
public Map<String, Map<String, GiveTableSubElement>> getGiveRewards() {
|
||||
return this.giveRewards;
|
||||
}
|
||||
|
||||
public void setGiveRewards(Map<String, Map<String, GiveTableSubElement>> giveRewards) {
|
||||
this.giveRewards = giveRewards;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.songoda.epicbosses.droptable.elements;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -13,10 +11,14 @@ import java.util.Map;
|
|||
*/
|
||||
public class GiveTableSubElement {
|
||||
|
||||
@Expose @Getter @Setter private Map<String, Double> items, commands;
|
||||
@Expose @Getter @Setter private Integer maxDrops, maxCommands;
|
||||
@Expose @Getter @Setter private Boolean randomDrops, randomCommands;
|
||||
@Expose @Getter @Setter private Double requiredPercentage;
|
||||
@Expose
|
||||
private Map<String, Double> items, commands;
|
||||
@Expose
|
||||
private Integer maxDrops, maxCommands;
|
||||
@Expose
|
||||
private Boolean randomDrops, randomCommands;
|
||||
@Expose
|
||||
private Double requiredPercentage;
|
||||
|
||||
public GiveTableSubElement(Map<String, Double> items, Map<String, Double> commands, Integer maxDrops, Integer maxCommands, Boolean randomDrops, Boolean randomCommands, Double requiredPercentage) {
|
||||
this.items = items;
|
||||
|
@ -28,4 +30,59 @@ public class GiveTableSubElement {
|
|||
this.requiredPercentage = requiredPercentage;
|
||||
}
|
||||
|
||||
public Map<String, Double> getItems() {
|
||||
return this.items;
|
||||
}
|
||||
|
||||
public Map<String, Double> getCommands() {
|
||||
return this.commands;
|
||||
}
|
||||
|
||||
public Integer getMaxDrops() {
|
||||
return this.maxDrops;
|
||||
}
|
||||
|
||||
public Integer getMaxCommands() {
|
||||
return this.maxCommands;
|
||||
}
|
||||
|
||||
public Boolean getRandomDrops() {
|
||||
return this.randomDrops;
|
||||
}
|
||||
|
||||
public Boolean getRandomCommands() {
|
||||
return this.randomCommands;
|
||||
}
|
||||
|
||||
public Double getRequiredPercentage() {
|
||||
return this.requiredPercentage;
|
||||
}
|
||||
|
||||
public void setItems(Map<String, Double> items) {
|
||||
this.items = items;
|
||||
}
|
||||
|
||||
public void setCommands(Map<String, Double> commands) {
|
||||
this.commands = commands;
|
||||
}
|
||||
|
||||
public void setMaxDrops(Integer maxDrops) {
|
||||
this.maxDrops = maxDrops;
|
||||
}
|
||||
|
||||
public void setMaxCommands(Integer maxCommands) {
|
||||
this.maxCommands = maxCommands;
|
||||
}
|
||||
|
||||
public void setRandomDrops(Boolean randomDrops) {
|
||||
this.randomDrops = randomDrops;
|
||||
}
|
||||
|
||||
public void setRandomCommands(Boolean randomCommands) {
|
||||
this.randomCommands = randomCommands;
|
||||
}
|
||||
|
||||
public void setRequiredPercentage(Double requiredPercentage) {
|
||||
this.requiredPercentage = requiredPercentage;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.songoda.epicbosses.droptable.elements;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -13,9 +11,12 @@ import java.util.Map;
|
|||
*/
|
||||
public class SprayTableElement {
|
||||
|
||||
@Expose @Getter @Setter private Map<String, Double> sprayRewards;
|
||||
@Expose @Getter @Setter private Boolean randomSprayDrops;
|
||||
@Expose @Getter @Setter private Integer sprayMaxDistance, sprayMaxDrops;
|
||||
@Expose
|
||||
private Map<String, Double> sprayRewards;
|
||||
@Expose
|
||||
private Boolean randomSprayDrops;
|
||||
@Expose
|
||||
private Integer sprayMaxDistance, sprayMaxDrops;
|
||||
|
||||
public SprayTableElement(Map<String, Double> sprayRewards, Boolean randomSprayDrops, Integer sprayMaxDistance, Integer sprayMaxDrops) {
|
||||
this.sprayRewards = sprayRewards;
|
||||
|
@ -24,4 +25,35 @@ public class SprayTableElement {
|
|||
this.sprayMaxDrops = sprayMaxDrops;
|
||||
}
|
||||
|
||||
public Map<String, Double> getSprayRewards() {
|
||||
return this.sprayRewards;
|
||||
}
|
||||
|
||||
public Boolean getRandomSprayDrops() {
|
||||
return this.randomSprayDrops;
|
||||
}
|
||||
|
||||
public Integer getSprayMaxDistance() {
|
||||
return this.sprayMaxDistance;
|
||||
}
|
||||
|
||||
public Integer getSprayMaxDrops() {
|
||||
return this.sprayMaxDrops;
|
||||
}
|
||||
|
||||
public void setSprayRewards(Map<String, Double> sprayRewards) {
|
||||
this.sprayRewards = sprayRewards;
|
||||
}
|
||||
|
||||
public void setRandomSprayDrops(Boolean randomSprayDrops) {
|
||||
this.randomSprayDrops = randomSprayDrops;
|
||||
}
|
||||
|
||||
public void setSprayMaxDistance(Integer sprayMaxDistance) {
|
||||
this.sprayMaxDistance = sprayMaxDistance;
|
||||
}
|
||||
|
||||
public void setSprayMaxDrops(Integer sprayMaxDrops) {
|
||||
this.sprayMaxDrops = sprayMaxDrops;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
package com.songoda.epicbosses.entity;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.songoda.epicbosses.utils.StringUtils;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import com.songoda.epicbosses.entity.elements.*;
|
||||
import com.songoda.epicbosses.utils.potion.holder.PotionEffectHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -17,15 +13,23 @@ import java.util.List;
|
|||
*/
|
||||
public class BossEntity {
|
||||
|
||||
@Expose @Getter @Setter private String spawnItem, targeting;
|
||||
@Expose @Getter @Setter private boolean editing, buyable;
|
||||
@Expose @Getter @Setter private Double price;
|
||||
@Expose
|
||||
private String spawnItem, targeting;
|
||||
@Expose
|
||||
private boolean editing, buyable;
|
||||
@Expose
|
||||
private Double price;
|
||||
|
||||
@Expose @Getter private final List<EntityStatsElement> entityStats;
|
||||
@Expose @Getter private final MessagesElement messages;
|
||||
@Expose @Getter private final CommandsElement commands;
|
||||
@Expose @Getter private final SkillsElement skills;
|
||||
@Expose @Getter private final DropsElement drops;
|
||||
@Expose
|
||||
private final List<EntityStatsElement> entityStats;
|
||||
@Expose
|
||||
private final MessagesElement messages;
|
||||
@Expose
|
||||
private final CommandsElement commands;
|
||||
@Expose
|
||||
private final SkillsElement skills;
|
||||
@Expose
|
||||
private final DropsElement drops;
|
||||
|
||||
public BossEntity(boolean editing, String spawnItem, String targeting, boolean buyable, Double price, List<EntityStatsElement> entityStats, SkillsElement skills, DropsElement drops, MessagesElement messages, CommandsElement commands) {
|
||||
this.editing = editing;
|
||||
|
@ -101,4 +105,64 @@ public class BossEntity {
|
|||
public boolean canBeBought() {
|
||||
return !isEditing() && isBuyable() && (getPrice() != null) && isCompleteEnoughToSpawn();
|
||||
}
|
||||
|
||||
public String getSpawnItem() {
|
||||
return this.spawnItem;
|
||||
}
|
||||
|
||||
public String getTargeting() {
|
||||
return this.targeting;
|
||||
}
|
||||
|
||||
public boolean isEditing() {
|
||||
return this.editing;
|
||||
}
|
||||
|
||||
public boolean isBuyable() {
|
||||
return this.buyable;
|
||||
}
|
||||
|
||||
public Double getPrice() {
|
||||
return this.price;
|
||||
}
|
||||
|
||||
public List<EntityStatsElement> getEntityStats() {
|
||||
return this.entityStats;
|
||||
}
|
||||
|
||||
public MessagesElement getMessages() {
|
||||
return this.messages;
|
||||
}
|
||||
|
||||
public CommandsElement getCommands() {
|
||||
return this.commands;
|
||||
}
|
||||
|
||||
public SkillsElement getSkills() {
|
||||
return this.skills;
|
||||
}
|
||||
|
||||
public DropsElement getDrops() {
|
||||
return this.drops;
|
||||
}
|
||||
|
||||
public void setSpawnItem(String spawnItem) {
|
||||
this.spawnItem = spawnItem;
|
||||
}
|
||||
|
||||
public void setTargeting(String targeting) {
|
||||
this.targeting = targeting;
|
||||
}
|
||||
|
||||
public void setEditing(boolean editing) {
|
||||
this.editing = editing;
|
||||
}
|
||||
|
||||
public void setBuyable(boolean buyable) {
|
||||
this.buyable = buyable;
|
||||
}
|
||||
|
||||
public void setPrice(Double price) {
|
||||
this.price = price;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package com.songoda.epicbosses.entity;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.songoda.epicbosses.entity.elements.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import com.songoda.epicbosses.entity.elements.EntityStatsElement;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -14,13 +12,36 @@ import java.util.List;
|
|||
*/
|
||||
public class MinionEntity {
|
||||
|
||||
@Expose @Getter private final List<EntityStatsElement> entityStats;
|
||||
@Expose
|
||||
private final List<EntityStatsElement> entityStats;
|
||||
|
||||
@Expose @Getter @Setter private String targeting;
|
||||
@Expose @Getter @Setter private boolean editing;
|
||||
@Expose
|
||||
private String targeting;
|
||||
@Expose
|
||||
private boolean editing;
|
||||
|
||||
public MinionEntity(boolean editing, List<EntityStatsElement> entityStats) {
|
||||
this.editing = editing;
|
||||
this.entityStats = entityStats;
|
||||
}
|
||||
|
||||
public List<EntityStatsElement> getEntityStats() {
|
||||
return this.entityStats;
|
||||
}
|
||||
|
||||
public String getTargeting() {
|
||||
return this.targeting;
|
||||
}
|
||||
|
||||
public boolean isEditing() {
|
||||
return this.editing;
|
||||
}
|
||||
|
||||
public void setTargeting(String targeting) {
|
||||
this.targeting = targeting;
|
||||
}
|
||||
|
||||
public void setEditing(boolean editing) {
|
||||
this.editing = editing;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.songoda.epicbosses.entity.elements;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
|
@ -11,11 +9,27 @@ import lombok.Setter;
|
|||
*/
|
||||
public class CommandsElement {
|
||||
|
||||
@Expose @Getter @Setter private String onSpawn, onDeath;
|
||||
@Expose
|
||||
private String onSpawn, onDeath;
|
||||
|
||||
public CommandsElement(String onSpawn, String onDeath) {
|
||||
this.onDeath = onDeath;
|
||||
this.onSpawn = onSpawn;
|
||||
}
|
||||
|
||||
public String getOnSpawn() {
|
||||
return this.onSpawn;
|
||||
}
|
||||
|
||||
public String getOnDeath() {
|
||||
return this.onDeath;
|
||||
}
|
||||
|
||||
public void setOnSpawn(String onSpawn) {
|
||||
this.onSpawn = onSpawn;
|
||||
}
|
||||
|
||||
public void setOnDeath(String onDeath) {
|
||||
this.onDeath = onDeath;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.songoda.epicbosses.entity.elements;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
|
@ -11,8 +9,10 @@ import lombok.Setter;
|
|||
*/
|
||||
public class DropsElement {
|
||||
|
||||
@Expose @Getter @Setter private Boolean naturalDrops, dropExp;
|
||||
@Expose @Getter @Setter private String dropTable;
|
||||
@Expose
|
||||
private Boolean naturalDrops, dropExp;
|
||||
@Expose
|
||||
private String dropTable;
|
||||
|
||||
public DropsElement(Boolean naturalDrops, Boolean dropExp, String dropTable) {
|
||||
this.naturalDrops = naturalDrops;
|
||||
|
@ -20,4 +20,27 @@ public class DropsElement {
|
|||
this.dropTable = dropTable;
|
||||
}
|
||||
|
||||
public Boolean getNaturalDrops() {
|
||||
return this.naturalDrops;
|
||||
}
|
||||
|
||||
public Boolean getDropExp() {
|
||||
return this.dropExp;
|
||||
}
|
||||
|
||||
public String getDropTable() {
|
||||
return this.dropTable;
|
||||
}
|
||||
|
||||
public void setNaturalDrops(Boolean naturalDrops) {
|
||||
this.naturalDrops = naturalDrops;
|
||||
}
|
||||
|
||||
public void setDropExp(Boolean dropExp) {
|
||||
this.dropExp = dropExp;
|
||||
}
|
||||
|
||||
public void setDropTable(String dropTable) {
|
||||
this.dropTable = dropTable;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.songoda.epicbosses.entity.elements;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import com.songoda.epicbosses.utils.potion.holder.PotionEffectHolder;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -14,10 +12,14 @@ import java.util.List;
|
|||
*/
|
||||
public class EntityStatsElement {
|
||||
|
||||
@Expose @Getter @Setter private MainStatsElement mainStats;
|
||||
@Expose @Getter @Setter private EquipmentElement equipment;
|
||||
@Expose @Getter @Setter private HandsElement hands;
|
||||
@Expose @Getter @Setter private List<PotionEffectHolder> potions;
|
||||
@Expose
|
||||
private MainStatsElement mainStats;
|
||||
@Expose
|
||||
private EquipmentElement equipment;
|
||||
@Expose
|
||||
private HandsElement hands;
|
||||
@Expose
|
||||
private List<PotionEffectHolder> potions;
|
||||
|
||||
public EntityStatsElement(MainStatsElement mainStatsElement, EquipmentElement equipmentElement, HandsElement handsElement, List<PotionEffectHolder> potionEffectHolders) {
|
||||
this.mainStats = mainStatsElement;
|
||||
|
@ -26,4 +28,35 @@ public class EntityStatsElement {
|
|||
this.potions = potionEffectHolders;
|
||||
}
|
||||
|
||||
public MainStatsElement getMainStats() {
|
||||
return this.mainStats;
|
||||
}
|
||||
|
||||
public EquipmentElement getEquipment() {
|
||||
return this.equipment;
|
||||
}
|
||||
|
||||
public HandsElement getHands() {
|
||||
return this.hands;
|
||||
}
|
||||
|
||||
public List<PotionEffectHolder> getPotions() {
|
||||
return this.potions;
|
||||
}
|
||||
|
||||
public void setMainStats(MainStatsElement mainStats) {
|
||||
this.mainStats = mainStats;
|
||||
}
|
||||
|
||||
public void setEquipment(EquipmentElement equipment) {
|
||||
this.equipment = equipment;
|
||||
}
|
||||
|
||||
public void setHands(HandsElement hands) {
|
||||
this.hands = hands;
|
||||
}
|
||||
|
||||
public void setPotions(List<PotionEffectHolder> potions) {
|
||||
this.potions = potions;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.songoda.epicbosses.entity.elements;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
|
@ -11,7 +9,8 @@ import lombok.Setter;
|
|||
*/
|
||||
public class EquipmentElement {
|
||||
|
||||
@Expose @Getter @Setter private String helmet, chestplate, leggings, boots;
|
||||
@Expose
|
||||
private String helmet, chestplate, leggings, boots;
|
||||
|
||||
public EquipmentElement(String helmet, String chestplate, String leggings, String boots) {
|
||||
this.helmet = helmet;
|
||||
|
@ -20,4 +19,35 @@ public class EquipmentElement {
|
|||
this.boots = boots;
|
||||
}
|
||||
|
||||
public String getHelmet() {
|
||||
return this.helmet;
|
||||
}
|
||||
|
||||
public String getChestplate() {
|
||||
return this.chestplate;
|
||||
}
|
||||
|
||||
public String getLeggings() {
|
||||
return this.leggings;
|
||||
}
|
||||
|
||||
public String getBoots() {
|
||||
return this.boots;
|
||||
}
|
||||
|
||||
public void setHelmet(String helmet) {
|
||||
this.helmet = helmet;
|
||||
}
|
||||
|
||||
public void setChestplate(String chestplate) {
|
||||
this.chestplate = chestplate;
|
||||
}
|
||||
|
||||
public void setLeggings(String leggings) {
|
||||
this.leggings = leggings;
|
||||
}
|
||||
|
||||
public void setBoots(String boots) {
|
||||
this.boots = boots;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.songoda.epicbosses.entity.elements;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
|
@ -11,11 +9,27 @@ import lombok.Setter;
|
|||
*/
|
||||
public class HandsElement {
|
||||
|
||||
@Expose @Getter @Setter private String mainHand, offHand;
|
||||
@Expose
|
||||
private String mainHand, offHand;
|
||||
|
||||
public HandsElement(String mainHand, String offHand) {
|
||||
this.mainHand = mainHand;
|
||||
this.offHand = offHand;
|
||||
}
|
||||
|
||||
public String getMainHand() {
|
||||
return this.mainHand;
|
||||
}
|
||||
|
||||
public String getOffHand() {
|
||||
return this.offHand;
|
||||
}
|
||||
|
||||
public void setMainHand(String mainHand) {
|
||||
this.mainHand = mainHand;
|
||||
}
|
||||
|
||||
public void setOffHand(String offHand) {
|
||||
this.offHand = offHand;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.songoda.epicbosses.entity.elements;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
|
@ -11,10 +9,14 @@ import lombok.Setter;
|
|||
*/
|
||||
public class MainStatsElement {
|
||||
|
||||
@Expose @Getter @Setter private Integer position;
|
||||
@Expose @Getter @Setter private String entityType;
|
||||
@Expose @Getter @Setter private Double health;
|
||||
@Expose @Getter @Setter private String displayName;
|
||||
@Expose
|
||||
private Integer position;
|
||||
@Expose
|
||||
private String entityType;
|
||||
@Expose
|
||||
private Double health;
|
||||
@Expose
|
||||
private String displayName;
|
||||
|
||||
public MainStatsElement(Integer position, String entityType, Double health, String displayName) {
|
||||
this.position = position;
|
||||
|
@ -23,4 +25,35 @@ public class MainStatsElement {
|
|||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public Integer getPosition() {
|
||||
return this.position;
|
||||
}
|
||||
|
||||
public String getEntityType() {
|
||||
return this.entityType;
|
||||
}
|
||||
|
||||
public Double getHealth() {
|
||||
return this.health;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
public void setPosition(Integer position) {
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
public void setEntityType(String entityType) {
|
||||
this.entityType = entityType;
|
||||
}
|
||||
|
||||
public void setHealth(Double health) {
|
||||
this.health = health;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.songoda.epicbosses.entity.elements;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
|
@ -11,9 +9,12 @@ import lombok.Setter;
|
|||
*/
|
||||
public class MessagesElement {
|
||||
|
||||
@Expose @Getter @Setter private OnSpawnMessageElement onSpawn;
|
||||
@Expose @Getter @Setter private OnDeathMessageElement onDeath;
|
||||
@Expose @Getter @Setter private TauntElement taunts;
|
||||
@Expose
|
||||
private OnSpawnMessageElement onSpawn;
|
||||
@Expose
|
||||
private OnDeathMessageElement onDeath;
|
||||
@Expose
|
||||
private TauntElement taunts;
|
||||
|
||||
public MessagesElement(OnSpawnMessageElement onSpawn, OnDeathMessageElement onDeath, TauntElement tauntElement) {
|
||||
this.onDeath = onDeath;
|
||||
|
@ -21,4 +22,27 @@ public class MessagesElement {
|
|||
this.taunts = tauntElement;
|
||||
}
|
||||
|
||||
public OnSpawnMessageElement getOnSpawn() {
|
||||
return this.onSpawn;
|
||||
}
|
||||
|
||||
public OnDeathMessageElement getOnDeath() {
|
||||
return this.onDeath;
|
||||
}
|
||||
|
||||
public TauntElement getTaunts() {
|
||||
return this.taunts;
|
||||
}
|
||||
|
||||
public void setOnSpawn(OnSpawnMessageElement onSpawn) {
|
||||
this.onSpawn = onSpawn;
|
||||
}
|
||||
|
||||
public void setOnDeath(OnDeathMessageElement onDeath) {
|
||||
this.onDeath = onDeath;
|
||||
}
|
||||
|
||||
public void setTaunts(TauntElement taunts) {
|
||||
this.taunts = taunts;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.songoda.epicbosses.entity.elements;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
|
@ -11,8 +9,10 @@ import lombok.Setter;
|
|||
*/
|
||||
public class OnDeathMessageElement {
|
||||
|
||||
@Expose @Getter @Setter private String message, positionMessage;
|
||||
@Expose @Getter @Setter private Integer radius, onlyShow;
|
||||
@Expose
|
||||
private String message, positionMessage;
|
||||
@Expose
|
||||
private Integer radius, onlyShow;
|
||||
|
||||
public OnDeathMessageElement(String message, String positionMessage, Integer radius, Integer onlyShow) {
|
||||
this.message = message;
|
||||
|
@ -20,4 +20,36 @@ public class OnDeathMessageElement {
|
|||
this.radius = radius;
|
||||
this.onlyShow = onlyShow;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
public String getPositionMessage() {
|
||||
return this.positionMessage;
|
||||
}
|
||||
|
||||
public Integer getRadius() {
|
||||
return this.radius;
|
||||
}
|
||||
|
||||
public Integer getOnlyShow() {
|
||||
return this.onlyShow;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public void setPositionMessage(String positionMessage) {
|
||||
this.positionMessage = positionMessage;
|
||||
}
|
||||
|
||||
public void setRadius(Integer radius) {
|
||||
this.radius = radius;
|
||||
}
|
||||
|
||||
public void setOnlyShow(Integer onlyShow) {
|
||||
this.onlyShow = onlyShow;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.songoda.epicbosses.entity.elements;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
|
@ -11,12 +9,29 @@ import lombok.Setter;
|
|||
*/
|
||||
public class OnSpawnMessageElement {
|
||||
|
||||
@Expose @Getter @Setter private String message;
|
||||
@Expose @Getter @Setter private Integer radius;
|
||||
@Expose
|
||||
private String message;
|
||||
@Expose
|
||||
private Integer radius;
|
||||
|
||||
public OnSpawnMessageElement(String message, Integer radius) {
|
||||
this.message = message;
|
||||
this.radius = radius;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
public Integer getRadius() {
|
||||
return this.radius;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public void setRadius(Integer radius) {
|
||||
this.radius = radius;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.songoda.epicbosses.entity.elements;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -13,9 +11,12 @@ import java.util.List;
|
|||
*/
|
||||
public class SkillsElement {
|
||||
|
||||
@Expose @Getter @Setter private Double overallChance;
|
||||
@Expose @Getter @Setter private String masterMessage;
|
||||
@Expose @Getter @Setter private List<String> skills;
|
||||
@Expose
|
||||
private Double overallChance;
|
||||
@Expose
|
||||
private String masterMessage;
|
||||
@Expose
|
||||
private List<String> skills;
|
||||
|
||||
public SkillsElement(Double overallChance, String masterMessage, List<String> skills) {
|
||||
this.overallChance = overallChance;
|
||||
|
@ -23,4 +24,27 @@ public class SkillsElement {
|
|||
this.skills = skills;
|
||||
}
|
||||
|
||||
public Double getOverallChance() {
|
||||
return this.overallChance;
|
||||
}
|
||||
|
||||
public String getMasterMessage() {
|
||||
return this.masterMessage;
|
||||
}
|
||||
|
||||
public List<String> getSkills() {
|
||||
return this.skills;
|
||||
}
|
||||
|
||||
public void setOverallChance(Double overallChance) {
|
||||
this.overallChance = overallChance;
|
||||
}
|
||||
|
||||
public void setMasterMessage(String masterMessage) {
|
||||
this.masterMessage = masterMessage;
|
||||
}
|
||||
|
||||
public void setSkills(List<String> skills) {
|
||||
this.skills = skills;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package com.songoda.epicbosses.entity.elements;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -13,8 +11,10 @@ import java.util.List;
|
|||
*/
|
||||
public class TauntElement {
|
||||
|
||||
@Expose @Getter @Setter private Integer delay, radius;
|
||||
@Expose @Getter @Setter private List<String> taunts;
|
||||
@Expose
|
||||
private Integer delay, radius;
|
||||
@Expose
|
||||
private List<String> taunts;
|
||||
|
||||
public TauntElement(Integer delay, Integer radius, List<String> taunts) {
|
||||
this.delay = delay;
|
||||
|
@ -22,4 +22,27 @@ public class TauntElement {
|
|||
this.taunts = taunts;
|
||||
}
|
||||
|
||||
public Integer getDelay() {
|
||||
return this.delay;
|
||||
}
|
||||
|
||||
public Integer getRadius() {
|
||||
return this.radius;
|
||||
}
|
||||
|
||||
public List<String> getTaunts() {
|
||||
return this.taunts;
|
||||
}
|
||||
|
||||
public void setDelay(Integer delay) {
|
||||
this.delay = delay;
|
||||
}
|
||||
|
||||
public void setRadius(Integer radius) {
|
||||
this.radius = radius;
|
||||
}
|
||||
|
||||
public void setTaunts(List<String> taunts) {
|
||||
this.taunts = taunts;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.songoda.epicbosses.events;
|
||||
|
||||
import lombok.Getter;
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
|
@ -16,10 +15,10 @@ public class BossDamageEvent extends Event {
|
|||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Getter private ActiveBossHolder activeBossHolder;
|
||||
@Getter private LivingEntity livingEntity;
|
||||
@Getter private Location damageLocation;
|
||||
@Getter private double damage;
|
||||
private ActiveBossHolder activeBossHolder;
|
||||
private LivingEntity livingEntity;
|
||||
private Location damageLocation;
|
||||
private double damage;
|
||||
|
||||
public BossDamageEvent(ActiveBossHolder activeBossHolder, LivingEntity livingEntity, Location damageLocation, double damageAmount) {
|
||||
this.activeBossHolder = activeBossHolder;
|
||||
|
@ -36,4 +35,20 @@ public class BossDamageEvent extends Event {
|
|||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public ActiveBossHolder getActiveBossHolder() {
|
||||
return this.activeBossHolder;
|
||||
}
|
||||
|
||||
public LivingEntity getLivingEntity() {
|
||||
return this.livingEntity;
|
||||
}
|
||||
|
||||
public Location getDamageLocation() {
|
||||
return this.damageLocation;
|
||||
}
|
||||
|
||||
public double getDamage() {
|
||||
return this.damage;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.songoda.epicbosses.events;
|
||||
|
||||
import lombok.Getter;
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
@ -14,8 +13,8 @@ public class BossDeathEvent extends Event {
|
|||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Getter private final ActiveBossHolder activeBossHolder;
|
||||
@Getter private final boolean autoSpawn;
|
||||
private final ActiveBossHolder activeBossHolder;
|
||||
private final boolean autoSpawn;
|
||||
|
||||
public BossDeathEvent(ActiveBossHolder activeBossHolder, boolean autoSpawn) {
|
||||
this.activeBossHolder = activeBossHolder;
|
||||
|
@ -30,4 +29,12 @@ public class BossDeathEvent extends Event {
|
|||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public ActiveBossHolder getActiveBossHolder() {
|
||||
return this.activeBossHolder;
|
||||
}
|
||||
|
||||
public boolean isAutoSpawn() {
|
||||
return this.autoSpawn;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package com.songoda.epicbosses.events;
|
||||
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import com.songoda.epicbosses.skills.interfaces.ISkillHandler;
|
||||
import com.songoda.epicbosses.skills.Skill;
|
||||
import lombok.Getter;
|
||||
import com.songoda.epicbosses.skills.interfaces.ISkillHandler;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
|
@ -16,9 +15,9 @@ public class BossSkillEvent extends Event {
|
|||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Getter private ActiveBossHolder activeBossHolder;
|
||||
@Getter private ISkillHandler skillHandler;
|
||||
@Getter private Skill skill;
|
||||
private ActiveBossHolder activeBossHolder;
|
||||
private ISkillHandler skillHandler;
|
||||
private Skill skill;
|
||||
|
||||
public BossSkillEvent(ActiveBossHolder activeBossHolder, ISkillHandler skillHandler, Skill skill) {
|
||||
this.activeBossHolder = activeBossHolder;
|
||||
|
@ -34,4 +33,16 @@ public class BossSkillEvent extends Event {
|
|||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public ActiveBossHolder getActiveBossHolder() {
|
||||
return this.activeBossHolder;
|
||||
}
|
||||
|
||||
public ISkillHandler getSkillHandler() {
|
||||
return this.skillHandler;
|
||||
}
|
||||
|
||||
public Skill getSkill() {
|
||||
return this.skill;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.songoda.epicbosses.events;
|
||||
|
||||
import lombok.Getter;
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
@ -14,8 +13,8 @@ public class BossSpawnEvent extends Event {
|
|||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Getter private final ActiveBossHolder activeBossHolder;
|
||||
@Getter private final boolean autoSpawn;
|
||||
private final ActiveBossHolder activeBossHolder;
|
||||
private final boolean autoSpawn;
|
||||
|
||||
public BossSpawnEvent(ActiveBossHolder activeBossHolder, boolean autoSpawn) {
|
||||
this.activeBossHolder = activeBossHolder;
|
||||
|
@ -30,4 +29,12 @@ public class BossSpawnEvent extends Event {
|
|||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public ActiveBossHolder getActiveBossHolder() {
|
||||
return this.activeBossHolder;
|
||||
}
|
||||
|
||||
public boolean isAutoSpawn() {
|
||||
return this.autoSpawn;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.songoda.epicbosses.events;
|
||||
|
||||
import lombok.Getter;
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -16,9 +15,9 @@ public class PreBossDeathEvent extends Event {
|
|||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Getter private ActiveBossHolder activeBossHolder;
|
||||
@Getter private Location location;
|
||||
@Getter private Player killer;
|
||||
private ActiveBossHolder activeBossHolder;
|
||||
private Location location;
|
||||
private Player killer;
|
||||
|
||||
public PreBossDeathEvent(ActiveBossHolder activeBossHolder, Location location, Player killer) {
|
||||
this.activeBossHolder = activeBossHolder;
|
||||
|
@ -34,4 +33,16 @@ public class PreBossDeathEvent extends Event {
|
|||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public ActiveBossHolder getActiveBossHolder() {
|
||||
return this.activeBossHolder;
|
||||
}
|
||||
|
||||
public Location getLocation() {
|
||||
return this.location;
|
||||
}
|
||||
|
||||
public Player getKiller() {
|
||||
return this.killer;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.songoda.epicbosses.events;
|
||||
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import lombok.Getter;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
@ -15,8 +14,8 @@ public class PreBossSkillEvent extends Event {
|
|||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Getter private LivingEntity livingEntityDamaged, damagingEntity;
|
||||
@Getter private ActiveBossHolder activeBossHolder;
|
||||
private LivingEntity livingEntityDamaged, damagingEntity;
|
||||
private ActiveBossHolder activeBossHolder;
|
||||
|
||||
public PreBossSkillEvent(ActiveBossHolder activeBossHolder, LivingEntity livingEntity, LivingEntity damagingEntity) {
|
||||
this.activeBossHolder = activeBossHolder;
|
||||
|
@ -32,4 +31,16 @@ public class PreBossSkillEvent extends Event {
|
|||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public LivingEntity getLivingEntityDamaged() {
|
||||
return this.livingEntityDamaged;
|
||||
}
|
||||
|
||||
public LivingEntity getDamagingEntity() {
|
||||
return this.damagingEntity;
|
||||
}
|
||||
|
||||
public ActiveBossHolder getActiveBossHolder() {
|
||||
return this.activeBossHolder;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.songoda.epicbosses.events;
|
||||
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import lombok.Getter;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
|
@ -14,7 +13,7 @@ public class PreBossSpawnEvent extends Event {
|
|||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Getter private ActiveBossHolder activeBossHolder;
|
||||
private ActiveBossHolder activeBossHolder;
|
||||
|
||||
public PreBossSpawnEvent(ActiveBossHolder activeBossHolder) {
|
||||
this.activeBossHolder = activeBossHolder;
|
||||
|
@ -28,4 +27,8 @@ public class PreBossSpawnEvent extends Event {
|
|||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public ActiveBossHolder getActiveBossHolder() {
|
||||
return this.activeBossHolder;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package com.songoda.epicbosses.events;
|
||||
|
||||
import lombok.Getter;
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
|
@ -16,8 +14,8 @@ public class PreBossSpawnItemEvent extends PreBossSpawnEvent {
|
|||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Getter private ItemStack itemStackUsed;
|
||||
@Getter private Player player;
|
||||
private ItemStack itemStackUsed;
|
||||
private Player player;
|
||||
|
||||
public PreBossSpawnItemEvent(ActiveBossHolder activeBossHolder, Player player, ItemStack itemStackUsed) {
|
||||
super(activeBossHolder);
|
||||
|
@ -34,4 +32,12 @@ public class PreBossSpawnItemEvent extends PreBossSpawnEvent {
|
|||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public ItemStack getItemStackUsed() {
|
||||
return this.itemStackUsed;
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,9 +10,9 @@ import java.io.File;
|
|||
* @version 1.0.0
|
||||
* @since 11-Oct-18
|
||||
*/
|
||||
public class ConfigFileHandler extends YmlFileHandler {
|
||||
public class DisplayFileHandler extends YmlFileHandler {
|
||||
|
||||
public ConfigFileHandler(JavaPlugin javaPlugin) {
|
||||
super(javaPlugin, true, new File(javaPlugin.getDataFolder(), "config.yml"));
|
||||
public DisplayFileHandler(JavaPlugin javaPlugin) {
|
||||
super(javaPlugin, true, new File(javaPlugin.getDataFolder(), "display.yml"));
|
||||
}
|
||||
}
|
|
@ -5,8 +5,6 @@ import com.google.gson.GsonBuilder;
|
|||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.songoda.epicbosses.utils.file.FileHandler;
|
||||
import com.songoda.epicbosses.utils.file.FileUtils;
|
||||
import com.songoda.epicbosses.utils.file.IFileHandler;
|
||||
import com.songoda.epicbosses.utils.itemstack.holder.ItemStackHolder;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import com.google.gson.Gson;
|
|||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.entity.MinionEntity;
|
||||
import com.songoda.epicbosses.utils.file.FileHandler;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.handlers;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.autospawns.AutoSpawn;
|
||||
import com.songoda.epicbosses.autospawns.types.IntervalSpawnElement;
|
||||
|
@ -8,8 +8,6 @@ import com.songoda.epicbosses.managers.files.AutoSpawnFileManager;
|
|||
import com.songoda.epicbosses.utils.IHandler;
|
||||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import com.songoda.epicbosses.utils.panel.base.IVariablePanelHandler;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
@ -25,14 +23,14 @@ import java.util.UUID;
|
|||
*/
|
||||
public abstract class AutoSpawnVariableHandler implements IHandler {
|
||||
|
||||
@Getter private final IVariablePanelHandler<AutoSpawn> panelHandler;
|
||||
private final IVariablePanelHandler<AutoSpawn> panelHandler;
|
||||
|
||||
@Getter private final IntervalSpawnElement intervalSpawnElement;
|
||||
@Getter private final AutoSpawnFileManager autoSpawnFileManager;
|
||||
@Getter private final AutoSpawn autoSpawn;
|
||||
@Getter private final Player player;
|
||||
private final IntervalSpawnElement intervalSpawnElement;
|
||||
private final AutoSpawnFileManager autoSpawnFileManager;
|
||||
private final AutoSpawn autoSpawn;
|
||||
private final Player player;
|
||||
|
||||
@Getter @Setter private boolean handled = false;
|
||||
private boolean handled = false;
|
||||
private Listener listener;
|
||||
|
||||
public AutoSpawnVariableHandler(Player player, AutoSpawn autoSpawn, IntervalSpawnElement intervalSpawnElement, AutoSpawnFileManager autoSpawnFileManager, IVariablePanelHandler<AutoSpawn> panelHandler) {
|
||||
|
@ -69,7 +67,7 @@ public abstract class AutoSpawnVariableHandler implements IHandler {
|
|||
}
|
||||
|
||||
if(input == null) {
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(CustomBosses.get(), AutoSpawnVariableHandler.this::finish);
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(EpicBosses.getInstance(), AutoSpawnVariableHandler.this::finish);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -80,7 +78,7 @@ public abstract class AutoSpawnVariableHandler implements IHandler {
|
|||
event.setCancelled(true);
|
||||
setHandled(true);
|
||||
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(CustomBosses.get(), AutoSpawnVariableHandler.this::finish);
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(EpicBosses.getInstance(), AutoSpawnVariableHandler.this::finish);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -89,4 +87,32 @@ public abstract class AutoSpawnVariableHandler implements IHandler {
|
|||
AsyncPlayerChatEvent.getHandlerList().unregister(this.listener);
|
||||
getPanelHandler().openFor(getPlayer(), getAutoSpawn());
|
||||
}
|
||||
|
||||
public IVariablePanelHandler<AutoSpawn> getPanelHandler() {
|
||||
return this.panelHandler;
|
||||
}
|
||||
|
||||
public IntervalSpawnElement getIntervalSpawnElement() {
|
||||
return this.intervalSpawnElement;
|
||||
}
|
||||
|
||||
public AutoSpawnFileManager getAutoSpawnFileManager() {
|
||||
return this.autoSpawnFileManager;
|
||||
}
|
||||
|
||||
public AutoSpawn getAutoSpawn() {
|
||||
return this.autoSpawn;
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
public boolean isHandled() {
|
||||
return this.handled;
|
||||
}
|
||||
|
||||
public void setHandled(boolean handled) {
|
||||
this.handled = handled;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package com.songoda.epicbosses.handlers;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.entity.elements.EntityStatsElement;
|
||||
import com.songoda.epicbosses.managers.files.BossesFileManager;
|
||||
import com.songoda.epicbosses.utils.IHandler;
|
||||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import com.songoda.epicbosses.utils.panel.base.ISubVariablePanelHandler;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
@ -24,14 +22,14 @@ import java.util.UUID;
|
|||
*/
|
||||
public class BossDisplayNameHandler implements IHandler {
|
||||
|
||||
@Getter private final ISubVariablePanelHandler<BossEntity, EntityStatsElement> panelHandler;
|
||||
private final ISubVariablePanelHandler<BossEntity, EntityStatsElement> panelHandler;
|
||||
|
||||
@Getter private final EntityStatsElement entityStatsElement;
|
||||
@Getter private final BossesFileManager bossesFileManager;
|
||||
@Getter private final BossEntity bossEntity;
|
||||
@Getter private final Player player;
|
||||
private final EntityStatsElement entityStatsElement;
|
||||
private final BossesFileManager bossesFileManager;
|
||||
private final BossEntity bossEntity;
|
||||
private final Player player;
|
||||
|
||||
@Getter @Setter private boolean handled = false;
|
||||
private boolean handled = false;
|
||||
private Listener listener;
|
||||
|
||||
public BossDisplayNameHandler(Player player, BossEntity bossEntity, EntityStatsElement entityStatsElement, BossesFileManager bossesFileManager, ISubVariablePanelHandler<BossEntity, EntityStatsElement> panelHandler) {
|
||||
|
@ -70,7 +68,7 @@ public class BossDisplayNameHandler implements IHandler {
|
|||
event.setCancelled(true);
|
||||
setHandled(true);
|
||||
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(CustomBosses.get(), BossDisplayNameHandler.this::finish);
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(EpicBosses.getInstance(), BossDisplayNameHandler.this::finish);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -79,4 +77,32 @@ public class BossDisplayNameHandler implements IHandler {
|
|||
AsyncPlayerChatEvent.getHandlerList().unregister(this.listener);
|
||||
getPanelHandler().openFor(getPlayer(), getBossEntity(), getEntityStatsElement());
|
||||
}
|
||||
|
||||
public ISubVariablePanelHandler<BossEntity, EntityStatsElement> getPanelHandler() {
|
||||
return this.panelHandler;
|
||||
}
|
||||
|
||||
public EntityStatsElement getEntityStatsElement() {
|
||||
return this.entityStatsElement;
|
||||
}
|
||||
|
||||
public BossesFileManager getBossesFileManager() {
|
||||
return this.bossesFileManager;
|
||||
}
|
||||
|
||||
public BossEntity getBossEntity() {
|
||||
return this.bossEntity;
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
public boolean isHandled() {
|
||||
return this.handled;
|
||||
}
|
||||
|
||||
public void setHandled(boolean handled) {
|
||||
this.handled = handled;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.handlers;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.managers.files.BossesFileManager;
|
||||
|
@ -9,8 +9,6 @@ import com.songoda.epicbosses.utils.Message;
|
|||
import com.songoda.epicbosses.utils.NumberUtils;
|
||||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import com.songoda.epicbosses.utils.panel.base.IVariablePanelHandler;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
@ -26,13 +24,13 @@ import java.util.UUID;
|
|||
*/
|
||||
public class BossShopPriceHandler implements IHandler {
|
||||
|
||||
@Getter private final IVariablePanelHandler<BossEntity> panelHandler;
|
||||
private final IVariablePanelHandler<BossEntity> panelHandler;
|
||||
|
||||
@Getter private final BossesFileManager bossesFileManager;
|
||||
@Getter private final BossEntity bossEntity;
|
||||
@Getter private final Player player;
|
||||
private final BossesFileManager bossesFileManager;
|
||||
private final BossEntity bossEntity;
|
||||
private final Player player;
|
||||
|
||||
@Getter @Setter private boolean handled = false;
|
||||
private boolean handled = false;
|
||||
private Listener listener;
|
||||
|
||||
public BossShopPriceHandler(Player player, BossEntity bossEntity, BossesFileManager bossesFileManager, IVariablePanelHandler<BossEntity> panelHandler) {
|
||||
|
@ -74,7 +72,7 @@ public class BossShopPriceHandler implements IHandler {
|
|||
setHandled(true);
|
||||
Message.Boss_Edit_PriceSet.msg(getPlayer(), BossAPI.getBossEntityName(getBossEntity()), NumberUtils.get().formatDouble(amount));
|
||||
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(CustomBosses.get(), BossShopPriceHandler.this::finish);
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(EpicBosses.getInstance(), BossShopPriceHandler.this::finish);
|
||||
} else {
|
||||
Message.Boss_Edit_Price.msg(getPlayer(), BossAPI.getBossEntityName(getBossEntity()));
|
||||
}
|
||||
|
@ -86,4 +84,28 @@ public class BossShopPriceHandler implements IHandler {
|
|||
AsyncPlayerChatEvent.getHandlerList().unregister(this.listener);
|
||||
getPanelHandler().openFor(getPlayer(), getBossEntity());
|
||||
}
|
||||
|
||||
public IVariablePanelHandler<BossEntity> getPanelHandler() {
|
||||
return this.panelHandler;
|
||||
}
|
||||
|
||||
public BossesFileManager getBossesFileManager() {
|
||||
return this.bossesFileManager;
|
||||
}
|
||||
|
||||
public BossEntity getBossEntity() {
|
||||
return this.bossEntity;
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
public boolean isHandled() {
|
||||
return this.handled;
|
||||
}
|
||||
|
||||
public void setHandled(boolean handled) {
|
||||
this.handled = handled;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
package com.songoda.epicbosses.handlers;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.managers.files.SkillsFileManager;
|
||||
import com.songoda.epicbosses.skills.Skill;
|
||||
import com.songoda.epicbosses.utils.IHandler;
|
||||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import com.songoda.epicbosses.utils.panel.base.IVariablePanelHandler;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
@ -23,12 +21,12 @@ import java.util.UUID;
|
|||
*/
|
||||
public class SkillDisplayNameHandler implements IHandler {
|
||||
|
||||
@Getter private final IVariablePanelHandler<Skill> panelHandler;
|
||||
@Getter private final SkillsFileManager skillsFileManager;
|
||||
@Getter private final Player player;
|
||||
@Getter private final Skill skill;
|
||||
private final IVariablePanelHandler<Skill> panelHandler;
|
||||
private final SkillsFileManager skillsFileManager;
|
||||
private final Player player;
|
||||
private final Skill skill;
|
||||
|
||||
@Getter @Setter private boolean handled = false;
|
||||
private boolean handled = false;
|
||||
private Listener listener;
|
||||
|
||||
public SkillDisplayNameHandler(Player player, Skill skill, SkillsFileManager skillsFileManager, IVariablePanelHandler<Skill> panelHandler) {
|
||||
|
@ -66,7 +64,7 @@ public class SkillDisplayNameHandler implements IHandler {
|
|||
event.setCancelled(true);
|
||||
setHandled(true);
|
||||
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(CustomBosses.get(), SkillDisplayNameHandler.this::finish);
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(EpicBosses.getInstance(), SkillDisplayNameHandler.this::finish);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -75,4 +73,28 @@ public class SkillDisplayNameHandler implements IHandler {
|
|||
AsyncPlayerChatEvent.getHandlerList().unregister(this.listener);
|
||||
getPanelHandler().openFor(getPlayer(), getSkill());
|
||||
}
|
||||
|
||||
public IVariablePanelHandler<Skill> getPanelHandler() {
|
||||
return this.panelHandler;
|
||||
}
|
||||
|
||||
public SkillsFileManager getSkillsFileManager() {
|
||||
return this.skillsFileManager;
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
public Skill getSkill() {
|
||||
return this.skill;
|
||||
}
|
||||
|
||||
public boolean isHandled() {
|
||||
return this.handled;
|
||||
}
|
||||
|
||||
public void setHandled(boolean handled) {
|
||||
this.handled = handled;
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.handlers.droptable;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.handlers.IGetDropTableListItem;
|
||||
import com.songoda.epicbosses.managers.files.ItemsFileManager;
|
||||
|
@ -17,7 +17,7 @@ public class GetDropTableItemStack implements IGetDropTableListItem<ItemStack> {
|
|||
|
||||
private ItemsFileManager itemsFileManager;
|
||||
|
||||
public GetDropTableItemStack(CustomBosses plugin) {
|
||||
public GetDropTableItemStack(EpicBosses plugin) {
|
||||
this.itemsFileManager = plugin.getItemStackManager();
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.songoda.epicbosses.holder;
|
|||
|
||||
import com.songoda.epicbosses.autospawns.AutoSpawn;
|
||||
import com.songoda.epicbosses.autospawns.SpawnType;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -14,10 +13,10 @@ import java.util.List;
|
|||
*/
|
||||
public class ActiveAutoSpawnHolder {
|
||||
|
||||
@Getter private final SpawnType spawnType;
|
||||
@Getter private final AutoSpawn autoSpawn;
|
||||
private final SpawnType spawnType;
|
||||
private final AutoSpawn autoSpawn;
|
||||
|
||||
@Getter private List<ActiveBossHolder> activeBossHolders = new ArrayList<>();
|
||||
private List<ActiveBossHolder> activeBossHolders = new ArrayList<>();
|
||||
|
||||
public ActiveAutoSpawnHolder(SpawnType spawnType, AutoSpawn autoSpawn) {
|
||||
this.autoSpawn = autoSpawn;
|
||||
|
@ -36,4 +35,15 @@ public class ActiveAutoSpawnHolder {
|
|||
this.activeBossHolders.clear();
|
||||
}
|
||||
|
||||
public SpawnType getSpawnType() {
|
||||
return this.spawnType;
|
||||
}
|
||||
|
||||
public AutoSpawn getAutoSpawn() {
|
||||
return this.autoSpawn;
|
||||
}
|
||||
|
||||
public List<ActiveBossHolder> getActiveBossHolders() {
|
||||
return this.activeBossHolders;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
package com.songoda.epicbosses.holder;
|
||||
|
||||
import com.songoda.epicbosses.listeners.IBossDeathHandler;
|
||||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import com.songoda.epicbosses.targeting.TargetHandler;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.exception.AlreadySetException;
|
||||
import org.bukkit.Bukkit;
|
||||
import com.songoda.epicbosses.listeners.IBossDeathHandler;
|
||||
import com.songoda.epicbosses.targeting.TargetHandler;
|
||||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Entity;
|
||||
|
@ -23,18 +20,18 @@ import java.util.*;
|
|||
*/
|
||||
public class ActiveBossHolder implements IActiveHolder {
|
||||
|
||||
@Getter private final BossEntity bossEntity;
|
||||
@Getter private final Location location;
|
||||
@Getter private final String name;
|
||||
private final BossEntity bossEntity;
|
||||
private final Location location;
|
||||
private final String name;
|
||||
|
||||
@Getter private Map<Integer, ActiveMinionHolder> activeMinionHolderMap = new HashMap<>();
|
||||
@Getter private Map<Integer, UUID> livingEntityMap = new HashMap<>();
|
||||
@Getter private List<IBossDeathHandler> postBossDeathHandlers = new ArrayList<>();
|
||||
@Getter private Map<UUID, Double> mapOfDamagingUsers = new HashMap<>();
|
||||
@Getter private String spawningPlayerName;
|
||||
private Map<Integer, ActiveMinionHolder> activeMinionHolderMap = new HashMap<>();
|
||||
private Map<Integer, UUID> livingEntityMap = new HashMap<>();
|
||||
private List<IBossDeathHandler> postBossDeathHandlers = new ArrayList<>();
|
||||
private Map<UUID, Double> mapOfDamagingUsers = new HashMap<>();
|
||||
private String spawningPlayerName;
|
||||
|
||||
@Getter @Setter private TargetHandler<ActiveBossHolder> targetHandler = null;
|
||||
@Getter @Setter private boolean isDead = false, customSpawnMessage = false;
|
||||
private TargetHandler<ActiveBossHolder> targetHandler = null;
|
||||
private boolean isDead = false, customSpawnMessage = false;
|
||||
|
||||
public ActiveBossHolder(BossEntity bossEntity, Location spawnLocation, String name, Player spawningPlayer) {
|
||||
this.location = spawnLocation;
|
||||
|
@ -100,4 +97,60 @@ public class ActiveBossHolder implements IActiveHolder {
|
|||
this.livingEntityMap.clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
public BossEntity getBossEntity() {
|
||||
return this.bossEntity;
|
||||
}
|
||||
|
||||
public Location getLocation() {
|
||||
return this.location;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public Map<Integer, ActiveMinionHolder> getActiveMinionHolderMap() {
|
||||
return this.activeMinionHolderMap;
|
||||
}
|
||||
|
||||
public Map<Integer, UUID> getLivingEntityMap() {
|
||||
return this.livingEntityMap;
|
||||
}
|
||||
|
||||
public List<IBossDeathHandler> getPostBossDeathHandlers() {
|
||||
return this.postBossDeathHandlers;
|
||||
}
|
||||
|
||||
public Map<UUID, Double> getMapOfDamagingUsers() {
|
||||
return this.mapOfDamagingUsers;
|
||||
}
|
||||
|
||||
public String getSpawningPlayerName() {
|
||||
return this.spawningPlayerName;
|
||||
}
|
||||
|
||||
public TargetHandler<ActiveBossHolder> getTargetHandler() {
|
||||
return this.targetHandler;
|
||||
}
|
||||
|
||||
public boolean isDead() {
|
||||
return this.isDead;
|
||||
}
|
||||
|
||||
public boolean isCustomSpawnMessage() {
|
||||
return this.customSpawnMessage;
|
||||
}
|
||||
|
||||
public void setTargetHandler(TargetHandler<ActiveBossHolder> targetHandler) {
|
||||
this.targetHandler = targetHandler;
|
||||
}
|
||||
|
||||
public void setDead(boolean isDead) {
|
||||
this.isDead = isDead;
|
||||
}
|
||||
|
||||
public void setCustomSpawnMessage(boolean customSpawnMessage) {
|
||||
this.customSpawnMessage = customSpawnMessage;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,9 +3,6 @@ package com.songoda.epicbosses.holder;
|
|||
import com.songoda.epicbosses.entity.MinionEntity;
|
||||
import com.songoda.epicbosses.targeting.TargetHandler;
|
||||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
|
||||
|
@ -20,13 +17,13 @@ import java.util.UUID;
|
|||
*/
|
||||
public class ActiveMinionHolder implements IActiveHolder {
|
||||
|
||||
@Getter @Setter private TargetHandler<ActiveMinionHolder> targetHandler = null;
|
||||
private TargetHandler<ActiveMinionHolder> targetHandler = null;
|
||||
|
||||
@Getter private Map<Integer, UUID> livingEntityMap = new HashMap<>();
|
||||
@Getter private ActiveBossHolder activeBossHolder;
|
||||
@Getter private final MinionEntity minionEntity;
|
||||
@Getter private final Location location;
|
||||
@Getter private final String name;
|
||||
private Map<Integer, UUID> livingEntityMap = new HashMap<>();
|
||||
private ActiveBossHolder activeBossHolder;
|
||||
private final MinionEntity minionEntity;
|
||||
private final Location location;
|
||||
private final String name;
|
||||
|
||||
public ActiveMinionHolder(ActiveBossHolder activeBossHolder, MinionEntity minionEntity, Location spawnLocation, String name) {
|
||||
this.activeBossHolder = activeBossHolder;
|
||||
|
@ -87,4 +84,31 @@ public class ActiveMinionHolder implements IActiveHolder {
|
|||
return this.activeBossHolder.hasAttacked(uuid);
|
||||
}
|
||||
|
||||
public TargetHandler<ActiveMinionHolder> getTargetHandler() {
|
||||
return this.targetHandler;
|
||||
}
|
||||
|
||||
public Map<Integer, UUID> getLivingEntityMap() {
|
||||
return this.livingEntityMap;
|
||||
}
|
||||
|
||||
public ActiveBossHolder getActiveBossHolder() {
|
||||
return this.activeBossHolder;
|
||||
}
|
||||
|
||||
public MinionEntity getMinionEntity() {
|
||||
return this.minionEntity;
|
||||
}
|
||||
|
||||
public Location getLocation() {
|
||||
return this.location;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setTargetHandler(TargetHandler<ActiveMinionHolder> targetHandler) {
|
||||
this.targetHandler = targetHandler;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.songoda.epicbosses.holder;
|
||||
|
||||
import lombok.Getter;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import org.bukkit.Location;
|
||||
|
||||
|
@ -14,9 +13,9 @@ import java.util.UUID;
|
|||
*/
|
||||
public class DeadBossHolder {
|
||||
|
||||
@Getter private final Map<UUID, Double> sortedDamageMap, percentageMap;
|
||||
@Getter private final BossEntity bossEntity;
|
||||
@Getter private final Location location;
|
||||
private final Map<UUID, Double> sortedDamageMap, percentageMap;
|
||||
private final BossEntity bossEntity;
|
||||
private final Location location;
|
||||
|
||||
public DeadBossHolder(BossEntity bossEntity, Location deathLocation, Map<UUID, Double> sortedDamageMap, Map<UUID, Double> percentageMap) {
|
||||
this.location = deathLocation;
|
||||
|
@ -25,4 +24,19 @@ public class DeadBossHolder {
|
|||
this.percentageMap = percentageMap;
|
||||
}
|
||||
|
||||
public Map<UUID, Double> getSortedDamageMap() {
|
||||
return this.sortedDamageMap;
|
||||
}
|
||||
|
||||
public Map<UUID, Double> getPercentageMap() {
|
||||
return this.percentageMap;
|
||||
}
|
||||
|
||||
public BossEntity getBossEntity() {
|
||||
return this.bossEntity;
|
||||
}
|
||||
|
||||
public Location getLocation() {
|
||||
return this.location;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,6 @@ import com.songoda.epicbosses.api.BossAPI;
|
|||
import com.songoda.epicbosses.autospawns.AutoSpawn;
|
||||
import com.songoda.epicbosses.autospawns.SpawnType;
|
||||
import com.songoda.epicbosses.autospawns.types.IntervalSpawnElement;
|
||||
import com.songoda.epicbosses.events.BossDeathEvent;
|
||||
import com.songoda.epicbosses.events.PreBossDeathEvent;
|
||||
import com.songoda.epicbosses.holder.ActiveAutoSpawnHolder;
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import com.songoda.epicbosses.listeners.IBossDeathHandler;
|
||||
|
@ -14,10 +12,7 @@ import com.songoda.epicbosses.utils.ObjectUtils;
|
|||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import com.songoda.epicbosses.utils.time.TimeUnit;
|
||||
import com.songoda.epicbosses.utils.time.TimeUtil;
|
||||
import lombok.Getter;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
/**
|
||||
|
@ -27,10 +22,10 @@ import org.bukkit.scheduler.BukkitTask;
|
|||
*/
|
||||
public class ActiveIntervalAutoSpawnHolder extends ActiveAutoSpawnHolder {
|
||||
|
||||
@Getter private final IntervalSpawnElement intervalSpawnElement;
|
||||
private final IntervalSpawnElement intervalSpawnElement;
|
||||
|
||||
@Getter private BukkitTask intervalTask = null;
|
||||
@Getter private long nextCompletedTime = 0L;
|
||||
private BukkitTask intervalTask = null;
|
||||
private long nextCompletedTime = 0L;
|
||||
|
||||
public ActiveIntervalAutoSpawnHolder(SpawnType spawnType, AutoSpawn autoSpawn) {
|
||||
super(spawnType, autoSpawn);
|
||||
|
@ -173,4 +168,16 @@ public class ActiveIntervalAutoSpawnHolder extends ActiveAutoSpawnHolder {
|
|||
|
||||
this.nextCompletedTime = System.currentTimeMillis() + delayMs;
|
||||
}
|
||||
|
||||
public IntervalSpawnElement getIntervalSpawnElement() {
|
||||
return this.intervalSpawnElement;
|
||||
}
|
||||
|
||||
public BukkitTask getIntervalTask() {
|
||||
return this.intervalTask;
|
||||
}
|
||||
|
||||
public long getNextCompletedTime() {
|
||||
return this.nextCompletedTime;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package com.songoda.epicbosses.listeners.after;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.droptable.DropTable;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.events.BossDeathEvent;
|
||||
import com.songoda.epicbosses.events.PreBossDeathEvent;
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import com.songoda.epicbosses.holder.DeadBossHolder;
|
||||
import com.songoda.epicbosses.listeners.IBossDeathHandler;
|
||||
import com.songoda.epicbosses.managers.BossEntityManager;
|
||||
import com.songoda.epicbosses.utils.Debug;
|
||||
import com.songoda.epicbosses.utils.MessageUtils;
|
||||
|
@ -16,13 +15,15 @@ import com.songoda.epicbosses.utils.ServerUtils;
|
|||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.EntityDeathEvent;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
|
@ -33,7 +34,7 @@ public class BossDeathListener implements Listener {
|
|||
|
||||
private BossEntityManager bossEntityManager;
|
||||
|
||||
public BossDeathListener(CustomBosses plugin) {
|
||||
public BossDeathListener(EpicBosses plugin) {
|
||||
this.bossEntityManager = plugin.getBossEntityManager();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.listeners.during;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.events.BossDamageEvent;
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import com.songoda.epicbosses.managers.BossEntityManager;
|
||||
|
@ -20,7 +20,7 @@ public class BossDamageListener implements Listener {
|
|||
|
||||
private BossEntityManager bossEntityManager;
|
||||
|
||||
public BossDamageListener(CustomBosses plugin) {
|
||||
public BossDamageListener(EpicBosses plugin) {
|
||||
this.bossEntityManager = plugin.getBossEntityManager();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
package com.songoda.epicbosses.listeners.during;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.events.BossDamageEvent;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import com.songoda.epicbosses.holder.ActiveMinionHolder;
|
||||
import com.songoda.epicbosses.managers.BossEntityManager;
|
||||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
|
||||
|
||||
/**
|
||||
|
@ -22,7 +19,7 @@ public class BossMinionTargetListener implements Listener {
|
|||
|
||||
private BossEntityManager bossEntityManager;
|
||||
|
||||
public BossMinionTargetListener(CustomBosses plugin) {
|
||||
public BossMinionTargetListener(EpicBosses plugin) {
|
||||
this.bossEntityManager = plugin.getBossEntityManager();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.listeners.during;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.events.PreBossSkillEvent;
|
||||
|
@ -16,13 +16,14 @@ import org.bukkit.entity.Entity;
|
|||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Projectile;
|
||||
import org.bukkit.entity.ThrownPotion;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
|
@ -35,7 +36,7 @@ public class BossSkillListener implements Listener {
|
|||
private SkillsFileManager skillsFileManager;
|
||||
private BossSkillManager bossSkillManager;
|
||||
|
||||
public BossSkillListener(CustomBosses plugin) {
|
||||
public BossSkillListener(EpicBosses plugin) {
|
||||
this.bossSkillManager = plugin.getBossSkillManager();
|
||||
this.bossEntityManager = plugin.getBossEntityManager();
|
||||
this.skillsFileManager = plugin.getSkillsFileManager();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.listeners.pre;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.events.BossSpawnEvent;
|
||||
|
@ -10,14 +10,9 @@ import com.songoda.epicbosses.holder.ActiveBossHolder;
|
|||
import com.songoda.epicbosses.managers.BossEntityManager;
|
||||
import com.songoda.epicbosses.managers.BossLocationManager;
|
||||
import com.songoda.epicbosses.managers.BossTauntManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.MessageUtils;
|
||||
import com.songoda.epicbosses.utils.NumberUtils;
|
||||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import com.songoda.epicbosses.utils.StringUtils;
|
||||
import com.songoda.epicbosses.utils.*;
|
||||
import com.songoda.epicbosses.utils.itemstack.ItemStackUtils;
|
||||
import com.songoda.epicbosses.utils.version.VersionHandler;
|
||||
import java.util.ArrayList;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
|
@ -30,6 +25,7 @@ import org.bukkit.event.block.Action;
|
|||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -45,11 +41,11 @@ public class BossSpawnListener implements Listener {
|
|||
private BossTauntManager bossTauntManager;
|
||||
private VersionHandler versionHandler;
|
||||
|
||||
public BossSpawnListener(CustomBosses customBosses) {
|
||||
this.versionHandler = customBosses.getVersionHandler();
|
||||
this.bossTauntManager = customBosses.getBossTauntManager();
|
||||
this.bossEntityManager = customBosses.getBossEntityManager();
|
||||
this.bossLocationManager = customBosses.getBossLocationManager();
|
||||
public BossSpawnListener(EpicBosses epicBosses) {
|
||||
this.versionHandler = epicBosses.getVersionHandler();
|
||||
this.bossTauntManager = epicBosses.getBossTauntManager();
|
||||
this.bossEntityManager = epicBosses.getBossEntityManager();
|
||||
this.bossLocationManager = epicBosses.getBossLocationManager();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.managers;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.autospawns.AutoSpawn;
|
||||
import com.songoda.epicbosses.autospawns.SpawnType;
|
||||
|
@ -27,7 +27,7 @@ public class AutoSpawnManager {
|
|||
|
||||
private AutoSpawnFileManager autoSpawnFileManager;
|
||||
|
||||
public AutoSpawnManager(CustomBosses plugin) {
|
||||
public AutoSpawnManager(EpicBosses plugin) {
|
||||
this.autoSpawnFileManager = plugin.getAutoSpawnFileManager();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package com.songoda.epicbosses.managers;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.commands.boss.*;
|
||||
import com.songoda.epicbosses.utils.Debug;
|
||||
import com.songoda.epicbosses.utils.ILoadable;
|
||||
import com.songoda.epicbosses.utils.IReloadable;
|
||||
import com.songoda.epicbosses.utils.command.SubCommandService;
|
||||
|
||||
/**
|
||||
|
@ -15,11 +16,11 @@ public class BossCommandManager implements ILoadable {
|
|||
|
||||
private SubCommandService<?> commandService;
|
||||
private boolean hasBeenLoaded = false;
|
||||
private CustomBosses customBosses;
|
||||
private EpicBosses epicBosses;
|
||||
|
||||
public BossCommandManager(SubCommandService<?> commandService, CustomBosses customBosses) {
|
||||
public BossCommandManager(SubCommandService<?> commandService, EpicBosses epicBosses) {
|
||||
this.commandService = commandService;
|
||||
this.customBosses = customBosses;
|
||||
this.epicBosses = epicBosses;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -29,24 +30,24 @@ public class BossCommandManager implements ILoadable {
|
|||
return;
|
||||
}
|
||||
|
||||
this.commandService.registerSubCommand(new BossCreateCmd(this.customBosses.getBossEntityContainer()));
|
||||
this.commandService.registerSubCommand(new BossDebugCmd(this.customBosses.getDebugManager()));
|
||||
this.commandService.registerSubCommand(new BossDropTableCmd(this.customBosses.getBossPanelManager()));
|
||||
this.commandService.registerSubCommand(new BossEditCmd(this.customBosses.getBossPanelManager(), this.customBosses.getBossEntityContainer()));
|
||||
this.commandService.registerSubCommand(new BossGiveEggCmd(this.customBosses.getBossesFileManager(), this.customBosses.getBossEntityManager()));
|
||||
this.commandService.registerSubCommand(new BossCreateCmd(this.epicBosses.getBossEntityContainer()));
|
||||
this.commandService.registerSubCommand(new BossDebugCmd(this.epicBosses.getDebugManager()));
|
||||
this.commandService.registerSubCommand(new BossDropTableCmd(this.epicBosses.getBossPanelManager()));
|
||||
this.commandService.registerSubCommand(new BossEditCmd(this.epicBosses.getBossPanelManager(), this.epicBosses.getBossEntityContainer()));
|
||||
this.commandService.registerSubCommand(new BossGiveEggCmd(this.epicBosses.getBossesFileManager(), this.epicBosses.getBossEntityManager()));
|
||||
this.commandService.registerSubCommand(new BossHelpCmd());
|
||||
this.commandService.registerSubCommand(new BossInfoCmd(this.customBosses.getBossesFileManager(), this.customBosses.getBossEntityManager()));
|
||||
this.commandService.registerSubCommand(new BossItemsCmd(this.customBosses.getBossPanelManager()));
|
||||
this.commandService.registerSubCommand(new BossKillAllCmd(this.customBosses.getBossEntityManager()));
|
||||
this.commandService.registerSubCommand(new BossListCmd(this.customBosses.getBossPanelManager()));
|
||||
this.commandService.registerSubCommand(new BossMenuCmd(this.customBosses.getBossPanelManager()));
|
||||
this.commandService.registerSubCommand(new BossNearbyCmd(this.customBosses));
|
||||
this.commandService.registerSubCommand(new BossNewCmd(this.customBosses));
|
||||
this.commandService.registerSubCommand(new BossReloadCmd(this.customBosses, this.customBosses.getBossEntityManager()));
|
||||
this.commandService.registerSubCommand(new BossShopCmd(this.customBosses));
|
||||
this.commandService.registerSubCommand(new BossSkillsCmd(this.customBosses.getBossPanelManager()));
|
||||
this.commandService.registerSubCommand(new BossSpawnCmd(this.customBosses.getBossesFileManager()));
|
||||
this.commandService.registerSubCommand(new BossTimeCmd(this.customBosses));
|
||||
this.commandService.registerSubCommand(new BossInfoCmd(this.epicBosses.getBossesFileManager(), this.epicBosses.getBossEntityManager()));
|
||||
this.commandService.registerSubCommand(new BossItemsCmd(this.epicBosses.getBossPanelManager()));
|
||||
this.commandService.registerSubCommand(new BossKillAllCmd(this.epicBosses.getBossEntityManager()));
|
||||
this.commandService.registerSubCommand(new BossListCmd(this.epicBosses.getBossPanelManager()));
|
||||
this.commandService.registerSubCommand(new BossMenuCmd(this.epicBosses.getBossPanelManager()));
|
||||
this.commandService.registerSubCommand(new BossNearbyCmd(this.epicBosses));
|
||||
this.commandService.registerSubCommand(new BossNewCmd(this.epicBosses));
|
||||
this.commandService.registerSubCommand(new BossReloadCmd(this.epicBosses, this.epicBosses.getBossEntityManager()));
|
||||
this.commandService.registerSubCommand(new BossShopCmd(this.epicBosses));
|
||||
this.commandService.registerSubCommand(new BossSkillsCmd(this.epicBosses.getBossPanelManager()));
|
||||
this.commandService.registerSubCommand(new BossSpawnCmd(this.epicBosses.getBossesFileManager()));
|
||||
this.commandService.registerSubCommand(new BossTimeCmd(this.epicBosses));
|
||||
|
||||
this.hasBeenLoaded = true;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.songoda.epicbosses.managers;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.droptable.elements.DropTableElement;
|
||||
import com.songoda.epicbosses.droptable.elements.GiveTableElement;
|
||||
import com.songoda.epicbosses.droptable.elements.GiveTableSubElement;
|
||||
|
@ -10,15 +9,11 @@ import com.songoda.epicbosses.handlers.IGetDropTableListItem;
|
|||
import com.songoda.epicbosses.handlers.droptable.GetDropTableCommand;
|
||||
import com.songoda.epicbosses.handlers.droptable.GetDropTableItemStack;
|
||||
import com.songoda.epicbosses.holder.DeadBossHolder;
|
||||
import com.songoda.epicbosses.managers.files.ItemsFileManager;
|
||||
import com.songoda.epicbosses.utils.Debug;
|
||||
import com.songoda.epicbosses.utils.NumberUtils;
|
||||
import com.songoda.epicbosses.utils.RandomUtils;
|
||||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import com.songoda.epicbosses.utils.itemstack.holder.ItemStackHolder;
|
||||
import lombok.Getter;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
|
@ -31,12 +26,12 @@ import java.util.*;
|
|||
*/
|
||||
public class BossDropTableManager {
|
||||
|
||||
@Getter private final List<String> validDropTableTypes = Arrays.asList("SPRAY", "DROP", "GIVE");
|
||||
private final List<String> validDropTableTypes = Arrays.asList("SPRAY", "DROP", "GIVE");
|
||||
|
||||
private final IGetDropTableListItem<ItemStack> getDropTableItemStack;
|
||||
private final IGetDropTableListItem<List<String>> getDropTableCommand;
|
||||
|
||||
public BossDropTableManager(CustomBosses plugin) {
|
||||
public BossDropTableManager(EpicBosses plugin) {
|
||||
this.getDropTableItemStack = new GetDropTableItemStack(plugin);
|
||||
this.getDropTableCommand = new GetDropTableCommand();
|
||||
}
|
||||
|
@ -175,4 +170,7 @@ public class BossDropTableManager {
|
|||
return newListToMerge;
|
||||
}
|
||||
|
||||
public List<String> getValidDropTableTypes() {
|
||||
return this.validDropTableTypes;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.songoda.epicbosses.managers;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.droptable.DropTable;
|
||||
import com.songoda.epicbosses.droptable.elements.DropTableElement;
|
||||
|
@ -17,14 +17,12 @@ import com.songoda.epicbosses.managers.files.DropTableFileManager;
|
|||
import com.songoda.epicbosses.managers.files.ItemsFileManager;
|
||||
import com.songoda.epicbosses.managers.files.MinionsFileManager;
|
||||
import com.songoda.epicbosses.skills.Skill;
|
||||
import com.songoda.epicbosses.skills.custom.Minions;
|
||||
import com.songoda.epicbosses.skills.elements.CustomMinionSkillElement;
|
||||
import com.songoda.epicbosses.utils.BossesGson;
|
||||
import com.songoda.epicbosses.utils.Debug;
|
||||
import com.songoda.epicbosses.utils.RandomUtils;
|
||||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import com.songoda.epicbosses.utils.itemstack.holder.ItemStackHolder;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Item;
|
||||
|
@ -55,15 +53,15 @@ public class BossEntityManager {
|
|||
private BossesFileManager bossesFileManager;
|
||||
private BossTargetManager bossTargetManager;
|
||||
|
||||
public BossEntityManager(CustomBosses customBosses) {
|
||||
this.minionMechanicManager = customBosses.getMinionMechanicManager();
|
||||
this.dropTableFileManager = customBosses.getDropTableFileManager();
|
||||
this.bossDropTableManager = customBosses.getBossDropTableManager();
|
||||
this.bossMechanicManager = customBosses.getBossMechanicManager();
|
||||
this.minionsFileManager = customBosses.getMinionsFileManager();
|
||||
this.bossItemFileManager = customBosses.getItemStackManager();
|
||||
this.bossesFileManager = customBosses.getBossesFileManager();
|
||||
this.bossTargetManager = customBosses.getBossTargetManager();
|
||||
public BossEntityManager(EpicBosses epicBosses) {
|
||||
this.minionMechanicManager = epicBosses.getMinionMechanicManager();
|
||||
this.dropTableFileManager = epicBosses.getDropTableFileManager();
|
||||
this.bossDropTableManager = epicBosses.getBossDropTableManager();
|
||||
this.bossMechanicManager = epicBosses.getBossMechanicManager();
|
||||
this.minionsFileManager = epicBosses.getMinionsFileManager();
|
||||
this.bossItemFileManager = epicBosses.getItemStackManager();
|
||||
this.bossesFileManager = epicBosses.getBossesFileManager();
|
||||
this.bossTargetManager = epicBosses.getBossTargetManager();
|
||||
}
|
||||
|
||||
public double getRadius(ActiveBossHolder activeBossHolder, Location centerLocation) {
|
||||
|
@ -117,7 +115,7 @@ public class BossEntityManager {
|
|||
}
|
||||
}
|
||||
|
||||
CustomBosses.get().getAutoSpawnManager().clearAutoSpawns();
|
||||
EpicBosses.getInstance().getAutoSpawnManager().clearAutoSpawns();
|
||||
|
||||
return amountOfBosses;
|
||||
}
|
||||
|
|
|
@ -1,24 +1,17 @@
|
|||
package com.songoda.epicbosses.managers;
|
||||
|
||||
import com.songoda.epicbosses.utils.Versions;
|
||||
import com.songoda.epicbosses.utils.dependencies.WorldGuardHelper;
|
||||
import com.songoda.epicbosses.utils.version.VersionHandler;
|
||||
import lombok.Getter;
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.utils.IASkyblockHelper;
|
||||
import com.songoda.epicbosses.utils.IFactionHelper;
|
||||
import com.songoda.epicbosses.utils.IReloadable;
|
||||
import com.songoda.epicbosses.utils.IWorldGuardHelper;
|
||||
import com.songoda.epicbosses.utils.dependencies.ASkyblockHelper;
|
||||
import utils.factions.FactionsM;
|
||||
import utils.factions.FactionsOne;
|
||||
import utils.factions.FactionsUUID;
|
||||
import utils.factions.LegacyFactions;
|
||||
import com.songoda.epicbosses.utils.dependencies.WorldGuardLegacyHelper;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import utils.factions.FactionsM;
|
||||
import utils.factions.FactionsOne;
|
||||
import utils.factions.FactionsUUID;
|
||||
import utils.factions.LegacyFactions;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -27,82 +20,87 @@ import java.util.List;
|
|||
* @version 1.0.0
|
||||
* @since 16-Oct-18
|
||||
*/
|
||||
public class BossHookManager implements IReloadable {
|
||||
public class BossHookManager {
|
||||
|
||||
@Getter private boolean askyblockEnabled, factionsEnabled, stackmobEnabled, worldguardEnabled;
|
||||
@Getter private List<String> worldGuardSpawnRegions, worldguardBlockedRegions;
|
||||
@Getter private boolean askyblockOwnIsland, factionWarzone;
|
||||
private boolean askyblockEnabled, factionsEnabled;
|
||||
private boolean askyblockOwnIsland, factionWarzone;
|
||||
|
||||
@Getter private IWorldGuardHelper worldGuardHelper;
|
||||
@Getter private IASkyblockHelper aSkyblockHelper;
|
||||
@Getter private IFactionHelper factionHelper;
|
||||
private IASkyblockHelper aSkyblockHelper;
|
||||
private IFactionHelper factionHelper;
|
||||
|
||||
private final CustomBosses plugin;
|
||||
private final EpicBosses plugin;
|
||||
|
||||
public BossHookManager(CustomBosses customBosses) {
|
||||
this.plugin = customBosses;
|
||||
public BossHookManager(EpicBosses epicBosses) {
|
||||
this.plugin = epicBosses;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
FileConfiguration config = this.plugin.getConfig();
|
||||
ConfigurationSection askyblock = config.getConfigurationSection("Hooks.ASkyBlock");
|
||||
ConfigurationSection factions = config.getConfigurationSection("Hooks.Factions");
|
||||
ConfigurationSection stackMob = config.getConfigurationSection("Hooks.StackMob");
|
||||
ConfigurationSection worldGuard = config.getConfigurationSection("Hooks.WorldGuard");
|
||||
|
||||
this.askyblockEnabled = askyblock.getBoolean("enabled", false);
|
||||
this.factionsEnabled = factions.getBoolean("enabled", false);
|
||||
this.stackmobEnabled = stackMob.getBoolean("enabled", false);
|
||||
this.worldguardEnabled = worldGuard.getBoolean("enabled", true);
|
||||
|
||||
this.worldGuardSpawnRegions = worldGuard.getStringList("spawnRegions");
|
||||
this.worldguardBlockedRegions = worldGuard.getStringList("blockedRegions");
|
||||
|
||||
this.askyblockOwnIsland = askyblock.getBoolean("onOwnIsland", false);
|
||||
this.factionWarzone = factions.getBoolean("useWarzoneSpawnRegion", false);
|
||||
|
||||
setupFactions();
|
||||
setupWorldGuard();
|
||||
setupAskyblock();
|
||||
}
|
||||
|
||||
private void setupAskyblock() {
|
||||
if(!isAskyblockEnabled()) return;
|
||||
if (!isAskyblockEnabled()) return;
|
||||
|
||||
this.aSkyblockHelper = new ASkyblockHelper();
|
||||
}
|
||||
|
||||
private void setupWorldGuard() {
|
||||
if(!isWorldguardEnabled()) return;
|
||||
|
||||
if (new VersionHandler().getVersion().isHigherThanOrEqualTo(Versions.v1_13_R1)) {
|
||||
this.worldGuardHelper = new WorldGuardHelper();
|
||||
} else {
|
||||
this.worldGuardHelper = new WorldGuardLegacyHelper();
|
||||
}
|
||||
}
|
||||
|
||||
private void setupFactions() {
|
||||
if(!isFactionsEnabled()) return;
|
||||
if (!isFactionsEnabled()) return;
|
||||
|
||||
if(Bukkit.getServer().getPluginManager().getPlugin("LegacyFactions") != null) {
|
||||
if (Bukkit.getServer().getPluginManager().getPlugin("LegacyFactions") != null) {
|
||||
this.factionHelper = new LegacyFactions();
|
||||
}
|
||||
|
||||
if(Bukkit.getServer().getPluginManager().getPlugin("Factions") == null) return;
|
||||
if (Bukkit.getServer().getPluginManager().getPlugin("Factions") == null) return;
|
||||
|
||||
Plugin factions = Bukkit.getServer().getPluginManager().getPlugin("Factions");
|
||||
String version = factions.getDescription().getVersion();
|
||||
String uuidVer = "1.6.";
|
||||
String oneVer = "1.8.";
|
||||
|
||||
if(version.startsWith(uuidVer)) {
|
||||
if (version.startsWith(uuidVer)) {
|
||||
this.factionHelper = new FactionsUUID();
|
||||
} else if(version.startsWith(oneVer)) {
|
||||
} else if (version.startsWith(oneVer)) {
|
||||
this.factionHelper = new FactionsOne();
|
||||
} else {
|
||||
this.factionHelper = new FactionsM();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isAskyblockEnabled() {
|
||||
return this.askyblockEnabled;
|
||||
}
|
||||
|
||||
public boolean isFactionsEnabled() {
|
||||
return this.factionsEnabled;
|
||||
}
|
||||
|
||||
public boolean isAskyblockOwnIsland() {
|
||||
return this.askyblockOwnIsland;
|
||||
}
|
||||
|
||||
//ToDo: This isnt even used 0.o
|
||||
public boolean isFactionWarzone() {
|
||||
return this.factionWarzone;
|
||||
}
|
||||
|
||||
public IFactionHelper getFactionHelper() {
|
||||
return factionHelper;
|
||||
}
|
||||
|
||||
public IASkyblockHelper getASkyblockHelper() {
|
||||
return this.aSkyblockHelper;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.managers;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.listeners.after.BossDeathListener;
|
||||
import com.songoda.epicbosses.listeners.during.BossDamageListener;
|
||||
import com.songoda.epicbosses.listeners.during.BossMinionTargetListener;
|
||||
|
@ -18,9 +18,9 @@ import com.songoda.epicbosses.utils.ServerUtils;
|
|||
public class BossListenerManager implements ILoadable {
|
||||
|
||||
private boolean hasBeenLoaded = false;
|
||||
private CustomBosses plugin;
|
||||
private EpicBosses plugin;
|
||||
|
||||
public BossListenerManager(CustomBosses plugin) {
|
||||
public BossListenerManager(EpicBosses plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.songoda.epicbosses.managers;
|
||||
|
||||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import lombok.Getter;
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.core.hooks.WorldGuardHook;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.utils.IReloadable;
|
||||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
@ -18,15 +18,15 @@ import java.util.List;
|
|||
*/
|
||||
public class BossLocationManager implements IReloadable {
|
||||
|
||||
@Getter private boolean useBlockedWorlds;
|
||||
@Getter private List<String> blockedWorlds;
|
||||
private boolean useBlockedWorlds;
|
||||
private List<String> blockedWorlds;
|
||||
|
||||
private final BossHookManager bossHookManager;
|
||||
private final CustomBosses plugin;
|
||||
private final EpicBosses plugin;
|
||||
|
||||
public BossLocationManager(CustomBosses customBosses) {
|
||||
this.bossHookManager = customBosses.getBossHookManager();
|
||||
this.plugin = customBosses;
|
||||
public BossLocationManager(EpicBosses epicBosses) {
|
||||
this.bossHookManager = epicBosses.getBossHookManager();
|
||||
this.plugin = epicBosses;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -38,13 +38,13 @@ public class BossLocationManager implements IReloadable {
|
|||
}
|
||||
|
||||
public boolean canSpawnBoss(Player player, Location location) {
|
||||
for(int x = location.getBlockX() - 2; x <= location.getBlockX() + 2; x++) {
|
||||
for(int y = location.getBlockY(); y <= location.getBlockY() + 2; y++) {
|
||||
for(int z = location.getBlockZ() - 2; z <= location.getBlockZ() + 2; z++) {
|
||||
for (int x = location.getBlockX() - 2; x <= location.getBlockX() + 2; x++) {
|
||||
for (int y = location.getBlockY(); y <= location.getBlockY() + 2; y++) {
|
||||
for (int z = location.getBlockZ() - 2; z <= location.getBlockZ() + 2; z++) {
|
||||
Location l = new Location(location.getWorld(), x, y, z);
|
||||
Block block = l.getBlock();
|
||||
|
||||
if(block.getType().isSolid()) {
|
||||
if (block.getType().isSolid()) {
|
||||
ServerUtils.get().logDebug("Unable to spawn boss due to needing a 5x3x5 area to spawn");
|
||||
return false;
|
||||
}
|
||||
|
@ -52,60 +52,36 @@ public class BossLocationManager implements IReloadable {
|
|||
}
|
||||
}
|
||||
|
||||
if(isUseBlockedWorlds()) {
|
||||
if(getBlockedWorlds().contains(location.getWorld().getName())) {
|
||||
if (isUseBlockedWorlds()) {
|
||||
if (getBlockedWorlds().contains(location.getWorld().getName())) {
|
||||
ServerUtils.get().logDebug("Unable to spawn boss due to world being in blocked worlds list");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(this.bossHookManager.isWorldguardEnabled() && this.bossHookManager.getWorldGuardHelper() != null) {
|
||||
List<String> currentRegions = this.bossHookManager.getWorldGuardHelper().getRegionNames(location);
|
||||
boolean blocked = false;
|
||||
|
||||
if(currentRegions != null) {
|
||||
for(String s : this.bossHookManager.getWorldguardBlockedRegions()) {
|
||||
if(currentRegions.contains(s)) {
|
||||
blocked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(blocked) {
|
||||
ServerUtils.get().logDebug("Unable to spawn boss due to worldguard region being in blocked list");
|
||||
if (WorldGuardHook.isEnabled()) {
|
||||
if (WorldGuardHook.getBooleanFlag(location, "boss-blocked-region")) {
|
||||
ServerUtils.get().logDebug("Unable to spawn boss due to worldguard region having the 'boss-blocked-region' flag");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(this.bossHookManager.isFactionsEnabled() && this.bossHookManager.getFactionHelper() != null) {
|
||||
if(!this.bossHookManager.getFactionHelper().isInWarzone(location)) {
|
||||
if (this.bossHookManager.isFactionsEnabled() && this.bossHookManager.getFactionHelper() != null) {
|
||||
if (!this.bossHookManager.getFactionHelper().isInWarzone(location)) {
|
||||
ServerUtils.get().logDebug("Unable to spawn boss due to being outside a factions warzone");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(this.bossHookManager.isWorldguardEnabled() && this.bossHookManager.getWorldGuardHelper() != null) {
|
||||
List<String> currentRegions = this.bossHookManager.getWorldGuardHelper().getRegionNames(location);
|
||||
boolean allowed = false;
|
||||
|
||||
if(currentRegions != null) {
|
||||
for(String s : this.bossHookManager.getWorldGuardSpawnRegions()) {
|
||||
if(currentRegions.contains(s)) {
|
||||
allowed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!allowed) {
|
||||
ServerUtils.get().logDebug("Unable to spawn boss due to worldguard region not being in the spawnable regions list");
|
||||
return false;
|
||||
}
|
||||
if (WorldGuardHook.isEnabled()) {
|
||||
if (!WorldGuardHook.getBooleanFlag(location, "boss-spawn-region")) {
|
||||
ServerUtils.get().logDebug("Unable to spawn boss due to worldguard region not being in the spawnable regions list");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(this.bossHookManager.isAskyblockEnabled() && this.bossHookManager.getASkyblockHelper() != null) {
|
||||
if(this.bossHookManager.isAskyblockOwnIsland()) {
|
||||
if (this.bossHookManager.isAskyblockEnabled() && this.bossHookManager.getASkyblockHelper() != null) {
|
||||
if (this.bossHookManager.isAskyblockOwnIsland()) {
|
||||
boolean canSpawn = this.bossHookManager.getASkyblockHelper().isOnOwnIsland(player);
|
||||
if (!canSpawn)
|
||||
ServerUtils.get().logDebug("Unable to spawn boss due to not being on own ASkyblock island");
|
||||
|
@ -116,4 +92,11 @@ public class BossLocationManager implements IReloadable {
|
|||
return true;
|
||||
}
|
||||
|
||||
public boolean isUseBlockedWorlds() {
|
||||
return this.useBlockedWorlds;
|
||||
}
|
||||
|
||||
public List<String> getBlockedWorlds() {
|
||||
return this.blockedWorlds;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package com.songoda.epicbosses.managers;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import com.songoda.epicbosses.managers.interfaces.IMechanicManager;
|
||||
import com.songoda.epicbosses.mechanics.IBossMechanic;
|
||||
import com.songoda.epicbosses.mechanics.boss.*;
|
||||
import com.songoda.epicbosses.utils.Debug;
|
||||
import com.songoda.epicbosses.utils.IMechanic;
|
||||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
@ -21,10 +20,10 @@ import java.util.Queue;
|
|||
public class BossMechanicManager implements IMechanicManager<BossEntity, ActiveBossHolder, IBossMechanic> {
|
||||
|
||||
private Queue<IBossMechanic> mechanics;
|
||||
private final CustomBosses customBosses;
|
||||
private final EpicBosses epicBosses;
|
||||
|
||||
public BossMechanicManager(CustomBosses customBosses) {
|
||||
this.customBosses = customBosses;
|
||||
public BossMechanicManager(EpicBosses epicBosses) {
|
||||
this.epicBosses = epicBosses;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -34,8 +33,8 @@ public class BossMechanicManager implements IMechanicManager<BossEntity, ActiveB
|
|||
registerMechanic(new EntityTypeMechanic());
|
||||
registerMechanic(new NameMechanic());
|
||||
registerMechanic(new HealthMechanic());
|
||||
registerMechanic(new EquipmentMechanic(this.customBosses.getItemStackManager()));
|
||||
registerMechanic(new WeaponMechanic(this.customBosses.getItemStackManager()));
|
||||
registerMechanic(new EquipmentMechanic(this.epicBosses.getItemStackManager()));
|
||||
registerMechanic(new WeaponMechanic(this.epicBosses.getItemStackManager()));
|
||||
registerMechanic(new PotionMechanic());
|
||||
registerMechanic(new SettingsMechanic());
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,20 +1,19 @@
|
|||
package com.songoda.epicbosses.managers;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.events.BossSkillEvent;
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import com.songoda.epicbosses.skills.CustomSkillHandler;
|
||||
import com.songoda.epicbosses.skills.interfaces.ICustomSettingAction;
|
||||
import com.songoda.epicbosses.skills.interfaces.ISkillHandler;
|
||||
import com.songoda.epicbosses.skills.Skill;
|
||||
import com.songoda.epicbosses.skills.custom.*;
|
||||
import com.songoda.epicbosses.skills.interfaces.ICustomSettingAction;
|
||||
import com.songoda.epicbosses.skills.interfaces.ISkillHandler;
|
||||
import com.songoda.epicbosses.skills.types.CommandSkillElement;
|
||||
import com.songoda.epicbosses.skills.types.CustomSkillElement;
|
||||
import com.songoda.epicbosses.skills.types.GroupSkillElement;
|
||||
import com.songoda.epicbosses.skills.types.PotionSkillElement;
|
||||
import com.songoda.epicbosses.utils.*;
|
||||
import com.songoda.epicbosses.utils.panel.base.ClickAction;
|
||||
import lombok.Getter;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
|
@ -32,10 +31,10 @@ public class BossSkillManager implements ILoadable {
|
|||
|
||||
private static final Set<CustomSkillHandler> SKILLS = new HashSet<>();
|
||||
|
||||
@Getter private final List<String> validSkillTypes = Arrays.asList("Potion", "Group", "Custom", "Command");
|
||||
private CustomBosses plugin;
|
||||
private final List<String> validSkillTypes = Arrays.asList("Potion", "Group", "Custom", "Command");
|
||||
private EpicBosses plugin;
|
||||
|
||||
public BossSkillManager(CustomBosses plugin) {
|
||||
public BossSkillManager(EpicBosses plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
|
@ -206,6 +205,10 @@ public class BossSkillManager implements ILoadable {
|
|||
return new CustomSkillActionCreator(name, current, displayStack, clickAction);
|
||||
}
|
||||
|
||||
public List<String> getValidSkillTypes() {
|
||||
return this.validSkillTypes;
|
||||
}
|
||||
|
||||
private static class CustomSkillActionCreator implements ICustomSettingAction {
|
||||
|
||||
private final ClickAction clickAction;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.managers;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.entity.MinionEntity;
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
|
@ -11,7 +11,6 @@ import com.songoda.epicbosses.targeting.types.ClosestTargetHandler;
|
|||
import com.songoda.epicbosses.targeting.types.NotDamagedNearbyTargetHandler;
|
||||
import com.songoda.epicbosses.targeting.types.RandomNearbyTargetHandler;
|
||||
import com.songoda.epicbosses.targeting.types.TopDamagerTargetHandler;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
|
@ -20,9 +19,9 @@ import lombok.Getter;
|
|||
*/
|
||||
public class BossTargetManager {
|
||||
|
||||
@Getter private final CustomBosses plugin;
|
||||
private final EpicBosses plugin;
|
||||
|
||||
public BossTargetManager(CustomBosses plugin) {
|
||||
public BossTargetManager(EpicBosses plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
|
@ -82,4 +81,7 @@ public class BossTargetManager {
|
|||
return new TopDamagerTargetHandler<>(holder, this);
|
||||
}
|
||||
|
||||
public EpicBosses getPlugin() {
|
||||
return this.plugin;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.managers;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.entity.elements.TauntElement;
|
||||
|
@ -20,9 +20,9 @@ import java.util.Queue;
|
|||
*/
|
||||
public class BossTauntManager {
|
||||
|
||||
private CustomBosses plugin;
|
||||
private EpicBosses plugin;
|
||||
|
||||
public BossTauntManager(CustomBosses plugin) {
|
||||
public BossTauntManager(EpicBosses plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.managers;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.entity.MinionEntity;
|
||||
import com.songoda.epicbosses.holder.ActiveMinionHolder;
|
||||
import com.songoda.epicbosses.managers.interfaces.IMechanicManager;
|
||||
|
@ -20,10 +20,10 @@ import java.util.Queue;
|
|||
public class MinionMechanicManager implements IMechanicManager<MinionEntity, ActiveMinionHolder, IMinionMechanic> {
|
||||
|
||||
private Queue<IMinionMechanic> mechanics;
|
||||
private final CustomBosses customBosses;
|
||||
private final EpicBosses epicBosses;
|
||||
|
||||
public MinionMechanicManager(CustomBosses customBosses) {
|
||||
this.customBosses = customBosses;
|
||||
public MinionMechanicManager(EpicBosses epicBosses) {
|
||||
this.epicBosses = epicBosses;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -33,8 +33,8 @@ public class MinionMechanicManager implements IMechanicManager<MinionEntity, Act
|
|||
registerMechanic(new EntityTypeMechanic());
|
||||
registerMechanic(new NameMechanic());
|
||||
registerMechanic(new HealthMechanic());
|
||||
registerMechanic(new EquipmentMechanic(this.customBosses.getItemStackManager()));
|
||||
registerMechanic(new WeaponMechanic(this.customBosses.getItemStackManager()));
|
||||
registerMechanic(new EquipmentMechanic(this.epicBosses.getItemStackManager()));
|
||||
registerMechanic(new WeaponMechanic(this.epicBosses.getItemStackManager()));
|
||||
registerMechanic(new PotionMechanic());
|
||||
registerMechanic(new SettingsMechanic());
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.managers;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.holder.ActiveAutoSpawnHolder;
|
||||
import com.songoda.epicbosses.holder.autospawn.ActiveIntervalAutoSpawnHolder;
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
|
@ -10,7 +10,7 @@ public class PlaceholderManager extends PlaceholderExpansion {
|
|||
|
||||
private AutoSpawnManager autoSpawnManager;
|
||||
|
||||
public PlaceholderManager(CustomBosses plugin) {
|
||||
public PlaceholderManager(EpicBosses plugin) {
|
||||
this.autoSpawnManager = plugin.getAutoSpawnManager();
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ public class PlaceholderManager extends PlaceholderExpansion {
|
|||
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return CustomBosses.get().getDescription().getVersion();
|
||||
return EpicBosses.getInstance().getDescription().getVersion();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.managers.files;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.autospawns.AutoSpawn;
|
||||
import com.songoda.epicbosses.file.AutoSpawnFileHandler;
|
||||
import com.songoda.epicbosses.utils.ILoadable;
|
||||
|
@ -21,7 +21,7 @@ public class AutoSpawnFileManager implements ILoadable, ISavable, IReloadable {
|
|||
private Map<String, AutoSpawn> autoSpawnMap = new HashMap<>();
|
||||
private AutoSpawnFileHandler autoSpawnFileHandler;
|
||||
|
||||
public AutoSpawnFileManager(CustomBosses plugin) {
|
||||
public AutoSpawnFileManager(EpicBosses plugin) {
|
||||
File file = new File(plugin.getDataFolder(), "autospawns.json");
|
||||
|
||||
this.autoSpawnFileHandler = new AutoSpawnFileHandler(plugin, true, file);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.songoda.epicbosses.managers.files;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.container.BossEntityContainer;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.file.BossesFileHandler;
|
||||
|
@ -24,11 +24,11 @@ public class BossesFileManager implements ILoadable, ISavable, IReloadable {
|
|||
private BossEntityContainer bossEntityContainer;
|
||||
private BossesFileHandler bossesFileHandler;
|
||||
|
||||
public BossesFileManager(CustomBosses customBosses) {
|
||||
File file = new File(customBosses.getDataFolder(), "bosses.json");
|
||||
public BossesFileManager(EpicBosses epicBosses) {
|
||||
File file = new File(epicBosses.getDataFolder(), "bosses.json");
|
||||
|
||||
this.bossesFileHandler = new BossesFileHandler(customBosses, true, file);
|
||||
this.bossEntityContainer = customBosses.getBossEntityContainer();
|
||||
this.bossesFileHandler = new BossesFileHandler(epicBosses, true, file);
|
||||
this.bossEntityContainer = epicBosses.getBossEntityContainer();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue