-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added configurable cooldown and warmup times
- Loading branch information
Percyqaz
committed
Dec 20, 2021
1 parent
f1db7cd
commit e763a7d
Showing
4 changed files
with
150 additions
and
16 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,26 @@ | ||
package me.Percyqaz.Lodestone; | ||
|
||
import org.bukkit.configuration.file.FileConfiguration; | ||
import org.bukkit.plugin.java.JavaPlugin; | ||
|
||
public class Lodestone extends JavaPlugin { | ||
|
||
FileConfiguration config = getConfig(); | ||
|
||
@Override | ||
public void onEnable() { | ||
config.addDefault("cooldownSeconds", 60); | ||
config.addDefault("warmupSeconds", 2); | ||
config.addDefault("teleportFailedWaitForCooldown", "§4You cannot teleport for another %cooldown% seconds!"); | ||
config.addDefault("teleportFailedMovedBeforeTeleport", "§4Teleport cancelled because you moved!"); | ||
config.addDefault("teleportFailedCompassNotInHand", "§4Teleport cancelled because the compass is no longer in your hand!"); | ||
config.addDefault("teleportSucceeded", "§9Whoosh!"); | ||
config.addDefault("teleportSucceededNamedLocation", "§9Whoosh! Teleported to §a%location%"); | ||
|
||
config.options().copyDefaults(true); | ||
saveConfig(); | ||
|
||
this.getLogger().info("Listening to right clicks"); | ||
getServer().getPluginManager().registerEvents(new CompassListener(), this); | ||
getServer().getPluginManager().registerEvents(new CompassListener(this, config), this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: Lodestone | ||
version: 1.0 | ||
version: 2.0 | ||
author: Percyqaz | ||
main: me.Percyqaz.Lodestone.Lodestone | ||
api-version: 1.16 | ||
api-version: 1.18 |