mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-04-13 23:45:53 +02:00
Fix compatibility issues
This commit is contained in:
parent
4a22c916b1
commit
de5ecfcb93
10
pom.xml
10
pom.xml
@ -95,6 +95,7 @@
|
||||
<include>com.sun.mail:javax.mail</include>
|
||||
<include>com.comphenix.attribute:AttributeStorage</include>
|
||||
<include>org.mcstats.bukkit:metrics</include>
|
||||
<include>com.google.code.gson:gson</include>
|
||||
</includes>
|
||||
</artifactSet>
|
||||
<relocations>
|
||||
@ -241,6 +242,15 @@
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- GSON required for 1.7.X compatibility -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.4</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Maxmind GeoIp API -->
|
||||
<dependency>
|
||||
|
@ -24,7 +24,6 @@ import org.bukkit.scheduler.BukkitTask;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
import org.mcstats.Metrics;
|
||||
import com.comphenix.protocol.ProtocolLibrary;
|
||||
import com.earth2me.essentials.Essentials;
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
import net.milkbowl.vault.permission.Permission;
|
||||
@ -474,7 +473,7 @@ public class AuthMe extends JavaPlugin {
|
||||
if (Settings.protectInventoryBeforeLogInEnabled) {
|
||||
if (server.getPluginManager().isPluginEnabled("ProtocolLib")) {
|
||||
inventoryProtector = new AuthMeInventoryListener(this);
|
||||
ProtocolLibrary.getProtocolManager().addPacketListener(inventoryProtector);
|
||||
inventoryProtector.register();
|
||||
} else {
|
||||
ConsoleLogger.showError("WARNING!!! The protectInventory feature requires ProtocolLib! Disabling it...");
|
||||
Settings.protectInventoryBeforeLogInEnabled = false;
|
||||
|
@ -60,6 +60,10 @@ public class AuthMeInventoryListener extends PacketAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
public void register() {
|
||||
ProtocolLibrary.getProtocolManager().addPacketListener(this);
|
||||
}
|
||||
|
||||
public void sendInventoryPacket(Player player) {
|
||||
ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
|
||||
PacketContainer inventoryPacket = protocolManager.createPacket(PacketType.Play.Server.WINDOW_ITEMS);
|
||||
|
Loading…
Reference in New Issue
Block a user