File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
src/main/kotlin/gg/obsidian/discoursewhitelist Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
import org.apache.tools.ant.filters.ReplaceTokens
2
2
3
3
buildscript {
4
- ext. kotlin_version = ' 1.0.0 '
4
+ ext. kotlin_version = ' 1.0.5-2 '
5
5
6
6
repositories {
7
7
mavenCentral()
@@ -25,7 +25,7 @@ apply plugin: 'kotlin'
25
25
group = ' gg.obsidian'
26
26
version = ' 1.0.1'
27
27
description = """ Use Discourse group as a whitelist"""
28
- ext. url = ' https://github.com/the-obsidian/DiscordBridge '
28
+ ext. url = ' https://github.com/the-obsidian/DiscourseBridge '
29
29
30
30
sourceCompatibility = 1.8
31
31
targetCompatibility = 1.8
@@ -41,7 +41,7 @@ repositories {
41
41
}
42
42
43
43
dependencies {
44
- compile group : ' org.spigotmc' , name : ' spigot-api' , version :' 1.8.8 -R0.1-SNAPSHOT'
44
+ compile group : ' org.spigotmc' , name : ' spigot-api' , version :' 1.11 -R0.1-SNAPSHOT'
45
45
compile group : ' org.jetbrains.kotlin' , name : ' kotlin-stdlib' , version :' 1.0.0-rc-1036'
46
46
compile group : ' net.dv8tion' , name : ' JDA' , version :' 1.3.0_188'
47
47
compile group : ' com.squareup.okhttp3' , name : ' okhttp' , version : ' 3.2.0'
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ class Plugin : JavaPlugin(), Listener {
35
35
@EventHandler
36
36
fun onLogin (e : PlayerLoginEvent ) {
37
37
if (configuration.GROUP_ID != 0 ) {
38
- val discourdGroups = getDiscordGroupIds (e.player.name)
39
- if (! discourdGroups .contains(configuration.GROUP_ID )) {
38
+ val disourseGroups = getDiscourseGroupIds (e.player.name)
39
+ if (! disourseGroups .contains(configuration.GROUP_ID )) {
40
40
val message = ChatColor .translateAlternateColorCodes(' &' , configuration.MESSAGE )
41
41
e.disallow(PlayerLoginEvent .Result .KICK_WHITELIST , message)
42
42
}
@@ -53,7 +53,7 @@ class Plugin : JavaPlugin(), Listener {
53
53
configuration.load()
54
54
}
55
55
56
- private fun getDiscordGroupIds (username : String ): Set <Int > {
56
+ private fun getDiscourseGroupIds (username : String ): Set <Int > {
57
57
val url = configuration.DISCOURSE_URL + " /users/" + username + " .json"
58
58
val request = Request .Builder ().url(url).get().build()
59
59
val response = httpClient.newCall(request).execute()
You can’t perform that action at this time.
0 commit comments