Add ability to have self disguises off by default

This commit is contained in:
libraryaddict 2020-11-22 19:12:09 +13:00
parent e2dae58034
commit df158c416e
3 changed files with 8 additions and 1 deletions

View File

@ -268,6 +268,9 @@ public class DisguiseConfig {
@Getter
@Setter
private static int playerDisguisesSkinExpiresMove;
@Getter
@Setter
private static boolean viewSelfDisguisesDefault;
public static boolean isArmorstandsName() {
return getPlayerNameType() == PlayerNameType.ARMORSTANDS;
@ -716,6 +719,7 @@ public class DisguiseConfig {
setRandomDisguises(config.getBoolean("RandomDisguiseOptions"));
setSaveUserPreferences(config.getBoolean("SaveUserPreferences"));
setPlayerDisguisesSkinExpiresMove(config.getInt("PlayerDisguisesTablistExpiresMove"));
setViewSelfDisguisesDefault(config.getBoolean("ViewSelfDisguisesDefault"));
if (!LibsPremium.isPremium() && (isSavePlayerDisguises() || isSaveEntityDisguises())) {
DisguiseUtilities.getLogger().warning("You must purchase the plugin to use saved disguises!");

View File

@ -57,7 +57,7 @@ public abstract class Disguise {
private boolean replaceSounds = DisguiseConfig.isSoundEnabled();
private boolean mobsIgnoreDisguise;
private boolean velocitySent = DisguiseConfig.isVelocitySent();
private boolean viewSelfDisguise = DisguiseConfig.isViewDisguises();
private boolean viewSelfDisguise = DisguiseConfig.isViewDisguises() && DisguiseConfig.isViewSelfDisguisesDefault();
@Getter
private DisguiseConfig.NotifyBar notifyBar = DisguiseConfig.getNotifyBar();
@Getter

View File

@ -135,6 +135,9 @@ UndisguiseRadiusMax: 50
# Shall the players view their disguises?
# Best used when viewing yourself in 3rd person
ViewSelfDisguises: true
# Are self disguises enabled by default
# Default is true
ViewSelfDisguisesDefault: true
# Some disguises are rather big and tall and block your vision
# By default those disguises are enabled despite misgivings, such as zombies, players, etc.