Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bdabc7536 | ||
|
|
ccd961d29c | ||
|
|
a136968d63 | ||
|
|
fadb057de3 | ||
|
|
fd4907ecfa | ||
|
|
79e4ea7ac8 | ||
|
|
bd6f15500d | ||
|
|
80b59fc9cf | ||
|
|
aeb1650fae | ||
|
|
ee5d0708ec | ||
|
|
9fad798af8 | ||
|
|
f3cbbfb2b5 | ||
|
|
4d1d5ca25e | ||
|
|
cd53aaf8e3 | ||
|
|
36a0ef0dfd | ||
|
|
232ed9be84 | ||
|
|
7e3d7d7918 |
No files matched your search
+9
-17
@@ -1,6 +1,6 @@
|
||||
# Installation
|
||||
|
||||
Latest version: `2.7.0`
|
||||
Latest version: `2.7.4`
|
||||
|
||||
## Gradle
|
||||
|
||||
@@ -10,13 +10,11 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
val scoreboardLibraryVersion = "{VERSION HERE}"
|
||||
implementation("net.megavex:scoreboard-library-api:$scoreboardLibraryVersion")
|
||||
runtimeOnly("net.megavex:scoreboard-library-implementation:$scoreboardLibraryVersion")
|
||||
implementation("net.megavex:scoreboard-library-extra-kotlin:$scoreboardLibraryVersion") // Kotlin specific extensions (optional)
|
||||
implementation("net.megavex:scoreboard-library-api:2.7.4")
|
||||
runtimeOnly("net.megavex:scoreboard-library-implementation:2.7.4")
|
||||
|
||||
// If targeting a Minecraft version without native Adventure support, add it as well:
|
||||
implementation("net.kyori:adventure-platform-bukkit:4.3.4")
|
||||
// If targeting a server version without native Adventure support, add it as well:
|
||||
implementation("net.kyori:adventure-platform-bukkit:4.4.1")
|
||||
}
|
||||
```
|
||||
|
||||
@@ -30,26 +28,20 @@ like [Shadow](https://gradleup.com/shadow/).
|
||||
<dependency>
|
||||
<groupId>net.megavex</groupId>
|
||||
<artifactId>scoreboard-library-api</artifactId>
|
||||
<version>{VERSION HERE}</version>
|
||||
<version>2.7.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.megavex</groupId>
|
||||
<artifactId>scoreboard-library-implementation</artifactId>
|
||||
<version>{VERSION HERE}</version>
|
||||
<version>2.7.4</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!-- Kotlin specific extensions (optional) -->
|
||||
<dependency>
|
||||
<groupId>net.megavex</groupId>
|
||||
<artifactId>scoreboard-library-extra-kotlin</artifactId>
|
||||
<version>{VERSION HERE}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- If targeting a Minecraft version without native Adventure support, add it as well: -->
|
||||
<!-- If targeting a server version without native Adventure support, add it as well: -->
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-platform-bukkit</artifactId>
|
||||
<version>4.0.1</version>
|
||||
<version>4.4.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021-2023 Megavex and Contributors
|
||||
Copyright (c) 2021-2026 vytskalt and Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -25,11 +25,11 @@ Join the [Discord](https://discord.gg/v7nmTDTW8W) or create an issue for support
|
||||
|
||||
## Supported server versions
|
||||
|
||||
All Paper and Spigot versions from 1.7.10 to 1.21.11 are natively supported.
|
||||
All Paper and Spigot versions from 1.7.10 to 26.1.2 are natively supported.
|
||||
|
||||
## Installation
|
||||
|
||||
See installation instructions [here](https://github.com/MegavexNetwork/scoreboard-library/blob/dev/2.0/INSTALLATION.md)
|
||||
See installation instructions [here](https://github.com/vytskalt/scoreboard-library/blob/main/INSTALLATION.md)
|
||||
|
||||
### Getting started
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
allprojects {
|
||||
version = "2.7.0"
|
||||
version = "2.7.4"
|
||||
group = "net.megavex"
|
||||
description = "Powerful packet-level scoreboard library for Paper/Spigot servers"
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
plugins {
|
||||
id("net.megavex.scoreboardlibrary.base-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(project(":scoreboard-library-api"))
|
||||
compileOnly(libs.spigotApi)
|
||||
}
|
||||
-66
@@ -1,66 +0,0 @@
|
||||
package net.megavex.scoreboardlibrary.implementation.commons;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.lang.invoke.MethodHandle;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.lang.invoke.MethodHandles.Lookup;
|
||||
import java.lang.invoke.MethodType;
|
||||
import java.util.*;
|
||||
|
||||
public final class CollectionProvider {
|
||||
private static final MethodHandle mapConstructor, setConstructor, listConstructor;
|
||||
|
||||
static {
|
||||
Lookup lookup = MethodHandles.publicLookup();
|
||||
MethodType parameters = MethodType.methodType(void.class, int.class);
|
||||
mapConstructor = getConstructor(lookup, "it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap", HashMap.class, parameters);
|
||||
setConstructor = getConstructor(lookup, "it.unimi.dsi.fastutil.objects.ObjectOpenHashSet", HashSet.class, parameters);
|
||||
listConstructor = getConstructor(lookup, "it.unimi.dsi.fastutil.objects.ObjectArrayList", ArrayList.class, parameters);
|
||||
}
|
||||
|
||||
private CollectionProvider() {
|
||||
}
|
||||
|
||||
private static MethodHandle getConstructor(Lookup lookup, String fastUtilClass, Class<?> fallback, MethodType parameters) {
|
||||
Class<?> clazz;
|
||||
try {
|
||||
clazz = Class.forName(fastUtilClass);
|
||||
} catch (ClassNotFoundException e) {
|
||||
clazz = fallback;
|
||||
}
|
||||
|
||||
try {
|
||||
return lookup.findConstructor(clazz, parameters);
|
||||
} catch (NoSuchMethodException | IllegalAccessException e) {
|
||||
throw new ExceptionInInitializerError(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static <K, V> @NotNull Map<K, V> map(int capacity) {
|
||||
try {
|
||||
// noinspection unchecked
|
||||
return (Map<K, V>) mapConstructor.invokeWithArguments(capacity);
|
||||
} catch (Throwable e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static <E> @NotNull Set<E> set(int capacity) {
|
||||
try {
|
||||
// noinspection unchecked
|
||||
return (Set<E>) setConstructor.invokeWithArguments(capacity);
|
||||
} catch (Throwable e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static <E> @NotNull List<E> list(int capacity) {
|
||||
try {
|
||||
// noinspection unchecked
|
||||
return (List<E>) listConstructor.invokeWithArguments(capacity);
|
||||
} catch (Throwable e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,17 @@
|
||||
plugins {
|
||||
id("net.megavex.scoreboardlibrary.base-conventions")
|
||||
//id("io.papermc.paperweight.userdev") version "2.0.0-beta.19"
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven("https://repo.viaversion.com")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(project(":scoreboard-library-api"))
|
||||
implementation(project(":scoreboard-library-packet-adapter-base"))
|
||||
compileOnly(libs.spigotApi)
|
||||
|
||||
implementation(project(":scoreboard-library-modern"))
|
||||
implementation(project(":scoreboard-library-legacy"))
|
||||
compileOnly("com.viaversion:viaversion-api:5.7.1")
|
||||
compileOnly("io.netty:netty-buffer:4.2.10.Final")
|
||||
compileOnly("io.netty:netty-handler:4.2.10.Final")
|
||||
}
|
||||
+18
-8
@@ -10,8 +10,6 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
public final class PacketAdapterLoader {
|
||||
private static final String MODERN = "modern", LEGACY = "legacy";
|
||||
|
||||
private PacketAdapterLoader() {
|
||||
}
|
||||
|
||||
@@ -35,6 +33,12 @@ public final class PacketAdapterLoader {
|
||||
version = version.substring(0, dashIndex);
|
||||
}
|
||||
|
||||
// New Paper 26.1.1+ versioning scheme: 26.1.1.build.29
|
||||
int buildIndex = version.indexOf(".build");
|
||||
if (buildIndex != -1) {
|
||||
version = version.substring(0, buildIndex);
|
||||
}
|
||||
|
||||
return tryLoadVersion(version);
|
||||
}
|
||||
|
||||
@@ -61,7 +65,11 @@ public final class PacketAdapterLoader {
|
||||
case "1.12":
|
||||
case "1.12.1":
|
||||
case "1.12.2":
|
||||
return tryLoadImplementationClass(LEGACY);
|
||||
try {
|
||||
return Class.forName("net.megavex.scoreboardlibrary.implementation.packetAdapter.legacy.PacketAdapterProviderImpl");
|
||||
} catch (ClassNotFoundException ignored) {
|
||||
return null;
|
||||
}
|
||||
case "1.13":
|
||||
case "1.13.1":
|
||||
case "1.13.2":
|
||||
@@ -108,22 +116,24 @@ public final class PacketAdapterLoader {
|
||||
case "1.21.9":
|
||||
case "1.21.10":
|
||||
case "1.21.11":
|
||||
return tryLoadImplementationClass(MODERN);
|
||||
case "26.1":
|
||||
case "26.1.1":
|
||||
case "26.1.2":
|
||||
return tryLoadModern();
|
||||
default:
|
||||
// Hide from relocation checkers
|
||||
String property = "net.mega".concat("vex.scoreboardlibrary.forceModern");
|
||||
if (System.getProperty(property, "").equalsIgnoreCase("true")) {
|
||||
return tryLoadImplementationClass(MODERN);
|
||||
return tryLoadModern();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static @Nullable Class<?> tryLoadImplementationClass(@NotNull String name) {
|
||||
private static Class<?> tryLoadModern() {
|
||||
try {
|
||||
String path = "net.megavex.scoreboardlibrary.implementation.packetAdapter." + name + ".PacketAdapterProviderImpl";
|
||||
return Class.forName(path);
|
||||
return Class.forName("net.megavex.scoreboardlibrary.implementation.packetAdapter.modern.PacketAdapterProviderImpl");
|
||||
} catch (ClassNotFoundException ignored) {
|
||||
return null;
|
||||
}
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class ScoreboardLibraryImpl implements ScoreboardLibrary {
|
||||
public final class ScoreboardLibraryImpl implements ScoreboardLibrary {
|
||||
private final Plugin plugin;
|
||||
private final PacketAdapterProvider packetAdapter;
|
||||
private final TaskScheduler taskScheduler;
|
||||
|
||||
+2
-1
@@ -8,6 +8,7 @@ import net.kyori.adventure.translation.GlobalTranslator;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@@ -21,7 +22,7 @@ public final class LegacyFormatUtil {
|
||||
|
||||
static {
|
||||
ChatColor[] values = ChatColor.values();
|
||||
chatColorMap = CollectionProvider.map(values.length);
|
||||
chatColorMap = new HashMap<>(values.length);
|
||||
for (ChatColor value : values) {
|
||||
if (!value.isColor()) continue;
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ public enum LineRenderingStrategy {
|
||||
*/
|
||||
LEGACY,
|
||||
/**
|
||||
* For versions 1.13-1.20.2, where team properties are stored as components with no limits.
|
||||
* For versions 1.13+, where team properties are stored as components with no limits.
|
||||
*/
|
||||
MODERN,
|
||||
/**
|
||||
+5
-2
@@ -12,10 +12,13 @@ import java.util.function.Function;
|
||||
|
||||
public final class LocaleProvider {
|
||||
private static final Locale DEFAULT_LOCALE = Locale.US;
|
||||
private static final Function<Player, Locale> provider = get();
|
||||
private static final Function<Player, Locale> PROVIDER = get();
|
||||
|
||||
private LocaleProvider() {
|
||||
}
|
||||
|
||||
public static @NotNull Locale locale(Player player) {
|
||||
return provider.apply(player);
|
||||
return PROVIDER.apply(player);
|
||||
}
|
||||
|
||||
private static @NotNull Function<Player, Locale> get() {
|
||||
+3
-4
@@ -6,7 +6,6 @@ import net.megavex.scoreboardlibrary.api.objective.ObjectiveManager;
|
||||
import net.megavex.scoreboardlibrary.api.objective.ObjectiveScore;
|
||||
import net.megavex.scoreboardlibrary.api.objective.ScoreboardObjective;
|
||||
import net.megavex.scoreboardlibrary.implementation.ScoreboardLibraryImpl;
|
||||
import net.megavex.scoreboardlibrary.implementation.commons.CollectionProvider;
|
||||
import net.megavex.scoreboardlibrary.implementation.packetAdapter.PropertiesPacketType;
|
||||
import net.megavex.scoreboardlibrary.implementation.packetAdapter.objective.ObjectivePacketAdapter;
|
||||
import net.megavex.scoreboardlibrary.implementation.player.PlayerDisplayable;
|
||||
@@ -19,13 +18,13 @@ import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
public class ObjectiveManagerImpl implements ObjectiveManager, PlayerDisplayable {
|
||||
public final class ObjectiveManagerImpl implements ObjectiveManager, PlayerDisplayable {
|
||||
private final ScoreboardLibraryImpl library;
|
||||
private final Map<String, ScoreboardObjectiveImpl> objectives = new ConcurrentHashMap<>();
|
||||
private final Map<ObjectiveDisplaySlot, ScoreboardObjectiveImpl> displaySlots = new HashMap<>();
|
||||
|
||||
private final Set<Player> players = CollectionProvider.set(8);
|
||||
private final Set<Player> displayingPlayers = CollectionProvider.set(8);
|
||||
private final Set<Player> players = new HashSet<>(8);
|
||||
private final Set<Player> displayingPlayers = new HashSet<>(8);
|
||||
private final Queue<ObjectiveManagerTask> taskQueue = new ConcurrentLinkedQueue<>();
|
||||
private boolean closed;
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.Iterator;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class ObjectiveUpdaterTask implements Runnable {
|
||||
public final class ObjectiveUpdaterTask implements Runnable {
|
||||
private final ScoreboardLibraryImpl scoreboardLibrary;
|
||||
private final RunningTask task;
|
||||
private final Object lock = new Object();
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import java.util.*;
|
||||
|
||||
import static net.kyori.adventure.text.Component.empty;
|
||||
|
||||
public class ScoreboardObjectiveImpl implements ScoreboardObjective {
|
||||
public final class ScoreboardObjectiveImpl implements ScoreboardObjective {
|
||||
private final ObjectivePacketAdapter packetAdapter;
|
||||
private final Queue<ObjectiveManagerTask> taskQueue;
|
||||
private final String name;
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -18,7 +18,7 @@ import java.util.Collection;
|
||||
|
||||
import static net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection;
|
||||
|
||||
public class ObjectivePacketAdapterImpl implements ObjectivePacketAdapter {
|
||||
public final class ObjectivePacketAdapterImpl implements ObjectivePacketAdapter {
|
||||
private final String objectiveName;
|
||||
private Object removePacket;
|
||||
|
||||
File renamed without changes.
+1
-1
@@ -9,7 +9,7 @@ import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class PacketAdapterProviderImpl implements PacketAdapterProvider {
|
||||
public final class PacketAdapterProviderImpl implements PacketAdapterProvider {
|
||||
public PacketAdapterProviderImpl(Plugin plugin) {}
|
||||
|
||||
@Override
|
||||
+1
-1
@@ -19,7 +19,7 @@ import java.util.Locale;
|
||||
|
||||
import static net.megavex.scoreboardlibrary.implementation.commons.LegacyFormatUtil.limitLegacyText;
|
||||
|
||||
public class TeamsPacketAdapterImpl implements TeamsPacketAdapter {
|
||||
public final class TeamsPacketAdapterImpl implements TeamsPacketAdapter {
|
||||
private final String teamName;
|
||||
private Object removePacket;
|
||||
|
||||
File renamed without changes.
+1
-1
@@ -21,7 +21,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class PacketAdapterProviderImpl implements PacketAdapterProvider {
|
||||
public final class PacketAdapterProviderImpl implements PacketAdapterProvider {
|
||||
private final ViaAPI<Player> via;
|
||||
private final ModernPacketSender packetSender;
|
||||
private final WeakHashMap<Player, Integer> viaTeamPacketIds = new WeakHashMap<>();
|
||||
File renamed without changes.
File renamed without changes.
+1
-1
@@ -13,7 +13,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class PaperObjectivePacketAdapter extends AbstractObjectivePacketAdapter {
|
||||
public final class PaperObjectivePacketAdapter extends AbstractObjectivePacketAdapter {
|
||||
public PaperObjectivePacketAdapter(@NotNull PacketAdapterProviderImpl provider, @NotNull String objectiveName) {
|
||||
super(provider, objectiveName);
|
||||
}
|
||||
File renamed without changes.
+1
-1
@@ -13,7 +13,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class SpigotObjectivePacketAdapter extends AbstractObjectivePacketAdapter {
|
||||
public final class SpigotObjectivePacketAdapter extends AbstractObjectivePacketAdapter {
|
||||
public SpigotObjectivePacketAdapter(@NotNull PacketAdapterProviderImpl provider, @NotNull String objectiveName) {
|
||||
super(provider, objectiveName);
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
+1
-1
@@ -16,7 +16,7 @@ import java.util.Collection;
|
||||
import java.util.Locale;
|
||||
import java.util.Optional;
|
||||
|
||||
public class PaperTeamsPacketAdapterImpl extends AbstractTeamsPacketAdapterImpl {
|
||||
public final class PaperTeamsPacketAdapterImpl extends AbstractTeamsPacketAdapterImpl {
|
||||
public PaperTeamsPacketAdapterImpl(PacketAdapterProviderImpl provider, @NotNull String teamName) {
|
||||
super(provider, teamName);
|
||||
}
|
||||
+1
-1
@@ -18,7 +18,7 @@ import java.util.Collection;
|
||||
import java.util.Locale;
|
||||
import java.util.Optional;
|
||||
|
||||
public class SpigotTeamsPacketAdapter extends AbstractTeamsPacketAdapterImpl {
|
||||
public final class SpigotTeamsPacketAdapter extends AbstractTeamsPacketAdapterImpl {
|
||||
public SpigotTeamsPacketAdapter(PacketAdapterProviderImpl provider, @NotNull String teamName) {
|
||||
super(provider, teamName);
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+2
-2
@@ -1,12 +1,12 @@
|
||||
package net.megavex.scoreboardlibrary.implementation.packetAdapter.util;
|
||||
|
||||
import net.megavex.scoreboardlibrary.implementation.commons.CollectionProvider;
|
||||
import net.megavex.scoreboardlibrary.implementation.commons.LocaleProvider;
|
||||
import net.megavex.scoreboardlibrary.implementation.packetAdapter.PacketSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
@@ -31,7 +31,7 @@ public final class LocalePacketUtil {
|
||||
return;
|
||||
}
|
||||
|
||||
Map<Locale, P> map = CollectionProvider.map(1);
|
||||
Map<Locale, P> map = new HashMap<>(1);
|
||||
for (Player player : players) {
|
||||
Locale locale = LocaleProvider.locale(player);
|
||||
P packet = map.computeIfAbsent(locale, i -> packetFunction.apply(locale));
|
||||
+1
-1
@@ -5,7 +5,7 @@ import org.jetbrains.annotations.UnknownNullability;
|
||||
|
||||
import java.lang.invoke.MethodHandle;
|
||||
|
||||
public class ConstructorAccessor<T> {
|
||||
public final class ConstructorAccessor<T> {
|
||||
private final MethodHandle handle;
|
||||
|
||||
public ConstructorAccessor(@NotNull MethodHandle handle) {
|
||||
+1
-1
@@ -6,7 +6,7 @@ import org.jetbrains.annotations.UnknownNullability;
|
||||
|
||||
import java.lang.invoke.MethodHandle;
|
||||
|
||||
public class FieldAccessor<T, V> {
|
||||
public final class FieldAccessor<T, V> {
|
||||
private final MethodHandle getter, setter;
|
||||
|
||||
public FieldAccessor(@NotNull MethodHandle getter, @Nullable MethodHandle setter) {
|
||||
+1
-1
@@ -5,7 +5,7 @@ import org.jetbrains.annotations.UnknownNullability;
|
||||
|
||||
import java.lang.invoke.MethodHandle;
|
||||
|
||||
public class MethodAccessor {
|
||||
public final class MethodAccessor {
|
||||
private final MethodHandle handle;
|
||||
|
||||
public MethodAccessor(@NotNull MethodHandle handle) {
|
||||
File renamed without changes.
File renamed without changes.
+1
-1
@@ -9,7 +9,7 @@ import java.lang.invoke.MethodType;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
|
||||
public class ReflectUtil {
|
||||
public final class ReflectUtil {
|
||||
// Inspired by
|
||||
// https://github.com/dmulloy2/ProtocolLib/blob/02e917cd08cf5b37a52052e22b223272a040e0df/src/main/java/com/comphenix/protocol/reflect/accessors/MethodHandleHelper.java
|
||||
|
||||
+41
-35
@@ -1,60 +1,66 @@
|
||||
package net.megavex.scoreboardlibrary.implementation.player;
|
||||
|
||||
import net.megavex.scoreboardlibrary.implementation.commons.CollectionProvider;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public class DisplayableQueue<T extends PlayerDisplayable> {
|
||||
public final class DisplayableQueue<T extends PlayerDisplayable> {
|
||||
private final UUID playerUuid;
|
||||
private final List<T> queue = CollectionProvider.list(1);
|
||||
private final List<T> queue = new ArrayList<>(1);
|
||||
|
||||
public DisplayableQueue(@NotNull UUID playerUuid) {
|
||||
this.playerUuid = playerUuid;
|
||||
}
|
||||
|
||||
public synchronized @Nullable T current() {
|
||||
if (queue.isEmpty()) {
|
||||
return null;
|
||||
} else {
|
||||
return queue.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void add(@NotNull T displayable) {
|
||||
if (queue.contains(displayable)) {
|
||||
throw new IllegalStateException("displayable already registered");
|
||||
}
|
||||
|
||||
queue.add(displayable);
|
||||
|
||||
if (current() == displayable) {
|
||||
Player player = Bukkit.getPlayer(playerUuid);
|
||||
if (player != null) {
|
||||
displayable.display(player);
|
||||
public @Nullable T current() {
|
||||
synchronized (this) {
|
||||
if (queue.isEmpty()) {
|
||||
return null;
|
||||
} else {
|
||||
return queue.get(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void remove(@NotNull T displayable) {
|
||||
boolean wasCurrent = displayable == current();
|
||||
if (!queue.remove(displayable)) {
|
||||
throw new IllegalStateException("displayable not registered");
|
||||
}
|
||||
public void add(@NotNull T displayable) {
|
||||
synchronized (this) {
|
||||
if (queue.contains(displayable)) {
|
||||
throw new IllegalStateException("displayable already registered");
|
||||
}
|
||||
|
||||
if (!wasCurrent) {
|
||||
return;
|
||||
}
|
||||
queue.add(displayable);
|
||||
|
||||
T newDisplayable = current();
|
||||
if (newDisplayable != null) {
|
||||
Player player = Bukkit.getPlayer(playerUuid);
|
||||
if (player != null) {
|
||||
newDisplayable.display(player);
|
||||
if (current() == displayable) {
|
||||
Player player = Bukkit.getPlayer(playerUuid);
|
||||
if (player != null) {
|
||||
displayable.display(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void remove(@NotNull T displayable) {
|
||||
synchronized (this) {
|
||||
boolean wasCurrent = displayable == current();
|
||||
if (!queue.remove(displayable)) {
|
||||
throw new IllegalStateException("displayable not registered");
|
||||
}
|
||||
|
||||
if (!wasCurrent) {
|
||||
return;
|
||||
}
|
||||
|
||||
T newDisplayable = current();
|
||||
if (newDisplayable != null) {
|
||||
Player player = Bukkit.getPlayer(playerUuid);
|
||||
if (player != null) {
|
||||
newDisplayable.display(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerLocaleChangeEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class LocaleListener implements Listener {
|
||||
public final class LocaleListener implements Listener {
|
||||
private final ScoreboardLibraryImpl scoreboardLibrary;
|
||||
|
||||
public LocaleListener(@NotNull ScoreboardLibraryImpl scoreboardLibrary) {
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class ScoreboardLibraryPlayer {
|
||||
public final class ScoreboardLibraryPlayer {
|
||||
private final DisplayableQueue<TeamManagerImpl> teamManagerQueue;
|
||||
private final DisplayableQueue<ObjectiveManagerImpl> objectiveManagerQueue;
|
||||
private final DisplayableQueue<AbstractSidebar> sidebarQueue;
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package net.megavex.scoreboardlibrary.implementation.scheduler;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
class BukkitTaskScheduler implements TaskScheduler {
|
||||
final class BukkitTaskScheduler implements TaskScheduler {
|
||||
private final Plugin plugin;
|
||||
|
||||
public BukkitTaskScheduler(@NotNull Plugin plugin) {
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import java.lang.invoke.MethodType;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
class FoliaTaskScheduler implements TaskScheduler {
|
||||
final class FoliaTaskScheduler implements TaskScheduler {
|
||||
private static final Class<?> asyncSchedulerClass;
|
||||
private static final Class<?> scheduledTaskClass;
|
||||
private static final Class<?> cancelledStateClass;
|
||||
|
||||
+3
-7
@@ -6,18 +6,14 @@ import net.megavex.scoreboardlibrary.api.objective.ObjectiveRenderType;
|
||||
import net.megavex.scoreboardlibrary.api.objective.ScoreFormat;
|
||||
import net.megavex.scoreboardlibrary.api.sidebar.Sidebar;
|
||||
import net.megavex.scoreboardlibrary.implementation.ScoreboardLibraryImpl;
|
||||
import net.megavex.scoreboardlibrary.implementation.commons.CollectionProvider;
|
||||
import net.megavex.scoreboardlibrary.implementation.packetAdapter.PropertiesPacketType;
|
||||
import net.megavex.scoreboardlibrary.implementation.packetAdapter.objective.ObjectivePacketAdapter;
|
||||
import net.megavex.scoreboardlibrary.implementation.player.PlayerDisplayable;
|
||||
import net.megavex.scoreboardlibrary.implementation.player.ScoreboardLibraryPlayer;
|
||||
import net.megavex.scoreboardlibrary.implementation.sidebar.line.GlobalLineInfo;
|
||||
import net.megavex.scoreboardlibrary.implementation.sidebar.line.LocaleLineHandler;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Objects;
|
||||
import java.util.Queue;
|
||||
import java.util.Set;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.util.function.Consumer;
|
||||
import net.kyori.adventure.text.Component;
|
||||
@@ -38,7 +34,7 @@ public abstract class AbstractSidebar implements Sidebar, PlayerDisplayable {
|
||||
private final GlobalLineInfo[] lines;
|
||||
private Component title = empty();
|
||||
|
||||
private final Set<Player> players = CollectionProvider.set(8);
|
||||
private final Set<Player> players = new HashSet<>(8);
|
||||
|
||||
private boolean closed;
|
||||
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class PlayerDependantLocaleSidebar extends AbstractSidebar {
|
||||
public final class PlayerDependantLocaleSidebar extends AbstractSidebar {
|
||||
private final Map<Player, LocaleLineHandler> playerMap = new HashMap<>();
|
||||
private final Map<Locale, LocaleLineHandler> localeMap = new HashMap<>();
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.Iterator;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class SidebarUpdaterTask implements Runnable {
|
||||
public final class SidebarUpdaterTask implements Runnable {
|
||||
private final ScoreboardLibraryImpl scoreboardLibrary;
|
||||
private final RunningTask task;
|
||||
private final Object lock = new Object();
|
||||
|
||||
+3
-4
@@ -1,26 +1,25 @@
|
||||
package net.megavex.scoreboardlibrary.implementation.sidebar;
|
||||
|
||||
import net.megavex.scoreboardlibrary.implementation.ScoreboardLibraryImpl;
|
||||
import net.megavex.scoreboardlibrary.implementation.commons.CollectionProvider;
|
||||
import net.megavex.scoreboardlibrary.implementation.sidebar.line.LocaleLineHandler;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class SingleLocaleSidebar extends AbstractSidebar {
|
||||
public final class SingleLocaleSidebar extends AbstractSidebar {
|
||||
private final Locale locale;
|
||||
private final LocaleLineHandler sidebar;
|
||||
private final Set<Player> internalPlayers;
|
||||
private final Set<Player> internalPlayers = new HashSet<>(8);
|
||||
|
||||
public SingleLocaleSidebar(@NotNull ScoreboardLibraryImpl scoreboardLibrary, int size, @NotNull String objectiveName, @NotNull Locale locale) {
|
||||
super(scoreboardLibrary, size, objectiveName);
|
||||
this.locale = locale;
|
||||
this.sidebar = new LocaleLineHandler(this, locale);
|
||||
this.internalPlayers = CollectionProvider.set(8);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import net.megavex.scoreboardlibrary.implementation.sidebar.AbstractSidebar;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class GlobalLineInfo {
|
||||
public final class GlobalLineInfo {
|
||||
private final String player;
|
||||
private final int line;
|
||||
private final TeamsPacketAdapter packetAdapter;
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.Collections;
|
||||
import java.util.Locale;
|
||||
|
||||
public class LocaleLineHandler {
|
||||
public final class LocaleLineHandler {
|
||||
private final AbstractSidebar sidebar;
|
||||
private final Locale locale;
|
||||
private final SidebarLineHandler[] lineHandlers;
|
||||
|
||||
+3
-3
@@ -2,7 +2,6 @@ package net.megavex.scoreboardlibrary.implementation.sidebar.line;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.translation.GlobalTranslator;
|
||||
import net.megavex.scoreboardlibrary.implementation.commons.CollectionProvider;
|
||||
import net.megavex.scoreboardlibrary.implementation.commons.LineRenderingStrategy;
|
||||
import net.megavex.scoreboardlibrary.implementation.sidebar.line.locale.LegacyLocaleLine;
|
||||
import net.megavex.scoreboardlibrary.implementation.sidebar.line.locale.LocaleLine;
|
||||
@@ -12,12 +11,13 @@ import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class SidebarLineHandler {
|
||||
public final class SidebarLineHandler {
|
||||
private final LineRenderingStrategy strategy;
|
||||
private final LocaleLineHandler localeLineHandler;
|
||||
private final Set<Player> players = CollectionProvider.set(1);
|
||||
private final Set<Player> players = new HashSet<>(1);
|
||||
private final LocaleLine[] lines;
|
||||
|
||||
public SidebarLineHandler(@NotNull LineRenderingStrategy strategy, @NotNull LocaleLineHandler localeLineHandler) {
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import java.util.Set;
|
||||
import static net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection;
|
||||
|
||||
// Implementation for versions below 1.13
|
||||
public class LegacyLocaleLine implements LocaleLine, ImmutableTeamProperties<String> {
|
||||
public final class LegacyLocaleLine implements LocaleLine, ImmutableTeamProperties<String> {
|
||||
private final GlobalLineInfo info;
|
||||
private final SidebarLineHandler handler;
|
||||
private final TeamDisplayPacketAdapter packetAdapter;
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import java.util.Collection;
|
||||
import static net.kyori.adventure.text.Component.empty;
|
||||
|
||||
// Implementation for versions above 1.13
|
||||
public class ModernLocaleLine implements LocaleLine, ImmutableTeamProperties<Component> {
|
||||
public final class ModernLocaleLine implements LocaleLine, ImmutableTeamProperties<Component> {
|
||||
private final GlobalLineInfo info;
|
||||
private final SidebarLineHandler handler;
|
||||
private final Collection<String> entries;
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import java.util.Collection;
|
||||
// Implementation for versions 1.20.3+
|
||||
// This is not yet being used as it might break on servers with plugins such as ViaBackwards,
|
||||
// however it will once Mojang decides to remove legacy chat format support
|
||||
public class PostModernLocaleLine implements LocaleLine {
|
||||
public final class PostModernLocaleLine implements LocaleLine {
|
||||
private final GlobalLineInfo info;
|
||||
private final SidebarLineHandler handler;
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class ScoreboardTeamImpl implements ScoreboardTeam {
|
||||
public final class ScoreboardTeamImpl implements ScoreboardTeam {
|
||||
private final TeamManagerImpl teamManager;
|
||||
private final String name;
|
||||
private final TeamsPacketAdapter packetAdapter;
|
||||
|
||||
+4
-5
@@ -8,7 +8,6 @@ import net.megavex.scoreboardlibrary.api.team.ScoreboardTeam;
|
||||
import net.megavex.scoreboardlibrary.api.team.TeamDisplay;
|
||||
import net.megavex.scoreboardlibrary.api.team.enums.CollisionRule;
|
||||
import net.megavex.scoreboardlibrary.api.team.enums.NameTagVisibility;
|
||||
import net.megavex.scoreboardlibrary.implementation.commons.CollectionProvider;
|
||||
import net.megavex.scoreboardlibrary.implementation.packetAdapter.ImmutableTeamProperties;
|
||||
import net.megavex.scoreboardlibrary.implementation.packetAdapter.PropertiesPacketType;
|
||||
import net.megavex.scoreboardlibrary.implementation.packetAdapter.team.EntriesPacketType;
|
||||
@@ -21,12 +20,12 @@ import java.util.*;
|
||||
|
||||
import static net.kyori.adventure.text.Component.empty;
|
||||
|
||||
public class TeamDisplayImpl implements TeamDisplay, ImmutableTeamProperties<Component> {
|
||||
public final class TeamDisplayImpl implements TeamDisplay, ImmutableTeamProperties<Component> {
|
||||
private final ScoreboardTeamImpl team;
|
||||
private final TeamDisplayPacketAdapter packetAdapter;
|
||||
private final Set<Player> players = CollectionProvider.set(4);
|
||||
private final List<String> entries = CollectionProvider.list(4);
|
||||
private final List<String> syncedEntries = CollectionProvider.list(4);
|
||||
private final Set<Player> players = new HashSet<>(4);
|
||||
private final List<String> entries = new ArrayList<>(4);
|
||||
private final List<String> syncedEntries = new ArrayList<>(4);
|
||||
private Component displayName = empty(),
|
||||
prefix = empty(),
|
||||
suffix = empty();
|
||||
|
||||
+3
-4
@@ -5,7 +5,6 @@ import net.megavex.scoreboardlibrary.api.team.ScoreboardTeam;
|
||||
import net.megavex.scoreboardlibrary.api.team.TeamDisplay;
|
||||
import net.megavex.scoreboardlibrary.api.team.TeamManager;
|
||||
import net.megavex.scoreboardlibrary.implementation.ScoreboardLibraryImpl;
|
||||
import net.megavex.scoreboardlibrary.implementation.commons.CollectionProvider;
|
||||
import net.megavex.scoreboardlibrary.implementation.packetAdapter.PropertiesPacketType;
|
||||
import net.megavex.scoreboardlibrary.implementation.player.PlayerDisplayable;
|
||||
import net.megavex.scoreboardlibrary.implementation.player.ScoreboardLibraryPlayer;
|
||||
@@ -20,11 +19,11 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class TeamManagerImpl implements TeamManager, PlayerDisplayable {
|
||||
public final class TeamManagerImpl implements TeamManager, PlayerDisplayable {
|
||||
private final ScoreboardLibraryImpl scoreboardLibrary;
|
||||
|
||||
private final Set<Player> players = CollectionProvider.set(8);
|
||||
private final List<Player> internalPlayers = CollectionProvider.list(8);
|
||||
private final Set<Player> players = new HashSet<>(8);
|
||||
private final List<Player> internalPlayers = new ArrayList<>(8);
|
||||
|
||||
private final Map<String, ScoreboardTeamImpl> teams = new ConcurrentHashMap<>();
|
||||
private final Queue<TeamManagerTask> taskQueue = new ConcurrentLinkedQueue<>();
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.Iterator;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class TeamUpdaterTask implements Runnable {
|
||||
public final class TeamUpdaterTask implements Runnable {
|
||||
private final ScoreboardLibraryImpl scoreboardLibrary;
|
||||
private final RunningTask task;
|
||||
private final Object lock = new Object();
|
||||
|
||||
@@ -1,27 +1,10 @@
|
||||
rootProject.name = "scoreboard-library"
|
||||
|
||||
include(":api")
|
||||
include(":commons")
|
||||
include(":implementation")
|
||||
include(":extra-kotlin")
|
||||
include(":test-plugin")
|
||||
|
||||
include(":packet-adapter-base")
|
||||
project(":packet-adapter-base").projectDir = file("versions/packet-adapter-base")
|
||||
|
||||
include(":packetevents")
|
||||
project(":packetevents").projectDir = file("versions/packetevents")
|
||||
|
||||
include(":modern")
|
||||
project(":modern").projectDir = file("versions/modern")
|
||||
|
||||
include(":legacy")
|
||||
project(":legacy").projectDir = file("versions/legacy")
|
||||
|
||||
// For backwards compatibility
|
||||
include(":v1_8_R3")
|
||||
project(":v1_8_R3").projectDir = file("versions/v1_8_R3")
|
||||
|
||||
val modulePrefix = rootProject.name
|
||||
rootProject.children.forEach {
|
||||
it.name = "$modulePrefix-${it.name}"
|
||||
|
||||
+11
-1
@@ -102,7 +102,7 @@ download_file() {
|
||||
fi
|
||||
}
|
||||
|
||||
download_file "buildtools.jar" "https://hub.spigotmc.org/jenkins/job/BuildTools/197/artifact/target/BuildTools.jar" "9a5b059ace22eaef28fb62f96970f0abe1490f06c860229b94627cd72eaf6ea5"
|
||||
download_file "buildtools.jar" "https://hub.spigotmc.org/jenkins/job/BuildTools/198/artifact/target/BuildTools.jar" "23eefb5a08655fe83c40ddac7a4ca78b6b2583efccd9c98c58b27df0aa31fa35"
|
||||
|
||||
download_file "viaversion.jar" "https://ci.viaversion.com/job/ViaVersion-Java8/38/artifact/build/libs/ViaVersion-5.7.1-downgraded.jar" "dcce3d30e195de9a3372616298bac1acd29196e5c3676a0fba745be9e3d91808"
|
||||
download_file "viabackwards.jar" "https://ci.viaversion.com/view/ViaBackwards/job/ViaBackwards-Java8/31/artifact/build/libs/ViaBackwards-5.7.1-downgraded.jar" "9727fd246d3566bffc3f71e1bda0e6db71bf5814a254e7ab5a2941ca0e94ecd6"
|
||||
@@ -236,3 +236,13 @@ create_server "1.21.11-paper" "jdk25" "true"
|
||||
|
||||
create_spigot_server "1.21.11" "jdk25"
|
||||
|
||||
# --- 26.1 ---
|
||||
|
||||
create_spigot_server "26.1" "jdk25"
|
||||
|
||||
# --- 26.1.1 ---
|
||||
download_file "26.1.1-paper.jar" "https://fill-data.papermc.io/v1/objects/43d08ed52c7af4e9f72769122501a5c15f99c7ace0c428a3eef040fd3f6fdbc5/paper-26.1.1-29.jar" "43d08ed52c7af4e9f72769122501a5c15f99c7ace0c428a3eef040fd3f6fdbc5"
|
||||
create_server "26.1.1-paper" "jdk25" "true"
|
||||
|
||||
create_spigot_server "26.1.1" "jdk25"
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
plugins {
|
||||
id("net.megavex.scoreboardlibrary.base-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly(project(":scoreboard-library-packet-adapter-base"))
|
||||
compileOnly(libs.spigotApi)
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
plugins {
|
||||
id("net.megavex.scoreboardlibrary.base-conventions")
|
||||
//id("io.papermc.paperweight.userdev") version "2.0.0-beta.19"
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven("https://repo.viaversion.com")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly(project(":scoreboard-library-packet-adapter-base")) {
|
||||
//exclude(group = "org.spigotmc", module = "spigot-api")
|
||||
}
|
||||
compileOnly(libs.spigotApi)
|
||||
compileOnly("com.viaversion:viaversion-api:5.7.1")
|
||||
compileOnly("io.netty:netty-buffer:4.2.10.Final")
|
||||
compileOnly("io.netty:netty-handler:4.2.10.Final")
|
||||
//paperweight.paperDevBundle("1.21.11-R0.1-SNAPSHOT")
|
||||
}
|
||||
|
||||
tasks {
|
||||
javadoc {
|
||||
exclude("**")
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
disableAutoTargetJvm()
|
||||
}
|
||||
|
||||
indra {
|
||||
includeJavaSoftwareComponentInPublications(false)
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications.getByName<MavenPublication>("maven") {
|
||||
// Kept for backwards compatibility
|
||||
artifact(tasks.jar) {
|
||||
classifier = "mojmap"
|
||||
}
|
||||
|
||||
artifact(tasks.jar)
|
||||
artifact(tasks.javadocJar)
|
||||
artifact(tasks.sourcesJar)
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
plugins {
|
||||
id("net.megavex.scoreboardlibrary.base-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(project(":scoreboard-library-api"))
|
||||
api(project(":scoreboard-library-commons"))
|
||||
compileOnly(libs.spigotApi)
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
plugins {
|
||||
id("net.megavex.scoreboardlibrary.base-conventions")
|
||||
}
|
||||
|
||||
// packetevents adapter is gone, this module is kept for compatibility
|
||||
@@ -1,8 +0,0 @@
|
||||
plugins {
|
||||
id("net.megavex.scoreboardlibrary.base-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Alias to legacy for backwards compatibility
|
||||
implementation(project(":scoreboard-library-legacy"))
|
||||
}
|
||||
Reference in new issue
Block a user