generated from axieum/fabric-example-mod
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
370 additions
and
4 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
30 changes: 30 additions & 0 deletions
30
...c/main/java/me/axieum/mcmod/minecord/api/chat/event/minecraft/TellRawMessageCallback.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,30 @@ | ||
package me.axieum.mcmod.minecord.api.chat.event.minecraft; | ||
|
||
import net.minecraft.server.command.ServerCommandSource; | ||
import net.minecraft.text.Text; | ||
|
||
import net.fabricmc.fabric.api.event.Event; | ||
import net.fabricmc.fabric.api.event.EventFactory; | ||
|
||
public interface TellRawMessageCallback | ||
{ | ||
/** | ||
* Called when a server (or player) broadcasts a {@code /tellraw} command | ||
* message to *all* players. | ||
*/ | ||
Event<TellRawMessageCallback> EVENT = | ||
EventFactory.createArrayBacked(TellRawMessageCallback.class, callbacks -> (message, source) -> { | ||
for (TellRawMessageCallback callback : callbacks) { | ||
callback.onTellRawCommandMessage(message, source); | ||
} | ||
}); | ||
|
||
/** | ||
* Called when a server (or player) broadcasts a {@code /tellraw} command | ||
* message to *all* players. | ||
* | ||
* @param message broadcast message with message decorators applied if applicable | ||
* @param source command source that sent the message | ||
*/ | ||
void onTellRawCommandMessage(Text message, ServerCommandSource source); | ||
} |
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
Oops, something went wrong.