mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-21 14:55:17 +01:00
Began 6.0.0 Rework
This commit is contained in:
parent
588fe30d2b
commit
a872a7586b
@ -1,9 +0,0 @@
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
jar {
|
||||
archiveFileName = findProperty("Name") + " v" + findProperty("version") + ".jar"
|
||||
}
|
||||
|
||||
description = 'EcoEnchants API'
|
@ -1,11 +0,0 @@
|
||||
package com.willfp.ecoenchants.nms.api;
|
||||
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* NMS Interface for breaking blocks as player
|
||||
*/
|
||||
public interface BlockBreakWrapper {
|
||||
void breakBlock(Player player, Block block);
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package com.willfp.ecoenchants.nms.api;
|
||||
|
||||
public interface ChatComponentWrapper {
|
||||
Object modifyComponent(Object object);
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
package com.willfp.ecoenchants.nms.api;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* NMS Interface for getting attack cooldown
|
||||
*/
|
||||
public interface CooldownWrapper {
|
||||
double getAttackCooldown(Player player);
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package com.willfp.ecoenchants.nms.api;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public interface OpenInventoryWrapper {
|
||||
Object getOpenInventory(Player player);
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package com.willfp.ecoenchants.nms.api;
|
||||
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* NMS Interface for getting/setting anvil repair cost
|
||||
*/
|
||||
public interface RepairCostWrapper {
|
||||
ItemStack setRepairCost(ItemStack itemStack, int cost);
|
||||
|
||||
int getRepairCost(ItemStack itemStack);
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package com.willfp.ecoenchants.nms.api;
|
||||
|
||||
import org.bukkit.entity.Trident;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* NMS Interface for getting an ItemStack from a Trident
|
||||
*/
|
||||
public interface TridentStackWrapper {
|
||||
ItemStack getTridentStack(Trident trident);
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
dependencies {
|
||||
compileOnly project(':API')
|
||||
compileOnly 'org.spigotmc:spigot:1.15.2-R0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
jar {
|
||||
archiveFileName = project.name + " v" + findProperty("version") + ".jar"
|
||||
}
|
||||
|
||||
description = 'v1_15_R1'
|
@ -1,10 +0,0 @@
|
||||
package com.willfp.ecoenchants.nms.v1_15_R1;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.ChatComponentWrapper;
|
||||
|
||||
public class ChatComponent implements ChatComponentWrapper {
|
||||
@Override
|
||||
public Object modifyComponent(Object object) {
|
||||
return object;
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
dependencies {
|
||||
compileOnly project(':API')
|
||||
compileOnly 'org.spigotmc:spigot:1.16.1-R0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
jar {
|
||||
archiveFileName = project.name + " v" + findProperty("version") + ".jar"
|
||||
}
|
||||
|
||||
description = 'v1_16_R1'
|
@ -1,10 +0,0 @@
|
||||
dependencies {
|
||||
compileOnly project(':API')
|
||||
compileOnly 'org.spigotmc:spigot:1.16.2-R0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
jar {
|
||||
archiveFileName = project.name + " v" + findProperty("version") + ".jar"
|
||||
}
|
||||
|
||||
description = 'v1_16_R2'
|
@ -1,10 +0,0 @@
|
||||
dependencies {
|
||||
compileOnly project(':API')
|
||||
compileOnly 'org.spigotmc:spigot:1.16.4-R0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
jar {
|
||||
archiveFileName = project.name + " v" + findProperty("version") + ".jar"
|
||||
}
|
||||
|
||||
description = 'v1_16_R3'
|
@ -1,71 +0,0 @@
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow' version '5.2.0'
|
||||
id 'maven-publish'
|
||||
id 'maven'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':API')
|
||||
implementation project(':v1_15_R1')
|
||||
implementation project(':v1_16_R1')
|
||||
implementation project(':v1_16_R2')
|
||||
implementation project(':v1_16_R3')
|
||||
implementation 'org.apache.maven:maven-artifact:3.0.3'
|
||||
implementation 'org.bstats:bstats-bukkit:1.7'
|
||||
compileOnly 'org.spigotmc:spigot-api:1.16.3-R0.1-SNAPSHOT'
|
||||
compileOnly 'commons-io:commons-io:2.8.0'
|
||||
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.4-SNAPSHOT'
|
||||
compileOnly 'com.github.TechFortress:GriefPrevention:16.14.0'
|
||||
compileOnly 'com.massivecraft:Factions:1.6.9.5-U0.5.10'
|
||||
compileOnly 'com.github.cryptomorin:kingdoms:1.10.3.1'
|
||||
shadow files('../lib/SpartanAPI.jar')
|
||||
shadow files('../lib/aac-api-5.0.0.jar')
|
||||
compileOnly 'com.github.TownyAdvanced:Towny:0.96.2.0'
|
||||
compileOnly 'com.github.angeschossen:LandsAPI:4.7.3'
|
||||
compileOnly 'fr.neatmonster:nocheatplus:3.16.1-SNAPSHOT'
|
||||
compileOnly 'com.github.jiangdashao:matrix-api-repo:317d4635fd'
|
||||
compileOnly 'com.comphenix.protocol:ProtocolLib:4.6.0-SNAPSHOT'
|
||||
compileOnly 'net.ess3:EssentialsX:2.18.1'
|
||||
compileOnly 'com.destroystokyo.paper:paper-api:1.16.3-R0.1-SNAPSHOT'
|
||||
compileOnly 'com.gmail.nossr50.mcMMO:mcMMO:2.1.157'
|
||||
compileOnly 'me.clip:placeholderapi:2.10.9'
|
||||
compileOnly 'org.jetbrains:annotations:19.0.0'
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
relocate('org.bstats.bukkit', 'com.willfp.ecoenchants.shaded.bstats')
|
||||
relocate('org.apache.maven', 'com.willfp.ecoenchants.shaded.maven')
|
||||
archiveFileName = findProperty("plugin-name") + " v" + findProperty("version") + ".jar"
|
||||
}
|
||||
|
||||
processResources {
|
||||
filesNotMatching(["**/*.png", "**/models/**", "**/textures/**"]) {
|
||||
expand projectVersion: findProperty("version")
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
archiveFileName = findProperty("plugin-name") + " v" + findProperty("version") + " " + "unshaded" + ".jar"
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
tasks.withType(Jar) {
|
||||
destinationDirectory = file("$rootDir/bin/")
|
||||
}
|
||||
|
||||
build.dependsOn shadowJar
|
||||
|
||||
description = 'EcoEnchants'
|
||||
compileJava.options.encoding = 'UTF-8'
|
||||
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package com.willfp.ecoenchants.util.internal.updater;
|
||||
|
||||
import com.willfp.ecoenchants.EcoEnchantsPlugin;
|
||||
import com.willfp.ecoenchants.config.ConfigManager;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
|
||||
public class PlayerJoinListener implements Listener {
|
||||
@EventHandler
|
||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||
if (UpdateChecker.isOutdated()) {
|
||||
if (event.getPlayer().hasPermission("ecoenchants.updateannounce")) {
|
||||
event.getPlayer().sendMessage(ConfigManager.getLang().getMessage("outdated").replace("%ver%", EcoEnchantsPlugin.getInstance().getDescription().getVersion())
|
||||
.replace("%newver%", UpdateChecker.getNewVersion()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
62
build.gradle
62
build.gradle
@ -1,45 +1,47 @@
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'com.github.johnrengelman.shadow' version '5.2.0'
|
||||
id 'maven-publish'
|
||||
id 'java'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation getSubprojects()
|
||||
}
|
||||
|
||||
allprojects {
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
mavenLocal()
|
||||
|
||||
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
|
||||
maven { url 'https://repo.codemc.org/repository/maven-public' }
|
||||
maven { url 'https://repo.codemc.org/repository/nms/' }
|
||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
|
||||
maven { url 'https://oss.sonatype.org/content/groups/public/' }
|
||||
maven { url 'https://maven.enginehub.org/repo/' }
|
||||
maven { url 'https://jitpack.io' }
|
||||
maven { url 'https://ci.ender.zone/plugin/repository/project/' }
|
||||
maven { url 'https://ci.ender.zone/plugin/repository/everything/' }
|
||||
maven { url 'https://repo.md-5.net/content/repositories/snapshots/' }
|
||||
maven { url 'https://repo.dmulloy2.net/nexus/repository/public/' }
|
||||
maven { url 'https://papermc.io/repo/repository/maven-public/' }
|
||||
maven { url 'https://repo.maven.apache.org/maven2/' }
|
||||
maven { url 'https://repo.dustplanet.de/artifactory/ext-release-local/' }
|
||||
maven { url 'https://maven.seyfahni.de/repository/snapshots/' }
|
||||
maven { url 'https://libraries.minecraft.net/' }
|
||||
maven { url 'https://repo.spongepowered.org/maven/' }
|
||||
maven { url 'https://org.kitteh.pastegg' }
|
||||
maven { url 'https://repo.mikeprimm.com/' }
|
||||
maven { url 'https://maven.sk89q.com/repo/' }
|
||||
maven { url 'https://github.com/factions-site/repo/raw/public/' }
|
||||
maven { url 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
|
||||
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
|
||||
maven { url 'https://repo.codemc.org/repository/nms/' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.jetbrains:annotations:19.0.0'
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.deprecation = true
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
tasks.withType(Jar) {
|
||||
destinationDirectory = file("$rootDir/bin/")
|
||||
}
|
||||
|
||||
processResources {
|
||||
filesNotMatching(["**/*.png", "**/models/**", "**/textures/**"]) {
|
||||
expand projectVersion: findProperty("version")
|
||||
}
|
||||
}
|
||||
|
||||
compileJava.options.encoding = 'UTF-8'
|
||||
compileJava.dependsOn clean
|
||||
}
|
||||
@ -48,11 +50,25 @@ clean.doLast {
|
||||
file("${rootDir}/bin").deleteDir()
|
||||
}
|
||||
|
||||
group = 'com.willfp.ecoenchants'
|
||||
shadowJar {
|
||||
relocate('org.bstats.bukkit', 'com.willfp.ecoenchants.shaded.bstats')
|
||||
relocate('org.apache.maven', 'com.willfp.ecoenchants.shaded.maven')
|
||||
archiveFileName = findProperty("plugin-name") + " v" + findProperty("version") + ".jar"
|
||||
}
|
||||
|
||||
jar {
|
||||
archiveFileName = findProperty("plugin-name") + " v" + findProperty("version") + " " + "unshaded" + ".jar"
|
||||
}
|
||||
|
||||
group = 'com.willfp'
|
||||
archivesBaseName = project.name
|
||||
version = project.version
|
||||
java.sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
compileJava.options.encoding = 'UTF-8'
|
||||
|
||||
build.dependsOn shadowJar
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
|
180
config/checkstyle/checkstyle.xml
Normal file
180
config/checkstyle/checkstyle.xml
Normal file
@ -0,0 +1,180 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
|
||||
"https://checkstyle.org/dtds/configuration_1_3.dtd">
|
||||
|
||||
<!--
|
||||
|
||||
Checkstyle configuration that checks the sun coding conventions from:
|
||||
|
||||
- the Java Language Specification at
|
||||
https://docs.oracle.com/javase/specs/jls/se11/html/index.html
|
||||
|
||||
- the Sun Code Conventions at https://www.oracle.com/java/technologies/javase/codeconventions-contents.html
|
||||
|
||||
- the Javadoc guidelines at
|
||||
https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html
|
||||
|
||||
- the JDK Api documentation https://docs.oracle.com/en/java/javase/11/
|
||||
|
||||
- some best practices
|
||||
|
||||
Checkstyle is very configurable. Be sure to read the documentation at
|
||||
https://checkstyle.org (or in your downloaded distribution).
|
||||
|
||||
Most Checks are configurable, be sure to consult the documentation.
|
||||
|
||||
To completely disable a check, just comment it out or delete it from the file.
|
||||
To suppress certain violations please review suppression filters.
|
||||
|
||||
Finally, it is worth reading the documentation.
|
||||
|
||||
-->
|
||||
|
||||
<module name="Checker">
|
||||
<!--
|
||||
If you set the basedir property below, then all reported file
|
||||
names will be relative to the specified directory. See
|
||||
https://checkstyle.org/config.html#Checker
|
||||
|
||||
<property name="basedir" value="${basedir}"/>
|
||||
-->
|
||||
<property name="severity" value="error"/>
|
||||
|
||||
<property name="fileExtensions" value="java, properties, xml"/>
|
||||
|
||||
<!-- Excludes all 'module-info.java' files -->
|
||||
<!-- See https://checkstyle.org/config_filefilters.html -->
|
||||
<module name="BeforeExecutionExclusionFileFilter">
|
||||
<property name="fileNamePattern" value="module\-info\.java$"/>
|
||||
</module>
|
||||
|
||||
<!-- Checks whether files end with a new line. -->
|
||||
<!-- See https://checkstyle.org/config_misc.html#NewlineAtEndOfFile -->
|
||||
<module name="NewlineAtEndOfFile"/>
|
||||
|
||||
<!-- Checks that property files contain the same keys. -->
|
||||
<!-- See https://checkstyle.org/config_misc.html#Translation -->
|
||||
<module name="Translation"/>
|
||||
|
||||
<!-- Checks for Size Violations. -->
|
||||
<!-- See https://checkstyle.org/config_sizes.html -->
|
||||
<module name="FileLength"/>
|
||||
<module name="LineLength">
|
||||
<property name="fileExtensions" value="java"/>
|
||||
<property name="max" value="120"/>
|
||||
</module>
|
||||
|
||||
<!-- Checks for whitespace -->
|
||||
<!-- See https://checkstyle.org/config_whitespace.html -->
|
||||
<module name="FileTabCharacter"/>
|
||||
|
||||
<!-- Miscellaneous other checks. -->
|
||||
<!-- See https://checkstyle.org/config_misc.html -->
|
||||
<module name="RegexpSingleline">
|
||||
<property name="format" value="\s+$"/>
|
||||
<property name="minimum" value="0"/>
|
||||
<property name="maximum" value="0"/>
|
||||
<property name="message" value="Line has trailing spaces."/>
|
||||
</module>
|
||||
|
||||
<!-- Checks for Headers -->
|
||||
<!-- See https://checkstyle.org/config_header.html -->
|
||||
<!-- <module name="Header"> -->
|
||||
<!-- <property name="headerFile" value="${checkstyle.header.file}"/> -->
|
||||
<!-- <property name="fileExtensions" value="java"/> -->
|
||||
<!-- </module> -->
|
||||
|
||||
<module name="TreeWalker">
|
||||
|
||||
<!-- Checks for Javadoc comments. -->
|
||||
<!-- See https://checkstyle.org/config_javadoc.html -->
|
||||
<module name="InvalidJavadocPosition"/>
|
||||
<module name="JavadocMethod"/>
|
||||
<module name="JavadocType"/>
|
||||
<module name="JavadocVariable"/>
|
||||
<module name="JavadocStyle"/>
|
||||
<module name="MissingJavadocMethod"/>
|
||||
|
||||
<!-- Checks for Naming Conventions. -->
|
||||
<!-- See https://checkstyle.org/config_naming.html -->
|
||||
<module name="ConstantName"/>
|
||||
<module name="LocalFinalVariableName"/>
|
||||
<module name="LocalVariableName"/>
|
||||
<module name="MemberName"/>
|
||||
<module name="MethodName"/>
|
||||
<module name="PackageName"/>
|
||||
<module name="ParameterName"/>
|
||||
<module name="StaticVariableName"/>
|
||||
<module name="TypeName"/>
|
||||
|
||||
<!-- Checks for imports -->
|
||||
<!-- See https://checkstyle.org/config_imports.html -->
|
||||
<module name="AvoidStarImport"/>
|
||||
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
|
||||
<module name="RedundantImport"/>
|
||||
<module name="UnusedImports">
|
||||
<property name="processJavadoc" value="false"/>
|
||||
</module>
|
||||
|
||||
<!-- Checks for Size Violations. -->
|
||||
<!-- See https://checkstyle.org/config_sizes.html -->
|
||||
<module name="MethodLength"/>
|
||||
<module name="ParameterNumber"/>
|
||||
|
||||
<!-- Checks for whitespace -->
|
||||
<!-- See https://checkstyle.org/config_whitespace.html -->
|
||||
<module name="EmptyForIteratorPad"/>
|
||||
<module name="GenericWhitespace"/>
|
||||
<module name="MethodParamPad"/>
|
||||
<module name="NoWhitespaceAfter"/>
|
||||
<module name="NoWhitespaceBefore"/>
|
||||
<module name="OperatorWrap"/>
|
||||
<module name="ParenPad"/>
|
||||
<module name="TypecastParenPad"/>
|
||||
<module name="WhitespaceAfter"/>
|
||||
<module name="WhitespaceAround"/>
|
||||
|
||||
<!-- Modifier Checks -->
|
||||
<!-- See https://checkstyle.org/config_modifiers.html -->
|
||||
<module name="ModifierOrder"/>
|
||||
<module name="RedundantModifier"/>
|
||||
|
||||
<!-- Checks for blocks. You know, those {}'s -->
|
||||
<!-- See https://checkstyle.org/config_blocks.html -->
|
||||
<module name="AvoidNestedBlocks"/>
|
||||
<module name="EmptyBlock"/>
|
||||
<module name="LeftCurly"/>
|
||||
<module name="NeedBraces"/>
|
||||
<module name="RightCurly"/>
|
||||
|
||||
<!-- Checks for common coding problems -->
|
||||
<!-- See https://checkstyle.org/config_coding.html -->
|
||||
<module name="EmptyStatement"/>
|
||||
<module name="EqualsHashCode"/>
|
||||
<module name="IllegalInstantiation"/>
|
||||
<module name="InnerAssignment"/>
|
||||
<module name="MagicNumber"/>
|
||||
<module name="MissingSwitchDefault"/>
|
||||
<module name="MultipleVariableDeclarations"/>
|
||||
<module name="SimplifyBooleanExpression"/>
|
||||
<module name="SimplifyBooleanReturn"/>
|
||||
|
||||
<!-- Checks for class design -->
|
||||
<!-- See https://checkstyle.org/config_design.html -->
|
||||
<module name="DesignForExtension"/>
|
||||
<module name="FinalClass"/>
|
||||
<module name="HideUtilityClassConstructor"/>
|
||||
<module name="InterfaceIsType"/>
|
||||
<module name="VisibilityModifier"/>
|
||||
<module name="RequireThis"/>
|
||||
|
||||
<!-- Miscellaneous other checks. -->
|
||||
<!-- See https://checkstyle.org/config_misc.html -->
|
||||
<module name="ArrayTypeStyle"/>
|
||||
<module name="FinalParameters"/>
|
||||
<module name="TodoComment"/>
|
||||
<module name="UpperEll"/>
|
||||
|
||||
</module>
|
||||
</module>
|
8
eco-core/build.gradle
Normal file
8
eco-core/build.gradle
Normal file
@ -0,0 +1,8 @@
|
||||
group 'com.willfp'
|
||||
version rootProject.version
|
||||
|
||||
subprojects {
|
||||
dependencies {
|
||||
compileOnly project(":eco-util")
|
||||
}
|
||||
}
|
8
eco-core/core-nms/build.gradle
Normal file
8
eco-core/core-nms/build.gradle
Normal file
@ -0,0 +1,8 @@
|
||||
group 'com.willfp'
|
||||
version rootProject.version
|
||||
|
||||
subprojects {
|
||||
dependencies {
|
||||
compileOnly project(':eco-core:core-proxy')
|
||||
}
|
||||
}
|
6
eco-core/core-nms/v1_15_R1/build.gradle
Normal file
6
eco-core/core-nms/v1_15_R1/build.gradle
Normal file
@ -0,0 +1,6 @@
|
||||
group 'com.willfp'
|
||||
version rootProject.version
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot:1.15.2-R0.1-SNAPSHOT'
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
package com.willfp.ecoenchants.nms.v1_15_R1;
|
||||
package com.willfp.eco.core.proxy.v1_15_R1;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.BlockBreakWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.BlockBreakProxy;
|
||||
import net.minecraft.server.v1_15_R1.BlockPosition;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class BlockBreak implements BlockBreakWrapper {
|
||||
public class BlockBreak implements BlockBreakProxy {
|
||||
@Override
|
||||
public void breakBlock(Player player, Block block) {
|
||||
((CraftPlayer) player).getHandle().playerInteractManager.breakBlock(new BlockPosition(block.getX(), block.getY(), block.getZ()));
|
@ -0,0 +1,10 @@
|
||||
package com.willfp.eco.core.proxy.v1_15_R1;
|
||||
|
||||
import com.willfp.eco.core.proxy.proxies.ChatComponentProxy;
|
||||
|
||||
public class ChatComponent implements ChatComponentProxy {
|
||||
@Override
|
||||
public Object modifyComponent(Object object) {
|
||||
return object;
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
package com.willfp.ecoenchants.nms.v1_15_R1;
|
||||
package com.willfp.eco.core.proxy.v1_15_R1;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.CooldownWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.CooldownProxy;
|
||||
import net.minecraft.server.v1_15_R1.EntityHuman;
|
||||
import org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class Cooldown implements CooldownWrapper {
|
||||
public class Cooldown implements CooldownProxy {
|
||||
@Override
|
||||
public double getAttackCooldown(Player player) {
|
||||
EntityHuman entityHuman = ((CraftPlayer) player).getHandle();
|
@ -1,6 +1,6 @@
|
||||
package com.willfp.ecoenchants.nms.v1_15_R1;
|
||||
package com.willfp.eco.core.proxy.v1_15_R1;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.FastGetEnchantsWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.FastGetEnchantsProxy;
|
||||
import net.minecraft.server.v1_15_R1.NBTBase;
|
||||
import net.minecraft.server.v1_15_R1.NBTTagCompound;
|
||||
import net.minecraft.server.v1_15_R1.NBTTagList;
|
||||
@ -12,7 +12,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class FastGetEnchants implements FastGetEnchantsWrapper {
|
||||
public class FastGetEnchants implements FastGetEnchantsProxy {
|
||||
@Override
|
||||
public Map<Enchantment, Integer> getEnchantmentsOnItem(ItemStack itemStack) {
|
||||
net.minecraft.server.v1_15_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(itemStack);
|
@ -1,10 +1,10 @@
|
||||
package com.willfp.ecoenchants.nms.v1_15_R1;
|
||||
package com.willfp.eco.core.proxy.v1_15_R1;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.OpenInventoryWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.OpenInventoryProxy;
|
||||
import org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class OpenInventory implements OpenInventoryWrapper {
|
||||
public class OpenInventory implements OpenInventoryProxy {
|
||||
@Override
|
||||
public Object getOpenInventory(Player player) {
|
||||
return ((CraftPlayer) player).getHandle().activeContainer;
|
@ -1,10 +1,10 @@
|
||||
package com.willfp.ecoenchants.nms.v1_15_R1;
|
||||
package com.willfp.eco.core.proxy.v1_15_R1;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.RepairCostWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.RepairCostProxy;
|
||||
import org.bukkit.craftbukkit.v1_15_R1.inventory.CraftItemStack;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class RepairCost implements RepairCostWrapper {
|
||||
public class RepairCost implements RepairCostProxy {
|
||||
@Override
|
||||
public ItemStack setRepairCost(ItemStack itemStack, int cost) {
|
||||
net.minecraft.server.v1_15_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(itemStack);
|
@ -1,13 +1,13 @@
|
||||
package com.willfp.ecoenchants.nms.v1_15_R1;
|
||||
package com.willfp.eco.core.proxy.v1_15_R1;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.TridentStackWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.TridentStackProxy;
|
||||
import net.minecraft.server.v1_15_R1.EntityThrownTrident;
|
||||
import org.bukkit.craftbukkit.v1_15_R1.entity.CraftTrident;
|
||||
import org.bukkit.craftbukkit.v1_15_R1.inventory.CraftItemStack;
|
||||
import org.bukkit.entity.Trident;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class TridentStack implements TridentStackWrapper {
|
||||
public class TridentStack implements TridentStackProxy {
|
||||
@Override
|
||||
public ItemStack getTridentStack(Trident trident) {
|
||||
EntityThrownTrident t = ((CraftTrident) trident).getHandle();
|
6
eco-core/core-nms/v1_16_R1/build.gradle
Normal file
6
eco-core/core-nms/v1_16_R1/build.gradle
Normal file
@ -0,0 +1,6 @@
|
||||
group 'com.willfp'
|
||||
version rootProject.version
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot:1.16.1-R0.1-SNAPSHOT'
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R1;
|
||||
package com.willfp.eco.core.proxy.v1_16_R1;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.BlockBreakWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.BlockBreakProxy;
|
||||
import net.minecraft.server.v1_16_R1.BlockPosition;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.craftbukkit.v1_16_R1.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class BlockBreak implements BlockBreakWrapper {
|
||||
public class BlockBreak implements BlockBreakProxy {
|
||||
@Override
|
||||
public void breakBlock(Player player, Block block) {
|
||||
((CraftPlayer) player).getHandle().playerInteractManager.breakBlock(new BlockPosition(block.getX(), block.getY(), block.getZ()));
|
@ -1,10 +1,10 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R1;
|
||||
package com.willfp.eco.core.proxy.v1_16_R1;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonPrimitive;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import com.willfp.ecoenchants.nms.api.ChatComponentWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.ChatComponentProxy;
|
||||
import net.minecraft.server.v1_16_R1.ChatBaseComponent;
|
||||
import net.minecraft.server.v1_16_R1.ChatHoverable;
|
||||
import net.minecraft.server.v1_16_R1.ChatMessage;
|
||||
@ -18,7 +18,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class ChatComponent implements ChatComponentWrapper {
|
||||
public class ChatComponent implements ChatComponentProxy {
|
||||
@Override
|
||||
public Object modifyComponent(Object object) {
|
||||
if (!(object instanceof IChatBaseComponent)) {
|
@ -1,9 +1,9 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R2;
|
||||
package com.willfp.eco.core.proxy.v1_16_R1;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.CooldownWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.CooldownProxy;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class Cooldown implements CooldownWrapper {
|
||||
public class Cooldown implements CooldownProxy {
|
||||
@Override
|
||||
public double getAttackCooldown(Player player) {
|
||||
return player.getAttackCooldown();
|
@ -1,6 +1,6 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R1;
|
||||
package com.willfp.eco.core.proxy.v1_16_R1;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.FastGetEnchantsWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.FastGetEnchantsProxy;
|
||||
import net.minecraft.server.v1_16_R1.NBTBase;
|
||||
import net.minecraft.server.v1_16_R1.NBTTagCompound;
|
||||
import net.minecraft.server.v1_16_R1.NBTTagList;
|
||||
@ -12,7 +12,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class FastGetEnchants implements FastGetEnchantsWrapper {
|
||||
public class FastGetEnchants implements FastGetEnchantsProxy {
|
||||
@Override
|
||||
public Map<Enchantment, Integer> getEnchantmentsOnItem(ItemStack itemStack) {
|
||||
net.minecraft.server.v1_16_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(itemStack);
|
@ -1,10 +1,10 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R1;
|
||||
package com.willfp.eco.core.proxy.v1_16_R1;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.OpenInventoryWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.OpenInventoryProxy;
|
||||
import org.bukkit.craftbukkit.v1_16_R1.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class OpenInventory implements OpenInventoryWrapper {
|
||||
public class OpenInventory implements OpenInventoryProxy {
|
||||
@Override
|
||||
public Object getOpenInventory(Player player) {
|
||||
return ((CraftPlayer) player).getHandle().activeContainer;
|
@ -1,10 +1,10 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R1;
|
||||
package com.willfp.eco.core.proxy.v1_16_R1;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.RepairCostWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.RepairCostProxy;
|
||||
import org.bukkit.craftbukkit.v1_16_R1.inventory.CraftItemStack;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class RepairCost implements RepairCostWrapper {
|
||||
public class RepairCost implements RepairCostProxy {
|
||||
@Override
|
||||
public ItemStack setRepairCost(ItemStack itemStack, int cost) {
|
||||
net.minecraft.server.v1_16_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(itemStack);
|
@ -1,13 +1,13 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R1;
|
||||
package com.willfp.eco.core.proxy.v1_16_R1;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.TridentStackWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.TridentStackProxy;
|
||||
import net.minecraft.server.v1_16_R1.EntityThrownTrident;
|
||||
import org.bukkit.craftbukkit.v1_16_R1.entity.CraftTrident;
|
||||
import org.bukkit.craftbukkit.v1_16_R1.inventory.CraftItemStack;
|
||||
import org.bukkit.entity.Trident;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class TridentStack implements TridentStackWrapper {
|
||||
public class TridentStack implements TridentStackProxy {
|
||||
@Override
|
||||
public ItemStack getTridentStack(Trident trident) {
|
||||
EntityThrownTrident t = ((CraftTrident) trident).getHandle();
|
6
eco-core/core-nms/v1_16_R2/build.gradle
Normal file
6
eco-core/core-nms/v1_16_R2/build.gradle
Normal file
@ -0,0 +1,6 @@
|
||||
group 'com.willfp'
|
||||
version rootProject.version
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot:1.16.3-R0.1-SNAPSHOT'
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R2;
|
||||
package com.willfp.eco.core.proxy.v1_16_R2;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.BlockBreakWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.BlockBreakProxy;
|
||||
import net.minecraft.server.v1_16_R2.BlockPosition;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.craftbukkit.v1_16_R2.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class BlockBreak implements BlockBreakWrapper {
|
||||
public class BlockBreak implements BlockBreakProxy {
|
||||
@Override
|
||||
public void breakBlock(Player player, Block block) {
|
||||
((CraftPlayer) player).getHandle().playerInteractManager.breakBlock(new BlockPosition(block.getX(), block.getY(), block.getZ()));
|
@ -1,10 +1,10 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R2;
|
||||
package com.willfp.eco.core.proxy.v1_16_R2;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonPrimitive;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import com.willfp.ecoenchants.nms.api.ChatComponentWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.ChatComponentProxy;
|
||||
import net.minecraft.server.v1_16_R2.ChatBaseComponent;
|
||||
import net.minecraft.server.v1_16_R2.ChatHoverable;
|
||||
import net.minecraft.server.v1_16_R2.ChatMessage;
|
||||
@ -18,7 +18,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class ChatComponent implements ChatComponentWrapper {
|
||||
public class ChatComponent implements ChatComponentProxy {
|
||||
@Override
|
||||
public Object modifyComponent(Object object) {
|
||||
if (!(object instanceof IChatBaseComponent)) {
|
@ -1,9 +1,9 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R1;
|
||||
package com.willfp.eco.core.proxy.v1_16_R2;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.CooldownWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.CooldownProxy;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class Cooldown implements CooldownWrapper {
|
||||
public class Cooldown implements CooldownProxy {
|
||||
@Override
|
||||
public double getAttackCooldown(Player player) {
|
||||
return player.getAttackCooldown();
|
@ -1,6 +1,6 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R2;
|
||||
package com.willfp.eco.core.proxy.v1_16_R2;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.FastGetEnchantsWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.FastGetEnchantsProxy;
|
||||
import net.minecraft.server.v1_16_R2.NBTBase;
|
||||
import net.minecraft.server.v1_16_R2.NBTTagCompound;
|
||||
import net.minecraft.server.v1_16_R2.NBTTagList;
|
||||
@ -12,7 +12,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class FastGetEnchants implements FastGetEnchantsWrapper {
|
||||
public class FastGetEnchants implements FastGetEnchantsProxy {
|
||||
@Override
|
||||
public Map<Enchantment, Integer> getEnchantmentsOnItem(ItemStack itemStack) {
|
||||
net.minecraft.server.v1_16_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(itemStack);
|
@ -1,10 +1,10 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R2;
|
||||
package com.willfp.eco.core.proxy.v1_16_R2;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.OpenInventoryWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.OpenInventoryProxy;
|
||||
import org.bukkit.craftbukkit.v1_16_R2.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class OpenInventory implements OpenInventoryWrapper {
|
||||
public class OpenInventory implements OpenInventoryProxy {
|
||||
@Override
|
||||
public Object getOpenInventory(Player player) {
|
||||
return ((CraftPlayer) player).getHandle().activeContainer;
|
@ -1,10 +1,10 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R2;
|
||||
package com.willfp.eco.core.proxy.v1_16_R2;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.RepairCostWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.RepairCostProxy;
|
||||
import org.bukkit.craftbukkit.v1_16_R2.inventory.CraftItemStack;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class RepairCost implements RepairCostWrapper {
|
||||
public class RepairCost implements RepairCostProxy {
|
||||
@Override
|
||||
public ItemStack setRepairCost(ItemStack itemStack, int cost) {
|
||||
net.minecraft.server.v1_16_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(itemStack);
|
@ -1,13 +1,13 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R2;
|
||||
package com.willfp.eco.core.proxy.v1_16_R2;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.TridentStackWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.TridentStackProxy;
|
||||
import net.minecraft.server.v1_16_R2.EntityThrownTrident;
|
||||
import org.bukkit.craftbukkit.v1_16_R2.entity.CraftTrident;
|
||||
import org.bukkit.craftbukkit.v1_16_R2.inventory.CraftItemStack;
|
||||
import org.bukkit.entity.Trident;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class TridentStack implements TridentStackWrapper {
|
||||
public class TridentStack implements TridentStackProxy {
|
||||
@Override
|
||||
public ItemStack getTridentStack(Trident trident) {
|
||||
EntityThrownTrident t = ((CraftTrident) trident).getHandle();
|
6
eco-core/core-nms/v1_16_R3/build.gradle
Normal file
6
eco-core/core-nms/v1_16_R3/build.gradle
Normal file
@ -0,0 +1,6 @@
|
||||
group 'com.willfp'
|
||||
version rootProject.version
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot:1.16.4-R0.1-SNAPSHOT'
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R3;
|
||||
package com.willfp.eco.core.proxy.v1_16_R3;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.BlockBreakWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.BlockBreakProxy;
|
||||
import net.minecraft.server.v1_16_R3.BlockPosition;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class BlockBreak implements BlockBreakWrapper {
|
||||
public class BlockBreak implements BlockBreakProxy {
|
||||
@Override
|
||||
public void breakBlock(Player player, Block block) {
|
||||
((CraftPlayer) player).getHandle().playerInteractManager.breakBlock(new BlockPosition(block.getX(), block.getY(), block.getZ()));
|
@ -1,10 +1,10 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R3;
|
||||
package com.willfp.eco.core.proxy.v1_16_R3;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonPrimitive;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import com.willfp.ecoenchants.nms.api.ChatComponentWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.ChatComponentProxy;
|
||||
import net.minecraft.server.v1_16_R3.ChatBaseComponent;
|
||||
import net.minecraft.server.v1_16_R3.ChatHoverable;
|
||||
import net.minecraft.server.v1_16_R3.ChatMessage;
|
||||
@ -18,7 +18,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class ChatComponent implements ChatComponentWrapper {
|
||||
public class ChatComponent implements ChatComponentProxy {
|
||||
@Override
|
||||
public Object modifyComponent(Object object) {
|
||||
if (!(object instanceof IChatBaseComponent)) {
|
@ -1,9 +1,9 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R3;
|
||||
package com.willfp.eco.core.proxy.v1_16_R3;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.CooldownWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.CooldownProxy;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class Cooldown implements CooldownWrapper {
|
||||
public class Cooldown implements CooldownProxy {
|
||||
@Override
|
||||
public double getAttackCooldown(Player player) {
|
||||
return player.getAttackCooldown();
|
@ -1,6 +1,6 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R3;
|
||||
package com.willfp.eco.core.proxy.v1_16_R3;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.FastGetEnchantsWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.FastGetEnchantsProxy;
|
||||
import net.minecraft.server.v1_16_R3.NBTBase;
|
||||
import net.minecraft.server.v1_16_R3.NBTTagCompound;
|
||||
import net.minecraft.server.v1_16_R3.NBTTagList;
|
||||
@ -12,7 +12,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class FastGetEnchants implements FastGetEnchantsWrapper {
|
||||
public class FastGetEnchants implements FastGetEnchantsProxy {
|
||||
@Override
|
||||
public Map<Enchantment, Integer> getEnchantmentsOnItem(ItemStack itemStack) {
|
||||
net.minecraft.server.v1_16_R3.ItemStack nmsStack = CraftItemStack.asNMSCopy(itemStack);
|
@ -1,10 +1,10 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R3;
|
||||
package com.willfp.eco.core.proxy.v1_16_R3;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.OpenInventoryWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.OpenInventoryProxy;
|
||||
import org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class OpenInventory implements OpenInventoryWrapper {
|
||||
public class OpenInventory implements OpenInventoryProxy {
|
||||
@Override
|
||||
public Object getOpenInventory(Player player) {
|
||||
return ((CraftPlayer) player).getHandle().activeContainer;
|
@ -1,10 +1,10 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R3;
|
||||
package com.willfp.eco.core.proxy.v1_16_R3;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.RepairCostWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.RepairCostProxy;
|
||||
import org.bukkit.craftbukkit.v1_16_R3.inventory.CraftItemStack;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class RepairCost implements RepairCostWrapper {
|
||||
public class RepairCost implements RepairCostProxy {
|
||||
@Override
|
||||
public ItemStack setRepairCost(ItemStack itemStack, int cost) {
|
||||
net.minecraft.server.v1_16_R3.ItemStack nmsStack = CraftItemStack.asNMSCopy(itemStack);
|
@ -1,13 +1,13 @@
|
||||
package com.willfp.ecoenchants.nms.v1_16_R3;
|
||||
package com.willfp.eco.core.proxy.v1_16_R3;
|
||||
|
||||
import com.willfp.ecoenchants.nms.api.TridentStackWrapper;
|
||||
import com.willfp.eco.core.proxy.proxies.TridentStackProxy;
|
||||
import net.minecraft.server.v1_16_R3.EntityThrownTrident;
|
||||
import org.bukkit.craftbukkit.v1_16_R3.entity.CraftTrident;
|
||||
import org.bukkit.craftbukkit.v1_16_R3.inventory.CraftItemStack;
|
||||
import org.bukkit.entity.Trident;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class TridentStack implements TridentStackWrapper {
|
||||
public class TridentStack implements TridentStackProxy {
|
||||
@Override
|
||||
public ItemStack getTridentStack(Trident trident) {
|
||||
EntityThrownTrident t = ((CraftTrident) trident).getHandle();
|
46
eco-core/core-plugin/build.gradle
Normal file
46
eco-core/core-plugin/build.gradle
Normal file
@ -0,0 +1,46 @@
|
||||
group 'com.willfp'
|
||||
version rootProject.version
|
||||
|
||||
|
||||
repositories {
|
||||
maven { url 'https://repo.codemc.org/repository/maven-public' }
|
||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
|
||||
maven { url 'https://oss.sonatype.org/content/groups/public/' }
|
||||
maven { url 'https://maven.enginehub.org/repo/' }
|
||||
maven { url 'https://ci.ender.zone/plugin/repository/project/' }
|
||||
maven { url 'https://ci.ender.zone/plugin/repository/everything/' }
|
||||
maven { url 'https://repo.md-5.net/content/repositories/snapshots/' }
|
||||
maven { url 'https://repo.dmulloy2.net/nexus/repository/public/' }
|
||||
maven { url 'https://papermc.io/repo/repository/maven-public/' }
|
||||
maven { url 'https://repo.maven.apache.org/maven2/' }
|
||||
maven { url 'https://repo.dustplanet.de/artifactory/ext-release-local/' }
|
||||
maven { url 'https://maven.seyfahni.de/repository/snapshots/' }
|
||||
maven { url 'https://libraries.minecraft.net/' }
|
||||
maven { url 'https://repo.spongepowered.org/maven/' }
|
||||
maven { url 'https://org.kitteh.pastegg' }
|
||||
maven { url 'https://repo.mikeprimm.com/' }
|
||||
maven { url 'https://maven.sk89q.com/repo/' }
|
||||
maven { url 'https://github.com/factions-site/repo/raw/public/' }
|
||||
maven { url 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.bstats:bstats-bukkit:1.7'
|
||||
compileOnly 'org.spigotmc:spigot-api:1.16.4-R0.1-SNAPSHOT'
|
||||
compileOnly 'commons-io:commons-io:2.8.0'
|
||||
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.4-SNAPSHOT'
|
||||
compileOnly 'com.github.TechFortress:GriefPrevention:16.14.0'
|
||||
compileOnly 'com.massivecraft:Factions:1.6.9.5-U0.5.10'
|
||||
compileOnly 'com.github.cryptomorin:kingdoms:1.10.3.1'
|
||||
compileOnly 'com.github.TownyAdvanced:Towny:0.96.2.0'
|
||||
compileOnly 'com.github.angeschossen:LandsAPI:4.7.3'
|
||||
compileOnly 'fr.neatmonster:nocheatplus:3.16.1-SNAPSHOT'
|
||||
compileOnly 'com.github.jiangdashao:matrix-api-repo:317d4635fd'
|
||||
compileOnly 'com.comphenix.protocol:ProtocolLib:4.6.0-SNAPSHOT'
|
||||
compileOnly 'net.ess3:EssentialsX:2.18.1'
|
||||
compileOnly 'com.destroystokyo.paper:paper-api:1.16.3-R0.1-SNAPSHOT'
|
||||
compileOnly 'com.gmail.nossr50.mcMMO:mcMMO:2.1.157'
|
||||
compileOnly 'me.clip:placeholderapi:2.10.9'
|
||||
shadow files('../lib/SpartanAPI.jar')
|
||||
shadow files('../lib/aac-api-5.0.0.jar')
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user