forked from SteamWar/SteamWar
Fix HotbarKit
Fix steamwar.devserver.gradle Add WarGear20 to build.gradle.kts
This commit is contained in:
@@ -37,6 +37,7 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||||
|
import org.bukkit.event.inventory.InventoryOpenEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.inventory.EquipmentSlot;
|
import org.bukkit.inventory.EquipmentSlot;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
@@ -120,9 +121,6 @@ public class HotbarKit extends Kit {
|
|||||||
|
|
||||||
Player player = (Player) event.getWhoClicked();
|
Player player = (Player) event.getWhoClicked();
|
||||||
click(player, slot, event);
|
click(player, slot, event);
|
||||||
Bukkit.getScheduler().runTaskLater(FightSystem.getPlugin(), () -> {
|
|
||||||
player.setItemOnCursor(null);
|
|
||||||
}, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void click(Player player, int slot, Cancellable event) {
|
private void click(Player player, int slot, Cancellable event) {
|
||||||
|
|||||||
@@ -39,3 +39,13 @@ dependencies {
|
|||||||
implementation(project(":FightSystem:FightSystem_20"))
|
implementation(project(":FightSystem:FightSystem_20"))
|
||||||
implementation(project(":FightSystem:FightSystem_21"))
|
implementation(project(":FightSystem:FightSystem_21"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.register<FightServer>("WarGear20") {
|
||||||
|
group = "run"
|
||||||
|
description = "Run a WarGear 1.20 Fight Server"
|
||||||
|
dependsOn(":SpigotCore:shadowJar")
|
||||||
|
dependsOn(":FightSystem:shadowJar")
|
||||||
|
template = "WarGear20"
|
||||||
|
worldName = "arenas/Pentraki"
|
||||||
|
config = "WarGear20.yml"
|
||||||
|
}
|
||||||
|
|||||||
@@ -135,10 +135,10 @@ class DevServer extends DefaultTask {
|
|||||||
if (plugins != null) devPy.append(" -p $plugins")
|
if (plugins != null) devPy.append(" -p $plugins")
|
||||||
if (jar != null) devPy.append(" --jar $jar")
|
if (jar != null) devPy.append(" --jar $jar")
|
||||||
for (Map.Entry<String, String> dParam : dParams.entrySet()) {
|
for (Map.Entry<String, String> dParam : dParams.entrySet()) {
|
||||||
devPy.append("-D${dParam.key}=${dParam.value}")
|
devPy.append(" -D${dParam.key}=${dParam.value}")
|
||||||
}
|
}
|
||||||
println("Starting $template with command ${devPy.toString()}")
|
|
||||||
devPy.append(" $template")
|
devPy.append(" $template")
|
||||||
|
println("Starting $template with command ${devPy.toString()}")
|
||||||
|
|
||||||
def process = new ProcessBuilder("ssh", host, "-T", devPy.toString()).start()
|
def process = new ProcessBuilder("ssh", host, "-T", devPy.toString()).start()
|
||||||
def processOutput = new BufferedReader(new InputStreamReader(process.inputStream))
|
def processOutput = new BufferedReader(new InputStreamReader(process.inputStream))
|
||||||
@@ -172,15 +172,15 @@ class FightServer extends DevServer {
|
|||||||
|
|
||||||
@Input
|
@Input
|
||||||
@Optional
|
@Optional
|
||||||
int checkSchemID = 0
|
Integer checkSchemID = 0
|
||||||
|
|
||||||
@Input
|
@Input
|
||||||
@Optional
|
@Optional
|
||||||
int prepareSchemID = 0
|
Integer prepareSchemID = 0
|
||||||
|
|
||||||
@Input
|
@Input
|
||||||
@Optional
|
@Optional
|
||||||
int replay = 0
|
Integer replay = 0
|
||||||
|
|
||||||
@Input
|
@Input
|
||||||
@Optional
|
@Optional
|
||||||
@@ -189,7 +189,7 @@ class FightServer extends DevServer {
|
|||||||
@Input
|
@Input
|
||||||
@Optional
|
@Optional
|
||||||
// Property: fightID
|
// Property: fightID
|
||||||
int eventKampfID = 0
|
Integer eventKampfID = 0
|
||||||
|
|
||||||
@Input
|
@Input
|
||||||
@Optional
|
@Optional
|
||||||
|
|||||||
Reference in New Issue
Block a user