Skip to content
Permalink
Browse files

Print an error showing the location of the sign that failed to load a…

… firework show
  • Loading branch information...
me4502 committed Aug 17, 2019
1 parent 933cb47 commit 3d6de2b9a93600ea658c9ae5903b17b208ebd578
@@ -58,16 +58,21 @@ public String getSignTitle() {
return "FIREWORKS";
}

String show;
FireworkShowHandler handler;
private String show;
private FireworkShowHandler handler;

boolean stopOnLow;
private boolean stopOnLow;

@Override
public void load() {

show = getLine(2).trim();
handler = new FireworkShowHandler(show);
try {
handler = new FireworkShowHandler(show);
} catch (IOException e) {
CraftBookPlugin.logger().severe("Failed to load firework file for IC at " + getSign().getBlock().getLocation().toString());
CraftBookBukkitUtil.printStacktrace(e);
}

String[] bits = RegexUtil.COMMA_PATTERN.split(getLine(3));
if(bits.length > 0)
@@ -137,14 +142,9 @@ public String getShortDescription() {

boolean fyrestone = false;

public FireworkShowHandler(String showName) {

public FireworkShowHandler(String showName) throws IOException {
this.showName = showName;
try {
readShow();
} catch (IOException e) {
CraftBookBukkitUtil.printStacktrace(e);
}
readShow();
}

public void readShow() throws IOException {

0 comments on commit 3d6de2b

Please sign in to comment.
You can’t perform that action at this time.