Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Dinner time!
Dieser Commit ist enthalten in:
Ursprung
923ab54e38
Commit
657913faeb
@ -142,12 +142,14 @@ public final class CraftServer implements Server {
|
|||||||
return new World[]{console.e.getWorld()};
|
return new World[]{console.e.getWorld()};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public long getTime() {
|
public long getTime() {
|
||||||
return console.e.e;
|
return getWorlds()[0].getFullTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void setTime(long time) {
|
public void setTime(long time) {
|
||||||
console.e.e = time;
|
getWorlds()[0].setFullTime(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServerConfigurationManager getHandle() {
|
public ServerConfigurationManager getHandle() {
|
||||||
|
@ -243,6 +243,26 @@ public class CraftWorld implements World {
|
|||||||
return "CraftWorld";
|
return "CraftWorld";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long getTime() {
|
||||||
|
long time = getFullTime() % 24000;
|
||||||
|
if (time < 0) time += 24000;
|
||||||
|
return time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime(long time) {
|
||||||
|
long margin = (time - getFullTime()) % 24000;
|
||||||
|
if (margin < 0) margin += 24000;
|
||||||
|
setFullTime(getFullTime() + margin);
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getFullTime() {
|
||||||
|
return world.e;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFullTime(long time) {
|
||||||
|
world.e = time;
|
||||||
|
}
|
||||||
|
|
||||||
private final class ChunkCoordinate {
|
private final class ChunkCoordinate {
|
||||||
public final int x;
|
public final int x;
|
||||||
public final int z;
|
public final int z;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren