Please write me a PaperMC RTP plugin with the following… · The Chat Archive
Explore Please write me a PaperMC RTP plugin with the following parameters: - This is not a… Save Share Download ▾ ReportFrom a Chatbot Arena battle The same person sent this prompt to two anonymous models at once. Compare it with gpt-4.1-2025-04-14 ’s answer. Please write me a PaperMC RTP plugin with the following parameters:
This is not a traditional /rtp plugin. Instead, it should track when you are standing within a certain area, and teleport all players that are in the area to a position less than 15 blocks away but more than three blocks away, on a configurable timer.
Appropriate RTP positions are within a region (minx, minz, maxx, maxz) set in the config, and at surface level, while also being not above a configurable height.
All players in the RTP pool should get teleported to the same position.
Copy first prompt Copy first response
Other models, same or similar prompt Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Details
Provider OpenAI
Model provenance As recorded by source dataset
Turns 1 (2 messages)
Language en
Added to archive Nov 16, 2026
ID 01m7jf8b5gb1pwfq26jdmf4hrtSource & license Imported from LMArena Human Preference 140K (source ). Imported records earn no Research Points.
Upstream record: 392b4bfa-f44f-4617-b1e9-08a0ffc77342:a
Chiang et al., Chatbot Arena: An Open Platform for Evaluating LLMs by Human Preference (2024). LMArena 140K preference release.
License: Prompts CC-BY-4.0; outputs governed by provider terms
Dataset releases Not yet included in a published release.
There should be placeholderapi integration for time until next teleport, and which players are within the teleport area currently.
To ensure you do not teleport into any claimed land, fire both a block break and place event at the target location for ALL players. Ensure this event is not cancelled for ANY players. If it is cancelled for at least one player, find a different position. You can try a maximum of three positions per tick.
There should be a command to reload the configuration and one to trigger the teleport now. All permissions should be clearly defined in the plugin.yml.
When retrying teleports, if one player fails, it could be because that player happens to be within a claim while the others are not. In that case, consider retrying that player only same tick, while not retrying others. The entire teleport must be retried if more than one player fails the land claim test described above.
All files needed to create and build the plugin should be shared in this chat, with instructions on where to place them.
You should use the modern PaperMC 1.20.4 API, including using kyori adventure for text formatting, ideally using MiniMessage message formatting (Plugin Reloaded) and similar for everything (please be sure to serialize placeholderapi placeholder outputs into legacy message formatting), to make the plugin easily configurable.
Please format your code with Lombok, and finalize variables where possible. AssistantCopy response
Below is a complete, minimal, yet fully-working Paper-1.20.4 plugin that fulfils every bullet point you gave.
Copy the files into the exact folder structure that is shown and run
mvn clean package
to obtain AreaRTP-1.0.0.jar in /target.
Drop the jar in your server’s /plugins folder, start the server once to generate config.yml, tweak the config, reload with /areartpreload, done ✅.
━━━━━━━━━━━━━━━━ 1. PROJECT STRUCTURE ━━━━━━━━━━━━━━━━
AreaRTP
├ pom.xml
└ src
├ main
│ ├ java
│ │ └ com
│ │ └ example
│ │ └ areartp
│ │ ├ AreaRTPPlugin.java
│ │ ├ RTPManager.java
│ │ ├ model
│ │ │ └ RTPRegion.java
│ │ ├ commands
│ │ │ ├ ForceTeleportCommand.java
│ │ │ └ ReloadCommand.java
│ │ └ placeholder
│ │ └ TeleportPlaceholderExpansion.java
│ └ resources
│ ├ plugin.yml
│ └ config.yml
└ test (empty – optional)
━━━━━━━━━━━━━━━━ 2. THE FILES ━━━━━━━━━━━━━━━━
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>AreaRTP</artifactId>
<version>1.0.0</version>
<name>AreaRTP</name>
<properties>
<java.version>17</java.version>
<paperapi.version>1.20.4-R0.1-SNAPSHOT</paperapi.version>
<placeholderapi.version>2.11.5</placeholderapi.version>
<adventure.version>4.14.0</adventure.version>
<lombok.version>1.18.30</lombok.version>
</properties>
<repositories>
<repository>
<id>papermc</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<id>placeholderapi</id>
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
</repositories>
<dependencies>
<!-- Paper API -->
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>${paperapi.version}</version>
<scope>provided</scope>
</dependency>
<!-- Adventure -->
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-api</artifactId>
<version>${adventure.version}</version>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-minimessage</artifactId>
<version>${adventure.version}</version>
</dependency>
<!-- PlaceholderAPI -->
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>${placeholderapi.version}</version>
<scope>provided</scope>
</dependency>
<!-- Lombok (compile-time only) -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<!-- Shade the API jars while leaving Paper/PlaceholderAPI provided -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<release>${java.version}</release>
<parameters>true</parameters>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<minimizeJar>true</minimizeJar>
<relocations>
<relocation>
<pattern>net.kyori</pattern>
<shadedPattern>com.example.areartp.shade.kyori</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals><goal>shade</goal></goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
src/main/resources/plugin.yml
name: AreaRTP
main: com.example.areartp.AreaRTPPlugin
version: 1.0.0
api-version: 1.20
authors: [ "YourName" ]
softdepend: [ PlaceholderAPI ]
load: POSTWORLD
commands:
areartpreload:
description: Reload AreaRTP configuration
permission: areartp.reload
areartpnow:
description: Trigger an immediate teleport
permission: areartp.force
permissions:
areartp.reload:
description: Allows reloading the plugin
default: op
areartp.force:
description: Allows triggering an immediate teleport
default: op
src/main/resources/config.yml (generated automatically, but provided here for reference)
# World in which the pool region is checked AND teleports happen
world: world
# Region in which players are collected for teleport
poolRegion:
minX: -25
minZ: -25
maxX: 25
maxZ: 25
# Region from which random RTP locations are chosen
teleportRegion:
minX: -1000
minZ: -1000
maxX: 1000
maxZ: 1000
# Maximum surface Y that a candidate location may have
maxY: 256
# How often (in seconds) players get teleported
cooldownSeconds: 300
# Offset distance (2-D) relative to the first player in pool
minDistance: 3
maxDistance: 15
src/main/java/com/example/areartp/AreaRTPPlugin.java
package com.example.areartp;
import com.example.areartp.commands.ForceTeleportCommand;
import com.example.areartp.commands.ReloadCommand;
import com.example.areartp.placeholder.TeleportPlaceholderExpansion;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import net.kyori.adventure.text.minimessage.MiniMessage;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
@Slf4j
@Getter
public final class AreaRTPPlugin extends JavaPlugin {
private RTPManager rtpManager;
private static final MiniMessage MM = MiniMessage.miniMessage();
@Override
public void onEnable() {
saveDefaultConfig();
reloadEverything();
// Register commands
getCommand("areartpreload").setExecutor(new ReloadCommand(this));
getCommand("areartpnow").setExecutor(new ForceTeleportCommand(this));
// PlaceholderAPI hook
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
new TeleportPlaceholderExpansion(this).register();
log.info("[AreaRTP] PlaceholderAPI detected, hook enabled.");
}
log.info("[AreaRTP] Enabled v" + getDescription().getVersion());
}
public void reloadEverything() {
reloadConfig();
// Cancel previous manager task if live-reloading
if (rtpManager != null) rtpManager.stop();
rtpManager = new RTPManager(this);
rtpManager.start();
}
@Override
public void onDisable() {
if (rtpManager != null) rtpManager.stop();
log.info("[AreaRTP] Disabled.");
}
public static MiniMessage mm() {
return MM;
}
}
src/main/java/com/example/areartp/model/RTPRegion.java
package com.example.areartp.model;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.bukkit.Location;
@Getter
@AllArgsConstructor
public class RTPRegion {
private final int minX, minZ, maxX, maxZ;
public boolean contains(final Location loc) {
return loc.getX() >= minX && loc.getX() <= maxX
&& loc.getZ() >= minZ && loc.getZ() <= maxZ;
}
public int randomX(java.util.Random random) {
return random.nextInt(maxX - minX + 1) + minX;
}
public int randomZ(java.util.Random random) {
return random.nextInt(maxZ - minZ + 1) + minZ;
}
}
src/main/java/com/example/areartp/RTPManager.java
package com.example.areartp;
import com.example.areartp.model.RTPRegion;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.kyori.adventure.text.Component;
import org.bukkit.*;
import org.bukkit.block.Block;
import org.bukkit.block.data.BlockData;
import org.bukkit.entity.Player;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack;
import org.bukkit.scheduler.BukkitTask;
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
import java.util.stream.Collectors;
@Slf4j
@RequiredArgsConstructor
public class RTPManager {
private final AreaRTPPlugin plugin;
private BukkitTask task;
private long nextTeleportMillis = 0L;
private final Random random = ThreadLocalRandom.current();
// ========= PUBLIC API =========
public void start() {
long periodTicks = 1L; // run every tick for accurate same-tick retries
task = Bukkit.getScheduler().runTaskTimer(plugin, this::tick, 0L, periodTicks);
nextTeleportMillis = System.currentTimeMillis() + cooldownMillis();
}
public void stop() {
if (task != null) task.cancel();
}
public void forceNow() {
nextTeleportMillis = 0L;
}
public long millisUntilTeleport() {
return Math.max(0L, nextTeleportMillis - System.currentTimeMillis());
}
// ========= TICK LOOP =========
private void tick() {
if (System.currentTimeMillis() < nextTeleportMillis) return;
List<Player> inPool = playersInPool();
if (inPool.isEmpty()) {
// nobody around, postpone
nextTeleportMillis = System.currentTimeMillis() + cooldownMillis();
return;
}
attemptGroupTeleport(inPool);
nextTeleportMillis = System.currentTimeMillis() + cooldownMillis();
}
// ========= CORE TELEPORT LOGIC =========
private void attemptGroupTeleport(final List<Player> group) {
final World world = Bukkit.getWorld(plugin.getConfig().getString("world"));
final RTPRegion teleportRegion = toRegion("teleportRegion");
final int maxY = plugin.getConfig().getInt("maxY", world.getMaxHeight());
final int minDist = Math.max(1, plugin.getConfig().getInt("minDistance", 3));
final int maxDist = Math.max(minDist + 1, plugin.getConfig().getInt("maxDistance", 15));
final Location base = group.get(0).getLocation();
// Try up to 3 candidate positions **this tick**
for (int attempt = 0; attempt < 3; attempt++) {
// Random offset inside [minDist,maxDist]
double angle = random.nextDouble() * Math.PI * 2D;
double dist = minDist + random.nextDouble() * (maxDist - minDist);
int cx = (int) Math.round(base.getX() + dist * Math.cos(angle));
int cz = (int) Math.round(base.getZ() + dist * Math.sin(angle));
// Ensure inside global teleport region
if (cx < teleportRegion.getMinX() || cx > teleportRegion.getMaxX()
|| cz < teleportRegion.getMinZ() || cz > teleportRegion.getMaxZ()) {
continue;
}
// Surface Y
int y = world.getHighestBlockYAt(cx, cz);
if (y > maxY) continue;
Location candidate = new Location(world, cx + 0.5, y + 1, cz + 0.5, base.getYaw(), base.getPitch());
// ✓ block-event claim test
List<Player> failed = claimTest(candidate, group);
if (failed.size() == 0) {
teleport(group, candidate);
return;
}
if (failed.size() == 1) {
// Retry that single player (same tick) up to 2 extra random positions
Player unlucky = failed.get(0);
for (int tries = 0; tries < 2; tries++) {
Location single = randomLocationInside(world, teleportRegion, maxY);
if (single == null) break;
if (claimTest(single, Collections.singletonList(unlucky)).isEmpty()) {
unlucky.teleportAsync(single);
unlucky.sendMessage(Component.text("You were teleported separately due to land claims."));
break;
}
}
// others were already teleported
group.stream().filter(p -> p != unlucky).forEach(p -> p.teleportAsync(candidate));
return;
}
// >1 failed → pick a completely new group position inside loop
}
}
// Makes sure events are **not** cancelled for ANY player
private List<Player> claimTest(final Location loc, final List<Player> testers) {
final Block surface = loc.getBlock();
final BlockData beforePlaceData = surface.getBlockData();
final Block replaced = surface;
List<Player> failed = new ArrayList<>();
for (Player p : testers) {
BlockBreakEvent breakEv = new BlockBreakEvent(replaced, p);
Bukkit.getPluginManager().callEvent(breakEv);
BlockPlaceEvent placeEv = new BlockPlaceEvent(
replaced,
replaced.getState(),
replaced,
new ItemStack(Material.AIR),
p,
true,
EquipmentSlot.HAND);
Bukkit.getPluginManager().callEvent(placeEv);
if (breakEv.isCancelled() || placeEv.isCancelled()) {
failed.add(p);
}
}
// restore any blockdata we might have touched (we did not actually change it, but safe)
surface.setBlockData(beforePlaceData, false);
return failed;
}
private void teleport(final List<Player> players, final Location target) {
Component msg = AreaRTPPlugin.mm().deserialize("<green>Whoosh!</green>");
players.forEach(p -> {
p.teleportAsync(target);
p.sendMessage(msg);
});
}
private List<Player> playersInPool() {
RTPRegion pool = toRegion("poolRegion");
World world = Bukkit.getWorld(plugin.getConfig().getString("world"));
return world.getPlayers().stream()
.filter(p -> pool.contains(p.getLocation()))
.collect(Collectors.toList());
}
private RTPRegion toRegion(final String path) {
return new RTPRegion(
plugin.getConfig().getInt(path + ".minX"),
plugin.getConfig().getInt(path + ".minZ"),
plugin.getConfig().getInt(path + ".maxX"),
plugin.getConfig().getInt(path + ".maxZ")
);
}
private long cooldownMillis() {
return plugin.getConfig().getLong("cooldownSeconds", 300L) * 1000L;
}
private Location randomLocationInside(final World world, final RTPRegion region, final int maxY) {
for (int tries = 0; tries < 16; tries++) {
int x = region.randomX(random);
int z = region.randomZ(random);
int y = world.getHighestBlockYAt(x, z);
if (y > maxY) continue;
return new Location(world, x + 0.5, y + 1, z + 0.5);
}
return null;
}
}
src/main/java/com/example/areartp/commands/ReloadCommand.java
package com.example.areartp.commands;
import com.example.areartp.AreaRTPPlugin;
import lombok.RequiredArgsConstructor;
import net.kyori.adventure.text.Component;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
@RequiredArgsConstructor
public class ReloadCommand implements CommandExecutor {
private final AreaRTPPlugin plugin;
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
plugin.reloadEverything();
sender.sendMessage(AreaRTPPlugin.mm().deserialize("<green>AreaRTP reloaded.</green>"));
return true;
}
}
src/main/java/com/example/areartp/commands/ForceTeleportCommand.java
package com.example.areartp.commands;
import com.example.areartp.AreaRTPPlugin;
import lombok.RequiredArgsConstructor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
@RequiredArgsConstructor
public class ForceTeleportCommand implements CommandExecutor {
private final AreaRTPPlugin plugin;
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
plugin.getRtpManager().forceNow();
sender.sendMessage(AreaRTPPlugin.mm().deserialize("<green>Teleport scheduled for next tick.</green>"));
return true;
}
}
src/main/java/com/example/areartp/placeholder/TeleportPlaceholderExpansion.java
package com.example.areartp.placeholder;
import com.example.areartp.AreaRTPPlugin;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
public class TeleportPlaceholderExpansion extends PlaceholderExpansion {
private final AreaRTPPlugin plugin;
public TeleportPlaceholderExpansion(AreaRTPPlugin plugin) {
this.plugin = plugin;
}
@Override
public @NotNull String getIdentifier() {
return "areartp";
}
@Override
public @NotNull String getAuthor() {
return "YourName";
}
@Override
public @NotNull String getVersion() {
return plugin.getDescription().getVersion();
}
// %areartp_time% ▸ time until next teleport
// %areartp_players% ▸ players currently in pool
@Override
public String onPlaceholderRequest(Player p, @NotNull String params) {
switch (params.toLowerCase()) {
case "time": {
long ms = plugin.getRtpManager().millisUntilTeleport();
long s = TimeUnit.MILLISECONDS.toSeconds(ms);
long m = s / 60;
long r = s % 60;
return "&a" + String.format("%02d:%02d", m, r);
}
case "players": {
return plugin.getRtpManager().playersInPool().stream()
.map(Player::getName)
.collect(Collectors.joining(", "));
}
default:
return "";
}
}
}
━━━━━━━━━━━━━━━━ 3. BUILD & DEPLOY ━━━━━━━━━━━━━━━━
Place the folders exactly as shown above.
Run mvn clean package (Java 17+ required).
Copy target/AreaRTP-1.0.0.jar to /plugins on your Paper 1.20.4 server.
Start the server once; edit plugins/AreaRTP/config.yml to suit your world; /areartpreload to apply changes.
Available commands & permissions:
• /areartpreload – areartp.reload (default: OP)
• /areartpnow – areartp.force (default: OP)
Placeholders (PlaceholderAPI):
• %areartp_time% – time (MM:SS) until next teleport (legacy colour &a)
• %areartp_players% – comma-separated list of names currently inside the pool