Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Commit

Permalink
1.19.4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
MagicTeaMC committed Apr 23, 2023
1 parent 78f9c93 commit 4040753
Show file tree
Hide file tree
Showing 15 changed files with 71 additions and 326 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,5 @@ run/

*/target/*


.paper-nms
90 changes: 47 additions & 43 deletions Main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<artifactId>Main</artifactId>

<properties>
<maven.compiler.source>16</maven.compiler.source>
<maven.compiler.target>16</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<repositories>
Expand All @@ -31,7 +31,7 @@

<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
<url>file://${project.basedir}/</url>
</repository>

</repositories>
Expand All @@ -40,7 +40,15 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>
<version>1.19.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.19.4-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>

Expand All @@ -55,9 +63,9 @@
<dependency>
<groupId>res</groupId>
<artifactId>Residence</artifactId>
<version>5.1.0.0</version>
<version>5.1.1.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/Residence5.1.0.0.jar</systemPath>
<systemPath>${project.basedir}/libs/Residence5.1.1.1.jar</systemPath>
</dependency>

<!-- MythicMobs Api -->
Expand All @@ -83,43 +91,6 @@
<version>2.2.1</version>
<scope>compile</scope>
</dependency>

<!--nms-->
<dependency>
<groupId>com.github.nutt1101</groupId>
<artifactId>v1_16</artifactId>
<version>1.1.4</version>
<type>jar</type>
<scope>compile</scope>
<optional>true</optional>
</dependency>

<dependency>
<groupId>com.github.nutt1101</groupId>
<artifactId>v1_17</artifactId>
<version>1.1.4</version>
<type>jar</type>
<scope>compile</scope>
<optional>true</optional>
</dependency>

<dependency>
<groupId>com.github.nutt1101</groupId>
<artifactId>v1_18</artifactId>
<version>1.1.4</version>
<type>jar</type>
<scope>compile</scope>
<optional>true</optional>
</dependency>

<dependency>
<groupId>com.github.nutt1101</groupId>
<artifactId>v1_19</artifactId>
<version>1.1.6</version>
<type>jar</type>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>

<build>
Expand All @@ -140,6 +111,39 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.md-5</groupId>
<artifactId>specialsource-maven-plugin</artifactId>
<version>1.2.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-obf</id>
<configuration>
<srgIn>org.spigotmc:minecraft-server:1.19-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmc:spigot:1.19-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
<remappedArtifactAttached>true</remappedArtifactAttached>
<remappedClassifierName>remapped-obf</remappedClassifierName>
</configuration>
</execution>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-spigot</id>
<configuration>
<inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
<srgIn>org.spigotmc:minecraft-server:1.19-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.19-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
3 changes: 0 additions & 3 deletions Main/src/main/java/com/github/nutt1101/HeadDrop.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ public ItemStack getEntityHead(Entity hitEntity , Player player) {

switch (CatchBall.getRealServerVersion()) {
case "v1_19" -> headMeta = NBT_v1_19.saveEntityNBT(plugin, hitEntity, headMeta);
case "v1_18" -> headMeta = NBT_v1_18.saveEntityNBT(plugin, hitEntity, headMeta);
case "v1_17" -> headMeta = NBT_v1_17.saveEntityNBT(plugin, hitEntity, headMeta);
case "v1_16" -> headMeta = NBT_v1_16.saveEntityNBT(plugin, hitEntity, headMeta);
default -> {
plugin.getLogger().log(Level.WARNING, "Save entity NBT error.");
}
Expand Down
3 changes: 0 additions & 3 deletions Main/src/main/java/com/github/nutt1101/event/HitEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,6 @@ public String getIsCustomEntity(Entity hitEntity) {

switch (CatchBall.getRealServerVersion()) {
case "v1_19" -> checkCustom = NBT_v1_19.isCustomEntity(hitEntity);
case "v1_18" -> checkCustom = NBT_v1_18.isCustomEntity(hitEntity);
case "v1_17" -> checkCustom = NBT_v1_17.isCustomEntity(hitEntity);
case "v1_16" -> checkCustom = NBT_v1_16.isCustomEntity(hitEntity);
default -> {
plugin.getLogger().log(Level.INFO, "can not check entity if it not a entity.");
}
Expand Down
3 changes: 0 additions & 3 deletions Main/src/main/java/com/github/nutt1101/event/SkullClick.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ public void skullClick(PlayerInteractEvent event) {

switch (CatchBall.getRealServerVersion()) {
case "v1_19" -> NBT_v1_19.loadEntityNBT(plugin, entity, data);
case "v1_18" -> NBT_v1_18.loadEntityNBT(plugin, entity, data);
case "v1_17" -> NBT_v1_17.loadEntityNBT(plugin, entity, data);
case "v1_16" -> NBT_v1_16.loadEntityNBT(plugin, entity, data);
default -> {
plugin.getLogger().log(Level.INFO, "can not load nbt from skull.");
}
Expand Down
19 changes: 19 additions & 0 deletions Main/src/main/resources/paper-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CatchBall
main: com.github.nutt1101.CatchBall
author: NUTT1101
description: "§bA plugin that make entity to be catchable.\n§dContact Me: https://discord.link/nuttPluginClub"
version: "1.1.6"
api-version: 1.13
softdepend:
- Residence
- MythicMobs
- GriefPrevention
permissions:
catchball.op:
default: op
catchball.use:
default: true
commands:
ctb:
description: "Command Help : /ctb"

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<artifactId>v1_19</artifactId>

<properties>
<maven.compiler.source>16</maven.compiler.source>
<maven.compiler.target>16</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<dependencies>
Expand Down
6 changes: 1 addition & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
<version>1.1.6</version>

<modules>
<module>v1_16</module>
<module>v1_17</module>
<module>v1_18</module>
<module>v1_19</module>
<module>Main</module>
</modules>

Expand All @@ -22,7 +18,7 @@
<name>CatchBall</name>

<properties>
<java.version>1.8</java.version>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down
28 changes: 0 additions & 28 deletions v1_16/pom.xml

This file was deleted.

38 changes: 0 additions & 38 deletions v1_16/src/main/java/com/github/nutt1101/NBT_v1_16.java

This file was deleted.

66 changes: 0 additions & 66 deletions v1_17/pom.xml

This file was deleted.

34 changes: 0 additions & 34 deletions v1_17/src/main/java/com/github/nutt1101/NBT_v1_17.java

This file was deleted.

Loading

0 comments on commit 4040753

Please sign in to comment.