ProtocolLib icon indicating copy to clipboard operation
ProtocolLib copied to clipboard

1.19Maven Problem

Open kopolinka32 opened this issue 3 years ago • 6 comments

  • [ ] This issue is not solved in a development build

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Version Info Provide your ProtocolLib install info with /protocol dump through pastebin.

Additional context Add any other context about the problem here.

Caused by: java.lang.NullPointerException: Cannot invoke "com.comphenix.protocol.ProtocolManager.createPacket(com.comphenix.protocol.PacketType)" because "protocolManager" is null at com.challangerson.guilds.element.tablist.TabManager.sendTabList(TabManager.java:39) ~[?:?] at com.challangerson.guilds.listeners.PlayerJoinListener.onPlayerJoinListener(PlayerJoinListener.java:22) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.19-R0.1-SNAPSHOT.jar:?] ... 15 more

After adding a 1.19 maven cant accept

    <dependency>
        <groupId>com.comphenix.protocol</groupId>
        <artifactId>ProtocolLib</artifactId>
        <version>5.0.0-SNAPSHOT-B573</version>
    </dependency>

how can i add a newest version to maven or my respositories the max is 5.0.0

kopolinka32 avatar Jul 03 '22 22:07 kopolinka32

Make sure you set the scope of your dependency to provided like:

    <dependency>
        <groupId>com.comphenix.protocol</groupId>
        <artifactId>ProtocolLib</artifactId>
        <version>5.0.0-SNAPSHOT-B573</version>
        <scope>provided</scope>
    </dependency>

derklaro avatar Jul 04 '22 09:07 derklaro

Make sure you set the scope of your dependency to provided like:

    <dependency>
        <groupId>com.comphenix.protocol</groupId>
        <artifactId>ProtocolLib</artifactId>
        <version>5.0.0-SNAPSHOT-B573</version>
        <scope>provided</scope>
    </dependency>

Not working actually

kopolinka32 avatar Jul 04 '22 12:07 kopolinka32

Make sure you set the scope of your dependency to provided like:

    <dependency>
        <groupId>com.comphenix.protocol</groupId>
        <artifactId>ProtocolLib</artifactId>
        <version>5.0.0-SNAPSHOT-B573</version>
        <scope>provided</scope>
    </dependency>

Not working actually

image

kopolinka32 avatar Jul 04 '22 12:07 kopolinka32

remove the -b573 suffix

derklaro avatar Jul 04 '22 12:07 derklaro

Hi i have a problem i have something like that :

@SneakyThrows
public void sendTabList(Player player) {

    ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();

    MinecraftServer server = ((CraftServer)Bukkit.getServer()).getServer();
    WorldServer world = ((CraftWorld)Bukkit.getWorlds().get(0)).getHandle();
    GameProfile gameProfile = new GameProfile(UUID.randomUUID(), "");


    EntityPlayer entityPlayer = new EntityPlayer(server, world, gameProfile, null);

    PacketContainer packetContainer = protocolManager.createPacket(PacketType.Play.Server.PLAYER_INFO);
    packetContainer.getPlayerInfoAction().write(0, EnumWrappers.PlayerInfoAction.ADD_PLAYER);
    packetContainer.getModifier().write(1, entityPlayer);

    protocolManager.sendServerPacket(player, packetContainer);

}

Andd a problem is : https://pastebin.com/g23Rzdbq

kopolinka32 avatar Jul 04 '22 13:07 kopolinka32

This issue can be closed now, see #1726

derklaro avatar Jul 10 '22 15:07 derklaro