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.

SonMooSans

Members
  • Joined

  • Last visited

  1. I need a multiple line text editor for my mod but TextField only supports one line input After I did some research, I found a example but it doesn't support 1.17 I had check SignEditScreen, I think it's petty hard for myself to remake it and I don't want to spend too much time on a gui It will be much better if there's already a class or library , so is there a class or lib that can do this?
  2. Okay thx, It seems worked! And that error also been fixed
  3. ModTestChannel.registerMessage(RunCommandRequest_ID, RunCommandRequest.class, RunCommandRequest::encode, RunCommandRequest::decode, MessageHandlerServer::GetRunCommandRequest, Optional.of(PLAY_TO_SERVER)); i sure i have register it, anyway I will try the one that takes an int as its argument.
  4. hmm a new problem when I try to debug it It throws error when buf.readString() package xxx; import net.minecraft.network.PacketBuffer; public class RunCommandRequest { public RunCommandRequest(String i_Command) { Command = i_Command; } public String GetCommand() { return Command; } private RunCommandRequest() { } public static RunCommandRequest decode(PacketBuffer buf) { RunCommandRequest retval = new RunCommandRequest(); retval.Command = buf.readString(); //error return retval; } public void encode(PacketBuffer buf) { buf.writeString(Command); } private String Command; }
  5. I want to execute Player from the server to run the /give command by sending a packet , I try to let player send a packet to the server then the server runs XXX.handleCommand(AdminLevelSource(Player), RunCommandPacket.getCommand()); But it will close the player's connection and throw an error What is the solution?
  6. I have a class: package testmod.packet; import ... public class PacketRequest { public String Method; public HashMap<String, Object> Input; } and I want to send it to client, is there any way to do it?
  7. Maybe there's an event that fires when banned player failed to connect the server?
  8. I need an event that fires when a banned player try to rejoin
  9. Ok thx, but It doesn't fire if banned player try to join back [14:49:27] [Server thread/INFO] [minecraft/ServerLoginNetHandler]: Disconnecting com.mojang.authlib.GameProfile@5d54406a[id=9a69ed4d-3c07-339c-9954-13b204826372,name=Dev,properties={},legacy=false] (/Server IP) : You are banned from this server.
  10. Is there have a event that fires even that player is banned? (Server-side)
  11. Bec I want to add a command to list all the players' position so ops don't have to check them one by one something like: "Bob X:1 Y:20 Z:20" "Stave X:2 Y:1 Z:10"
  12. SonMooSans changed their profile photo
  13. I want to make a mod that will track the player's position per 5s, then ops can get a list of players and TP to their position by using a command. but after I finished it and start debugging. Here's a big problem of delay, I tested it on a small server that only have myself it takes at least 2s to run. What if it runs on a large server?
  14. I think I found the problem, it works after I removed this: .requires((commandSource) -> commandSource.hasPermissionLevel(4)) How can I let the command blocks run it when Require Permission Level is 4?

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.