SteamWar/FightSystem
Archiviert
13
1

Merge branch 'newVersions' of SteamWar/FightSystem into master

Dieser Commit ist enthalten in:
Lixfel 2019-12-28 11:09:42 +01:00 committet von Gitea
Commit b8d1893f0f
52 geänderte Dateien mit 726 neuen und 85 gelöschten Zeilen

53
FightSystem_10/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_10</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>FightSystem_9</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>steamwar</groupId>
<artifactId>FightSystem_API</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>steamwar</groupId>
<artifactId>WorldEdit</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>steamwar</groupId>
<artifactId>Spigot</artifactId>
<version>1.10</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

Datei anzeigen

@ -0,0 +1,11 @@
package de.steamwar.fightsystem.countdown;
import org.bukkit.Sound;
class Countdown_10 {
private Countdown_10(){}
static Sound getSound(SWSound sound){
return Countdown_9.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_10 {
private FightTeam_10(){}
static void setTeamColor(Team team, ChatColor color) {
FightTeam_8.setTeamColor(team, color);
}
static void replaceTeamColor(EditSession e, DyeColor c, int cornerX, int cornerY, int cornerZ){
FightTeam_8.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
}
static EditSession pasteSchematic(Schematic schematic, int pasteX, int pasteY, int pasteZ, boolean rotate) throws Schematic.WrongVersionException, IOException, NoClipboardException {
return FightTeam_8.pasteSchematic(schematic, pasteX, pasteY, pasteZ, 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_10 {
private BasicListener_10(){}
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_10 {
private ColorConverter_10(){}
static DyeColor getSilver(){
return ColorConverter_8.getSilver();
}
}

Datei anzeigen

@ -0,0 +1,15 @@
package de.steamwar.fightsystem.utils;
import javafx.util.Pair;
import net.minecraft.server.v1_10_R1.PacketPlayOutMapChunk;
import org.bukkit.craftbukkit.v1_10_R1.CraftChunk;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
class TechHider_10 {
private TechHider_10(){}
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));
}
}

Datei anzeigen

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

Datei anzeigen

@ -29,7 +29,7 @@
<dependencies>
<dependency>
<groupId>steamwar</groupId>
<artifactId>FightSystem_8</artifactId>
<artifactId>FightSystem_10</artifactId>
<version>1.0</version>
</dependency>
<dependency>
@ -37,12 +37,6 @@
<artifactId>FightSystem_API</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>steamwar</groupId>
<artifactId>FAWE</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>steamwar</groupId>
<artifactId>WorldEdit</artifactId>

Datei anzeigen

@ -5,7 +5,7 @@ import org.bukkit.Sound;
class Countdown_12 {
private Countdown_12(){}
static Sound getSound(String sound){
return Sound.valueOf(sound);
static Sound getSound(SWSound sound){
return Countdown_9.getSound(sound);
}
}

Datei anzeigen

@ -1,6 +1,7 @@
package de.steamwar.fightsystem.fight;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.MaxChangedBlocksException;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.regions.CuboidRegion;
@ -16,7 +17,7 @@ import java.io.IOException;
import java.util.Collections;
import java.util.Set;
public class FightTeam_12 {
class FightTeam_12 {
private FightTeam_12(){}
@SuppressWarnings("deprecation")
@ -32,7 +33,6 @@ public class FightTeam_12 {
static void setTeamColor(Team team, ChatColor color){
team.setColor(color);
team.setOption(Team.Option.NAME_TAG_VISIBILITY, Team.OptionStatus.FOR_OWN_TEAM);
}
@ -41,8 +41,12 @@ public class FightTeam_12 {
FightTeam_8.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
Vector corner = new Vector(cornerX, cornerY, cornerZ);
CuboidRegion region = new CuboidRegion(corner, corner.add(Config.SchemsizeX, Config.SchemsizeY, Config.SchemsizeZ));
e.replaceBlocks(region, CONCRETE_SET, new BaseBlock(CONCRETE.getId(), c.getWoolData()));
e.replaceBlocks(region, CONCRETE_POWDER_SET, new BaseBlock(CONCRETE_POWDER.getId(), c.getWoolData()));
try {
e.replaceBlocks(region, CONCRETE_SET, new BaseBlock(CONCRETE.getId(), c.getWoolData()));
e.replaceBlocks(region, CONCRETE_POWDER_SET, new BaseBlock(CONCRETE_POWDER.getId(), c.getWoolData()));
} catch (MaxChangedBlocksException ex) {
//ignored
}
}
static EditSession pasteSchematic(Schematic schematic, int pasteX, int pasteY, int pasteZ, boolean rotate) throws Schematic.WrongVersionException, IOException, NoClipboardException {

Datei anzeigen

@ -1,24 +1,20 @@
package de.steamwar.fightsystem.listener;
import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.chat.BaseComponent;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeInstance;
import org.bukkit.entity.Player;
class BasicListener_12 {
private BasicListener_12(){}
static void toActionbar(Player player, BaseComponent... components){
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, components);
BasicListener_9.toActionbar(player, components);
}
static void toChat(Player player, BaseComponent... components){
player.spigot().sendMessage(ChatMessageType.CHAT, components);
BasicListener_9.toChat(player, components);
}
static void setAttackSpeed(Player player){
AttributeInstance attribute = player.getAttribute(Attribute.GENERIC_ATTACK_SPEED);
attribute.setBaseValue(16);
BasicListener_9.setAttackSpeed(player);
}
}

Datei anzeigen

@ -6,6 +6,6 @@ class ColorConverter_12 {
private ColorConverter_12(){}
static DyeColor getSilver(){
return DyeColor.SILVER;
return ColorConverter_8.getSilver();
}
}

Datei anzeigen

@ -6,6 +6,6 @@ class WaterRemover_12 {
private WaterRemover_12(){}
static boolean isWater(Material type){
return type == Material.WATER || type == Material.STATIONARY_WATER;
return WaterRemover_8.isWater(type);
}
}

Datei anzeigen

@ -33,6 +33,12 @@
<version>1.14</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>
@ -40,9 +46,8 @@
</dependency>
<dependency>
<groupId>steamwar</groupId>
<artifactId>FAWE</artifactId>
<version>1.14</version>
<scope>provided</scope>
<artifactId>FightSystem_12</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</project>

Datei anzeigen

@ -5,14 +5,16 @@ import org.bukkit.Sound;
class Countdown_14 {
private Countdown_14(){}
static Sound getSound(String sound){
static Sound getSound(SWSound sound){
switch(sound){
case "BLOCK_NOTE_BASS":
return Sound.BLOCK_NOTE_BLOCK_PLING;
case "BLOCK_NOTE_PLING":
case ENTITY_WITHER_DEATH:
return Sound.ENTITY_WITHER_DEATH;
case BLOCK_NOTE_BASS:
return Sound.BLOCK_NOTE_BLOCK_BASS;
case BLOCK_NOTE_PLING:
return Sound.BLOCK_NOTE_BLOCK_PLING;
default:
return Sound.valueOf(sound);
return null;
}
}
}

Datei anzeigen

@ -1,6 +1,7 @@
package de.steamwar.fightsystem.fight;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.MaxChangedBlocksException;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.bukkit.BukkitWorld;
import com.sk89q.worldedit.extent.clipboard.Clipboard;
@ -11,7 +12,7 @@ import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.session.ClipboardHolder;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockTypes;
import de.steamwar.fightsystem.Config;
import de.steamwar.sql.NoClipboardException;
import de.steamwar.sql.Schematic;
@ -22,33 +23,37 @@ import org.bukkit.scoreboard.Team;
import java.io.IOException;
import java.util.Collections;
import java.util.Objects;
import java.util.Set;
class FightTeam_14 {
private FightTeam_14(){}
private static final Set<BaseBlock> WOOL_SET = Collections.singleton(new BaseBlock(BlockState.get("pink_wool")));
private static final Set<BaseBlock> CLAY_SET = Collections.singleton(new BaseBlock(BlockState.get("pink_terracotta")));
private static final Set<BaseBlock> GLASS_SET = Collections.singleton(new BaseBlock(BlockState.get("pink_stained_glass")));
private static final Set<BaseBlock> GLASS_PANE_SET = Collections.singleton(new BaseBlock(BlockState.get("pink_stained_glass_pane")));
private static final Set<BaseBlock> CONCRETE_SET = Collections.singleton(new BaseBlock(BlockState.get("pink_concrete")));
private static final Set<BaseBlock> CONCRETE_POWDER_SET = Collections.singleton(new BaseBlock(BlockState.get("pink_concrete_powder")));
private static final Set<BaseBlock> WOOL_SET = Collections.singleton(Objects.requireNonNull(BlockTypes.PINK_WOOL).getDefaultState().toBaseBlock());
private static final Set<BaseBlock> CLAY_SET = Collections.singleton(Objects.requireNonNull(BlockTypes.PINK_TERRACOTTA).getDefaultState().toBaseBlock());
private static final Set<BaseBlock> GLASS_SET = Collections.singleton(Objects.requireNonNull(BlockTypes.PINK_STAINED_GLASS).getDefaultState().toBaseBlock());
private static final Set<BaseBlock> GLASS_PANE_SET = Collections.singleton(Objects.requireNonNull(BlockTypes.PINK_STAINED_GLASS_PANE).getDefaultState().toBaseBlock());
private static final Set<BaseBlock> CONCRETE_SET = Collections.singleton(Objects.requireNonNull(BlockTypes.PINK_CONCRETE).getDefaultState().toBaseBlock());
private static final Set<BaseBlock> CONCRETE_POWDER_SET = Collections.singleton(Objects.requireNonNull(BlockTypes.PINK_CONCRETE_POWDER).getDefaultState().toBaseBlock());
static void setTeamColor(Team team, ChatColor color){
team.setColor(color);
team.setOption(Team.Option.NAME_TAG_VISIBILITY, Team.OptionStatus.FOR_OWN_TEAM);
FightTeam_10.setTeamColor(team, color);
}
static void replaceTeamColor(EditSession e, DyeColor c, int cornerX, int cornerY, int cornerZ){
BlockVector3 corner3 = BlockVector3.at(cornerX, cornerY, cornerZ);
BlockVector3 schemsize3 = BlockVector3.at(Config.SchemsizeX, Config.SchemsizeY, Config.SchemsizeZ);
CuboidRegion region = new CuboidRegion(corner3, corner3.add(schemsize3));
e.replaceBlocks(region, WOOL_SET, new BaseBlock(BlockState.get(c.name().toLowerCase() + "_wool")));
e.replaceBlocks(region, CLAY_SET, new BaseBlock(BlockState.get(c.name().toLowerCase() + "_terracotta")));
e.replaceBlocks(region, GLASS_SET, new BaseBlock(BlockState.get(c.name().toLowerCase() + "_stained_glass")));
e.replaceBlocks(region, GLASS_PANE_SET, new BaseBlock(BlockState.get(c.name().toLowerCase() + "_stained_glass_pane")));
e.replaceBlocks(region, CONCRETE_SET, new BaseBlock(BlockState.get(c.name().toLowerCase() + "_concrete")));
e.replaceBlocks(region, CONCRETE_POWDER_SET, new BaseBlock(BlockState.get(c.name().toLowerCase() + "_concrete_powder")));
try {
e.replaceBlocks(region, WOOL_SET, Objects.requireNonNull(BlockTypes.get(c.name().toLowerCase() + "_wool")).getDefaultState().toBaseBlock());
e.replaceBlocks(region, CLAY_SET, Objects.requireNonNull(BlockTypes.get(c.name().toLowerCase() + "_terracotta")).getDefaultState().toBaseBlock());
e.replaceBlocks(region, GLASS_SET, Objects.requireNonNull(BlockTypes.get(c.name().toLowerCase() + "_stained_glass")).getDefaultState().toBaseBlock());
e.replaceBlocks(region, GLASS_PANE_SET, Objects.requireNonNull(BlockTypes.get(c.name().toLowerCase() + "_stained_glass_pane")).getDefaultState().toBaseBlock());
e.replaceBlocks(region, CONCRETE_SET, Objects.requireNonNull(BlockTypes.get(c.name().toLowerCase() + "_concrete")).getDefaultState().toBaseBlock());
e.replaceBlocks(region, CONCRETE_POWDER_SET, Objects.requireNonNull(BlockTypes.get(c.name().toLowerCase() + "_concrete_powder")).getDefaultState().toBaseBlock());
} catch (MaxChangedBlocksException ex) {
//ignored
}
}
static EditSession pasteSchematic(Schematic schematic, int pX, int pY, int pZ, boolean rotate) throws Schematic.WrongVersionException, IOException, NoClipboardException {
@ -70,7 +75,7 @@ class FightTeam_14 {
if(Config.AlignWater){
BlockVector3 it = clipboard.getMinimumPoint();
int depth = 0;
while(!clipboard.getBlock(it).getMaterial().isAir()){
while(!clipboard.getBlock(it).getBlockType().getMaterial().isAir()){
depth++;
it = it.add(0, 1, 0);
}
@ -81,7 +86,7 @@ class FightTeam_14 {
ClipboardHolder ch = new ClipboardHolder(clipboard);
ch.setTransform(aT);
Operations.completeBlindly(ch.createPaste(e).to(v).build());
e.flushQueue();
e.flushSession();
return e;
}
}

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_14 {
private BasicListener_14(){}
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

@ -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

@ -5,16 +5,16 @@ import org.bukkit.Sound;
class Countdown_8 {
private Countdown_8(){}
static Sound getSound(String sound){
static Sound getSound(SWSound sound){
switch(sound){
case "ENTITY_WITHER_DEATH":
case ENTITY_WITHER_DEATH:
return Sound.WITHER_DEATH;
case "BLOCK_NOTE_BASS":
case BLOCK_NOTE_BASS:
return Sound.NOTE_BASS;
case "BLOCK_NOTE_PLING":
case BLOCK_NOTE_PLING:
return Sound.NOTE_PLING;
default:
return Sound.valueOf(sound);
return null;
}
}
}

Datei anzeigen

@ -24,7 +24,6 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPhysicsEvent;
import org.bukkit.scoreboard.NameTagVisibility;
import org.bukkit.scoreboard.Team;
import java.io.IOException;
@ -53,7 +52,6 @@ class FightTeam_8 {
static void setTeamColor(Team team, ChatColor color){
team.setPrefix("§" + color.getChar());
team.setNameTagVisibility(NameTagVisibility.HIDE_FOR_OTHER_TEAMS);
}
@SuppressWarnings("deprecation")

Datei anzeigen

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

Datei anzeigen

@ -0,0 +1,11 @@
package de.steamwar.fightsystem.utils;
import org.bukkit.Material;
public class WaterRemover_8 {
private WaterRemover_8(){}
static boolean isWater(Material type){
return type == Material.WATER || type == Material.STATIONARY_WATER;
}
}

53
FightSystem_9/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_9</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>FightSystem_8</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>steamwar</groupId>
<artifactId>FightSystem_API</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>steamwar</groupId>
<artifactId>WorldEdit</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>steamwar</groupId>
<artifactId>Spigot</artifactId>
<version>1.9</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

Datei anzeigen

@ -0,0 +1,20 @@
package de.steamwar.fightsystem.countdown;
import org.bukkit.Sound;
class Countdown_9 {
private Countdown_9(){}
static Sound getSound(SWSound sound){
switch(sound){
case ENTITY_WITHER_DEATH:
return Sound.ENTITY_WITHER_DEATH;
case BLOCK_NOTE_BASS:
return Sound.BLOCK_NOTE_BASS;
case BLOCK_NOTE_PLING:
return Sound.BLOCK_NOTE_PLING;
default:
return null;
}
}
}

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_9 {
private FightTeam_9(){}
static void setTeamColor(Team team, ChatColor color){
FightTeam_8.setTeamColor(team, color);
}
static void replaceTeamColor(EditSession e, DyeColor c, int cornerX, int cornerY, int cornerZ){
FightTeam_8.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
}
static EditSession pasteSchematic(Schematic schematic, int pasteX, int pasteY, int pasteZ, boolean rotate) throws Schematic.WrongVersionException, IOException, NoClipboardException {
return FightTeam_8.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate);
}
}

Datei anzeigen

@ -0,0 +1,24 @@
package de.steamwar.fightsystem.listener;
import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.chat.BaseComponent;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeInstance;
import org.bukkit.entity.Player;
class BasicListener_9 {
private BasicListener_9(){}
static void toActionbar(Player player, BaseComponent... components){
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, components);
}
static void toChat(Player player, BaseComponent... components){
player.spigot().sendMessage(ChatMessageType.CHAT, components);
}
static void setAttackSpeed(Player player){
AttributeInstance attribute = player.getAttribute(Attribute.GENERIC_ATTACK_SPEED);
attribute.setBaseValue(16);
}
}

Datei anzeigen

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

Datei anzeigen

@ -0,0 +1,15 @@
package de.steamwar.fightsystem.utils;
import javafx.util.Pair;
import net.minecraft.server.v1_9_R2.PacketPlayOutMapChunk;
import org.bukkit.craftbukkit.v1_9_R2.CraftChunk;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer;
import org.bukkit.entity.Player;
class TechHider_9 {
private TechHider_9(){}
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));
}
}

Datei anzeigen

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

Datei anzeigen

@ -0,0 +1,7 @@
package de.steamwar.fightsystem.countdown;
public enum SWSound {
ENTITY_WITHER_DEATH,
BLOCK_NOTE_PLING,
BLOCK_NOTE_BASS
}

Datei anzeigen

@ -46,7 +46,7 @@
<dependency>
<groupId>steamwar</groupId>
<artifactId>Spigot</artifactId>
<version>1.14</version>
<version>1.15</version>
<scope>provided</scope>
</dependency>
<dependency>
@ -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

@ -26,7 +26,7 @@ public abstract class Countdown {
abstract String countdownCounting();
abstract void countdownFinished();
Countdown(int time, String sound, boolean level) {
Countdown(int time, SWSound sound, boolean level) {
this.time = time;
this.sound = getSound(sound);
this.level = level;
@ -36,15 +36,21 @@ public abstract class Countdown {
this.taskID = bukkitScheduler.scheduleSyncRepeatingTask(FightSystem.getPlugin(), this::count, 0, 20);
}
public static Sound getSound(String sound){
public static Sound getSound(SWSound sound){
if(sound == null)
return null;
switch (Core.getVersion()){
case 8:
return Countdown_8.getSound(sound);
case 15:
return Countdown_15.getSound(sound);
case 14:
return Countdown_14.getSound(sound);
case 10:
return Countdown_10.getSound(sound);
case 9:
return Countdown_9.getSound(sound);
case 8:
return Countdown_8.getSound(sound);
default:
return Countdown_12.getSound(sound);
}

Datei anzeigen

@ -7,7 +7,7 @@ import org.bukkit.Bukkit;
public class EnternCountdown extends Countdown {
public EnternCountdown() {
super(Config.EnterPhaseBegin, "BLOCK_NOTE_PLING", false);
super(Config.EnterPhaseBegin, SWSound.BLOCK_NOTE_PLING, false);
}
@Override

Datei anzeigen

@ -6,7 +6,7 @@ import de.steamwar.fightsystem.Config;
public class EventStartCountdown extends Countdown {
public EventStartCountdown() {
super(Config.SetupDuration, "BLOCK_NOTE_PLING", false);
super(Config.SetupDuration, SWSound.BLOCK_NOTE_PLING, false);
}
@Override

Datei anzeigen

@ -6,7 +6,7 @@ import de.steamwar.fightsystem.Config;
public class PreRunningCountdown extends Countdown {
public PreRunningCountdown() {
super(Config.PreFightDuration, "BLOCK_NOTE_PLING", true);
super(Config.PreFightDuration, SWSound.BLOCK_NOTE_PLING, true);
}
@Override

Datei anzeigen

@ -6,7 +6,7 @@ import de.steamwar.fightsystem.Config;
public class SpectateOverCountdown extends Countdown {
public SpectateOverCountdown() {
super(Config.SpectatorDuration, "BLOCK_NOTE_PLING", false);
super(Config.SpectatorDuration, SWSound.BLOCK_NOTE_PLING, false);
}
@Override

Datei anzeigen

@ -11,7 +11,7 @@ public class TechKOCountdown extends Countdown {
private final FightTeam team;
public TechKOCountdown(FightTeam team) {
super(WinconditionTechKO.TECH_KO_COUNTDOWN_TIME, "BLOCK_NOTE_PLING", false);
super(WinconditionTechKO.TECH_KO_COUNTDOWN_TIME, SWSound.BLOCK_NOTE_PLING, false);
this.team = team;
}

Datei anzeigen

@ -9,7 +9,7 @@ public class TimeOverCountdown extends Countdown {
private final Runnable timeOver;
public TimeOverCountdown(Runnable timeOver) {
super(Config.TimeoutTime, "BLOCK_NOTE_BASS", false);
super(Config.TimeoutTime, SWSound.BLOCK_NOTE_BASS, false);
this.timeOver = timeOver;
}

Datei anzeigen

@ -18,6 +18,7 @@ import org.bukkit.block.Block;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import org.bukkit.scoreboard.NameTagVisibility;
import org.bukkit.scoreboard.Team;
import java.io.IOException;
@ -69,18 +70,30 @@ public class FightTeam implements IFightTeam{
team = FightScoreboard.getScoreboard().registerNewTeam(name);
else
team = FightScoreboard.getScoreboard().getTeam(name);
assert team != null;
setTeamColor(team, color);
//noinspection deprecation
team.setNameTagVisibility(NameTagVisibility.HIDE_FOR_OTHER_TEAMS);
team.setAllowFriendlyFire(false);
}
private void setTeamColor(Team team, ChatColor color){
switch(Core.getVersion()){
case 8:
FightTeam_8.setTeamColor(team, color);
case 15:
FightTeam_15.setTeamColor(team, color);
break;
case 14:
FightTeam_14.setTeamColor(team, color);
break;
case 10:
FightTeam_10.setTeamColor(team, color);
break;
case 9:
FightTeam_9.setTeamColor(team, color);
break;
case 8:
FightTeam_8.setTeamColor(team, color);
break;
default:
FightTeam_12.setTeamColor(team, color);
}
@ -232,12 +245,21 @@ public class FightTeam implements IFightTeam{
EditSession e;
try {
switch(Core.getVersion()){
case 8:
e = FightTeam_8.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate);
case 15:
e = FightTeam_15.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate);
break;
case 14:
e = FightTeam_14.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate);
break;
case 10:
e = FightTeam_10.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate);
break;
case 9:
e = FightTeam_9.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate);
break;
case 8:
e = FightTeam_8.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate);
break;
default:
e = FightTeam_12.pasteSchematic(schematic, pasteX, pasteY, pasteZ, rotate);
}
@ -256,12 +278,21 @@ public class FightTeam implements IFightTeam{
DyeColor c = ColorConverter.chat2dye(color);
switch(Core.getVersion()){
case 8:
FightTeam_8.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
case 15:
FightTeam_15.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
break;
case 14:
FightTeam_14.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
break;
case 10:
FightTeam_10.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
break;
case 9:
FightTeam_9.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
break;
case 8:
FightTeam_8.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
break;
default:
FightTeam_12.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
}

Datei anzeigen

@ -47,6 +47,18 @@ 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;
case 10:
BasicListener_10.toActionbar(player, components);
break;
case 9:
BasicListener_9.toActionbar(player, components);
break;
case 8:
BasicListener_8.toActionbar(player, components);
break;
@ -55,17 +67,20 @@ public abstract class BasicListener implements Listener {
}
}
void setAttackSpeed(Player player){
switch(Core.getVersion()){
case 8:
break;
default:
BasicListener_12.setAttackSpeed(player);
}
}
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;
case 10:
BasicListener_10.toChat(player, components);
break;
case 9:
BasicListener_9.toChat(player, components);
break;
case 8:
BasicListener_8.toChat(player, components);
break;
@ -73,4 +88,25 @@ public abstract class BasicListener implements Listener {
BasicListener_12.toChat(player, components);
}
}
void setAttackSpeed(Player player){
switch(Core.getVersion()){
case 15:
BasicListener_15.setAttackSpeed(player);
break;
case 14:
BasicListener_14.setAttackSpeed(player);
break;
case 10:
BasicListener_10.setAttackSpeed(player);
break;
case 9:
BasicListener_9.setAttackSpeed(player);
break;
case 8:
break;
default:
BasicListener_12.setAttackSpeed(player);
}
}
}

Datei anzeigen

@ -2,6 +2,7 @@ package de.steamwar.fightsystem.listener;
import de.steamwar.fightsystem.FightSystem;
import de.steamwar.fightsystem.countdown.Countdown;
import de.steamwar.fightsystem.countdown.SWSound;
import de.steamwar.fightsystem.fight.Fight;
import de.steamwar.fightsystem.fight.FightTeam;
import org.bukkit.Bukkit;
@ -26,6 +27,6 @@ public class PlayerDeathListener extends BasicListener {
fightTeam.getFightPlayer(player).setOut();
player.setGameMode(GameMode.SPECTATOR);
player.teleport(fightTeam.getSpawn());
Fight.playSound(Countdown.getSound("ENTITY_WITHER_DEATH"), 100.0F, 1.0F);
Fight.playSound(Countdown.getSound(SWSound.ENTITY_WITHER_DEATH), 100.0F, 1.0F);
}
}

Datei anzeigen

@ -31,9 +31,21 @@ 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;
case 10:
chat2dye.put(ChatColor.GRAY, ColorConverter_10.getSilver());
break;
case 9:
chat2dye.put(ChatColor.GRAY, ColorConverter_9.getSilver());
break;
case 8:
chat2dye.put(ChatColor.GRAY, ColorConverter_8.getSilver());
break;
default:
chat2dye.put(ChatColor.GRAY, ColorConverter_12.getSilver());
}

Datei anzeigen

@ -68,11 +68,16 @@ public class TechHider {
blockHider();
multiBlockHider();
switch(Core.getVersion()){
case 8:
case 15:
TechHider_15.start();
break;
case 14:
TechHider_14.start();
break;
case 10:
case 9:
case 8:
break;
default:
TechHider_12.start();
}
@ -189,12 +194,21 @@ public class TechHider {
private static void reloadChunk(Player p, Pair<Integer, Integer> chunk){
switch(Core.getVersion()){
case 8:
TechHider_8.reloadChunk(p, chunk);
case 15:
TechHider_15.reloadChunk(p, chunk);
break;
case 14:
TechHider_14.reloadChunk(p, chunk);
break;
case 10:
TechHider_10.reloadChunk(p, chunk);
break;
case 9:
TechHider_9.reloadChunk(p, chunk);
break;
case 8:
TechHider_8.reloadChunk(p, chunk);
break;
default:
TechHider_12.reloadChunk(p, chunk);
}

Datei anzeigen

@ -94,8 +94,16 @@ 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:
return WaterRemover_10.isWater(type);
case 9:
return WaterRemover_9.isWater(type);
case 8:
return WaterRemover_8.isWater(type);
default:
return WaterRemover_12.isWater(type);
}

Datei anzeigen

@ -38,8 +38,11 @@
<modules>
<module>FightSystem_API</module>
<module>FightSystem_8</module>
<module>FightSystem_9</module>
<module>FightSystem_10</module>
<module>FightSystem_12</module>
<module>FightSystem_14</module>
<module>FightSystem_15</module>
<module>FightSystem_Main</module>
</modules>