Added config option ContactMojangServers which disables player skins, but stops the plugin from pinging Mojang servers.
This commit is contained in:
@@ -43,6 +43,8 @@ import com.comphenix.protocol.wrappers.WrappedWatchableObject;
|
||||
import me.libraryaddict.disguise.utilities.Metrics;
|
||||
|
||||
public class LibsDisguises extends JavaPlugin {
|
||||
|
||||
public static LibsDisguises instance; //I'm sorry Sun MicroSystems and all mighty Java God
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
@@ -103,6 +105,7 @@ public class LibsDisguises extends JavaPlugin {
|
||||
getCommand("disguiseclone").setExecutor(new DisguiseCloneCommand(listener));
|
||||
getCommand("libsdisguises").setExecutor(new LibsDisguisesCommand());
|
||||
registerValues();
|
||||
instance = this;
|
||||
try {
|
||||
Metrics metrics = new Metrics(this);
|
||||
metrics.start();
|
||||
|
@@ -5,6 +5,7 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.comphenix.protocol.wrappers.WrappedGameProfile;
|
||||
import me.libraryaddict.disguise.LibsDisguises;
|
||||
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.PlayerWatcher;
|
||||
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
||||
@@ -153,6 +154,9 @@ public class PlayerDisguise extends TargetedDisguise {
|
||||
|
||||
public PlayerDisguise setSkin(String skinToUse) {
|
||||
this.skinToUse = skinToUse;
|
||||
if (!LibsDisguises.instance.getConfig().getBoolean("ContactMojangServers")) {
|
||||
return this;
|
||||
}
|
||||
if (skinToUse == null) {
|
||||
this.currentLookup = null;
|
||||
this.gameProfile = null;
|
||||
@@ -161,7 +165,6 @@ public class PlayerDisguise extends TargetedDisguise {
|
||||
this.skinToUse = skinToUse.substring(0, 16);
|
||||
}
|
||||
currentLookup = new LibsProfileLookup() {
|
||||
|
||||
@Override
|
||||
public void onLookup(WrappedGameProfile gameProfile) {
|
||||
if (currentLookup == this && gameProfile != null) {
|
||||
|
Reference in New Issue
Block a user