Add getter for gson

This commit is contained in:
libraryaddict 2020-02-02 14:11:36 +13:00
parent ed098752f6
commit 4092737259
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4

View File

@ -116,6 +116,7 @@ public class DisguiseUtilities {
private static HashMap<UUID, String> disguiseTeam = new HashMap<>(); private static HashMap<UUID, String> disguiseTeam = new HashMap<>();
private static File profileCache = new File("plugins/LibsDisguises/GameProfiles"), savedDisguises = new File( private static File profileCache = new File("plugins/LibsDisguises/GameProfiles"), savedDisguises = new File(
"plugins/LibsDisguises/SavedDisguises"); "plugins/LibsDisguises/SavedDisguises");
@Getter
private static Gson gson; private static Gson gson;
@Getter @Getter
private static boolean pluginsUsed, commandsUsed, copyDisguiseCommandUsed, grabSkinCommandUsed, private static boolean pluginsUsed, commandsUsed, copyDisguiseCommandUsed, grabSkinCommandUsed,
@ -192,7 +193,6 @@ public class DisguiseUtilities {
commandsUsed = true; commandsUsed = true;
} }
public static void saveDisguises() { public static void saveDisguises() {
if (!LibsPremium.isPremium()) if (!LibsPremium.isPremium())
return; return;
@ -629,7 +629,6 @@ public class DisguiseUtilities {
return null; return null;
} }
public static TargetedDisguise[] getDisguises(UUID entityId) { public static TargetedDisguise[] getDisguises(UUID entityId) {
if (getDisguises().containsKey(entityId)) { if (getDisguises().containsKey(entityId)) {
Set<TargetedDisguise> disguises = getDisguises().get(entityId); Set<TargetedDisguise> disguises = getDisguises().get(entityId);
@ -640,7 +639,6 @@ public class DisguiseUtilities {
return new TargetedDisguise[0]; return new TargetedDisguise[0];
} }
public static WrappedGameProfile getGameProfile(String playerName) { public static WrappedGameProfile getGameProfile(String playerName) {
if (!hasGameProfile(playerName)) if (!hasGameProfile(playerName))
return null; return null;
@ -874,8 +872,6 @@ public class DisguiseUtilities {
return getProfileFromMojang(playerName, (Object) runnableIfCantReturn, contactMojang); return getProfileFromMojang(playerName, (Object) runnableIfCantReturn, contactMojang);
} }
public static void init() { public static void init() {
try { try {
runningPaper = Class.forName("com.destroystokyo.paper.VersionHistoryManager$VersionData") != null; runningPaper = Class.forName("com.destroystokyo.paper.VersionHistoryManager$VersionData") != null;