Skip to content

KTK27YT/lease_plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

                                _
                                | |    ___  __ _ ___  ___
                                | |   / _ \/ _` / __|/ _ \
                                | |__|  __/ (_| \__ \  __/
                                |_____\___|\__,_|___/\___|
                                ------------------------------------------------
                                Minecraft plugin for leasing commands to players

Is it me or do you also want a plugin where you want to give players a temporary permission?
giving players creative mode, op for a brief period. Like having a temp admin take over for you

This plugin allows you to do just that!

Installation:

For server owners:
download the plugin from the releases tab, and put it in your plugins folder.
you can also go to the Spigot Page and view it from there

For developers:
clone the repository, and make sure you add Bukkit as a dependecy.

Usage:

Command Usage:

To grant leases:

/lease <lease_name> <player_to_give_lease> <duration (in minutes)>

to view active leases:

/activelease

Config:

To properly make use of this plugin, there's a lease.yml file that gets created in the your_server/plugins/Lease folder.
Here's how the config looks like:

leases:
  creative:
    start_cmd: "gamemode creative %player%"
    end_cmd: "gamemode survival %player%"

  op:
    start_cmd: "op %player%"
    end_cmd: "deop %player%"

  spectator:
    start_cmd: "gamemode spectator %player%"
    end_cmd: "gamemode survival %player%"

You can add as many leases as you want, and you can also edit the existing ones.
To create a new lease you want to:

name_of_your_lease:
    start_cmd: "command_to_execute_when_lease_starts"
    end_cmd: "command_to_execute_when_lease_ends"

Note: make sure to add %player% where a players name is mentioned
For example: when running the creative lease on John:

/gamemode creative %player%
/gamemode creative John

and

start_cmd: What command to run when the lease is granted?
end_cmd: What command to run when the lease is expired?

Permissions

There are 2 permissions that come with this plugin:

lease.lease - allows the player to grant leases
lease.activelease - allows the player to see active leases

Note: these 2 permissions are granted to OP users by default.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Also explain what changes you have made, so I can learn from it too!

License

MIT