-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #522 from TabooLib/dev/6.2.0-sky
Dev/6.2.0 sky
- Loading branch information
Showing
11 changed files
with
204 additions
and
38 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,8 @@ | ||
import taboolib.common5.FileWatcher | ||
import java.io.File | ||
|
||
fun main() { | ||
FileWatcher.INSTANCE.addSimpleListener(File("test.txt")) { | ||
println("change") | ||
} | ||
} |
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
25 changes: 25 additions & 0 deletions
25
module/minecraft/minecraft-i18n/src/main/kotlin/taboolib/module/lang/ColorTransfer.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,25 @@ | ||
package taboolib.module.lang | ||
|
||
import taboolib.common.platform.ProxyCommandSender | ||
import taboolib.module.chat.HexColor | ||
import taboolib.module.chat.colored | ||
|
||
/** | ||
* 颜色转换 | ||
*/ | ||
object ColorTransfer : TextTransfer { | ||
|
||
/** | ||
* 是否启用颜色模块 | ||
*/ | ||
val isSupported = try { | ||
HexColor.translate("") | ||
true | ||
} catch (_: NoClassDefFoundError) { | ||
false | ||
} | ||
|
||
override fun translate(sender: ProxyCommandSender, source: String, vararg args: Any): String { | ||
return source.colored() | ||
} | ||
} |
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.