Online editor (#267)

* web editor

* editor command help

* editor sync cmd

* removed same user restriction

* removed player executed restriction

* no server identifier sent to server

* editor url updated

* config harsher verification + send world names to editor api

* no more session controls

* addons editor commands

* moved rtp to /betterrtp-core to create a better env for maven compiling

* bettersync lib

* Own core and addon editor schemas with BetterSync validation

* Simplify editor metadata and publish core and addon schemas on release

* Release core and addons together using their Maven versions

* Exclude unavailable ProtocolLib executor snapshot from Addons build

* betterrtp compiling

* log upload commands fixed - upload to mclo.gs website

* Fix deferred player lookups retaining disconnected sessions (#265)

* Fix RTP operation retention on cancellation and failure (#266)
This commit is contained in:
RonanCraft authored and GitHub committed 2026-11-23 10:07:25 -05:00
1 parent c8c5a04a59
commit a9e821497c
35 files changed
+941 -287

No files matched your search

+2 -1
View File
@@ -4,6 +4,7 @@
<properties><bettersync.version>2.0.0</bettersync.version><maven.compiler.release>8</maven.compiler.release><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties>
<repositories><repository><id>spigot</id><url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url></repository><repository><id>jitpack.io</id><url>https://jitpack.io</url></repository></repositories>
<dependencies>
<dependency><groupId>org.jetbrains</groupId><artifactId>annotations</artifactId><version>24.0.1</version><scope>provided</scope></dependency>
<dependency><groupId>com.github.RonanPlugins</groupId><artifactId>BetterSync</artifactId><version>${bettersync.version}</version></dependency>
<dependency><groupId>org.spigotmc</groupId><artifactId>spigot-api</artifactId><version>1.8.8-R0.1-SNAPSHOT</version><exclusions><exclusion><groupId>net.md-5</groupId><artifactId>bungeecord-chat</artifactId></exclusion></exclusions></dependency>
<dependency><groupId>net.md-5</groupId><artifactId>bungeecord-chat</artifactId><version>1.16-R0.4</version></dependency>
@@ -12,7 +13,7 @@
<build>
<sourceDirectory>../../BetterRTP-Core/src/main/java</sourceDirectory>
<plugins>
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.14.0</version><configuration><includes><include>**/web/editor/*.java</include></includes></configuration></plugin>
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.14.0</version><configuration><includes><include>**/web/editor/*.java</include><include>**/web/LogUploader.java</include></includes></configuration></plugin>
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>3.5.3</version></plugin>
</plugins>
</build>
@@ -0,0 +1,22 @@
package me.SuperRonanCraft.BetterRTP.references.web;
import org.junit.Test;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import java.nio.charset.StandardCharsets;
import static org.junit.Assert.*;
public class LogUploaderTest {
@Test public void encodesLogContentWithoutLosingFormatting() throws Exception {
String content = "Quotes: \"hello\"\nUnicode: \u00e9 \u2603\nPath: C:\\server\\logs";
JSONObject body = (JSONObject) new JSONParser().parse(new String(LogUploader.requestBody(content), StandardCharsets.UTF_8));
assertEquals(content, body.get("content"));
assertEquals("BetterRTP", body.get("source"));
}
@Test public void acceptsSuccessfulViewerLinksOnly() {
assertEquals("https://mclo.gs/abc123", LogUploader.viewingUrl("{\"success\":true,\"url\":\"https://mclo.gs/abc123\"}"));
for (String response : new String[] {"null", "[]", "not json", "{\"key\":\"legacy\"}", "{\"success\":false,\"url\":\"https://mclo.gs/abc\"}", "{\"success\":true,\"url\":\"https://evil.example/abc\"}", "{\"success\":true,\"url\":42}"}) {
assertNull(response, LogUploader.viewingUrl(response));
}
}
}