update for CommandDebugStick
Dieser Commit ist enthalten in:
Ursprung
bb4fc017fa
Commit
0ee83c6dd4
@ -1,49 +1,26 @@
|
||||
/*
|
||||
This file is a part of the SteamWar software.
|
||||
|
||||
Copyright (C) 2020 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.commands;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.bausystem.Permission;
|
||||
import de.steamwar.bausystem.world.Welt;
|
||||
import de.steamwar.command.SWCommand;
|
||||
import de.steamwar.core.VersionedRunnable;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class CommandDebugStick implements CommandExecutor {
|
||||
|
||||
public class CommandDebugStick extends SWCommand {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!(sender instanceof Player))
|
||||
return false;
|
||||
Player player = (Player) sender;
|
||||
|
||||
if (Welt.noPermission(player, Permission.build)) {
|
||||
player.sendMessage(BauSystem.PREFIX + "§cKein Debugstick für dich hier.");
|
||||
return false;
|
||||
public CommandDebugStick() {
|
||||
super("debugstick");
|
||||
}
|
||||
|
||||
VersionedRunnable.call(new VersionedRunnable(() -> player.sendMessage(BauSystem.PREFIX + "§cDen Debugstick gibt es nicht in der 1.12."), 8),
|
||||
new VersionedRunnable(() -> CommandDebugStick_15.giveStick(player), 15));
|
||||
return false;
|
||||
@Register
|
||||
public void genericCommand(Player p) {
|
||||
if (Welt.noPermission(p, Permission.build)) {
|
||||
p.sendMessage(BauSystem.PREFIX + "§cKein Debugstick für dich hier.");
|
||||
} else {
|
||||
VersionedRunnable.call(new VersionedRunnable(() -> p.sendMessage(BauSystem.PREFIX + "§cDen Debugstick gibt es nicht in der 1.12."), 8),
|
||||
new VersionedRunnable(() -> CommandDebugStick_15.giveStick(p), 15));
|
||||
}
|
||||
}
|
||||
}
|
@ -9,7 +9,6 @@ website: "https://steamwar.de"
|
||||
description: "So unseriös wie wir sind: BauSystem nur besser."
|
||||
|
||||
commands:
|
||||
debugstick:
|
||||
fire:
|
||||
testblock:
|
||||
aliases: tb
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren