Skip to content

optionIntercept() replace for what? #207

Description

@JoaoGabrielCostaa

Make sure you're doing the following

  • You're using the latest build for your server version
  • This isn't an issue caused by another plugin
  • You've checked for duplicate issues
  • You didn't use /reload

Describe the question
I want to know how can achive the same functionallity of the method that was removed (optionIntercept)

Code
`public class PremiumListeners extends PacketAdapter {

private final Terminal plugin;

private final SecureRandom random = new SecureRandom();
private final KeyPair keyPair = EncryptionUtil.generateKeyPair();
private final RateLimiter rateLimiter;

public PremiumListeners(Terminal plugin, RateLimiter rateLimiter) {
    super(params()
            .plugin(plugin)
            .optionIntercept() // removed (compilation error at ProtocolLib API 5.0.0)
            .types(START, ENCRYPTION_BEGIN)
            .optionAsync());

    this.plugin = plugin;
    this.rateLimiter = rateLimiter;
}`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions