diff --git a/README.md b/README.md index 1e71e4b..a5a217d 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ shifted by a random number, making useless every tool that uses absolute coordin Requirements ------------ -ProtocolLib +ProtocolLib 5.0.0 Snapshot or higher Permissions ----------- diff --git a/pom.xml b/pom.xml index 9f48c97..0ba7ffb 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 org.warp CoordinatesObfuscator - 1.4.7 + 1.4.8 CoordinatesObfuscator @@ -52,19 +52,19 @@ com.comphenix.protocol ProtocolLib - 4.8.0 + 5.0.0-SNAPSHOT provided io.papermc.paper paper-api - 1.18.2-R0.1-SNAPSHOT + 1.19.2-R0.1-SNAPSHOT provided org.junit.jupiter junit-jupiter - 5.8.2 + 5.9.0 test diff --git a/src/main/java/org/warp/coordinatesobfuscator/CoordinatesObfuscator.java b/src/main/java/org/warp/coordinatesobfuscator/CoordinatesObfuscator.java index 5817e9b..d55d382 100644 --- a/src/main/java/org/warp/coordinatesobfuscator/CoordinatesObfuscator.java +++ b/src/main/java/org/warp/coordinatesobfuscator/CoordinatesObfuscator.java @@ -22,7 +22,6 @@ import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerRespawnEvent; -import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.plugin.java.JavaPlugin; import java.util.ArrayList; @@ -94,6 +93,7 @@ public void onEnable() { packets.add(PacketType.Play.Server.WORLD_EVENT); packets.add(PacketType.Play.Server.NAMED_SOUND_EFFECT); + packets.add(PacketType.Play.Server.CUSTOM_SOUND_EFFECT); packets.add(PacketType.Play.Server.NAMED_ENTITY_SPAWN); packets.add(PacketType.Play.Server.SPAWN_ENTITY); diff --git a/src/main/java/org/warp/coordinatesobfuscator/PlayerManager.java b/src/main/java/org/warp/coordinatesobfuscator/PlayerManager.java index 0ec2e3e..dd0a8a1 100644 --- a/src/main/java/org/warp/coordinatesobfuscator/PlayerManager.java +++ b/src/main/java/org/warp/coordinatesobfuscator/PlayerManager.java @@ -1,10 +1,8 @@ package org.warp.coordinatesobfuscator; -import com.comphenix.protocol.injector.server.TemporaryPlayer; -import org.bukkit.Bukkit; +import com.comphenix.protocol.injector.temporary.TemporaryPlayer; import org.bukkit.Location; import org.bukkit.World; -import org.bukkit.WorldBorder; import org.bukkit.entity.Player; import java.util.Optional; diff --git a/src/main/java/org/warp/coordinatesobfuscator/TranslatorClientbound.java b/src/main/java/org/warp/coordinatesobfuscator/TranslatorClientbound.java index 6196bb3..97d2495 100644 --- a/src/main/java/org/warp/coordinatesobfuscator/TranslatorClientbound.java +++ b/src/main/java/org/warp/coordinatesobfuscator/TranslatorClientbound.java @@ -2,7 +2,7 @@ import com.comphenix.protocol.events.InternalStructure; import com.comphenix.protocol.events.PacketContainer; -import com.comphenix.protocol.injector.server.TemporaryPlayer; +import com.comphenix.protocol.injector.temporary.TemporaryPlayer; import com.comphenix.protocol.reflect.EquivalentConverter; import com.comphenix.protocol.reflect.StructureModifier; import com.comphenix.protocol.wrappers.BlockPosition; @@ -161,6 +161,7 @@ public static boolean outgoing(Logger logger, final PacketContainer packet, fina sendExplosion(logger, packet, offset); break; case "NAMED_SOUND_EFFECT": + case "CUSTOM_SOUND_EFFECT": sendInt8(logger, packet, offset); break; case "ENTITY_METADATA": diff --git a/src/main/java/org/warp/coordinatesobfuscator/TranslatorServerbound.java b/src/main/java/org/warp/coordinatesobfuscator/TranslatorServerbound.java index ed5f590..2b4e512 100644 --- a/src/main/java/org/warp/coordinatesobfuscator/TranslatorServerbound.java +++ b/src/main/java/org/warp/coordinatesobfuscator/TranslatorServerbound.java @@ -1,7 +1,7 @@ package org.warp.coordinatesobfuscator; import com.comphenix.protocol.events.PacketContainer; -import com.comphenix.protocol.injector.server.TemporaryPlayer; +import com.comphenix.protocol.injector.temporary.TemporaryPlayer; import com.comphenix.protocol.wrappers.BlockPosition; import org.bukkit.entity.Player; import org.bukkit.util.Vector; diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index e81976c..d05d244 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,10 @@ name: ${project.name} main: ${project.groupId}.coordinatesobfuscator.CoordinatesObfuscator version: ${project.version} -api-version: 1.18 +api-version: 1.19 author: Cavallium -depend: [ ProtocolLib ] \ No newline at end of file +depend: [ ProtocolLib ] +permissions: + coordinatesobfuscator.bypass: + description: "Bypass obfuscation" + default: op diff --git a/start.sh b/start.sh index 34d7e8b..92a4ec5 100644 --- a/start.sh +++ b/start.sh @@ -1,6 +1,6 @@ WORKSPACE=".papermc" -MC_VERSION="1.17.1" -PAPER_BUILD="latest" +MC_VERSION="1.19.2" +PAPER_BUILD="130" ## ============== DO NOT EDIT THE SCRIPT BELOW UNLESS YOU KNOW WHAT YOU ARE DOING ============== ## @@ -20,7 +20,8 @@ cd $WORKSPACE || exit # Moving to the workspace fodler or exit if it fails. # Check for the paper executable PAPER_JAR="paper-$MC_VERSION-$PAPER_BUILD.jar" -PAPER_LNK="https://papermc.io/api/v1/paper/$MC_VERSION/$PAPER_BUILD/download" +url="https://papermc.io/api/v2/projects/paper" +PAPER_LNK="$url/versions/$MC_VERSION/builds/$PAPER_BUILD/downloads/paper-$MC_VERSION-$PAPER_BUILD.jar" if [ ! -f $PAPER_JAR ]; then wget -O $PAPER_JAR $PAPER_LNK