Code Monkey home page Code Monkey logo

harbor's Introduction

Harbor 1.6 banner

โš“ Harbor

CodeFactor License Discord

Harbor is a plugin that redefines sleep within your Spigot server! Harbor is lightweight and performant, with just the right amount of features for any survival server!

Check it out and download the latest builds over on the releases page!

๐Ÿ”จ Building from source

Harbor uses Maven to handle dependecies and building! Make sure you have Java 8, Git, and Maven installed, and then run:

git clone https://github.com/nkomarn/Harbor.git
cd Harbor/
mvn package

You can find the compiled JARs in the target directory.

๐ŸŽบ Contributing

Feel free to create pull requests with any changes or improvements that think would make Harbor a better plugin! Generally, try to keep core plugin features intact. Pull requests with bugfixes are welcome!

๐Ÿ“‹ License

Harbor is licensed under the MIT license. View LICENSE for more information.

harbor's People

Contributors

aakatz3 avatar jasonhorkles avatar lucyydotp avatar mend-bolt-for-github[bot] avatar nkomarn avatar rainbowdashlabs avatar rolandvonrotz avatar synt3x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

harbor's Issues

v1.4.2 null pointer exceptions when OP sleeps

An op attempting to sleep causes the following errors ....

Could not pass event PlayerBedEnterEvent to Harbor v1.4.2
org.bukkit.event.EventException: null
---snip stack trace---
Could not pass event PlayerBedLeaveEvent to Harbor v1.4.2
org.bukkit.event.EventException: null
----snip---

I was the only player and the night did pass. When I deop'ed myself there were no errors.
Attached is the full log.
latest.log

edited to add...
Even as OP when I set harbor.bypass to false the null pointer exceptions did NOT occur.

Option for constant 'needed total'

What I mean is instead of the "needed" count counting down when a player sleeps, it would be nice if the needed count would be a constant divisor of the amount of players online. For example, if there's 4 players online and the count is 50%, I'd like the chat to go:

<Player> is now sleeping (1/2)
<Player2> is now sleeping (2/2)
Good morning!

But instead, with the current needed variable, it goes:

<Player> is now sleeping (1/1)
<Player> got out of bed (0/2)

Which is very confusing. It'd be very nice to have this as an option!

Sleep attempt during day increments sleeping count

Hi. Using Harbor v1.4 on a Spigot 1.13.2 server, made no changes to the default config.yml,

I was the only player online and made several attempts to sleep during the day. The following messages were shown in the client and in the log....

[21:27:13] [Server thread/INFO]: cjucoder is now sleeping (1/1. 0 more needed to skip).
[21:27:16] [Server thread/INFO]: cjucoder is now sleeping (2/1. 0 more needed to skip).
[21:27:18] [Server thread/INFO]: cjucoder is now sleeping (3/1. 0 more needed to skip).
[21:27:20] [Server thread/INFO]: cjucoder is now sleeping (4/1. 0 more needed to skip).
[21:27:22] [Server thread/INFO]: cjucoder is now sleeping (5/1. 0 more needed to skip).
[21:27:23] [Server thread/INFO]: cjucoder is now sleeping (6/1. 0 more needed to skip).
[21:27:28] [Server thread/INFO]: cjucoder is now sleeping (7/1. 0 more needed to skip).
[21:30:13] [Server thread/INFO]: cjucoder is now sleeping (8/1. 0 more needed to skip).

---snip--- set the server to night so sleep attempts would be successful

[21:38:25] [Server thread/INFO]: Set the time to 13000
[21:38:28] [Server thread/INFO]: cjucoder is now sleeping (9/1. 0 more needed to skip).
[21:38:28] [Server thread/INFO]: cjucoder has made the advancement [Sweet Dreams]
[21:38:49] [Server thread/INFO]: cjucoder is now sleeping (9/1. 0 more needed to skip).
[21:39:41] [Server thread/INFO]: cjucoder is now sleeping (9/1. 0 more needed to skip).

NPE every second after a player sleeps

I get a NPE in the console every second after a player has slept

I'm on harbor 1.4.4 and Spigot git-Spigot-b0f4c22-2ced023 (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT)

[11:37:18] [Server thread/WARN]: java.lang.NullPointerException
[11:37:18] [Server thread/WARN]: 	at techtoolbox.Harbor.ActionBarMessage.run(ActionBarMessage.java:10)
[11:37:18] [Server thread/WARN]: 	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:81)
[11:37:18] [Server thread/WARN]: 	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:392)
[11:37:18] [Server thread/WARN]: 	at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:889)
[11:37:18] [Server thread/WARN]: 	at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:417)
[11:37:18] [Server thread/WARN]: 	at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:831)
[11:37:18] [Server thread/WARN]: 	at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:729)
[11:37:18] [Server thread/WARN]: 	at java.lang.Thread.run(Thread.java:748)

This happens on a regular interval of 1 second
Restarting the server fixes this until a player has slept in a bed

Let me know if you need more info

Adding plugin removes /home bed for players

So before adding this plugin my players had access to /home bed.

After adding - there is no /home bed whenever they do /homes

Any thoughts on this? Didn't see anything in the config regarding.

Using Essentials and Group Manager

Github releases

Thanks for this plugin! Any chance you could also publish releases on Github when they're out? It'd let folks like me watch this repository for releases to get notified (since I don't have an account on the Spigot website, and I assume you can watch for updates there).

Its getting late message disable

is there any way to disable the message that appears in the middle of your screen when it gets to the night the message of
"it's getting a bit late, better hit the hay"
it's distracting to some of the server members.

Another server that uses harbor

Hey there, I've been a pretty avid Harbor user and I noticed on your Spigot page you have a "servers that use harbor" category.

I host a server called Friends Vanilla, whose goal is to stay online for a lifetime. Would you want to add it?

https://www.friendsvanilla.net/

The server IP is friendsvanilla.net

If not I totally understand, was just wondering if you wanted another server to add to your list ;)

Admins with bypass permission can't sleep

My admins keep getting attacked by phantoms because they are unable to sleep the night away due to the bypass permission. Can you make it so that they count towards the needed sleep number when they sleep, but don't count toward the total number of players?

Feature request

Could you please add a world black list, I dont want to see any sleep msgs unless im in the overworld. Sleeping in the nether or end doesnt make much sense and theres no reason at all for it to be seen in the creative or minigame worlds

Harbor 1.5 - 1.13.2 Backwards Compatibility Not Working Correctly

Using the release jar (Distributed through spigotmc.org) of Harbor 1.5 the backwards compatibility doesn't appear to be working as intended. It appears to be attempting to bind to 1.14 and then not correcting to 1.13, might be an issue with it not accounting for paper?

Server Info
Running Paper version git-Paper-626 (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT)

Java Version '1.8.0_212'

Plugins (27): AnimatedFrames, BuycraftX, CoreProtect, CrazyCrates, CustomCommands, DistributedMobSpawns, Dynmap, Dynmap-WorldGuard, EssentialsX, FishinRoulette, GCore, Harbor, Holographic Displays, LuckPerms, MapManager, NuVotifier, PacketListenerAPI, PlanAnalytics, PlayerHeads, Shopkeepers, SuperbVote, Vault, WorldBorder, WorldEdit, WorldGuard

Trace

[12:06:23] [Server thread/ERROR]: Could not load 'plugins/Harbor - 1.5.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.14
at org.bukkit.craftbukkit.v1_13_R2.util.CraftMagicNumbers.checkSupported(CraftMagicNumbers.java:226) ~[patched_1.13.2.jar:git-Paper-626]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:130) ~[patched_1.13.2.jar:git-Paper-626]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:334) ~[patched_1.13.2.jar:git-Paper-626]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:255) ~[patched_1.13.2.jar:git-Paper-626]
at org.bukkit.craftbukkit.v1_13_R2.CraftServer.loadPlugins(CraftServer.java:331) ~[patched_1.13.2.jar:git-Paper-626]
at net.minecraft.server.v1_13_R2.DedicatedServer.init(DedicatedServer.java:235) ~[patched_1.13.2.jar:git-Paper-626]
at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:787) ~[patched_1.13.2.jar:git-Paper-626]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]

