-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Command execution events & no more leaking uuid on trace
- Loading branch information
buj
committed
Jan 12, 2025
1 parent
29c6482
commit c4ca288
Showing
4 changed files
with
45 additions
and
3 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
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,41 @@ | ||
package mindustry.hotfix; | ||
|
||
import arc.util.CommandHandler; | ||
import arc.util.CommandHandler.CommandResponse; | ||
import mindustry.gen.*; | ||
|
||
/** | ||
* Events specific to MindustryHotfix. Only depend on this API if you're not planning | ||
* to use any other server software. | ||
*/ | ||
public class Events { | ||
private Events() {} | ||
|
||
/** | ||
* Called after a player executes a command. | ||
*/ | ||
public static class CommandExecuted { | ||
public Player player; | ||
public CommandResponse response; | ||
public CommandHandler handler; | ||
public CommandExecuted(Player player, CommandResponse response, CommandHandler handler) { | ||
this.player = player; | ||
this.response = response; | ||
this.handler = handler; | ||
} | ||
} | ||
|
||
/** | ||
* Called after console executes a command. | ||
*/ | ||
public static class ConsoleCommandExecuted { | ||
public CommandResponse response; | ||
public CommandHandler handler; | ||
public Boolean cancel; | ||
|
||
public ConsoleCommandExecuted(CommandResponse response, CommandHandler handler) { | ||
this.response = response; | ||
this.handler = handler; | ||
} | ||
} | ||
} |
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