You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Hi, i'm currently trying to use protocollib as a dependency for my plugin, but when i try to use it, i get this error:
java.lang.IllegalStateException: ProtocolLib is not loaded or initialized properly.```
**API method(s) used**
ProtocolManager, PacketContainer, WrappedDataWatcher
**Expected behavior**
For it to uhh well work
**Code**
In the onEnable:
```java
ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
AssignTeam.initialize(new GlowAllies(protocolManager), CreateTeams.redTeam, CreateTeams.blueTeam, CreateTeams.spectatorTeam);
and
importcom.comphenix.protocol.PacketType;
importcom.comphenix.protocol.ProtocolManager;
importcom.comphenix.protocol.events.PacketContainer;
importcom.comphenix.protocol.wrappers.WrappedDataWatcher;
importorg.bukkit.entity.Player;
publicclassGlowAllies {
privatefinalProtocolManagerprotocolManager;
publicGlowAllies(ProtocolManagerprotocolManager) {
this.protocolManager = protocolManager;
}
publicvoidsetGlow(Playerplayer, Playerreceiver) {
PacketContainerpacket = protocolManager.createPacket(PacketType.Play.Server.ENTITY_METADATA);
packet.getIntegers().write(0, player.getEntityId()); // Set packet's entity idWrappedDataWatcherwatcher = newWrappedDataWatcher(); // Create data watcher, the Entity Metadata packet requires thisWrappedDataWatcher.Serializerserializer = WrappedDataWatcher.Registry.get(Byte.class); // Found this through google, needed for some stupid reasonwatcher.setEntity(player); // Set the new data watcher's targetwatcher.setObject(0, (byte) (0x40)); // Set status to glowing, found on protocol pagepacket.getWatchableCollectionModifier().write(0, watcher.getWatchableObjects()); // Make the packet's datawatcher the one we createdprotocolManager.sendServerPacket(receiver, packet);
}
}
Additional context
I'm trying to make a certain player glow to another specific player, i searched on the internet and found the 2dn block of code, but i can't even seem to make protocolLib to load (the error above). It may be a skill issue since i'm new to coding, but i don't understand what's the problem here...
The text was updated successfully, but these errors were encountered:
Make sure you're doing the following
Describe the question
Hi, i'm currently trying to use protocollib as a dependency for my plugin, but when i try to use it, i get this error:
and
Additional context
I'm trying to make a certain player glow to another specific player, i searched on the internet and found the 2dn block of code, but i can't even seem to make protocolLib to load (the error above). It may be a skill issue since i'm new to coding, but i don't understand what's the problem here...
The text was updated successfully, but these errors were encountered: