Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e8a881b51 | ||
|
|
8bb9bafb8b | ||
|
|
74f14f139c | ||
|
|
45b2fbe977 | ||
|
|
df04f51d60 | ||
|
|
5b35094d27 | ||
|
|
927563f749 | ||
|
|
225bafeaaa |
No files matched your search
@@ -25,7 +25,7 @@ jobs:
|
||||
command: gradle build
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: MiniPlaceholders
|
||||
path: build/libs/MiniPlaceholders.jar
|
||||
path: build/libs/MiniPlaceholders-*.jar
|
||||
@@ -3,16 +3,11 @@ plugins {
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("net.kyori:adventure-api:4.11.0")
|
||||
compileOnly("net.kyori:adventure-text-minimessage:4.11.0")
|
||||
compileOnly("net.kyori:adventure-text-serializer-legacy:4.11.0")
|
||||
compileOnly(project(":miniplaceholders-connect"))
|
||||
implementation("com.google.code.gson:gson:2.9.1")
|
||||
testImplementation(platform("org.junit:junit-bom:5.8.1"))
|
||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||
testImplementation("net.kyori:adventure-api:4.11.0")
|
||||
|
||||
@@ -2,7 +2,6 @@ package me.dreamerzero.miniplaceholders.api;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import org.jetbrains.annotations.Contract;
|
||||
@@ -14,6 +13,8 @@ import me.dreamerzero.miniplaceholders.connect.InternalPlatform;
|
||||
import net.kyori.adventure.audience.Audience;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
/**
|
||||
* MiniPlaceholders
|
||||
*
|
||||
@@ -36,9 +37,11 @@ public final class MiniPlaceholders {
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static @NotNull Platform getPlatform() {
|
||||
return InternalPlatform.platform() == InternalPlatform.PAPER
|
||||
? Platform.PAPER
|
||||
: Platform.VELOCITY;
|
||||
switch (InternalPlatform.platform()) {
|
||||
case PAPER: return Platform.PAPER;
|
||||
case VELOCITY: return Platform.VELOCITY;
|
||||
default: return Platform.KRYPTON;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -73,7 +76,7 @@ public final class MiniPlaceholders {
|
||||
*/
|
||||
@Contract("null -> fail, !null -> !null")
|
||||
public static @NotNull TagResolver getAudiencePlaceholders(final @NotNull Audience audience) {
|
||||
Objects.requireNonNull(audience, () -> "audience cannot be null");
|
||||
requireNonNull(audience, "audience cannot be null");
|
||||
|
||||
final TagResolver.Builder resolvers = TagResolver.builder();
|
||||
for (Expansion expansion : expansions) {
|
||||
@@ -97,8 +100,8 @@ public final class MiniPlaceholders {
|
||||
*/
|
||||
@Contract("_, null -> fail; null, _ -> fail; !null, !null -> !null")
|
||||
public static @NotNull TagResolver getRelationalPlaceholders(final @NotNull Audience audience, final @NotNull Audience otherAudience) {
|
||||
Objects.requireNonNull(audience, () -> "audience cannot be null");
|
||||
Objects.requireNonNull(otherAudience, () -> "otherAudience cannot be null");
|
||||
requireNonNull(audience, "audience cannot be null");
|
||||
requireNonNull(otherAudience, "otherAudience cannot be null");
|
||||
|
||||
final TagResolver.Builder builder = TagResolver.builder();
|
||||
for (final Expansion expansion : expansions) {
|
||||
@@ -131,7 +134,7 @@ public final class MiniPlaceholders {
|
||||
*/
|
||||
@Contract("_, null -> fail; null, _ -> fail; !null, !null -> !null")
|
||||
public static @NotNull TagResolver getAudienceGlobalPlaceholders(final @NotNull Audience audience) {
|
||||
Objects.requireNonNull(audience, () -> "audience cannot be null");
|
||||
requireNonNull(audience, "audience cannot be null");
|
||||
final TagResolver.Builder builder = TagResolver.builder();
|
||||
|
||||
for (final Expansion expansion : expansions) {
|
||||
@@ -165,8 +168,8 @@ public final class MiniPlaceholders {
|
||||
*/
|
||||
@Contract("_, null -> fail; null, _ -> fail; !null, !null -> !null")
|
||||
public static @NotNull TagResolver getRelationalGlobalPlaceholders(final @NotNull Audience audience, final @NotNull Audience otherAudience) {
|
||||
Objects.requireNonNull(audience, () -> "audience cannot be null");
|
||||
Objects.requireNonNull(otherAudience, () -> "otherAudience cannot be null");
|
||||
requireNonNull(audience, "audience cannot be null");
|
||||
requireNonNull(otherAudience, "otherAudience cannot be null");
|
||||
|
||||
final TagResolver.Builder builder = TagResolver.builder();
|
||||
for (final Expansion expansion : expansions) {
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
package me.dreamerzero.miniplaceholders.api.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import me.dreamerzero.miniplaceholders.api.enums.Platform;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface Extension {
|
||||
String name();
|
||||
|
||||
Platform[] platform();
|
||||
|
||||
String version() default "";
|
||||
}
|
||||
-63
@@ -1,63 +0,0 @@
|
||||
package me.dreamerzero.miniplaceholders.api.annotation.processor;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import javax.annotation.processing.AbstractProcessor;
|
||||
import javax.annotation.processing.ProcessingEnvironment;
|
||||
import javax.annotation.processing.RoundEnvironment;
|
||||
import javax.annotation.processing.SupportedAnnotationTypes;
|
||||
import javax.lang.model.element.Element;
|
||||
import javax.lang.model.element.ElementKind;
|
||||
import javax.lang.model.element.Name;
|
||||
import javax.lang.model.element.TypeElement;
|
||||
import javax.tools.Diagnostic;
|
||||
import javax.tools.FileObject;
|
||||
import javax.tools.StandardLocation;
|
||||
|
||||
import me.dreamerzero.miniplaceholders.api.annotation.Extension;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.util.Set;
|
||||
|
||||
@SupportedAnnotationTypes({"me.dreamerzero.miniplaceholders.api.annotation.Extension"})
|
||||
public class ExtensionAnnotationProcessor extends AbstractProcessor {
|
||||
private ProcessingEnvironment environment;
|
||||
|
||||
@Override
|
||||
public synchronized void init(ProcessingEnvironment processingEnv) {
|
||||
this.environment = processingEnv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
|
||||
if (roundEnv.processingOver()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (Element element : roundEnv.getElementsAnnotatedWith(Extension.class)) {
|
||||
if (element.getKind() != ElementKind.CLASS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Extension extension = element.getAnnotation(Extension.class);
|
||||
Name name = ((TypeElement) element).getQualifiedName();
|
||||
|
||||
try {
|
||||
FileObject object = environment.getFiler()
|
||||
.createResource(StandardLocation.CLASS_OUTPUT, "", "miniplaceholders-extension.json");
|
||||
try (Writer writer = new BufferedWriter(object.openWriter())) {
|
||||
new Gson().toJson(new ProcessedExtension(
|
||||
extension.name(),
|
||||
extension.version(),
|
||||
name.toString(),
|
||||
extension.platform()),
|
||||
writer);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
environment.getMessager().printMessage(Diagnostic.Kind.ERROR, "Cannot generate extension file");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
package me.dreamerzero.miniplaceholders.api.annotation.processor;
|
||||
|
||||
import me.dreamerzero.miniplaceholders.api.enums.Platform;
|
||||
|
||||
public final class ProcessedExtension {
|
||||
private final String name;
|
||||
private final String version;
|
||||
private final Platform[] platforms;
|
||||
private final String clazz;
|
||||
|
||||
ProcessedExtension(String name, String version, String clazz, Platform... platforms) {
|
||||
this.name = name;
|
||||
this.version = version;
|
||||
this.platforms = platforms;
|
||||
this.clazz = clazz;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
public Platform[] getPlatforms() {
|
||||
return platforms;
|
||||
}
|
||||
public String getClazz() {
|
||||
return this.clazz;
|
||||
}
|
||||
}
|
||||
@@ -5,5 +5,7 @@ public enum Platform {
|
||||
/**Paper Platform */
|
||||
PAPER,
|
||||
/**Velocity Platform */
|
||||
VELOCITY
|
||||
VELOCITY,
|
||||
/**Krypton Platform */
|
||||
KRYPTON;
|
||||
}
|
||||
@@ -1,12 +1,10 @@
|
||||
module me.dreamerzero.miniplaceholders.api {
|
||||
/** MiniPlaceholdes API Module */
|
||||
open module me.dreamerzero.miniplaceholders.api {
|
||||
requires net.kyori.adventure;
|
||||
requires net.kyori.examination.api;
|
||||
requires net.kyori.adventure.text.minimessage;
|
||||
requires static org.jetbrains.annotations;
|
||||
requires me.dreamerzero.miniplaceholders.connect;
|
||||
requires java.base;
|
||||
requires java.compiler;
|
||||
requires com.google.gson;
|
||||
|
||||
exports me.dreamerzero.miniplaceholders.api;
|
||||
exports me.dreamerzero.miniplaceholders.api.enums;
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
me.dreamerzero.miniplaceholders.api.annotation.processor.ExtensionAnnotationProcessor
|
||||
+4
-9
@@ -6,14 +6,7 @@ plugins {
|
||||
}
|
||||
|
||||
allprojects {
|
||||
apply(plugin = "java")
|
||||
group = "me.dreamerzero.miniplaceholders"
|
||||
version = "1.2.0"
|
||||
description = "MiniPlaceholders"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
apply<JavaPlugin>()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -22,10 +15,12 @@ dependencies {
|
||||
shadow(project(":miniplaceholders-common"))
|
||||
shadow(project(":miniplaceholders-velocity"))
|
||||
shadow(project(":miniplaceholders-paper", "reobf"))
|
||||
shadow(project(":miniplaceholders-krypton"))
|
||||
}
|
||||
|
||||
subprojects {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://papermc.io/repo/repository/maven-public/")
|
||||
maven("https://repo.maven.apache.org/maven2/")
|
||||
}
|
||||
@@ -33,7 +28,7 @@ subprojects {
|
||||
|
||||
tasks {
|
||||
shadowJar {
|
||||
archiveFileName.set("MiniPlaceholders.jar")
|
||||
archiveFileName.set("MiniPlaceholders-$version.jar")
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
configurations = listOf(project.configurations.shadow.get())
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ dependencies {
|
||||
compileOnly("com.mojang:brigadier:1.0.18")
|
||||
}
|
||||
|
||||
blossom {
|
||||
replaceToken("{version}", version)
|
||||
blossom{
|
||||
replaceToken("{version}", project.version)
|
||||
replaceTokenIn("src/main/java/me/dreamerzero/miniplaceholders/common/PluginConstants.java")
|
||||
}
|
||||
|
||||
@@ -24,4 +24,10 @@ tasks {
|
||||
|
||||
options.release.set(17)
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes("Automatic-Module-Name" to "me.dreamerzero.miniplaceholders.common")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package me.dreamerzero.miniplaceholders.extension;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.DirectoryStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import me.dreamerzero.miniplaceholders.api.annotation.Extension;
|
||||
|
||||
public final class Loader {
|
||||
private Loader() {}
|
||||
public static Extension[] loadExtensions(Path extensionsPath) {
|
||||
List<Extension> extensions = new ArrayList<>();
|
||||
try (DirectoryStream<Path> stream = Files.newDirectoryStream(extensionsPath, (file) -> file.toString().endsWith(".jar"))) {
|
||||
for (Path ext : stream) {
|
||||
|
||||
}
|
||||
} catch(IOException e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package me.dreamerzero.miniplaceholders.connect;
|
||||
|
||||
public enum InternalPlatform {
|
||||
|
||||
PAPER, VELOCITY;
|
||||
PAPER, VELOCITY, KRYPTON;
|
||||
|
||||
private static InternalPlatform actualPlatform;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
module me.dreamerzero.miniplaceholders.connect {
|
||||
//TODO: exports to
|
||||
exports me.dreamerzero.miniplaceholders.connect;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
group = me.dreamerzero.miniplaceholders
|
||||
version = 1.3.0
|
||||
description = MiniPlaceholders
|
||||
@@ -0,0 +1,13 @@
|
||||
repositories {
|
||||
maven("https://repo.kryptonmc.org/releases")
|
||||
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
|
||||
maven("https://repo.kryptonmc.org/snapshots")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("org.kryptonmc:krypton-server:0.66.3")
|
||||
annotationProcessor("org.kryptonmc:annotation-processor:0.66.2")
|
||||
compileOnly(project(":miniplaceholders-common"))
|
||||
compileOnly(project(":miniplaceholders-api"))
|
||||
compileOnly(project(":miniplaceholders-connect"))
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package me.dreamerzero.miniplaceholders.krypton;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.kryptonmc.api.Server;
|
||||
import org.kryptonmc.api.command.BrigadierCommand;
|
||||
import org.kryptonmc.api.command.Sender;
|
||||
import org.kryptonmc.api.entity.player.Player;
|
||||
import org.kryptonmc.api.event.Listener;
|
||||
import org.kryptonmc.api.event.server.ServerStartEvent;
|
||||
import org.kryptonmc.api.plugin.annotation.Plugin;
|
||||
import org.kryptonmc.krypton.KryptonServer;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import me.dreamerzero.miniplaceholders.api.Expansion;
|
||||
import me.dreamerzero.miniplaceholders.api.utils.TagsUtils;
|
||||
import me.dreamerzero.miniplaceholders.common.PlaceholdersCommand;
|
||||
import me.dreamerzero.miniplaceholders.common.PlaceholdersPlugin;
|
||||
import me.dreamerzero.miniplaceholders.common.PluginConstants;
|
||||
import me.dreamerzero.miniplaceholders.connect.InternalPlatform;
|
||||
import me.lucko.spark.api.statistic.StatisticWindow;
|
||||
|
||||
@Plugin(
|
||||
name = "MiniPlaceholders",
|
||||
id = "miniplaceholders",
|
||||
version = PluginConstants.VERSION,
|
||||
authors = {"4drian3d"}
|
||||
)
|
||||
public class JavaKryptonPlugin implements PlaceholdersPlugin {
|
||||
private final KryptonServer server;
|
||||
private final Logger logger;
|
||||
|
||||
@Inject
|
||||
public JavaKryptonPlugin(Server server, Logger logger) {
|
||||
this.logger = logger;
|
||||
this.server = (KryptonServer)server;
|
||||
}
|
||||
|
||||
@Listener
|
||||
public void onServerStart(ServerStartEvent event) {
|
||||
logger.info("Starting MiniPlaceholders Krypton");
|
||||
|
||||
InternalPlatform.platform(InternalPlatform.KRYPTON);
|
||||
|
||||
this.loadDefaultExpansions();
|
||||
this.registerPlatformCommand();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadDefaultExpansions() {
|
||||
Expansion.builder("server")
|
||||
.globalPlaceholder("total_entities", (queue, ctx) -> {
|
||||
int entityCount = 0;
|
||||
for (var entry : server.getWorldManager().getWorlds().entrySet()) {
|
||||
entityCount += entry.getValue().entities().size();
|
||||
}
|
||||
return TagsUtils.staticTag(Component.text(entityCount));
|
||||
})
|
||||
.globalPlaceholder("total_chunks", (queque, ctx) -> {
|
||||
int chunkCount = 0;
|
||||
for(var entry : server.getWorldManager().getWorlds().entrySet()) {
|
||||
chunkCount += entry.getValue().chunks().size();
|
||||
}
|
||||
return TagsUtils.staticTag(Component.text(chunkCount));
|
||||
})
|
||||
.globalPlaceholder("name", TagsUtils.staticTag(server.getPlatform().getName()))
|
||||
.globalPlaceholder("online", (queue, ctx) -> TagsUtils.staticTag(Component.text(server.getPlayers().size())))
|
||||
.globalPlaceholder("version", TagsUtils.staticTag(server.getPlatform().getVersion()))
|
||||
.globalPlaceholder("max_players", TagsUtils.staticTag(Component.text(server.getMaxPlayers())))
|
||||
.globalPlaceholder("has_whitelist", (queue, ctx) -> TagsUtils.staticTag(Component.text(server.getPlayerManager().getWhitelistEnabled())))
|
||||
.globalPlaceholder("tps_1", (queue, ctx) -> TagsUtils.staticTag(Component.text(server.getSpark().tps().poll(StatisticWindow.TicksPerSecond.MINUTES_1))))
|
||||
.globalPlaceholder("tps_5", (queue, ctx) -> TagsUtils.staticTag(Component.text(server.getSpark().tps().poll(StatisticWindow.TicksPerSecond.MINUTES_5))))
|
||||
.globalPlaceholder("tps_15", (queue, ctx) -> TagsUtils.staticTag(Component.text(server.getSpark().tps().poll(StatisticWindow.TicksPerSecond.MINUTES_15))))
|
||||
.globalPlaceholder("mspt", (queue, ctx) -> TagsUtils.staticTag(Component.text(server.getSpark().mspt().poll(StatisticWindow.MillisPerTick.SECONDS_10).mean())))
|
||||
.build()
|
||||
.register();
|
||||
}
|
||||
|
||||
private static final PlainTextComponentSerializer SERIALIZER = PlainTextComponentSerializer.plainText();
|
||||
|
||||
@Override
|
||||
public void registerPlatformCommand() {
|
||||
final PlaceholdersCommand<Sender> command = new PlaceholdersCommand<>(
|
||||
() -> server.getPlayers()
|
||||
.stream()
|
||||
.map(Player::name)
|
||||
.map(SERIALIZER::serialize)
|
||||
.toList(),
|
||||
server::player);
|
||||
final BrigadierCommand brigadierCMD = BrigadierCommand.of(command.placeholderTestCommand("miniplaceholders"));
|
||||
|
||||
server.getCommandManager().register(brigadierCMD);
|
||||
}
|
||||
}
|
||||
@@ -11,15 +11,13 @@ dependencies {
|
||||
paperDevBundle("1.19.1-R0.1-SNAPSHOT")
|
||||
}
|
||||
|
||||
val pluginVersion: String = version as String
|
||||
|
||||
bukkit {
|
||||
name = "MiniPlaceholders"
|
||||
main = "me.dreamerzero.miniplaceholders.paper.PaperPlugin"
|
||||
apiVersion = "1.18"
|
||||
website = "https://github.com/4drian3d/MiniPlaceholders"
|
||||
authors = listOf("4drian3d")
|
||||
version = pluginVersion
|
||||
version = project.version as String
|
||||
}
|
||||
|
||||
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
||||
@@ -36,5 +34,10 @@ tasks {
|
||||
runServer {
|
||||
minecraftVersion("1.19.1")
|
||||
}
|
||||
jar {
|
||||
manifest {
|
||||
attributes("Automatic-Module-Name" to "me.dreamerzero.miniplaceholders.paper")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import java.text.DecimalFormat;
|
||||
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import io.papermc.paper.datapack.Datapack;
|
||||
@@ -20,7 +19,7 @@ import net.kyori.adventure.text.minimessage.tag.Tag;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
public final class PaperPlugin extends JavaPlugin implements PlaceholdersPlugin, Listener {
|
||||
public final class PaperPlugin extends JavaPlugin implements PlaceholdersPlugin {
|
||||
private final DecimalFormat tpsFormat = new DecimalFormat("###.##");
|
||||
private final DecimalFormat msptFormat = new DecimalFormat("###.###");
|
||||
|
||||
@@ -28,7 +27,6 @@ public final class PaperPlugin extends JavaPlugin implements PlaceholdersPlugin,
|
||||
public void onEnable(){
|
||||
this.getSLF4JLogger().info("Starting MiniPlaceholders Paper");
|
||||
InternalPlatform.platform(InternalPlatform.PAPER);
|
||||
this.getServer().getPluginManager().registerEvents(this, this);
|
||||
|
||||
tpsFormat.setRoundingMode(RoundingMode.HALF_UP);
|
||||
msptFormat.setRoundingMode(RoundingMode.HALF_UP);
|
||||
@@ -77,7 +75,7 @@ public final class PaperPlugin extends JavaPlugin implements PlaceholdersPlugin,
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({"sonarlint(java:s1874)", "deprecation", /*TODO: replace with Java(536871800) */ "all"})
|
||||
@SuppressWarnings({"sonarlint(java:s1874)", /*TODO: replace with Java(536871800) */ "all"})
|
||||
public void registerPlatformCommand() {
|
||||
MinecraftServer.getServer()
|
||||
.vanillaCommandDispatcher
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ pluginManagement {
|
||||
|
||||
rootProject.name = "miniplaceholders-parent"
|
||||
|
||||
val modules = listOf("connect", "api", "common", "paper", "velocity")
|
||||
val modules = listOf("connect", "api", "common", "paper", "velocity", "krypton")
|
||||
|
||||
modules.forEach {
|
||||
include("miniplaceholders-$it")
|
||||
|
||||
@@ -8,8 +8,16 @@ dependencies {
|
||||
|
||||
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
||||
|
||||
tasks.compileJava {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
tasks {
|
||||
compileJava {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
|
||||
options.release.set(17)
|
||||
}
|
||||
options.release.set(17)
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes("Automatic-Module-Name" to "me.dreamerzero.miniplaceholders.velocity")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user