Sleeping during a thunderstorm loops "The night has been skipped"

We're running Harbor v1.6.2-SNAPSHOT on Minecraft 1.15.2. Our night-skip settings are:

night-skip:
  enabled: true # Skip the night if a percentage of the players in a world are sleeping
  percentage: 50 # Percentage of players required to be sleeping to skip the night (0 - 100)
  time-rate: 70 # The amount of ticks added to the current time every tick when skipping the night
  daytime-ticks: 1200 # The time in ticks that Harbor considers day
  instant-skip: true # Instantly skip the night instead of showing the full animation
  proportional-acceleration: false # Increase the night skipping speed based on the amount of sleeping players
  clear-rain: true # Clear rain (if it's raining) when the night is skipped
  clear-thunder: true # Clear thunder (if it's thundering) when the night is skipped
  reset-phantom-statistic: false # Treats everyone online as if they have slept in the last 3 days after the night is skipped (check out /gamerule doInsomnia on 1.15+)

If we sleep during a thunderstorm, the following sequence of events occurs:

  1. 50% of players begin to sleep
  2. Night advances to day
  3. We get a "The night has been skipped"
  4. The thunderstorm has not been skipped, all players remain sleeping
  5. Repeat 3 and 4 ad nauseum until players begin getting out of bed
  6. If all players are sleeping, clear thunder, advance to day, and kick players from their beds.

I think intended behaviour should be that the thunderstorm is skipped and we go to morning, just like if it was night and we were sleeping.

Add WorldGuard Support

Feature Request

Add a Worldguard region custom flag that excludes a player from being counted if they are within the region.

Float value

Hey there, as we usually go to sleep on the server, it often says "0 players remaining" and it is still night time. It looks like (from my point of view, but I am no expert) there is a value counted as a Float inside your sendActionbar function, inside Main. I am not sure if this is the place where to look at or if it is somewhere else, but it would be much appreciated to be set as an integer, so we do not have to look for like "0.4" of a player. Thanks very much, keep up the great work!

Chat messages are not used?

Chat messages are defined in plugin's configuration, yet they aren't used anywhere. Is this intentional? I favor chat messages over actionbar ones because actionbar messages aren't really noticeable.

I need some help, please.

I installed this plugin on my server, and this is my config:

features:
  phantoms: false # Reset the sleep statistic (practically disables phantom spawns - false = no phantoms)

and phantoms still appears.

From what I saw (on line desc), if false = no phantoms, or might be true?
PS: I installed plugin ~a month after first server start

Re-Add delay

The readme on spigotmc.org mentions a config named delay in the default config.

This setting doesnt seem to exist anymore.
My proposal would be to either re-add the feature or update the readme.

Personally we don't like the instant-skip, so a feature to add a delay would be great, the default value can still be no delay it this is the desired effect on your side.

Playerbedenterevent / leave event

