Get it to build again and update to java 1.8 in the pom.xml

This commit is contained in:
Bradley Hilton 2017-01-04 10:31:59 -02:00
parent 6c8559c39b
commit b2f0c31421
11 changed files with 21 additions and 5 deletions

View File

@ -6,14 +6,19 @@ This plugins adds Jail to your Minecraft server. Admins can define several jails
Translating Translating
=== ===
If you would like to help translate this project, please shoot me an email `graywolf336`@`craftyn.com` and saying which language(s) you would like to contribute to and I will add you. If you would like to help translate this project, please shoot me an email `graywolf336`@`craftyn.com` and let me know which language(s) you would like to contribute to and I will add you.
Developing/Building Developing/Building
=== ===
If you want to make some changes, build, and run the unit tests you will notice we require CraftBukkit 1.8 with maven and it isn't hosted anywhere publically for legal reasons. You will need to build CraftBukkit 1.8 yourself and then put it locally for maven with the following command: If you want to make some changes, build, and run the unit tests you will notice we require CraftBukkit 1.8 with maven and it isn't hosted anywhere publicly for legal reasons. You will need to build CraftBukkit 1.8 yourself and then put it locally for maven with the following command:
`mvn install:install-file -Dfile=craftbukkit-1.9-R0.1.jar -DgroupId=org.bukkit -DartifactId=craftbukkit -Dversion=1.9-R0.1-SNAPSHOT -Dpackaging=jar` `mvn install:install-file -Dfile=craftbukkit-1.9-R0.1.jar -DgroupId=org.bukkit -DartifactId=craftbukkit -Dversion=1.9-R0.1-SNAPSHOT -Dpackaging=jar`
Beta 6 Changes
===
*Changes since Beta 5*
* Plugin now requires Java 1.8
Beta 5 Changes Beta 5 Changes
=== ===
*Changes since Beta 4* *Changes since Beta 4*

View File

@ -33,7 +33,7 @@
<repositories> <repositories>
<repository> <repository>
<id>vault-repo</id> <id>vault-repo</id>
<url>http://nexus.theyeticave.net/content/repositories/pub_releases</url> <url>http://nexus.hc.to/content/repositories/pub_releases/</url>
</repository> </repository>
<repository> <repository>
@ -203,8 +203,8 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version> <version>2.3.2</version>
<configuration> <configuration>
<source>1.6</source> <source>1.8</source>
<target>1.6</target> <target>1.8</target>
</configuration> </configuration>
</plugin> </plugin>

View File

