RTP icon

RTP -----

Deterministic-Time Random Teleportation




fix error at startup when PlaceholderAPI exists
----------, Sep 6, 2024

fixed version check from EffectsAPI
removed extraneous debug logs
fixed nullpointerexception in logger when getting a null message
changed some exception handling back to printstacktrace
----------, Sep 5, 2024

  • cleaned up default worldborder initialization methods
  • updated version checking
  • fixed a minor safetyRadius issue
  • updated fill task to fix stalling on chunk loads
----------, Jul 14, 2024

fixed weird behavior with chunkyborder causing RTP to use the wrong shape

all chunky integrated shapes now use a prefix "chunky_"

also added additional logs for certain edge case selection failures
----------, Jun 29, 2023

fix reload command not always working for the base config files

also changed reload command to only update references for modified files
----------, May 5, 2023

temporary solution to biome parameter causing lag if the biome is not discovered yet and if the server requires chunk load on biome get, via extra option in performance.yml

typo fix in regions/default.yml comments

also one memory leak fix, probably. It will take a long time to verify.
----------, Apr 30, 2023

fix titles and subtitles not formatting correctly
----------, Mar 24, 2023

rtp.other permission not working as intended

also a partial implementation of a new option to make console commands easier
----------, Mar 22, 2023

user requested feature, unordered commands with arguments can (less efficiently) work without the argument names

`/rtp [player] [region]` teleports player to region
`/rtp [region] [player]` also teleports player to region

I don't see much benefit from this, but it wasn't hard to implement based on what I already had so far.

if an input is not a subcommand, attempts to resolve the text against available parameters under the current command, sorting by integer priority (all 0 atm).

I did not apply this to tabcompletion (yet), because there would be too many options before typing
----------, Feb 24, 2023

changed selection fail message to represent fail conditions better
changed selection fail message to a lighter aqua color
made load/reload not save files after loading
fixed some more nag messages in exceptional circumstances (like shutdown within 20s of startup)
catch and log any exceptions from runnables in any pipelines
re-implemented placeholders in post-teleport commands
----------, Feb 23, 2023

sometimes a region cache execution would be skipped with the old floating point period calculation.

changed the math to guarantee each is called and in the correct order.
----------, Feb 12, 2023

  • per-region vault prices implemented
  • safety/platform radii no longer capped at 7
  • try some more coordinates within the chunk.
  • guard vert values in update commands, on world change
  • guard vert values in region initialization, based on world limits
  • changed default maxY to 255
----------, Feb 12, 2023

forgot to subtract 1 for negative coordinates.
----------, Jan 22, 2023

when the server version is lower than 1.13 or after any biome lookup in a loaded chunk did not match correctly, get the biome via block check instead of world.getBiome(x,y,z)

fixed console log spacing in 1.8-1.12

stripped color from logs in 1.8-1.12

fixed effects exception in 1.8

include the standing block during y level correction, to fix standing one above water.

fixed RTPLocation.getBlock() to get the block from the correct chunk
----------, Jan 22, 2023

initial biome check was checking the wrong coordinate, so I changed it.
also added support for commas as decimals in numbers.
changed platform method to load the chunk if it got unloaded for whatever reason.
----------, Jan 20, 2023

had the code, forgot to use it.
also changed requireskylight to false by default because giving support for the same lack of reading is tedious
----------, Jan 16, 2023

fix wrong file upload

this is no different from the prior upload, I just put the wrong plugin here
----------, Jan 14, 2023

fix cancel message triggered when clearing weather
shorten clear weather duration to vanilla values
remove apache lang dependency
----------, Jan 14, 2023

fix 1.12 compatibility
----------, Jan 8, 2023

[​IMG]

modified biome check reflective calls to accept a world input
fixed one of the world lookup checks
added iris integration example on github
----------, Jan 8, 2023

changed the biome validity check to keep invalid biomes, to improve biome parameter usage
fixed some biome lookup code
removed apache text to reduce file size, replaced the calls with patterns and matchers
fixed cloned shapes copying references
a bunch of miscellaneous fixes.
cleaned up a lot of the code

this seems stable enough.
----------, Jan 6, 2023

upload_2023-1-1_10-26-12.png

automatically add non-overlapping chunky shapes via reflection, using rectangle as a base type
fixed update command not updating name fields
fixed overlapping fill task and database task calls
fixed case on parameter lookups
readded world save to fill command
removed effect permissions registering due to time cost

(reupload to remove debug log)
----------, Jan 1, 2023

upload_2023-1-1_9-38-47.png

automatically add non-overlapping chunky shapes via reflection, using rectangle as a base type
fixed update command not updating name fields
fixed overlapping fill task and database task calls
fixed case on parameter lookups
readded world save to fill command
----------, Jan 1, 2023

fixed teleporting during reload via busy message
fixed shape configurations overlapping
added rotate() method to shape class
added 3 more shapes
  • CIRCLE_NORMAL - circle with normal (Gaussian) distribution
[​IMG]

  • SQUARE NORMAL - square with normal (Gaussian) distribution
[​IMG]

  • RECTANGLE - shape defined by width, height, and rotation
[​IMG]


fixed chunkyborder addon on github
----------, Dec 30, 2022

do not use on a production server without extensive testing

major code update, mostly for devs

  • split config.yml into appropriately named files
  • redesigned configuration for custom language mappings
  • redesigned region structure and commands for adding shapes and safety checks at runtime
  • redesigned command structure for easier command addition
  • rewrote data storage to use sqlite for player data, all async
  • removed softdependencies to allow compiling in java 8, moved safety checks outside the main plugin
  • added optional logging
  • fixed update commands
  • fixed some nag messages
  • changed how teleporting works when there are no prepared locations
  • reflection for biome functions and a few more things
----------, Dec 29, 2022

there is a known bug that triggers a nullpointerexception when a datapack provides the server an invalid biome. I added a catch for that so that RTP should log the first biome exception but continue to operate as if every biome were PLAINS.

I also removed a debug log that crept into the last update.
----------, Dec 9, 2022

biome parameter price fix - changed rtp.biome.free permission to rtp.free.biome because luckperms handles the regex in rtp.biome.* and I want to use them separately

also changed rtp.near.free to rtp.free.near for a consistent format

fixed a stray exception on join event
----------, Nov 5, 2022

  • added RedProtect claim check
  • fixed some logs not using colors
  • fixed missing log method in 1.8
  • fixed chunk cancellation exception output
----------, Feb 6, 2022

I don't recommend using old server versions and there's probably a few missing method handles that were introduced in newer APIs, but I made at least startup and teleportation work in 1.8-1.12.
----------, Feb 4, 2022

  • added exception handling to effect permission setup
    • unsure if that pesky bug is fixed, as I could not reproduce it
  • delayed permission setup by 2s to reduce odds of collision
  • adjusted worlds.yml to make people stop asking the same question every day.
    • I try, but I don't have infinite patience. I'm not always going to answer questions about things explicitly stated and explained in the config files and in the wiki.
  • added waterlogged placeholder to block blacklist
    • unsure how to check for generic wet blocks like kelp and coral outside of explicitly listing them
  • removed op check from onEvent checks, as operator permissions seem not broken on the latest builds
----------, Jan 31, 2022

added support for adding various worldborders

ChunkyBorder example here

also hotfix for that world name placeholder

also fixed centerX and centerZ using chunk coordinates
----------, Dec 29, 2021

starting with a world name other than "world" would cause errors with the default configuration. This update makes that first startup easier.

  • implemented world number placeholder for world names
  • changed the default configuration to use world 0
  • added extra error handling on rtp command for bad world names
----------, Dec 24, 2021

  • updated plugin core to spigot 1.17.1 api
  • re-added version check, fixed
  • added 3D biome checks (1.17+)
    • using midpoint between minY and maxY, for speed
  • disabled all effects and onEvent teleports for operators (due to a change to permissions functionality)
  • reformatted some code to better fit java 16
  • fixed github snapshot builds
