Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.bloxx;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandExecutor;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- public class Emote implements CommandExecutor {
- boolean noTimeout = true;
- @Override
- public boolean onCommand(CommandSender cs, Command cmd, String lbl, String[] args) {
- Player p = (Player)cs;
- if(!noTimeout) {
- p.sendMessage("§ePlease wait 3 Minutes for your next emote");
- noTimeout = true;
- return true;
- }
- if(!p.hasPermission("rsc.emote")) {
- p.sendMessage("§cYou don't have the permission rsc.emote to execute this command!");
- return true;
- }
- if(!(args.length == 1)) {
- p.sendMessage("§cSyntax error please use /emote <Emote>");
- return true;
- }
- if(args[0].equals("Troll")) {
- p.sendMessage("HEHE");
- try {
- noTimeout = false;
- Thread.sleep(1000*60*3);
- noTimeout = true;
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- return true;
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement