2020-08-25 02:22:08 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
|
|
Date: Sun, 23 Aug 2020 16:32:11 +0200
|
|
|
|
Subject: [PATCH] Add moon phase API
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
2021-03-08 23:12:31 +00:00
|
|
|
index 12c6be2ac4a77428ba7bd3cff2cebea148006692..d7954f55061e677b00d27be4b8d0890af75a3aad 100644
|
2020-08-25 02:22:08 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
2021-03-08 23:12:31 +00:00
|
|
|
@@ -328,6 +328,11 @@ public class CraftWorld implements World {
|
2020-08-25 02:22:08 +00:00
|
|
|
public int getPlayerCount() {
|
|
|
|
return world.players.size();
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public io.papermc.paper.world.MoonPhase getMoonPhase() {
|
|
|
|
+ return io.papermc.paper.world.MoonPhase.getPhase(getFullTime() / 24000L);
|
|
|
|
+ }
|
|
|
|
// Paper end
|
|
|
|
|
|
|
|
private static final Random rand = new Random();
|