lowk did smth
This commit is contained in:
parent
702fa6deeb
commit
4879257f47
54 changed files with 486 additions and 243 deletions
5
.idea/gradle.xml
generated
5
.idea/gradle.xml
generated
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
|
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||||
<component name="GradleSettings">
|
<component name="GradleSettings">
|
||||||
<option name="linkedExternalProjectsSettings">
|
<option name="linkedExternalProjectsSettings">
|
||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
|
|
@ -8,8 +9,8 @@
|
||||||
<option name="modules">
|
<option name="modules">
|
||||||
<set>
|
<set>
|
||||||
<option value="$PROJECT_DIR$" />
|
<option value="$PROJECT_DIR$" />
|
||||||
<option value="$PROJECT_DIR$/core-api" />
|
<option value="$PROJECT_DIR$/core-bukkit-api" />
|
||||||
<option value="$PROJECT_DIR$/core-impl" />
|
<option value="$PROJECT_DIR$/core-bukkit-impl" />
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
</GradleProjectSettings>
|
</GradleProjectSettings>
|
||||||
|
|
|
||||||
2
.idea/inspectionProfiles/Project_Default.xml
generated
2
.idea/inspectionProfiles/Project_Default.xml
generated
|
|
@ -1,7 +1,7 @@
|
||||||
<component name="InspectionProjectProfileManager">
|
<component name="InspectionProjectProfileManager">
|
||||||
<profile version="1.0">
|
<profile version="1.0">
|
||||||
<option name="myName" value="Project Default" />
|
<option name="myName" value="Project Default" />
|
||||||
<inspection_tool class="ClassCanBeRecord" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
<inspection_tool class="ClassCanBeRecord" enabled="true" level="TEXT ATTRIBUTES" enabled_by_default="true" editorAttributes="CONSIDERATION_ATTRIBUTES">
|
||||||
<option name="myIgnoredAnnotations">
|
<option name="myIgnoredAnnotations">
|
||||||
<list>
|
<list>
|
||||||
<option value="io.micronaut.*" />
|
<option value="io.micronaut.*" />
|
||||||
|
|
|
||||||
6
.idea/kotlinc.xml
generated
Normal file
6
.idea/kotlinc.xml
generated
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="KotlinJpsPluginSettings">
|
||||||
|
<option name="version" value="2.2.10" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
|
|
@ -16,6 +16,12 @@ subprojects {
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") {
|
||||||
|
name = "spigotmc-repo"
|
||||||
|
}
|
||||||
|
maven("https://libraries.minecraft.net") {
|
||||||
|
name = "Minecraft Libraries"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
plugins {
|
|
||||||
id("java")
|
|
||||||
}
|
|
||||||
|
|
||||||
group = "de.kentoj.scrow"
|
|
||||||
version = "1.0-SNAPSHOT"
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
testImplementation(platform("org.junit:junit-bom:5.10.0"))
|
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
|
||||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.test {
|
|
||||||
useJUnitPlatform()
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
package de.kentoj.scrow.provider;
|
|
||||||
|
|
||||||
public class MissingServiceFieldException extends RuntimeException {
|
|
||||||
public MissingServiceFieldException(Class<?> apiClass, Class<?> serviceClass) {
|
|
||||||
super("missing static field of type " + serviceClass + " annotated with " + ServiceField.class.getCanonicalName() + " in " + apiClass.getCanonicalName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
package de.kentoj.scrow.provider;
|
|
||||||
|
|
||||||
import de.kentoj.scrow.provider.provider.ServiceProvider;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class RegisteredService<T> {
|
|
||||||
private final Class<T> serviceClass;
|
|
||||||
private final ServiceProvider<T> serviceProvider;
|
|
||||||
private final Set<Class<?>> requiredServices;
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
package de.kentoj.scrow.provider;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
@Target(ElementType.FIELD)
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
public @interface ServiceField {}
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
package de.kentoj.scrow.provider;
|
|
||||||
|
|
||||||
import de.kentoj.scrow.provider.provider.ServiceProvider;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
|
|
||||||
import java.lang.reflect.AccessFlag;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class ServiceRegistry {
|
|
||||||
|
|
||||||
private final Set<RegisteredService<?>> registeredServices = new HashSet<>();
|
|
||||||
|
|
||||||
public <T> void provideService(
|
|
||||||
Class<T> serviceInterfaceClass,
|
|
||||||
ServiceProvider<T> serviceProvider,
|
|
||||||
Set<Class<?>> requiredServices
|
|
||||||
) {
|
|
||||||
registeredServices.add(new RegisteredService<>(serviceInterfaceClass, serviceProvider, requiredServices));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void load(Class<?> apiClass) {
|
|
||||||
Arrays.stream(apiClass.getDeclaredFields())
|
|
||||||
.filter(f -> f.accessFlags().contains(AccessFlag.STATIC))
|
|
||||||
.filter(f -> f.isAnnotationPresent(ServiceField.class))
|
|
||||||
.filter(f -> {
|
|
||||||
try {
|
|
||||||
f.setAccessible(true);
|
|
||||||
return f.get(null) == null;
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.forEach(field -> loadServiceRecursively(apiClass, getService(field.getType())));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void loadServiceRecursively(Class<?> apiClass, RegisteredService<?> registeredService) {
|
|
||||||
for (Class<?> serviceClass : registeredService.getRequiredServices()) {
|
|
||||||
var sv = getService(serviceClass);
|
|
||||||
loadServiceRecursively(apiClass, sv);
|
|
||||||
}
|
|
||||||
|
|
||||||
var field = Arrays.stream(apiClass.getDeclaredFields())
|
|
||||||
.filter(f -> f.accessFlags().contains(AccessFlag.STATIC))
|
|
||||||
.filter(f -> f.isAnnotationPresent(ServiceField.class))
|
|
||||||
.findFirst()
|
|
||||||
.orElseThrow(() -> new MissingServiceFieldException(apiClass, registeredService.getServiceClass()));
|
|
||||||
try {
|
|
||||||
if (field.get(null) != null) return;
|
|
||||||
field.setAccessible(true);
|
|
||||||
field.set(null, registeredService.getServiceProvider().get());
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T> RegisteredService<T> getService(Class<T> serviceClass) {
|
|
||||||
return (RegisteredService<T>) registeredServices.stream()
|
|
||||||
.filter(Objects::nonNull)
|
|
||||||
.filter(sv -> sv.getServiceClass() == serviceClass)
|
|
||||||
.findFirst()
|
|
||||||
.orElseThrow(() -> new IllegalStateException("No registered-service for " + serviceClass.getCanonicalName() + " registered"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
package de.kentoj.scrow.provider.provider;
|
|
||||||
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
public abstract class AbstractServiceProvider<T> implements ServiceProvider<T> {
|
|
||||||
|
|
||||||
private final @Nullable T service = load();
|
|
||||||
|
|
||||||
abstract protected T load();
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public T get() {
|
|
||||||
return service;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
package de.kentoj.scrow.provider.provider;
|
|
||||||
|
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
public class GenericServiceProvider<T> implements ServiceProvider<T> {
|
|
||||||
|
|
||||||
private final T service;
|
|
||||||
|
|
||||||
public GenericServiceProvider(T service) {
|
|
||||||
this.service = service;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GenericServiceProvider(Supplier<T> serviceSupplier) {
|
|
||||||
this.service = serviceSupplier.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public T get() {
|
|
||||||
return service;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
package de.kentoj.scrow.provider.provider;
|
|
||||||
|
|
||||||
public interface ServiceProvider<T> {
|
|
||||||
|
|
||||||
T get();
|
|
||||||
|
|
||||||
default void cleanup() {}
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
package de.kentoj.scrow.services.mail;
|
|
||||||
|
|
||||||
import lombok.Value;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
@Value
|
|
||||||
public class Mail {
|
|
||||||
UUID from;
|
|
||||||
String subject;
|
|
||||||
String body;
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
package de.kentoj.scrow.services.mail;
|
|
||||||
|
|
||||||
import reactor.core.publisher.Mono;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* like email but for minecraft
|
|
||||||
*/
|
|
||||||
public interface MailService {
|
|
||||||
|
|
||||||
Mono<Long> sendMail(UUID to, Mail mail);
|
|
||||||
}
|
|
||||||
60
core-bukkit-api/build.gradle.kts
Normal file
60
core-bukkit-api/build.gradle.kts
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
import org.gradle.internal.declarativedsl.dom.mutation.valueFromString
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("java")
|
||||||
|
id("java-library")
|
||||||
|
id("maven-publish")
|
||||||
|
}
|
||||||
|
|
||||||
|
group = "de.kentoj.scrow"
|
||||||
|
version = "1.0-SNAPSHOT"
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
testImplementation(platform("org.junit:junit-bom:5.10.0"))
|
||||||
|
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||||
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||||
|
|
||||||
|
api("me.lucko:commodore:2.2")
|
||||||
|
api("org.spigotmc:spigot-api:1.21.11-R0.1-SNAPSHOT")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.findByName("shadowJar")?.let {
|
||||||
|
dependencies {
|
||||||
|
"exclude"("dependency"("com.mojang.brigadier")!!)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
create<MavenPublication>("CoreBukkitApi") {
|
||||||
|
groupId = project.group.toString()
|
||||||
|
artifactId = project.name
|
||||||
|
version = project.version.toString()
|
||||||
|
from(components["java"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "scrow"
|
||||||
|
url = uri("http://forge.kentoj.de/api/packages/scrow/maven")
|
||||||
|
isAllowInsecureProtocol = true
|
||||||
|
|
||||||
|
credentials(HttpHeaderCredentials::class) {
|
||||||
|
name = "Authorization"
|
||||||
|
value = "token a967694822eed6e97b1b20e8737733ef1400fa1f"
|
||||||
|
}
|
||||||
|
|
||||||
|
authentication {
|
||||||
|
create<HttpHeaderAuthentication>("header")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.test {
|
||||||
|
useJUnitPlatform()
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package de.kentoj.scrow;
|
package de.kentoj.scrow.bukkit;
|
||||||
|
|
||||||
import com.mongodb.reactivestreams.client.MongoDatabase;
|
import com.mongodb.reactivestreams.client.MongoDatabase;
|
||||||
import de.kentoj.scrow.services.EconomyService;
|
import de.kentoj.scrow.bukkit.services.EconomyService;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.kentoj.scrow.services;
|
package de.kentoj.scrow.bukkit.services;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package de.kentoj.scrow.bukkit.services.email;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
public interface Email extends EmailDraft {
|
||||||
|
|
||||||
|
Long getId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return UUID of player the mail is sent to or null if console
|
||||||
|
*/
|
||||||
|
@Nullable UUID getFrom();
|
||||||
|
|
||||||
|
@Nullable Instant getSentAt();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package de.kentoj.scrow.bukkit.services.email;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
public interface EmailDraft {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return UUID of player sending the mail or null if console
|
||||||
|
*/
|
||||||
|
@Nullable UUID getFrom();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return non-empty string specifying the subject
|
||||||
|
*/
|
||||||
|
String getSubject();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return body of the message
|
||||||
|
*/
|
||||||
|
String getBody();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return id of the mail this mail is replying to or null if not replying to any email
|
||||||
|
*/
|
||||||
|
@Nullable Long getReplyTo();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package de.kentoj.scrow.bukkit.services.email;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import reactor.core.publisher.Flux;
|
||||||
|
import reactor.core.publisher.Mono;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* like email but for minecraft
|
||||||
|
*/
|
||||||
|
public interface EmailService {
|
||||||
|
|
||||||
|
Mono<@NotNull Email> sendMail(UUID to, EmailDraft emailDraft);
|
||||||
|
Flux<@NotNull Email> sendMailToMany(Set<UUID> to, EmailDraft emailDraft);
|
||||||
|
|
||||||
|
Flux<@NotNull Email> fetchMails(UUID to);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param to uuid of player whose inbox to operate on
|
||||||
|
* @param id id of the email
|
||||||
|
*/
|
||||||
|
Mono<@NotNull Void> deleteMail(UUID to, long id);
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.kentoj.scrow.services.friends;
|
package de.kentoj.scrow.bukkit.services.friends;
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package de.kentoj.scrow.services.friends;
|
package de.kentoj.scrow.bukkit.services.friends;
|
||||||
|
|
||||||
import de.kentoj.scrow.util.pair.Tuple2;
|
import de.kentoj.scrow.bukkit.util.pair.Tuple2;
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package de.kentoj.scrow.bukkit.services.old;
|
||||||
|
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
public interface CmdContext {
|
||||||
|
|
||||||
|
CommandSender getSender();
|
||||||
|
|
||||||
|
Player getSenderPlayer();
|
||||||
|
|
||||||
|
Entity getSenderEntity();
|
||||||
|
|
||||||
|
<T> T getArg(String key);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
package de.kentoj.scrow.bukkit.services.old;
|
||||||
|
|
||||||
|
public interface CommandExecutor {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true on success, 1 on failure
|
||||||
|
*/
|
||||||
|
boolean execute(CmdContext ctx);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
package de.kentoj.scrow.bukkit.services.old;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
|
public interface CommandsService {
|
||||||
|
|
||||||
|
void register(Plugin plugin, Command command);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package de.kentoj.scrow.bukkit.services.old;
|
||||||
|
|
||||||
|
import de.kentoj.scrow.bukkit.services.old.arg.CmdArg;
|
||||||
|
import lombok.Value;
|
||||||
|
|
||||||
|
@Value
|
||||||
|
public class RegisteredCmdArg<T> {
|
||||||
|
int index;
|
||||||
|
String key;
|
||||||
|
CmdArg<T> arg;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
package de.kentoj.scrow.bukkit.services.old;
|
||||||
|
|
||||||
|
import org.bukkit.permissions.Permission;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface SCommand {
|
||||||
|
|
||||||
|
@Nullable Permission getPermission();
|
||||||
|
|
||||||
|
RegisteredCmdArg<?> getArg(int index);
|
||||||
|
|
||||||
|
List<SCommand> getSubCommands();
|
||||||
|
|
||||||
|
String[] getLabels();
|
||||||
|
|
||||||
|
String getDescription();
|
||||||
|
|
||||||
|
@Nullable CommandExecutor getExecutor();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
package de.kentoj.scrow.bukkit.services.old.arg;
|
||||||
|
|
||||||
|
public interface CmdArg<S> {
|
||||||
|
|
||||||
|
S parseInput(String str);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package de.kentoj.scrow.bukkit.services.old.arg;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.OfflinePlayer;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
// FIXME module stuff
|
||||||
|
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||||
|
public class PlayerArgType {
|
||||||
|
|
||||||
|
public static final CmdArg<Player> player = str -> {
|
||||||
|
if (str.length() == 36) {
|
||||||
|
var uuid = UUID.fromString(str);
|
||||||
|
return Bukkit.getPlayer(uuid);
|
||||||
|
} else {
|
||||||
|
return Bukkit.getPlayer(str);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static final CmdArg<OfflinePlayer> offlinePlayer = str -> {
|
||||||
|
var uuid = UUID.fromString(str);
|
||||||
|
return Bukkit.getOfflinePlayer(uuid);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.kentoj.scrow.util.pair;
|
package de.kentoj.scrow.bukkit.util.pair;
|
||||||
|
|
||||||
import lombok.Value;
|
import lombok.Value;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.kentoj.scrow.util.pair;
|
package de.kentoj.scrow.bukkit.util.pair;
|
||||||
|
|
||||||
import lombok.Value;
|
import lombok.Value;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.kentoj.scrow.util.pair;
|
package de.kentoj.scrow.bukkit.util.pair;
|
||||||
|
|
||||||
import lombok.Value;
|
import lombok.Value;
|
||||||
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("com.gradleup.shadow") version "9.2.0"
|
id("com.gradleup.shadow") version "9.2.0"
|
||||||
id("xyz.jpenilla.run-paper") version "2.3.1"
|
id("xyz.jpenilla.run-paper") version "2.3.1"
|
||||||
|
kotlin("jvm")
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "de.kentoj.scrow"
|
group = "de.kentoj.scrow"
|
||||||
|
|
@ -9,9 +11,6 @@ version = "1.0-SNAPSHOT"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") {
|
|
||||||
name = "spigotmc-repo"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
@ -19,8 +18,8 @@ dependencies {
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||||
|
|
||||||
compileOnly("org.spigotmc:spigot-api:1.21.11-R0.1-SNAPSHOT")
|
implementation(project(":core-bukkit-api"))
|
||||||
implementation(project(":core-api"))
|
implementation(kotlin("stdlib-jdk8"))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
|
|
@ -41,3 +40,6 @@ tasks.build {
|
||||||
tasks.test {
|
tasks.test {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
|
kotlin {
|
||||||
|
jvmToolchain(21)
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.kentoj.scrow;
|
package de.kentoj.scrow.bukkit;
|
||||||
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
package de.kentoj.scrow;
|
package de.kentoj.scrow.bukkit;
|
||||||
|
|
||||||
import com.mongodb.ConnectionString;
|
import com.mongodb.ConnectionString;
|
||||||
import com.mongodb.MongoClientSettings;
|
import com.mongodb.MongoClientSettings;
|
||||||
import com.mongodb.reactivestreams.client.MongoClient;
|
import com.mongodb.reactivestreams.client.MongoClient;
|
||||||
import com.mongodb.reactivestreams.client.MongoClients;
|
import com.mongodb.reactivestreams.client.MongoClients;
|
||||||
import de.kentoj.scrow.economy.InMemoryEconomyService;
|
import de.kentoj.scrow.bukkit.economy.InMemoryEconomyService;
|
||||||
import de.kentoj.scrow.economy.MongoEconomyService;
|
import de.kentoj.scrow.bukkit.economy.MongoEconomyService;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import org.bson.UuidRepresentation;
|
import org.bson.UuidRepresentation;
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
package de.kentoj.scrow.bukkit.command;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import de.kentoj.scrow.bukkit.services.old.CommandExecutor;
|
||||||
|
import de.kentoj.scrow.bukkit.services.old.RegisteredCmdArg;
|
||||||
|
import de.kentoj.scrow.bukkit.services.old.SCommand;
|
||||||
|
import de.kentoj.scrow.bukkit.services.old.arg.CmdArg;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.bukkit.permissions.Permission;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public abstract class AbstractSCommand implements SCommand {
|
||||||
|
|
||||||
|
private final List<SCommand> subCommands = new ArrayList<>();
|
||||||
|
private final List<RegisteredCmdArg<?>> args = new ArrayList<>();
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private final String[] labels;
|
||||||
|
@Getter
|
||||||
|
private @Nullable Permission permission = null;
|
||||||
|
@Getter
|
||||||
|
@Setter(value = AccessLevel.PROTECTED)
|
||||||
|
private @Nullable String description;
|
||||||
|
@Getter
|
||||||
|
@Setter(value = AccessLevel.PROTECTED)
|
||||||
|
private @Nullable CommandExecutor executor = null;
|
||||||
|
|
||||||
|
public AbstractSCommand(String... labels) {
|
||||||
|
this.labels = labels;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected <T> void addArg(String key, CmdArg<T> arg) {
|
||||||
|
|
||||||
|
}
|
||||||
|
protected <T> void addArg(String key, CmdArg<T> arg, T defaultValue) {
|
||||||
|
var index = args.size();
|
||||||
|
args.add(new RegisteredCmdArg<>(index, key, arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RegisteredCmdArg<?> getArg(int index) {
|
||||||
|
//noinspection OptionalGetWithoutIsPresent
|
||||||
|
return args.stream()
|
||||||
|
.filter(ra -> ra.getIndex() == index)
|
||||||
|
.findFirst()
|
||||||
|
.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addSubCommand(SCommand subCommand) {
|
||||||
|
subCommands.add(subCommand);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setPermission(@Nullable Permission permission) {
|
||||||
|
this.permission = permission;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setPermission(String permission) {
|
||||||
|
setPermission(new Permission(permission));
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<SCommand> getSubCommands() {
|
||||||
|
return ImmutableList.copyOf(subCommands);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package de.kentoj.scrow.bukkit.command;
|
||||||
|
|
||||||
|
import de.kentoj.scrow.bukkit.services.old.CmdContext;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class CmdContextImpl implements CmdContext {
|
||||||
|
|
||||||
|
private final Map<String, Object> args;
|
||||||
|
@Getter
|
||||||
|
private final CommandSender sender;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Player getSenderPlayer() {
|
||||||
|
return (Player) sender;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Entity getSenderEntity() {
|
||||||
|
return (Entity) sender;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public <T> T getArg(String key) {
|
||||||
|
return (T) args.get(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package de.kentoj.scrow.bukkit.command;
|
||||||
|
|
||||||
|
import de.kentoj.scrow.bukkit.services.old.CmdContext;
|
||||||
|
import de.kentoj.scrow.bukkit.services.old.SCommand;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class CommandProcessor implements CommandExecutor {
|
||||||
|
|
||||||
|
public CmdContext process(SCommand scommand, String[] strArgs, CommandSender sender) {
|
||||||
|
Map<String, Object> args = new HashMap<>();
|
||||||
|
for (int i = 0; i < strArgs.length; i++) {
|
||||||
|
var arg = scommand.getArg(i);
|
||||||
|
var value = arg.getArg().parseInput(strArgs[i]);
|
||||||
|
args.put(arg.getKey(), value);
|
||||||
|
}
|
||||||
|
return new CmdContextImpl(args, sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package de.kentoj.scrow.bukkit.command;
|
||||||
|
|
||||||
|
import de.kentoj.scrow.bukkit.services.old.CommandExecutor;
|
||||||
|
import de.kentoj.scrow.bukkit.services.old.arg.PlayerArgType;
|
||||||
|
import de.kentoj.scrow.bukkit.services.old.CmdContext;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.permissions.Permission;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
public class LaunchCommand extends AbstractSCommand implements CommandExecutor {
|
||||||
|
|
||||||
|
public LaunchCommand() {
|
||||||
|
super("launch");
|
||||||
|
setPermission(new Permission("corebukkit.cmd.launch"));
|
||||||
|
setExecutor(this);
|
||||||
|
addArg("player", PlayerArgType.player);
|
||||||
|
addArg("factor", IntRangeType.range(1, 5), 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean execute(CmdContext ctx) {
|
||||||
|
final Player player = ctx.getArg("player");
|
||||||
|
player.setVelocity(new Vector(0, 1, 0));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package de.kentoj.scrow.economy;
|
package de.kentoj.scrow.bukkit.economy;
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import de.kentoj.scrow.services.EconomyService;
|
import de.kentoj.scrow.bukkit.services.EconomyService;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.kentoj.scrow.economy;
|
package de.kentoj.scrow.bukkit.economy;
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.mongodb.client.model.Filters;
|
import com.mongodb.client.model.Filters;
|
||||||
|
|
@ -6,8 +6,9 @@ import com.mongodb.client.model.UpdateOptions;
|
||||||
import com.mongodb.client.model.Updates;
|
import com.mongodb.client.model.Updates;
|
||||||
import com.mongodb.reactivestreams.client.MongoCollection;
|
import com.mongodb.reactivestreams.client.MongoCollection;
|
||||||
import com.mongodb.reactivestreams.client.MongoDatabase;
|
import com.mongodb.reactivestreams.client.MongoDatabase;
|
||||||
import de.kentoj.scrow.services.EconomyService;
|
import de.kentoj.scrow.bukkit.services.EconomyService;
|
||||||
import org.bson.Document;
|
import org.bson.Document;
|
||||||
|
import org.bson.types.ObjectId;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package de.kentoj.scrow.bukkit.friends;
|
||||||
|
|
||||||
|
import com.mojang.brigadier.Command;
|
||||||
|
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||||
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
|
import com.mojang.brigadier.builder.RequiredArgumentBuilder;
|
||||||
|
|
||||||
|
public class FriendsCommand {
|
||||||
|
|
||||||
|
public static Command<?> createCommand() {
|
||||||
|
return LiteralArgumentBuilder.literal("friends")
|
||||||
|
.then(LiteralArgumentBuilder.literal("add")
|
||||||
|
.then(RequiredArgumentBuilder.argument("player", StringArgumentType.word())))
|
||||||
|
.then(LiteralArgumentBuilder.literal("list"))
|
||||||
|
.then(LiteralArgumentBuilder.literal("requests"))
|
||||||
|
.then(LiteralArgumentBuilder.literal("remove"))
|
||||||
|
.then(LiteralArgumentBuilder.literal("jump"))
|
||||||
|
.then(LiteralArgumentBuilder.literal("accept"))
|
||||||
|
.then(LiteralArgumentBuilder.literal("deny"))
|
||||||
|
.build().getCommand();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package de.kentoj.scrow.friends;
|
package de.kentoj.scrow.bukkit.friends;
|
||||||
|
|
||||||
import de.kentoj.scrow.services.friends.FriendRequest;
|
import de.kentoj.scrow.bukkit.services.friends.FriendRequest;
|
||||||
import de.kentoj.scrow.services.friends.Friendship;
|
import de.kentoj.scrow.bukkit.services.friends.Friendship;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import reactor.core.publisher.Flux;
|
import reactor.core.publisher.Flux;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
|
|
@ -20,6 +20,7 @@ public interface FriendshipService {
|
||||||
Mono<@NotNull Boolean> endFriendship(UUID initiator, UUID other);
|
Mono<@NotNull Boolean> endFriendship(UUID initiator, UUID other);
|
||||||
|
|
||||||
Flux<@NotNull FriendRequest> getIncomingFriendRequests(UUID playerId);
|
Flux<@NotNull FriendRequest> getIncomingFriendRequests(UUID playerId);
|
||||||
|
|
||||||
Flux<@NotNull FriendRequest> getOutgoingFriendRequests(UUID playerId);
|
Flux<@NotNull FriendRequest> getOutgoingFriendRequests(UUID playerId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
package de.kentoj.scrow.friends.friendship;
|
package de.kentoj.scrow.bukkit.friends.friendship;
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import de.kentoj.scrow.services.friends.Friendship;
|
import de.kentoj.scrow.bukkit.services.friends.Friendship;
|
||||||
import de.kentoj.scrow.util.pair.Tuple2;
|
import de.kentoj.scrow.bukkit.util.pair.Tuple2;
|
||||||
import lombok.Value;
|
import lombok.Value;
|
||||||
import org.bson.codecs.pojo.annotations.BsonCreator;
|
import org.bson.codecs.pojo.annotations.BsonCreator;
|
||||||
import org.bson.codecs.pojo.annotations.BsonProperty;
|
import org.bson.codecs.pojo.annotations.BsonProperty;
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package de.kentoj.scrow.friends.friendship;
|
package de.kentoj.scrow.bukkit.friends.friendship;
|
||||||
|
|
||||||
import de.kentoj.scrow.services.friends.Friendship;
|
import de.kentoj.scrow.bukkit.services.friends.Friendship;
|
||||||
import de.kentoj.scrow.util.pair.Tuple2;
|
import de.kentoj.scrow.bukkit.util.pair.Tuple2;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import reactor.core.publisher.Flux;
|
import reactor.core.publisher.Flux;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package de.kentoj.scrow.friends.friendship;
|
package de.kentoj.scrow.bukkit.friends.friendship;
|
||||||
|
|
||||||
import de.kentoj.scrow.util.pair.Tuple2;
|
import de.kentoj.scrow.bukkit.util.pair.Tuple2;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.kentoj.scrow.friends.friendship;
|
package de.kentoj.scrow.bukkit.friends.friendship;
|
||||||
|
|
||||||
import com.mongodb.ErrorCategory;
|
import com.mongodb.ErrorCategory;
|
||||||
import com.mongodb.MongoWriteException;
|
import com.mongodb.MongoWriteException;
|
||||||
|
|
@ -7,8 +7,8 @@ import com.mongodb.client.model.IndexOptions;
|
||||||
import com.mongodb.client.model.Indexes;
|
import com.mongodb.client.model.Indexes;
|
||||||
import com.mongodb.reactivestreams.client.MongoCollection;
|
import com.mongodb.reactivestreams.client.MongoCollection;
|
||||||
import com.mongodb.reactivestreams.client.MongoDatabase;
|
import com.mongodb.reactivestreams.client.MongoDatabase;
|
||||||
import de.kentoj.scrow.services.friends.Friendship;
|
import de.kentoj.scrow.bukkit.services.friends.Friendship;
|
||||||
import de.kentoj.scrow.util.pair.Tuple2;
|
import de.kentoj.scrow.bukkit.util.pair.Tuple2;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import reactor.core.publisher.Flux;
|
import reactor.core.publisher.Flux;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package de.kentoj.scrow.friends.request;
|
package de.kentoj.scrow.bukkit.friends.request;
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import de.kentoj.scrow.services.friends.FriendRequest;
|
import de.kentoj.scrow.bukkit.services.friends.FriendRequest;
|
||||||
import lombok.Value;
|
import lombok.Value;
|
||||||
import org.bson.codecs.pojo.annotations.BsonCreator;
|
import org.bson.codecs.pojo.annotations.BsonCreator;
|
||||||
import org.bson.codecs.pojo.annotations.BsonProperty;
|
import org.bson.codecs.pojo.annotations.BsonProperty;
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package de.kentoj.scrow.friends.request;
|
package de.kentoj.scrow.bukkit.friends.request;
|
||||||
|
|
||||||
import de.kentoj.scrow.services.friends.FriendRequest;
|
import de.kentoj.scrow.bukkit.services.friends.FriendRequest;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import reactor.core.publisher.Flux;
|
import reactor.core.publisher.Flux;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.kentoj.scrow.friends.request;
|
package de.kentoj.scrow.bukkit.friends.request;
|
||||||
|
|
||||||
import com.mongodb.ErrorCategory;
|
import com.mongodb.ErrorCategory;
|
||||||
import com.mongodb.MongoWriteException;
|
import com.mongodb.MongoWriteException;
|
||||||
|
|
@ -7,7 +7,7 @@ import com.mongodb.client.model.IndexOptions;
|
||||||
import com.mongodb.client.model.Indexes;
|
import com.mongodb.client.model.Indexes;
|
||||||
import com.mongodb.reactivestreams.client.MongoCollection;
|
import com.mongodb.reactivestreams.client.MongoCollection;
|
||||||
import com.mongodb.reactivestreams.client.MongoDatabase;
|
import com.mongodb.reactivestreams.client.MongoDatabase;
|
||||||
import de.kentoj.scrow.services.friends.FriendRequest;
|
import de.kentoj.scrow.bukkit.services.friends.FriendRequest;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import reactor.core.publisher.Flux;
|
import reactor.core.publisher.Flux;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
name: "CoreImpl"
|
name: "CoreBukkit"
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
main: "de.kentoj.scrow.CoreImplPlugin"
|
main: "de.kentoj.scrow.bukkit.CoreImplPlugin"
|
||||||
api-version: "1.1"
|
api-version: "1.1"
|
||||||
author: "Kento2 <kento@placeq.com>"
|
author: "Kento2 <kento@placeq.com>"
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://aka.ms/MinecraftEULA).
|
|
||||||
#Sun Feb 15 11:54:50 CET 2026
|
|
||||||
eula=true
|
|
||||||
4
gradlew.bat
vendored
4
gradlew.bat
vendored
|
|
@ -46,7 +46,7 @@ set JAVA_EXE=java.exe
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo. 1>&2
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
echo ERROR: JAVA_HOME is not set and no 'java' SCommand could be found in your PATH. 1>&2
|
||||||
echo. 1>&2
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation. 1>&2
|
echo location of your Java installation. 1>&2
|
||||||
|
|
@ -68,7 +68,7 @@ echo location of your Java installation. 1>&2
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the SCommand line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,11 @@
|
||||||
|
pluginManagement {
|
||||||
|
plugins {
|
||||||
|
kotlin("jvm") version "2.2.10"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
plugins {
|
||||||
|
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
|
||||||
|
}
|
||||||
rootProject.name = "core"
|
rootProject.name = "core"
|
||||||
include("core-api")
|
include("core-bukkit-api")
|
||||||
include("core-impl")
|
include("core-bukkit-impl")
|
||||||
Loading…
Add table
Add a link
Reference in a new issue