Java Code Examples for net.minecraft.entity.player.EntityPlayer.EnumChatVisibility

The following are Jave code examples for showing how to use EnumChatVisibility of the net.minecraft.entity.player.EntityPlayer class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: DecompiledMinecraft   File: NetHandlerPlayServer.java   View Source Code Vote up 5 votes
public void sendPacket(final Packet packetIn)
{
    if (packetIn instanceof S02PacketChat)
    {
        S02PacketChat s02packetchat = (S02PacketChat)packetIn;
        EntityPlayer.EnumChatVisibility entityplayer$enumchatvisibility = this.playerEntity.getChatVisibility();

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.HIDDEN)
        {
            return;
        }

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.SYSTEM && !s02packetchat.isChat())
        {
            return;
        }
    }

    try
    {
        this.netManager.sendPacket(packetIn);
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Sending packet");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Packet being sent");
        crashreportcategory.addCrashSectionCallable("Packet class", new Callable<String>()
        {
            public String call() throws Exception
            {
                return packetIn.getClass().getCanonicalName();
            }
        });
        throw new ReportedException(crashreport);
    }
}
 
Example 2
Project: DecompiledMinecraft   File: NetHandlerPlayServer.java   View Source Code Vote up 5 votes
public void sendPacket(final Packet packetIn)
{
    if (packetIn instanceof S02PacketChat)
    {
        S02PacketChat s02packetchat = (S02PacketChat)packetIn;
        EntityPlayer.EnumChatVisibility entityplayer$enumchatvisibility = this.playerEntity.getChatVisibility();

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.HIDDEN)
        {
            return;
        }

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.SYSTEM && !s02packetchat.isChat())
        {
            return;
        }
    }

    try
    {
        this.netManager.sendPacket(packetIn);
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Sending packet");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Packet being sent");
        crashreportcategory.addCrashSectionCallable("Packet class", new Callable<String>()
        {
            public String call() throws Exception
            {
                return packetIn.getClass().getCanonicalName();
            }
        });
        throw new ReportedException(crashreport);
    }
}
 
Example 3
Project: DecompiledMinecraft   File: C15PacketClientSettings.java   View Source Code Vote up 5 votes
public C15PacketClientSettings(String langIn, int viewIn, EntityPlayer.EnumChatVisibility chatVisibilityIn, boolean enableColorsIn, int modelPartFlagsIn)
{
    this.lang = langIn;
    this.view = viewIn;
    this.chatVisibility = chatVisibilityIn;
    this.enableColors = enableColorsIn;
    this.modelPartFlags = modelPartFlagsIn;
}
 
Example 4
Project: BaseClient   File: NetHandlerPlayServer.java   View Source Code Vote up 5 votes
public void sendPacket(final Packet packetIn)
{
    if (packetIn instanceof S02PacketChat)
    {
        S02PacketChat s02packetchat = (S02PacketChat)packetIn;
        EntityPlayer.EnumChatVisibility entityplayer$enumchatvisibility = this.playerEntity.getChatVisibility();

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.HIDDEN)
        {
            return;
        }

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.SYSTEM && !s02packetchat.isChat())
        {
            return;
        }
    }

    try
    {
        this.netManager.sendPacket(packetIn);
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Sending packet");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Packet being sent");
        crashreportcategory.addCrashSectionCallable("Packet class", new Callable<String>()
        {
            public String call() throws Exception
            {
                return packetIn.getClass().getCanonicalName();
            }
        });
        throw new ReportedException(crashreport);
    }
}
 
Example 5
Project: BaseClient   File: C15PacketClientSettings.java   View Source Code Vote up 5 votes
public C15PacketClientSettings(String langIn, int viewIn, EntityPlayer.EnumChatVisibility chatVisibilityIn, boolean enableColorsIn, int modelPartFlagsIn)
{
    this.lang = langIn;
    this.view = viewIn;
    this.chatVisibility = chatVisibilityIn;
    this.enableColors = enableColorsIn;
    this.modelPartFlags = modelPartFlagsIn;
}
 
