Fix some typos, don't use MineSkinAPI name

This commit is contained in:
libraryaddict 2020-01-11 13:37:45 +13:00
parent 7f725d26bd
commit db29352948
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4
6 changed files with 14 additions and 18 deletions

View File

@ -38,7 +38,7 @@ public class DisguiseAPI {
disguiseName = disguiseName.replace(".", "");
try {
DisguiseConfig.removeCustomDisguise(disguiseInfo);
DisguiseConfig.removeCustomDisguise(disguiseName);
DisguiseConfig.addCustomDisguise(disguiseName, disguiseInfo);
File disguisesFile = new File("plugins/LibsDisguises/disguises.yml");

View File

@ -64,7 +64,7 @@ public class LibsDisguises extends JavaPlugin {
if (!ReflectionManager.getMinecraftVersion().startsWith("1.15")) {
getLogger().severe("You're using the wrong version of Lib's Disguises for your server! This is " +
"intended for 1.14.4!");
"intended for 1.15!");
getPluginLoader().disablePlugin(this);
return;
}

View File

@ -90,18 +90,13 @@ public class GrabSkinCommand implements CommandExecutor {
String nName = name;
if (nName == null) {
if (profile.getName() != null && profile.getName().length() > 0 &&
!DisguiseUtilities.hasGameProfile(profile.getName())) {
nName = profile.getName();
} else {
int i = 1;
int i = 1;
while (DisguiseUtilities.hasGameProfile("skin" + i)) {
i++;
}
nName = "skin" + i;
while (DisguiseUtilities.hasGameProfile("skin" + i)) {
i++;
}
nName = "skin" + i;
}
if (profile.getName() == null || !profile.getName().equals(nName)) {

View File

@ -54,8 +54,7 @@ public class ShulkerWatcher extends InsentientWatcher {
@Deprecated
public void setColor(AnimalColor color) {
setData(MetaIndex.SHULKER_COLOR, color.getDyeColor().getWoolData());
sendData(MetaIndex.SHULKER_COLOR);
setColor(color.getDyeColor());
}
public void setColor(DyeColor newColor) {

View File

@ -120,7 +120,7 @@ public class MineSkinAPI {
return null;
} else {
callback.onError(LibsMsg.SKIN_API_FAIL_CODE, "" + error.code,
"Your image has the error: " + error.error);
LibsMsg.SKIN_API_IMAGE_HAS_ERROR.get(error.error));
return null;
}
} else if (connection.getResponseCode() == 400) {
@ -146,7 +146,7 @@ public class MineSkinAPI {
}
}
catch (SocketTimeoutException ex) {
callback.onError(skinUrl == null ? LibsMsg.SKIN_API_TIMEOUT : LibsMsg.SKIN_API_IMAGE_TIMEOUT);
callback.onError(skinUrl == null ? LibsMsg.SKIN_API_TIMEOUT_ERROR : LibsMsg.SKIN_API_IMAGE_TIMEOUT);
return null;
}
catch (Exception ex) {
@ -155,7 +155,7 @@ public class MineSkinAPI {
try {
if (connection != null && (connection.getResponseCode() == 524 || connection.getResponseCode() == 408 ||
connection.getResponseCode() == 504 || connection.getResponseCode() == 599)) {
callback.onError(LibsMsg.SKIN_API_TIMEOUT);
callback.onError(LibsMsg.SKIN_API_TIMEOUT_ERROR);
return null;
}
}

View File

@ -199,7 +199,9 @@ public enum LibsMsg {
SKIN_API_403("mineskin.org denied access to that url"),
SKIN_API_404("mineskin.org unable to find an image at that url"),
SKIN_API_IMAGE_TIMEOUT(ChatColor.RED + "Error! mineskin.org took too long to connect! Is your image valid?"),
SKIN_API_TIMEOUT(ChatColor.RED + "Error! Took too long to connect to mineskin.org!"),
SKIN_API_TIMEOUT_ERROR(ChatColor.RED + "Error! Took too long to connect to mineskin.org!"),
SKIN_API_TIMEOUT(ChatColor.RED + "Took too long to connect to mineskin.org!"),
SKIN_API_IMAGE_HAS_ERROR("Your image has the error: %s"),
SKIN_API_USING_URL(ChatColor.GRAY + "Url provided, now attempting to connect to mineskin.org"),
SKIN_API_BAD_FILE_NAME(ChatColor.RED + "Invalid file name provided! File not found!"),
SKIN_API_BAD_FILE(ChatColor.RED + "Invalid file provided! Please ensure it is a valid .png skin!"),