forked from Arasple/TrChat
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ [2.0.0-PRE-5] Improve Kether & Fix legacy eco hook & Support filter…
… before sending
- Loading branch information
1 parent
d9e54d5
commit b7ab826
Showing
16 changed files
with
137 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
group=me.arasple.mc.trchat | ||
version=2.0.0-PRE-4 | ||
version=2.0.0-PRE-5 |
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 |
---|---|---|
|
@@ -57,6 +57,7 @@ object TrChat : Plugin() { | |
Util.init() | ||
} | ||
|
||
|
||
Database.init() | ||
|
||
Loader.loadChannels(console()) | ||
|
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
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
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
33 changes: 33 additions & 0 deletions
33
src/main/kotlin/me/arasple/mc/trchat/module/internal/script/kether/ActionServer.kt
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,33 @@ | ||
package me.arasple.mc.trchat.module.internal.script.kether | ||
|
||
import me.arasple.mc.trchat.util.proxy.bungee.Bungees | ||
import taboolib.library.kether.ArgTypes | ||
import taboolib.library.kether.ParsedAction | ||
import taboolib.module.kether.* | ||
import java.util.concurrent.CompletableFuture | ||
|
||
/** | ||
* @author wlys | ||
* @since 2021/8/29 15:44 | ||
*/ | ||
class ActionServer(val server: ParsedAction<*>): ScriptAction<Void>() { | ||
|
||
override fun run(frame: ScriptFrame): CompletableFuture<Void> { | ||
val s = frame.script() | ||
if (s.sender == null) { | ||
error("No sender selected.") | ||
} | ||
frame.newFrame(server).run<Any>().thenAccept { server -> | ||
Bungees.sendBungeeData(s.sender!!.cast(), "Connect", server.toString()) | ||
} | ||
return CompletableFuture.completedFuture(null) | ||
} | ||
|
||
companion object { | ||
|
||
@KetherParser(["server", "bungee", "connect"], shared = true) | ||
fun parser() = scriptParser { | ||
ActionServer(it.next(ArgTypes.ACTION)) | ||
} | ||
} | ||
} |
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
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