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
import kotlin.properties.ReadOnlyProperty | |
import kotlin.reflect.KProperty | |
/** | |
* Helper class that allows you to specify a [prefix] for your whole config. | |
* | |
* Is intended to be used via composition or via inheritance | |
*/ | |
public open class EnvironmentConfig internal constructor(private val prefix: String) { |
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
package org.wlosp.varo; | |
import com.google.common.base.Preconditions; | |
import org.bukkit.configuration.InvalidConfigurationException; | |
import org.bukkit.configuration.file.FileConfiguration; | |
import org.bukkit.configuration.file.YamlConfiguration; | |
import org.bukkit.configuration.serialization.ConfigurationSerializable; | |
import java.io.IOException; | |
import java.nio.ByteBuffer; |
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
import java.util.Properties | |
import java.nio.file.Files | |
val localProperties = Properties() | |
val localPropertiesFile = rootProject.file("local.properties").toPath() | |
if (Files.exists(localPropertiesFile)) { | |
Files.newBufferedReader(localPropertiesFile).use { reader -> | |
localProperties.load(reader) | |
} | |
} |
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
/* | |
* Copyright 2020 Michael Rittmeister | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
# java.lang.NullPointerException | |
# at net.guterdeveloper.luckyblocksbattle.LuckyBlocksBattle.initVoting(LuckyBlocksBattle.java:59) -[?:?] | |
# at net.guterdeveloper.luckyblocksbattle.LuckyBlocksBattle.init(LuckyBlocksBattle.java:48) ~[?:?] | |
# at net.guterdeveloper.luckyblocksbattle.LuckyBlocksBattle.onEnable(LuckyBlocksBattle.java:43) -[?:?] | |
# at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[server.jar:git-Spigot-dbóde12-18fbb24] |
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
import java.nio.file.Files | |
import java.nio.file.Paths | |
Files.walk(Paths.get("lib/"), Integer.MAX_VALUE).forEach { | |
if (!Files.isDirectory(it)) { | |
val oldName = it.toFile().name | |
val newName = if (oldName.isPotentialPascalCase) { | |
oldName.pascalCase() | |
} else oldName | |
Files.move(it, it.parent.resolveSibling(newName.toString())) |
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
fds |
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
void main() { | |
var list = [1,2,3,4,5,6,7,78,9]; | |
print(list.sublist(0, list.length)); | |
print(list.sublist(0, list.length - 1)); | |
} |
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
void main() { | |
var list = [1,2,3,4,5,6,7,78,9]; | |
print(list.sublist(0, list.length)); | |
print(list.sublist(0, list.length - 1)); | |
} |
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
{ | |
"json": "TOKEN", | |
"database": { | |
"host": "localhost", | |
"user": "rulesbot", | |
"database": "rules_bot", | |
"password": "IfYouReadThatYouAreDumb" | |
}, | |
"statuspage": null, | |
"botlists": null |