----------, Dec 22, 2021

upload_2021-12-22_4-33-41.png

added %rtp_teleport_biome% to PAPI placeholders

just uses biome name.

softdepends forced me to update to java 16.
----------, Dec 22, 2021

removed the minecraft version check from the api because apparently it doesn't work correctly and I don't need it yet.

adding to the todo list: 3D biome checks
----------, Dec 5, 2021

invulnerable players could end up permanently invulnerable if the server crashed, so I fixed it.

you can use UnsetInvulnerable to automatically amend offline player data.
----------, Oct 17, 2021

the plugin would sometimes queue a given location multiple times because counting asynchronously is hard, so I replaced the counter.
----------, Oct 15, 2021

upload_2021-10-12_21-13-45.png

A free-for-all every 10s is a headache and a half, so I made a per-region player queue to teleport players in the order they input a command. It should be somewhat of a UX upgrade.
----------, Oct 13, 2021

double pass on chunk prep to ensure that every chunk within view distance is loaded before teleporting.

pre-check for claims at the midpoint between minY and maxY before waiting on a chunk, to speed up that case.

I now trust people a bit less to read before deploying, so I've updated the default configuration settings to optimize solely for teleport time and memory usage.
----------, Oct 5, 2021

added info command for checking current region settings

fixed placeholderapi parsing

added some extra config settings for testing and optimization
----------, Sep 30, 2021

the fill task was struggling with chunks coming in too rapidly with iris, so I had to add mutexes to atomics.

I've also switched some Player.hasPermission() checks to ensure that rtp.onevent permissions require explicit setting, even if a user gives themselves *. It isn't the fastest permission check but it's harder to break.
----------, Sep 27, 2021

a user-requested feature
upload_2021-9-26_9-8-45.png

[​IMG]

also fixed note instrument parsing
----------, Sep 26, 2021

rewrote firework format for types and power
[​IMG]

format is detailed here
----------, Sep 26, 2021

potions, notes, sounds, particles, and fireworks, on event, using permissions.

[​IMG]
[​IMG]

see here for formatting
----------, Sep 25, 2021

  • do biome checking before chunk loading
  • extra null checks in vault checker
  • biomes get 10x the attempts because they're faster to check
  • added fill pause and resume commands
    • pause on shutdown
    • resume on "/rtp fill"
  • fill default region if no region is specified
  • API functions for UUID and OfflinePlayer
----------, Sep 22, 2021

I'm not sure how to reproduce the error but maybe this'll help somehow.

edit - it did
----------, Sep 17, 2021

bStats' Metrics got accidentally deleted when I was adding hook functions. This update just restores it.
----------, Sep 17, 2021

  • changed a contains check to a try/catch
  • removed extra isSolid() check, to enable placement over water or lava where desired
  • added a second pass to platform creation, to set liquids to air
  • added platform default material config value, if the location isn't on solid ground
  • sped up region data loading at startup and put it on async threads
----------, Sep 17, 2021

for the purpose of supporting arbitrary location checking functions, e.g. Domain's Check.inField()

also added async TeleportCommandSuccessEvent
----------, Sep 16, 2021

added GriefDefender support
added Lands support

fixed needless cancellation messages on random teleport
fixed the personal queue length check
----------, Sep 15, 2021

added more API events (see here for some basic usage)
  • RandomSelectPlayerEvent
  • RandomSelectQueueEvent
  • LoadChunksPlayerEvent
  • LoadChunksQueueEvent
  • RandomPreTeleportEvent

implemented RTP.getRegion and RTP.setRegion methods

added number of tries to RandomTeleportEvent

fixed some biome detection code for picking up biomes during selection
implemented region expansion for alternate placement modes

added support for:
  • Factions (and any factions plugins using massivecraft.factions as a base)
  • TownyAdvanced
  • HuskTowns
----------, Sep 14, 2021

