Skip to content
This repository was archived by the owner on Jan 4, 2018. It is now read-only.
This repository was archived by the owner on Jan 4, 2018. It is now read-only.

Hey! It's not really issue but this is question #1

@sir-crashalot

Description

@sir-crashalot

Hey!

I saw that you are actually doing on GameAPI. So, I want to ask you if you will release games like SuperPaintball, Death Tag, Snake,... to your github's account? I'll be happy to see you coding 👍 !

Thanks for answer and enjoy in programming!

And my issue:

Ok :) I wrote down code into my eclipse and I have some errors :/

First error is .getVersion() in GameAPI.java:

public static boolean is1_8(Player p){
    return ((CraftPlayer) p).getHandle().playerConnection.networkManager.getVersion() >= 47;
}

The error sends me message "The method getVersion() is undefined for the type NetworkManager"
and I can only Add cast to method receiver, but it sends me bigger errors.

And second problem is connection.sendPacket in MessageManager.java:

public static void sendTitle(Player player, int fadeIn, int stay, int fadeOut, String title, String subtitle) {
    CraftPlayer craftPlayer = (CraftPlayer) player;

    if (!GameAPI.is1_8(player))
        return;

    IChatBaseComponent serializedTitle = ChatSerializer.a(TextConverter.convert(title));
    IChatBaseComponent serializedSubTitle = ChatSerializer.a(TextConverter.convert(subtitle));

            PlayerConnection connection = craftPlayer.getHandle().playerConnection;

    connection.sendPacket(new ProtocolInjector.PacketTitle(
            ProtocolInjector.PacketTitle.Action.TIMES, fadeIn, stay, fadeOut));
    connection.sendPacket(new ProtocolInjector.PacketTitle(
            ProtocolInjector.PacketTitle.Action.TITLE, (net.minecraft.server.v1_7_R4.IChatBaseComponent) serializedTitle));
    connection.sendPacket(new ProtocolInjector.PacketTitle(
            ProtocolInjector.PacketTitle.Action.SUBTITLE, (net.minecraft.server.v1_7_R4.IChatBaseComponent) serializedSubTitle));
}

The problems sends me a message "The method sendPacket(Packet) in the type PlayerConnection is not applicable for the arguments (ProtocolInjector.PacketTitle)"

I also have problem here:

public static void sendTabTitle(Player player, String header, String footer) {
    CraftPlayer craftPlayer = (CraftPlayer) player;
    if(!GameAPI.is1_8(player)) return;
    PlayerConnection connection = craftPlayer.getHandle().playerConnection;

    IChatBaseComponent header2 = ChatSerializer.a(new StringBuilder().append("{'text': '")
            .append(header).append("'}").toString());
    IChatBaseComponent footer2 = ChatSerializer.a(new StringBuilder().append("{'text': '")
            .append(footer).append("'}").toString());
    connection.sendPacket(new ProtocolInjector.PacketTabHeader());
}

This problem sends me a message "The method sendPacket(Packet) in the type PlayerConnection is not applicable for the arguments (ProtocolInjector.PacketTabHeader)"

Can you help please? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions