Skip to content

Random teleport

CobaltiaEffets frames random teleportation: it intercepts players’ RTP commands, applies a daily quota and a cooldown, then starts the teleport to a single configured world. The teleport itself is performed by CMI’s rt command.

config.yml
rtp:
monde: survie # target world name; leave empty to disable the feature

If the world is not loaded, the player gets “World unavailable” and nothing is counted.

/rtp, /rt, /cmi rtp, /cmi rt, /cmi randomteleport (with or without the cmi: prefix) are all handled by the plugin, whatever the arguments, so that players cannot bypass the quota.

  1. Cooldown: at least 5 minutes between two teleports. Before that: “Please wait, next /rtp in N s”.
  2. Quota: number of teleports per day based on the player’s permissions (see below). Quota used up: “No more /rtp” with the player’s quota.
  3. Teleport: the console runs cmi rt <player> <world>, and the player sees how many /rtp remain for the day.

The counter resets every day at midnight, Paris time. Counters are saved to plugins/CobaltiaEffets/rtp.yml (asynchronous, atomic write) and survive restarts; entries older than the previous day are cleaned up automatically.

Permission Effect
(none) 3 /rtp per day
cobaltia.rtp.quota.5 5 per day
cobaltia.rtp.quota.8 8 per day
cobaltia.rtp.quota.12 12 per day
cobaltia.rtp.quota.3 3 per day (explicit)
cobaltia.rtp.illimite No quota (the 5-minute cooldown still applies)
cobaltia.rtp.admin No quota and no cooldown; /rtp without arguments teleports to the configured world, /rtp with arguments is left to CMI (to teleport someone else, pick a world…)

When a player has several quota permissions, the highest one wins.