i keep getting this error when entering or leaving a bed on harbor v1.5.2(even though it says 1.5.1 i have the 1.5.2 jar. i am using Paper 137 for 1.14.4 and was having the same error on 1.14.3
sometimes the night will skip like its supposed to, other times it wont

https://pastebin.com/14aCyF2B

config:
https://pastebin.com/dUemEQcN

plugin list:

  • actionbar api
  • announcer
  • armorstand tools
  • async world edit
  • buycraftx
  • chunk spawner limiter
  • citizens
  • core protect
  • craftbook
  • crazy auctions
  • discordSRV
  • dynmap
  • dynmap-citizens
  • dynmap-essentials
  • dynmap-greifprevention
  • editable signs
  • essentialsx
  • greifprevention
  • Harbor
  • head database
  • holographic displays
  • HorseTPWithMe
  • marriage master
  • mcmmo classic
  • minepacks
  • mineable spawners
  • mob capture
  • mobhunting
  • multiverse core
  • multiverse inventories
  • multiverse netherportals
  • multiverse portals
  • multiverse signportals
  • nerf phantoms
  • openinv
  • permissionsex
  • placeholder api
  • plot2dynmap
  • plotsquared
  • plugin lib
  • plugman
  • protocol lib
  • server list plus
  • tab
  • tempfly
  • time is money
  • vault
  • voting plugin
  • wildernesstb
  • world edit
  • world guard

Task #102 for Harbor v1.6.1 generated an exception java.lang.BootstrapMethodError: java.lang.NoSuchMethodError:

This gets posted every 2 seconds to console while Harbor is enabled

java.lang.BootstrapMethodError: java.lang.NoSuchMethodError: 
	at xyz.nkomarn.Harbor.task.Checker.getSleeping(Checker.java:64) ~[?:?]
	at xyz.nkomarn.Harbor.task.Checker.checkWorld(Checker.java:31) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:1.8.0_242]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_242]
	at java.util.stream.DistinctOps$1$2.accept(DistinctOps.java:175) ~[?:1.8.0_242]
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_242]
	at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[?:1.8.0_242]
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[?:1.8.0_242]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_242]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_242]
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:1.8.0_242]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:1.8.0_242]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_242]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[?:1.8.0_242]
	at xyz.nkomarn.Harbor.task.Checker.run(Checker.java:27) ~[?:?]
	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:84) ~[server.jar:git-Paper-624]
	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:449) ~[server.jar:git-Paper-624]
	at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1010) ~[server.jar:git-Paper-624]
	at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:439) ~[server.jar:git-Paper-624]
	at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:940) ~[server.jar:git-Paper-624]
	at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:837) ~[server.jar:git-Paper-624]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
Caused by: java.lang.NoSuchMethodError: 
	... 22 more
[22:43:06] [Server thread/WARN]: [Harbor] Task #102 for Harbor v1.6.1 generated an exception
java.lang.BootstrapMethodError: java.lang.NoSuchMethodError: 
	at xyz.nkomarn.Harbor.task.Checker.getSleeping(Checker.java:64) ~[?:?]
	at xyz.nkomarn.Harbor.task.Checker.checkWorld(Checker.java:31) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:1.8.0_242]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_242]
	at java.util.stream.DistinctOps$1$2.accept(DistinctOps.java:175) ~[?:1.8.0_242]
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_242]
	at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[?:1.8.0_242]
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[?:1.8.0_242]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_242]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_242]
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:1.8.0_242]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:1.8.0_242]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_242]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[?:1.8.0_242]
	at xyz.nkomarn.Harbor.task.Checker.run(Checker.java:27) ~[?:?]
	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:84) ~[server.jar:git-Paper-624]
	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:449) ~[server.jar:git-Paper-624]
	at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1010) ~[server.jar:git-Paper-624]
	at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:439) ~[server.jar:git-Paper-624]
	at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:940) ~[server.jar:git-Paper-624]
	at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:837) ~[server.jar:git-Paper-624]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
Caused by: java.lang.NoSuchMethodError: 
	... 22 more``
*As you can see from the log, we are using the latest version (1.6.1) and the essentials soft-dependency is satisfied.*

Auto updater/update checker!

So, I am on an ongoing mission to create some sort of update feature for Harbor. Idealy, I would want the plugin to somehow automatically update, but I heard that that might be against Spigot's TOS, so I am not sure. If that isn't possible, I want to try to make at least an update notifier (which could be disabled, of course). I don't really know how to go about either though- I've googled about to find a solution and most no longer work so that's a shame. Anyways, any help would be appreciated! :D

Error when just one player is online and sleeping

As far as i know the plugin seems to be working fine.. i had some issues but they are now fixed. But when a player is alone on the server and tries to sleep, an error appears in console.

[14:47:47 INFO]: jlrcraft is now sleeping (0 needed to skip the night).
[14:47:47 WARN]: Exception in thread "Timer-6" java.lang.IllegalStateException: WeatherChangeEvent may only be triggered synchronously.
[14:47:47 WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:524)
[14:47:47 WARN]: at net.minecraft.server.v1_14_R1.WorldData.setStorm(WorldData.java:556)
[14:47:47 WARN]: at org.bukkit.craftbukkit.v1_14_R1.CraftWorld.setStorm(CraftWorld.java:1207)
[14:47:47 WARN]: at mykyta.Harbor.Util$1.run(Util.java:208)
[14:47:47 WARN]: at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
[14:47:47 WARN]: at java.base/java.util.TimerThread.run(Timer.java:506)

