diff --git a/BUILDING.md b/BUILDING.md deleted file mode 100644 index 7083919..0000000 --- a/BUILDING.md +++ /dev/null @@ -1,23 +0,0 @@ -# Building - -Building SteamWar.de software requires certain libraries, -which cannot be provided over traditional ways (like maven) -due to copyright issues with compiled Spigot packages. -For building these libraries have to be named in a lib -directory named like in the following list. -A subset of the following libraries is required to build this software -(this is the list for being able to build all SteamWar.de software): - - - BungeeCord.jar https://ci.md-5.net/job/BungeeCord/ - - BungeeTabListPlus.jar https://www.spigotmc.org/resources/bungeetablistplus.313/ - - PersistentBungeeCore.jar https://steamwar.de/devlabs/SteamWar/PersistentBungeeCore - - ProtocolLib.jar https://www.spigotmc.org/resources/protocollib.1997/ - - Spigot-1.8.jar https://hub.spigotmc.org/jenkins/job/BuildTools/ (1.8.9) - - Spigot-1.9.jar https://hub.spigotmc.org/jenkins/job/BuildTools/ (1.9.4) - - Spigot-1.10.jar https://hub.spigotmc.org/jenkins/job/BuildTools/ (1.10.2) - - Spigot-1.12.jar https://hub.spigotmc.org/jenkins/job/BuildTools/ (1.12.2) - - Spigot-1.14.jar https://hub.spigotmc.org/jenkins/job/BuildTools/ (1.14.4) - - Spigot-1.15.jar https://hub.spigotmc.org/jenkins/job/BuildTools/ (1.15.2) - - SpigotCore.jar https://steamwar.de/devlabs/SteamWar/SpigotCore - - WorldEdit-1.12.jar https://dev.bukkit.org/projects/worldedit/files (6.1.9) - - WorldEdit-1.15.jar https://dev.bukkit.org/projects/worldedit/files (newest) \ No newline at end of file diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java b/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java index f99b59a..dfa4f3f 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.java @@ -19,6 +19,8 @@ package de.steamwar.fightsystem; +import com.comphenix.tinyprotocol.TinyProtocol; +import de.steamwar.core.Core; import de.steamwar.fightsystem.commands.*; import de.steamwar.fightsystem.countdown.*; import de.steamwar.fightsystem.event.HellsBells; @@ -56,6 +58,11 @@ public class FightSystem extends JavaPlugin { @Override public void onEnable() { + if(Core.getInstance() == null) { + Core.setInstance(this); + TinyProtocol.init(); + } + message = new Message("de.steamwar.fightsystem.FightSystem", FightSystem.class.getClassLoader()); new EntityDamage(); diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/commands/AkCommand.java b/FightSystem_Core/src/de/steamwar/fightsystem/commands/AkCommand.java index 554847a..d3b33be 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/commands/AkCommand.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/commands/AkCommand.java @@ -19,7 +19,9 @@ package de.steamwar.fightsystem.commands; +import de.steamwar.core.Core; import de.steamwar.fightsystem.ArenaMode; +import de.steamwar.fightsystem.FightSystem; import de.steamwar.fightsystem.fight.Kit; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentCommand; @@ -42,8 +44,10 @@ public class AkCommand implements CommandExecutor { return false; } Player player = (Player) sender; + if(!player.isOp()) + return false; - if(SteamwarUser.get(player.getUniqueId()).getUserGroup() != UserGroup.Developer){ + if(SteamwarUser.get(player.getUniqueId()).getUserGroup() != UserGroup.Developer && Core.getInstance() != FightSystem.getPlugin()){ return false; } diff --git a/FightSystem_Standalone/pom.xml b/FightSystem_Standalone/pom.xml new file mode 100644 index 0000000..e3b4ee8 --- /dev/null +++ b/FightSystem_Standalone/pom.xml @@ -0,0 +1,92 @@ + + + + + 4.0.0 + + + steamwar + FightSystem + 1.0 + + + + ${project.basedir}/.. + + + FightSystem_Standalone + 1.0 + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.2.1 + + + package + + shade + + + + + + + steamwar:FightSystem_Main + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + generate-sources + + unpack-dependencies + + + SpigotCore + plugin.yml,META-INF/** + ${project.build.outputDirectory} + + + + + + FightSystem_Standalone + + + + + steamwar + FightSystem_Main + 1.0 + compile + + + + \ No newline at end of file diff --git a/README.md b/README.md index a52a7cc..947e1b6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,36 @@ # FightSystem +## Server setup + +**Currently FightSystem takes more or less total control over the server, so using a server running FightSystem as server +for different purposes is currently not possible.** + +1. Install a WorldEdit plugin and the FightSystem plugin on the server +2. Start the server once (will instantly shutdown due to missing FightSystem configuration) +3. Configure FightSystem by modifying `plugins/FightSystem/config.yml` +4. Create a `backup` folder inside your world folder and copy your `region` folder and `level.dat` into it +5. Create a `config.yml` in the world folder and configure the file as described at the end of `plugins/FightSystem/config.yml` +6. Start and join the server (as op), create a basic kit, save it with `/ak [kitname]` +7. Configure the kit as default kit +8. Restart the server and have fun! + +To start a server in the testarena mode start the server with the flag `-DfightID=-1` prior to `-jar`. + +## Compiling + +Building SteamWar.de software requires certain libraries, +which cannot be provided over traditional ways (like maven) +due to copyright issues with compiled Spigot packages. +The following libraries are required to be in the `lib` +directory exactly named like in the list: + +- `Spigot-1.8.jar` https://hub.spigotmc.org/jenkins/job/BuildTools/ (1.8.9) +- `Spigot-1.9.jar` https://hub.spigotmc.org/jenkins/job/BuildTools/ (1.9.4) +- `Spigot-1.10.jar` https://hub.spigotmc.org/jenkins/job/BuildTools/ (1.10.2) +- `Spigot-1.12.jar` https://hub.spigotmc.org/jenkins/job/BuildTools/ (1.12.2) +- `Spigot-1.14.jar` https://hub.spigotmc.org/jenkins/job/BuildTools/ (1.14.4) +- `Spigot-1.15.jar` https://hub.spigotmc.org/jenkins/job/BuildTools/ (1.15.2) +- `Spigot-1.18.jar` https://hub.spigotmc.org/jenkins/job/BuildTools/ (1.18.1, Use the jar from Spigot/Spigot-Server/target) +- `SpigotCore.jar` https://steamwar.de/devlabs/SteamWar/SpigotCore +- `WorldEdit-1.12.jar` https://dev.bukkit.org/projects/worldedit/files (6.1.9) +- `WorldEdit-1.15.jar` https://dev.bukkit.org/projects/worldedit/files (newest) diff --git a/pom.xml b/pom.xml index aeee40f..4c536b1 100644 --- a/pom.xml +++ b/pom.xml @@ -60,6 +60,7 @@ FightSystem_18 FightSystem_Core FightSystem_Main + FightSystem_Standalone diff --git a/steamwarci.yml b/steamwarci.yml index a48cedd..7ad548f 100644 --- a/steamwarci.yml +++ b/steamwarci.yml @@ -4,3 +4,4 @@ build: artifacts: "/binarys/fightsystem.jar": "FightSystem_Main/target/fightsystem.jar" + "/binarys/FightSystem_Standalone.jar": "FightSystem_Standalone/target/FightSystem_Standalone.jar"