Dateien nach "src/main/java/de/viper/survivalplus/commands" hochladen
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package de.viper.survivalplus.commands;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
public class TrashCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!(sender instanceof Player player)) {
|
||||
sender.sendMessage("Nur Spieler können diesen Befehl ausführen.");
|
||||
return true;
|
||||
}
|
||||
|
||||
Inventory trash = Bukkit.createInventory(player, 9 * 3, "Trash");
|
||||
player.openInventory(trash);
|
||||
return true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user