Skip to content

Commit

Permalink
Update to Java 17, MC 1.18, and bump version to 2.0
Browse files Browse the repository at this point in the history
The primary change in this commit is to re-do the parts of the plugin
that interacted with the org.ajave ebean dependency. This has now been
replaced with the successor project io.ebeans. No major changes
otherwise, beside the fact that initial installation requires manual
work. This can be improved later perhaps, but this feature was removed
from the underlying library, and the intent of this release is to do
minimal changes. Due to this, however, the version has been bumped to
2.0 as this is a somewhat "breaking" change. On first run, the necessary
SQL is printed to the logs, which must be run manually.
  • Loading branch information
LadyCailin committed Jan 14, 2022
1 parent 7b32279 commit f7f1de6
Show file tree
Hide file tree
Showing 9 changed files with 1,323 additions and 1,343 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@
*.ipr
*.iws
.idea/

nb-configuration.xml
63 changes: 42 additions & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>nu.nerd</groupId>
<artifactId>ModReq</artifactId>
<version>1.8</version>
<version>2.0</version>
<packaging>jar</packaging>
<name>ModReq</name>
<description>Moderator Request Sytem</description>
Expand All @@ -22,30 +22,31 @@
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>znode-releases</id>
<name>znode-releases</name>
<url>http://repo.zno.de/artifactory/libs-release-local</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.12-R0.1-SNAPSHOT</version>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.18.1-R0.1-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<!--
Must build locally from https://github.com/NerdNu/bukkit-migration-tools
Originally prebuilds could be found at http://repo.zno.de/artifactory/libs-snapshot-local
but modern versions of maven refuse to download over http, and the site doesn't support
https.
-->
<dependency>
<groupId>org.gestern</groupId>
<artifactId>bukkit-migration-tools</artifactId>
<version>0.1</version>
<version>0.2</version>
</dependency>
<dependency>
<groupId>nu.nerd</groupId>
<artifactId>BukkitEbean</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -78,22 +79,13 @@
<finalName>ModReq</finalName>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.2</version>
<version>3.3.0-SNAPSHOT</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -120,6 +112,35 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>2.19</version>
<extensions>true</extensions>
<configuration>
<tiles>
<!-- other tiles ... -->
<tile>io.ebean.tile:enhancement:12.12.1</tile>
</tiles>
</configuration>
</plugin>


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>17</release>
<annotationProcessorPaths>
<path>
<groupId>io.ebean</groupId>
<artifactId>querybean-generator</artifactId>
<version>12.12.1</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</project>
190 changes: 95 additions & 95 deletions src/nu/nerd/modreq/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,107 +2,107 @@
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package nu.nerd.modreq;

