diff --git a/pom.xml b/pom.xml
index 605e94fe9..26ecd2ac8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,6 +6,7 @@
fr.xephi
authme
5.1-SNAPSHOT
+ jar
AuthMeReloaded
Authentication plugin for CraftBukkit/Spigot!
@@ -88,9 +89,8 @@
com.zaxxer:HikariCP
- org.slf4j:slf4j-simple
+ org.slf4j:slf4j-jdk14
org.slf4j:slf4j-api
- com.google.code.gson:gson
com.maxmind.geoip:geoip-api
com.sun.mail:javax.mail
com.comphenix.attribute:AttributeStorage
@@ -194,7 +194,7 @@
org.slf4j
- slf4j-simple
+ slf4j-jdk14
1.7.12
compile
true
@@ -308,13 +308,23 @@
true
-
-
- com.comphenix.protocol
- ProtocolLib
- 3.4.0
- true
-
+
+
+ com.comphenix.protocol
+ ProtocolLib
+ 3.4.0
+ true
+
+
+ cglib-nodep
+ cglib
+
+
+ BukkitExecutors
+ com.comphenix.executors
+
+
+
diff --git a/src/main/java/fr/xephi/authme/Utils.java b/src/main/java/fr/xephi/authme/Utils.java
index 4abde79fa..70171dc0a 100644
--- a/src/main/java/fr/xephi/authme/Utils.java
+++ b/src/main/java/fr/xephi/authme/Utils.java
@@ -160,7 +160,6 @@ public class Utils {
}
// TODO: remove if not needed
- @SuppressWarnings("unused")
public static void hasPermOnJoin(Player player) {
if (plugin.permission == null)
return;
diff --git a/src/main/java/fr/xephi/authme/api/NewAPI.java b/src/main/java/fr/xephi/authme/api/NewAPI.java
index 937a8abe3..ab7d7cb47 100644
--- a/src/main/java/fr/xephi/authme/api/NewAPI.java
+++ b/src/main/java/fr/xephi/authme/api/NewAPI.java
@@ -6,11 +6,9 @@ import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.entity.Player;
-import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.Plugin;
import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.ConsoleLogger;
import fr.xephi.authme.Utils;
import fr.xephi.authme.cache.auth.PlayerAuth;
import fr.xephi.authme.cache.auth.PlayerCache;
@@ -94,16 +92,6 @@ public class NewAPI {
}
}
- public void setPlayerInventory(Player player, ItemStack[] content,
- ItemStack[] armor) {
- try {
- player.getInventory().setContents(content);
- player.getInventory().setArmorContents(armor);
- } catch (Exception npe) {
- ConsoleLogger.showError("Some error appear while trying to set inventory for " + player.getName());
- }
- }
-
/**
*
* @param playerName
diff --git a/src/main/java/fr/xephi/authme/events/RestoreInventoryEvent.java b/src/main/java/fr/xephi/authme/events/RestoreInventoryEvent.java
index c3069788b..b73c123b2 100644
--- a/src/main/java/fr/xephi/authme/events/RestoreInventoryEvent.java
+++ b/src/main/java/fr/xephi/authme/events/RestoreInventoryEvent.java
@@ -1,7 +1,6 @@
package fr.xephi.authme.events;
import org.bukkit.entity.Player;
-import org.bukkit.inventory.ItemStack;
/**
* This event restore the inventory.
@@ -10,37 +9,15 @@ import org.bukkit.inventory.ItemStack;
*/
public class RestoreInventoryEvent extends CustomEvent {
- private ItemStack[] inventory;
- private ItemStack[] armor;
private Player player;
public RestoreInventoryEvent(Player player) {
this.player = player;
- this.inventory = player.getInventory().getContents();
- this.armor = player.getInventory().getArmorContents();
}
public RestoreInventoryEvent(Player player, boolean async) {
super(async);
this.player = player;
- this.inventory = inventory;
- this.armor = armor;
- }
-
- public ItemStack[] getInventory() {
- return this.inventory;
- }
-
- public void setInventory(ItemStack[] inventory) {
- this.inventory = inventory;
- }
-
- public ItemStack[] getArmor() {
- return this.armor;
- }
-
- public void setArmor(ItemStack[] armor) {
- this.armor = armor;
}
public Player getPlayer() {
diff --git a/src/main/java/fr/xephi/authme/process/login/ProcessSyncronousPlayerLogin.java b/src/main/java/fr/xephi/authme/process/login/ProcessSyncronousPlayerLogin.java
index da0a42b2b..20eacdf2e 100644
--- a/src/main/java/fr/xephi/authme/process/login/ProcessSyncronousPlayerLogin.java
+++ b/src/main/java/fr/xephi/authme/process/login/ProcessSyncronousPlayerLogin.java
@@ -95,7 +95,6 @@ public class ProcessSyncronousPlayerLogin implements Runnable {
RestoreInventoryEvent event = new RestoreInventoryEvent(player);
Bukkit.getServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) {
- plugin.api.setPlayerInventory(player, event.getInventory(), event.getArmor());
plugin.inventoryProtector.sendInventoryPacket(player);
}
}
diff --git a/src/main/java/fr/xephi/authme/process/quit/ProcessSyncronousPlayerQuit.java b/src/main/java/fr/xephi/authme/process/quit/ProcessSyncronousPlayerQuit.java
index ea644270c..1b661b6fa 100644
--- a/src/main/java/fr/xephi/authme/process/quit/ProcessSyncronousPlayerQuit.java
+++ b/src/main/java/fr/xephi/authme/process/quit/ProcessSyncronousPlayerQuit.java
@@ -4,9 +4,7 @@ import org.bukkit.GameMode;
import org.bukkit.entity.Player;
import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.events.RestoreInventoryEvent;
import fr.xephi.authme.settings.Settings;
-import org.bukkit.Bukkit;
public class ProcessSyncronousPlayerQuit implements Runnable {
@@ -28,11 +26,6 @@ public class ProcessSyncronousPlayerQuit implements Runnable {
@Override
public void run() {
- RestoreInventoryEvent ev = new RestoreInventoryEvent(player);
- Bukkit.getPluginManager().callEvent(ev);
- if (!ev.isCancelled()) {
- plugin.api.setPlayerInventory(player, ev.getInventory(), ev.getArmor());
- }
if (needToChange) {
player.setOp(isOp);
diff --git a/src/main/java/fr/xephi/authme/process/register/ProcessSyncronousPasswordRegister.java b/src/main/java/fr/xephi/authme/process/register/ProcessSyncronousPasswordRegister.java
index ab0612d53..1e20f2ba9 100644
--- a/src/main/java/fr/xephi/authme/process/register/ProcessSyncronousPasswordRegister.java
+++ b/src/main/java/fr/xephi/authme/process/register/ProcessSyncronousPasswordRegister.java
@@ -95,9 +95,7 @@ public class ProcessSyncronousPasswordRegister implements Runnable {
if (Settings.protectInventoryBeforeLogInEnabled && plugin.inventoryProtector != null) {
RestoreInventoryEvent event = new RestoreInventoryEvent(player);
Bukkit.getPluginManager().callEvent(event);
- if (!event.isCancelled() && event.getArmor() != null && event.getInventory() != null) {
- player.getInventory().setContents(event.getInventory());
- player.getInventory().setArmorContents(event.getArmor());
+ if (!event.isCancelled()) {
plugin.inventoryProtector.sendInventoryPacket(player);
}
}