Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9b34da0fdf | ||
|
51664841a6 | ||
|
ae32363e0f | ||
|
b1cc12ba85 | ||
|
5a48428057 |
11
README.md
11
README.md
@@ -2,6 +2,11 @@
|
|||||||
[](https://app.travis-ci.com/Jack1424/RealTimeWeather)
|
[](https://app.travis-ci.com/Jack1424/RealTimeWeather)
|
||||||
|
|
||||||
### A lightweight Minecraft server plugin that allows you to sync your server's time and weather with the real world
|
### A lightweight Minecraft server plugin that allows you to sync your server's time and weather with the real world
|
||||||
|
|
||||||
|
## ⚠️ This is the legacy branch of RealTimeWeather ⚠️
|
||||||
|
**Only use legacy versions of RealTimeWeather (v1.x.x) if you NEED support for older versions of Minecraft.**
|
||||||
|
**If you don't need support for versions older than the most recent versions of Minecraft, don't use the legacy versions of this plugin.**
|
||||||
|
Legacy versions of RealTimeWeather will not receive as many (if any) updates.
|
||||||
___
|
___
|
||||||
**Current Features:**
|
**Current Features:**
|
||||||
- Lightweight
|
- Lightweight
|
||||||
@@ -12,15 +17,13 @@ ___
|
|||||||
|
|
||||||
**Upcoming Features:**
|
**Upcoming Features:**
|
||||||
- [ ] Commands
|
- [ ] Commands
|
||||||
- [ ] Multi-world support
|
|
||||||
- [ ] Folia support
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
Just download the [latest version](https://github.com/Jack1424/RealTimeWeather/releases/latest) of RTW and put it in your `plugins` directory.
|
Just download the [latest version](https://github.com/Jack1424/RealTimeWeather/releases/) of **a legacy version** of RTW **(legacy versions are any version that starts with v1)** and put it in your `plugins` directory.
|
||||||
You'll need to run your server at least once to generate the configuration file.
|
You'll need to run your server at least once to generate the configuration file.
|
||||||
After running (and then stopping) your server, simply change the values in the configuration file to what you'd like, and you're good to go.
|
After running (and then stopping) your server, simply change the values in the configuration file to what you'd like, and you're good to go.
|
||||||
|
|
||||||
## Contributions/Support
|
## Contributions/Support
|
||||||
I'm open to any help/ideas that you have. Just open an issue or a pull request, and I'll be sure to look at it as soon as I can. Builds with `gradlew shadowJar`.
|
**Legacy versions won't receive as many (if any) updates**, but I'm open to any help/ideas that you have. Just open an issue or a pull request, and I'll be sure to look at it as soon as I can. Builds with `gradlew shadowJar`.
|
||||||
|
|
||||||
License: GPL-3.0
|
License: GPL-3.0
|
||||||
|
@@ -4,7 +4,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = 'io.github.Jack1424'
|
group = 'io.github.Jack1424'
|
||||||
version = '1.4.0'
|
version = '1.4.1'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@@ -161,15 +161,15 @@ public final class RealTimeWeather extends JavaPlugin {
|
|||||||
sunsetMinutes += 720;
|
sunsetMinutes += 720;
|
||||||
|
|
||||||
LocalTime currentTime = LocalTime.of(cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));
|
LocalTime currentTime = LocalTime.of(cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));
|
||||||
int currentMinutes = currentTime.getHour() * 60 + currentTime.getMinute();
|
double currentMinutes = currentTime.getHour() * 60 + currentTime.getMinute();
|
||||||
|
|
||||||
if (currentMinutes >= sunriseMinutes && currentMinutes < sunsetMinutes) {
|
if (currentMinutes >= sunriseMinutes && currentMinutes < sunsetMinutes) {
|
||||||
return ((currentMinutes - sunriseMinutes) / (sunsetMinutes - sunriseMinutes) * 13569) + 23041;
|
return (long) (((currentMinutes - sunriseMinutes) / (sunsetMinutes - sunriseMinutes)) * 13569) + 23041;
|
||||||
} else {
|
} else {
|
||||||
if (currentMinutes < sunriseMinutes)
|
if (currentMinutes < sunriseMinutes)
|
||||||
currentMinutes += 1440;
|
currentMinutes += 1440;
|
||||||
|
|
||||||
return ((currentMinutes - sunsetMinutes) / (1440 - sunsetMinutes + sunriseMinutes) * 13569) + 12610;
|
return (long) (((currentMinutes - sunsetMinutes) / (1440 - sunsetMinutes + sunriseMinutes)) * 13569) + 12610;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user