Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
05f43b7486
Commit
2cd7e4a931
@ -508,6 +508,8 @@ SIMULATOR_DELETE_HELP = §8/§esimulator delete §8[§7name§8] §8-§7 Deletes
|
|||||||
SIMULATOR_START_HELP = §8/§esimulator start §8[§7name§8] §8-§7 Starts the simulator
|
SIMULATOR_START_HELP = §8/§esimulator start §8[§7name§8] §8-§7 Starts the simulator
|
||||||
SIMULATOR_NO_PERMS = §cYou are not allowed to use the simulator here
|
SIMULATOR_NO_PERMS = §cYou are not allowed to use the simulator here
|
||||||
|
|
||||||
|
SIMULATOR_GUI_ITEM_NAME = §eTNT Simulator
|
||||||
|
|
||||||
SIMULATOR_NO_SIM_IN_HAND = §cNo simulator item selected
|
SIMULATOR_NO_SIM_IN_HAND = §cNo simulator item selected
|
||||||
SIMULATOR_GUI_SELECT_SIM = Simulator selection
|
SIMULATOR_GUI_SELECT_SIM = Simulator selection
|
||||||
SIMULATOR_NAME_ALREADY_EXISTS = §cSimulator already exists
|
SIMULATOR_NAME_ALREADY_EXISTS = §cSimulator already exists
|
||||||
|
@ -509,6 +509,8 @@ SIMULATOR_DELETE_HELP = §8/§esimulator delete §8[§7name§8] §8-§7 Löscht
|
|||||||
SIMULATOR_START_HELP = §8/§esimulator start §8[§7name§8] §8-§7 Startet die Simulation
|
SIMULATOR_START_HELP = §8/§esimulator start §8[§7name§8] §8-§7 Startet die Simulation
|
||||||
SIMULATOR_NO_PERMS = §cDu darfst hier nicht den Simulator nutzen
|
SIMULATOR_NO_PERMS = §cDu darfst hier nicht den Simulator nutzen
|
||||||
|
|
||||||
|
SIMULATOR_GUI_ITEM_NAME = §eTNT Simulator
|
||||||
|
|
||||||
SIMULATOR_NO_SIM_IN_HAND = §cKein Simulator Item gewählt
|
SIMULATOR_NO_SIM_IN_HAND = §cKein Simulator Item gewählt
|
||||||
SIMULATOR_GUI_SELECT_SIM = Simulator wählen
|
SIMULATOR_GUI_SELECT_SIM = Simulator wählen
|
||||||
SIMULATOR_NAME_ALREADY_EXISTS = §cSimulator existiert bereits
|
SIMULATOR_NAME_ALREADY_EXISTS = §cSimulator existiert bereits
|
||||||
|
@ -98,5 +98,4 @@ public class FreezeListener implements Listener {
|
|||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
* 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.simulator;
|
||||||
|
|
||||||
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.bausystem.Permission;
|
||||||
|
import de.steamwar.bausystem.linkage.LinkageType;
|
||||||
|
import de.steamwar.bausystem.linkage.Linked;
|
||||||
|
import de.steamwar.bausystem.linkage.specific.BauGuiItem;
|
||||||
|
import de.steamwar.inventory.SWItem;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.inventory.ClickType;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
@Linked(LinkageType.BAU_GUI_ITEM)
|
||||||
|
public class SimulatorBauGuiItem extends BauGuiItem {
|
||||||
|
|
||||||
|
public SimulatorBauGuiItem() {
|
||||||
|
super(20);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack getItem(Player player) {
|
||||||
|
return new SWItem(Material.BLAZE_ROD, BauSystem.MESSAGE.parse("SIMULATOR_GUI_ITEM_NAME", player)).getItemStack();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean click(ClickType click, Player p) {
|
||||||
|
p.closeInventory();
|
||||||
|
p.performCommand("sim");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Permission permission() {
|
||||||
|
return Permission.WORLD;
|
||||||
|
}
|
||||||
|
}
|
In neuem Issue referenzieren
Einen Benutzer sperren