Fix some typos, don't use MineSkinAPI name
This commit is contained in:
parent
7f725d26bd
commit
db29352948
@ -38,7 +38,7 @@ public class DisguiseAPI {
|
|||||||
disguiseName = disguiseName.replace(".", "");
|
disguiseName = disguiseName.replace(".", "");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
DisguiseConfig.removeCustomDisguise(disguiseInfo);
|
DisguiseConfig.removeCustomDisguise(disguiseName);
|
||||||
DisguiseConfig.addCustomDisguise(disguiseName, disguiseInfo);
|
DisguiseConfig.addCustomDisguise(disguiseName, disguiseInfo);
|
||||||
|
|
||||||
File disguisesFile = new File("plugins/LibsDisguises/disguises.yml");
|
File disguisesFile = new File("plugins/LibsDisguises/disguises.yml");
|
||||||
|
@ -64,7 +64,7 @@ public class LibsDisguises extends JavaPlugin {
|
|||||||
|
|
||||||
if (!ReflectionManager.getMinecraftVersion().startsWith("1.15")) {
|
if (!ReflectionManager.getMinecraftVersion().startsWith("1.15")) {
|
||||||
getLogger().severe("You're using the wrong version of Lib's Disguises for your server! This is " +
|
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);
|
getPluginLoader().disablePlugin(this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -90,10 +90,6 @@ public class GrabSkinCommand implements CommandExecutor {
|
|||||||
String nName = name;
|
String nName = name;
|
||||||
|
|
||||||
if (nName == null) {
|
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)) {
|
while (DisguiseUtilities.hasGameProfile("skin" + i)) {
|
||||||
@ -102,7 +98,6 @@ public class GrabSkinCommand implements CommandExecutor {
|
|||||||
|
|
||||||
nName = "skin" + i;
|
nName = "skin" + i;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (profile.getName() == null || !profile.getName().equals(nName)) {
|
if (profile.getName() == null || !profile.getName().equals(nName)) {
|
||||||
profile = ReflectionManager
|
profile = ReflectionManager
|
||||||
|
@ -54,8 +54,7 @@ public class ShulkerWatcher extends InsentientWatcher {
|
|||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setColor(AnimalColor color) {
|
public void setColor(AnimalColor color) {
|
||||||
setData(MetaIndex.SHULKER_COLOR, color.getDyeColor().getWoolData());
|
setColor(color.getDyeColor());
|
||||||
sendData(MetaIndex.SHULKER_COLOR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setColor(DyeColor newColor) {
|
public void setColor(DyeColor newColor) {
|
||||||
|
@ -120,7 +120,7 @@ public class MineSkinAPI {
|
|||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
callback.onError(LibsMsg.SKIN_API_FAIL_CODE, "" + error.code,
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
} else if (connection.getResponseCode() == 400) {
|
} else if (connection.getResponseCode() == 400) {
|
||||||
@ -146,7 +146,7 @@ public class MineSkinAPI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SocketTimeoutException ex) {
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
@ -155,7 +155,7 @@ public class MineSkinAPI {
|
|||||||
try {
|
try {
|
||||||
if (connection != null && (connection.getResponseCode() == 524 || connection.getResponseCode() == 408 ||
|
if (connection != null && (connection.getResponseCode() == 524 || connection.getResponseCode() == 408 ||
|
||||||
connection.getResponseCode() == 504 || connection.getResponseCode() == 599)) {
|
connection.getResponseCode() == 504 || connection.getResponseCode() == 599)) {
|
||||||
callback.onError(LibsMsg.SKIN_API_TIMEOUT);
|
callback.onError(LibsMsg.SKIN_API_TIMEOUT_ERROR);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,9 @@ public enum LibsMsg {
|
|||||||
SKIN_API_403("mineskin.org denied access to that url"),
|
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_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_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_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_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!"),
|
SKIN_API_BAD_FILE(ChatColor.RED + "Invalid file provided! Please ensure it is a valid .png skin!"),
|
||||||
|
Loading…
Reference in New Issue
Block a user