mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
23 lines
913 B
Diff
23 lines
913 B
Diff
|
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
|
||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||
|
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||
|
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();
|