Skip to content

Commit

Permalink
feat: Added support for v1_20_R3
Browse files Browse the repository at this point in the history
  • Loading branch information
MVDW-Java authored and rxchard committed Dec 18, 2023
1 parent 18f173b commit 736d8c6
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>de.corneliusmay</groupId>
<artifactId>SilkSpawners_v2-v1_20_R3</artifactId>
<version>v1_20_R3</version>
<type>jar</type>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>de.corneliusmay</groupId>
<artifactId>SilkSpawners_v2-API</artifactId>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<module>v1_19_R3</module>
<module>v1_20_R1</module>
<module>v1_20_R2</module>
<module>v1_20_R3</module>
</modules>
<packaging>pom</packaging>

Expand Down
38 changes: 38 additions & 0 deletions v1_20_R3/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?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>SilkSpawners_v2</artifactId>
<groupId>de.corneliusmay</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>SilkSpawners_v2-v1_20_R3</artifactId>
<version>v1_20_R3</version>

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

<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>de.corneliusmay</groupId>
<artifactId>SilkSpawners_v2-API</artifactId>
<version>API</version>
<type>jar</type>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package de.corneliusmay.silkspawners.nms.v1_20_R3;

import de.corneliusmay.silkspawners.api.NMS;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;

public class NMSHandler implements NMS {

@Override
public Block getTargetBlock(Player player) {
return player.getTargetBlockExact(5);
}

@Override
public ItemStack[] getItemsInHand(Player player) {
return new ItemStack[]{ player.getInventory().getItemInMainHand(), player.getInventory().getItemInOffHand() };
}

@Override
public Material getSpawnerMaterial() {
return Material.SPAWNER;
}

@Override
public Material getPlaceholderMaterial() {
return Material.GRAY_STAINED_GLASS_PANE;
}
}

0 comments on commit 736d8c6

Please sign in to comment.