Posted February 4, 20169 yr Hello, I've run into an issue that I can't seem to solve. Objective: Create a block that checks if players are in creative mode. If so, set to adventure mode and give them a message related to them not being allowed in creative mode. Progress: Block sets players to adventure mode almost immediately after they switch to creative, which is desirable. Issue: The message is not being sent 100% of the time. Whether or not it is actually sent seems to be completely random. Source: GitHub The update function changes the player's gamemode consistently. If I add a debug log outside of the isRemote statement, sometimes it appears in console once and sometimes twice. I believe the issue is the function, while always getting called server side, it's not always getting called client side. I am unsure of how to fix this. Any help would be greatly appreciated. I will be happy to provide any more information if needed. Thank you for your time, Ratismal Did I help you? Don't be afraid to give that 'thank you' button a good smack for me! It's been looking at me weirdly for a while now.
February 4, 20169 yr Author You must only run the code on the server. Currently you run it (mostly) only on the client. Thanks! I forgot that player.addChatMessage(...) worked server-side. Just out of curiosity, is there a reason why the update() function isn't consistently called client-side? Did I help you? Don't be afraid to give that 'thank you' button a good smack for me! It's been looking at me weirdly for a while now.
February 4, 20169 yr Author Hmm. It should, but it wasn't. I'm not sure what would cause that. In any case, I'm just happy that it's working. I'll stop poking it lest it also stops Did I help you? Don't be afraid to give that 'thank you' button a good smack for me! It's been looking at me weirdly for a while now.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.