This plugin allows players to set a spawn point and teleport to it.
https://modrinth.com/plugin/fancysetspawn
- Set spawn: Players can set the spawn to their current position using the
/setspawncommand. - Teleport to spawn: Players can teleport to the spawn using the
/spawncommand. - Sound effects: The plugin plays sound effects during teleportation and spawn setting.
- Configuration management: The plugin uses configuration files to manage messages and sounds.
- API: The plugin provides an API for other plugins to interact with it.
- Download the plugin from GitHub.
- Place the plugin files into the
pluginsfolder of your Minecraft server. - Restart the server.
- Set spawn: Use the
/setspawncommand. - Teleport to spawn: Use the
/spawncommand.
The plugin configuration can be found in the config.yml file. Here you can modify messages and sound effects.
messages:
spawnSet: "&aSpawn has been set to your current position!"
teleportToSpawn: "&aYou have been teleported to the spawn!"
spawnNotSet: "&cSpawn position is not set."
commandOnlyPlayer: "&cThis command can only be used by players."
sounds:
teleport: "minecraft:entity.experience_orb.pickup"
setSpawn: "minecraft:entity.experience_orb.pickup"
playerJoin: "minecraft:entity.player.levelup"
soundSettings:
volume: 1.0
pitch: 1.0
The plugin provides a simple API for other plugins:
// Example usage of the API in another plugin
public void teleportToSpawn(Player player) {
// Get the instance of the FancySpawn plugin
SetSpawn plugin = (SetSpawn) getServer().getPluginManager().getPlugin("FancySetSpawn");
if (plugin != null && plugin.isEnabled()) {
// Get the API
FancySpawnAPI api = plugin.getAPI();
// Teleport the player to the spawn location
api.teleportPlayerToSpawn(player);
}
}- getSpawnLocation() – Returns the spawn location
- teleportPlayerToSpawn(Player) – Teleports the player to the spawn location
- isSpawnSet() – Checks whether the spawn location is set