promotional bannermobile promotional banner

SpawnTag

Tag a player and they cannot enter the spawn for 20 seconds!

Welcome!

Changes

If you've been using a version older than 1.2, you'll need to delete your config.txt and recreate your regions with an updated version of the plugin. The radius of the region was not persisting, but that has been corrected. Sorry about that.

Features

SpawnTag allows players to be "tagged" by others. When one player attacks another, they become "tagged," meaning that they will be unable to enter or more move within the spawn for 20 seconds. However, if they are tagged again before their time is up, the time will start over at 20 seconds!

The tag regions must be created via commands, specifying the world in which the region will exist. Soon, the plugin will allow a radius around the spawn to be specified as opposed to the default spawn radius.

Players are notified upon being tagged. They are also informed when they attempt to enter a spawn tag region. Once their timer is up, they receive a message telling them so.

Commands

/stspawncreate [world name] [radius] - Creates a region around the spawn of [world name] with a radius of [radius] blocks. By default, the radius will be the radius of the spawn.

/stspawndelete [world name] - Deletes the region around the spawn of [world name], if it exists.

Configuration/Installation

When you run your server for the first time with this plugin, it will create its own data folder. From there, when a region is created, a config.txt file will appear within the plugin's data folder (/myserver/plugins/SpawnTag/config.txt).

Within this config file, the unique ID of the world in which the region exists is saved. Deleting a world will result in that world's ID being removed from the config file.

Once you've got a config file created and some data is stored within it, the plugin will load the saved regions when the server starts.

Issues

Some of the currently tested and theoretical issues include:

  • Players tagged within the spawn are unable to change where they're looking; they are effectively paralyzed.
  • While untested, players who attempt to enter the spawn while tagged may become paralyzed on the edge of the spawn until they become "untagged."

Code

Because I'm unfamiliar with how this forum sets up repositories, here's a link to the github repository where I've uploaded the code.

Code Outline

  • Plugin is enabled -> Regions are loaded from the configuration file, instantiating SpawnTag regions from the unique IDs found within it.
  • Player is attacked -> If the attacker was also a player, a player tag event is spawned along with a tag timer object. The tag timer is a scheduled runnable which executes after approximately 20 seconds. The tag timer is canceled and replaced with a new one for the player if the player is tagged again before their timer ends.
  • Player moves -> If the player is tagged and their movement enters or is within a spawn tag region, their movement is cancelled.
  • Tag timer ends -> A tag timer end event is spawned. The player is now allowed to move freely about the spawn tag regions.

The SpawnTag Team

profile avatar
  • 6
    Projects
  • 8.1K
    Downloads

More from _ForgeUser19523935View all

  • Soul Bound project image

    Soul Bound

    • 1.0K
    • Bukkit Plugins

    Allows players to bind item such that they are destroyed upon death and drop.

    • 1.0K
    • May 3, 2015
    • Bukkit Plugins
    • +2
  • Space Suits project image

    Space Suits

    • 1.0K
    • Bukkit Plugins

    Allows worlds to be "space worlds" in which being without your space suit can prove deadly.

    • 1.0K
    • April 10, 2015
    • Bukkit Plugins
    • +2
  • Roleplay Character Cards project image

    Roleplay Character Cards

    • 837
    • Bukkit Plugins

    Cards for a quick summary about one's roleplay persona.

    • 837
    • April 6, 2015
    • Bukkit Plugins
    • +4
  • NoPermsTeleport project image

    NoPermsTeleport

    • 2.3K
    • Bukkit Plugins

    Allows for the use of /tpa like commands without needing permissions.

    • 2.3K
    • March 30, 2015
    • Bukkit Plugins
    • +1
  • Soul Bound project image

    Soul Bound

    • 1.0K
    • Bukkit Plugins

    Allows players to bind item such that they are destroyed upon death and drop.

    • 1.0K
    • May 3, 2015
    • Bukkit Plugins
    • +2
  • Space Suits project image

    Space Suits

    • 1.0K
    • Bukkit Plugins

    Allows worlds to be "space worlds" in which being without your space suit can prove deadly.

    • 1.0K
    • April 10, 2015
    • Bukkit Plugins
    • +2
  • Roleplay Character Cards project image

    Roleplay Character Cards

    • 837
    • Bukkit Plugins

    Cards for a quick summary about one's roleplay persona.

    • 837
    • April 6, 2015
    • Bukkit Plugins
    • +4
  • NoPermsTeleport project image

    NoPermsTeleport

    • 2.3K
    • Bukkit Plugins

    Allows for the use of /tpa like commands without needing permissions.

    • 2.3K
    • March 30, 2015
    • Bukkit Plugins
    • +1