-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
4 changed files
with
55 additions
and
1 deletion.
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
25 changes: 25 additions & 0 deletions
25
...ture-platform/src/dev/rollczi/litecommands/adventure/bukkit/platform/RawTextAudience.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,25 @@ | ||
package dev.rollczi.litecommands.adventure.bukkit.platform; | ||
|
||
import dev.rollczi.litecommands.platform.PlatformReceiver; | ||
import net.kyori.adventure.audience.Audience; | ||
import net.kyori.adventure.audience.MessageType; | ||
import net.kyori.adventure.identity.Identity; | ||
import net.kyori.adventure.text.Component; | ||
import org.jetbrains.annotations.ApiStatus; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
@ApiStatus.Experimental | ||
class RawTextAudience implements Audience { | ||
|
||
private final PlatformReceiver platformReceiver; | ||
|
||
public RawTextAudience(PlatformReceiver platformReceiver) { | ||
this.platformReceiver = platformReceiver; | ||
} | ||
|
||
@Override | ||
public void sendMessage(@NotNull Identity source, @NotNull Component message, @NotNull MessageType type) { | ||
platformReceiver.sendMessage(message.toString()); | ||
} | ||
|
||
} |
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
11 changes: 11 additions & 0 deletions
11
litecommands-core/src/dev/rollczi/litecommands/platform/PlatformReceiver.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,11 @@ | ||
package dev.rollczi.litecommands.platform; | ||
|
||
import org.jetbrains.annotations.ApiStatus; | ||
|
||
@ApiStatus.Experimental | ||
public interface PlatformReceiver { | ||
|
||
@ApiStatus.Experimental | ||
Comparable<Void> sendMessage(String message); | ||
|
||
} |