Full 1.15 support
Dieser Commit ist enthalten in:
Ursprung
a50c09bd9b
Commit
efb3e2ce70
53
SpigotCore_15/pom.xml
Normale Datei
53
SpigotCore_15/pom.xml
Normale Datei
@ -0,0 +1,53 @@
|
||||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>steamwar</groupId>
|
||||
<artifactId>SpigotCore</artifactId>
|
||||
<version>2.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>SpigotCore_15</artifactId>
|
||||
<version>2.0</version>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src</directory>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
<exclude>**/*.kt</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>steamwar</groupId>
|
||||
<artifactId>Spigot</artifactId>
|
||||
<version>1.15</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>steamwar</groupId>
|
||||
<artifactId>FAWE</artifactId>
|
||||
<version>1.14</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>steamwar</groupId>
|
||||
<artifactId>SpigotCore_API</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>steamwar</groupId>
|
||||
<artifactId>SpigotCore_14</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
13
SpigotCore_15/src/de/steamwar/inventory/SWInventory_15.java
Normale Datei
13
SpigotCore_15/src/de/steamwar/inventory/SWInventory_15.java
Normale Datei
@ -0,0 +1,13 @@
|
||||
package de.steamwar.inventory;
|
||||
|
||||
import org.bukkit.craftbukkit.v1_15_R1.inventory.CraftInventoryCustom;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
class SWInventory_15 {
|
||||
private SWInventory_15() {}
|
||||
|
||||
static Inventory get(Player player, int size, String title){
|
||||
return new CraftInventoryCustom(player, size, title);
|
||||
}
|
||||
}
|
15
SpigotCore_15/src/de/steamwar/inventory/SWItem_15.java
Normale Datei
15
SpigotCore_15/src/de/steamwar/inventory/SWItem_15.java
Normale Datei
@ -0,0 +1,15 @@
|
||||
package de.steamwar.inventory;
|
||||
|
||||
import org.bukkit.Material;
|
||||
|
||||
class SWItem_15 {
|
||||
private SWItem_15(){}
|
||||
|
||||
static Material getMaterial(String material) {
|
||||
return SWItem_14.getMaterial(material);
|
||||
}
|
||||
|
||||
static Material getDye(int colorCode){
|
||||
return SWItem_14.getDye(colorCode);
|
||||
}
|
||||
}
|
23
SpigotCore_15/src/de/steamwar/sql/Schematic_15.java
Normale Datei
23
SpigotCore_15/src/de/steamwar/sql/Schematic_15.java
Normale Datei
@ -0,0 +1,23 @@
|
||||
package de.steamwar.sql;
|
||||
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
class Schematic_15 {
|
||||
private Schematic_15(){}
|
||||
|
||||
static byte[] getPlayerClipboard(Player player, boolean schemFormat) throws IOException, NoClipboardException {
|
||||
return Schematic_14.getPlayerClipboard(player, schemFormat);
|
||||
}
|
||||
|
||||
static void setPlayerClipboard(Player player, InputStream is, boolean schemFormat) throws IOException, NoClipboardException {
|
||||
Schematic_14.setPlayerClipboard(player, is, schemFormat);
|
||||
}
|
||||
|
||||
static Clipboard getClipboard(InputStream is, boolean schemFormat) throws IOException, NoClipboardException {
|
||||
return Schematic_14.getClipboard(is, schemFormat);
|
||||
}
|
||||
}
|
@ -47,7 +47,7 @@
|
||||
<dependency>
|
||||
<groupId>steamwar</groupId>
|
||||
<artifactId>Spigot</artifactId>
|
||||
<version>1.12</version>
|
||||
<version>1.15</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@ -80,5 +80,11 @@
|
||||
<version>2.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>steamwar</groupId>
|
||||
<artifactId>SpigotCore_15</artifactId>
|
||||
<version>2.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -31,6 +31,9 @@ public class SWInventory implements Listener {
|
||||
case 14:
|
||||
inventory = SWInventory_14.get(p, size, t);
|
||||
break;
|
||||
case 15:
|
||||
inventory = SWInventory_15.get(p, size, t);
|
||||
break;
|
||||
default:
|
||||
inventory = SWInventory_12.get(p, size, t);
|
||||
}
|
||||
|
@ -40,6 +40,8 @@ public class SWItem {
|
||||
switch(Core.getVersion()){
|
||||
case 14:
|
||||
return SWItem_14.getMaterial(material);
|
||||
case 15:
|
||||
return SWItem_15.getMaterial(material);
|
||||
default:
|
||||
return SWItem_12.getMaterial(material);
|
||||
}
|
||||
@ -52,6 +54,8 @@ public class SWItem {
|
||||
switch(Core.getVersion()){
|
||||
case 14:
|
||||
return SWItem_14.getDye(colorCode);
|
||||
case 15:
|
||||
return SWItem_15.getDye(colorCode);
|
||||
default:
|
||||
return SWItem_12.getDye();
|
||||
}
|
||||
|
@ -184,6 +184,8 @@ public class Schematic {
|
||||
return Schematic_8.getClipboard(is);
|
||||
case 14:
|
||||
return Schematic_14.getClipboard(is, schemFormat);
|
||||
case 15:
|
||||
return Schematic_15.getClipboard(is, schemFormat);
|
||||
default:
|
||||
return Schematic_12.getClipboard(is);
|
||||
}
|
||||
@ -207,6 +209,9 @@ public class Schematic {
|
||||
case 14:
|
||||
Schematic_14.setPlayerClipboard(player, is, schemFormat);
|
||||
break;
|
||||
case 15:
|
||||
Schematic_15.setPlayerClipboard(player, is, schemFormat);
|
||||
break;
|
||||
default:
|
||||
Schematic_12.setPlayerClipboard(player, is);
|
||||
}
|
||||
@ -235,6 +240,9 @@ public class Schematic {
|
||||
case 14:
|
||||
data = Schematic_14.getPlayerClipboard(player, newFormat);
|
||||
break;
|
||||
case 15:
|
||||
data = Schematic_15.getPlayerClipboard(player, newFormat);
|
||||
break;
|
||||
default:
|
||||
newFormat = false;
|
||||
data = Schematic_12.getPlayerClipboard(player);
|
||||
|
1
pom.xml
1
pom.xml
@ -41,6 +41,7 @@
|
||||
<module>SpigotCore_8</module>
|
||||
<module>SpigotCore_12</module>
|
||||
<module>SpigotCore_14</module>
|
||||
<module>SpigotCore_15</module>
|
||||
<module>SpigotCore_Main</module>
|
||||
</modules>
|
||||
</project>
|
In neuem Issue referenzieren
Einen Benutzer sperren