DamagingToBed

DamagingToBed

858 Downloads

*** Due to unwise and scummy decisions by Curse, my Bukkit Dev account will be inaccessible starting March 1st, 2018. Thus, I can no longer update any of my plugins here on the Bukkit Dev site. Please find the new repo for this plugin at the excellent SpigotMC site: https://www.spigotmc.org/resources/damagingtobed.53318/ ***

What is it?

DamagingToBed is a plugin that lets users teleport to their bed at the cost of hearts. This prevents players from abusing the command, and can be used to...

  • Prevent spamming teleport
  • Prevent using teleport to flee from PvP or other battles
  • Discourage the use of the teleport in general, for servers where it shouldn't be used frequently

------------------------

Appears to work fine in CraftBukkit/Spigot 1.8.X and 1.9.X. It should be compatible with all versions.

IF UPDATING TO 1.0.2.3, delete your current config file beforehand so that the new one may be deployed!

------------------------

Setup

  • Download the JAR to your plugins directory. Self explanatory for GUIs. For those using an Ubuntu/Debian terminal, use "wget jarurl" with the url to the jar file (go to the Files tab) in quotes. If you don't have access to the terminal the host is managing, you can try to use an FTP program to connect via SFTP and upload the jar file.

Configuration

  • Only one file in the data folder: config.yml
  • config.yml has two fields that are clearly marked up via comments

Commands/How to Use

  • /home - if you have enough health to take (as specified by the price), you will be teleported to your bed and the health will be deducted. In creative and spectator mode, health will not be deducted or required to use /home. Default price is 15.0 (7.5 hearts)
  • /homePrice <newprice> - set a new price for /home. Ranges from 0.0 (no damage) to 19.0 (9.5 hearts).
  • /homeKindness <true/false> - toggle kindness for /home. If true, players are checked before use, and if they cannot pay the hearts, they are warned. If false, the command executes regardless, potentially killing the player.

Permissions

  • damagingtobed.home - permission for /home, default is true (all players)
  • damagingtobed.homeprice - permission for /homePrice, default is op (only OPs can use it)
  • damagingtobed.homekindness - permission for /homeKindness, default is op

Workarounds for Essentials

If you are using Essentials on your server, but want to use this plugin in place of Essential's /home command, you will need to modify permissions.

  • Get a permissions manager (bPermissions is recommended)
  • Set the permission for the home command from Essentials to false for everyone - it's probably something similar to essentials.home
  • If needed, set the permission for this plugin to true - damagingtobed.home

Default Config

# Adjust the price value to change how much health is required to use /home
# Value should be a double from 0.0 to 19.0
# 0.0 means no health is deducted
# Each increment 1.0 is half a heart, e.g. 5.0 equals 2.5 hearts out of 10
# The default is 15.0, which is 7.5 hearts
# ----------------------------------------------------------------------
# If kindness is false, the /home command will always try to tp the player, even if they do not have enough health, possibly killing them
# While set to true, however, if the player doesn't have enough health, they will just be notified
price: 15.0
kindness: true