Jump to content

SonMooSans

Members
  • Posts

    17
  • Joined

  • Last visited

SonMooSans's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  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. 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?
  13. 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?
×
×
  • Create New...

Important Information

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