Browse Source

Updated to 2.27.0

master
Stefatorus 3 years ago
parent
commit
dfedd265d5
  1. 2
      .classpath
  2. 2
      plugin.yml
  3. 2
      src/com/entryrise/lagassist/packets/PacketInjector.java
  4. 3
      src/com/entryrise/lagassist/stacker/StackManager.java
  5. 6
      src/com/entryrise/lagassist/utils/VersionMgr.java
  6. 1
      target/classes/.gitignore

2
.classpath

@ -15,6 +15,6 @@
<classpathentry kind="lib" path="W:/Minecraft Versions/Paper-1.12.2-b1618.jar"/> <classpathentry kind="lib" path="W:/Minecraft Versions/Paper-1.12.2-b1618.jar"/>
<classpathentry kind="lib" path="W:/Minecraft Versions/PaperSpigot-1.8.8-R0.1-SNAPSHOT-latest.jar"/> <classpathentry kind="lib" path="W:/Minecraft Versions/PaperSpigot-1.8.8-R0.1-SNAPSHOT-latest.jar"/>
<classpathentry kind="lib" path="W:/Custom Plugins/Vault.jar"/> <classpathentry kind="lib" path="W:/Custom Plugins/Vault.jar"/>
<classpathentry kind="lib" path="W:/Minecraft Versions/spigot-1.16.4.jar"/>
<classpathentry kind="lib" path="W:/Minecraft Versions/spigot-1.18.1.jar"/>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>

2
plugin.yml

@ -1,6 +1,6 @@
name: LagAssist name: LagAssist
authors: [Stefatorus, EntryRise] authors: [Stefatorus, EntryRise]
version: 2.26.0
version: 2.27.0
api-version: 1.13 api-version: 1.13
description: LagAssist is an advanced anti-lag solution that allows server owners find and remove lag using multiple advanced and efficient methods. description: LagAssist is an advanced anti-lag solution that allows server owners find and remove lag using multiple advanced and efficient methods.
main: com.entryrise.lagassist.Main main: com.entryrise.lagassist.Main

2
src/com/entryrise/lagassist/packets/PacketInjector.java

@ -26,7 +26,7 @@ public class PacketInjector {
PacketInjector.playerConnection = Reflection.getClass(VersionMgr.isV_17Plus() ? "{nms}.level.EntityPlayer" : "{nms}.EntityPlayer").getField(VersionMgr.isV_17Plus() ? "b" : "playerConnection"); PacketInjector.playerConnection = Reflection.getClass(VersionMgr.isV_17Plus() ? "{nms}.level.EntityPlayer" : "{nms}.EntityPlayer").getField(VersionMgr.isV_17Plus() ? "b" : "playerConnection");
PacketInjector.networkManager = Reflection.getClass(VersionMgr.isV_17Plus() ? "{nms}.network.PlayerConnection" : "{nms}.PlayerConnection").getField(VersionMgr.isV_17Plus() ? "a" : "networkManager"); PacketInjector.networkManager = Reflection.getClass(VersionMgr.isV_17Plus() ? "{nms}.network.PlayerConnection" : "{nms}.PlayerConnection").getField(VersionMgr.isV_17Plus() ? "a" : "networkManager");
PacketInjector.channel = Reflection.getClass(VersionMgr.isV1_17() ? "{nm}.network.NetworkManager" : "{nms}.NetworkManager").getField(VersionMgr.isV1_17() ? "k" : "channel");
PacketInjector.channel = Reflection.getClass(VersionMgr.isV_17Plus() ? "{nm}.network.NetworkManager" : "{nms}.NetworkManager").getField(VersionMgr.isV_17Plus() ? "k" : "channel");
PacketInjector.refreshSessions(); PacketInjector.refreshSessions();
} catch (Exception e) { } catch (Exception e) {

3
src/com/entryrise/lagassist/stacker/StackManager.java

@ -111,7 +111,8 @@ public class StackManager implements Listener {
// } // }
if (StackChunk.tryStacking(ent.getLocation(), ent.getType(), ent)) { if (StackChunk.tryStacking(ent.getLocation(), ent.getType(), ent)) {
e.setCancelled(true);
// e.setCancelled(true);
ent.remove();
} }
} }

6
src/com/entryrise/lagassist/utils/VersionMgr.java

@ -62,8 +62,12 @@ public class VersionMgr {
return Bukkit.getVersion().contains("1.17"); return Bukkit.getVersion().contains("1.17");
} }
public static boolean isV1_18() {
return Bukkit.getVersion().contains("1.18");
}
public static boolean isV_17Plus() { public static boolean isV_17Plus() {
return isV1_17();
return isV1_17() || isV1_18();
} }
public static boolean isNewMaterials() { public static boolean isNewMaterials() {

1
target/classes/.gitignore

@ -1,2 +1 @@
/cx/
/com/ /com/

Loading…
Cancel
Save