alternate placement-fixing modes for optimization options

upload_2021-9-11_17-14-29.png

[​IMG]

also re-enabled the tps check while filling and turned the iterator down to 2500, to let the server catch up.

made the fill messages reference lang.yml

this one took a stupidly long time because of health issues.
----------, Sep 11, 2021



relies on running "/rtp fill" beforehand.
  • added rtp biome parameter with its own price
  • added rtp.biome, rtp.biome.[biome], rtp.biome.free, and rtp.biome.* permissions and checks
  • increased fill iterator from 1000 to 5000
  • took off the tps wait on fill
    • it's supposed to be a single-pass command for a region, so it's better to do on a side server or outside of player activity.
  • changed /fill to clear previous data before running
  • changed next fill task to be scheduled from an earlier chunk, to fix a bug from parallelism.
  • fixed price checking on near parameter
  • fixed some price values in the default config that should have been floating point

This is much more than a simple biome check and retry. Thanks to how the regions work, I now have the plugin mapping out relative biome locations during the fill task and getting an approximate nearest specific biome on location selection, which is giving me super-fast biome selection, with practically no difference in load times compared to other unqueued selections.
----------, Sep 7, 2021

another user-requested feature
  • added a check for a "rtp.cooldown.[x]" variable among CommandSender permissions
  • added a check for a "rtp.delay.[x]" variable among CommandSender permissions
  • added rtp.cooldown to plugin.yml
  • added rtp.delay to plugin.yml
upload_2021-9-5_22-1-17.png

upload_2021-9-5_22-2-24.png

upload_2021-9-5_22-17-15.png
----------, Sep 6, 2021

  • fixed api-version in plugin.yml
  • double-guarded the chunk loading task to fix a rare case where it didn't run asynchronously
  • implemented a refund-on-cancel option, true by default because cancellation should throw the selected location back on the pile anyways.
  • made post-teleport-queueing optional, false by default
  • moved cancellation code into a TeleportCancel event and listener, in case anyone wants to hook in
----------, Sep 5, 2021

store cooldowns on shutdown, retrieve cooldowns on startup

[​IMG]

[​IMG]
----------, Sep 5, 2021

