That One Spawn Plugin

That One Spawn Plugin

This is a minimalistic plugin that maintains a single spawnpoint for the entire server. It was designed with ease of use, efficiency, compatibility with other plugins and simple functionality in mind. See section 6.5 as to why I made it.

Commands

/spawn - Takes you to spawn
/setspawn - Sets the spawn
/reloadspawn - Reloads the config file

Permissions

A permissions plugin is not required!

By default not-ops can go to spawn and ops can set and reload spawn. This should be fine for most cases, but can always be overridden with permissions if you have something else in mind.

Nodes

  • spawn.goToSpawn - Allows one to go to spawn
  • spawn.setSpawn - Allows one to set the spawn
  • spawn.reloadSpawn - Allows one to reload the spawn

I added some convenience nodes that are easier to remember:

  • spawn.user - Allows one to go to spawn
  • spawn.admin - Allows one to set and reload the spawn
  • spawn.* - Allows use of all spawn commands

Configuration

Defaults:

GoToSpawnOnDeath: true
letOtherPluginsChangeSpawn: true

GoToSpawnOnDeath - If this is true then players will be teleported to spawn on death. Set this to false if you want another plugin to decide where they respawn (like a homes plugin), or if you want them to respawn at their beds.

letOtherPluginsChangeSpawn - If this is true, then another plugin can change the spawn. If this is false, then this plugin will stop a plugin from changing the spawn of the world. This might not do anything depending on how that plugin is written, and will not do anything if the spawn of a world other than the world the main spawn is in is being changed.

Installation

This is a very simple plug-and-play plugin. For most users, no setup should be required. Just put the plugin in the plugins folder and reload the server. Log in as an op or someone with permissions, stand at your desired spawnpoint and issue /setspawn.

Final Remarks

Philosophy

I like the thought of plugins having one job, and doing them well. Even if it may not be true, I feel like plugins juggling too many responsibilities at once don't do those things to the best of their abilities.

Under the Hood

This plugin should be highly scalable and very efficient. It writes and saves the spawn to flatfile (Config.yml). However, it also keeps the spawn location in memory for quick access. It only reads from the file if the location is not in memory. This might be overkill, but like I said, I like the thought of a plugin having one job and doing it well.

Unlicense

This code is waived of an actual license and is open to the public domain. You may do whatever you want with it. You could even resubmit it and say that you made it (but nobody likes a plagiarist).

Source

Source can be found Here.

The source is heavily documented, so if you're a newbie hoping to get into plugin programming, I think that the source for this plugin would be a valuable resource.

Why Make Another Spawn Plugin?

I couldn't find a simple spawn plugin that suited my needs

Thank you

If you have any questions comments or concerns, send me a pm. I don't check the comments sections of my plugins very often.


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    77565
  • Created
    Apr 5, 2014
  • Last Released File
    Jul 5, 2014
  • Total Downloads
    11,744
  • License

Categories

Members

Recent Files