Skip to content

Commit 6182409

Browse files
committed
Fixed bugs.
1 parent 40121a1 commit 6182409

File tree

4 files changed

+32
-9
lines changed

4 files changed

+32
-9
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
![](http://mc3.roselle.vip:602/FastScript/big_logo.gif)
2-
>The idea of the LOGO comes from @Arasple's TrMenu.
2+
[<img src="https://img.shields.io/discord/760802420552105995?label=Discord&style=for-the-badge"/>](https://discord.gg/GVM6vx9)
3+
[<img src="https://img.shields.io/github/issues/Score2/FastScript?style=for-the-badge"/>](https://github.com/Score2/FastScript/issues)
4+
[<img src="https://img.shields.io/github/issues-pr/Score2/FastScript?style=for-the-badge"/>](https://github.com/Score2/FastScript/pulls)
5+
[<img src="https://img.shields.io/github/license/Score2/FastScript?style=for-the-badge"/>](https://github.com/Score2/FastScript/blob/master/LICENSE)
6+
[<img src="https://img.shields.io/github/last-commit/Score2/FastScript?style=for-the-badge"/>](https://github.com/Score2/FastScript/commits/master)
7+
[<img src="https://img.shields.io/bstats/servers/9014?label=BSTATS-SERVERS&style=for-the-badge"/>](https://bstats.org/plugin/bukkit/FastScript/9014)
38
***
49
### About
510
FastScript is a Spigot plugin, which can run JavaScript-based scripts more efficiently.

build.gradle

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1+
buildscript {
2+
repositories {
3+
mavenCentral()
4+
jcenter()
5+
}
6+
dependencies {
7+
classpath("com.github.jengelman.gradle.plugins:shadow:5.2.0")
8+
}
9+
}
110
plugins {
211
id 'org.jetbrains.kotlin.jvm' version '1.4.10'
3-
id 'com.github.johnrengelman.shadow' version '2.0.4'
12+
id 'com.github.johnrengelman.shadow' version '5.2.0'
413
}
514

615
group 'me.scoretwo'
@@ -30,17 +39,20 @@ dependencies {
3039
implementation "org.spigotmc:spigot-api:1.16.3-R0.1-SNAPSHOT"
3140
implementation "net.md-5:bungeecord-api:1.16-R0.3"
3241
implementation "me.clip:placeholderapi:2.10.9"
42+
implementation fileTree(dir: 'libs', includes: ['*.jar'])
3343
}
3444

3545
shadowJar {
3646
dependencies {
37-
include("org.bstats:bstats-bukkit:1.7")
38-
include("commons-io:commons-io:2.7")
39-
include("com.alibaba:fastjson:1.2.9")
40-
include("org.jetbrains.kotlin:kotlin-stdlib")
41-
include("com.andreapivetta.kolor:kolor:1.0.0")
47+
include(dependency('org.bstats:bstats-bukkit:1.7'))
48+
include(dependency('commons-io:commons-io:2.7'))
49+
include(dependency('com.alibaba:fastjson:1.2.9'))
50+
include(dependency('org.jetbrains.kotlin:kotlin-stdlib'))
51+
include(dependency(fileTree(dir: 'libs', includes: ['*.jar'])))
4252
}
43-
relocate("org.bstats", "me.scoretwo.fastscript.bstats")
53+
relocate("org.bstats", "me.scoretwo.fastscript.libs.bstats")
54+
relocate("org.apache", "me.scoretwo.fastscript.libs.apache")
55+
archiveFileName = "${project.name}-${project.version}.jar"
4456
}
4557

4658
processResources {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

src/main/kotlin/me/scoretwo/fastscript/bungee/BungeeSection.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import me.scoretwo.fastscript.api.plugin.FastScriptMain
55
import net.md_5.bungee.api.ChatColor
66
import net.md_5.bungee.api.CommandSender
77
import net.md_5.bungee.api.ProxyServer
8+
import net.md_5.bungee.api.chat.TextComponent
89
import net.md_5.bungee.api.plugin.Command
910
import net.md_5.bungee.api.plugin.Plugin
1011
import net.md_5.bungee.api.plugin.TabExecutor
@@ -44,7 +45,7 @@ class BungeeSection: Plugin(), FastScriptMain {
4445
}
4546

4647
override fun sendMessage(sender: Any, string: String, colorIndex: Boolean) {
47-
asSender(sender)?.sendMessage(if (colorIndex) translateStringColors(string) else string)
48+
asSender(sender)?.sendMessage(TextComponent(if (colorIndex) translateStringColors(string) else string))
4849
}
4950

5051
override fun hasPermission(sender: Any, string: String): Boolean {

0 commit comments

Comments
 (0)