mirror of
https://github.com/songoda/EpicBosses.git
synced 2025-01-18 13:11:19 +01:00
Merge branch 'development' of gitlab.com:Songoda/epicbosses into development
This commit is contained in:
commit
b09a308fb7
@ -1,6 +1,6 @@
|
||||
<?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"
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>EpicBosses</artifactId>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?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"
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>EpicBosses</artifactId>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?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"
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>EpicBosses</artifactId>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?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"
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>EpicBosses</artifactId>
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
<?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"
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>EpicBosses</artifactId>
|
||||
@ -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>
|
@ -61,23 +61,38 @@
|
||||
},
|
||||
"SKHelmet": {
|
||||
"type": "GOLDEN_HELMET",
|
||||
"enchants": [ "protection:4", "unbreaking:3" ]
|
||||
"enchants": [
|
||||
"protection:4",
|
||||
"unbreaking:3"
|
||||
]
|
||||
},
|
||||
"SKChestplate": {
|
||||
"type": "GOLDEN_CHESTPLATE",
|
||||
"enchants": [ "protection:4", "unbreaking:3" ]
|
||||
"enchants": [
|
||||
"protection:4",
|
||||
"unbreaking:3"
|
||||
]
|
||||
},
|
||||
"SKLeggings": {
|
||||
"type": "GOLDEN_LEGGINGS",
|
||||
"enchants": [ "protection:4", "unbreaking:3" ]
|
||||
"enchants": [
|
||||
"protection:4",
|
||||
"unbreaking:3"
|
||||
]
|
||||
},
|
||||
"SKBoots": {
|
||||
"type": "DIAMOND_BOOTS",
|
||||
"enchants": [ "protection:4", "unbreaking:3" ]
|
||||
"enchants": [
|
||||
"protection:4",
|
||||
"unbreaking:3"
|
||||
]
|
||||
},
|
||||
"SKMainHand": {
|
||||
"type": "DIAMOND_SWORD",
|
||||
"enchants": [ "sharpness:4", "unbreaking:3" ]
|
||||
"enchants": [
|
||||
"sharpness:4",
|
||||
"unbreaking:3"
|
||||
]
|
||||
},
|
||||
"SKOffHand": {
|
||||
"type": "SHIELD"
|
@ -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,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
223
plugin-modules/Core/resources-yml/display.yml
Normal file
223
plugin-modules/Core/resources-yml/display.yml
Normal file
@ -0,0 +1,223 @@
|
||||
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}'
|
2984
plugin-modules/Core/resources-yml/editor.yml
Normal file
2984
plugin-modules/Core/resources-yml/editor.yml
Normal file
File diff suppressed because it is too large
Load Diff
@ -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
@ -4,3 +4,8 @@ version: ${plugin.version}
|
||||
author: ${plugin.author}
|
||||
api-version: 1.13
|
||||
softdepend: [PlaceholderAPI] # TODO: Add other softdepends
|
||||
commands:
|
||||
Boss:
|
||||
description: Used to handle all CustomBosses related commands.
|
||||
default: true
|
||||
aliases: [bosses, eb, epicbosses]
|
@ -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;
|
||||
}
|
||||
}
|
404
plugin-modules/Core/src/com/songoda/epicbosses/EpicBosses.java
Normal file
404
plugin-modules/Core/src/com/songoda/epicbosses/EpicBosses.java
Normal file
@ -0,0 +1,404 @@
|
||||
package com.songoda.epicbosses;
|
||||
|
||||
import com.songoda.core.SongodaCore;
|
||||
import com.songoda.core.SongodaPlugin;
|
||||
import com.songoda.core.commands.CommandManager;
|
||||
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.*;
|
||||
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 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 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 CommandManager commandManager;
|
||||
|
||||
private DebugManager debugManager = new DebugManager();
|
||||
|
||||
private YmlFileHandler langFileHandler, editorFileHandler, displayFileHandler;
|
||||
private FileConfiguration lang, editor, display;
|
||||
|
||||
private boolean debug = true;
|
||||
|
||||
public static EpicBosses getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
@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();
|
||||
}
|
||||
|
||||
@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();
|
||||
|
||||
// Register commands
|
||||
this.commandManager = new CommandManager(this);
|
||||
this.commandManager.addCommand(new CommandBoss())
|
||||
.addSubCommands(
|
||||
new CommandCreate(bossEntityContainer),
|
||||
new CommandDebug(debugManager),
|
||||
new CommandDropTable(bossPanelManager),
|
||||
new CommandEdit(bossPanelManager, bossEntityContainer),
|
||||
new CommandGiveEgg(bossesFileManager, bossEntityManager),
|
||||
new CommandInfo(bossesFileManager, bossEntityManager),
|
||||
new CommandItems(bossPanelManager),
|
||||
new CommandKillAll(bossEntityManager),
|
||||
new CommandList(bossPanelManager),
|
||||
new CommandMenu(bossPanelManager),
|
||||
new CommandNearby(this),
|
||||
new CommandNewSkill(skillsFileManager, bossSkillManager),
|
||||
new CommandNewAutoSpawn(autoSpawnFileManager),
|
||||
new CommandNewCommand(bossCommandFileManager),
|
||||
new CommandNewMessage(bossCommandFileManager, bossMessagesFileManager),
|
||||
new CommandNewDropTable(dropTableFileManager, bossDropTableManager),
|
||||
new CommandReload(this, bossEntityManager),
|
||||
new CommandShop(this),
|
||||
new CommandSkills(bossPanelManager),
|
||||
new CommandSpawn(bossesFileManager),
|
||||
new CommandTime(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.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 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 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 CommandManager getCommandManager() {
|
||||
return commandManager;
|
||||
}
|
||||
|
||||
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,20 +49,20 @@ import java.util.Map;
|
||||
*/
|
||||
public class BossAPI {
|
||||
|
||||
private static CustomBosses PLUGIN;
|
||||
private static EpicBosses PLUGIN;
|
||||
|
||||
/**
|
||||
* Used to update the variable to the
|
||||
* plugin instance so the methods can
|
||||
* pull variables in the main class to use
|
||||
* in their method.
|
||||
*
|
||||
* <p>
|
||||
* This should only ever be used in house and
|
||||
* never to be used by an outside party.
|
||||
*
|
||||
* @param plugin - the plugin instance.
|
||||
*/
|
||||
public BossAPI(CustomBosses plugin) {
|
||||
public BossAPI(EpicBosses plugin) {
|
||||
if (PLUGIN != null) {
|
||||
Debug.ATTEMPTED_TO_UPDATE_PLUGIN.debug();
|
||||
return;
|
||||
@ -91,6 +89,7 @@ public class BossAPI {
|
||||
PLUGIN.getBossesFileManager().save();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to register a Minion Entity into
|
||||
* the plugin after it has been created
|
||||
|
@ -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 void setEditing(boolean editing) {
|
||||
this.editing = editing;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public List<String> getEntities() {
|
||||
return this.entities;
|
||||
}
|
||||
|
||||
public void setEntities(List<String> entities) {
|
||||
this.entities = entities;
|
||||
}
|
||||
|
||||
public AutoSpawnSettings getAutoSpawnSettings() {
|
||||
return this.autoSpawnSettings;
|
||||
}
|
||||
|
||||
public void setAutoSpawnSettings(AutoSpawnSettings autoSpawnSettings) {
|
||||
this.autoSpawnSettings = autoSpawnSettings;
|
||||
}
|
||||
|
||||
public JsonObject getCustomData() {
|
||||
return this.customData;
|
||||
}
|
||||
|
||||
public void setCustomData(JsonObject customData) {
|
||||
this.customData = customData;
|
||||
}
|
||||
}
|
||||
|
@ -19,10 +19,6 @@ public enum SpawnType {
|
||||
this.rank = rank;
|
||||
}
|
||||
|
||||
public SpawnType getNext() {
|
||||
return get(this.rank+1);
|
||||
}
|
||||
|
||||
public static SpawnType getCurrent(String input) {
|
||||
if (input == null || input.isEmpty()) return BLANK;
|
||||
|
||||
@ -52,4 +48,8 @@ public enum SpawnType {
|
||||
|
||||
return INTERVAL;
|
||||
}
|
||||
|
||||
public SpawnType getNext() {
|
||||
return get(this.rank + 1);
|
||||
}
|
||||
}
|
||||
|
@ -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 void setMaxAliveAtOnce(Integer maxAliveAtOnce) {
|
||||
this.maxAliveAtOnce = maxAliveAtOnce;
|
||||
}
|
||||
|
||||
public Integer getAmountPerSpawn() {
|
||||
return this.amountPerSpawn;
|
||||
}
|
||||
|
||||
public void setAmountPerSpawn(Integer amountPerSpawn) {
|
||||
this.amountPerSpawn = amountPerSpawn;
|
||||
}
|
||||
|
||||
public Boolean getSpawnWhenChunkIsntLoaded() {
|
||||
return this.spawnWhenChunkIsntLoaded;
|
||||
}
|
||||
|
||||
public void setSpawnWhenChunkIsntLoaded(Boolean spawnWhenChunkIsntLoaded) {
|
||||
this.spawnWhenChunkIsntLoaded = spawnWhenChunkIsntLoaded;
|
||||
}
|
||||
|
||||
public Boolean getOverrideDefaultSpawnMessage() {
|
||||
return this.overrideDefaultSpawnMessage;
|
||||
}
|
||||
|
||||
public void setOverrideDefaultSpawnMessage(Boolean overrideDefaultSpawnMessage) {
|
||||
this.overrideDefaultSpawnMessage = overrideDefaultSpawnMessage;
|
||||
}
|
||||
|
||||
public Boolean getShuffleEntitiesList() {
|
||||
return this.shuffleEntitiesList;
|
||||
}
|
||||
|
||||
public void setShuffleEntitiesList(Boolean shuffleEntitiesList) {
|
||||
this.shuffleEntitiesList = shuffleEntitiesList;
|
||||
}
|
||||
|
||||
public String getSpawnMessage() {
|
||||
return this.spawnMessage;
|
||||
}
|
||||
|
||||
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 void setSpawnAfterLastBossIsKilled(Boolean spawnAfterLastBossIsKilled) {
|
||||
this.spawnAfterLastBossIsKilled = spawnAfterLastBossIsKilled;
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
return this.location;
|
||||
}
|
||||
|
||||
public void setLocation(String location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getPlaceholder() {
|
||||
return this.placeholder;
|
||||
}
|
||||
|
||||
public void setPlaceholder(String placeholder) {
|
||||
this.placeholder = placeholder;
|
||||
}
|
||||
|
||||
public Integer getSpawnRate() {
|
||||
return this.spawnRate;
|
||||
}
|
||||
|
||||
public void setSpawnRate(Integer spawnRate) {
|
||||
this.spawnRate = spawnRate;
|
||||
}
|
||||
}
|
||||
|
@ -1,36 +0,0 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.epicbosses.utils.command.SubCommandService;
|
||||
import com.songoda.epicbosses.utils.command.attributes.Alias;
|
||||
import com.songoda.epicbosses.utils.command.attributes.Description;
|
||||
import com.songoda.epicbosses.utils.command.attributes.Name;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 18-Jul-18
|
||||
*/
|
||||
@Name("boss")
|
||||
@Alias({"bosses", "b", "bs", "eb", "epicbosses"})
|
||||
@Description("Used to handle all CustomBosses related commands.")
|
||||
|
||||
public class BossCmd extends SubCommandService<CommandSender> {
|
||||
|
||||
public BossCmd() {
|
||||
super(BossCmd.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(args.length == 0) {
|
||||
Bukkit.dispatchCommand(sender, "boss help");
|
||||
return;
|
||||
}
|
||||
|
||||
if(handleSubCommand(sender, args)) return;
|
||||
|
||||
Bukkit.dispatchCommand(sender, "boss help");
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.core.utils.TextUtils;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CommandBoss extends AbstractCommand {
|
||||
|
||||
EpicBosses instance;
|
||||
|
||||
public CommandBoss() {
|
||||
super(false, "Boss");
|
||||
instance = EpicBosses.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
sender.sendMessage("");
|
||||
sender.sendMessage(TextUtils.formatText("&b&lEpicBosses &8» &7Version " + instance.getDescription().getVersion()
|
||||
+ " Created with <3 by &5&l&oSongoda"));
|
||||
|
||||
for (AbstractCommand command : instance.getCommandManager().getAllCommands()) {
|
||||
if (command.getPermissionNode() == null || sender.hasPermission(command.getPermissionNode())) {
|
||||
sender.sendMessage(TextUtils.formatText("&8 - &a" + command.getSyntax() + "&7 - " + command.getDescription()));
|
||||
}
|
||||
}
|
||||
sender.sendMessage("");
|
||||
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender cs, String... args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Displays this page.";
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.container.BossEntityContainer;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
@ -7,70 +8,91 @@ import com.songoda.epicbosses.utils.EntityFinder;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
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;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 02-Oct-18
|
||||
*/
|
||||
public class BossCreateCmd extends SubCommand {
|
||||
public class CommandCreate extends AbstractCommand {
|
||||
|
||||
private BossEntityContainer bossEntityContainer;
|
||||
|
||||
public BossCreateCmd(BossEntityContainer bossEntityContainer) {
|
||||
super("create");
|
||||
|
||||
public CommandCreate(BossEntityContainer bossEntityContainer) {
|
||||
super(true, "create");
|
||||
this.bossEntityContainer = bossEntityContainer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.create.hasPermission(sender)) {
|
||||
Message.Boss_Create_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
case 1:
|
||||
List<EntityFinder> availableEntities = new ArrayList<>(Arrays.asList(EntityFinder.values()));
|
||||
String list = StringUtils.get().appendList(availableEntities);
|
||||
|
||||
Message.Boss_Create_NoEntitySpecified.msg(sender, list);
|
||||
return;
|
||||
case 3:
|
||||
String name = args[1];
|
||||
String entityTypeInput = args[2];
|
||||
return ReturnType.FAILURE;
|
||||
case 2:
|
||||
String name = args[0];
|
||||
String entityTypeInput = args[1];
|
||||
|
||||
if (this.bossEntityContainer.exists(name)) {
|
||||
Message.Boss_Create_NameAlreadyExists.msg(sender, name);
|
||||
return;
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
EntityFinder entityFinder = EntityFinder.get(entityTypeInput);
|
||||
|
||||
if (entityFinder == null) {
|
||||
Message.Boss_Create_EntityTypeNotFound.msg(sender, entityTypeInput);
|
||||
return;
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
BossEntity bossEntity = BossAPI.createBaseBossEntity(name, entityTypeInput);
|
||||
|
||||
if (bossEntity == null) {
|
||||
Message.Boss_Create_SomethingWentWrong.msg(sender);
|
||||
return;
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
Message.Boss_Create_SuccessfullyCreated.msg(sender, name, entityFinder.getFancyName());
|
||||
return;
|
||||
return ReturnType.SUCCESS;
|
||||
default:
|
||||
Message.Boss_Create_InvalidArgs.msg(sender);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
if (args.length == 1) {
|
||||
return Collections.singletonList("name");
|
||||
} else if (args.length == 2) {
|
||||
return Arrays.stream(EntityType.values()).map(Enum::name).collect(Collectors.toList());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.create";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss create <[>name> <entity>";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Start the creation of a boss.";
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.managers.DebugManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 09-Oct-18
|
||||
*/
|
||||
public class CommandDebug extends AbstractCommand {
|
||||
|
||||
private DebugManager debugManager;
|
||||
|
||||
public CommandDebug(DebugManager debugManager) {
|
||||
super(true, "debug");
|
||||
this.debugManager = debugManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
Player player = (Player) sender;
|
||||
String toggled;
|
||||
|
||||
if (this.debugManager.isToggled(player.getUniqueId())) {
|
||||
this.debugManager.togglePlayerOff(player.getUniqueId());
|
||||
toggled = "Off";
|
||||
} else {
|
||||
this.debugManager.togglePlayerOn(player.getUniqueId());
|
||||
toggled = "On";
|
||||
}
|
||||
|
||||
Message.Boss_Debug_Toggled.msg(player, toggled);
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.reload";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss reload";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Reloads EpicBosses and its configurations.";
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.managers.BossPanelManager;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 04-Oct-18
|
||||
*/
|
||||
public class CommandDropTable extends AbstractCommand {
|
||||
|
||||
private BossPanelManager bossPanelManager;
|
||||
|
||||
public CommandDropTable(BossPanelManager bossPanelManager) {
|
||||
super(true, "droptable");
|
||||
this.bossPanelManager = bossPanelManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
this.bossPanelManager.getDropTables().openFor((Player) sender);
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.admin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss droptable";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Shows the current drop table";
|
||||
}
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.container.BossEntityContainer;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.managers.BossPanelManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 02-Oct-18
|
||||
*/
|
||||
public class CommandEdit extends AbstractCommand {
|
||||
|
||||
private BossEntityContainer bossEntityContainer;
|
||||
private BossPanelManager bossPanelManager;
|
||||
|
||||
public CommandEdit(BossPanelManager bossPanelManager, BossEntityContainer bossEntityContainer) {
|
||||
super(true, "edit");
|
||||
this.bossPanelManager = bossPanelManager;
|
||||
this.bossEntityContainer = bossEntityContainer;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
Player player = (Player) sender;
|
||||
|
||||
switch (args.length) {
|
||||
default:
|
||||
case 0:
|
||||
this.bossPanelManager.getBosses().openFor(player);
|
||||
break;
|
||||
case 1:
|
||||
String input = args[0];
|
||||
|
||||
if (!this.bossEntityContainer.exists(input)) {
|
||||
Message.Boss_Edit_DoesntExist.msg(sender);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
BossEntity bossEntity = bossEntityContainer.getData().entrySet().stream()
|
||||
.filter(e -> e.getKey().equalsIgnoreCase(input)).findFirst().get().getValue();
|
||||
|
||||
this.bossPanelManager.getMainBossEditMenu().openFor(player, bossEntity);
|
||||
break;
|
||||
}
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
if (args.length == 1) {
|
||||
return new ArrayList<>(EpicBosses.getInstance().getBossesFileManager().getBossEntitiesMap().keySet());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.edit";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss edit <name>";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Edit a specified boss.";
|
||||
}
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.managers.BossEntityManager;
|
||||
import com.songoda.epicbosses.managers.files.BossesFileManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.NumberUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 14-Nov-18
|
||||
*/
|
||||
public class CommandGiveEgg extends AbstractCommand {
|
||||
|
||||
private BossEntityManager bossEntityManager;
|
||||
private BossesFileManager bossesFileManager;
|
||||
|
||||
public CommandGiveEgg(BossesFileManager bossesFileManager, BossEntityManager bossEntityManager) {
|
||||
super(false, "give", "giveegg");
|
||||
|
||||
this.bossesFileManager = bossesFileManager;
|
||||
this.bossEntityManager = bossEntityManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
|
||||
if (args.length < 2) {
|
||||
Message.Boss_GiveEgg_InvalidArgs.msg(sender);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
int amount = 1;
|
||||
|
||||
if (args.length == 3) {
|
||||
String amountInput = args[2];
|
||||
|
||||
if (NumberUtils.get().isInt(amountInput)) {
|
||||
amount = Integer.valueOf(amountInput);
|
||||
} else {
|
||||
Message.General_NotNumber.msg(sender);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
String playerInput = args[1];
|
||||
Player player = Bukkit.getPlayer(playerInput);
|
||||
|
||||
if (player == null) {
|
||||
Message.General_NotOnline.msg(sender, playerInput);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
String bossInput = args[0];
|
||||
BossEntity bossEntity = this.bossesFileManager.getBossEntity(bossInput);
|
||||
|
||||
if (bossEntity == null) {
|
||||
Message.Boss_GiveEgg_InvalidBoss.msg(sender);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
ItemStack spawnItem = this.bossEntityManager.getSpawnItem(bossEntity);
|
||||
|
||||
if (spawnItem == null) {
|
||||
Message.Boss_GiveEgg_NotSet.msg(sender);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
spawnItem.setAmount(amount);
|
||||
player.getInventory().addItem(spawnItem);
|
||||
|
||||
Message.Boss_GiveEgg_Given.msg(sender, player.getName(), amount, bossInput);
|
||||
Message.Boss_GiveEgg_Received.msg(player, amount, bossInput);
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
if (args.length == 1) {
|
||||
return new ArrayList<>(bossesFileManager.getBossEntitiesMap().keySet());
|
||||
} else if (args.length == 2) {
|
||||
return Bukkit.getOnlinePlayers().stream().map(HumanEntity::getName).collect(Collectors.toList());
|
||||
} else if (args.length == 3) {
|
||||
return Arrays.asList("1", "2", "3", "4", "5");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.give";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss giveegg <name> <player> [amount]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Gives you the spawn egg of a boss.";
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.managers.BossEntityManager;
|
||||
import com.songoda.epicbosses.managers.files.BossesFileManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 02-Oct-18
|
||||
*/
|
||||
public class CommandInfo extends AbstractCommand {
|
||||
|
||||
private BossEntityManager bossEntityManager;
|
||||
private BossesFileManager bossesFileManager;
|
||||
|
||||
public CommandInfo(BossesFileManager bossesFileManager, BossEntityManager bossEntityManager) {
|
||||
super(false, "info");
|
||||
this.bossesFileManager = bossesFileManager;
|
||||
this.bossEntityManager = bossEntityManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AbstractCommand.ReturnType runCommand(CommandSender sender, String... args) {
|
||||
if (args.length != 1) {
|
||||
Message.Boss_Info_InvalidArgs.msg(sender);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
String input = args[0];
|
||||
BossEntity bossEntity = this.bossesFileManager.getBossEntity(input);
|
||||
|
||||
if (bossEntity == null) {
|
||||
Message.Boss_Info_CouldntFindBoss.msg(sender);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
boolean editing = bossEntity.isEditing();
|
||||
int active = this.bossEntityManager.getCurrentlyActive(bossEntity);
|
||||
boolean complete = bossEntity.isCompleteEnoughToSpawn();
|
||||
|
||||
Message.Boss_Info_Display.msg(sender, input, editing, active, complete);
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
if (args.length == 1) {
|
||||
return new ArrayList<>(bossesFileManager.getBossEntitiesMap().keySet());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.admin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss info <name>";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Displays info on the specified boss.";
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.managers.BossPanelManager;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 04-Oct-18
|
||||
*/
|
||||
public class CommandItems extends AbstractCommand {
|
||||
|
||||
private BossPanelManager bossPanelManager;
|
||||
|
||||
public CommandItems(BossPanelManager bossPanelManager) {
|
||||
super(true, "item", "items");
|
||||
this.bossPanelManager = bossPanelManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AbstractCommand.ReturnType runCommand(CommandSender sender, String... args) {
|
||||
this.bossPanelManager.getCustomItems().openFor((Player) sender);
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.admin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss items";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Shows all current items.";
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.managers.BossEntityManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 02-Oct-18
|
||||
*/
|
||||
public class CommandKillAll extends AbstractCommand {
|
||||
|
||||
private BossEntityManager bossEntityManager;
|
||||
|
||||
public CommandKillAll(BossEntityManager bossEntityManager) {
|
||||
super(false, "killall");
|
||||
this.bossEntityManager = bossEntityManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AbstractCommand.ReturnType runCommand(CommandSender sender, String... args) {
|
||||
World world = null;
|
||||
|
||||
if (args.length == 1) {
|
||||
String worldArgs = args[0];
|
||||
|
||||
world = Bukkit.getWorld(worldArgs);
|
||||
|
||||
if (world == null) {
|
||||
Message.Boss_KillAll_WorldNotFound.msg(sender);
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
int amount = this.bossEntityManager.killAllHolders(world);
|
||||
|
||||
if (args.length == 1) Message.Boss_KillAll_KilledWorld.msg(sender, amount, world.getName());
|
||||
else Message.Boss_KillAll_KilledAll.msg(sender, amount);
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
if (args.length == 1) {
|
||||
return Bukkit.getWorlds().stream().map(World::getName).collect(Collectors.toList());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.admin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss killall [world]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Removes all current bosses in the specified world.";
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.managers.BossPanelManager;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 02-Oct-18
|
||||
*/
|
||||
public class CommandList extends AbstractCommand {
|
||||
|
||||
private BossPanelManager bossPanelManager;
|
||||
|
||||
public CommandList(BossPanelManager bossPanelManager) {
|
||||
super(true, "list", "show");
|
||||
this.bossPanelManager = bossPanelManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AbstractCommand.ReturnType runCommand(CommandSender sender, String... args) {
|
||||
this.bossPanelManager.getBosses().openFor((Player) sender);
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.admin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss list";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Shows all the list of current boss entities.";
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.managers.BossPanelManager;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 10-Oct-18
|
||||
*/
|
||||
public class CommandMenu extends AbstractCommand {
|
||||
|
||||
private BossPanelManager bossPanelManager;
|
||||
|
||||
public CommandMenu(BossPanelManager bossPanelManager) {
|
||||
super(true, "menu");
|
||||
this.bossPanelManager = bossPanelManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AbstractCommand.ReturnType runCommand(CommandSender sender, String... args) {
|
||||
this.bossPanelManager.getMainMenu().openFor((Player) sender);
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "/boss menu";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Opens up the menu to edit all current created bosses.";
|
||||
}
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import com.songoda.epicbosses.utils.MapUtils;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.NumberUtils;
|
||||
import com.songoda.epicbosses.utils.StringUtils;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 02-Oct-18
|
||||
*/
|
||||
public class CommandNearby extends AbstractCommand {
|
||||
|
||||
private EpicBosses plugin;
|
||||
|
||||
public CommandNearby(EpicBosses plugin) {
|
||||
super(true, "nearby");
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AbstractCommand.ReturnType runCommand(CommandSender sender, String... args) {
|
||||
Player player = (Player) sender;
|
||||
Location location = player.getLocation();
|
||||
double radius = this.plugin.getConfig().getDouble("Settings.defaultNearbyRadius", 250.0);
|
||||
double maxRadius = this.plugin.getConfig().getDouble("Limits.maxNearbyRadius", 500.0);
|
||||
String nearbyFormat = this.plugin.getConfig().getString("Settings.nearbyFormat", "{name} ({distance}m)");
|
||||
|
||||
if (args.length == 1) {
|
||||
Integer newNumber = NumberUtils.get().getInteger(args[0]);
|
||||
|
||||
if (newNumber != null) radius = newNumber;
|
||||
|
||||
if (radius > maxRadius) {
|
||||
Message.Boss_Nearby_MaxRadius.msg(player, maxRadius);
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
Map<ActiveBossHolder, Double> nearbyBosses = this.plugin.getBossEntityManager().getActiveBossHoldersWithinRadius(radius, location);
|
||||
Map<ActiveBossHolder, Double> sortedMap = MapUtils.get().sortByValue(nearbyBosses);
|
||||
|
||||
if (sortedMap.isEmpty()) {
|
||||
Message.Boss_Nearby_NoneNearby.msg(player);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
List<String> input = new LinkedList<>();
|
||||
|
||||
sortedMap.forEach(((activeBossHolder, distance) ->
|
||||
input.add(nearbyFormat.replace("{name}", activeBossHolder.getName()).replace("{distance}", NumberUtils.get().formatDouble(distance)))));
|
||||
|
||||
Message.Boss_Nearby_Near.msg(player, StringUtils.get().appendList(input));
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
if (args.length == 1) {
|
||||
return Arrays.asList("1", "2", "3", "4", "5");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.nearby";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss nearby [radius]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Displays all nearby bosses within the specified radius.";
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.autospawns.AutoSpawn;
|
||||
import com.songoda.epicbosses.managers.BossSkillManager;
|
||||
import com.songoda.epicbosses.managers.files.AutoSpawnFileManager;
|
||||
import com.songoda.epicbosses.managers.files.SkillsFileManager;
|
||||
import com.songoda.epicbosses.skills.SkillMode;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class CommandNewAutoSpawn extends AbstractCommand {
|
||||
|
||||
private AutoSpawnFileManager autoSpawnFileManager;
|
||||
|
||||
public CommandNewAutoSpawn(AutoSpawnFileManager autoSpawnFileManager) {
|
||||
super(false, " ");
|
||||
this.autoSpawnFileManager = autoSpawnFileManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
if (args.length != 1)
|
||||
return ReturnType.SYNTAX_ERROR;
|
||||
String nameInput = args[0];
|
||||
|
||||
if (this.autoSpawnFileManager.getAutoSpawn(nameInput) != null) {
|
||||
Message.Boss_New_AlreadyExists.msg(sender, "AutoSpawn");
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
AutoSpawn autoSpawn = BossAPI.createBaseAutoSpawn(nameInput);
|
||||
|
||||
if (autoSpawn == null) {
|
||||
Message.Boss_New_SomethingWentWrong.msg(sender, "AutoSpawn");
|
||||
} else {
|
||||
Message.Boss_New_AutoSpawn.msg(sender, nameInput);
|
||||
}
|
||||
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
if (args.length == 1) {
|
||||
return Collections.singletonList("name");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.admin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss new autospawn <name>";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Create a new auto spawn section.";
|
||||
}
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.managers.files.CommandsFileManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class CommandNewCommand extends AbstractCommand {
|
||||
|
||||
private CommandsFileManager commandsFileManager;
|
||||
|
||||
public CommandNewCommand(CommandsFileManager commandsFileManager) {
|
||||
super(false, "new command");
|
||||
this.commandsFileManager = commandsFileManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
if (args.length < 2)
|
||||
return ReturnType.SYNTAX_ERROR;
|
||||
String nameInput = args[0];
|
||||
|
||||
if (this.commandsFileManager.getCommands(nameInput) != null) {
|
||||
Message.Boss_New_AlreadyExists.msg(sender, "Command");
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
List<String> commands = appendList(args);
|
||||
|
||||
this.commandsFileManager.addNewCommand(nameInput, commands);
|
||||
this.commandsFileManager.save();
|
||||
|
||||
Message.Boss_New_Command.msg(sender, nameInput);
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
if (args.length == 1) {
|
||||
return Collections.singletonList("name");
|
||||
}
|
||||
return Collections.singletonList("command");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.admin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss new command <name> <commands...>";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Create a new command section.";
|
||||
}
|
||||
|
||||
private List<String> appendList(String[] args) {
|
||||
String[] params = Arrays.copyOfRange(args, 2, args.length);
|
||||
|
||||
List<String> sections = new ArrayList<>();
|
||||
StringBuilder currentSection = new StringBuilder();
|
||||
|
||||
for (String param : params) {
|
||||
String[] split = param.split("\\|");
|
||||
if (split.length == 1) {
|
||||
currentSection.append(split[0]).append(" ");
|
||||
continue;
|
||||
}
|
||||
|
||||
boolean firstAdded = false;
|
||||
for (String piece : split) {
|
||||
currentSection.append(piece).append(" ");
|
||||
|
||||
if (!firstAdded) {
|
||||
sections.add(currentSection.toString().trim());
|
||||
currentSection = new StringBuilder();
|
||||
firstAdded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!currentSection.toString().trim().isEmpty())
|
||||
sections.add(currentSection.toString().trim());
|
||||
|
||||
return sections;
|
||||
}
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.droptable.DropTable;
|
||||
import com.songoda.epicbosses.managers.BossDropTableManager;
|
||||
import com.songoda.epicbosses.managers.BossSkillManager;
|
||||
import com.songoda.epicbosses.managers.files.DropTableFileManager;
|
||||
import com.songoda.epicbosses.managers.files.SkillsFileManager;
|
||||
import com.songoda.epicbosses.skills.SkillMode;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class CommandNewDropTable extends AbstractCommand {
|
||||
|
||||
private DropTableFileManager dropTableFileManager;
|
||||
private BossDropTableManager bossDropTableManager;
|
||||
|
||||
public CommandNewDropTable(DropTableFileManager dropTableFileManager, BossDropTableManager bossDropTableManager) {
|
||||
super(false, "new droptable");
|
||||
this.dropTableFileManager = dropTableFileManager;
|
||||
this.bossDropTableManager = bossDropTableManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
if (args.length != 2)
|
||||
return ReturnType.SYNTAX_ERROR;
|
||||
|
||||
String nameInput = args[0];
|
||||
String typeInput = args[1];
|
||||
boolean validType = false;
|
||||
|
||||
if (this.dropTableFileManager.getDropTable(nameInput) != null) {
|
||||
Message.Boss_New_AlreadyExists.msg(sender, "DropTable");
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
for (String s : this.bossDropTableManager.getValidDropTableTypes()) {
|
||||
if (s.equalsIgnoreCase(typeInput)) {
|
||||
validType = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!validType) {
|
||||
Message.Boss_New_InvalidDropTableType.msg(sender);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
DropTable dropTable = BossAPI.createBaseDropTable(nameInput, typeInput);
|
||||
|
||||
if (dropTable == null) {
|
||||
Message.Boss_New_SomethingWentWrong.msg(sender, "DropTable");
|
||||
} else {
|
||||
Message.Boss_New_DropTable.msg(sender, nameInput, typeInput);
|
||||
}
|
||||
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
if (args.length == 1) {
|
||||
return Collections.singletonList("name");
|
||||
} else if (args.length == 2) {
|
||||
return this.bossDropTableManager.getValidDropTableTypes();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.admin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss new droptable <name> <type>";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Create a new drop table section.";
|
||||
}
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.managers.files.CommandsFileManager;
|
||||
import com.songoda.epicbosses.managers.files.MessagesFileManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class CommandNewMessage extends AbstractCommand {
|
||||
|
||||
private CommandsFileManager commandsFileManager;
|
||||
private MessagesFileManager messagesFileManager;
|
||||
|
||||
public CommandNewMessage(CommandsFileManager commandsFileManager, MessagesFileManager messagesFileManager) {
|
||||
super(false, "new message");
|
||||
this.commandsFileManager = commandsFileManager;
|
||||
this.messagesFileManager = messagesFileManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
if (args.length < 2)
|
||||
return ReturnType.SYNTAX_ERROR;
|
||||
|
||||
String nameInput = args[0];
|
||||
|
||||
if (this.commandsFileManager.getCommands(nameInput) != null) {
|
||||
Message.Boss_New_AlreadyExists.msg(sender, "Message");
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
List<String> messages = appendList(args);
|
||||
|
||||
this.messagesFileManager.addNewMessage(nameInput, messages);
|
||||
this.messagesFileManager.save();
|
||||
|
||||
Message.Boss_New_Message.msg(sender, nameInput);
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
if (args.length == 1) {
|
||||
return Collections.singletonList("name");
|
||||
}
|
||||
return Collections.singletonList("message");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.admin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss new message <name> <message...>";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Create a new message section.";
|
||||
}
|
||||
|
||||
private List<String> appendList(String[] args) {
|
||||
String[] params = Arrays.copyOfRange(args, 2, args.length);
|
||||
|
||||
List<String> sections = new ArrayList<>();
|
||||
StringBuilder currentSection = new StringBuilder();
|
||||
|
||||
for (String param : params) {
|
||||
String[] split = param.split("\\|");
|
||||
if (split.length == 1) {
|
||||
currentSection.append(split[0]).append(" ");
|
||||
continue;
|
||||
}
|
||||
|
||||
boolean firstAdded = false;
|
||||
for (String piece : split) {
|
||||
currentSection.append(piece).append(" ");
|
||||
|
||||
if (!firstAdded) {
|
||||
sections.add(currentSection.toString().trim());
|
||||
currentSection = new StringBuilder();
|
||||
firstAdded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!currentSection.toString().trim().isEmpty())
|
||||
sections.add(currentSection.toString().trim());
|
||||
|
||||
return sections;
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.managers.BossSkillManager;
|
||||
import com.songoda.epicbosses.managers.files.SkillsFileManager;
|
||||
import com.songoda.epicbosses.skills.Skill;
|
||||
import com.songoda.epicbosses.skills.SkillMode;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class CommandNewSkill extends AbstractCommand {
|
||||
|
||||
private SkillsFileManager skillsFileManager;
|
||||
private BossSkillManager bossSkillManager;
|
||||
|
||||
public CommandNewSkill(SkillsFileManager skillsFileManager, BossSkillManager bossSkillManager) {
|
||||
super(false, "new skill");
|
||||
this.skillsFileManager = skillsFileManager;
|
||||
this.bossSkillManager = bossSkillManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
if (args.length != 3)
|
||||
return ReturnType.SYNTAX_ERROR;
|
||||
String nameInput = args[0];
|
||||
String typeInput = args[1];
|
||||
String modeInput = args[2];
|
||||
boolean validType = false, validMode = false;
|
||||
List<SkillMode> skillModes = SkillMode.getSkillModes();
|
||||
|
||||
if (this.skillsFileManager.getSkill(nameInput) != null) {
|
||||
Message.Boss_New_AlreadyExists.msg(sender, "Skill");
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
for (String s : this.bossSkillManager.getValidSkillTypes()) {
|
||||
if (s.equalsIgnoreCase(typeInput)) {
|
||||
validType = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (SkillMode skillMode : skillModes) {
|
||||
if (skillMode.name().equalsIgnoreCase(modeInput)) {
|
||||
validMode = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!validType) {
|
||||
Message.Boss_New_InvalidSkillType.msg(sender);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
if (!validMode) {
|
||||
Message.Boss_New_InvalidSkillMode.msg(sender);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
Skill skill = BossAPI.createBaseSkill(nameInput, typeInput, modeInput);
|
||||
|
||||
if (skill == null) {
|
||||
Message.Boss_New_SomethingWentWrong.msg(sender, "Skill");
|
||||
} else {
|
||||
Message.Boss_New_Skill.msg(sender, nameInput, typeInput);
|
||||
}
|
||||
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
if (args.length == 1) {
|
||||
return Collections.singletonList("name");
|
||||
} else if (args.length == 2) {
|
||||
return this.bossSkillManager.getValidSkillTypes();
|
||||
} else if (args.length == 3) {
|
||||
return SkillMode.getSkillModes().stream().map(SkillMode::name).collect(Collectors.toList());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.admin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss new skill <name> <type> <mods>";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Create a new skill section.";
|
||||
}
|
||||
}
|
@ -1,41 +1,57 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.managers.BossEntityManager;
|
||||
import com.songoda.epicbosses.utils.IReloadable;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 02-Oct-18
|
||||
*/
|
||||
public class BossReloadCmd extends SubCommand {
|
||||
public class CommandReload extends AbstractCommand {
|
||||
|
||||
private BossEntityManager bossEntityManager;
|
||||
private IReloadable masterReloadable;
|
||||
|
||||
public BossReloadCmd(IReloadable reloadable, BossEntityManager bossEntityManager) {
|
||||
super("reload");
|
||||
|
||||
public CommandReload(IReloadable reloadable, BossEntityManager bossEntityManager) {
|
||||
super(false, "reload");
|
||||
this.masterReloadable = reloadable;
|
||||
this.bossEntityManager = bossEntityManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.reload.hasPermission(sender)) {
|
||||
Message.Boss_Reload_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
long currentMs = System.currentTimeMillis();
|
||||
|
||||
this.masterReloadable.reload();
|
||||
this.bossEntityManager.killAllHolders((World) null);
|
||||
Message.Boss_Reload_Successful.msg(sender, (System.currentTimeMillis() - currentMs));
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender sender, String... args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.reload";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss reload";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Reloads EpicBosses and its configurations.";
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 10-Oct-18
|
||||
*/
|
||||
public class CommandShop extends AbstractCommand {
|
||||
|
||||
private EpicBosses plugin;
|
||||
|
||||
public CommandShop(EpicBosses plugin) {
|
||||
super(true, "shop", "buy", "store");
|
||||
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
if (!this.plugin.getConfig().getBoolean("Toggles.bossShop", true)) {
|
||||
Message.Boss_Shop_Disabled.msg(sender);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
plugin.getBossPanelManager().getShopPanel().openFor((Player) sender);
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.shop";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss shop";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Opens the shop for a player to purchase boss eggs themselves.";
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.managers.BossPanelManager;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 04-Oct-18
|
||||
*/
|
||||
public class CommandSkills extends AbstractCommand {
|
||||
|
||||
private BossPanelManager bossPanelManager;
|
||||
|
||||
public CommandSkills(BossPanelManager bossPanelManager) {
|
||||
super(true, "skills", "skill");
|
||||
this.bossPanelManager = bossPanelManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
this.bossPanelManager.getCustomSkills().openFor((Player) sender);
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.admin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss skills";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Shows all current configured skills.";
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.managers.files.BossesFileManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.StringUtils;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 02-Oct-18
|
||||
*/
|
||||
public class CommandSpawn extends AbstractCommand {
|
||||
|
||||
private BossesFileManager bossesFileManager;
|
||||
|
||||
public CommandSpawn(BossesFileManager bossesFileManager) {
|
||||
super(false, "spawn");
|
||||
|
||||
this.bossesFileManager = bossesFileManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
if (args.length == 0)
|
||||
return ReturnType.SYNTAX_ERROR;
|
||||
|
||||
Location spawnLocation;
|
||||
|
||||
if (args.length == 2) {
|
||||
Location input = StringUtils.get().fromStringToLocation(args[1]);
|
||||
|
||||
if (input == null) {
|
||||
Message.Boss_Spawn_InvalidLocation.msg(sender);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
spawnLocation = input;
|
||||
} else {
|
||||
if (!(sender instanceof Player)) {
|
||||
Message.Boss_Spawn_MustBePlayer.msg(sender);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
spawnLocation = ((Player) sender).getLocation();
|
||||
}
|
||||
|
||||
String bossInput = args[0];
|
||||
BossEntity bossEntity = this.bossesFileManager.getBossEntity(bossInput);
|
||||
|
||||
if (bossEntity == null) {
|
||||
Message.Boss_Spawn_InvalidBoss.msg(sender);
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
BossAPI.spawnNewBoss(bossEntity, spawnLocation, null, null, false);
|
||||
Message.Boss_Spawn_Spawned.msg(sender, bossInput, StringUtils.get().translateLocation(spawnLocation));
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
if (args.length == 1) {
|
||||
return new ArrayList<>(bossesFileManager.getBossEntitiesMap().keySet());
|
||||
} else if (args.length == 2) {
|
||||
return Collections.singletonList("world,0,100,0");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.admin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss spawn <name> [location]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Spawns a specific boss at the defined location.";
|
||||
}
|
||||
}
|
@ -1,17 +1,17 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
package com.songoda.epicbosses.commands;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.epicbosses.EpicBosses;
|
||||
import com.songoda.epicbosses.holder.ActiveAutoSpawnHolder;
|
||||
import com.songoda.epicbosses.holder.autospawn.ActiveIntervalAutoSpawnHolder;
|
||||
import com.songoda.epicbosses.managers.AutoSpawnManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.NumberUtils;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.StringUtils;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import com.songoda.epicbosses.utils.time.TimeUnit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -19,35 +19,27 @@ import java.util.List;
|
||||
* @version 1.0.0
|
||||
* @since 02-Oct-18
|
||||
*/
|
||||
public class BossTimeCmd extends SubCommand {
|
||||
public class CommandTime extends AbstractCommand {
|
||||
|
||||
private AutoSpawnManager autoSpawnManager;
|
||||
|
||||
public BossTimeCmd(CustomBosses plugin) {
|
||||
super("time");
|
||||
|
||||
public CommandTime(EpicBosses plugin) {
|
||||
super(false, "time");
|
||||
this.autoSpawnManager = plugin.getAutoSpawnManager();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.time.hasPermission(sender)) {
|
||||
Message.Boss_Time_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
if (args.length != 1)
|
||||
return ReturnType.SYNTAX_ERROR;
|
||||
|
||||
if(args.length != 2) {
|
||||
Message.Boss_Time_InvalidArgs.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
String section = args[1];
|
||||
String section = args[0];
|
||||
boolean exists = this.autoSpawnManager.exists(section);
|
||||
List<String> currentActive = this.autoSpawnManager.getIntervalAutoSpawns();
|
||||
|
||||
if (!exists) {
|
||||
Message.Boss_Time_DoesntExist.msg(sender, StringUtils.get().appendList(currentActive));
|
||||
return;
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
ActiveAutoSpawnHolder activeAutoSpawnHolder = this.autoSpawnManager.getActiveAutoSpawnHolder(section);
|
||||
@ -56,7 +48,7 @@ public class BossTimeCmd extends SubCommand {
|
||||
|
||||
if (remainingMs == 0 && activeIntervalAutoSpawnHolder.isSpawnAfterLastBossIsKilled()) {
|
||||
Message.Boss_Time_CurrentlyActive.msg(sender);
|
||||
return;
|
||||
return ReturnType.FAILURE;
|
||||
}
|
||||
|
||||
String s = Message.General_TimeLayout.toString();
|
||||
@ -72,5 +64,29 @@ public class BossTimeCmd extends SubCommand {
|
||||
s = s.replace("{sec}", NumberUtils.get().formatDouble(remainingSecs));
|
||||
|
||||
Message.Boss_Time_GetRemainingTime.msg(sender, s, section);
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender commandSender, String... args) {
|
||||
if (args.length == 1) {
|
||||
return new ArrayList<>(this.autoSpawnManager.getAutoSpawns().keySet());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "boss.time";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/boss time <section>";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Shows the time left till next auto spawn.";
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.managers.DebugManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 09-Oct-18
|
||||
*/
|
||||
public class BossDebugCmd extends SubCommand {
|
||||
|
||||
private DebugManager debugManager;
|
||||
|
||||
public BossDebugCmd(DebugManager debugManager) {
|
||||
super("debug");
|
||||
|
||||
this.debugManager = debugManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.debug.hasPermission(sender)) {
|
||||
Message.Boss_Debug_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(sender instanceof Player)) {
|
||||
Message.General_MustBePlayer.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
String toggled;
|
||||
|
||||
if(this.debugManager.isToggled(player.getUniqueId())) {
|
||||
this.debugManager.togglePlayerOff(player.getUniqueId());
|
||||
toggled = "Off";
|
||||
} else {
|
||||
this.debugManager.togglePlayerOn(player.getUniqueId());
|
||||
toggled = "On";
|
||||
}
|
||||
|
||||
Message.Boss_Debug_Toggled.msg(player, toggled);
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.managers.BossPanelManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 04-Oct-18
|
||||
*/
|
||||
public class BossDropTableCmd extends SubCommand {
|
||||
|
||||
private BossPanelManager bossPanelManager;
|
||||
|
||||
public BossDropTableCmd(BossPanelManager bossPanelManager) {
|
||||
super("droptable");
|
||||
|
||||
this.bossPanelManager = bossPanelManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.admin.hasPermission(sender)) {
|
||||
Message.Boss_DropTable_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(sender instanceof Player)) {
|
||||
Message.General_MustBePlayer.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
|
||||
this.bossPanelManager.getDropTables().openFor(player);
|
||||
}
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
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;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 02-Oct-18
|
||||
*/
|
||||
public class BossEditCmd extends SubCommand {
|
||||
|
||||
private BossEntityContainer bossEntityContainer;
|
||||
private BossPanelManager bossPanelManager;
|
||||
|
||||
public BossEditCmd(BossPanelManager bossPanelManager, BossEntityContainer bossEntityContainer) {
|
||||
super("edit");
|
||||
|
||||
this.bossPanelManager = bossPanelManager;
|
||||
this.bossEntityContainer = bossEntityContainer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.admin.hasPermission(sender)) {
|
||||
Message.Boss_Edit_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(sender instanceof Player)) {
|
||||
Message.General_MustBePlayer.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
|
||||
switch(args.length) {
|
||||
default:
|
||||
case 1:
|
||||
this.bossPanelManager.getBosses().openFor(player);
|
||||
break;
|
||||
case 2:
|
||||
String input = args[1];
|
||||
|
||||
if(!this.bossEntityContainer.exists(input)) {
|
||||
Message.Boss_Edit_DoesntExist.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
BossEntity bossEntity = this.bossEntityContainer.getData().get(input);
|
||||
|
||||
this.bossPanelManager.getMainBossEditMenu().openFor(player, bossEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,86 +0,0 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.managers.BossEntityManager;
|
||||
import com.songoda.epicbosses.managers.files.BossesFileManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.NumberUtils;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 14-Nov-18
|
||||
*/
|
||||
public class BossGiveEggCmd extends SubCommand {
|
||||
|
||||
private BossEntityManager bossEntityManager;
|
||||
private BossesFileManager bossesFileManager;
|
||||
|
||||
public BossGiveEggCmd(BossesFileManager bossesFileManager, BossEntityManager bossEntityManager) {
|
||||
super("give", "giveegg");
|
||||
|
||||
this.bossesFileManager = bossesFileManager;
|
||||
this.bossEntityManager = bossEntityManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.give.hasPermission(sender)) {
|
||||
Message.Boss_GiveEgg_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
if(args.length < 3) {
|
||||
Message.Boss_GiveEgg_InvalidArgs.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
int amount = 1;
|
||||
|
||||
if(args.length == 4) {
|
||||
String amountInput = args[3];
|
||||
|
||||
if(NumberUtils.get().isInt(amountInput)) {
|
||||
amount = Integer.valueOf(amountInput);
|
||||
} else {
|
||||
Message.General_NotNumber.msg(sender);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
String playerInput = args[2];
|
||||
Player player = Bukkit.getPlayer(playerInput);
|
||||
|
||||
if(player == null) {
|
||||
Message.General_NotOnline.msg(sender, playerInput);
|
||||
return;
|
||||
}
|
||||
|
||||
String bossInput = args[1];
|
||||
BossEntity bossEntity = this.bossesFileManager.getBossEntity(bossInput);
|
||||
|
||||
if(bossEntity == null) {
|
||||
Message.Boss_GiveEgg_InvalidBoss.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack spawnItem = this.bossEntityManager.getSpawnItem(bossEntity);
|
||||
|
||||
if(spawnItem == null) {
|
||||
Message.Boss_GiveEgg_NotSet.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
spawnItem.setAmount(amount);
|
||||
player.getInventory().addItem(spawnItem);
|
||||
|
||||
Message.Boss_GiveEgg_Given.msg(sender, player.getName(), amount, bossInput);
|
||||
Message.Boss_GiveEgg_Received.msg(player, amount, bossInput);
|
||||
}
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.NumberUtils;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.StringUtils;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 02-Oct-18
|
||||
*/
|
||||
public class BossHelpCmd extends SubCommand {
|
||||
|
||||
public BossHelpCmd() {
|
||||
super("help");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(Permission.admin.hasPermission(sender) || Permission.help.hasPermission(sender)) {
|
||||
int pageNumber = 0;
|
||||
|
||||
if(args.length > 1) {
|
||||
Integer newNumber = NumberUtils.get().getInteger(args[1]);
|
||||
|
||||
if(newNumber != null) pageNumber = newNumber;
|
||||
}
|
||||
|
||||
switch (pageNumber) {
|
||||
default:
|
||||
case 1:
|
||||
Message.Boss_Help_Page1.msg(sender);
|
||||
break;
|
||||
case 2:
|
||||
Message.Boss_Help_Page2.msg(sender);
|
||||
break;
|
||||
case 3:
|
||||
Message.Boss_Help_Page3.msg(sender);
|
||||
break;
|
||||
case 4:
|
||||
Message.Boss_Help_Page4.msg(sender);
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
sender.sendMessage(StringUtils.get().translateColor("EpicBosses &7Version " + CustomBosses.get().getDescription().getVersion() + " Created with <3 by &5&l&oSongoda"));
|
||||
Message.Boss_Help_NoPermission.msg(sender);
|
||||
}
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.managers.BossEntityManager;
|
||||
import com.songoda.epicbosses.managers.files.BossesFileManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 02-Oct-18
|
||||
*/
|
||||
public class BossInfoCmd extends SubCommand {
|
||||
|
||||
private BossEntityManager bossEntityManager;
|
||||
private BossesFileManager bossesFileManager;
|
||||
|
||||
public BossInfoCmd(BossesFileManager bossesFileManager, BossEntityManager bossEntityManager) {
|
||||
super("info");
|
||||
|
||||
this.bossesFileManager = bossesFileManager;
|
||||
this.bossEntityManager = bossEntityManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.admin.hasPermission(sender)) {
|
||||
Message.Boss_Info_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
if(args.length != 2) {
|
||||
Message.Boss_Info_InvalidArgs.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
String input = args[1];
|
||||
BossEntity bossEntity = this.bossesFileManager.getBossEntity(input);
|
||||
|
||||
if(bossEntity == null) {
|
||||
Message.Boss_Info_CouldntFindBoss.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
boolean editing = bossEntity.isEditing();
|
||||
int active = this.bossEntityManager.getCurrentlyActive(bossEntity);
|
||||
boolean complete = bossEntity.isCompleteEnoughToSpawn();
|
||||
|
||||
Message.Boss_Info_Display.msg(sender, input, editing, active, complete);
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.managers.BossPanelManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 04-Oct-18
|
||||
*/
|
||||
public class BossItemsCmd extends SubCommand {
|
||||
|
||||
private BossPanelManager bossPanelManager;
|
||||
|
||||
public BossItemsCmd(BossPanelManager bossPanelManager) {
|
||||
super("item", "items");
|
||||
|
||||
this.bossPanelManager = bossPanelManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.admin.hasPermission(sender)) {
|
||||
Message.Boss_Items_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(sender instanceof Player)) {
|
||||
Message.General_MustBePlayer.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
|
||||
this.bossPanelManager.getCustomItems().openFor(player);
|
||||
}
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.managers.BossEntityManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 02-Oct-18
|
||||
*/
|
||||
public class BossKillAllCmd extends SubCommand {
|
||||
|
||||
private BossEntityManager bossEntityManager;
|
||||
|
||||
public BossKillAllCmd(BossEntityManager bossEntityManager) {
|
||||
super("killall");
|
||||
|
||||
this.bossEntityManager = bossEntityManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.admin.hasPermission(sender)) {
|
||||
Message.Boss_KillAll_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
World world = null;
|
||||
|
||||
if(args.length == 2) {
|
||||
String worldArgs = args[1];
|
||||
|
||||
world = Bukkit.getWorld(worldArgs);
|
||||
|
||||
if(world == null) {
|
||||
Message.Boss_KillAll_WorldNotFound.msg(sender);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int amount = this.bossEntityManager.killAllHolders(world);
|
||||
|
||||
if(args.length == 2) Message.Boss_KillAll_KilledWorld.msg(sender, amount, world.getName());
|
||||
else Message.Boss_KillAll_KilledAll.msg(sender, amount);
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.managers.BossPanelManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 02-Oct-18
|
||||
*/
|
||||
public class BossListCmd extends SubCommand {
|
||||
|
||||
private BossPanelManager bossPanelManager;
|
||||
|
||||
public BossListCmd(BossPanelManager bossPanelManager) {
|
||||
super("list", "show");
|
||||
|
||||
this.bossPanelManager = bossPanelManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.admin.hasPermission(sender)) {
|
||||
Message.Boss_List_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(sender instanceof Player)) {
|
||||
Message.General_MustBePlayer.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
|
||||
this.bossPanelManager.getBosses().openFor(player);
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.managers.BossPanelManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 10-Oct-18
|
||||
*/
|
||||
public class BossMenuCmd extends SubCommand {
|
||||
|
||||
private BossPanelManager bossPanelManager;
|
||||
|
||||
public BossMenuCmd(BossPanelManager bossPanelManager) {
|
||||
super("menu");
|
||||
|
||||
this.bossPanelManager = bossPanelManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.admin.hasPermission(sender)) {
|
||||
Message.Boss_Menu_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(sender instanceof Player)) {
|
||||
Message.General_MustBePlayer.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
|
||||
this.bossPanelManager.getMainMenu().openFor(player);
|
||||
}
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.file.ConfigFileHandler;
|
||||
import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import com.songoda.epicbosses.utils.*;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 02-Oct-18
|
||||
*/
|
||||
public class BossNearbyCmd extends SubCommand {
|
||||
|
||||
private CustomBosses plugin;
|
||||
|
||||
public BossNearbyCmd(CustomBosses plugin) {
|
||||
super("nearby");
|
||||
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.nearby.hasPermission(sender)) {
|
||||
Message.Boss_Nearby_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(sender instanceof Player)) {
|
||||
Message.General_MustBePlayer.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
Location location = player.getLocation();
|
||||
double radius = this.plugin.getConfig().getDouble("Settings.defaultNearbyRadius", 250.0);
|
||||
double maxRadius = this.plugin.getConfig().getDouble("Limits.maxNearbyRadius", 500.0);
|
||||
String nearbyFormat = this.plugin.getConfig().getString("Settings.nearbyFormat", "{name} ({distance}m)");
|
||||
|
||||
if(args.length == 2) {
|
||||
Integer newNumber = NumberUtils.get().getInteger(args[1]);
|
||||
|
||||
if(newNumber != null) radius = newNumber;
|
||||
|
||||
if(radius > maxRadius) {
|
||||
Message.Boss_Nearby_MaxRadius.msg(player, maxRadius);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Map<ActiveBossHolder, Double> nearbyBosses = this.plugin.getBossEntityManager().getActiveBossHoldersWithinRadius(radius, location);
|
||||
Map<ActiveBossHolder, Double> sortedMap = MapUtils.get().sortByValue(nearbyBosses);
|
||||
|
||||
if(sortedMap.isEmpty()) {
|
||||
Message.Boss_Nearby_NoneNearby.msg(player);
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> input = new LinkedList<>();
|
||||
|
||||
sortedMap.forEach(((activeBossHolder, distance) -> {
|
||||
input.add(nearbyFormat.replace("{name}", activeBossHolder.getName()).replace("{distance}", NumberUtils.get().formatDouble(distance)));
|
||||
}));
|
||||
|
||||
Message.Boss_Nearby_Near.msg(player, StringUtils.get().appendList(input));
|
||||
}
|
||||
}
|
@ -1,244 +0,0 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
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;
|
||||
import com.songoda.epicbosses.managers.files.*;
|
||||
import com.songoda.epicbosses.skills.Skill;
|
||||
import com.songoda.epicbosses.skills.SkillMode;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 19-Nov-18
|
||||
*
|
||||
* boss new droptable [name] [type]
|
||||
* boss new skill [name] [type] [mode]
|
||||
* boss new command [name] [commands]
|
||||
* boss new message [name] [message]
|
||||
* boss new autospawn [name]
|
||||
*/
|
||||
public class BossNewCmd extends SubCommand {
|
||||
|
||||
private AutoSpawnFileManager autoSpawnFileManager;
|
||||
private DropTableFileManager dropTableFileManager;
|
||||
private BossDropTableManager bossDropTableManager;
|
||||
private MessagesFileManager messagesFileManager;
|
||||
private CommandsFileManager commandsFileManager;
|
||||
private SkillsFileManager skillsFileManager;
|
||||
private BossSkillManager bossSkillManager;
|
||||
|
||||
public BossNewCmd(CustomBosses plugin) {
|
||||
super("new");
|
||||
|
||||
this.bossSkillManager = plugin.getBossSkillManager();
|
||||
this.skillsFileManager = plugin.getSkillsFileManager();
|
||||
this.dropTableFileManager = plugin.getDropTableFileManager();
|
||||
this.bossDropTableManager = plugin.getBossDropTableManager();
|
||||
this.messagesFileManager = plugin.getBossMessagesFileManager();
|
||||
this.commandsFileManager = plugin.getBossCommandFileManager();
|
||||
this.autoSpawnFileManager = plugin.getAutoSpawnFileManager();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.admin.hasPermission(sender)) {
|
||||
Message.Boss_New_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
//--------------------
|
||||
// A U T O S P A W N
|
||||
//--------------------
|
||||
if(args.length == 3 && args[1].equalsIgnoreCase("autospawn")) {
|
||||
String nameInput = args[2];
|
||||
|
||||
if(this.autoSpawnFileManager.getAutoSpawn(nameInput) != null) {
|
||||
Message.Boss_New_AlreadyExists.msg(sender, "AutoSpawn");
|
||||
return;
|
||||
}
|
||||
|
||||
AutoSpawn autoSpawn = BossAPI.createBaseAutoSpawn(nameInput);
|
||||
|
||||
if(autoSpawn == null) {
|
||||
Message.Boss_New_SomethingWentWrong.msg(sender, "AutoSpawn");
|
||||
} else {
|
||||
Message.Boss_New_AutoSpawn.msg(sender, nameInput);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//-------------------
|
||||
// C O M M A N D
|
||||
//-------------------
|
||||
if(args.length >= 4 && args[1].equalsIgnoreCase("command")) {
|
||||
String nameInput = args[2];
|
||||
|
||||
if(this.commandsFileManager.getCommands(nameInput) != null) {
|
||||
Message.Boss_New_AlreadyExists.msg(sender, "Command");
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> commands = appendList(args);
|
||||
|
||||
this.commandsFileManager.addNewCommand(nameInput, commands);
|
||||
this.commandsFileManager.save();
|
||||
|
||||
Message.Boss_New_Command.msg(sender, nameInput);
|
||||
return;
|
||||
}
|
||||
|
||||
//-------------------
|
||||
// M E S S A G E
|
||||
//-------------------
|
||||
if(args.length >= 4 && args[1].equalsIgnoreCase("message")) {
|
||||
String nameInput = args[2];
|
||||
|
||||
if(this.commandsFileManager.getCommands(nameInput) != null) {
|
||||
Message.Boss_New_AlreadyExists.msg(sender, "Message");
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> messages = appendList(args);
|
||||
|
||||
this.messagesFileManager.addNewMessage(nameInput, messages);
|
||||
this.messagesFileManager.save();
|
||||
|
||||
Message.Boss_New_Message.msg(sender, nameInput);
|
||||
return;
|
||||
}
|
||||
|
||||
//----------------------
|
||||
// D R O P T A B L E
|
||||
//----------------------
|
||||
if(args.length == 4 && args[1].equalsIgnoreCase("droptable")) {
|
||||
String nameInput = args[2];
|
||||
String typeInput = args[3];
|
||||
boolean validType = false;
|
||||
|
||||
if(this.dropTableFileManager.getDropTable(nameInput) != null) {
|
||||
Message.Boss_New_AlreadyExists.msg(sender, "DropTable");
|
||||
return;
|
||||
}
|
||||
|
||||
for(String s : this.bossDropTableManager.getValidDropTableTypes()) {
|
||||
if(s.equalsIgnoreCase(typeInput)) {
|
||||
validType = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!validType) {
|
||||
Message.Boss_New_InvalidDropTableType.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
DropTable dropTable = BossAPI.createBaseDropTable(nameInput, typeInput);
|
||||
|
||||
if(dropTable == null) {
|
||||
Message.Boss_New_SomethingWentWrong.msg(sender, "DropTable");
|
||||
} else {
|
||||
Message.Boss_New_DropTable.msg(sender, nameInput, typeInput);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//-------------------
|
||||
// S K I L L
|
||||
//-------------------
|
||||
if(args.length == 5 && args[1].equalsIgnoreCase("skill")) {
|
||||
String nameInput = args[2];
|
||||
String typeInput = args[3];
|
||||
String modeInput = args[4];
|
||||
boolean validType = false, validMode = false;
|
||||
List<SkillMode> skillModes = SkillMode.getSkillModes();
|
||||
|
||||
if(this.skillsFileManager.getSkill(nameInput) != null) {
|
||||
Message.Boss_New_AlreadyExists.msg(sender, "Skill");
|
||||
return;
|
||||
}
|
||||
|
||||
for(String s : this.bossSkillManager.getValidSkillTypes()) {
|
||||
if(s.equalsIgnoreCase(typeInput)) {
|
||||
validType = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for(SkillMode skillMode : skillModes) {
|
||||
if(skillMode.name().equalsIgnoreCase(modeInput)) {
|
||||
validMode = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!validType) {
|
||||
Message.Boss_New_InvalidSkillType.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!validMode) {
|
||||
Message.Boss_New_InvalidSkillMode.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
Skill skill = BossAPI.createBaseSkill(nameInput, typeInput, modeInput);
|
||||
|
||||
if(skill == null) {
|
||||
Message.Boss_New_SomethingWentWrong.msg(sender, "Skill");
|
||||
} else {
|
||||
Message.Boss_New_Skill.msg(sender, nameInput, typeInput);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Message.Boss_New_InvalidArgs.msg(sender);
|
||||
}
|
||||
|
||||
private List<String> appendList(String[] args) {
|
||||
String[] params = Arrays.copyOfRange(args, 3, args.length);
|
||||
|
||||
List<String> sections = new ArrayList<>();
|
||||
StringBuilder currentSection = new StringBuilder();
|
||||
|
||||
for (String param : params) {
|
||||
String[] split = param.split("\\|");
|
||||
if (split.length == 1) {
|
||||
currentSection.append(split[0]).append(" ");
|
||||
continue;
|
||||
}
|
||||
|
||||
boolean firstAdded = false;
|
||||
for (String piece : split) {
|
||||
currentSection.append(piece).append(" ");
|
||||
|
||||
if (!firstAdded) {
|
||||
sections.add(currentSection.toString().trim());
|
||||
currentSection = new StringBuilder();
|
||||
firstAdded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!currentSection.toString().trim().isEmpty())
|
||||
sections.add(currentSection.toString().trim());
|
||||
|
||||
return sections;
|
||||
}
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 10-Oct-18
|
||||
*/
|
||||
public class BossShopCmd extends SubCommand {
|
||||
|
||||
private CustomBosses plugin;
|
||||
|
||||
public BossShopCmd(CustomBosses plugin) {
|
||||
super("shop", "buy", "store");
|
||||
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.shop.hasPermission(sender)) {
|
||||
Message.Boss_Shop_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(sender instanceof Player)) {
|
||||
Message.General_MustBePlayer.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!this.plugin.getConfig().getBoolean("Toggles.bossShop", true)) {
|
||||
Message.Boss_Shop_Disabled.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
|
||||
plugin.getBossPanelManager().getShopPanel().openFor(player);
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.managers.BossPanelManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 04-Oct-18
|
||||
*/
|
||||
public class BossSkillsCmd extends SubCommand {
|
||||
|
||||
private BossPanelManager bossPanelManager;
|
||||
|
||||
public BossSkillsCmd(BossPanelManager bossPanelManager) {
|
||||
super("skills", "skill");
|
||||
|
||||
this.bossPanelManager = bossPanelManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.admin.hasPermission(sender)) {
|
||||
Message.Boss_Skills_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(sender instanceof Player)) {
|
||||
Message.General_MustBePlayer.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
|
||||
this.bossPanelManager.getCustomSkills().openFor(player);
|
||||
}
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
package com.songoda.epicbosses.commands.boss;
|
||||
|
||||
import com.songoda.epicbosses.api.BossAPI;
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.managers.files.BossesFileManager;
|
||||
import com.songoda.epicbosses.utils.Message;
|
||||
import com.songoda.epicbosses.utils.Permission;
|
||||
import com.songoda.epicbosses.utils.StringUtils;
|
||||
import com.songoda.epicbosses.utils.command.SubCommand;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 02-Oct-18
|
||||
*/
|
||||
public class BossSpawnCmd extends SubCommand {
|
||||
|
||||
private BossesFileManager bossesFileManager;
|
||||
|
||||
public BossSpawnCmd(BossesFileManager bossesFileManager) {
|
||||
super("spawn");
|
||||
|
||||
this.bossesFileManager = bossesFileManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(!Permission.admin.hasPermission(sender)) {
|
||||
Message.Boss_Spawn_NoPermission.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
if(args.length < 2) {
|
||||
Message.Boss_Spawn_InvalidArgs.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
Location spawnLocation;
|
||||
|
||||
if(args.length == 3) {
|
||||
Location input = StringUtils.get().fromStringToLocation(args[2]);
|
||||
|
||||
if(input == null) {
|
||||
Message.Boss_Spawn_InvalidLocation.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
spawnLocation = input;
|
||||
} else {
|
||||
if(!(sender instanceof Player)) {
|
||||
Message.Boss_Spawn_MustBePlayer.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
spawnLocation = ((Player) sender).getLocation();
|
||||
}
|
||||
|
||||
String bossInput = args[1];
|
||||
BossEntity bossEntity = this.bossesFileManager.getBossEntity(bossInput);
|
||||
|
||||
if(bossEntity == null) {
|
||||
Message.Boss_Spawn_InvalidBoss.msg(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
BossAPI.spawnNewBoss(bossEntity, spawnLocation, null, null, false);
|
||||
Message.Boss_Spawn_Spawned.msg(sender, bossInput, StringUtils.get().translateLocation(spawnLocation));
|
||||
}
|
||||
}
|
@ -66,6 +66,6 @@ public class BossEntityContainer implements IContainer<Map<String, BossEntity>,
|
||||
|
||||
@Override
|
||||
public boolean exists(String string) {
|
||||
return this.container.containsKey(string);
|
||||
return this.container.keySet().stream().anyMatch(name -> name.equalsIgnoreCase(string));
|
||||
}
|
||||
}
|
||||
|
@ -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 void setDropType(String dropType) {
|
||||
this.dropType = dropType;
|
||||
}
|
||||
|
||||
public JsonObject getRewards() {
|
||||
return this.rewards;
|
||||
}
|
||||
|
||||
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 void setDropRewards(Map<String, Double> dropRewards) {
|
||||
this.dropRewards = dropRewards;
|
||||
}
|
||||
|
||||
public Boolean getRandomDrops() {
|
||||
return this.randomDrops;
|
||||
}
|
||||
|
||||
public void setRandomDrops(Boolean randomDrops) {
|
||||
this.randomDrops = randomDrops;
|
||||
}
|
||||
|
||||
public Integer getDropMaxDrops() {
|
||||
return this.dropMaxDrops;
|
||||
}
|
||||
|
||||
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 void setItems(Map<String, Double> items) {
|
||||
this.items = items;
|
||||
}
|
||||
|
||||
public Map<String, Double> getCommands() {
|
||||
return this.commands;
|
||||
}
|
||||
|
||||
public void setCommands(Map<String, Double> commands) {
|
||||
this.commands = commands;
|
||||
}
|
||||
|
||||
public Integer getMaxDrops() {
|
||||
return this.maxDrops;
|
||||
}
|
||||
|
||||
public void setMaxDrops(Integer maxDrops) {
|
||||
this.maxDrops = maxDrops;
|
||||
}
|
||||
|
||||
public Integer getMaxCommands() {
|
||||
return this.maxCommands;
|
||||
}
|
||||
|
||||
public void setMaxCommands(Integer maxCommands) {
|
||||
this.maxCommands = maxCommands;
|
||||
}
|
||||
|
||||
public Boolean getRandomDrops() {
|
||||
return this.randomDrops;
|
||||
}
|
||||
|
||||
public void setRandomDrops(Boolean randomDrops) {
|
||||
this.randomDrops = randomDrops;
|
||||
}
|
||||
|
||||
public Boolean getRandomCommands() {
|
||||
return this.randomCommands;
|
||||
}
|
||||
|
||||
public void setRandomCommands(Boolean randomCommands) {
|
||||
this.randomCommands = randomCommands;
|
||||
}
|
||||
|
||||
public Double getRequiredPercentage() {
|
||||
return this.requiredPercentage;
|
||||
}
|
||||
|
||||
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 void setSprayRewards(Map<String, Double> sprayRewards) {
|
||||
this.sprayRewards = sprayRewards;
|
||||
}
|
||||
|
||||
public Boolean getRandomSprayDrops() {
|
||||
return this.randomSprayDrops;
|
||||
}
|
||||
|
||||
public void setRandomSprayDrops(Boolean randomSprayDrops) {
|
||||
this.randomSprayDrops = randomSprayDrops;
|
||||
}
|
||||
|
||||
public Integer getSprayMaxDistance() {
|
||||
return this.sprayMaxDistance;
|
||||
}
|
||||
|
||||
public void setSprayMaxDistance(Integer sprayMaxDistance) {
|
||||
this.sprayMaxDistance = sprayMaxDistance;
|
||||
}
|
||||
|
||||
public Integer getSprayMaxDrops() {
|
||||
return this.sprayMaxDrops;
|
||||
}
|
||||
|
||||
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,22 @@ 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 @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;
|
||||
@Expose
|
||||
private String spawnItem, targeting;
|
||||
@Expose
|
||||
private boolean editing, buyable;
|
||||
@Expose
|
||||
private Double price;
|
||||
|
||||
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 +104,64 @@ public class BossEntity {
|
||||
public boolean canBeBought() {
|
||||
return !isEditing() && isBuyable() && (getPrice() != null) && isCompleteEnoughToSpawn();
|
||||
}
|
||||
|
||||
public String getSpawnItem() {
|
||||
return this.spawnItem;
|
||||
}
|
||||
|
||||
public void setSpawnItem(String spawnItem) {
|
||||
this.spawnItem = spawnItem;
|
||||
}
|
||||
|
||||
public String getTargeting() {
|
||||
return this.targeting;
|
||||
}
|
||||
|
||||
public void setTargeting(String targeting) {
|
||||
this.targeting = targeting;
|
||||
}
|
||||
|
||||
public boolean isEditing() {
|
||||
return this.editing;
|
||||
}
|
||||
|
||||
public void setEditing(boolean editing) {
|
||||
this.editing = editing;
|
||||
}
|
||||
|
||||
public boolean isBuyable() {
|
||||
return this.buyable;
|
||||
}
|
||||
|
||||
public void setBuyable(boolean buyable) {
|
||||
this.buyable = buyable;
|
||||
}
|
||||
|
||||
public Double getPrice() {
|
||||
return this.price;
|
||||
}
|
||||
|
||||
public void setPrice(Double price) {
|
||||
this.price = 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;
|
||||
}
|
||||
}
|
||||
|
@ -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 void setTargeting(String targeting) {
|
||||
this.targeting = targeting;
|
||||
}
|
||||
|
||||
public boolean isEditing() {
|
||||
return this.editing;
|
||||
}
|
||||
|
||||
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 void setOnSpawn(String onSpawn) {
|
||||
this.onSpawn = onSpawn;
|
||||
}
|
||||
|
||||
public String getOnDeath() {
|
||||
return this.onDeath;
|
||||
}
|
||||
|
||||
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 void setNaturalDrops(Boolean naturalDrops) {
|
||||
this.naturalDrops = naturalDrops;
|
||||
}
|
||||
|
||||
public Boolean getDropExp() {
|
||||
return this.dropExp;
|
||||
}
|
||||
|
||||
public void setDropExp(Boolean dropExp) {
|
||||
this.dropExp = dropExp;
|
||||
}
|
||||
|
||||
public String getDropTable() {
|
||||
return this.dropTable;
|
||||
}
|
||||
|
||||
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 void setMainStats(MainStatsElement mainStats) {
|
||||
this.mainStats = mainStats;
|
||||
}
|
||||
|
||||
public EquipmentElement getEquipment() {
|
||||
return this.equipment;
|
||||
}
|
||||
|
||||
public void setEquipment(EquipmentElement equipment) {
|
||||
this.equipment = equipment;
|
||||
}
|
||||
|
||||
public HandsElement getHands() {
|
||||
return this.hands;
|
||||
}
|
||||
|
||||
public void setHands(HandsElement hands) {
|
||||
this.hands = hands;
|
||||
}
|
||||
|
||||
public List<PotionEffectHolder> getPotions() {
|
||||
return this.potions;
|
||||
}
|
||||
|
||||
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 void setHelmet(String helmet) {
|
||||
this.helmet = helmet;
|
||||
}
|
||||
|
||||
public String getChestplate() {
|
||||
return this.chestplate;
|
||||
}
|
||||
|
||||
public void setChestplate(String chestplate) {
|
||||
this.chestplate = chestplate;
|
||||
}
|
||||
|
||||
public String getLeggings() {
|
||||
return this.leggings;
|
||||
}
|
||||
|
||||
public void setLeggings(String leggings) {
|
||||
this.leggings = leggings;
|
||||
}
|
||||
|
||||
public String getBoots() {
|
||||
return this.boots;
|
||||
}
|
||||
|
||||
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 void setMainHand(String mainHand) {
|
||||
this.mainHand = mainHand;
|
||||
}
|
||||
|
||||
public String getOffHand() {
|
||||
return this.offHand;
|
||||
}
|
||||
|
||||
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 void setPosition(Integer position) {
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
public String getEntityType() {
|
||||
return this.entityType;
|
||||
}
|
||||
|
||||
public void setEntityType(String entityType) {
|
||||
this.entityType = entityType;
|
||||
}
|
||||
|
||||
public Double getHealth() {
|
||||
return this.health;
|
||||
}
|
||||
|
||||
public void setHealth(Double health) {
|
||||
this.health = health;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
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 void setOnSpawn(OnSpawnMessageElement onSpawn) {
|
||||
this.onSpawn = onSpawn;
|
||||
}
|
||||
|
||||
public OnDeathMessageElement getOnDeath() {
|
||||
return this.onDeath;
|
||||
}
|
||||
|
||||
public void setOnDeath(OnDeathMessageElement onDeath) {
|
||||
this.onDeath = onDeath;
|
||||
}
|
||||
|
||||
public TauntElement getTaunts() {
|
||||
return this.taunts;
|
||||
}
|
||||
|
||||
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 void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getPositionMessage() {
|
||||
return this.positionMessage;
|
||||
}
|
||||
|
||||
public void setPositionMessage(String positionMessage) {
|
||||
this.positionMessage = positionMessage;
|
||||
}
|
||||
|
||||
public Integer getRadius() {
|
||||
return this.radius;
|
||||
}
|
||||
|
||||
public void setRadius(Integer radius) {
|
||||
this.radius = radius;
|
||||
}
|
||||
|
||||
public Integer getOnlyShow() {
|
||||
return this.onlyShow;
|
||||
}
|
||||
|
||||
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 void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Integer getRadius() {
|
||||
return this.radius;
|
||||
}
|
||||
|
||||
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 void setOverallChance(Double overallChance) {
|
||||
this.overallChance = overallChance;
|
||||
}
|
||||
|
||||
public String getMasterMessage() {
|
||||
return this.masterMessage;
|
||||
}
|
||||
|
||||
public void setMasterMessage(String masterMessage) {
|
||||
this.masterMessage = masterMessage;
|
||||
}
|
||||
|
||||
public List<String> getSkills() {
|
||||
return this.skills;
|
||||
}
|
||||
|
||||
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 void setDelay(Integer delay) {
|
||||
this.delay = delay;
|
||||
}
|
||||
|
||||
public Integer getRadius() {
|
||||
return this.radius;
|
||||
}
|
||||
|
||||
public void setRadius(Integer radius) {
|
||||
this.radius = radius;
|
||||
}
|
||||
|
||||
public List<String> getTaunts() {
|
||||
return this.taunts;
|
||||
}
|
||||
|
||||
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;
|
||||
@ -28,12 +27,28 @@ public class BossDamageEvent extends Event {
|
||||
this.damage = damageAmount;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
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,20 +13,28 @@ 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;
|
||||
this.autoSpawn = autoSpawn;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
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;
|
||||
@ -26,12 +25,24 @@ public class BossSkillEvent extends Event {
|
||||
this.skill = skill;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
public ActiveBossHolder getActiveBossHolder() {
|
||||
return this.activeBossHolder;
|
||||
}
|
||||
|
||||
public ISkillHandler getSkillHandler() {
|
||||
return this.skillHandler;
|
||||
}
|
||||
|
||||
public Skill getSkill() {
|
||||
return this.skill;
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user