Example 6
Project: BaseClient   File: NetHandlerPlayServer.java   View Source Code Vote up 5 votes
public void sendPacket(final Packet packetIn)
{
    if (packetIn instanceof S02PacketChat)
    {
        S02PacketChat s02packetchat = (S02PacketChat)packetIn;
        EntityPlayer.EnumChatVisibility entityplayer$enumchatvisibility = this.playerEntity.getChatVisibility();

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.HIDDEN)
        {
            return;
        }

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.SYSTEM && !s02packetchat.isChat())
        {
            return;
        }
    }

    try
    {
        this.netManager.sendPacket(packetIn);
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Sending packet");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Packet being sent");
        crashreportcategory.addCrashSectionCallable("Packet class", new Callable<String>()
        {
            public String call() throws Exception
            {
                return packetIn.getClass().getCanonicalName();
            }
        });
        throw new ReportedException(crashreport);
    }
}
 
Example 7
Project: BaseClient   File: C15PacketClientSettings.java   View Source Code Vote up 5 votes
public C15PacketClientSettings(String langIn, int viewIn, EntityPlayer.EnumChatVisibility chatVisibilityIn, boolean enableColorsIn, int modelPartFlagsIn)
{
    this.lang = langIn;
    this.view = viewIn;
    this.chatVisibility = chatVisibilityIn;
    this.enableColors = enableColorsIn;
    this.modelPartFlags = modelPartFlagsIn;
}
 
Example 8
Project: Zombe-Modpack   File: NetHandlerPlayServer.java   View Source Code Vote up 5 votes
public void sendPacket(final Packet<?> packetIn)
{
    if (packetIn instanceof SPacketChat)
    {
        SPacketChat spacketchat = (SPacketChat)packetIn;
        EntityPlayer.EnumChatVisibility entityplayer$enumchatvisibility = this.playerEntity.getChatVisibility();

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.HIDDEN && spacketchat.getType() != 2)
        {
            return;
        }

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.SYSTEM && !spacketchat.isSystem())
        {
            return;
        }
    }

    try
    {
        this.netManager.sendPacket(packetIn);
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Sending packet");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Packet being sent");
        crashreportcategory.setDetail("Packet class", new ICrashReportDetail<String>()
        {
            public String call() throws Exception
            {
                return packetIn.getClass().getCanonicalName();
            }
        });
        throw new ReportedException(crashreport);
    }
}
 
Example 9
Project: Backmemed   File: NetHandlerPlayServer.java   View Source Code Vote up 5 votes
public void sendPacket(final Packet<?> packetIn)
{
    if (packetIn instanceof SPacketChat)
    {
        SPacketChat spacketchat = (SPacketChat)packetIn;
        EntityPlayer.EnumChatVisibility entityplayer$enumchatvisibility = this.playerEntity.getChatVisibility();

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.HIDDEN && spacketchat.getType() != 2)
        {
            return;
        }

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.SYSTEM && !spacketchat.isSystem())
        {
            return;
        }
    }

    try
    {
        this.netManager.sendPacket(packetIn);
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Sending packet");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Packet being sent");
        crashreportcategory.setDetail("Packet class", new ICrashReportDetail<String>()
        {
            public String call() throws Exception
            {
                return packetIn.getClass().getCanonicalName();
            }
        });
        throw new ReportedException(crashreport);
    }
}
 
Example 10
Project: Backmemed   File: CPacketClientSettings.java   View Source Code Vote up 5 votes
public CPacketClientSettings(String langIn, int renderDistanceIn, EntityPlayer.EnumChatVisibility chatVisibilityIn, boolean chatColorsIn, int modelPartsIn, EnumHandSide mainHandIn)
{
    this.lang = langIn;
    this.view = renderDistanceIn;
    this.chatVisibility = chatVisibilityIn;
    this.enableColors = chatColorsIn;
    this.modelPartFlags = modelPartsIn;
    this.mainHand = mainHandIn;
}
 
