Skip to content

Commit

Permalink
Merge pull request #71 from 4drian3d/feat/velocity-3.3
Browse files Browse the repository at this point in the history
Updated to latest Velocity 3.3.0 build
  • Loading branch information
4drian3d authored Jan 19, 2024
2 parents 33083ce + f9b875f commit 836dfd6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Allows you to cancel or modify messages or commands from Velocity without synchr

## Requirements
- Java 17+
- Velocity 3.2.0+
- Velocity 3.3.0+
#### **Backend:**
- Java 17+
- Paper 1.19.4+ or Sponge 1.16.5+ (API 8.1+)
Expand Down
3 changes: 1 addition & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ dependencyResolutionManagement {
repositories {
maven("https://papermc.io/repo/repository/maven-public/")
maven("https://repo.codemc.io/repository/maven-releases/")
maven("https://repo.william278.net/velocity/'")
maven("https://repo.william278.net/velocity/")
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven("https://maven.fabricmc.net/")
maven("https://maven.elytrium.net/repo/")
maven("https://jitpack.io")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.google.inject.Inject;
import com.velocitypowered.api.event.EventManager;
import com.velocitypowered.proxy.protocol.packet.ServerData;
import com.velocitypowered.proxy.protocol.packet.ServerDataPacket;
import io.github._4drian3d.signedvelocity.velocity.SignedVelocity;
import io.github._4drian3d.vpacketevents.api.event.PacketSendEvent;

Expand All @@ -14,8 +14,8 @@ final class VPacketEventsAdapter implements PacketAdapter {

static {
try {
final MethodHandles.Lookup lookup = MethodHandles.privateLookupIn(ServerData.class, MethodHandles.lookup());
ENFORCED_SETTER = lookup.findSetter(ServerData.class, "secureChatEnforced", Boolean.TYPE);
final MethodHandles.Lookup lookup = MethodHandles.privateLookupIn(ServerDataPacket.class, MethodHandles.lookup());
ENFORCED_SETTER = lookup.findSetter(ServerDataPacket.class, "secureChatEnforced", Boolean.TYPE);
} catch (Exception e) {
throw new RuntimeException(e);
}
Expand All @@ -29,7 +29,7 @@ final class VPacketEventsAdapter implements PacketAdapter {
@Override
public void register() {
eventManager.register(plugin, PacketSendEvent.class, event -> {
if (!(event.getPacket() instanceof final ServerData serverData)) {
if (!(event.getPacket() instanceof final ServerDataPacket serverData)) {
return;
}
if (serverData.isSecureChatEnforced()) {
Expand Down

0 comments on commit 836dfd6

Please sign in to comment.