Skip to content

A simple Spigot-API Minecraft plugin for a home system

License

Notifications You must be signed in to change notification settings

MrMyastan/CountryRoads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 

Repository files navigation

License: MIT Tested on: Spigot 1.16.1 Language: Java API Jar: 1.16.1-R0.1 Version: v1.1.1 Total Downloads

CountryRoads (Take me Home)

A basic Spigot-API Minecraft plugin for a home system. You can feel free to modify the code for your own use (just make sure to credit me for my code), and use the plugin for your own server! Any suggestions for improvements or features are welcome!
Credit to Tordek for the name

Compatibility

I've tested the plugin using a Spigot 1.16.1 server and made the plugin using the 1.16.1-R0.1 Spigot-API jar, and v1.3 and onwards are compiled with Java 8 (before is Java 11)

Features

  • home command
    • teleport to your home specified by [name] or if no home is specified your home named default
    • all players have permission to use this command by default
    • usage: /home (name)
  • addhome command
    • add a home location with the name specified by [name]
    • all players have permission to use this command by default
    • usage: /addwhome [name]
    • will override an existing home location with the same name
    • a home named default will be the one a player is teleported to if they use /home without specifying which of their homes
  • delhome command
    • removes the home location specified by name, people with the countryroads.manageotherhomes permission can remove other players homes (specified by owner)
    • all players have permission to use this command by default
    • ops have permission to delete other's homes by default
    • usage: /delhome [name] (owner)
  • in the config you can set max number of homes or set it to 0 or less disables the limit
    • if you lower the limit and a player has more than the new limit they can keep their homes but will have delete homes until they have less than the limit if they want to add a new home

Notes

If you are using offline mode and for whatever reason one of your players changes their name (and thus their offline mode UUID) you will need to replace their old offline mode UUID with their new offline mode UUID in the config for them to get access to their homes again
Not sure what will happen if the entry for a person is doubled (ie, using offline mode and someone added home locations after changing their name and then you changed their old UUID to their new UUID so there are two sets of homes under the same UUID), so I would advise merging the two sets of entries

To-Do

  • write this readme
  • improve error messages
  • comment my dang computing instructions
  • maybe a list homes feature?
  • tab completion
  • store by UUID?
  • system for limiting number of homes
  • api for players number of remaining homes
  • put a little color in the error messages
  • error messages: gordon ramsay edition mode
  • see if i can switch to just set and list instead of extra list in tab completion
  • store some frequently used returns in variables
  • players can't use the home system with negative homes remaining
  • homes remaining command
  • api methods ensure player has data store (or do on player join, maybe cache names?)
  • switch from storing homes remaing to storing absolute amount (i think that will be simpler?)
  • disabling home limits doesnt freeze homes remaining?
  • tell homes remaining api utility function