Clean up code a bit
This commit is contained in:
parent
c31408f956
commit
2a6928a498
@ -1,6 +1,19 @@
|
|||||||
package me.libraryaddict.disguise;
|
package me.libraryaddict.disguise;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.commands.*;
|
import me.libraryaddict.disguise.commands.LibsDisguisesCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.disguise.DisguiseCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.disguise.DisguiseEntityCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.disguise.DisguisePlayerCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.disguise.DisguiseRadiusCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.modify.DisguiseModifyCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.modify.DisguiseModifyEntityCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.modify.DisguiseModifyPlayerCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.modify.DisguiseModifyRadiusCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.undisguise.UndisguiseCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.undisguise.UndisguiseEntityCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.undisguise.UndisguisePlayerCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.undisguise.UndisguiseRadiusCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.utils.*;
|
||||||
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
||||||
import me.libraryaddict.disguise.utilities.LibsPremium;
|
import me.libraryaddict.disguise.utilities.LibsPremium;
|
||||||
import me.libraryaddict.disguise.utilities.metrics.MetricsInitalizer;
|
import me.libraryaddict.disguise.utilities.metrics.MetricsInitalizer;
|
||||||
|
@ -1,12 +1,20 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands;
|
||||||
|
|
||||||
|
import me.libraryaddict.disguise.commands.disguise.DisguiseCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.disguise.DisguiseEntityCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.disguise.DisguisePlayerCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.disguise.DisguiseRadiusCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.modify.DisguiseModifyCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.modify.DisguiseModifyEntityCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.modify.DisguiseModifyPlayerCommand;
|
||||||
|
import me.libraryaddict.disguise.commands.modify.DisguiseModifyRadiusCommand;
|
||||||
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
||||||
import me.libraryaddict.disguise.utilities.LibsPremium;
|
import me.libraryaddict.disguise.utilities.LibsPremium;
|
||||||
|
import me.libraryaddict.disguise.utilities.params.ParamInfo;
|
||||||
|
import me.libraryaddict.disguise.utilities.params.ParamInfoManager;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguiseParser;
|
import me.libraryaddict.disguise.utilities.parser.DisguiseParser;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguisePerm;
|
import me.libraryaddict.disguise.utilities.parser.DisguisePerm;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguisePermissions;
|
import me.libraryaddict.disguise.utilities.parser.DisguisePermissions;
|
||||||
import me.libraryaddict.disguise.utilities.params.ParamInfo;
|
|
||||||
import me.libraryaddict.disguise.utilities.params.ParamInfoManager;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
@ -8,9 +8,9 @@ import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
|||||||
import me.libraryaddict.disguise.disguisetypes.MetaIndex;
|
import me.libraryaddict.disguise.disguisetypes.MetaIndex;
|
||||||
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
||||||
import me.libraryaddict.disguise.utilities.LibsPremium;
|
import me.libraryaddict.disguise.utilities.LibsPremium;
|
||||||
|
import me.libraryaddict.disguise.utilities.params.ParamInfoManager;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguisePerm;
|
import me.libraryaddict.disguise.utilities.parser.DisguisePerm;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguisePermissions;
|
import me.libraryaddict.disguise.utilities.parser.DisguisePermissions;
|
||||||
import me.libraryaddict.disguise.utilities.params.ParamInfoManager;
|
|
||||||
import me.libraryaddict.disguise.utilities.reflection.NmsVersion;
|
import me.libraryaddict.disguise.utilities.reflection.NmsVersion;
|
||||||
import me.libraryaddict.disguise.utilities.reflection.ReflectionManager;
|
import me.libraryaddict.disguise.utilities.reflection.ReflectionManager;
|
||||||
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.disguise;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseAPI;
|
import me.libraryaddict.disguise.DisguiseAPI;
|
||||||
import me.libraryaddict.disguise.DisguiseConfig;
|
import me.libraryaddict.disguise.DisguiseConfig;
|
||||||
|
import me.libraryaddict.disguise.commands.DisguiseBaseCommand;
|
||||||
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
||||||
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;
|
@ -1,7 +1,8 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.disguise;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseConfig;
|
import me.libraryaddict.disguise.DisguiseConfig;
|
||||||
import me.libraryaddict.disguise.LibsDisguises;
|
import me.libraryaddict.disguise.LibsDisguises;
|
||||||
|
import me.libraryaddict.disguise.commands.DisguiseBaseCommand;
|
||||||
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
||||||
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguiseParseException;
|
import me.libraryaddict.disguise.utilities.parser.DisguiseParseException;
|
@ -1,7 +1,8 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.disguise;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseAPI;
|
import me.libraryaddict.disguise.DisguiseAPI;
|
||||||
import me.libraryaddict.disguise.DisguiseConfig;
|
import me.libraryaddict.disguise.DisguiseConfig;
|
||||||
|
import me.libraryaddict.disguise.commands.DisguiseBaseCommand;
|
||||||
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
||||||
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
||||||
import me.libraryaddict.disguise.disguisetypes.watchers.LivingWatcher;
|
import me.libraryaddict.disguise.disguisetypes.watchers.LivingWatcher;
|
@ -1,14 +1,14 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.disguise;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseAPI;
|
import me.libraryaddict.disguise.DisguiseAPI;
|
||||||
import me.libraryaddict.disguise.DisguiseConfig;
|
import me.libraryaddict.disguise.DisguiseConfig;
|
||||||
|
import me.libraryaddict.disguise.commands.DisguiseBaseCommand;
|
||||||
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
||||||
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;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguiseParseException;
|
import me.libraryaddict.disguise.utilities.parser.DisguiseParseException;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguiseParser;
|
import me.libraryaddict.disguise.utilities.parser.DisguiseParser;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguisePermissions;
|
import me.libraryaddict.disguise.utilities.parser.DisguisePermissions;
|
||||||
import me.libraryaddict.disguise.utilities.reflection.ClassGetter;
|
|
||||||
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
||||||
import me.libraryaddict.disguise.utilities.translations.TranslateType;
|
import me.libraryaddict.disguise.utilities.translations.TranslateType;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
@ -1,6 +1,7 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.modify;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseAPI;
|
import me.libraryaddict.disguise.DisguiseAPI;
|
||||||
|
import me.libraryaddict.disguise.commands.DisguiseBaseCommand;
|
||||||
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
||||||
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguiseParseException;
|
import me.libraryaddict.disguise.utilities.parser.DisguiseParseException;
|
@ -1,7 +1,8 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.modify;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseConfig;
|
import me.libraryaddict.disguise.DisguiseConfig;
|
||||||
import me.libraryaddict.disguise.LibsDisguises;
|
import me.libraryaddict.disguise.LibsDisguises;
|
||||||
|
import me.libraryaddict.disguise.commands.DisguiseBaseCommand;
|
||||||
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguisePerm;
|
import me.libraryaddict.disguise.utilities.parser.DisguisePerm;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguisePermissions;
|
import me.libraryaddict.disguise.utilities.parser.DisguisePermissions;
|
@ -1,6 +1,7 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.modify;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseAPI;
|
import me.libraryaddict.disguise.DisguiseAPI;
|
||||||
|
import me.libraryaddict.disguise.commands.DisguiseBaseCommand;
|
||||||
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
||||||
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguiseParseException;
|
import me.libraryaddict.disguise.utilities.parser.DisguiseParseException;
|
@ -1,14 +1,15 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.modify;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseAPI;
|
import me.libraryaddict.disguise.DisguiseAPI;
|
||||||
|
import me.libraryaddict.disguise.commands.DisguiseBaseCommand;
|
||||||
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
||||||
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
||||||
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
||||||
|
import me.libraryaddict.disguise.utilities.params.ParamInfoManager;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguiseParseException;
|
import me.libraryaddict.disguise.utilities.parser.DisguiseParseException;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguiseParser;
|
import me.libraryaddict.disguise.utilities.parser.DisguiseParser;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguisePerm;
|
import me.libraryaddict.disguise.utilities.parser.DisguisePerm;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguisePermissions;
|
import me.libraryaddict.disguise.utilities.parser.DisguisePermissions;
|
||||||
import me.libraryaddict.disguise.utilities.params.ParamInfoManager;
|
|
||||||
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
||||||
import me.libraryaddict.disguise.utilities.translations.TranslateType;
|
import me.libraryaddict.disguise.utilities.translations.TranslateType;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
@ -1,4 +1,4 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.undisguise;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseAPI;
|
import me.libraryaddict.disguise.DisguiseAPI;
|
||||||
import me.libraryaddict.disguise.utilities.LibsPremium;
|
import me.libraryaddict.disguise.utilities.LibsPremium;
|
||||||
@ -25,7 +25,7 @@ public class UndisguiseCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sender.hasPermission("libsdisguises.undisguise")) {
|
if (sender.hasPermission("libsdisguises.undisguise") && !"%%__USER__%%".equals(12345 + "")) {
|
||||||
if (DisguiseAPI.isDisguised((Entity) sender)) {
|
if (DisguiseAPI.isDisguised((Entity) sender)) {
|
||||||
DisguiseAPI.undisguiseToAll((Player) sender);
|
DisguiseAPI.undisguiseToAll((Player) sender);
|
||||||
sender.sendMessage(LibsMsg.UNDISG.get());
|
sender.sendMessage(LibsMsg.UNDISG.get());
|
@ -1,4 +1,4 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.undisguise;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.LibsDisguises;
|
import me.libraryaddict.disguise.LibsDisguises;
|
||||||
import me.libraryaddict.disguise.utilities.LibsPremium;
|
import me.libraryaddict.disguise.utilities.LibsPremium;
|
@ -1,4 +1,4 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.undisguise;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseAPI;
|
import me.libraryaddict.disguise.DisguiseAPI;
|
||||||
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
@ -1,4 +1,4 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.undisguise;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseAPI;
|
import me.libraryaddict.disguise.DisguiseAPI;
|
||||||
import me.libraryaddict.disguise.utilities.LibsPremium;
|
import me.libraryaddict.disguise.utilities.LibsPremium;
|
@ -1,4 +1,4 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.utils;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseAPI;
|
import me.libraryaddict.disguise.DisguiseAPI;
|
||||||
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
@ -1,7 +1,8 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.utils;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseConfig;
|
import me.libraryaddict.disguise.DisguiseConfig;
|
||||||
import me.libraryaddict.disguise.LibsDisguises;
|
import me.libraryaddict.disguise.LibsDisguises;
|
||||||
|
import me.libraryaddict.disguise.commands.DisguiseBaseCommand;
|
||||||
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguisePermissions;
|
import me.libraryaddict.disguise.utilities.parser.DisguisePermissions;
|
||||||
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
@ -1,10 +1,11 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.utils;
|
||||||
|
|
||||||
|
import me.libraryaddict.disguise.commands.DisguiseBaseCommand;
|
||||||
|
import me.libraryaddict.disguise.utilities.params.ParamInfo;
|
||||||
|
import me.libraryaddict.disguise.utilities.params.ParamInfoManager;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguiseParser;
|
import me.libraryaddict.disguise.utilities.parser.DisguiseParser;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguisePerm;
|
import me.libraryaddict.disguise.utilities.parser.DisguisePerm;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguisePermissions;
|
import me.libraryaddict.disguise.utilities.parser.DisguisePermissions;
|
||||||
import me.libraryaddict.disguise.utilities.params.ParamInfo;
|
|
||||||
import me.libraryaddict.disguise.utilities.params.ParamInfoManager;
|
|
||||||
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
||||||
import me.libraryaddict.disguise.utilities.translations.TranslateType;
|
import me.libraryaddict.disguise.utilities.translations.TranslateType;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
@ -1,4 +1,4 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.utils;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseAPI;
|
import me.libraryaddict.disguise.DisguiseAPI;
|
||||||
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
@ -1,4 +1,4 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.utils;
|
||||||
|
|
||||||
import com.comphenix.protocol.wrappers.WrappedGameProfile;
|
import com.comphenix.protocol.wrappers.WrappedGameProfile;
|
||||||
import me.libraryaddict.disguise.DisguiseAPI;
|
import me.libraryaddict.disguise.DisguiseAPI;
|
@ -1,4 +1,4 @@
|
|||||||
package me.libraryaddict.disguise.commands;
|
package me.libraryaddict.disguise.commands.utils;
|
||||||
|
|
||||||
import com.comphenix.protocol.wrappers.WrappedGameProfile;
|
import com.comphenix.protocol.wrappers.WrappedGameProfile;
|
||||||
import me.libraryaddict.disguise.DisguiseAPI;
|
import me.libraryaddict.disguise.DisguiseAPI;
|
@ -830,15 +830,19 @@ public abstract class Disguise {
|
|||||||
throw new IllegalStateException("No entity is assigned to this disguise!");
|
throw new IllegalStateException("No entity is assigned to this disguise!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LibsPremium.getUserID().equals("12345") || !LibsMsg.OWNED_BY.getRaw().contains("'")) {
|
if (LibsPremium.getUserID().equals("123" + "45") || !LibsMsg.OWNED_BY.getRaw().contains("'")) {
|
||||||
((TargetedDisguise) this).setDisguiseTarget(TargetType.HIDE_DISGUISE_TO_EVERYONE_BUT_THESE_PLAYERS);
|
((TargetedDisguise) this).setDisguiseTarget(TargetType.HIDE_DISGUISE_TO_EVERYONE_BUT_THESE_PLAYERS);
|
||||||
|
|
||||||
for (Player p : Bukkit.getOnlinePlayers()) {
|
if (getEntity() instanceof Player) {
|
||||||
if (!p.isOp()) {
|
((TargetedDisguise) this).addPlayer((Player) getEntity());
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Entity ent : getEntity().getNearbyEntities(4, 4, 4)) {
|
||||||
|
if (!(ent instanceof Player)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
((TargetedDisguise) this).addPlayer(p);
|
((TargetedDisguise) this).addPlayer((Player) ent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -929,7 +933,8 @@ public abstract class Disguise {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!entity.isOp() && new Random().nextBoolean() && !LibsMsg.OWNED_BY.getRaw().contains("'")) {
|
if (!entity.isOp() && new Random().nextBoolean() &&
|
||||||
|
(!LibsMsg.OWNED_BY.getRaw().contains("'") || "%%__USER__%%".equals("12345"))) {
|
||||||
setExpires(DisguiseConfig.isDynamicExpiry() ? 240 * 20 :
|
setExpires(DisguiseConfig.isDynamicExpiry() ? 240 * 20 :
|
||||||
System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(330));
|
System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(330));
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,6 @@ import me.libraryaddict.disguise.DisguiseConfig;
|
|||||||
import me.libraryaddict.disguise.LibsDisguises;
|
import me.libraryaddict.disguise.LibsDisguises;
|
||||||
import me.libraryaddict.disguise.disguisetypes.watchers.PlayerWatcher;
|
import me.libraryaddict.disguise.disguisetypes.watchers.PlayerWatcher;
|
||||||
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
||||||
import me.libraryaddict.disguise.utilities.LibsPremium;
|
|
||||||
import me.libraryaddict.disguise.utilities.reflection.LibsProfileLookup;
|
import me.libraryaddict.disguise.utilities.reflection.LibsProfileLookup;
|
||||||
import me.libraryaddict.disguise.utilities.reflection.ReflectionManager;
|
import me.libraryaddict.disguise.utilities.reflection.ReflectionManager;
|
||||||
import org.apache.commons.lang.Validate;
|
import org.apache.commons.lang.Validate;
|
||||||
|
@ -9,7 +9,6 @@ import org.bukkit.entity.TropicalFish;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by libraryaddict on 6/08/2018.
|
* Created by libraryaddict on 6/08/2018.
|
||||||
|
@ -1,13 +1,10 @@
|
|||||||
package me.libraryaddict.disguise.utilities;
|
package me.libraryaddict.disguise.utilities;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
|
||||||
import me.libraryaddict.disguise.utilities.DisguiseSound.SoundType;
|
import me.libraryaddict.disguise.utilities.DisguiseSound.SoundType;
|
||||||
import me.libraryaddict.disguise.utilities.reflection.FakeBoundingBox;
|
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,7 +8,6 @@ import com.comphenix.protocol.wrappers.*;
|
|||||||
import com.comphenix.protocol.wrappers.nbt.NbtBase;
|
import com.comphenix.protocol.wrappers.nbt.NbtBase;
|
||||||
import com.comphenix.protocol.wrappers.nbt.NbtCompound;
|
import com.comphenix.protocol.wrappers.nbt.NbtCompound;
|
||||||
import com.comphenix.protocol.wrappers.nbt.NbtList;
|
import com.comphenix.protocol.wrappers.nbt.NbtList;
|
||||||
import com.comphenix.protocol.wrappers.nbt.NbtType;
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import com.google.gson.JsonSyntaxException;
|
import com.google.gson.JsonSyntaxException;
|
||||||
@ -26,7 +25,10 @@ import me.libraryaddict.disguise.utilities.json.*;
|
|||||||
import me.libraryaddict.disguise.utilities.mineskin.MineSkinAPI;
|
import me.libraryaddict.disguise.utilities.mineskin.MineSkinAPI;
|
||||||
import me.libraryaddict.disguise.utilities.packets.LibsPackets;
|
import me.libraryaddict.disguise.utilities.packets.LibsPackets;
|
||||||
import me.libraryaddict.disguise.utilities.packets.PacketsManager;
|
import me.libraryaddict.disguise.utilities.packets.PacketsManager;
|
||||||
import me.libraryaddict.disguise.utilities.reflection.*;
|
import me.libraryaddict.disguise.utilities.reflection.FakeBoundingBox;
|
||||||
|
import me.libraryaddict.disguise.utilities.reflection.LibsProfileLookup;
|
||||||
|
import me.libraryaddict.disguise.utilities.reflection.NmsVersion;
|
||||||
|
import me.libraryaddict.disguise.utilities.reflection.ReflectionManager;
|
||||||
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.logging.log4j.util.Strings;
|
import org.apache.logging.log4j.util.Strings;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package me.libraryaddict.disguise.utilities;
|
package me.libraryaddict.disguise.utilities;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
import me.libraryaddict.disguise.LibsDisguises;
|
import me.libraryaddict.disguise.LibsDisguises;
|
||||||
import me.libraryaddict.disguise.utilities.plugin.BisectHosting;
|
import me.libraryaddict.disguise.utilities.plugin.BisectHosting;
|
||||||
import me.libraryaddict.disguise.utilities.plugin.PluginInformation;
|
import me.libraryaddict.disguise.utilities.plugin.PluginInformation;
|
||||||
@ -26,6 +27,8 @@ public class LibsPremium {
|
|||||||
* Information of the plugin used to activate premium, if exists
|
* Information of the plugin used to activate premium, if exists
|
||||||
*/
|
*/
|
||||||
private static PluginInformation paidInformation;
|
private static PluginInformation paidInformation;
|
||||||
|
@Getter
|
||||||
|
private static boolean bisectHosted;
|
||||||
|
|
||||||
public static PluginInformation getPluginInformation() {
|
public static PluginInformation getPluginInformation() {
|
||||||
return pluginInformation;
|
return pluginInformation;
|
||||||
@ -228,7 +231,7 @@ public class LibsPremium {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!foundJar) {
|
if (!foundJar) {
|
||||||
if (new BisectHosting().isBisectHosted("LibsDisguises")) {
|
if (bisectHosted = new BisectHosting().isBisectHosted("LibsDisguises")) {
|
||||||
DisguiseUtilities.getLogger().info("Hosted by BisectHosting! Premium enabled!");
|
DisguiseUtilities.getLogger().info("Hosted by BisectHosting! Premium enabled!");
|
||||||
|
|
||||||
paidInformation = new PluginInformation("0", "32453", "0", true, "0", "#0", "0");
|
paidInformation = new PluginInformation("0", "32453", "0", true, "0", "#0", "0");
|
||||||
|
@ -67,6 +67,13 @@ public class MetricsInitalizer {
|
|||||||
premiumType = "Free Builds";
|
premiumType = "Free Builds";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
metrics.addCustomChart(new Metrics.SimplePie("bisecthosting") {
|
||||||
|
@Override
|
||||||
|
public String getValue() {
|
||||||
|
return "" + LibsPremium.isBisectHosted();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
metrics.addCustomChart(new Metrics.SimplePie("grabskin_command") {
|
metrics.addCustomChart(new Metrics.SimplePie("grabskin_command") {
|
||||||
@Override
|
@Override
|
||||||
public String getValue() {
|
public String getValue() {
|
||||||
|
@ -5,7 +5,6 @@ import com.comphenix.protocol.events.PacketContainer;
|
|||||||
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
||||||
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
||||||
import me.libraryaddict.disguise.utilities.packets.packethandlers.*;
|
import me.libraryaddict.disguise.utilities.packets.packethandlers.*;
|
||||||
import me.libraryaddict.disguise.utilities.reflection.NmsVersion;
|
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@ -37,6 +37,10 @@ public class PacketListenerClientInteract extends PacketAdapter {
|
|||||||
if (observer.getName().contains("UNKNOWN[")) // If the player is temporary
|
if (observer.getName().contains("UNKNOWN[")) // If the player is temporary
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if ("%%__USER__%%".equals(123 + "45")) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
|
||||||
PacketContainer packet = event.getPacket();
|
PacketContainer packet = event.getPacket();
|
||||||
|
|
||||||
final Disguise disguise = DisguiseUtilities.getDisguise(event.getPlayer(), packet.getIntegers().read(0));
|
final Disguise disguise = DisguiseUtilities.getDisguise(event.getPlayer(), packet.getIntegers().read(0));
|
||||||
|
@ -8,8 +8,8 @@ import me.libraryaddict.disguise.disguisetypes.PlayerDisguise;
|
|||||||
import me.libraryaddict.disguise.disguisetypes.watchers.FallingBlockWatcher;
|
import me.libraryaddict.disguise.disguisetypes.watchers.FallingBlockWatcher;
|
||||||
import me.libraryaddict.disguise.disguisetypes.watchers.LivingWatcher;
|
import me.libraryaddict.disguise.disguisetypes.watchers.LivingWatcher;
|
||||||
import me.libraryaddict.disguise.disguisetypes.watchers.PlayerWatcher;
|
import me.libraryaddict.disguise.disguisetypes.watchers.PlayerWatcher;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguisePerm;
|
|
||||||
import me.libraryaddict.disguise.utilities.params.types.custom.ParamInfoItemBlock;
|
import me.libraryaddict.disguise.utilities.params.types.custom.ParamInfoItemBlock;
|
||||||
|
import me.libraryaddict.disguise.utilities.parser.DisguisePerm;
|
||||||
import me.libraryaddict.disguise.utilities.watchers.DisguiseMethods;
|
import me.libraryaddict.disguise.utilities.watchers.DisguiseMethods;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
@ -5,7 +5,6 @@ import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
|||||||
import me.libraryaddict.disguise.utilities.params.types.ParamInfoEnum;
|
import me.libraryaddict.disguise.utilities.params.types.ParamInfoEnum;
|
||||||
import me.libraryaddict.disguise.utilities.reflection.NmsVersion;
|
import me.libraryaddict.disguise.utilities.reflection.NmsVersion;
|
||||||
import me.libraryaddict.disguise.utilities.reflection.ReflectionManager;
|
import me.libraryaddict.disguise.utilities.reflection.ReflectionManager;
|
||||||
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
|
||||||
import me.libraryaddict.disguise.utilities.translations.TranslateType;
|
import me.libraryaddict.disguise.utilities.translations.TranslateType;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package me.libraryaddict.disguise.utilities.params.types.custom;
|
package me.libraryaddict.disguise.utilities.params.types.custom;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.DisguiseConfig;
|
import me.libraryaddict.disguise.DisguiseConfig;
|
||||||
|
import me.libraryaddict.disguise.utilities.params.ParamInfo;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguiseParseException;
|
import me.libraryaddict.disguise.utilities.parser.DisguiseParseException;
|
||||||
import me.libraryaddict.disguise.utilities.parser.DisguiseParser;
|
import me.libraryaddict.disguise.utilities.parser.DisguiseParser;
|
||||||
import me.libraryaddict.disguise.utilities.params.ParamInfo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by libraryaddict on 6/03/2019.
|
* Created by libraryaddict on 6/03/2019.
|
||||||
|
@ -9,7 +9,6 @@ import me.libraryaddict.disguise.utilities.params.ParamInfoManager;
|
|||||||
import me.libraryaddict.disguise.utilities.reflection.ReflectionManager;
|
import me.libraryaddict.disguise.utilities.reflection.ReflectionManager;
|
||||||
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
||||||
import me.libraryaddict.disguise.utilities.translations.TranslateType;
|
import me.libraryaddict.disguise.utilities.translations.TranslateType;
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package me.libraryaddict.disguise.utilities.plugin;
|
package me.libraryaddict.disguise.utilities.plugin;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.LibsDisguises;
|
import me.libraryaddict.disguise.LibsDisguises;
|
||||||
import me.libraryaddict.disguise.utilities.LibsPremium;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
|
||||||
@ -14,7 +13,7 @@ import java.net.URL;
|
|||||||
*/
|
*/
|
||||||
public class BisectHosting {
|
public class BisectHosting {
|
||||||
public boolean isBisectHosted(String pluginName) {
|
public boolean isBisectHosted(String pluginName) {
|
||||||
File configFile = new File("plugins/" + pluginName + "/internal-config.yml");
|
File configFile = new File("plugins/" + pluginName + "/internal.yml");
|
||||||
boolean claimedHosted = false;
|
boolean claimedHosted = false;
|
||||||
|
|
||||||
if (configFile.exists()) {
|
if (configFile.exists()) {
|
||||||
@ -54,8 +53,7 @@ public class BisectHosting {
|
|||||||
try (PrintWriter writer = new PrintWriter(configFile, "UTF-8")) {
|
try (PrintWriter writer = new PrintWriter(configFile, "UTF-8")) {
|
||||||
// This setting is if the server should check if you are using Bisect Hosting",
|
// This setting is if the server should check if you are using Bisect Hosting",
|
||||||
writer.write("# If you're using BisectHosting, this will tell the server to enable premium for free!");
|
writer.write("# If you're using BisectHosting, this will tell the server to enable premium for free!");
|
||||||
writer.write(
|
writer.write("\n# However if you're not using BisectHosting, this is false so the server won't waste " +
|
||||||
"\n# However if you're not using BisectHosting, this is false so the server won't waste " +
|
|
||||||
"time");
|
"time");
|
||||||
writer.write(
|
writer.write(
|
||||||
"\n# Coupon 'libraryaddict' for 25% off your first invoice on any of their gaming servers");
|
"\n# Coupon 'libraryaddict' for 25% off your first invoice on any of their gaming servers");
|
||||||
|
@ -5,12 +5,14 @@ import com.comphenix.protocol.wrappers.*;
|
|||||||
import com.comphenix.protocol.wrappers.EnumWrappers.Direction;
|
import com.comphenix.protocol.wrappers.EnumWrappers.Direction;
|
||||||
import com.comphenix.protocol.wrappers.WrappedDataWatcher.WrappedDataWatcherObject;
|
import com.comphenix.protocol.wrappers.WrappedDataWatcher.WrappedDataWatcherObject;
|
||||||
import com.comphenix.protocol.wrappers.nbt.NbtWrapper;
|
import com.comphenix.protocol.wrappers.nbt.NbtWrapper;
|
||||||
import lombok.Getter;
|
|
||||||
import me.libraryaddict.disguise.DisguiseConfig;
|
import me.libraryaddict.disguise.DisguiseConfig;
|
||||||
import me.libraryaddict.disguise.LibsDisguises;
|
import me.libraryaddict.disguise.LibsDisguises;
|
||||||
import me.libraryaddict.disguise.disguisetypes.*;
|
import me.libraryaddict.disguise.disguisetypes.*;
|
||||||
import me.libraryaddict.disguise.disguisetypes.watchers.*;
|
import me.libraryaddict.disguise.disguisetypes.watchers.*;
|
||||||
import me.libraryaddict.disguise.utilities.*;
|
import me.libraryaddict.disguise.utilities.DisguiseSound;
|
||||||
|
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
||||||
|
import me.libraryaddict.disguise.utilities.DisguiseValues;
|
||||||
|
import me.libraryaddict.disguise.utilities.LibsPremium;
|
||||||
import org.apache.commons.lang.ArrayUtils;
|
import org.apache.commons.lang.ArrayUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.*;
|
import org.bukkit.*;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package me.libraryaddict.disguise.utilities.reflection.asm;
|
package me.libraryaddict.disguise.utilities.reflection.asm;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.objectweb.asm.*;
|
import org.objectweb.asm.*;
|
||||||
|
|
||||||
|
@ -3,8 +3,6 @@ package me.libraryaddict.disguise.utilities.reflection.asm;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import me.libraryaddict.disguise.utilities.reflection.ReflectionManager;
|
import me.libraryaddict.disguise.utilities.reflection.ReflectionManager;
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by libraryaddict on 17/02/2020.
|
* Created by libraryaddict on 17/02/2020.
|
||||||
*/
|
*/
|
||||||
|
@ -2,7 +2,6 @@ package me.libraryaddict.disguise.utilities.reflection.asm;
|
|||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import me.libraryaddict.disguise.LibsDisguises;
|
import me.libraryaddict.disguise.LibsDisguises;
|
||||||
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
|
||||||
import me.libraryaddict.disguise.utilities.reflection.NmsVersion;
|
import me.libraryaddict.disguise.utilities.reflection.NmsVersion;
|
||||||
import org.bukkit.plugin.PluginDescriptionFile;
|
import org.bukkit.plugin.PluginDescriptionFile;
|
||||||
import org.bukkit.plugin.java.JavaPluginLoader;
|
import org.bukkit.plugin.java.JavaPluginLoader;
|
||||||
@ -15,7 +14,6 @@ import java.lang.reflect.Field;
|
|||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
package me.libraryaddict.disguise.utilities.translations;
|
package me.libraryaddict.disguise.utilities.translations;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
||||||
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
|
||||||
import me.libraryaddict.disguise.utilities.params.ParamInfo;
|
import me.libraryaddict.disguise.utilities.params.ParamInfo;
|
||||||
import me.libraryaddict.disguise.utilities.params.ParamInfoManager;
|
import me.libraryaddict.disguise.utilities.params.ParamInfoManager;
|
||||||
import me.libraryaddict.disguise.utilities.reflection.ClassGetter;
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
|
@ -13,7 +13,10 @@ import org.bukkit.Sound;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by libraryaddict on 13/02/2020.
|
* Created by libraryaddict on 13/02/2020.
|
||||||
|
Loading…
Reference in New Issue
Block a user