promotional bannermobile promotional banner

TemplateWorlds

Reverting worlds to an unchanging template

TemplateWorlds

This is a library plugin to create worlds in Bukkit that can be restored back to an unchanging template.

Source is available on GitHubGitHub.

This project uses semantic versioning for its "api" package.

Usage guide

Put this into your Maven pom.xml to include the API jar as a dependency:

<dependency>
	<groupId>com.github.riking.lib.templateworlds</groupId>
	<artifactId>templateworlds</artifactId>
	<version>2.0.0</version>
</dependency>

(Repository info coming soon!)

Simple usage

Here, we create a 'lobby' world which is a clone of 'lobby-template'. Note that the template world is not kept, while the created lobby world is.

ApiMain templateApi = getServer().getServicesManager().getRegistration(ApiMain.class).getProvider();
World templateLobby = getServer().createWorld(new WorldCreator("lobby-template"));
this.lobby = twApi.createWorld("lobby", templateLobby);

Let's say that while the players are waiting for the game to start, the lobby world gets a bit trashed. To revert it back, you want to first remove all players from that world - maybe the game starts, so there's nobody there anymore. Use the resetArea() method over the whole area that the lobby is in:

twApi.resetArea(this.lobby, -5, -5, 5, 5);

The TemplateWorlds Team

profile avatar
  • 5
    Projects
  • 8.1K
    Downloads

More from riking27altView all

  • Ion-H project image

    Ion-H

    • 1.3K
    • Modpacks

    Private modpack for Riking's server

    • 1.3K
    • April 27, 2016
    • Modpacks
    • +3
  • MNH-RS project image

    MNH-RS

    • 0
    • Modpacks

    Make a village, the only way to spread power between houses is immersive engineering

    • 0
    • April 19, 2016
    • Modpacks
    • +2
  •  mcMMO. project image

    mcMMO.

    • 3.0M
    • Bukkit Plugins

    mcMMO

    • 3.0M
    • November 4, 2011
    • Bukkit Plugins
    • +3
  • Horse Data project image

    Horse Data

    • 2.1K
    • Bukkit Plugins

    Simple and Easy Horse Information

    • 2.1K
    • August 28, 2013
    • Bukkit Plugins
    • +1
  • Ion-H project image

    Ion-H

    • 1.3K
    • Modpacks

    Private modpack for Riking's server

    • 1.3K
    • April 27, 2016
    • Modpacks
    • +3
  • MNH-RS project image

    MNH-RS

    • 0
    • Modpacks

    Make a village, the only way to spread power between houses is immersive engineering

    • 0
    • April 19, 2016
    • Modpacks
    • +2
  •  mcMMO. project image

    mcMMO.

    • 3.0M
    • Bukkit Plugins

    mcMMO

    • 3.0M
    • November 4, 2011
    • Bukkit Plugins
    • +3
  • Horse Data project image

    Horse Data

    • 2.1K
    • Bukkit Plugins

    Simple and Easy Horse Information

    • 2.1K
    • August 28, 2013
    • Bukkit Plugins
    • +1