Example 11
Project: Backmemed   File: CPacketClientSettings.java   View Source Code Vote up 5 votes
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.lang = buf.readStringFromBuffer(7);
    this.view = buf.readByte();
    this.chatVisibility = (EntityPlayer.EnumChatVisibility)buf.readEnumValue(EntityPlayer.EnumChatVisibility.class);
    this.enableColors = buf.readBoolean();
    this.modelPartFlags = buf.readUnsignedByte();
    this.mainHand = (EnumHandSide)buf.readEnumValue(EnumHandSide.class);
}
 
Example 12
Project: CustomWorldGen   File: NetHandlerPlayServer.java   View Source Code Vote up 5 votes
public void sendPacket(final Packet<?> packetIn)
{
    if (packetIn instanceof SPacketChat)
    {
        SPacketChat spacketchat = (SPacketChat)packetIn;
        EntityPlayer.EnumChatVisibility entityplayer$enumchatvisibility = this.playerEntity.getChatVisibility();

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.HIDDEN)
        {
            return;
        }

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.SYSTEM && !spacketchat.isSystem())
        {
            return;
        }
    }

    try
    {
        this.netManager.sendPacket(packetIn);
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Sending packet");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Packet being sent");
        crashreportcategory.setDetail("Packet class", new ICrashReportDetail<String>()
        {
            public String call() throws Exception
            {
                return packetIn.getClass().getCanonicalName();
            }
        });
        throw new ReportedException(crashreport);
    }
}
 
Example 13
Project: CustomWorldGen   File: CPacketClientSettings.java   View Source Code Vote up 5 votes
@SideOnly(Side.CLIENT)
public CPacketClientSettings(String langIn, int renderDistanceIn, EntityPlayer.EnumChatVisibility chatVisibilityIn, boolean chatColorsIn, int modelPartsIn, EnumHandSide mainHandIn)
{
    this.lang = langIn;
    this.view = renderDistanceIn;
    this.chatVisibility = chatVisibilityIn;
    this.enableColors = chatColorsIn;
    this.modelPartFlags = modelPartsIn;
    this.mainHand = mainHandIn;
}
 
Example 14
Project: CustomWorldGen   File: CPacketClientSettings.java   View Source Code Vote up 5 votes
/**
 * Reads the raw packet data from the data stream.
 */
public void readPacketData(PacketBuffer buf) throws IOException
{
    this.lang = buf.readStringFromBuffer(7);
    this.view = buf.readByte();
    this.chatVisibility = (EntityPlayer.EnumChatVisibility)buf.readEnumValue(EntityPlayer.EnumChatVisibility.class);
    this.enableColors = buf.readBoolean();
    this.modelPartFlags = buf.readUnsignedByte();
    this.mainHand = (EnumHandSide)buf.readEnumValue(EnumHandSide.class);
}
 
Example 15
Project: DecompiledMinecraft   File: C15PacketClientSettings.java   View Source Code Vote up 4 votes
public EntityPlayer.EnumChatVisibility getChatVisibility()
{
    return this.chatVisibility;
}
 
Example 16
Project: DecompiledMinecraft   File: C15PacketClientSettings.java   View Source Code Vote up 4 votes
public EntityPlayer.EnumChatVisibility getChatVisibility()
{
    return this.chatVisibility;
}
 
Example 17
Project: BaseClient   File: C15PacketClientSettings.java   View Source Code Vote up 4 votes
public EntityPlayer.EnumChatVisibility getChatVisibility()
{
    return this.chatVisibility;
}
 
Example 18
Project: BaseClient   File: C15PacketClientSettings.java   View Source Code Vote up 4 votes
public EntityPlayer.EnumChatVisibility getChatVisibility()
{
    return this.chatVisibility;
}
 
Example 19
Project: Backmemed   File: CPacketClientSettings.java   View Source Code Vote up 4 votes
public EntityPlayer.EnumChatVisibility getChatVisibility()
{
    return this.chatVisibility;
}
 
Example 20
Project: CustomWorldGen   File: CPacketClientSettings.java   View Source Code Vote up 4 votes
public EntityPlayer.EnumChatVisibility getChatVisibility()
{
    return this.chatVisibility;
}