Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

omia

Members
  • 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. IChatComponent test = new ChatComponentText("test"); Packet message = MinecraftServer.getServer().getConfigurationManager().sendChatMsg(IChatComponent test ); ?
  8. 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);
  9. MinecraftServer.getServer().getConfigurationManager().sendChatMsg(IChatComponent p_148539_1_, true); What is p_148539_1_ ?
  10. 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_ ?
  11. How does a normal chat Packet lookalike. I can not get it to work.
  12. It's to late. I have to sleep. I can not create a Packet.
  13. And how can items edit the range?
  14. 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
  15. 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.
  16. like you sad i do something wrong. how do i use this? that is the first thing i dont get to work while programing.
  17. 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_); } } } }{
  18. Minecraft: 1.7.10 Forge: 10.13.2.1236
  19. I understand that but i can't find sendToAllNearExcept.
  20. Don't hate me i don't program for so long. What exectly do you say?
  21. 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)); } } } }
  22. 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.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.