-
[1.9] Executing a Client command when client joins a server
Thanks very much!
-
Iron doors getting treated different than vanilla
Solved, they added 2 hands in 1.9, so had to check if it was there main hand interacting.
-
Iron doors getting treated different than vanilla
Hey everyone, my server runs a bukkit plugin that lets users open iron doors and trapdoors with their fists, however, when using the forge client, it does not let them. I coded the plugin, and tried swapping to a vanilla client which worked, is there something I can do in the mean time? Is this a known bug? It looks like the event is called twice, so it opens and closes the door. If the player holds a bow in their hand, the door opens correctly. Thanks.
-
[1.9] Executing a Client command when client joins a server
Sorry for double post, i can confirm it works with EntityJoinWorldEvent, however, I would like to find out if theres a way to check the 'join' cause, e.g. Respawning, Logging in, etc. Right now im just using a boolean that gets set to false if the client logs out, and true when the entity joins.
-
[1.9] Executing a Client command when client joins a server
It doesn't seem to be working without the slash either I also tried addChatMessage, that didnt work either. I'm assuming its something wrong with the scheduled task?
-
[1.9] Executing a Client command when client joins a server
Ok, thanks very much. However, this is all that needed to change in my code, but it still doesn't send the command when I join, I think im missing something obvious, but I'm new Forge and its API so I'm not quite sure. public class Auth implements Runnable { @Override public void run() { Minecraft.getMinecraft().thePlayer.sendChatMessage("/auth"); } }
-
[1.9] Executing a Client command when client joins a server
Its a server command, is there any documentation on the Chat Message Packet, or an example around? Thanks
-
[1.9] Executing a Client command when client joins a server
Ok, So I went with the ClientConnectedToServerEvent, and even though I haven't added the command to my server yet, I was expecting an 'unknown command' message to pop up. Am I missing something? @Mod(modid = "MAH", version = "1.0") public class MAH { @EventHandler public void init(FMLInitializationEvent e){ MinecraftForge.EVENT_BUS.register(new Events()); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } @EventHandler public void preInit(FMLPreInitializationEvent event) { } public class Events { @SubscribeEvent public void onJoin(ClientConnectedToServerEvent event) { Minecraft.getMinecraft().addScheduledTask(new Auth()); } } public class Auth implements Runnable { @Override public void run() { ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/auth"); } }
-
[1.9] Executing a Client command when client joins a server
For the EntityJoinWorldEvent, couldn't I just check if the entity is instanceof EntityPlayerSP?
-
[1.9] Executing a Client command when client joins a server
Hey everyone, I'm kinda new to forge but have a fair amount of java experience, I'm in a bit of a rush so I was hoping of someone could give me some pointers as google hasnt satisfied my needs. I'm trying to get the client to run a command as soon as it joins a server, e.g. /auth 123111717 I've tried using the ClientConnectToServer (forgot its exact name, forgive me), EntityJoinWorldEvent, PlayerLoggedInEvent (i think this is for server side mods, excuse me if I'm wrong) but have had no such luck at getting a command to execute. Any pointers, or examples? Thanks
IPS spam blocked by CleanTalk.