@ -20,6 +20,7 @@ public class ScoreBoardManager {
private HashMap<UUID, Scoreboard> boards; private HashMap<UUID, Scoreboard> boards;
private OfflinePlayer time; private OfflinePlayer time;
@SuppressWarnings("deprecation")
protected ScoreBoardManager(JailMain plugin) { protected ScoreBoardManager(JailMain plugin) {
this.pl = plugin; this.pl = plugin;
this.man = plugin.getServer().getScoreboardManager(); this.man = plugin.getServer().getScoreboardManager();
@ -42,6 +43,7 @@ public class ScoreBoardManager {
* @param player of whom to add the scoreboard to. * @param player of whom to add the scoreboard to.
* @param pris data for the provided prisoner * @param pris data for the provided prisoner
*/ */
@SuppressWarnings("deprecation")
public void addScoreBoard(Player player, Prisoner pris) { public void addScoreBoard(Player player, Prisoner pris) {
if(!boards.containsKey(player.getUniqueId())) { if(!boards.containsKey(player.getUniqueId())) {
boards.put(player.getUniqueId(), man.getNewScoreboard()); boards.put(player.getUniqueId(), man.getNewScoreboard());
@ -98,6 +100,7 @@ public class ScoreBoardManager {
* @param player of whom to update the scoreboard for. * @param player of whom to update the scoreboard for.
* @param pris data for the player * @param pris data for the player
*/ */
@SuppressWarnings("deprecation")
private void updatePrisonersBoard(Player player, Prisoner pris) { private void updatePrisonersBoard(Player player, Prisoner pris) {
boards.get(player.getUniqueId()).getObjective("test").getScore(time).setScore(pris.getRemainingTimeInMinutesInt()); boards.get(player.getUniqueId()).getObjective("test").getScore(time).setScore(pris.getRemainingTimeInMinutesInt());
} }

View File

@ -22,6 +22,7 @@ import com.graywolf336.jail.enums.Lang;
usage = "/handcuff [player]" usage = "/handcuff [player]"
) )
public class HandCuffCommand implements Command { public class HandCuffCommand implements Command {
@SuppressWarnings("deprecation")
public boolean execute(JailManager jm, CommandSender sender, String... args) { public boolean execute(JailManager jm, CommandSender sender, String... args) {
Player player = jm.getPlugin().getServer().getPlayer(args[0]); Player player = jm.getPlugin().getServer().getPlayer(args[0]);

View File

@ -22,6 +22,7 @@ import com.graywolf336.jail.enums.Lang;
usage = "/unhandcuff [player]" usage = "/unhandcuff [player]"
) )
public class UnHandCuffCommand implements Command { public class UnHandCuffCommand implements Command {
@SuppressWarnings("deprecation")
public boolean execute(JailManager jm, CommandSender sender, String... args) { public boolean execute(JailManager jm, CommandSender sender, String... args) {
Player player = jm.getPlugin().getServer().getPlayerExact(args[0]); Player player = jm.getPlugin().getServer().getPlayerExact(args[0]);

View File

@ -52,6 +52,7 @@ public class JailCommand implements Command {
* - If the cell is not empty then checks to be sure that cell exists * - If the cell is not empty then checks to be sure that cell exists
* - If the prisoner is online or not. * - If the prisoner is online or not.
*/ */
@SuppressWarnings("deprecation")
public boolean execute(JailManager jm, CommandSender sender, String... args) { public boolean execute(JailManager jm, CommandSender sender, String... args) {
if(jm.getJails().isEmpty()) { if(jm.getJails().isEmpty()) {
sender.sendMessage(Lang.NOJAILS.get()); sender.sendMessage(Lang.NOJAILS.get());

View File

@ -19,6 +19,7 @@ import com.graywolf336.jail.enums.Lang;
usage = "/jail record [name] (display)" usage = "/jail record [name] (display)"
) )
public class JailRecordCommand implements Command { public class JailRecordCommand implements Command {
@SuppressWarnings("deprecation")
public boolean execute(JailManager jm, CommandSender sender, String... args) { public boolean execute(JailManager jm, CommandSender sender, String... args) {
if(args.length == 2) { if(args.length == 2) {
// /jail record <username> // /jail record <username>

View File

@ -23,6 +23,7 @@ import com.graywolf336.jail.enums.Lang;
usage = "/jail telein [jail] (name)" usage = "/jail telein [jail] (name)"
) )
public class JailTeleInCommand implements Command { public class JailTeleInCommand implements Command {
@SuppressWarnings("deprecation")
public boolean execute(JailManager jm, CommandSender sender, String... args) throws Exception { public boolean execute(JailManager jm, CommandSender sender, String... args) throws Exception {
Jail j = jm.getJail(args[1]); Jail j = jm.getJail(args[1]);

View File

@ -23,6 +23,7 @@ import com.graywolf336.jail.enums.Lang;
usage = "/jail teleout [jail] (name)" usage = "/jail teleout [jail] (name)"
) )
public class JailTeleOutCommand implements Command { public class JailTeleOutCommand implements Command {
@SuppressWarnings("deprecation")
public boolean execute(JailManager jm, CommandSender sender, String... args) throws Exception { public boolean execute(JailManager jm, CommandSender sender, String... args) throws Exception {
Jail j = jm.getJail(args[1]); Jail j = jm.getJail(args[1]);

View File

@ -27,6 +27,7 @@ import com.graywolf336.jail.enums.Settings;
public class JailVoteCommand implements Command { public class JailVoteCommand implements Command {
private static final String[] options = new String[] { "yes", "no" }; private static final String[] options = new String[] { "yes", "no" };
@SuppressWarnings("deprecation")
public boolean execute(JailManager jm, CommandSender sender, String... args) { public boolean execute(JailManager jm, CommandSender sender, String... args) {
if(jm.getPlugin().getConfig().getBoolean(Settings.JAILVOTEENABLED.getPath()) && jm.getPlugin().getJailVoteManager() != null && !jm.getJails().isEmpty()) { if(jm.getPlugin().getConfig().getBoolean(Settings.JAILVOTEENABLED.getPath()) && jm.getPlugin().getJailVoteManager() != null && !jm.getJails().isEmpty()) {
Player p = (Player) sender; Player p = (Player) sender;

View File

@ -103,6 +103,7 @@ public class OldInputOutput {
ps.close(); ps.close();
} }
@SuppressWarnings("deprecation")
public void LoadPrisoners() throws SQLException { public void LoadPrisoners() throws SQLException {
if(pl.getJailManager().getJails().size() != 0) { if(pl.getJailManager().getJails().size() != 0) {
PreparedStatement ps = getConnection().prepareStatement("SELECT * FROM jail_prisoners"); PreparedStatement ps = getConnection().prepareStatement("SELECT * FROM jail_prisoners");