Adding new versions (1.9, 1.10, 1.15) #79
@ -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
53
FightSystem_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>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>
|
@ -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);
|
||||
}
|
||||
}
|
26
FightSystem_15/src/de/steamwar/fightsystem/fight/FightTeam_15.java
Normale Datei
26
FightSystem_15/src/de/steamwar/fightsystem/fight/FightTeam_15.java
Normale Datei
@ -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);
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
20
FightSystem_15/src/de/steamwar/fightsystem/utils/TechHider_15.java
Normale Datei
20
FightSystem_15/src/de/steamwar/fightsystem/utils/TechHider_15.java
Normale Datei
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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>
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
1
pom.xml
1
pom.xml
@ -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>
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren