mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-22 05:31:27 +01:00
Finished moving ecoenchants to new structure
This commit is contained in:
parent
012f952c99
commit
cea8e090bb
@ -1,14 +0,0 @@
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT'
|
||||
compileOnly project(':plugin')
|
||||
}
|
||||
|
||||
jar{
|
||||
archiveFileName = project.name + " Extension" + ".jar"
|
||||
}
|
||||
|
||||
description = 'Alchemy'
|
||||
|
||||
tasks.withType(Jar) {
|
||||
destinationDirectory = file("$rootDir/bin/")
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT'
|
||||
compileOnly project(':plugin')
|
||||
}
|
||||
|
||||
jar{
|
||||
archiveFileName = project.name + " Extension" + ".jar"
|
||||
}
|
||||
|
||||
description = 'Biomes'
|
||||
|
||||
tasks.withType(Jar) {
|
||||
destinationDirectory = file("$rootDir/bin/")
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
package com.willfp.ecoenchants.biomes;
|
||||
|
||||
import com.willfp.ecoenchants.biomes.enchants.defensive.*;
|
||||
import com.willfp.ecoenchants.biomes.enchants.offensive.*;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.extensions.Extension;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class BiomesMain extends Extension {
|
||||
public static final EcoEnchant ELEVATION = new Elevation();
|
||||
public static final EcoEnchant GLACIAL = new Glacial();
|
||||
public static final EcoEnchant HEAT_TREATED = new HeatTreated();
|
||||
public static final EcoEnchant OCEANIC = new Oceanic();
|
||||
public static final EcoEnchant TROPICAL = new Tropical();
|
||||
public static final EcoEnchant ALTITUDE = new Altitude();
|
||||
public static final EcoEnchant AQUAMARINE = new Aquamarine();
|
||||
public static final EcoEnchant DEHYDRATION = new Dehydration();
|
||||
public static final EcoEnchant ICELORD = new Icelord();
|
||||
public static final EcoEnchant RAINFOREST = new Rainforest();
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
Bukkit.getPluginManager().registerEvents(ELEVATION, this.plugin);
|
||||
Bukkit.getPluginManager().registerEvents(GLACIAL, this.plugin);
|
||||
Bukkit.getPluginManager().registerEvents(HEAT_TREATED, this.plugin);
|
||||
Bukkit.getPluginManager().registerEvents(OCEANIC, this.plugin);
|
||||
Bukkit.getPluginManager().registerEvents(TROPICAL, this.plugin);
|
||||
Bukkit.getPluginManager().registerEvents(ALTITUDE, this.plugin);
|
||||
Bukkit.getPluginManager().registerEvents(AQUAMARINE, this.plugin);
|
||||
Bukkit.getPluginManager().registerEvents(DEHYDRATION, this.plugin);
|
||||
Bukkit.getPluginManager().registerEvents(ICELORD, this.plugin);
|
||||
Bukkit.getPluginManager().registerEvents(RAINFOREST, this.plugin);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT'
|
||||
compileOnly project(':plugin')
|
||||
}
|
||||
|
||||
jar{
|
||||
archiveFileName = project.name + " Extension" + ".jar"
|
||||
}
|
||||
|
||||
description = 'Effects'
|
||||
|
||||
tasks.withType(Jar) {
|
||||
destinationDirectory = file("$rootDir/bin/")
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT'
|
||||
compileOnly project(':plugin')
|
||||
}
|
||||
|
||||
jar{
|
||||
archiveFileName = project.name + " Extension" + ".jar"
|
||||
}
|
||||
|
||||
description = 'Endershot'
|
||||
|
||||
tasks.withType(Jar) {
|
||||
destinationDirectory = file("$rootDir/bin/")
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT'
|
||||
compileOnly project(':plugin')
|
||||
}
|
||||
|
||||
jar{
|
||||
archiveFileName = project.name + " Extension" + ".jar"
|
||||
}
|
||||
|
||||
description = 'FireWand'
|
||||
|
||||
tasks.withType(Jar) {
|
||||
destinationDirectory = file("$rootDir/bin/")
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow' version '5.2.0'
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url 'https://mvn.lumine.io/repository/maven-public/'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT'
|
||||
compileOnly project(':plugin')
|
||||
compileOnly 'net.Indyuce:MMOCore:1.6'
|
||||
compileOnly 'net.Indyuce:MMOItems:6.5'
|
||||
compileOnly 'net.Indyuce:MMOLib:1.7.3'
|
||||
}
|
||||
|
||||
jar{
|
||||
archiveFileName = project.name + " Extension" + ".jar"
|
||||
}
|
||||
|
||||
description = 'MMO'
|
||||
|
||||
tasks.withType(Jar) {
|
||||
destinationDirectory = file("$rootDir/bin/")
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
exclude group: 'com.mojang', module: 'authlib'
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT'
|
||||
compileOnly project(':plugin')
|
||||
}
|
||||
|
||||
jar{
|
||||
archiveFileName = project.name + " Extension" + ".jar"
|
||||
}
|
||||
|
||||
description = 'Precision'
|
||||
|
||||
tasks.withType(Jar) {
|
||||
destinationDirectory = file("$rootDir/bin/")
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT'
|
||||
compileOnly project(':plugin')
|
||||
}
|
||||
|
||||
jar{
|
||||
archiveFileName = project.name + " Extension" + ".jar"
|
||||
}
|
||||
|
||||
description = 'Sprint Artifacts'
|
||||
|
||||
tasks.withType(Jar) {
|
||||
destinationDirectory = file("$rootDir/bin/")
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT'
|
||||
compileOnly project(':plugin')
|
||||
}
|
||||
|
||||
jar{
|
||||
archiveFileName = project.name + " Extension" + ".jar"
|
||||
}
|
||||
|
||||
description = 'Summoning'
|
||||
|
||||
tasks.withType(Jar) {
|
||||
destinationDirectory = file("$rootDir/bin/")
|
||||
}
|
16
build.gradle
16
build.gradle
@ -32,13 +32,9 @@ allprojects {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
tasks.withType(Jar) {
|
||||
destinationDirectory = file("$rootDir/bin/")
|
||||
}
|
||||
|
||||
processResources {
|
||||
filesNotMatching(["**/*.png", "**/models/**", "**/textures/**"]) {
|
||||
expand projectVersion: findProperty("version")
|
||||
expand projectVersion: project.version
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,13 +42,17 @@ allprojects {
|
||||
compileJava.dependsOn clean
|
||||
}
|
||||
|
||||
tasks.withType(Jar) {
|
||||
destinationDirectory = file("$rootDir/bin/")
|
||||
}
|
||||
|
||||
clean.doLast {
|
||||
file("${rootDir}/bin").deleteDir()
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
relocate('org.bstats.bukkit', 'com.willfp.eco.core.util.shaded.bstats')
|
||||
relocate('org.apache.maven', 'com.willfp.eco.core.util.shaded.maven')
|
||||
relocate('org.bstats.bukkit', 'com.willfp.eco.util.shaded.bstats')
|
||||
relocate('org.apache.maven', 'com.willfp.eco.util.shaded.maven')
|
||||
archiveFileName = findProperty("plugin-name") + " v" + findProperty("version") + ".jar"
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ jar {
|
||||
|
||||
group = 'com.willfp'
|
||||
archivesBaseName = project.name
|
||||
version = project.version
|
||||
version = findProperty("version")
|
||||
java.sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
compileJava.options.encoding = 'UTF-8'
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.willfp.ecoenchants;
|
||||
|
||||
import com.willfp.eco.core.proxy.proxies.FastGetEnchantsProxy;
|
||||
import com.willfp.eco.util.ProxyUtils;
|
||||
import com.willfp.eco.util.command.AbstractCommand;
|
||||
import com.willfp.eco.util.integrations.IntegrationLoader;
|
||||
import com.willfp.eco.util.interfaces.EcoRunnable;
|
||||
@ -68,7 +70,7 @@ public class EcoEnchantsPlugin extends AbstractEcoPlugin {
|
||||
this.getLog().info("&cNo extensions found");
|
||||
} else {
|
||||
this.getLog().info("Extensions Loaded:");
|
||||
EcoEnchantsPlugin.getInstance().getExtensionLoader().getLoadedExtensions().forEach((extension) -> {
|
||||
this.getExtensionLoader().getLoadedExtensions().forEach((extension) -> {
|
||||
this.getLog().info("- " + extension.getName() + " v" + extension.getVersion());
|
||||
});
|
||||
}
|
||||
@ -86,6 +88,8 @@ public class EcoEnchantsPlugin extends AbstractEcoPlugin {
|
||||
|
||||
this.getLog().info(EcoEnchants.values().size() + " Enchantments Loaded:");
|
||||
this.getLog().info(EcoEnchants.values().stream().map(ecoEnchant -> ecoEnchant.getType().getColor() + ecoEnchant.getName()).collect(Collectors.joining(", ")));
|
||||
|
||||
this.getTelekineticTests().registerTest(player -> ProxyUtils.getProxy(FastGetEnchantsProxy.class).getLevelOnItem(player.getInventory().getItemInMainHand(), EcoEnchants.TELEKINESIS) > 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -105,7 +109,7 @@ public class EcoEnchantsPlugin extends AbstractEcoPlugin {
|
||||
|
||||
@Override
|
||||
public void load() {
|
||||
|
||||
// Nothing needs to be called on load
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.willfp.ecoenchants.config;
|
||||
|
||||
import com.willfp.eco.util.injection.PluginDependent;
|
||||
import com.willfp.ecoenchants.EcoEnchantsPlugin;
|
||||
import com.willfp.eco.util.plugin.AbstractEcoPlugin;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
@ -34,7 +34,7 @@ public abstract class EnchantmentYamlConfig extends PluginDependent {
|
||||
* @param type The enchantment type
|
||||
*/
|
||||
public EnchantmentYamlConfig(String name, Class<?> source, EnchantmentType type) {
|
||||
super(EcoEnchantsPlugin.getInstance());
|
||||
super(AbstractEcoPlugin.getInstance());
|
||||
this.name = name;
|
||||
this.source = source;
|
||||
this.type = type;
|
||||
|
@ -3,7 +3,6 @@ package com.willfp.ecoenchants.display;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.willfp.eco.util.NumberUtils;
|
||||
import com.willfp.eco.util.plugin.AbstractEcoPlugin;
|
||||
import com.willfp.ecoenchants.EcoEnchantsPlugin;
|
||||
import com.willfp.ecoenchants.display.options.DisplayOptions;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
@ -26,7 +25,7 @@ import java.util.List;
|
||||
*/
|
||||
@SuppressWarnings("DeprecatedIsStillUsed")
|
||||
public class EnchantDisplay {
|
||||
private static final AbstractEcoPlugin plugin = EcoEnchantsPlugin.getInstance();
|
||||
private static final AbstractEcoPlugin plugin = AbstractEcoPlugin.getInstance();
|
||||
|
||||
/**
|
||||
* The meta key to hide enchantments in lore
|
||||
|
@ -1,12 +0,0 @@
|
||||
package com.willfp.ecoenchants.integrations;
|
||||
|
||||
/**
|
||||
* Interface for all integrations with optional dependencies
|
||||
*/
|
||||
public interface Integration {
|
||||
/**
|
||||
* Get the name of integration
|
||||
* @return The name
|
||||
*/
|
||||
String getPluginName();
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package com.willfp.ecoenchants.integrations.anticheat;
|
||||
|
||||
import com.willfp.ecoenchants.integrations.Integration;
|
||||
import com.willfp.eco.util.integrations.Integration;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.willfp.ecoenchants.integrations.antigrief;
|
||||
|
||||
import com.willfp.ecoenchants.integrations.Integration;
|
||||
import com.willfp.eco.util.integrations.Integration;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.willfp.ecoenchants.integrations.essentials;
|
||||
|
||||
import com.willfp.ecoenchants.integrations.Integration;
|
||||
import com.willfp.eco.util.integrations.Integration;
|
||||
|
||||
/**
|
||||
* Interface for Essentials Integration
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.willfp.ecoenchants.integrations.mcmmo;
|
||||
|
||||
import com.willfp.ecoenchants.integrations.Integration;
|
||||
import com.willfp.eco.util.integrations.Integration;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
/**
|
||||
|
@ -1,10 +1,11 @@
|
||||
package com.willfp.ecoenchants.integrations.worldguard;
|
||||
|
||||
import com.willfp.eco.util.integrations.Integration;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public interface WorldguardWrapper {
|
||||
public interface WorldguardWrapper extends Integration {
|
||||
void registerFlag(String name, boolean def);
|
||||
boolean enabledForPlayer(EcoEnchant enchant, Player player, Location location);
|
||||
}
|
||||
|
@ -26,4 +26,9 @@ public class WorldguardIntegrationImpl implements WorldguardWrapper {
|
||||
if(WorldGuard.getInstance().getPlatform().getSessionManager().hasBypass(WorldGuardPlugin.inst().wrapPlayer(player), BukkitAdapter.adapt(location.getWorld()))) return true;
|
||||
return WorldGuard.getInstance().getPlatform().getRegionContainer().createQuery().queryState(BukkitAdapter.adapt(location), WorldGuardPlugin.inst().wrapPlayer(player), (StateFlag) REGISTRY.get(enchant.getKey().getKey() + "-enabled")) == StateFlag.State.ALLOW;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "WorldGuard";
|
||||
}
|
||||
}
|
||||
|
3
eco-extensions/alchemy/build.gradle
Normal file
3
eco-extensions/alchemy/build.gradle
Normal file
@ -0,0 +1,3 @@
|
||||
group 'com.willfp'
|
||||
version '3.0.0'
|
||||
description = 'Alchemy Extension'
|
@ -1,6 +1,8 @@
|
||||
package com.willfp.ecoenchants.alchemy;
|
||||
|
||||
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.enchantments.util.EnchantChecks;
|
||||
import com.willfp.ecoenchants.enchantments.util.EnchantmentUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -15,7 +17,7 @@ public class Alchemy extends EcoEnchant {
|
||||
super("alchemy", EnchantmentType.NORMAL);
|
||||
}
|
||||
|
||||
private static final FixedMetadataValue TRUE = new FixedMetadataValue(this.plugin, true);
|
||||
private final FixedMetadataValue TRUE = this.plugin.getMetadataValueFactory().create(true);
|
||||
|
||||
@EventHandler
|
||||
public void onPotionEffect(EntityPotionEffectEvent event) {
|
@ -1,7 +1,7 @@
|
||||
package com.willfp.ecoenchants.alchemy;
|
||||
|
||||
import com.willfp.eco.util.extensions.Extension;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.extensions.Extension;
|
||||
|
||||
public class AlchemyMain extends Extension {
|
||||
public static final EcoEnchant ALCHEMY = new Alchemy();
|
3
eco-extensions/biomes/build.gradle
Normal file
3
eco-extensions/biomes/build.gradle
Normal file
@ -0,0 +1,3 @@
|
||||
group 'com.willfp'
|
||||
version '3.0.0'
|
||||
description = 'Biomes Extension'
|
@ -1,8 +1,9 @@
|
||||
package com.willfp.ecoenchants.biomes;
|
||||
|
||||
import com.willfp.eco.util.optional.Prerequisite;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.util.optional.Prerequisite;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.LivingEntity;
|
@ -0,0 +1,38 @@
|
||||
package com.willfp.ecoenchants.biomes;
|
||||
|
||||
|
||||
import com.willfp.eco.util.extensions.Extension;
|
||||
import com.willfp.ecoenchants.biomes.enchants.defensive.Elevation;
|
||||
import com.willfp.ecoenchants.biomes.enchants.defensive.Glacial;
|
||||
import com.willfp.ecoenchants.biomes.enchants.defensive.HeatTreated;
|
||||
import com.willfp.ecoenchants.biomes.enchants.defensive.Oceanic;
|
||||
import com.willfp.ecoenchants.biomes.enchants.defensive.Tropical;
|
||||
import com.willfp.ecoenchants.biomes.enchants.offensive.Altitude;
|
||||
import com.willfp.ecoenchants.biomes.enchants.offensive.Aquamarine;
|
||||
import com.willfp.ecoenchants.biomes.enchants.offensive.Dehydration;
|
||||
import com.willfp.ecoenchants.biomes.enchants.offensive.Icelord;
|
||||
import com.willfp.ecoenchants.biomes.enchants.offensive.Rainforest;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
|
||||
public class BiomesMain extends Extension {
|
||||
public static final EcoEnchant ELEVATION = new Elevation();
|
||||
public static final EcoEnchant GLACIAL = new Glacial();
|
||||
public static final EcoEnchant HEAT_TREATED = new HeatTreated();
|
||||
public static final EcoEnchant OCEANIC = new Oceanic();
|
||||
public static final EcoEnchant TROPICAL = new Tropical();
|
||||
public static final EcoEnchant ALTITUDE = new Altitude();
|
||||
public static final EcoEnchant AQUAMARINE = new Aquamarine();
|
||||
public static final EcoEnchant DEHYDRATION = new Dehydration();
|
||||
public static final EcoEnchant ICELORD = new Icelord();
|
||||
public static final EcoEnchant RAINFOREST = new Rainforest();
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
package com.willfp.ecoenchants.biomes.enchants.defensive;
|
||||
|
||||
|
||||
import com.willfp.ecoenchants.biomes.BiomesEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.block.Biome;
|
||||
|
||||
import java.util.Arrays;
|
@ -1,6 +1,8 @@
|
||||
package com.willfp.ecoenchants.biomes.enchants.defensive;
|
||||
|
||||
|
||||
import com.willfp.ecoenchants.biomes.BiomesEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.block.Biome;
|
||||
|
||||
import java.util.Arrays;
|
@ -1,6 +1,8 @@
|
||||
package com.willfp.ecoenchants.biomes.enchants.defensive;
|
||||
|
||||
|
||||
import com.willfp.ecoenchants.biomes.BiomesEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.block.Biome;
|
||||
|
||||
import java.util.Arrays;
|
@ -1,6 +1,8 @@
|
||||
package com.willfp.ecoenchants.biomes.enchants.defensive;
|
||||
|
||||
|
||||
import com.willfp.ecoenchants.biomes.BiomesEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.block.Biome;
|
||||
|
||||
import java.util.Arrays;
|
@ -1,6 +1,8 @@
|
||||
package com.willfp.ecoenchants.biomes.enchants.defensive;
|
||||
|
||||
|
||||
import com.willfp.ecoenchants.biomes.BiomesEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.block.Biome;
|
||||
|
||||
import java.util.Arrays;
|
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.biomes.enchants.offensive;
|
||||
|
||||
import com.willfp.ecoenchants.biomes.BiomesEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.block.Biome;
|
||||
|
||||
import java.util.Arrays;
|
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.biomes.enchants.offensive;
|
||||
|
||||
import com.willfp.ecoenchants.biomes.BiomesEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.block.Biome;
|
||||
|
||||
import java.util.Arrays;
|
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.biomes.enchants.offensive;
|
||||
|
||||
import com.willfp.ecoenchants.biomes.BiomesEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.block.Biome;
|
||||
|
||||
import java.util.Arrays;
|
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.biomes.enchants.offensive;
|
||||
|
||||
import com.willfp.ecoenchants.biomes.BiomesEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.block.Biome;
|
||||
|
||||
import java.util.Arrays;
|
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.biomes.enchants.offensive;
|
||||
|
||||
import com.willfp.ecoenchants.biomes.BiomesEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.block.Biome;
|
||||
|
||||
import java.util.Arrays;
|
19
eco-extensions/build.gradle
Normal file
19
eco-extensions/build.gradle
Normal file
@ -0,0 +1,19 @@
|
||||
group 'com.willfp'
|
||||
version rootProject.version
|
||||
|
||||
subprojects {
|
||||
dependencies {
|
||||
compileOnly project(":eco-core:core-plugin")
|
||||
compileOnly project(":eco-core:core-proxy")
|
||||
compileOnly project(":eco-util")
|
||||
compileOnly 'org.spigotmc:spigot-api:1.16.4-R0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
tasks.withType(Jar) {
|
||||
destinationDirectory = file("$rootDir/bin/")
|
||||
}
|
||||
|
||||
jar{
|
||||
archiveFileName = project.description + " v" + project.version + ".jar"
|
||||
}
|
||||
}
|
3
eco-extensions/effects/build.gradle
Normal file
3
eco-extensions/effects/build.gradle
Normal file
@ -0,0 +1,3 @@
|
||||
group 'com.willfp'
|
||||
version '3.0.0'
|
||||
description = 'Effects Extension'
|
@ -1,9 +1,11 @@
|
||||
package com.willfp.ecoenchants.effects;
|
||||
|
||||
|
||||
import com.willfp.eco.util.events.armorequip.ArmorEquipEvent;
|
||||
import com.willfp.eco.util.optional.Prerequisite;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.enchantments.util.EnchantChecks;
|
||||
import com.willfp.ecoenchants.events.armorequip.ArmorEquipEvent;
|
||||
import com.willfp.ecoenchants.util.optional.Prerequisite;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.effects.enchants;
|
||||
|
||||
import com.willfp.ecoenchants.effects.EffectsEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
public class JumpBoost extends EffectsEnchantment {
|
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.effects.enchants;
|
||||
|
||||
import com.willfp.ecoenchants.effects.EffectsEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
public class NightVision extends EffectsEnchantment {
|
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.effects.enchants;
|
||||
|
||||
import com.willfp.ecoenchants.effects.EffectsEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
public class Regeneration extends EffectsEnchantment {
|
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.effects.enchants;
|
||||
|
||||
import com.willfp.ecoenchants.effects.EffectsEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
public class Speed extends EffectsEnchantment {
|
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.effects.enchants;
|
||||
|
||||
import com.willfp.ecoenchants.effects.EffectsEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
public class WaterBreathing extends EffectsEnchantment {
|
3
eco-extensions/endershot/build.gradle
Normal file
3
eco-extensions/endershot/build.gradle
Normal file
@ -0,0 +1,3 @@
|
||||
group 'com.willfp'
|
||||
version '3.0.0'
|
||||
description = 'Endershot Extension'
|
@ -2,6 +2,7 @@ package com.willfp.ecoenchants.endershot;
|
||||
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.enchantments.util.EnchantChecks;
|
||||
import com.willfp.ecoenchants.integrations.mcmmo.McmmoManager;
|
||||
import org.bukkit.GameMode;
|
@ -1,15 +1,15 @@
|
||||
package com.willfp.ecoenchants.endershot;
|
||||
|
||||
|
||||
import com.willfp.eco.util.extensions.Extension;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.extensions.Extension;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class EndershotMain extends Extension {
|
||||
public static final EcoEnchant ENDERSHOT = new Endershot();
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
Bukkit.getPluginManager().registerEvents(ENDERSHOT, this.plugin);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
3
eco-extensions/firewand/build.gradle
Normal file
3
eco-extensions/firewand/build.gradle
Normal file
@ -0,0 +1,3 @@
|
||||
group 'com.willfp'
|
||||
version '3.0.0'
|
||||
description = 'Firewand Extension'
|
@ -1,5 +1,6 @@
|
||||
package com.willfp.ecoenchants.firewand;
|
||||
|
||||
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.itemtypes.Spell;
|
||||
import org.bukkit.entity.Player;
|
@ -1,15 +1,13 @@
|
||||
package com.willfp.ecoenchants.firewand;
|
||||
|
||||
import com.willfp.eco.util.extensions.Extension;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.extensions.Extension;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class FirewandMain extends Extension {
|
||||
public static final EcoEnchant FIREWAND = new Firewand();
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
Bukkit.getPluginManager().registerEvents(FIREWAND, this.plugin);
|
||||
}
|
||||
|
||||
@Override
|
19
eco-extensions/mmo/build.gradle
Normal file
19
eco-extensions/mmo/build.gradle
Normal file
@ -0,0 +1,19 @@
|
||||
group 'com.willfp'
|
||||
version '3.0.0'
|
||||
description = 'MMO Extension'
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url 'https://mvn.lumine.io/repository/maven-public/'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly 'net.Indyuce:MMOCore:1.6'
|
||||
compileOnly 'net.Indyuce:MMOItems:6.5'
|
||||
compileOnly 'net.Indyuce:MMOLib:1.7.3'
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
exclude group: 'com.mojang', module: 'authlib'
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
package com.willfp.ecoenchants.mmo;
|
||||
|
||||
import com.willfp.eco.util.extensions.Extension;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.extensions.Extension;
|
||||
import com.willfp.ecoenchants.mmo.enchants.abilities.Discounted;
|
||||
import com.willfp.ecoenchants.mmo.enchants.abilities.Recover;
|
||||
import com.willfp.ecoenchants.mmo.enchants.mana.Augment;
|
||||
@ -14,8 +14,6 @@ import com.willfp.ecoenchants.mmo.enchants.stamina.Athletic;
|
||||
import com.willfp.ecoenchants.mmo.enchants.stamina.Endurance;
|
||||
import com.willfp.ecoenchants.mmo.enchants.stamina.Fortitude;
|
||||
import com.willfp.ecoenchants.mmo.enchants.stamina.Motivate;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchant;
|
||||
import com.willfp.ecoenchants.util.internal.Logger;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class MMOMain extends Extension {
|
||||
@ -35,14 +33,10 @@ public class MMOMain extends Extension {
|
||||
@Override
|
||||
protected void onEnable() {
|
||||
if(!MMOPrerequisites.HAS_MMOCORE.isMet()) {
|
||||
Logger.error("MMO Extension requires MMOCore to be installed!");
|
||||
Logger.error("Disabling...");
|
||||
Bukkit.getLogger().severe("MMO Extension requires MMOCore to be installed!");
|
||||
Bukkit.getLogger().severe("Disabling...");
|
||||
this.disable();
|
||||
}
|
||||
|
||||
MMOEnchant.REGISTRY.forEach(mmoEnchant -> {
|
||||
Bukkit.getPluginManager().registerEvents((EcoEnchant) mmoEnchant, this.plugin);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.mmo;
|
||||
|
||||
import com.willfp.ecoenchants.util.optional.Prerequisite;
|
||||
|
||||
import com.willfp.eco.util.optional.Prerequisite;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
@ -1,9 +1,10 @@
|
||||
package com.willfp.ecoenchants.mmo.enchants.abilities;
|
||||
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.enchantments.util.EnchantChecks;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import com.willfp.ecoenchants.mmo.MMOPrerequisites;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import net.Indyuce.mmoitems.api.event.AbilityUseEvent;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
@ -1,9 +1,10 @@
|
||||
package com.willfp.ecoenchants.mmo.enchants.abilities;
|
||||
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.enchantments.util.EnchantChecks;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import com.willfp.ecoenchants.mmo.MMOPrerequisites;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import net.Indyuce.mmoitems.api.event.AbilityUseEvent;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
@ -1,7 +1,8 @@
|
||||
package com.willfp.ecoenchants.mmo.enchants.mana;
|
||||
|
||||
import com.willfp.eco.util.events.armorequip.ArmorEquipEvent;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.events.armorequip.ArmorEquipEvent;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import net.mmogroup.mmolib.MMOLib;
|
||||
import net.mmogroup.mmolib.api.player.MMOPlayerData;
|
@ -1,9 +1,12 @@
|
||||
package com.willfp.ecoenchants.mmo.enchants.mana;
|
||||
|
||||
|
||||
import com.willfp.eco.core.proxy.proxies.CooldownProxy;
|
||||
import com.willfp.eco.util.ProxyUtils;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.mmo.integrations.mmo.MMOManager;
|
||||
import com.willfp.ecoenchants.nms.Cooldown;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
@ -21,7 +24,7 @@ public class Elixir extends MMOEnchantment {
|
||||
Player pVictim = (Player) victim;
|
||||
|
||||
boolean notcharged = this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "allow-not-fully-charged");
|
||||
if (Cooldown.getCooldown(pAttacker) != 1.0f && !notcharged)
|
||||
if (ProxyUtils.getProxy(CooldownProxy.class).getAttackCooldown(pAttacker) != 1.0f && !notcharged)
|
||||
return;
|
||||
|
||||
double victimMana = MMOManager.getMana(pVictim);
|
@ -1,8 +1,9 @@
|
||||
package com.willfp.ecoenchants.mmo.enchants.mana;
|
||||
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.mmo.integrations.mmo.MMOManager;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.mmo.enchants.mana;
|
||||
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.enchantments.util.EnchantChecks;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import net.Indyuce.mmocore.api.event.PlayerRegenResourceEvent;
|
@ -1,7 +1,9 @@
|
||||
package com.willfp.ecoenchants.mmo.enchants.misc;
|
||||
|
||||
|
||||
import com.willfp.eco.util.events.armorequip.ArmorEquipEvent;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.events.armorequip.ArmorEquipEvent;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import net.mmogroup.mmolib.MMOLib;
|
||||
import net.mmogroup.mmolib.api.player.MMOPlayerData;
|
@ -1,7 +1,8 @@
|
||||
package com.willfp.ecoenchants.mmo.enchants.stamina;
|
||||
|
||||
import com.willfp.eco.util.events.armorequip.ArmorEquipEvent;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.events.armorequip.ArmorEquipEvent;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import net.mmogroup.mmolib.MMOLib;
|
||||
import net.mmogroup.mmolib.api.player.MMOPlayerData;
|
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.mmo.enchants.stamina;
|
||||
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.enchantments.util.EnchantChecks;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import net.Indyuce.mmocore.api.event.PlayerRegenResourceEvent;
|
@ -1,8 +1,9 @@
|
||||
package com.willfp.ecoenchants.mmo.enchants.stamina;
|
||||
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.mmo.integrations.mmo.MMOManager;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
@ -1,9 +1,12 @@
|
||||
package com.willfp.ecoenchants.mmo.enchants.stamina;
|
||||
|
||||
|
||||
import com.willfp.eco.core.proxy.proxies.CooldownProxy;
|
||||
import com.willfp.eco.util.ProxyUtils;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.mmo.integrations.mmo.MMOManager;
|
||||
import com.willfp.ecoenchants.nms.Cooldown;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
@ -21,7 +24,7 @@ public class Motivate extends MMOEnchantment {
|
||||
Player pVictim = (Player) victim;
|
||||
|
||||
boolean notcharged = this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "allow-not-fully-charged");
|
||||
if (Cooldown.getCooldown(pAttacker) != 1.0f && !notcharged)
|
||||
if (ProxyUtils.getProxy(CooldownProxy.class).getAttackCooldown(pAttacker) != 1.0f && !notcharged)
|
||||
return;
|
||||
|
||||
double victimStamina = MMOManager.getStamina(pVictim);
|
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.mmo.integrations.mmo;
|
||||
|
||||
import com.willfp.ecoenchants.integrations.Integration;
|
||||
|
||||
import com.willfp.eco.util.integrations.Integration;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public interface MMOIntegration extends Integration {
|
@ -1,8 +1,10 @@
|
||||
package com.willfp.ecoenchants.mmo.structure;
|
||||
|
||||
|
||||
import com.willfp.eco.util.optional.Prerequisite;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.mmo.MMOPrerequisites;
|
||||
import com.willfp.ecoenchants.util.optional.Prerequisite;
|
||||
|
||||
public abstract class MMOEnchantment extends EcoEnchant implements MMOEnchant {
|
||||
protected MMOEnchantment(String key, EnchantmentType type, Prerequisite... prerequisites) {
|
@ -1,8 +1,8 @@
|
||||
package com.willfp.ecoenchants.mmo.structure;
|
||||
|
||||
import com.willfp.eco.util.optional.Prerequisite;
|
||||
import com.willfp.ecoenchants.enchantments.itemtypes.Spell;
|
||||
import com.willfp.ecoenchants.mmo.MMOPrerequisites;
|
||||
import com.willfp.ecoenchants.util.optional.Prerequisite;
|
||||
|
||||
public abstract class MMOSpell extends Spell implements MMOEnchant {
|
||||
protected MMOSpell(String key, Prerequisite... prerequisites) {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user