Added config option ContactMojangServers which disables player skins, but stops the plugin from pinging Mojang servers.
This commit is contained in:
parent
4beb5fa730
commit
a33bb0b139
@ -44,6 +44,8 @@ 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() {
|
||||
saveDefaultConfig();
|
||||
@ -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) {
|
||||
|
@ -91,6 +91,9 @@ MiscDisguisesForLiving: true
|
||||
# Turn this to true to have players undisguised when switching worlds
|
||||
UndisguiseOnWorldChange: false
|
||||
|
||||
# Contact Mojang's servers? Disabling this option will disable player skin disguises!
|
||||
ContactMojangServers: true
|
||||
|
||||
# This will help performance, especially with CPU
|
||||
# Due to safety reasons, self disguises can never have their packets disabled.
|
||||
PacketsEnabled:
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: LibsDisguises
|
||||
main: me.libraryaddict.disguise.LibsDisguises
|
||||
version: 8.4
|
||||
version: 8.3.1
|
||||
author: libraryaddict
|
||||
authors: [Byteflux, Navid K.]
|
||||
depend: [ProtocolLib]
|
||||
|
Loading…
Reference in New Issue
Block a user