public class Configuration {
private ModReq plugin;

public String GENERAL__PAGE_ERROR;
public String GENERAL__SEARCH_ERROR;
public String GENERAL__REQUEST_NUMBER;
public String GENERAL__REQUEST_FILED;
public String GENERAL__MAX_REQUESTS;
public String GENERAL__REQUEST_ERROR;
public String GENERAL__NO_REQUESTS;
public String GENERAL__CLOSE_ERROR;
public String GENERAL__COMPLETED;
public String GENERAL__COMPLETED_MESSAGE;
public String GENERAL__DELETED;
public String GENERAL__LIST__HEADER;
public String GENERAL__LIST__ITEM;
public String GENERAL__LIST__FOOTER;
public String GENERAL__ITEM__HEADER_CLAIMED;
public String GENERAL__ITEM__HEADER_UNCLAIMED;
public String GENERAL__ITEM__DETAILS;
public String GENERAL__ITEM__REQUEST;
public String GENERAL__ITEM__NOTE;
public String MOD__NEW_REQUEST;
public String MOD__NO_REQUESTS;
public String MOD__EMPTY_PAGE;
public String MOD__TELEPORT;
public String MOD__UNCLAIM;
public String MOD__REQUEST_TAKEN;
public String MOD__COMPLETED;
public String MOD__COMPLETED_MESSAGE;
public String MOD__DELETED;
public String MOD__REOPENED;
public String MOD__FLAGGED;
public String MOD__RESET;
public String MOD__ALREADY_CLOSED;
public String MOD__ALREADY_CLAIMED;
public String MOD__NOTE_ADDED;
public String MOD__NOTE_REMOVED;
public String MOD__NOTE_NUMBER;
public String MOD__NOTE_MISSING;
public String COLOUR_ONLINE;
public String COLOUR_OFFLINE;
public int MAX_REQUESTS;
public int PAGE_SIZE;
public String DATE_FORMAT;
private final ModReq plugin;

public String GENERAL__PAGE_ERROR;
public String GENERAL__SEARCH_ERROR;
public String GENERAL__REQUEST_NUMBER;
public String GENERAL__REQUEST_FILED;
public String GENERAL__MAX_REQUESTS;
public String GENERAL__REQUEST_ERROR;
public String GENERAL__NO_REQUESTS;
public String GENERAL__CLOSE_ERROR;
public String GENERAL__COMPLETED;
public String GENERAL__COMPLETED_MESSAGE;
public String GENERAL__DELETED;
public String GENERAL__LIST__HEADER;
public String GENERAL__LIST__ITEM;
public String GENERAL__LIST__FOOTER;
public String GENERAL__ITEM__HEADER_CLAIMED;
public String GENERAL__ITEM__HEADER_UNCLAIMED;
public String GENERAL__ITEM__DETAILS;
public String GENERAL__ITEM__REQUEST;
public String GENERAL__ITEM__NOTE;
public String MOD__NEW_REQUEST;
public String MOD__NO_REQUESTS;
public String MOD__EMPTY_PAGE;
public String MOD__TELEPORT;
public String MOD__UNCLAIM;
public String MOD__REQUEST_TAKEN;
public String MOD__COMPLETED;
public String MOD__COMPLETED_MESSAGE;
public String MOD__DELETED;
public String MOD__REOPENED;
public String MOD__FLAGGED;
public String MOD__RESET;
public String MOD__ALREADY_CLOSED;
public String MOD__ALREADY_CLAIMED;
public String MOD__NOTE_ADDED;
public String MOD__NOTE_REMOVED;
public String MOD__NOTE_NUMBER;
public String MOD__NOTE_MISSING;
public String COLOUR_ONLINE;
public String COLOUR_OFFLINE;
public int MAX_REQUESTS;
public int PAGE_SIZE;
public String DATE_FORMAT;

public Configuration(ModReq plugin) {
this.plugin = plugin;
}
public Configuration(ModReq plugin) {
this.plugin = plugin;
}

public void save() {
plugin.saveConfig();
}
public void save() {
plugin.saveConfig();
}

public void load() {
plugin.reloadConfig();
public void load() {
plugin.reloadConfig();

GENERAL__REQUEST_NUMBER = plugin.getConfig().getString("messages.general.request-number");
GENERAL__REQUEST_FILED = plugin.getConfig().getString("messages.general.request-filed");
GENERAL__MAX_REQUESTS = plugin.getConfig().getString("messages.general.max-requests");
GENERAL__REQUEST_ERROR = plugin.getConfig().getString("messages.general.request-error");
GENERAL__NO_REQUESTS = plugin.getConfig().getString("messages.general.no-requests");
GENERAL__CLOSE_ERROR = plugin.getConfig().getString("messages.general.page-error");
GENERAL__COMPLETED = plugin.getConfig().getString("messages.general.completed");
GENERAL__COMPLETED_MESSAGE = plugin.getConfig().getString("messages.general.completed-message");
GENERAL__DELETED = plugin.getConfig().getString("messages.general.deleted");
GENERAL__PAGE_ERROR = plugin.getConfig().getString("messages.general.page-error");
GENERAL__SEARCH_ERROR = plugin.getConfig().getString("messages.general.search-error");
GENERAL__ITEM__DETAILS = plugin.getConfig().getString("messages.general.item.details");
GENERAL__ITEM__HEADER_CLAIMED = plugin.getConfig().getString("messages.general.item.header-claimed");
GENERAL__ITEM__HEADER_UNCLAIMED = plugin.getConfig().getString("messages.general.item.header-unclaimed");
GENERAL__ITEM__REQUEST = plugin.getConfig().getString("messages.general.item.request");
GENERAL__ITEM__NOTE = plugin.getConfig().getString("messages.general.item.note");
GENERAL__LIST__FOOTER = plugin.getConfig().getString("messages.general.list.footer");
GENERAL__LIST__HEADER = plugin.getConfig().getString("messages.general.list.header");
GENERAL__LIST__ITEM = plugin.getConfig().getString("messages.general.list.item");
MOD__COMPLETED = plugin.getConfig().getString("messages.mod.completed");
MOD__COMPLETED_MESSAGE = plugin.getConfig().getString("messages.mod.completed-message");
MOD__DELETED = plugin.getConfig().getString("messages.mod.deleted");
MOD__EMPTY_PAGE = plugin.getConfig().getString("messages.mod.empty-page");
MOD__FLAGGED = plugin.getConfig().getString("messages.mod.flagged");
MOD__NEW_REQUEST = plugin.getConfig().getString("messages.mod.new-request");
MOD__NO_REQUESTS = plugin.getConfig().getString("messages.mod.no-requests");
MOD__REOPENED = plugin.getConfig().getString("messages.mod.reopened");
MOD__RESET = plugin.getConfig().getString("messages.mod.reset");
MOD__TELEPORT = plugin.getConfig().getString("messages.mod.teleport");
MOD__UNCLAIM = plugin.getConfig().getString("messages.mod.unclaim");
MOD__REQUEST_TAKEN = plugin.getConfig().getString("messages.mod.request-taken");
MOD__ALREADY_CLOSED = plugin.getConfig().getString("messages.mod.already-closed");
MOD__ALREADY_CLAIMED = plugin.getConfig().getString("messages.mod.already-claimed");
MOD__NOTE_ADDED = plugin.getConfig().getString("messages.mod.note-added");
MOD__NOTE_REMOVED = plugin.getConfig().getString("messages.mod.note-removed");
MOD__NOTE_NUMBER = plugin.getConfig().getString("messages.mod.note-number");
MOD__NOTE_MISSING = plugin.getConfig().getString("messages.mod.note-missing");
COLOUR_OFFLINE = plugin.getConfig().getString("colour.offline");
COLOUR_ONLINE = plugin.getConfig().getString("colour.online");
MAX_REQUESTS = plugin.getConfig().getInt("max-requests", 5);
PAGE_SIZE = plugin.getConfig().getInt("page-size", 5);
DATE_FORMAT = plugin.getConfig().getString("date-format");
}
GENERAL__REQUEST_NUMBER = plugin.getConfig().getString("messages.general.request-number");
GENERAL__REQUEST_FILED = plugin.getConfig().getString("messages.general.request-filed");
GENERAL__MAX_REQUESTS = plugin.getConfig().getString("messages.general.max-requests");
GENERAL__REQUEST_ERROR = plugin.getConfig().getString("messages.general.request-error");
GENERAL__NO_REQUESTS = plugin.getConfig().getString("messages.general.no-requests");
GENERAL__CLOSE_ERROR = plugin.getConfig().getString("messages.general.page-error");
GENERAL__COMPLETED = plugin.getConfig().getString("messages.general.completed");
GENERAL__COMPLETED_MESSAGE = plugin.getConfig().getString("messages.general.completed-message");
GENERAL__DELETED = plugin.getConfig().getString("messages.general.deleted");
GENERAL__PAGE_ERROR = plugin.getConfig().getString("messages.general.page-error");
GENERAL__SEARCH_ERROR = plugin.getConfig().getString("messages.general.search-error");
GENERAL__ITEM__DETAILS = plugin.getConfig().getString("messages.general.item.details");
GENERAL__ITEM__HEADER_CLAIMED = plugin.getConfig().getString("messages.general.item.header-claimed");
GENERAL__ITEM__HEADER_UNCLAIMED = plugin.getConfig().getString("messages.general.item.header-unclaimed");
GENERAL__ITEM__REQUEST = plugin.getConfig().getString("messages.general.item.request");
GENERAL__ITEM__NOTE = plugin.getConfig().getString("messages.general.item.note");
GENERAL__LIST__FOOTER = plugin.getConfig().getString("messages.general.list.footer");
GENERAL__LIST__HEADER = plugin.getConfig().getString("messages.general.list.header");
GENERAL__LIST__ITEM = plugin.getConfig().getString("messages.general.list.item");
MOD__COMPLETED = plugin.getConfig().getString("messages.mod.completed");
MOD__COMPLETED_MESSAGE = plugin.getConfig().getString("messages.mod.completed-message");
MOD__DELETED = plugin.getConfig().getString("messages.mod.deleted");
MOD__EMPTY_PAGE = plugin.getConfig().getString("messages.mod.empty-page");
MOD__FLAGGED = plugin.getConfig().getString("messages.mod.flagged");
MOD__NEW_REQUEST = plugin.getConfig().getString("messages.mod.new-request");
MOD__NO_REQUESTS = plugin.getConfig().getString("messages.mod.no-requests");
MOD__REOPENED = plugin.getConfig().getString("messages.mod.reopened");
MOD__RESET = plugin.getConfig().getString("messages.mod.reset");
MOD__TELEPORT = plugin.getConfig().getString("messages.mod.teleport");
MOD__UNCLAIM = plugin.getConfig().getString("messages.mod.unclaim");
MOD__REQUEST_TAKEN = plugin.getConfig().getString("messages.mod.request-taken");
MOD__ALREADY_CLOSED = plugin.getConfig().getString("messages.mod.already-closed");
MOD__ALREADY_CLAIMED = plugin.getConfig().getString("messages.mod.already-claimed");
MOD__NOTE_ADDED = plugin.getConfig().getString("messages.mod.note-added");
MOD__NOTE_REMOVED = plugin.getConfig().getString("messages.mod.note-removed");
MOD__NOTE_NUMBER = plugin.getConfig().getString("messages.mod.note-number");
MOD__NOTE_MISSING = plugin.getConfig().getString("messages.mod.note-missing");
COLOUR_OFFLINE = plugin.getConfig().getString("colour.offline");
COLOUR_ONLINE = plugin.getConfig().getString("colour.online");
MAX_REQUESTS = plugin.getConfig().getInt("max-requests", 5);
PAGE_SIZE = plugin.getConfig().getInt("page-size", 5);
DATE_FORMAT = plugin.getConfig().getString("date-format");
}
}
Loading

0 comments on commit f7f1de6

Please sign in to comment.