SteamWar/BauSystem2.0
Archiviert
12
0

Add BockReplaceCommand
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed

Add DebugStickCommand
Add DragonEggCommand
Add DebugstickBauGuiItem
Dieser Commit ist enthalten in:
yoyosource 2024-05-18 15:20:17 +02:00
Ursprung cbdcaa7e69
Commit e6167eef88
9 geänderte Dateien mit 171 neuen und 137 gelöschten Zeilen

Datei anzeigen

@ -25,10 +25,17 @@ COMMAND_HELP_HEAD = §7---=== (§e{0}§7) ===---
# Permissions (always needed!)
NO_PERMISSION = You are not allowed to use that here
# BIND
# Bind
BIND_COMMAND_HELP = §8/§ebind §8[§7Command§8] §8-§e Bind a command to item interaction
BIND_COMMAND_ERROR = §cInvalid or unknown command
BIND_MESSAGE_UNBINDABLE = §cCould not bind command to item
BIND_MESSAGE_BIND = §7Bound command §e{0} §7to item
BIND_MESSAGE_UNBIND = §7Unbound command
BIND_ITEM_LORE = §eCommand§8:§7 {0}
# Debug Stick
DEBUGSTICK_COMMAND_HELP = §8/§edebugstick §8-§7 receive a debugstick
DEBUGSTICK_ITEM_NAME = §eDebugstick
# Dragon Egg
DRAGONEGG_COMMAND_HELP = §8/§edragonegg §8-§7 Receive a Dragon Egg

Datei anzeigen

@ -31,3 +31,9 @@ BIND_COMMAND_ERROR = §cFalscher oder unbekannter Befehl
BIND_MESSAGE_UNBINDABLE = §cBefehl konnte nicht ans Item gebunden werden
BIND_MESSAGE_BIND = §7Befehl §e{0} §7ans Item gebunden
BIND_MESSAGE_UNBIND = §7Befehl vom Item entfernt
# Debug Stick
DEBUGSTICK_COMMAND_HELP = §8/§edebugstick §8-§7 Erhalte einen DebugStick
# Dragon Egg
DRAGONEGG_COMMAND_HELP = §8/§edragonegg §8-§7 Erhalte ein Drachenei

Datei anzeigen

@ -1,4 +1,23 @@
package de.steamwar.bausystem.features.util;
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2024 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bausystem.itemutilities;
import de.steamwar.command.SWCommand;
import de.steamwar.linkage.Linked;

Datei anzeigen

@ -0,0 +1,40 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2024 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bausystem.itemutilities;
import de.steamwar.bausystem.SWUtils;
import de.steamwar.command.SWCommand;
import de.steamwar.linkage.Linked;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
@Linked
public class DebugStickCommand extends SWCommand {
public DebugStickCommand() {
super("debugstick");
}
@Register(description = "DEBUGSTICK_COMMAND_HELP")
public void genericCommand(@Validator Player p) {
SWUtils.giveItemToPlayer(p, new ItemStack(Material.DEBUG_STICK));
}
}

Datei anzeigen

@ -0,0 +1,40 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2024 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bausystem.itemutilities;
import de.steamwar.bausystem.SWUtils;
import de.steamwar.command.SWCommand;
import de.steamwar.linkage.Linked;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
@Linked
public class DragonEggCommand extends SWCommand {
public DragonEggCommand() {
super("dragonegg", "enderdragon", "dragon", "egg", "enderei", "ender");
}
@Register(description = "DRAGONEGG_COMMAND_HELP")
public void genericCommand(Player p) {
SWUtils.giveItemToPlayer(p, new ItemStack(Material.DRAGON_EGG, 1));
}
}

Datei anzeigen

@ -0,0 +1,57 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2024 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bausystem.itemutilities.gui;
import de.steamwar.bausystem.BauSystemPlugin;
import de.steamwar.bausystem.Permission;
import de.steamwar.bausystem.linkage.specific.BauGuiItem;
import de.steamwar.inventory.SWItem;
import de.steamwar.linkage.Linked;
import de.steamwar.linkage.PluginCheck;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType;
import org.bukkit.inventory.ItemStack;
@Linked
@PluginCheck("BauSystem_GUI")
public class DebugStickBauGuiItem extends BauGuiItem {
public DebugStickBauGuiItem() {
super(12);
}
@Override
public ItemStack getItem(Player player) {
return new SWItem(Material.DEBUG_STICK, BauSystemPlugin.MESSAGE.parse("DEBUGSTICK_ITEM_NAME", player)).getItemStack();
}
@Override
public boolean click(ClickType click, Player p) {
p.closeInventory();
p.performCommand("debugstick");
return false;
}
@Override
public Permission permission() {
return Permission.BUILD;
}
}

Datei anzeigen

@ -1,40 +0,0 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2021 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bausystem.features.util;
import de.steamwar.bausystem.SWUtils;
import de.steamwar.command.SWCommand;
import de.steamwar.linkage.Linked;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
@Linked
public class DebugStickCommand extends SWCommand {
public DebugStickCommand() {
super("debugstick");
}
@Register(description = "DEBUG_STICK_COMMAND_HELP")
public void genericCommand(@Validator Player p) {
SWUtils.giveItemToPlayer(p, new ItemStack(Material.DEBUG_STICK));
}
}

Datei anzeigen

@ -1,40 +0,0 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2023 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bausystem.features.util;
import de.steamwar.bausystem.SWUtils;
import de.steamwar.command.SWCommand;
import de.steamwar.linkage.Linked;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
@Linked
public class DragonEggCommand extends SWCommand {
public DragonEggCommand() {
super("dragonegg", "enderdragon", "dragon", "egg", "enderei", "ender");
}
@Register(description = "DRAGON_EGG_COMMAND_HELP")
public void genericCommand(Player p) {
SWUtils.giveItemToPlayer(p, new ItemStack(Material.DRAGON_EGG, 1));
}
}

Datei anzeigen

@ -1,55 +0,0 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2021 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bausystem.features.util.items;
import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.Permission;
import de.steamwar.bausystem.linkage.specific.BauGuiItem;
import de.steamwar.inventory.SWItem;
import de.steamwar.linkage.Linked;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType;
import org.bukkit.inventory.ItemStack;
@Linked
public class DebugstickBauGuiItem extends BauGuiItem {
public DebugstickBauGuiItem() {
super(12);
}
@Override
public ItemStack getItem(Player player) {
return new SWItem(Material.DEBUG_STICK, BauSystem.MESSAGE.parse("DEBUG_STICK_NAME", player)).getItemStack();
}
@Override
public boolean click(ClickType click, Player p) {
p.closeInventory();
p.performCommand("debugstick");
return false;
}
@Override
public Permission permission() {
return Permission.BUILD;
}
}