Spawn Travel

Spawn Travel

1.8k Downloads

SERVER ONLY MOD (DOES NOTHING  IN SINGLEPLAYER)

download goal: 2 (yes.. only 2..) Well.. now I'm happy..

Most of my mods, I typically just make for myself.. The useful ones I tend to put on curse!

For now this mod adds a command that will randomly teleport the player a certain distance away from there location.. The only catch is that this command only works at spawn so teleportation can't really be abused much...

Usage: /travel (distance)

Example: /travel 500
The above example will teleport the user randomly 500 blocks away from their current position..

Code breakdown:

Basically whenever a player attempts to travel, the mod checks the config if the command meets the requirements, after it verifies it does, it then proceeds to do calculations to determine the best 'random' location to teleport the player to that's on the surface.. afterwards it has the server issue the /tp command to the player. So instead of just teleporting the player, having the sever command teleport might leave logs in case the location of teleportation is needed...

Config: (Allows setting of the following);

Control The Min/Max Possible Distance
How Close A Player Must Be To Spawn In Order To Travel
Does The Player Need To Be At Spawn To Travel

Recommended Config Settings:

I:"Max Teleportation Distance"=800
I:"Min Teleportation Distance"=400
I:"Must Be Within 'X' Blocks of Spawn To Teleport"=30
B:"Teleport From Spawn Only"=true