mirror of
https://github.com/nkomarn/harbor.git
synced 2024-12-18 22:37:36 +01:00
🌈 Final touches!
This commit is contained in:
parent
510fd352c6
commit
43d4e77f7a
@ -39,6 +39,8 @@ public class Checker implements Runnable {
|
||||
world.getPlayers().forEach(player -> Messages.sendActionBarMessage(player,
|
||||
Config.getString("messages.actionbar.everyone")));
|
||||
skippingWorlds.add(world);
|
||||
|
||||
if (!Config.getBoolean("features.skip")) return;
|
||||
new AccelerateNightTask(world).runTaskTimer(Harbor.instance, 0L, 1);
|
||||
Messages.sendRandomChatMessage(world, "messages.chat.accelerateNight");
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ public class Updater {
|
||||
try {
|
||||
URL latestVersion = new URL("https://api.spigotmc.org/legacy/update.php?resource=60088");
|
||||
URLConnection request = latestVersion.openConnection();
|
||||
request.addRequestProperty("User-Agent", "Harbor");
|
||||
request.addRequestProperty("User-Agent", "Harbor");
|
||||
request.connect();
|
||||
InputStream inputStream = request.getInputStream();
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
@ -51,7 +51,7 @@ public class Updater {
|
||||
URL downloadURL = new URL("http://aqua.api.spiget.org/v2/resources/60088/download");
|
||||
File updatedJarFile = new File("plugins" + File.separator + "update"
|
||||
+ File.separator + jarName);
|
||||
updatedJarFile.mkdirs(); // TODO don't ignore result
|
||||
updatedJarFile.mkdirs();
|
||||
InputStream inputStream = downloadURL.openStream();
|
||||
Files.copy(inputStream, Paths.get(updatedJarFile.toURI()), StandardCopyOption.REPLACE_EXISTING);
|
||||
future.complete("Updated Harbor. Changes will take effect after a server reload/reboot.");
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
values:
|
||||
timer: 2 # How often (in seconds) to run the clock task (used to detect sleep, AFK players, time actionbar, etc.)
|
||||
percent: 100 # Percent of players that need to sleep to skip night (must be between 0 to 100)
|
||||
percent: 50 # Percent of players that need to sleep to skip night (must be between 0 to 100)
|
||||
interval: 60 # Time skip interval that is added when the night get accelerated.
|
||||
|
||||
features:
|
||||
@ -19,7 +19,7 @@ features:
|
||||
phantoms: false # Reset the sleep statistic (practically disables phantom spawns - false = no phantoms)
|
||||
bypass: true # Toggle exclusion of operators/players with permission "harbor.bypass" from sleep count
|
||||
ignore: true # Toggle exclusion of players in creative and spectator mode
|
||||
afk: true # Detect AFK players and remove them from the sleep count (Essentials/API used for detection)
|
||||
afk: true # Detect AFK players and remove them from the sleep count (Essentials API used for detection)
|
||||
notifier: true # Displays a notification when a new update is released
|
||||
|
||||
messages:
|
||||
|
Loading…
Reference in New Issue
Block a user