Running on Paper 97

Console Spammed with error

Plugin appears to be working (haven't tested with people in different worlds yet though) it is just constantly spitting out errors in the console.

Server Info
CraftBukkit version git-Spigot-140f654-b446cb5 (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT)

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Plugins (28): WorldEdit, Harbor, WorldGuard, ProtocolLib, Core, AdvancedPortals, tpa, VoidGenerator, PermissionsEx, ArvinLib, mcMMO, Vault, GWarp, DeathTax, Herochat, TheNewEconomy, Jobs, PerWorldInventory, HolographicDisplays, PlotSquared, Multiverse-Core, HoloPlots, CrazyAuctions, Multiverse-NetherPortals, GriefPrevention, MV-ChatAlias, CommandSigns, RandomTeleport

*edit: Using latest jar for Harbor

Error
[10:39:36 WARN]: [Harbor] Task #21 for Harbor v1.4.3 generated an exception java.lang.NullPointerException: null at techtoolbox.Harbor.ActionBarMessage.run(ActionBarMessage.java:9) ~[?:?] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:81) ~[spigot-1.13.2.jar:git-Spigot-140f654-b446cb5] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:391) [spigot-1.13.2.jar:git-Spigot-140f654-b446cb5] at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:893) [spigot-1.13.2.jar:git-Spigot-140f654-b446cb5] at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:417) [spigot-1.13.2.jar:git-Spigot-140f654-b446cb5] at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:835) [spigot-1.13.2.jar:git-Spigot-140f654-b446cb5] at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:733) [spigot-1.13.2.jar:git-Spigot-140f654-b446cb5] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]

sleep loop

Had the plugin running 1.5.3 'fine' for a few irl days. Then this happened: https://i.ibb.co/qnYMSr3/2019-08-14-10-30-05.png

We could also do without the obnoxious messages. I run a mature server, and it looks like the plugin notifications are aimed at 12 year olds. Yes I know we can change the config, but it should be less obnoxious by default surely?

Ideally I'm looking for a % based sleep plugin that:
Notifies players "Player X is sleeping. Y out of Z players are sleeping to skip the night."
Upon morning, no notification message whatsoever. Keep it feeling vanilla.
Uses the ignore afk players system but does not mark players as afk. I don't want my playerbase to know who is or isn't afk. If someone afk's, it's their own private business. If my players decide to afk for 24 hours irl I have no issue with this.

Weather change error.

Version:
CraftBukkit version git-Spigot-baafee9-17543ec (MC: 1.14.2) (Implementing API version 1.14.2-R0.1-SNAPSHOT)

Not clearing weather when sleeping.

Console error output:
[09:02:50] [Server thread/INFO]: X is now sleeping (1/1, 0 more needed to skip). [09:02:52] [Timer-53/WARN]: Exception in thread "Timer-53" [09:02:52] [Timer-53/WARN]: java.lang.IllegalStateException: WeatherChangeEvent cannot be triggered asynchronously from another thread. [09:02:52] [Timer-53/WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) [09:02:52] [Timer-53/WARN]: at net.minecraft.server.v1_14_R1.WorldData.setStorm(WorldData.java:556) [09:02:52] [Timer-53/WARN]: at org.bukkit.craftbukkit.v1_14_R1.CraftWorld.setStorm(CraftWorld.java:1122) [09:02:52] [Timer-53/WARN]: at mykyta.Harbor.Util$1.run(Util.java:208) [09:02:52] [Timer-53/WARN]: at java.util.TimerThread.mainLoop(Timer.java:555) [09:02:52] [Timer-53/WARN]: at java.util.TimerThread.run(Timer.java:505)

Harbor 1.6.1 messages not sent in chat

Hi !

Thanks again for the great plugin.
On my server i'd like to send the messages of people sleeping into the chat.

Action bar works but i disabled it. Unfortunatly no messages in the chat.

Any ideas why ?

I am recieving all chat messages concerning night.

Best regards,
Thank you for your help

Phantoms

Instead of disabling Phantoms as they become irritating with Harbor for users not participating who don't get their 'time since rest' statistic reset. Can Harbor reset the statistic to prevent Phantoms spawning on those who didn't participate?

Not Sending Chat Messages

Running PaperSpigot 1.15.2 (Build 334) and Harbor 1.6.1:

Harbor does not send chat messages despite them being enabled. Screenshot of chat with no messages:

Config:

values:
  timer: 3 # How often (in seconds) to run the clock task (used to detect sleep, AFK players, time actionbar, etc.)
  percent: 30 # 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:
  skip: true # Toggle night skipping feature. Configure amount of players needed to skip above (percent)
  weather: true # Clear weather when skipping night
  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)
  notifier: true # Displays a notification when a new update is released

