Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.notpexel.helloworld.commands;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandExecutor;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import com.sun.tools.javac.Main;
- public class HelloCommand implements CommandExecutor {
- private Main plugin;
- public HelloCommand(Main plugin) {
- this.plugin= plugin;
- plugin.getCommand("hello").setExecutor(this);
- }
- @Override
- public boolean onCommand(CommandSender sender, Command cmd, String lable, String[] args) {
- if (!(sender instanceof Player)) {
- sender.sendMessage("You ain't no player! Only players are premmited to usin' this command");
- return true;
- }
- Player p = (Player) sender;
- if (p.hasPermission("hello.use")) {
- p.sendMessage("sup m8?"));
- return true;
- }else {
- p.sendMessage("You ain't no allowed!");
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement