Skip to content

Commit

Permalink
1.15 Minimal Support Bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberpwnn committed Jan 14, 2020
1 parent 38300d3 commit 541ab15
Show file tree
Hide file tree
Showing 9 changed files with 204 additions and 753 deletions.
94 changes: 38 additions & 56 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@
<id>central</id>
<url>https://raw.githubusercontent.com/cyberpwnn/Central/master/</url>
</repository>
<repository>
<id>volmit</id>
<url>http://nexus.volmit.com:8080/repository/volmit/</url>
</repository>
<repository>
<id>dmulloy2-repo</id>
<url>http://repo.dmulloy2.net/nexus/repository/public/</url>
Expand All @@ -193,81 +197,59 @@
<dependencies>
<!-- Spigot API -->
<dependency>
<groupId>org.spigot</groupId>
<artifactId>spigot</artifactId>
<groupId>cb</groupId>
<version>1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/spigot-1.12.2.jar</systemPath>
<version>1.12.2</version>
<scope>provided</scope>
</dependency>
<!-- Craftbukkit Versions -->
<dependency>
<artifactId>craftbukkit-1.14.2</artifactId>
<groupId>cb</groupId>
<version>1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/craftbukkit-1.14.2.jar</systemPath>
</dependency>
<dependency>
<artifactId>craftbukkit-1.13</artifactId>
<groupId>cb</groupId>
<version>1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/craftbukkit-1.13.jar</systemPath>
</dependency>
<dependency>
<artifactId>craftbukkit-1.13.2</artifactId>
<groupId>cb</groupId>
<version>1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/craftbukkit-1.13.2.jar</systemPath>
<groupId>org.craftbukkit</groupId>
<artifactId>craftbukkit15</artifactId>
<version>15</version>
<scope>provided</scope>
</dependency>
<dependency>
<artifactId>craftbukkit-1.12.2</artifactId>
<groupId>cb</groupId>
<version>1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/craftbukkit-1.12.2.jar</systemPath>
<groupId>org.craftbukkit</groupId>
<artifactId>craftbukkit14</artifactId>
<version>14</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.12-SNAPSHOT</version>
<groupId>org.craftbukkit</groupId>
<artifactId>craftbukkit13</artifactId>
<version>13</version>
<scope>provided</scope>
</dependency>
<dependency>
<artifactId>craftbukkit-1.11.2</artifactId>
<groupId>cb</groupId>
<version>1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/craftbukkit-1.11.2.jar</systemPath>
<groupId>org.craftbukkit</groupId>
<artifactId>craftbukkit12</artifactId>
<version>12</version>
<scope>provided</scope>
</dependency>
<dependency>
<artifactId>craftbukkit-1.10.2</artifactId>
<groupId>cb</groupId>
<version>1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/craftbukkit-1.10.2.jar</systemPath>
<groupId>org.craftbukkit</groupId>
<artifactId>craftbukkit11</artifactId>
<version>11</version>
<scope>provided</scope>
</dependency>
<dependency>
<artifactId>craftbukkit-1.9.4</artifactId>
<groupId>cb</groupId>
<version>1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/craftbukkit-1.9.4.jar</systemPath>
<groupId>org.craftbukkit</groupId>
<artifactId>craftbukkit10</artifactId>
<version>10</version>
<scope>provided</scope>
</dependency>
<dependency>
<artifactId>craftbukkit-1.9.2</artifactId>
<groupId>cb</groupId>
<version>1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/craftbukkit-1.9.2.jar</systemPath>
<groupId>org.craftbukkit</groupId>
<artifactId>craftbukkit19</artifactId>
<version>19</version>
<scope>provided</scope>
</dependency>
<dependency>
<artifactId>craftbukkit-1.8.8</artifactId>
<groupId>cb</groupId>
<version>1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/craftbukkit-1.8.8.jar</systemPath>
<groupId>org.craftbukkit</groupId>
<artifactId>craftbukkit18</artifactId>
<version>18</version>
<scope>provided</scope>
</dependency>
<!-- Plugin Hooks -->
<dependency>
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/mortar/api/inventory/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
public enum Version
{
ONE_EIGHT_R3("1_8_R3", Wrapper1_8_R3.class),
ONE_NINE_R1("1_9_R1", Wrapper1_9_R1.class),
ONE_NINE_R2("1_9_R2", Wrapper1_9_R2.class),
ONE_TEN_R1("1_10_R1", Wrapper1_10_R1.class),
ONE_ELEVEN_R1("1_11_R1", Wrapper1_11_R1.class),
ONE_TWELVE_R1("1_12_R1", Wrapper1_12_R1.class);
Expand Down
149 changes: 0 additions & 149 deletions src/main/java/mortar/api/inventory/Wrapper1_9_R1.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,34 @@
import java.util.Objects;

import org.bukkit.NamespacedKey;
import org.bukkit.craftbukkit.v1_9_R1.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_9_R1.util.CraftMagicNumbers;
import org.bukkit.craftbukkit.v1_15_R1.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_15_R1.util.CraftMagicNumbers;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.Plugin;

import net.minecraft.server.v1_9_R1.Item;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_15_R1.IRegistry;
import net.minecraft.server.v1_15_R1.Item;
import net.minecraft.server.v1_15_R1.MinecraftKey;


public class AdvancementHolder92 extends AdvancementHolder
public class AdvancementHolder15 extends AdvancementHolder
{
public AdvancementHolder92(String id, Plugin p)
public AdvancementHolder15(String id, Plugin p)
{
super(id, p);
}

@SuppressWarnings("deprecation")
@Override
public String getMinecraftIDFrom(ItemStack stack)
public void removeAdvancement(NamespacedKey k)
{
final int check = Item.getId(CraftItemStack.asNMSCopy(stack).getItem());
final MinecraftKey matching = Item.REGISTRY.keySet().stream().filter(key -> Item.getId(Item.REGISTRY.get(key)) == check).findFirst().orElse(null);
return Objects.toString(matching, null);
CraftMagicNumbers.INSTANCE.removeAdvancement(getID());
}

@SuppressWarnings("deprecation")
@Override
public void removeAdvancement(NamespacedKey k)
public String getMinecraftIDFrom(ItemStack stack)
{
CraftMagicNumbers.INSTANCE.removeAdvancement(getID());
final int check = Item.getId(CraftItemStack.asNMSCopy(stack).getItem());
final MinecraftKey matching = IRegistry.ITEM.keySet().stream().filter(key -> Item.getId(IRegistry.ITEM.get(key)) == check).findFirst().orElse(null);
return Objects.toString(matching, null);
}
}
3 changes: 0 additions & 3 deletions src/main/java/mortar/api/nms/Catalyst.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ private static CatalystHost getHost()
case R1_8:
D.as("NMP").v("Selected Catalyst:8");
return new Catalyst8();
case R1_9_2:
D.as("NMP").v("Selected Catalyst:92");
return new Catalyst92();
case R1_9_4:
D.as("NMP").v("Selected Catalyst:94");
return new Catalyst94();
Expand Down
Loading

0 comments on commit 541ab15

Please sign in to comment.