messages:
  chat:
    chat: true # Toggle chat messages
    skipped: # Night skipped chat messages
      - "&eThe night has been skipped."
      - "&eAhhh, finally morning."
      - "&eArghh, it's so bright outside."
    sleeping: "&e[player] is now sleeping ([sleeping]/[needed], [more] more needed to skip)." # Display which player went to bed
    left: "&e[player] got out of bed ([sleeping]/[needed], [more] more needed to skip)." # Display when a player left their bed
    accelerateNight: # Display when the night is being accelerated.
      - "&eYou look to the skies and see it's becoming daytime."
      - "&eYou feel the sky quickly lighten. It is now day."
  actionbar:
    actionbar: true # Enable/disable actionbar messages
    sleeping: "&e[sleeping] out of [needed] players are sleeping ([more] more needed to skip)." # Shown when some players are in bed
    everyone: "&eEveryone is sleeping. Sweet dreams!" # Shown when all players are in bed
  miscellaneous:
    prefix: "&8&l(&6&lHarbor&8&l)&r " # Prefix for Harbor command/miscellaneous messages
    permission: "&7Insufficient permissions." # Sent when player doesn't have permissions to run command
    unrecognized: "&7Unrecognized command." # Sent when command argument isn't recognized

blacklist: # Blacklist for worlds (Harbor will be disabled in these worlds)
  - "world_nether"
  - "world_the_end"

# Spooky controls (don't change)
version: 1.6
debug: false

Updater Issue

think there is an issue with the updater

15.07 14:35:00 [Server] Server thread/INFO [Harbor] Enabling Harbor v1.5.1 15.07 14:35:05 [Server] Server thread/ERROR Error occurred while enabling Harbor v1.5.1 (Is it up to date?) 15.07 14:35:05 [Server] INFO java.lang.NoClassDefFoundError: org/apache/commons/io/IOUtils 15.07 14:35:05 [Server] INFO at mykyta.Harbor.Updater.check(Updater.java:37) ~[?:?] 15.07 14:35:05 [Server] INFO at mykyta.Harbor.Harbor.onEnable(Harbor.java:52) ~[?:?] 15.07 14:35:05 [Server] INFO at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.14.3.jar:git-Spigot-d05d3c1-604c8bf] 15.07 14:35:05 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:352) [spigot-1.14.3.jar:git-Spigot-d05d3c1-604c8bf] 15.07 14:35:05 [Server] INFO at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:416) [spigot-1.14.3.jar:git-Spigot-d05d3c1-604c8bf] 15.07 14:35:05 [Server] INFO at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugin(CraftServer.java:461) [spigot-1.14.3.jar:git-Spigot-d05d3c1-604c8bf] 15.07 14:35:05 [Server] INFO at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugins(CraftServer.java:375) [spigot-1.14.3.jar:git-Spigot-d05d3c1-604c8bf] 15.07 14:35:05 [Server] INFO at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:439) [spigot-1.14.3.jar:git-Spigot-d05d3c1-604c8bf] 15.07 14:35:05 [Server] INFO at net.minecraft.server.v1_14_R1.DedicatedServer.init(DedicatedServer.java:258) [spigot-1.14.3.jar:git-Spigot-d05d3c1-604c8bf] 15.07 14:35:05 [Server] INFO at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:764) [spigot-1.14.3.jar:git-Spigot-d05d3c1-604c8bf] 15.07 14:35:05 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212] 15.07 14:35:05 [Server] INFO Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.IOUtils 15.07 14:35:05 [Server] INFO at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_212] 15.07 14:35:05 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:135) ~[spigot-1.14.3.jar:git-Spigot-d05d3c1-604c8bf] 15.07 14:35:05 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:81) ~[spigot-1.14.3.jar:git-Spigot-d05d3c1-604c8bf] 15.07 14:35:05 [Server] INFO at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_212] 15.07 14:35:05 [Server] INFO at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_212] 15.07 14:35:05 [Server] INFO ... 11 more

