mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-15 15:28:36 +01:00
Just use the methods that I already made
This commit is contained in:
parent
e9fd160be8
commit
ac391d9f07
@ -4,6 +4,7 @@ import java.util.HashMap;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
||||||
|
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
||||||
import me.libraryaddict.disguise.disguisetypes.PlayerDisguise;
|
import me.libraryaddict.disguise.disguisetypes.PlayerDisguise;
|
||||||
import me.libraryaddict.disguise.disguisetypes.watchers.LivingWatcher;
|
import me.libraryaddict.disguise.disguisetypes.watchers.LivingWatcher;
|
||||||
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
||||||
@ -121,13 +122,7 @@ public class DisguiseListener implements Listener {
|
|||||||
if (entity instanceof Player && !disguiseClone.containsKey(p.getName())) {
|
if (entity instanceof Player && !disguiseClone.containsKey(p.getName())) {
|
||||||
entityName = ((Player) entity).getName();
|
entityName = ((Player) entity).getName();
|
||||||
} else {
|
} else {
|
||||||
String[] split = entity.getType().name().split("_");
|
entityName = DisguiseType.getType(entity).toReadable();
|
||||||
for (int i = 0; i < split.length; i++) {
|
|
||||||
entityName += split[i].substring(0, 1) + split[i].substring(1).toLowerCase();
|
|
||||||
if (i + 1 < split.length) {
|
|
||||||
entityName += " ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (disguiseClone.containsKey(p.getName())) {
|
if (disguiseClone.containsKey(p.getName())) {
|
||||||
Boolean[] options = disguiseClone.remove(p.getName());
|
Boolean[] options = disguiseClone.remove(p.getName());
|
||||||
@ -178,13 +173,7 @@ public class DisguiseListener implements Listener {
|
|||||||
if (disguise instanceof PlayerDisguise) {
|
if (disguise instanceof PlayerDisguise) {
|
||||||
disguiseName = "the player " + ((PlayerDisguise) disguise).getName();
|
disguiseName = "the player " + ((PlayerDisguise) disguise).getName();
|
||||||
} else {
|
} else {
|
||||||
String[] split = disguise.getType().name().split("_");
|
disguiseName += disguise.getType().toReadable();
|
||||||
for (int i = 0; i < split.length; i++) {
|
|
||||||
disguiseName += split[i].substring(0, 1) + split[i].substring(1).toLowerCase();
|
|
||||||
if (i + 1 < split.length) {
|
|
||||||
disguiseName += " ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (disguise.isDisguiseInUse()) {
|
if (disguise.isDisguiseInUse()) {
|
||||||
p.sendMessage(ChatColor.RED + "Disguised " + (entity instanceof Player ? "" : "the ") + entityName
|
p.sendMessage(ChatColor.RED + "Disguised " + (entity instanceof Player ? "" : "the ") + entityName
|
||||||
|
Loading…
Reference in New Issue
Block a user