SteamWar/FightSystem
Archiviert
13
1

Adding 1.15 support

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2019-12-27 12:02:27 +01:00
Ursprung 27808e35e0
Commit 00f22fe513
16 geänderte Dateien mit 203 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -33,7 +33,7 @@ public class TechHider_14 {
chunkHider();
}
private static void chunkHider(){
static void chunkHider(){
ProtocolLibrary.getProtocolManager().getAsynchronousManager().registerAsyncHandler(new PacketAdapter(IFightSystem.getPlugin(), PacketType.Play.Server.MAP_CHUNK) {
@Override
public void onPacketSending(PacketEvent e) {

53
FightSystem_15/pom.xml Normale Datei
Datei anzeigen

@ -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>FightSystem</artifactId>
<version>1.0</version>
</parent>
<artifactId>FightSystem_15</artifactId>
<version>1.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>WorldEdit</artifactId>
<version>1.15</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>steamwar</groupId>
<artifactId>FightSystem_API</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>steamwar</groupId>
<artifactId>FightSystem_14</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</project>

Datei anzeigen

@ -0,0 +1,11 @@
package de.steamwar.fightsystem.countdown;
import org.bukkit.Sound;
class Countdown_15 {
private Countdown_15(){}
static Sound getSound(SWSound sound){
return Countdown_14.getSound(sound);
}
}

Datei anzeigen

@ -0,0 +1,26 @@
package de.steamwar.fightsystem.fight;
import com.sk89q.worldedit.EditSession;
import de.steamwar.sql.NoClipboardException;
import de.steamwar.sql.Schematic;
import org.bukkit.ChatColor;
import org.bukkit.DyeColor;
import org.bukkit.scoreboard.Team;
import java.io.IOException;
class FightTeam_15 {
private FightTeam_15(){}
static void setTeamColor(Team team, ChatColor color){
FightTeam_10.setTeamColor(team, color);
}
static void replaceTeamColor(EditSession e, DyeColor c, int cornerX, int cornerY, int cornerZ){
FightTeam_14.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
}
static EditSession pasteSchematic(Schematic schematic, int pX, int pY, int pZ, boolean rotate) throws Schematic.WrongVersionException, IOException, NoClipboardException {
return FightTeam_14.pasteSchematic(schematic, pX, pY, pZ, rotate);
}
}

Datei anzeigen

@ -0,0 +1,20 @@
package de.steamwar.fightsystem.listener;
import net.md_5.bungee.api.chat.BaseComponent;
import org.bukkit.entity.Player;
class BasicListener_15 {
private BasicListener_15(){}
static void toActionbar(Player player, BaseComponent... components){
BasicListener_9.toActionbar(player, components);
}
static void toChat(Player player, BaseComponent... components){
BasicListener_9.toChat(player, components);
}
static void setAttackSpeed(Player player){
BasicListener_9.setAttackSpeed(player);
}
}

Datei anzeigen

@ -0,0 +1,11 @@
package de.steamwar.fightsystem.utils;
import org.bukkit.DyeColor;
class ColorConverter_15 {
private ColorConverter_15(){}
static DyeColor getSilver(){
return ColorConverter_14.getSilver();
}
}

Datei anzeigen

@ -0,0 +1,20 @@
package de.steamwar.fightsystem.utils;
import javafx.util.Pair;
import net.minecraft.server.v1_15_R1.PacketPlayOutMapChunk;
import org.bukkit.craftbukkit.v1_15_R1.CraftChunk;
import org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
public class TechHider_15 {
private TechHider_15(){}
static void reloadChunk(Player p, Pair<Integer, Integer> chunk){
((CraftPlayer)p).getHandle().playerConnection.sendPacket(new PacketPlayOutMapChunk(((CraftChunk)p.getWorld().getChunkAt(chunk.getKey(), chunk.getValue())).getHandle(), 65535));
}
static void start(){
TechHider_14.chunkHider();
}
}

Datei anzeigen

@ -0,0 +1,11 @@
package de.steamwar.fightsystem.utils;
import org.bukkit.Material;
class WaterRemover_15 {
private WaterRemover_15(){}
static boolean isWater(Material type){
return WaterRemover_14.isWater(type);
}
}

Datei anzeigen

@ -55,6 +55,18 @@
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>steamwar</groupId>
<artifactId>FightSystem_9</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>steamwar</groupId>
<artifactId>FightSystem_10</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>steamwar</groupId>
<artifactId>FightSystem_12</artifactId>
@ -67,6 +79,12 @@
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>steamwar</groupId>
<artifactId>FightSystem_15</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>steamwar</groupId>
<artifactId>FightSystem_API</artifactId>

Datei anzeigen

@ -41,6 +41,8 @@ public abstract class Countdown {
return null;
switch (Core.getVersion()){
case 15:
return Countdown_15.getSound(sound);
case 14:
return Countdown_14.getSound(sound);
case 10:

Datei anzeigen

@ -79,6 +79,9 @@ public class FightTeam implements IFightTeam{
private void setTeamColor(Team team, ChatColor color){
switch(Core.getVersion()){
case 15:
FightTeam_15.setTeamColor(team, color);
break;
case 14:
FightTeam_14.setTeamColor(team, color);
break;
@ -242,6 +245,9 @@ public class FightTeam implements IFightTeam{
EditSession e;
try {
switch(Core.getVersion()){
case 15:
e = FightTeam_15.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate);
break;
case 14:
e = FightTeam_14.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate);
break;
@ -272,6 +278,9 @@ public class FightTeam implements IFightTeam{
DyeColor c = ColorConverter.chat2dye(color);
switch(Core.getVersion()){
case 15:
FightTeam_15.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
break;
case 14:
FightTeam_14.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
break;

Datei anzeigen

@ -47,6 +47,9 @@ public abstract class BasicListener implements Listener {
public static void toActionbar(Player player, BaseComponent... components){
switch(Core.getVersion()){
case 15:
BasicListener_15.toActionbar(player, components);
break;
case 14:
BasicListener_14.toActionbar(player, components);
break;
@ -66,6 +69,9 @@ public abstract class BasicListener implements Listener {
public static void toChat(Player player, BaseComponent... components){
switch(Core.getVersion()){
case 15:
BasicListener_15.toChat(player, components);
break;
case 14:
BasicListener_14.toChat(player, components);
break;
@ -85,6 +91,9 @@ public abstract class BasicListener implements Listener {
void setAttackSpeed(Player player){
switch(Core.getVersion()){
case 15:
BasicListener_15.setAttackSpeed(player);
break;
case 14:
BasicListener_14.setAttackSpeed(player);
break;

Datei anzeigen

@ -31,6 +31,9 @@ public class ColorConverter {
//Rosa 9pink, Braun 3brown
switch(Core.getVersion()){
case 15:
chat2dye.put(ChatColor.GRAY, ColorConverter_15.getSilver());
break;
case 14:
chat2dye.put(ChatColor.GRAY, ColorConverter_14.getSilver());
break;

Datei anzeigen

@ -68,6 +68,9 @@ public class TechHider {
blockHider();
multiBlockHider();
switch(Core.getVersion()){
case 15:
TechHider_15.start();
break;
case 14:
TechHider_14.start();
break;
@ -191,6 +194,9 @@ public class TechHider {
private static void reloadChunk(Player p, Pair<Integer, Integer> chunk){
switch(Core.getVersion()){
case 15:
TechHider_15.reloadChunk(p, chunk);
break;
case 14:
TechHider_14.reloadChunk(p, chunk);
break;

Datei anzeigen

@ -94,6 +94,8 @@ public class WaterRemover {
public static boolean isWater(Material type){
switch(Core.getVersion()){
case 15:
return WaterRemover_15.isWater(type);
case 14:
return WaterRemover_14.isWater(type);
case 10:

Datei anzeigen

@ -42,6 +42,7 @@
<module>FightSystem_10</module>
<module>FightSystem_12</module>
<module>FightSystem_14</module>
<module>FightSystem_15</module>
<module>FightSystem_Main</module>
</modules>