PaperMC/paper-server/patches/sources/net/minecraft/gametest/framework/GameTestServer.java.patch

44 lines
1.5 KiB
Diff
Raw Permalink Normal View History

2024-12-15 23:12:31 +01:00
--- a/net/minecraft/gametest/framework/GameTestServer.java
+++ b/net/minecraft/gametest/framework/GameTestServer.java
2024-12-15 23:35:59 +01:00
@@ -139,6 +_,8 @@
BlockPos spawnPos
) {
super(
+ null, // Paper
+ null, // Paper
serverThread,
storageSource,
packRepository,
@@ -154,8 +_,15 @@
@Override
public boolean initServer() {
- this.setPlayerList(new PlayerList(this, this.registries(), this.playerDataStorage, 1) {});
- this.loadLevel();
+ // Paper start
+ this.setPlayerList(new PlayerList(this, this.registries(), this.playerDataStorage, 1) {
+ @Override
+ public void loadAndSaveFiles() {
+ throw new UnsupportedOperationException("Should not be called in a GameTestServer");
+ }
+ });
+ this.loadLevel("blah");
+ // Paper end
ServerLevel serverLevel = this.overworld();
this.testBatches = Lists.newArrayList(GameTestBatchFactory.fromTestFunction(this.testFunctions, serverLevel));
serverLevel.setDefaultSpawnPos(this.spawnPos, 0.0F);
@@ -303,6 +_,13 @@
public boolean shouldInformAdmins() {
2024-12-15 23:12:31 +01:00
return false;
}
2024-12-15 23:35:59 +01:00
+
2024-12-15 23:12:31 +01:00
+ // Paper start
+ @Override
+ public org.bukkit.command.CommandSender getBukkitSender(final net.minecraft.commands.CommandSourceStack wrapper) {
+ throw new UnsupportedOperationException("Not supported.");
+ }
+ // Paper end
2024-12-15 23:35:59 +01:00
2024-12-15 23:12:31 +01:00
@Override
public boolean isSingleplayerOwner(GameProfile profile) {