upload_2021-9-4_17-2-53.png
  • added hex color format (#xxxxxx) to string parsing
  • changed message delivery everywhere to support hex colors
    • it'll still translate hex codes pre-1.16, but might not read out right
  • ensured any configured commands run after teleportation
  • ensured teleport delay consistency on server startup
----------, Sep 4, 2021

upload_2021-9-3_1-2-40.png
  • fixed a bug regarding placement in nether ceilings (as far as I can tell)
  • added checks to not send a message if it equals "" or has been removed from its configuration file
  • replaced liquid check option with a bukkit material blacklist I called "unsafeBlocks"
    • besides WATER and LAVA, also added MAGMA, TNT, FIRE to the default list
  • added player invulnerability timer on teleport, if player is not already invulnerable
  • added blindness timer on teleport for effect
  • added configurable title card on teleport for effect
  • added platform creation in a square around the location, on teleport
    • including block breakage to make air (may cause lighting bugs)
  • added block checking in a square around the location, on selection
  • added random teleport event for developers
  • changed fill task to not wait for 0 players online.
    • still waits for a high enough TPS before doing the next set
  • changed fill task to send its status message to any players that have the rtp.fill permission
----------, Sep 3, 2021

%rtp_teleport_world%
%rtp_teleport_x%
%rtp_teleport_y%
%rtp_teleport_z%

using current selection if currently teleporting
using last completed teleport otherwise
----------, Sep 1, 2021

fixed cooldown time following the switch to nanoseconds

added a fail message for when a player tries to teleport when they're already teleporting.

added a message for when the plugin starts loading chunks before teleporting.

added in a PAPI expansion
  • %rtp_player_status% - player's current teleport status
  • %rtp_total_queue_length% - total number of locations available to a player in the region that "/rtp" would get
  • %rtp_public_queue_length% - number of locations available to everyone in the region that "/rtp" would get
  • %rtp_personal_queue_length% number of locations allocated specifically to a player in the region that"/rtp" would get
----------, Sep 1, 2021

I don't want to do these by hand, so I used PlaceholderAPI.

see https://www.spigotmc.org/wiki/placeholderapi-tutorial/ for PAPI usage

using player expansion for testing,
upload_2021-8-31_12-54-50.png

I can use any installed placeholders
upload_2021-8-31_12-55-8.png

and it works
upload_2021-8-31_12-55-58.png
----------, Aug 31, 2021

I misread the initial request, so here's an option to teleport to a random player (that isn't the command sender and doesn't have the rtp.near.notme permission), using the rtp.near.random permission.
upload_2021-8-30_23-54-47.png
----------, Aug 31, 2021

run commands on teleport
upload_2021-8-30_22-31-16.png
upload_2021-8-30_22-30-40.png


near parameter with corresponding rtp.near and rtp.near.other permissions
upload_2021-8-30_22-32-43.png
this one works the exact same way as other rtp parameter inputs, just with its own permissions, though I decided to make the settings world-specific because the height range matters for the nether
upload_2021-8-30_22-38-32.png
This unfortunately means config file updates. Sorry (not sorry, these are good features).

fill cancel
not a user request, but I wanted to add it because the fill command is also a basic world loader for teleport regions and world loaders usually have stop/cancel commands.

By the way, I'm using PlaceholderAPI and its Player expansion for coordinates.
----------, Aug 31, 2021

fixing a bug in time representation that was showing larger times in milliseconds than it was actually taking.

----------, Aug 30, 2021

time test:

  • immediately teleport if a location is queued, rather than scheduling a task to run in the next gametick
    • massive command response speedup
  • added viewDistance setting to config.yml, to give some finer control over memory usage
  • changed queueing to finish once the chunks are loaded rather than once the location is selected, improving queue usage.
  • added experimental fill command to check every possible location in a region and do any relevant learning.
    • removed chunk load event because the fill command does the same job but better.
  • set up a rtp.personalQueue permission to queue a next location for any player with the permission
  • minor improvement to selection algorithm
----------, Aug 29, 2021

added Vault as a softdepend and added region prices.
updated config files
added PlaceholderAPI as a softdepend.

Fixed some of the nag messages but there's still an edge case I can't seem to pin down.
Fixed queuePeriod zero check.
Added setRegion and setWorld to the help menu according to permissions
Fixed a few of the boolean region parameters not having boolean tabcompletion
----------, Aug 27, 2021

Added plaintext region data files to store/retrieve learned data between restarts.

also fixed a memory leak.

stress test:
----------, Aug 24, 2021

it should divide by 16 to get the radius in chunks
----------, Aug 24, 2021

Optimizations -
  • switching to purely chunk locations speeds up location checking and slightly reduces memory usage.
    • UPDATE YOUR REGIONS SETTINGS
    • using x,z = 7,7 in each chunk
  • using ChunkSnapshot.getBlockType(x,y,z) seems to be faster than using Location.getBlock()
  • returning early from location checks if they approach maxY speeds up selection noticeably.
  • also significantly sped up chunk checking on load event.
Fixes -
  • fixed extra message on no queued location
  • Adding 0.000069 (nice) seems to fix a floating point error in circle location that was shifting selections by a few units.
  • fixed timers running too close together
  • switched an int to a long to fix an integer overflow issue with large radii
----------, Aug 24, 2021

switched to java 8 and spigot 1.13 api to support earlier server versions.

also fixed occasional unintended behavior on teleport cancel.
----------, Aug 22, 2021

added GriefPrevention as a softdepend
added config option

updated config version
----------, Aug 21, 2021

added worldguard as a softdepend
added a config value to do/don't reroll if the selection is in a WorldGuard region

fixed/enabled first join and world change events that weren't firing
----------, Aug 21, 2021

switching from chunk curve to location curve, to ensure no placement attempts outside of curve. It's a little extra, but it's hard to notice.

also fixed a piece of the learning algorithm in the process.
----------, Aug 19, 2021

lots of changes since last week
  • added unique location setting to regions.yml, to ensure each randomization lands in a new spot
  • added expand option to config, to extend the selection range as chunks are eaten.
  • added onEvent permissions for random teleportation on various movement events and/or respawn event.
    • join
    • respawn
    • changeWorld
    • move (this one's hilarious)
    • teleport (recursive, useful for stress testing)
  • added unqueued permission to control who can generate a new (not queued) location for a teleportation, thereby limiting default users' control over server performance.
  • added an async location queue task after teleportation, to line up a next teleport on a low-priority task, rather than rely solely on a timer.
  • cleaned up a lot of the code
Thanks to the plugin's design, the new region options won't impact the number of rerolls, which I'm super proud of.
----------, Aug 18, 2021

tilde usage broke because I moved it

quick fix
----------, Aug 13, 2021

changed some stuff to make independent teleport regions a thing

/rtp set is now split into /rtp setWorld and /rtp setRegion

regions can be created or updated by the /rtp setRegion command
updating a region will clear its data
multiple regions can be created in each world, though only one can be the world's default region.
there's now a region parameter available for console and player commands, for teleporting to a selected region

each world is now linked to a region in regions.yml
world settings can be updated with /rtp setWorld
world name placeholders are now represented correctly in commands

rtp.instant permission is now split into rtp.noDelay and rtp.noCooldown
----------, Aug 12, 2021

semi-stable foundational update, but a big step in the direction I want to go.

I thought of a method to learn from bad placements, lowering the number of retries as more bad placements are detected.

I'd call it machine learning, but it isn't a traditional ML model.

Also added /rtp parameters to generate a random location based on inputs
----------, Aug 9, 2021

because apparently the other one didn't work
----------, Aug 6, 2021

players shouldn't be teleported into lava or the void (changed max attempt check)
added tps prerequisite for queue attempts
queued chunks stay loaded until the teleport happens
queues reset on both world setting update and reload
----------, Aug 6, 2021

Made teleportation wait on async chunk loading to improve UE
Added async location & chunk caching, from a timer and from cancelled teleports
massively improved chunk load time on cached locations
saves performance waste on /rtp spam
the timer distributes load cost over time, until it hits a max queue length
Chunk pre-gen is recommended to reduce chunk loading costs​
Added tabcompletion for true/false values in /rtp set
Added worldBorderOverride value for vanilla world border settings
worldBorder plugins are too erratic for me right now​
Fixed integer overflow for supermassive teleportation radii, at the expense of computation time on selection if the radius is over ~1.5 billion
As those worlds are practically impossible to pre-gen, performance is not a priority there​

I'm seeing an occasional error on server reload/restart where an async chunk is loading, even if I track and cancel() every task and chunk. I've been at it for a while, so I doubt I'm going to fix it without another set of eyes.
----------, Aug 5, 2021

I thought I should add this.
on /rtp set, for coordinate settings, tilde will use your current location, plus or minus whatever number
----------, Aug 2, 2021

added '/rtp set' for updating world parameters by command
tab for parameters
tabComplete rewritten
added weight parameter to world config
made teleport task immediately schedule if delay is 0
try/catch in a few places to make unit tests possible

I think replacing world settings with region settings will be pretty easy later with these methods, since a few people seem to be looking for that. It's on the todo list.
----------, Aug 2, 2021

fixed centering
made a new square-donut randomization algorithm
added world and player teleport options, as well as perms for managing who can do that
added override world to worlds.yml, removed default world from config.yml
removed world name placeholder for now
----------, Jul 31, 2021

Resource Information
Author:
----------
Total Downloads: 291,477
First Release: Jul 30, 2021
Last Update: Sep 6, 2024
Category: ---------------
All-Time Rating:
31 ratings
Find more info at github.com...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings