mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2025-08-05 20:13:02 +00:00
- Changed entire project to gradle
- Updated for 1.8.3 - No more errors, woo
This commit is contained in:
parent
14757a035b
commit
573f4cdc88
81 changed files with 299 additions and 645 deletions
|
@ -0,0 +1,30 @@
|
|||
package me.libraryaddict.disguise.commands;
|
||||
|
||||
import me.libraryaddict.disguise.DisguiseListener;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
public class UndisguiseEntityCommand implements CommandExecutor {
|
||||
private DisguiseListener listener;
|
||||
|
||||
public UndisguiseEntityCommand(DisguiseListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
if (sender.getName().equals("CONSOLE")) {
|
||||
sender.sendMessage(ChatColor.RED + "You may not use this command from the console!");
|
||||
return true;
|
||||
}
|
||||
if (sender.hasPermission("libsdisguises.undisguiseentity")) {
|
||||
listener.setDisguiseEntity(sender.getName(), null);
|
||||
sender.sendMessage(ChatColor.RED + "Right click a disguised entity to undisguise them!");
|
||||
} else
|
||||
sender.sendMessage(ChatColor.RED + "You are forbidden to use this command.");
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue