Skip to content

Commit eff4e82

Browse files
Update to 1.11
1 parent b9ae5b7 commit eff4e82

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import org.apache.tools.ant.filters.ReplaceTokens
22

33
buildscript {
4-
ext.kotlin_version = '1.0.0'
4+
ext.kotlin_version = '1.0.5-2'
55

66
repositories {
77
mavenCentral()
@@ -25,7 +25,7 @@ apply plugin: 'kotlin'
2525
group = 'gg.obsidian'
2626
version = '1.0.1'
2727
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'
2929

3030
sourceCompatibility = 1.8
3131
targetCompatibility = 1.8
@@ -41,7 +41,7 @@ repositories {
4141
}
4242

4343
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'
4545
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version:'1.0.0-rc-1036'
4646
compile group: 'net.dv8tion', name: 'JDA', version:'1.3.0_188'
4747
compile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.2.0'

src/main/kotlin/gg/obsidian/discoursewhitelist/Plugin.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ class Plugin : JavaPlugin(), Listener {
3535
@EventHandler
3636
fun onLogin(e: PlayerLoginEvent) {
3737
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)) {
4040
val message = ChatColor.translateAlternateColorCodes('&', configuration.MESSAGE)
4141
e.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, message)
4242
}
@@ -53,7 +53,7 @@ class Plugin : JavaPlugin(), Listener {
5353
configuration.load()
5454
}
5555

56-
private fun getDiscordGroupIds(username: String): Set<Int> {
56+
private fun getDiscourseGroupIds(username: String): Set<Int> {
5757
val url = configuration.DISCOURSE_URL + "/users/" + username + ".json"
5858
val request = Request.Builder().url(url).get().build()
5959
val response = httpClient.newCall(request).execute()

0 commit comments

Comments
 (0)