Jump to content

omia

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by omia

  1. Fixed it. My part of the code. But the Message gets send two times sometimes.
  2. I realy have to learn more.
  3. Just kill me!
  4. Kill me or help me oe fix it! Please!
  5. Just help me!
  6. MinecraftServer.getServer().getConfigurationManager().sendToAllNear(event.player.serverPosX, event.player.serverPosY, event.player.serverPosZ, event.player.worldObj.provider.dimensionId, rar, MinecraftServer.getServer().getConfigurationManager().sendChatMsg(IChatComponent test )); Don't kill me.
  7. Why not?
  8. IChatComponent test = new ChatComponentText("test"); Packet message = MinecraftServer.getServer().getConfigurationManager().sendChatMsg(IChatComponent test ); ?
  9. I feel stupid. What Please help me! X = error String Message2 = new String("[" + event.username + "] " + event.message); MinecraftServer.getServer().getConfigurationManager().sendChatMsg(IChatComponent X Message2, true);
  10. MinecraftServer.getServer().getConfigurationManager().sendChatMsg(IChatComponent p_148539_1_, true); What is p_148539_1_ ?
  11. public void sendChatMsgImpl(IChatComponent p_148544_1_, boolean p_148544_2_) { this.mcServer.addChatMessage(p_148544_1_); this.sendPacketToAllPlayers(new S02PacketChat(p_148544_1_, p_148544_2_)); } p_148544_1_ ist the Mesage? And what is p_148544_2_ ?
  12. How does a normal chat Packet lookalike. I can not get it to work.
  13. It's to late. I have to sleep. I can not create a Packet.
  14. And how can items edit the range?
  15. Ups what do i have to fill in for these: EntityPlayer p_148543_1_, double p_148543_2_, double p_148543_4_, double p_148543_6_, double p_148543_8_, int p_148543_10_, Packet p_148543_11
  16. I tried this,because sendToAllNearExcept is nonstatic: What goes in "X"? ServerConfigurationManager send1 =new ServerConfigurationManager(X) { @Override public void sendToAllNearExcept(EntityPlayer p_148543_1_, double p_148543_2_, double p_148543_4_, double p_148543_6_, double p_148543_8_, int p_148543_10_, Packet p_148543_11_) { super.sendToAllNearExcept(p_148543_1_, p_148543_2_, p_148543_4_, p_148543_6_, p_148543_8_, p_148543_10_, p_148543_11_); } }; I only tiped this ServerConfigurationManager send1 =new ServerConfigurationManager() IDEA added the rest. And how can items modify the talking range.
  17. like you sad i do something wrong. how do i use this? that is the first thing i dont get to work while programing.
  18. found it, this one? public void sendToAllNearExcept(EntityPlayer p_148543_1_, double p_148543_2_, double p_148543_4_, double p_148543_6_, double p_148543_8_, int p_148543_10_, Packet p_148543_11_) { for (int j = 0; j < this.playerEntityList.size(); ++j) { EntityPlayerMP entityplayermp = (EntityPlayerMP)this.playerEntityList.get(j); if (entityplayermp != p_148543_1_ && entityplayermp.dimension == p_148543_10_) { double d4 = p_148543_2_ - entityplayermp.posX; double d5 = p_148543_4_ - entityplayermp.posY; double d6 = p_148543_6_ - entityplayermp.posZ; if (d4 * d4 + d5 * d5 + d6 * d6 < p_148543_8_ * p_148543_8_) { entityplayermp.playerNetServerHandler.sendPacket(p_148543_11_); } } } }{
  19. Minecraft: 1.7.10 Forge: 10.13.2.1236
  20. I understand that but i can't find sendToAllNearExcept.
  21. Don't hate me i don't program for so long. What exectly do you say?
  22. How to i send the message to the players who are close enough, and that i can edit the distance with items. For Example a megaphone which at 20 blocks more distance. I got this(only with same coordinates): import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.server.MinecraftServer; import net.minecraft.util.ChatComponentText; import net.minecraftforge.event.ServerChatEvent; import java.util.List; public class Shortchat { @SubscribeEvent public void onServerChatEvent(ServerChatEvent event) { event.setCanceled(true); EntityPlayerMP sender = event.player; List<EntityPlayerMP> players = MinecraftServer.getServer().getConfigurationManager().playerEntityList; for (EntityPlayerMP receiver : players){ if (receiver.getPlayerCoordinates().equals(sender.getPlayerCoordinates()) ){ receiver.addChatMessage(new ChatComponentText("["+event.username+"]"+event.message)); } } } }
  23. Hi forum i have a question! Is there a way to set a distance limit to the chat. For example: If Player1 is more then 64blocks away from Player2 then Player1 can not read the things that Player 2 wrote. Without effecting commands ore thing that the server says? Thanks for everybody who can help me.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.