Read desc
Now use Entitys completely for the disguising. Now removes the disguise when the entity isn't valid. Deprecated the methods using a object. Added methods to set and get velocity - If packets should be sent.
This commit is contained in:
@@ -6,6 +6,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class UndisguiseCommand implements CommandExecutor {
|
||||
@@ -17,7 +18,7 @@ public class UndisguiseCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
if (sender.hasPermission("libsdisguises.undisguise")) {
|
||||
if (DisguiseAPI.isDisguised(sender.getName())) {
|
||||
if (DisguiseAPI.isDisguised((Entity) sender)) {
|
||||
DisguiseAPI.undisguiseToAll((Player) sender);
|
||||
sender.sendMessage(ChatColor.RED + "You are no longer disguised");
|
||||
} else
|
||||
|
@@ -17,7 +17,7 @@ public class UndisguisePlayerCommand implements CommandExecutor {
|
||||
if (args.length > 0) {
|
||||
Player p = Bukkit.getPlayer(args[0]);
|
||||
if (p != null) {
|
||||
if (DisguiseAPI.isDisguised(p.getName())) {
|
||||
if (DisguiseAPI.isDisguised(p)) {
|
||||
DisguiseAPI.undisguiseToAll(p);
|
||||
sender.sendMessage(ChatColor.RED + "He is no longer disguised");
|
||||
} else
|
||||
|
Reference in New Issue
Block a user