Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update Server Start Event to a ScriptEvent
- Loading branch information
1 parent
5f727e0
commit 6579e59
Showing
4 changed files
with
48 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
plugin/src/main/java/com/denizenscript/denizen/events/core/ServerStartScriptEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.denizenscript.denizen.events.core; | ||
|
||
import com.denizenscript.denizen.events.BukkitScriptEvent; | ||
import com.denizenscript.denizencore.objects.ObjectTag; | ||
|
||
public class ServerStartScriptEvent extends BukkitScriptEvent { | ||
|
||
// <--[event] | ||
// @Events | ||
// server start | ||
// | ||
// @Regex ^on server start$ | ||
// | ||
// @Triggers when the server starts. | ||
// | ||
// --> | ||
|
||
public ServerStartScriptEvent() { | ||
instance = this; | ||
} | ||
|
||
public static ServerStartScriptEvent instance; | ||
|
||
@Override | ||
public boolean couldMatch(ScriptPath path) { | ||
return path.eventLower.startsWith("server start"); | ||
} | ||
|
||
@Override | ||
public boolean matches(ScriptPath path) { | ||
return super.matches(path); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "ServerStart"; | ||
} | ||
|
||
@Override | ||
public ObjectTag getContext(String name) { | ||
return super.getContext(name); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters