Gradle @broccolai

This commit is contained in:
Draycia committed 2020-07-18 03:11:38 -07:00
1 parent 6f28851211
commit f54a71a25b
34 files changed
+676 -470

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath "me.bristermitten:pdm-gradle:0.0.1"
}
}
apply plugin: 'me.bristermitten.pdm'
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
pdm 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72' //This will be added to the dependencies.json
providedCompile project(':SimpleChat')
}
jar.dependsOn project.tasks.getByName('pdm') // Always run the pdm task when we build
description = 'SimpleChatModeration'
-99
View File
@@ -1,99 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>SimpleChatParent</artifactId>
<groupId>net.draycia</groupId>
<version>1.0</version>
</parent>
<artifactId>SimpleChatModeration</artifactId>
<packaging>jar</packaging>
<name>SimpleChatModeration</name>
<build>
<defaultGoal>clean package</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>testCompile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.16.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.draycia</groupId>
<artifactId>SimpleChat</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.7</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
@@ -24,14 +24,14 @@ public class ClearChatCommand extends BaseCommand {
@Default
public void baseCommand(CommandIssuer issuer) {
String format = moderation.getConfig().getString("clear-chat.message", "");
Component component = moderation.getSimpleChat().processMessage(format, "br", "\n");
Component component = moderation.getSimpleChat().getAdventureManager().processMessage(format, "br", "\n");
for (Player player : Bukkit.getOnlinePlayers()) {
if (player.hasPermission("simplechat.clearchat.exempt")) {
continue;
}
Audience audience = moderation.getSimpleChat().getAudiences().player(player);
Audience audience = moderation.getSimpleChat().getAdventureManager().getAudiences().player(player);
for (int i = 0; i < moderation.getConfig().getInt("clear-chat.message-count", 100); i++) {
audience.sendMessage(component);
@@ -41,12 +41,12 @@ public class ClearChatCommand extends BaseCommand {
if (player.hasPermission("simplechat.clearchat.notify")) {
String message = moderation.getConfig().getString("language.clear-notify");
audience.sendMessage(moderation.getSimpleChat().processMessage(message, "player", name));
audience.sendMessage(moderation.getSimpleChat().getAdventureManager().processMessage(message, "player", name));
}
if (player.hasPermission("simplechat.clearchat.exempt")) {
String message = moderation.getConfig().getString("language.clear-exempt");
audience.sendMessage(moderation.getSimpleChat().processMessage(message, "player", name));
audience.sendMessage(moderation.getSimpleChat().getAdventureManager().processMessage(message, "player", name));
}
}
}
@@ -40,10 +40,10 @@ public class MuteCommand extends BaseCommand {
}
}
Component message = moderation.getSimpleChat().processMessage(format, "br", "\n",
Component message = moderation.getSimpleChat().getAdventureManager().processMessage(format, "br", "\n",
"player", targetUser.asOfflinePlayer().getName());
moderation.getSimpleChat().getAudiences().audience(sender).sendMessage(message);
moderation.getSimpleChat().getAdventureManager().getAudiences().audience(sender).sendMessage(message);
}
}
@@ -40,10 +40,10 @@ public class ShadowMuteCommand extends BaseCommand {
}
}
Component message = moderation.getSimpleChat().processMessage(format, "br", "\n",
Component message = moderation.getSimpleChat().getAdventureManager().processMessage(format, "br", "\n",
"player", targetUser.asOfflinePlayer().getName());
moderation.getSimpleChat().getAudiences().audience(sender).sendMessage(message);
moderation.getSimpleChat().getAdventureManager().getAudiences().audience(sender).sendMessage(message);
}
}