mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Make CustomAnvil, mostly, work with legacy EcoEnchants
This commit is contained in:
parent
4147f018a9
commit
050da6da5b
15 changed files with 275 additions and 29 deletions
15
impl/LegacyEcoEnchant/build.gradle.kts
Normal file
15
impl/LegacyEcoEnchant/build.gradle.kts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
group = rootProject.group
|
||||
version = rootProject.version
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "2.0.21"
|
||||
}
|
||||
|
||||
// Imitate needed class and method to support legacy version of EcoEnchant
|
||||
dependencies {
|
||||
// Spigot api
|
||||
compileOnly("org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT")
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.willfp.ecoenchants.enchantments;
|
||||
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentTarget;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Mock class for legacy package of eco enchants
|
||||
*/
|
||||
public class EcoEnchant {
|
||||
|
||||
public boolean getConflictsWithEverything() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean conflictsWith(@NotNull Enchantment enchant) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Set<EnchantmentTarget> getTargets() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.willfp.ecoenchants.enchantments;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Mock class for legacy package of eco enchants
|
||||
*/
|
||||
public class EcoEnchants {
|
||||
|
||||
public static List<EcoEnchant> values(){
|
||||
return null; // We don't care here.
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.willfp.ecoenchants.enchantments.meta;
|
||||
|
||||
import org.bukkit.Material;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Mock class for legacy package of eco enchants
|
||||
*/
|
||||
public class EnchantmentTarget {
|
||||
|
||||
public Set<Material> getMaterials() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue