Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

SonMooSans

Members
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

0 Neutral

About SonMooSans

  • Rank
    Tree Puncher
  1. Okay thx, It seems worked! And that error also been fixed
  2. 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.
  3. 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.writeStr
  4. 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?
  5. 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?
  6. Maybe there's an event that fires when banned player failed to connect the server?
  7. I need an event that fires when a banned player try to rejoin
  8. 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.
  9. Is there have a event that fires even that player is banned? (Server-side)
  10. 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"
  11. 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?
  12. 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?
  13. package minecrafttest.commands; import com.mojang.brigadier.Command; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.IntegerArgumentType; import com.mojang.brigadier.arguments.StringArgumentType; import com.mojang.brigadier.builder.LiteralArgumentBuilder; import com.mojang.brigadier.context.CommandContext; import com.mojang.brigadier.exceptions.CommandSyntaxException; import net.minecraft.command.CommandSource; import net.minecraft.command.Commands; import net.minecraft.command.FunctionObject; import net.minecraft.command.arguments.MessageArgument; import
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.