move project to Java 21 and the 1.21 Paper API
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
language: java
|
language: java
|
||||||
jdk: openjdk17
|
jdk: openjdk21
|
22
build.gradle
22
build.gradle
@@ -1,33 +1,33 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
id 'com.github.johnrengelman.shadow' version '8.1.1'
|
id 'io.github.goooler.shadow' version '8.1.8' // TODO: Temporarily using fork
|
||||||
}
|
}
|
||||||
|
|
||||||
group = 'io.github.Jack1424'
|
group = 'io.github.jack1424'
|
||||||
version = '1.4.0'
|
version = '2.0.0-DEV'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven {
|
maven {
|
||||||
name = 'papermc-repo'
|
name = "papermc-repo"
|
||||||
url = 'https://repo.papermc.io/repository/maven-public/'
|
url = "https://repo.papermc.io/repository/maven-public/"
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
name = 'sonatype'
|
name = "sonatype"
|
||||||
url = 'https://oss.sonatype.org/content/groups/public/'
|
url = "https://oss.sonatype.org/content/groups/public/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT")
|
||||||
implementation("org.bstats:bstats-bukkit:3.0.2")
|
implementation("org.bstats:bstats-bukkit:3.0.2")
|
||||||
implementation("org.bukkit:bukkit:1.13-R0.1-SNAPSHOT")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
relocate('org.bstats', 'io.github.jack1424.realtimeweather')
|
relocate('org.bstats', 'io.github.jack1424.realtimeweather')
|
||||||
}
|
}
|
||||||
|
|
||||||
def targetJavaVersion = 11
|
def targetJavaVersion = 21
|
||||||
java {
|
java {
|
||||||
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
|
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
|
||||||
sourceCompatibility = javaVersion
|
sourceCompatibility = javaVersion
|
||||||
@@ -38,8 +38,10 @@ java {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile).configureEach {
|
tasks.withType(JavaCompile).configureEach {
|
||||||
|
options.encoding = 'UTF-8'
|
||||||
|
|
||||||
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
|
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
|
||||||
options.release = targetJavaVersion
|
options.release.set(targetJavaVersion)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
package io.github.jack1424.realtimeweather;
|
package io.github.jack1424.realTimeWeather;
|
||||||
|
|
||||||
import io.github.jack1424.realtimeweather.requests.WeatherRequestObject;
|
import io.github.jack1424.realTimeWeather.requests.WeatherRequestObject;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.json.simple.parser.ParseException;
|
import org.json.simple.parser.ParseException;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
package io.github.jack1424.realtimeweather;
|
package io.github.jack1424.realTimeWeather;
|
||||||
|
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
package io.github.jack1424.realtimeweather;
|
package io.github.jack1424.realTimeWeather;
|
||||||
|
|
||||||
import io.github.jack1424.realtimeweather.requests.*;
|
import io.github.jack1424.realTimeWeather.requests.*;
|
||||||
import org.bstats.bukkit.Metrics;
|
import org.bstats.bukkit.Metrics;
|
||||||
import org.bstats.charts.SimplePie;
|
import org.bstats.charts.SimplePie;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
@@ -11,7 +11,6 @@ import java.time.LocalTime;
|
|||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public final class RealTimeWeather extends JavaPlugin {
|
public final class RealTimeWeather extends JavaPlugin {
|
||||||
private Logger logger;
|
private Logger logger;
|
||||||
private ConfigManager config;
|
private ConfigManager config;
|
||||||
@@ -124,7 +123,7 @@ public final class RealTimeWeather extends JavaPlugin {
|
|||||||
config.setWeatherEnabled(false);
|
config.setWeatherEnabled(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (World world : config.getWeatherSyncWorlds())
|
for (World world : config.getWeatherSyncWorlds())
|
||||||
world.setGameRuleValue("doWeatherCycle", "false");
|
world.setGameRuleValue("doWeatherCycle", "false");
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
package io.github.jack1424.realtimeweather.requests;
|
package io.github.jack1424.realTimeWeather.requests;
|
||||||
|
|
||||||
import org.json.simple.JSONArray;
|
import org.json.simple.JSONArray;
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
package io.github.jack1424.realtimeweather.requests;
|
package io.github.jack1424.realTimeWeather.requests;
|
||||||
|
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
import org.json.simple.parser.ParseException;
|
import org.json.simple.parser.ParseException;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
package io.github.jack1424.realtimeweather.requests;
|
package io.github.jack1424.realTimeWeather.requests;
|
||||||
|
|
||||||
import org.json.simple.JSONArray;
|
import org.json.simple.JSONArray;
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
# RealTimeWeather Configuration File (v1.4.0)
|
# RealTimeWeather Configuration File (v2.0.0)
|
||||||
# You can find detailed instructions at: https://github.com/Jack1424/RealTimeWeather/wiki#editing-the-configuration-file
|
# You can find detailed instructions at: https://github.com/Jack1424/RealTimeWeather/wiki#editing-the-configuration-file
|
||||||
|
|
||||||
######################################## Real Time Weather Settings ##################################################
|
######################################## Real Time Weather Settings ##################################################
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
|
main: io.github.jack1424.realTimeWeather.RealTimeWeather
|
||||||
name: RealTimeWeather
|
name: RealTimeWeather
|
||||||
version: '${version}'
|
version: '${version}'
|
||||||
description: Sync your server time and weather with the real world
|
description: Sync your Minecraft server's time and weather with the real world
|
||||||
main: io.github.jack1424.realtimeweather.RealTimeWeather
|
api-version: '1.21'
|
||||||
load: POSTWORLD
|
load: POSTWORLD
|
||||||
authors: [Jack1424]
|
author: Jack1424
|
||||||
website: https://github.com/Jack1424/RealTimeWeather
|
website: github.com/Jack1424/RealTimeWeather
|
||||||
|
Reference in New Issue
Block a user