Fix for a error being thrown when there is no error
This commit is contained in:
parent
06b9734c3e
commit
65077f1d7b
@ -24,7 +24,7 @@ public class DisguiseCommand extends BaseDisguiseCommand {
|
|||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
if (ex.getMessage() != null && !ChatColor.getLastColors(ex.getMessage()).equals("")) {
|
if (ex.getMessage() != null && !ChatColor.getLastColors(ex.getMessage()).equals("")) {
|
||||||
sender.sendMessage(ex.getMessage());
|
sender.sendMessage(ex.getMessage());
|
||||||
} else {
|
} else if (ex.getCause() != null) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -29,7 +29,7 @@ public class DisguiseEntityCommand extends BaseDisguiseCommand {
|
|||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
if (ex.getMessage() != null && !ChatColor.getLastColors(ex.getMessage()).equals("")) {
|
if (ex.getMessage() != null && !ChatColor.getLastColors(ex.getMessage()).equals("")) {
|
||||||
sender.sendMessage(ex.getMessage());
|
sender.sendMessage(ex.getMessage());
|
||||||
} else {
|
} else if (ex.getCause() != null) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -43,7 +43,7 @@ public class DisguisePlayerCommand extends BaseDisguiseCommand {
|
|||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
if (ex.getMessage() != null && !ChatColor.getLastColors(ex.getMessage()).equals("")) {
|
if (ex.getMessage() != null && !ChatColor.getLastColors(ex.getMessage()).equals("")) {
|
||||||
sender.sendMessage(ex.getMessage());
|
sender.sendMessage(ex.getMessage());
|
||||||
} else {
|
} else if (ex.getCause() != null) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -56,7 +56,7 @@ public class DisguiseRadiusCommand extends BaseDisguiseCommand {
|
|||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
if (ex.getMessage() != null && !ChatColor.getLastColors(ex.getMessage()).equals("")) {
|
if (ex.getMessage() != null && !ChatColor.getLastColors(ex.getMessage()).equals("")) {
|
||||||
sender.sendMessage(ex.getMessage());
|
sender.sendMessage(ex.getMessage());
|
||||||
} else {
|
} else if (ex.getCause() != null) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user