This commit is contained in:
2025-02-17 17:02:05 +01:00
parent 3a54bf198c
commit 9453528422
16 changed files with 230 additions and 107 deletions

View File

@@ -1,8 +1,9 @@
package hu.jgj52.wolfFFA.Commands; package hu.jgj52.wolfFFA.Commands;
import hu.jgj52.wolfFFA.WolfFFA; import hu.jgj52.wolfFFA.Main;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
@@ -11,52 +12,96 @@ import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.SkullMeta; import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataType;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import java.util.Collections;
import java.util.List; import java.util.List;
public class EditKitCommand implements CommandExecutor, TabCompleter { public class EditKitCommand implements CommandExecutor, TabCompleter {
private final WolfFFA plugin; private final Main plugin;
public EditKitCommand(WolfFFA plugin) { public EditKitCommand(Main plugin) {
this.plugin = plugin; this.plugin = plugin;
} }
private int getItemSlot(String key, String kit, Player player) {
String path = "kits." + kit + "." + player.getUniqueId() + "." + key;
if (plugin.getConfig().contains(path)) {
try {
return plugin.getConfig().getInt(path);
} catch (NumberFormatException e) {
plugin.getLogger().warning("Invalid slot number in config for " + path);
}
}
return -1;
}
@Override @Override
public boolean onCommand(@NotNull CommandSender cmds, @NotNull Command command, @NotNull String s, @NotNull String[] args) { public boolean onCommand(@NotNull CommandSender cmds, @NotNull Command command, @NotNull String s, @NotNull String[] args) {
if (cmds.hasPermission("wolfffa.command.editkit")) { if (cmds.hasPermission("wolfffa.command.editkit")) {
if (cmds instanceof Player player) { if (cmds instanceof Player player) {
if (args.length > 0) { if (args.length > 0) {
Inventory gui = Bukkit.createInventory(null, 45, "Kit Edit"); Inventory gui = Bukkit.createInventory(null, 27, "Kit Editor");
ItemStack saveKit = new ItemStack(Material.PLAYER_HEAD); ItemStack saveKit = new ItemStack(Material.GREEN_STAINED_GLASS_PANE);
SkullMeta saveMeta = (SkullMeta) saveKit.getItemMeta(); ItemMeta saveMeta = saveKit.getItemMeta();
ItemStack info = new ItemStack(Material.PLAYER_HEAD); ItemStack infoItem = new ItemStack(Material.WHITE_STAINED_GLASS_PANE);
SkullMeta infoMeta = (SkullMeta) info.getItemMeta(); ItemMeta infoMeta = infoItem.getItemMeta();
ItemStack undoKit = new ItemStack(Material.RED_STAINED_GLASS_PANE);
ItemMeta undoMeta = undoKit.getItemMeta();
if (saveMeta != null) { if (saveMeta != null) {
saveMeta.setDisplayName("§aSave"); saveMeta.setDisplayName("§aSave Kit");
saveKit.setItemMeta(saveMeta); saveKit.setItemMeta(saveMeta);
} if (infoMeta != null) {
infoMeta.setDisplayName("§fKit editor, you can customize your kit.");
infoItem.setItemMeta(infoMeta);
} if (undoMeta != null) {
undoMeta.setDisplayName("§cUndo Changes");
undoKit.setItemMeta(undoMeta);
} }
if (infoMeta != null) { gui.setItem(0, saveKit);
infoMeta.setDisplayName("§aInformáció"); gui.setItem(1, saveKit);
infoMeta.setLore(Collections.singletonList("§5A 4. sor a hotbar, 5. sor 1. iteme az offhand.")); gui.setItem(2, saveKit);
info.setItemMeta(infoMeta); gui.setItem(3, infoItem);
} gui.setItem(4, infoItem);
gui.setItem(5, infoItem);
gui.setItem(37, info); gui.setItem(6, undoKit);
gui.setItem(44, saveKit); gui.setItem(7, undoKit);
gui.setItem(8, undoKit);
gui.setItem(9, saveKit);
gui.setItem(10, saveKit);
gui.setItem(11, saveKit);
gui.setItem(12, infoItem);
gui.setItem(13, infoItem);
gui.setItem(14, infoItem);
gui.setItem(15, undoKit);
gui.setItem(16, undoKit);
gui.setItem(17, undoKit);
gui.setItem(18, saveKit);
gui.setItem(19, saveKit);
gui.setItem(20, saveKit);
gui.setItem(21, infoItem);
gui.setItem(22, infoItem);
gui.setItem(23, infoItem);
gui.setItem(24, undoKit);
gui.setItem(25, undoKit);
gui.setItem(26, undoKit);
Inventory inv = player.getInventory();
switch (args[0]) { switch (args[0]) {
case "sword": case "sword":
ItemStack swordsword = new ItemStack(Material.DIAMOND_SWORD); ItemStack swordsword = new ItemStack(Material.DIAMOND_SWORD);
swordsword.addEnchantment(Enchantment.UNBREAKING, 3); swordsword.addEnchantment(Enchantment.UNBREAKING, 3);
gui.setItem(27, swordsword); inv.clear();
inv.setItem(getItemSlot("sword", "sword", player), swordsword);
player.openInventory(gui); player.openInventory(gui);
break; break;
@@ -68,10 +113,14 @@ public class EditKitCommand implements CommandExecutor, TabCompleter {
ItemStack uhcaxe = new ItemStack(Material.DIAMOND_AXE); ItemStack uhcaxe = new ItemStack(Material.DIAMOND_AXE);
ItemStack uhcsword = new ItemStack(Material.DIAMOND_SWORD); ItemStack uhcsword = new ItemStack(Material.DIAMOND_SWORD);
ItemStack uhclava = new ItemStack(Material.LAVA_BUCKET); ItemStack uhclava = new ItemStack(Material.LAVA_BUCKET);
ItemStack uhclava2 = new ItemStack(Material.LAVA_BUCKET);
ItemStack uhccobweb = new ItemStack(Material.COBWEB, 8); ItemStack uhccobweb = new ItemStack(Material.COBWEB, 8);
ItemStack uhccobblestone = new ItemStack(Material.COBBLESTONE, 64); ItemStack uhccobblestone = new ItemStack(Material.COBBLESTONE, 64);
ItemStack uhcgoldenapple = new ItemStack(Material.GOLDEN_APPLE, 13); ItemStack uhcgoldenapple = new ItemStack(Material.GOLDEN_APPLE, 13);
ItemStack uhcwater = new ItemStack(Material.WATER_BUCKET); ItemStack uhcwater = new ItemStack(Material.WATER_BUCKET);
ItemStack uhcwater2 = new ItemStack(Material.WATER_BUCKET);
ItemStack uhcwater3 = new ItemStack(Material.WATER_BUCKET);
ItemStack uhcwater4 = new ItemStack(Material.WATER_BUCKET);
ItemStack uhccrossbow = new ItemStack(Material.CROSSBOW); ItemStack uhccrossbow = new ItemStack(Material.CROSSBOW);
ItemStack uhcbow = new ItemStack(Material.BOW); ItemStack uhcbow = new ItemStack(Material.BOW);
ItemStack uhcarrow = new ItemStack(Material.ARROW, 16); ItemStack uhcarrow = new ItemStack(Material.ARROW, 16);
@@ -79,6 +128,7 @@ public class EditKitCommand implements CommandExecutor, TabCompleter {
ItemStack uhcplanks = new ItemStack(Material.OAK_PLANKS, 64); ItemStack uhcplanks = new ItemStack(Material.OAK_PLANKS, 64);
ItemStack uhcpickaxe = new ItemStack(Material.DIAMOND_PICKAXE); ItemStack uhcpickaxe = new ItemStack(Material.DIAMOND_PICKAXE);
inv.clear();
uhchelmet.addEnchantment(Enchantment.PROTECTION, 2); uhchelmet.addEnchantment(Enchantment.PROTECTION, 2);
uhcchestplate.addEnchantment(Enchantment.PROTECTION, 3); uhcchestplate.addEnchantment(Enchantment.PROTECTION, 3);
@@ -92,24 +142,41 @@ public class EditKitCommand implements CommandExecutor, TabCompleter {
uhcpickaxe.addEnchantment(Enchantment.UNBREAKING,3); uhcpickaxe.addEnchantment(Enchantment.UNBREAKING,3);
uhcpickaxe.addEnchantment(Enchantment.EFFICIENCY, 3); uhcpickaxe.addEnchantment(Enchantment.EFFICIENCY, 3);
gui.setItem(27, uhcaxe); ItemMeta uhcmetalava2 = uhclava2.getItemMeta();
gui.setItem(28, uhcsword); ItemMeta uhcmetawater2 = uhcwater2.getItemMeta();
gui.setItem(29, uhclava); ItemMeta uhcmetawater3 = uhcwater3.getItemMeta();
gui.setItem(30, uhccobweb); ItemMeta uhcmetawater4 = uhcwater4.getItemMeta();
gui.setItem(31, uhccobblestone);
gui.setItem(32, uhcgoldenapple); uhcmetalava2.getPersistentDataContainer().set(new NamespacedKey(String.valueOf(this), "lavab"), PersistentDataType.STRING, "lava2uuid");
gui.setItem(33, uhcwater); uhclava2.setItemMeta(uhcmetalava2);
gui.setItem(34, uhccrossbow);
gui.setItem(35, uhcbow); uhcmetawater2.getPersistentDataContainer().set(new NamespacedKey(String.valueOf(this), "waterb"), PersistentDataType.STRING, "water2uuid");
gui.setItem(36, uhcshield); uhcwater2.setItemMeta(uhcmetawater2);
gui.setItem(0, uhcarrow);
gui.setItem(4, uhcshield); uhcmetawater3.getPersistentDataContainer().set(new NamespacedKey(String.valueOf(this), "waterc"), PersistentDataType.STRING, "water3uuid");
gui.setItem(8, uhcplanks); uhcwater3.setItemMeta(uhcmetawater3);
gui.setItem(11, uhcpickaxe);
gui.setItem(12, uhclava); uhcmetawater4.getPersistentDataContainer().set(new NamespacedKey(String.valueOf(this), "waterd"), PersistentDataType.STRING, "water4uuid");
gui.setItem(13, uhcwater); uhcwater4.setItemMeta(uhcmetawater4);
gui.setItem(14, uhcwater);
gui.setItem(15, uhcwater); inv.setItem(getItemSlot("axe", "uhc", player), uhcaxe);
inv.setItem(getItemSlot("sword", "uhc", player), uhcsword);
inv.setItem(getItemSlot("lava", "uhc", player), uhclava);
inv.setItem(getItemSlot("cobweb", "uhc", player), uhccobweb);
inv.setItem(getItemSlot("cobblestone", "uhc", player), uhccobblestone);
inv.setItem(getItemSlot("goldenapple", "uhc", player), uhcgoldenapple);
inv.setItem(getItemSlot("water", "uhc", player), uhcwater);
inv.setItem(getItemSlot("crossbow", "uhc", player), uhccrossbow);
inv.setItem(getItemSlot("bow", "uhc", player), uhcbow);
inv.setItem(getItemSlot("shield", "uhc", player), uhcshield);
inv.setItem(getItemSlot("arrow", "uhc", player), uhcarrow);
inv.setItem(getItemSlot("shield2", "uhc", player), uhcshield);
inv.setItem(getItemSlot("planks", "uhc", player), uhcplanks);
inv.setItem(getItemSlot("pickaxe", "uhc", player), uhcpickaxe);
inv.setItem(getItemSlot("lava2", "uhc", player), uhclava2);
inv.setItem(getItemSlot("water2", "uhc", player), uhcwater2);
inv.setItem(getItemSlot("water3", "uhc", player), uhcwater3);
inv.setItem(getItemSlot("water4", "uhc", player), uhcwater4);
player.openInventory(gui); player.openInventory(gui);
break; break;
@@ -127,28 +194,4 @@ public class EditKitCommand implements CommandExecutor, TabCompleter {
public @Nullable List<String> onTabComplete(@NotNull CommandSender cmds, @NotNull Command command, @NotNull String s, @NotNull String[] args) { public @Nullable List<String> onTabComplete(@NotNull CommandSender cmds, @NotNull Command command, @NotNull String s, @NotNull String[] args) {
return List.of(); return List.of();
} }
} }
/*
Inventory gui = Bukkit.createInventory(null, 45, "Sword Kit");
ItemStack saveKit = new ItemStack(Material.PLAYER_HEAD);
SkullMeta saveMeta = (SkullMeta) saveKit.getItemMeta();
ItemStack info = new ItemStack(Material.PLAYER_HEAD);
SkullMeta infoMeta = (SkullMeta) info.getItemMeta();
if (saveMeta != null) {
saveMeta.setDisplayName("§aSave");
saveKit.setItemMeta(saveMeta);
}
if (infoMeta != null) {
infoMeta.setDisplayName("§aInformáció");
infoMeta.setLore(Collections.singletonList("§5A 4. sor a hotbar, 5. sor 1. iteme az offhand."));
}
gui.setItem(44, saveKit);
player.openInventory(gui);
break;
*/

View File

@@ -1,6 +1,6 @@
package hu.jgj52.wolfFFA.Commands; package hu.jgj52.wolfFFA.Commands;
import hu.jgj52.wolfFFA.WolfFFA; import hu.jgj52.wolfFFA.Main;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
@@ -20,13 +20,13 @@ import java.util.List;
public class TpToFfaCommand implements CommandExecutor, TabCompleter { public class TpToFfaCommand implements CommandExecutor, TabCompleter {
private final WolfFFA plugin; private final Main plugin;
public TpToFfaCommand(WolfFFA plugin) { public TpToFfaCommand(Main plugin) {
this.plugin = plugin; this.plugin = plugin;
} }
private int getItem(String key, String kit, Player player) { private int getItemSlot(String key, String kit, Player player) {
String path = "kits." + kit + "." + player.getUniqueId() + "." + key; String path = "kits." + kit + "." + player.getUniqueId() + "." + key;
if (plugin.getConfig().contains(path)) { if (plugin.getConfig().contains(path)) {
@@ -40,13 +40,6 @@ public class TpToFfaCommand implements CommandExecutor, TabCompleter {
return -1; return -1;
} }
private boolean checkItem(String key, String kit, Player player) {
String path = "kits." + kit + "." + player.getUniqueId() + "." + key;
player.sendMessage("Slot: " + plugin.getConfig().get(path));
return plugin.getConfig().get(path) != null ? true : false;
}
@Override @Override
public boolean onCommand(@NotNull CommandSender cmds, @NotNull Command command, @NotNull String s, @NotNull String[] args) { public boolean onCommand(@NotNull CommandSender cmds, @NotNull Command command, @NotNull String s, @NotNull String[] args) {
if (cmds.hasPermission("wolfffa.admin.tptoffa")) { if (cmds.hasPermission("wolfffa.admin.tptoffa")) {
@@ -70,7 +63,7 @@ public class TpToFfaCommand implements CommandExecutor, TabCompleter {
sword.addEnchantment(Enchantment.UNBREAKING, 3); sword.addEnchantment(Enchantment.UNBREAKING, 3);
player.getInventory().setArmorContents(new ItemStack[]{boots, leggings, chestplate, helmet}); player.getInventory().setArmorContents(new ItemStack[]{boots, leggings, chestplate, helmet});
player.getInventory().setItem(checkItem("sword", "sword", player) ? getItem("sword", "sword", player) : 0, sword); player.getInventory().setItem(getItemSlot("sword", "sword", player), sword);
World world = Bukkit.getWorld("world"); World world = Bukkit.getWorld("world");
double x = 0.5; double x = 0.5;
@@ -106,7 +99,6 @@ public class TpToFfaCommand implements CommandExecutor, TabCompleter {
ItemStack planks = new ItemStack(Material.OAK_PLANKS, 64); ItemStack planks = new ItemStack(Material.OAK_PLANKS, 64);
ItemStack pickaxe = new ItemStack(Material.DIAMOND_PICKAXE); ItemStack pickaxe = new ItemStack(Material.DIAMOND_PICKAXE);
helmet.addEnchantment(Enchantment.PROTECTION, 2); helmet.addEnchantment(Enchantment.PROTECTION, 2);
chestplate.addEnchantment(Enchantment.PROTECTION, 3); chestplate.addEnchantment(Enchantment.PROTECTION, 3);
leggings.addEnchantment(Enchantment.PROTECTION, 3); leggings.addEnchantment(Enchantment.PROTECTION, 3);
@@ -120,24 +112,24 @@ public class TpToFfaCommand implements CommandExecutor, TabCompleter {
pickaxe.addEnchantment(Enchantment.EFFICIENCY, 3); pickaxe.addEnchantment(Enchantment.EFFICIENCY, 3);
player.getInventory().setArmorContents(new ItemStack[]{boots, leggings, chestplate, helmet}); player.getInventory().setArmorContents(new ItemStack[]{boots, leggings, chestplate, helmet});
player.getInventory().setItem(checkItem("axe", "uhc", player) ? getItem("axe", "uhc", player) : 0, axe); player.getInventory().setItem(getItemSlot("axe", "uhc", player), axe);
player.getInventory().setItem(checkItem("sword", "uhc", player) ? getItem("sword", "uhc", player) : 1, sword); player.getInventory().setItem(getItemSlot("sword", "uhc", player), sword);
player.getInventory().setItem(checkItem("lava", "uhc", player) ? getItem("lava", "uhc", player) : 2, lava); player.getInventory().setItem(getItemSlot("lava", "uhc", player), lava);
player.getInventory().setItem(checkItem("cobweb", "uhc", player) ? getItem("cobweb", "uhc", player) : 3, cobweb); player.getInventory().setItem(getItemSlot("cobweb", "uhc", player), cobweb);
player.getInventory().setItem(checkItem("cobblestone", "uhc", player) ? getItem("cobblestone", "uhc", player) : 4, cobblestone); player.getInventory().setItem(getItemSlot("cobblestone", "uhc", player), cobblestone);
player.getInventory().setItem(checkItem("goldenapple", "uhc", player) ? getItem("goldenapple", "uhc", player) : 5, goldenapple); player.getInventory().setItem(getItemSlot("goldenapple", "uhc", player), goldenapple);
player.getInventory().setItem(checkItem("water", "uhc", player) ? getItem("water", "uhc", player) : 6, water); player.getInventory().setItem(getItemSlot("water", "uhc", player), water);
player.getInventory().setItem(checkItem("crossbow", "uhc", player) ? getItem("crossbow", "uhc", player) : 7, crossbow); player.getInventory().setItem(getItemSlot("crossbow", "uhc", player), crossbow);
player.getInventory().setItem(checkItem("bow", "uhc", player) ? getItem("bow", "uhc", player) : 8, bow); player.getInventory().setItem(getItemSlot("bow", "uhc", player), bow);
player.getInventory().setItem(checkItem("arrow", "uhc", player) ? getItem("arrow", "uhc", player) : 9, arrow); player.getInventory().setItem(getItemSlot("arrow", "uhc", player), arrow);
player.getInventory().setItem(checkItem("shield2", "uhc", player) ? getItem("shield2", "uhc", player) : 13, shield); player.getInventory().setItem(getItemSlot("shield2", "uhc", player), shield);
player.getInventory().setItem(checkItem("planks", "uhc", player) ? getItem("planks", "uhc", player) : 17, planks); player.getInventory().setItem(getItemSlot("planks", "uhc", player), planks);
player.getInventory().setItem(checkItem("pickaxe", "uhc", player) ? getItem("pickaxe", "uhc", player) : 20, pickaxe); player.getInventory().setItem(getItemSlot("pickaxe", "uhc", player), pickaxe);
player.getInventory().setItem(checkItem("lava2", "uhc", player) ? getItem("lava2", "uhc", player) : 21, lava); player.getInventory().setItem(getItemSlot("lava2", "uhc", player), lava);
player.getInventory().setItem(checkItem("water2", "uhc", player) ? getItem("water2", "uhc", player) : 22, water); player.getInventory().setItem(getItemSlot("water2", "uhc", player), water);
player.getInventory().setItem(checkItem("water3", "uhc", player) ? getItem("water3", "uhc", player) : 23, water); player.getInventory().setItem(getItemSlot("water3", "uhc", player), water);
player.getInventory().setItem(checkItem("water4", "uhc", player) ? getItem("water4", "uhc", player) : 24, water); player.getInventory().setItem(getItemSlot("water4", "uhc", player), water);
player.getInventory().setItem(checkItem("shield", "uhc", player) ? getItem("shield", "uhc", player) : 40, shield); player.getInventory().setItem(getItemSlot("shield", "uhc", player), shield);
World world = Bukkit.getWorld("world"); World world = Bukkit.getWorld("world");
double x = 0.5; double x = 0.5;

View File

@@ -0,0 +1,75 @@
package hu.jgj52.wolfFFA.Listeners;
import hu.jgj52.wolfFFA.Main;
import net.kyori.adventure.text.Component;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.inventory.Inventory;
import java.util.HashMap;
import java.util.Map;
public class KitListener implements Listener {
private final Main plugin;
public KitListener(Main plugin) {
this.plugin = plugin;
}
@EventHandler
public void onJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
if (!player.hasPlayedBefore()) {
Map <String, Object> swordkit = new HashMap<>();
swordkit.put("sword", 0);
plugin.getConfig().set("kits.sword." + player.getUniqueId(), swordkit);
plugin.saveConfig();
plugin.reloadConfig();
Map <String, Object> uhcKit = new HashMap<>();
uhcKit.put("axe", 0);
uhcKit.put("sword", 1);
uhcKit.put("lava", 2);
uhcKit.put("cobweb", 3);
uhcKit.put("cobblestone", 4);
uhcKit.put("goldenapple", 5);
uhcKit.put("water", 6);
uhcKit.put("crossbow", 7);
uhcKit.put("bow", 8);
uhcKit.put("arrow", 9);
uhcKit.put("shield2", 13);
uhcKit.put("planks", 17);
uhcKit.put("pickaxe", 20);
uhcKit.put("lava2", 21);
uhcKit.put("water2", 22);
uhcKit.put("water3", 23);
uhcKit.put("water4", 24);
uhcKit.put("shield", 40);
plugin.getConfig().set("kits.uhc." + player.getUniqueId(), uhcKit);
plugin.saveConfig();
plugin.reloadConfig();
}
}
@EventHandler
public void onInventoryClick(InventoryClickEvent event) {
if (!(event.getWhoClicked() instanceof Player player)) return;
Inventory gui = event.getInventory();
Inventory inv = player.getInventory();
if (event.getClickedInventory() == event.getView().getTopInventory() && event.getView().title().equals(Component.text("Kit Editor"))) {
event.setCancelled(true);
if ((0 <= event.getSlot() && event.getSlot() <= 2) || (9 <= event.getSlot() && event.getSlot() <= 11) || (18 <= event.getSlot() && event.getSlot() <= 20)) {
player.sendMessage("szia");
}
else if ((3 <= event.getSlot() && event.getSlot() <= 5) || (12 <= event.getSlot() && event.getSlot() <= 14) || (21 <= event.getSlot() && event.getSlot() <= 23)) {
player.sendMessage("szia2");
}
else if ((6 <= event.getSlot() && event.getSlot() <= 8) || (15 <= event.getSlot() && event.getSlot() <= 17) || (24 <= event.getSlot() && event.getSlot() <= 26)) {
player.sendMessage("szia3");
}
}
}
}

View File

@@ -2,9 +2,10 @@ package hu.jgj52.wolfFFA;
import hu.jgj52.wolfFFA.Commands.EditKitCommand; import hu.jgj52.wolfFFA.Commands.EditKitCommand;
import hu.jgj52.wolfFFA.Commands.TpToFfaCommand; import hu.jgj52.wolfFFA.Commands.TpToFfaCommand;
import hu.jgj52.wolfFFA.Listeners.KitListener;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
public final class WolfFFA extends JavaPlugin { public final class Main extends JavaPlugin {
@Override @Override
public void onEnable() { public void onEnable() {
@@ -14,6 +15,8 @@ public final class WolfFFA extends JavaPlugin {
getCommand("tptoffa").setExecutor(new TpToFfaCommand(this)); getCommand("tptoffa").setExecutor(new TpToFfaCommand(this));
getCommand("editkit").setExecutor(new EditKitCommand(this)); getCommand("editkit").setExecutor(new EditKitCommand(this));
getServer().getPluginManager().registerEvents(new KitListener(this), this);
} }
@Override @Override

View File

@@ -0,0 +1,6 @@
package hu.jgj52.wolfFFA.Managers;
public class FileManager {
}

View File

@@ -1,6 +1,6 @@
name: WolfFFA name: WolfFFA
version: '1.0' version: '1.0'
main: hu.jgj52.wolfFFA.WolfFFA main: hu.jgj52.wolfFFA.Main
api-version: '1.21' api-version: '1.21'
commands: commands:
tptoffa: tptoffa:

Binary file not shown.

Binary file not shown.

View File

@@ -1,11 +1,11 @@
name: WolfFFA name: WolfFFA
version: '1.0' version: '1.0'
main: hu.jgj52.wolfFFA.WolfFFA main: hu.jgj52.wolfFFA.Main
api-version: '1.21' api-version: '1.21'
commands: commands:
tptoffa: tptoffa:
permission: wolfffa.admin.tptoffa permission: wolfffa.admin.tptoffa
usage: /tptoffa <ffa> <player> usage: /tptoffa <ffa> <player>
wolfffareload: editkit:
permission: wolffa.admin.reload permission: wolfffa.command.editkit
usage: /wolfffareload usage: /editkit <kit>

View File

@@ -1,3 +1,5 @@
hu/jgj52/wolfFFA/WolfFFA.class hu/jgj52/wolfFFA/Commands/TpToFfaCommand.class
hu/jgj52/wolfFFA/Commands/WolfFfaReloadCommand.class hu/jgj52/wolfFFA/Commands/EditKitCommand.class
hu/jgj52/wolfFFA/Commands/WolfFfaCommand.class hu/jgj52/wolfFFA/Main.class
hu/jgj52/wolfFFA/Listeners/KitListener.class
hu/jgj52/wolfFFA/Managers/FileManager.class

View File

@@ -1,3 +1,5 @@
/home/jgj52/IdeaProjects/WolfFFA/src/main/java/hu/jgj52/wolfFFA/Commands/WolfFfaCommand.java /home/jgj52/IdeaProjects/WolfFFA/src/main/java/hu/jgj52/wolfFFA/Commands/EditKitCommand.java
/home/jgj52/IdeaProjects/WolfFFA/src/main/java/hu/jgj52/wolfFFA/Commands/WolfFfaReloadCommand.java /home/jgj52/IdeaProjects/WolfFFA/src/main/java/hu/jgj52/wolfFFA/Commands/TpToFfaCommand.java
/home/jgj52/IdeaProjects/WolfFFA/src/main/java/hu/jgj52/wolfFFA/WolfFFA.java /home/jgj52/IdeaProjects/WolfFFA/src/main/java/hu/jgj52/wolfFFA/Listeners/KitListener.java
/home/jgj52/IdeaProjects/WolfFFA/src/main/java/hu/jgj52/wolfFFA/Main.java
/home/jgj52/IdeaProjects/WolfFFA/src/main/java/hu/jgj52/wolfFFA/Managers/FileManager.java

Binary file not shown.