From 65077f1d7ba24fcdd041bb42712a1f10865debf9 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Wed, 20 Nov 2013 00:03:11 +1300 Subject: [PATCH] Fix for a error being thrown when there is no error --- src/me/libraryaddict/disguise/commands/DisguiseCommand.java | 2 +- .../libraryaddict/disguise/commands/DisguiseEntityCommand.java | 2 +- .../libraryaddict/disguise/commands/DisguisePlayerCommand.java | 2 +- .../libraryaddict/disguise/commands/DisguiseRadiusCommand.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/me/libraryaddict/disguise/commands/DisguiseCommand.java b/src/me/libraryaddict/disguise/commands/DisguiseCommand.java index 557cbb42..91f43087 100644 --- a/src/me/libraryaddict/disguise/commands/DisguiseCommand.java +++ b/src/me/libraryaddict/disguise/commands/DisguiseCommand.java @@ -24,7 +24,7 @@ public class DisguiseCommand extends BaseDisguiseCommand { } catch (Exception ex) { if (ex.getMessage() != null && !ChatColor.getLastColors(ex.getMessage()).equals("")) { sender.sendMessage(ex.getMessage()); - } else { + } else if (ex.getCause() != null) { ex.printStackTrace(); } return true; diff --git a/src/me/libraryaddict/disguise/commands/DisguiseEntityCommand.java b/src/me/libraryaddict/disguise/commands/DisguiseEntityCommand.java index 247ee96d..5a33a961 100644 --- a/src/me/libraryaddict/disguise/commands/DisguiseEntityCommand.java +++ b/src/me/libraryaddict/disguise/commands/DisguiseEntityCommand.java @@ -29,7 +29,7 @@ public class DisguiseEntityCommand extends BaseDisguiseCommand { } catch (Exception ex) { if (ex.getMessage() != null && !ChatColor.getLastColors(ex.getMessage()).equals("")) { sender.sendMessage(ex.getMessage()); - } else { + } else if (ex.getCause() != null) { ex.printStackTrace(); } return true; diff --git a/src/me/libraryaddict/disguise/commands/DisguisePlayerCommand.java b/src/me/libraryaddict/disguise/commands/DisguisePlayerCommand.java index 13e00f38..16782b08 100644 --- a/src/me/libraryaddict/disguise/commands/DisguisePlayerCommand.java +++ b/src/me/libraryaddict/disguise/commands/DisguisePlayerCommand.java @@ -43,7 +43,7 @@ public class DisguisePlayerCommand extends BaseDisguiseCommand { } catch (Exception ex) { if (ex.getMessage() != null && !ChatColor.getLastColors(ex.getMessage()).equals("")) { sender.sendMessage(ex.getMessage()); - } else { + } else if (ex.getCause() != null) { ex.printStackTrace(); } return true; diff --git a/src/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java b/src/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java index 1d0cefd1..e8dc6e2a 100644 --- a/src/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java +++ b/src/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java @@ -56,7 +56,7 @@ public class DisguiseRadiusCommand extends BaseDisguiseCommand { } catch (Exception ex) { if (ex.getMessage() != null && !ChatColor.getLastColors(ex.getMessage()).equals("")) { sender.sendMessage(ex.getMessage()); - } else { + } else if (ex.getCause() != null) { ex.printStackTrace(); } return true;