Latest beta - day / night loops endlessly until config is deleted

Loaded the latest beta version with the new day_cycle function, but didn't delete my config. Day and night were looping endlessly. I deleted my config and had it generate a new one, worked fine after that.

You might want to put a note that people will have to delete their configs when loading this new version.

Option to group players by IP

Provide an option to treat multiple players from the same IP as 1 when calculating percentage sleepers.

This prevents a single person with multiple accounts or family from gaming the system.

Ignore from afk system permission.

Please add an permission to staffs [vanish]
Owners not having issues joining in stealth mode and ...
have issues with messages in chat [ owner is afk ] [ owner is back ]
Messages in chat.... i am owner i join in vanish but after the afk timer
of config of Harbor plugin, it show on chat, to everyone i am not more afk.
so..... everyone start asking me something. ยฌยฌ

Doesnt work when people disconnecting

Using all the default settings.

3 people are online.
1 person is sleeping - One more is needed for it to skip night.
1 person is disconnecting - Now it should skip the night since half the players are sleeping, but I have to re-enter the bed for it to take effect.
Is it a known issue?

[Error]Plugin not loading on start

I get the following error trying to start the server with harbor 1.5.1

Paper 131
MC 1.14.3

[02:24:49 ERROR]: Error occurred while enabling Harbor v1.5.1 (Is it up to date?)
java.lang.NoClassDefFoundError: org/apache/commons/io/IOUtils
at mykyta.Harbor.Updater.check(Updater.java:37) ~[?:?]
at mykyta.Harbor.Harbor.onEnable(Harbor.java:52) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.14.3.jar:git-Paper-131]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:338) ~[patched_1.14.3.jar:git-Paper-131]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:420) ~[patched_1.14.3.jar:git-Paper-131]
at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugin(CraftServer.java:467) ~[patched_1.14.3.jar:git-Paper-131]
at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugins(CraftServer.java:381) ~[patched_1.14.3.jar:git-Paper-131]
at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:464) ~[patched_1.14.3.jar:git-Paper-131]
at net.minecraft.server.v1_14_R1.DedicatedServer.init(DedicatedServer.java:282) ~[patched_1.14.3.jar:git-Paper-131]
at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:859) ~[patched_1.14.3.jar:git-Paper-131]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.IOUtils
at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_212]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:139) ~[patched_1.14.3.jar:git-Paper-131]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:85) ~[patched_1.14.3.jar:git-Paper-131]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_212]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_212]
... 11 more
[02:24:49 INFO]: [Harbor] Disabling Harbor v1.5.1

Constantly failing

Using this on a 1.14.2 vanilla world. It works for a little while, then stops working. People go to sleep but even with the % needed, night does not skip.
Only thing that fixes if is a full world restart, which is getting a bit wearisome.

OP Always Excluded

I have changed the config's "bypass" option for OP's back and forth now, restarting and reloading the server, and it still won't allow me to be counted.

Multi World

Not an issue at all, just didnt know where else to contact you!
I noticed on the changelog that in 1.4 you've added multiworld support, but i cant work out how to set it up!
Thanks,
Matt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.