Skip to content

Commit

Permalink
Add "- determine cancelled" to "on server start"
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphan1 committed Sep 3, 2013
1 parent 365f9cb commit 22a5a15
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,8 @@ public void signChange(final SignChangeEvent event) {
//
// @Triggers when the server starts
//
// @Determine "CANCELLED" to save all plugins and cancel server startup.
//
// -->
public void serverStartEvent() {
// Start the 'timeEvent'
Expand All @@ -496,8 +498,11 @@ public void run() {
}, Settings.WorldScriptTimeEventFrequency().getTicks(), Settings.WorldScriptTimeEventFrequency().getTicks());

// Fire the 'Server Start' event
doEvents(Arrays.asList("server start"),
String determination = doEvents(Arrays.asList("server start"),
null, null, null);

if (determination.toUpperCase().startsWith("CANCELLED"))
Bukkit.getServer().shutdown();
}

private Map<String, Integer> current_time = new HashMap<String, Integer>();
Expand Down

0 comments on commit 22a5a15

Please sign in to comment.