Update development branch #1
4 arquivos alterados com 22 adições e 33 exclusões
45
build.gradle
45
build.gradle
|
|
@ -1,18 +1,7 @@
|
||||||
buildscript {
|
plugins {
|
||||||
repositories {
|
id "fabric-loom" version "0.6-SNAPSHOT"
|
||||||
jcenter()
|
|
||||||
maven {
|
|
||||||
name = "Fabric"
|
|
||||||
url = "https://maven.fabricmc.net/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath 'net.fabricmc:fabric-loom:0.6-SNAPSHOT'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: "fabric-loom"
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
jcenter()
|
jcenter()
|
||||||
|
|
@ -31,23 +20,23 @@ dependencies {
|
||||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||||
|
|
||||||
implementation 'com.google.code.gson:gson:2.8.6'
|
implementation include("org.xerial:sqlite-jdbc:3.34.0")
|
||||||
|
implementation include('net.dv8tion:JDA:4.2.0_231') {
|
||||||
compile "org.apache.logging.log4j:log4j-slf4j-impl:2.8.1"
|
|
||||||
compile "org.xerial:sqlite-jdbc:3.34.0"
|
|
||||||
compile('net.dv8tion:JDA:4.2.0_229') {
|
|
||||||
exclude module: 'opus-java'
|
exclude module: 'opus-java'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
include "net.sf.trove4j:trove4j:3.0.3"
|
||||||
|
include 'org.slf4j:slf4j-nop:1.7.25'
|
||||||
task incrementBuildNumber {
|
include 'org.slf4j:slf4j-api:1.7.25'
|
||||||
doFirst {
|
include 'org.apache.commons:commons-collections4:4.1'
|
||||||
config.build_number = (config.build_number.toString().toInteger()) + 1
|
include 'com.neovisionaries:nv-websocket-client:2.10'
|
||||||
configFile.withWriter {
|
include 'com.squareup.okhttp3:okhttp:3.13.0'
|
||||||
config.toProperties().store(it, "")
|
include 'com.squareup.okio:okio:1.17.2'
|
||||||
}
|
include 'com.fasterxml.jackson.core:jackson-databind:2.10.1'
|
||||||
|
include 'com.fasterxml.jackson.core:jackson-annotations:2.10.1'
|
||||||
|
include 'com.fasterxml.jackson.core:jackson-core:2.10.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
compileJava {
|
compileJava {
|
||||||
|
|
@ -79,10 +68,10 @@ tasks.withType(JavaCompile) {
|
||||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||||
// if it is present.
|
// if it is present.
|
||||||
// If you remove this task, sources will not be generated.
|
// If you remove this task, sources will not be generated.
|
||||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
/*task sourcesJar(type: Jar, dependsOn: classes) {
|
||||||
classifier = "sources"
|
classifier = "sources"
|
||||||
from sourceSets.main.allSource
|
from sourceSets.main.allSource
|
||||||
}
|
}*/
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
from "LICENSE"
|
from "LICENSE"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx1G
|
||||||
minecraft_version=21w08b
|
minecraft_version=21w08b
|
||||||
yarn_mappings=21w08b+build.2
|
yarn_mappings=21w08b+build.2
|
||||||
loader_version=0.11.2
|
loader_version=0.11.2
|
||||||
mod_version=0.1.1
|
mod_version=0.1.3
|
||||||
maven_group=com.awakenedredstone
|
maven_group=com.awakenedredstone
|
||||||
archives_base_name=autowhitelist
|
archives_base_name=autowhitelist
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ public class AutoWhitelist implements ModInitializer {
|
||||||
public static final Logger logger = LogManager.getLogger("AutoWhitelist");
|
public static final Logger logger = LogManager.getLogger("AutoWhitelist");
|
||||||
public static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();
|
public static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();
|
||||||
|
|
||||||
private static final File configFile = new File(config.getConfigDirectory(), "auto-whitelist.json");
|
private static final File configFile = new File(config.getConfigDirectory(), "AutoWhitelist.json");
|
||||||
|
|
||||||
public static ConfigData getConfigData() {
|
public static ConfigData getConfigData() {
|
||||||
return config.getConfigData();
|
return config.getConfigData();
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ public class Config {
|
||||||
|
|
||||||
private JsonObject config;
|
private JsonObject config;
|
||||||
private ConfigData configData;
|
private ConfigData configData;
|
||||||
private final File configFile = new File(getConfigDirectory(), "auto-whitelist.json");
|
private final File configFile = new File(getConfigDirectory(), "AutoWhitelist.json");
|
||||||
|
|
||||||
public File getConfigDirectory() {
|
public File getConfigDirectory() {
|
||||||
return new File(".", "config");
|
return new File(".", "config");
|
||||||
|
|
@ -36,8 +36,8 @@ public class Config {
|
||||||
JsonObject json = new JsonObject();
|
JsonObject json = new JsonObject();
|
||||||
json.add("whitelistAutoUpdateDelaySeconds", new JsonPrimitive(60L));
|
json.add("whitelistAutoUpdateDelaySeconds", new JsonPrimitive(60L));
|
||||||
json.add("prefix", new JsonPrimitive("np!"));
|
json.add("prefix", new JsonPrimitive("np!"));
|
||||||
json.add("token", new JsonPrimitive("discord-token"));
|
json.add("token", new JsonPrimitive("bot-token"));
|
||||||
json.add("applicationId", new JsonPrimitive("application-id"));
|
json.add("clientId", new JsonPrimitive("client-id"));
|
||||||
json.add("discordServerId", new JsonPrimitive("discord-server-id"));
|
json.add("discordServerId", new JsonPrimitive("discord-server-id"));
|
||||||
JsonObject whitelistJson = JsonHelper.getNestedObject(json, "whitelist", true);
|
JsonObject whitelistJson = JsonHelper.getNestedObject(json, "whitelist", true);
|
||||||
if (whitelistJson == null) {
|
if (whitelistJson == null) {
|
||||||
|
|
|
||||||
Referência em uma nova issue