Jump to content

"/help" command causing crash?


Zetal

Recommended Posts

Using the most recent 'Recommended' build for 1.7.10

 

Crash report:

 

---- Minecraft Crash Report ----

// This doesn't make any sense!

 

Time: 8/21/14 5:22 PM

Description: Unexpected error

 

java.lang.NullPointerException: Unexpected error

at java.util.regex.Matcher.getTextLength(Matcher.java:1283)

at java.util.regex.Matcher.reset(Matcher.java:309)

at java.util.regex.Matcher.<init>(Matcher.java:229)

at java.util.regex.Pattern.matcher(Pattern.java:1093)

at net.minecraft.util.ChatComponentTranslation.initializeFromFormat(ChatComponentTranslation.java:90)

at net.minecraft.util.ChatComponentTranslation.ensureInitialized(ChatComponentTranslation.java:67)

at net.minecraft.util.ChatComponentTranslation.iterator(ChatComponentTranslation.java:202)

at com.google.common.collect.Lists.newArrayList(Lists.java:129)

at net.minecraft.client.gui.GuiNewChat.func_146237_a(GuiNewChat.java:175)

at net.minecraft.client.gui.GuiNewChat.printChatMessageWithOptionalDeletion(GuiNewChat.java:155)

at net.minecraft.client.gui.GuiNewChat.printChatMessage(GuiNewChat.java:147)

at net.minecraft.client.network.NetHandlerPlayClient.handleChat(NetHandlerPlayClient.java:803)

at net.minecraft.network.play.server.S02PacketChat.processPacket(S02PacketChat.java:56)

at net.minecraft.network.play.server.S02PacketChat.processPacket(S02PacketChat.java:83)

at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:247)

at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:321)

at net.minecraft.client.Minecraft.runTick(Minecraft.java:1692)

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1038)

at net.minecraft.client.Minecraft.run(Minecraft.java:961)

at net.minecraft.client.main.Main.main(Main.java:164)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:483)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:483)

at GradleStart.bounce(GradleStart.java:107)

at GradleStart.startClient(GradleStart.java:100)

at GradleStart.main(GradleStart.java:65)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at java.util.regex.Matcher.getTextLength(Matcher.java:1283)

at java.util.regex.Matcher.reset(Matcher.java:309)

at java.util.regex.Matcher.<init>(Matcher.java:229)

at java.util.regex.Pattern.matcher(Pattern.java:1093)

at net.minecraft.util.ChatComponentTranslation.initializeFromFormat(ChatComponentTranslation.java:90)

at net.minecraft.util.ChatComponentTranslation.ensureInitialized(ChatComponentTranslation.java:67)

at net.minecraft.util.ChatComponentTranslation.iterator(ChatComponentTranslation.java:202)

at com.google.common.collect.Lists.newArrayList(Lists.java:129)

at net.minecraft.client.gui.GuiNewChat.func_146237_a(GuiNewChat.java:175)

at net.minecraft.client.gui.GuiNewChat.printChatMessageWithOptionalDeletion(GuiNewChat.java:155)

at net.minecraft.client.gui.GuiNewChat.printChatMessage(GuiNewChat.java:147)

at net.minecraft.client.network.NetHandlerPlayClient.handleChat(NetHandlerPlayClient.java:803)

at net.minecraft.network.play.server.S02PacketChat.processPacket(S02PacketChat.java:56)

at net.minecraft.network.play.server.S02PacketChat.processPacket(S02PacketChat.java:83)

at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:247)

at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:321)

 

 

Haven't touched the core classes, so I'm a little dumbfounded as to why it would be crashing on a vanilla command. I'm assuming I've done something stupid with incorrectly registering my own, custom commands, but I'd appreciate some guidance here. It's a minor bug, but it is also one that crashes the game so... I'd like to get it worked out.

Have a modding question? PM me and hopefully I'll be able to help. Good at 2d Pixel Art? We need your help!  http://www.minecraftforum.net/topic/1806355-looking-for-2d-pixel-artist/

Link to comment
Share on other sites

I've done something stupid with incorrectly registering my own, custom commands, ...

 

Correct. Now, unless we see what you have done, there is not much we can do to correct the problem.

Link to comment
Share on other sites

Hrm. I'll try.

 

 

 

ServerCommandManager scm = (ServerCommandManager) event.getServer().getCommandManager();

scm.registerCommand(new CommandCheckInventory());

scm.registerCommand(new CommandCheckChests());

scm.registerCommand(new CommandCreateShape());

scm.registerCommand(new CommandACS());

scm.registerCommand(new CommandEconomy());

scm.registerCommand(new CommandSpecializations());

scm.registerCommand(new CommandCustomChat());

 

 

And all of the commands are empty copies of this:

 

public class CommandSpecializations extends CommandBase

{

    public String getCommandName()

    {

        return "scm";

    }

   

    public void processCommand(ICommandSender par1ICommandSender, String[] par2ArrayOfStr)

    {

    }

   

    @Override

public boolean canCommandSenderUseCommand(ICommandSender icommandsender)

    {

    return true;

    }

   

    @Override

    public int getRequiredPermissionLevel()

    {

        return 0;

    }

 

@Override

public String getCommandUsage(ICommandSender icommandsender) {

// TODO Auto-generated method stub

return null;

}

}

 

 

 

Except replace 'scm' with each commands unique tag, including (in order): "checkinv", "checkchests", "createshape", "acs", "econ", "scm", "ccs"

 

All of the actual command logic is handled in a CommandEvent handler class, where I check to see which command it is by using "event.command instanceof CommandSpecializations" as an example. Obviously all of the others are the same but... that's about all that the commands do. Besides "/help" all of the commands I have work.

Have a modding question? PM me and hopefully I'll be able to help. Good at 2d Pixel Art? We need your help!  http://www.minecraftforum.net/topic/1806355-looking-for-2d-pixel-artist/

Link to comment
Share on other sites

Scratch that, just looked at the new method required by commands. I'm willing to bet the '/help' command uses "public String getCommandUsage(ICommandSender icommandsender)" to populate its list- and since mine returns null, it causes an error.

 

Just ran it and tried the command- it works fine now. Issue resolved. :)

Have a modding question? PM me and hopefully I'll be able to help. Good at 2d Pixel Art? We need your help!  http://www.minecraftforum.net/topic/1806355-looking-for-2d-pixel-artist/

Link to comment
Share on other sites

Scratch that, just looked at the new method required by commands. I'm willing to bet the '/help' command uses "public String getCommandUsage(ICommandSender icommandsender)" to populate its list- and since mine returns null, it causes an error.

 

Just ran it and tried the command- it works fine now. Issue resolved. :)

That was what I expected, since help would trigger a usage event and it would not like to see null. Glad you figured it out.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • as in the method to look in the logs and figure out what is wrong
    • Muyern Trust Hacker stands as a beacon of trust and reliability in the ever-expanding realm of digital asset recovery. In a world where online scams and cybercrime proliferate, finding a trustworthy ally like Muyern Trust Hacker can be a game-changer for those who have fallen victim to fraudulent schemes. My journey with Muyern Trust Hacker began after a devastating loss to a fake investment firm. Amidst the despair and frustration, Muyern Trust Hacker emerged as a guiding light, offering hope and tangible solutions to reclaim what was rightfully mine. What truly sets Muyern Trust Hacker apart is its unwavering commitment to its clients. Unlike other recovery firms that may prioritize profit over people, Muyern Trust Hacker operates with integrity and transparency at every turn. From the initial consultation to the successful recovery of funds, their dedication to providing top-notch service is evident in every interaction. Muyern Trust Hacker's expertise is nothing short of exceptional. With a deep understanding of cybersecurity protocols and digital forensics, they possess the technical acumen to navigate even the most complex cases. Whether recovering stolen cryptocurrencies, tracing fraudulent transactions, or combating identity theft, Muyern Trust Hacker approaches each challenge with precision and skill. What truly impressed me about Muyern Trust Hacker was their commitment to delivering results promptly. In an industry where time is of the essence, their swift action and efficient approach ensure that clients can reclaim their assets with minimal delay. This alleviates the financial strain caused by the loss and provides much-needed peace of mind. Furthermore, the level of personalized attention and support provided by Muyern Trust Hacker is unparalleled. Unlike larger firms where clients may feel like just another case number, Muyern Trust Hacker fosters a genuine connection with each individual. From regular updates on the progress of the recovery process to tailored strategies based on the specific circumstances, clients can rest assured knowing that their case is receiving the attention it deserves. In addition to their impressive track record of success, Muyern Trust Hacker's commitment to ongoing support is commendable. Even after the recovery process is complete, they continue to offer guidance and advice to ensure that clients are equipped with the knowledge and tools necessary to safeguard their assets in the future. In conclusion, Muyern Trust Hacker is more than just a recovery firm – they are a trusted partner in the fight against online scams and fraud. With their unwavering dedication to their clients, unmatched technical expertise, and proven track record of success, Muyern Trust Hacker stands as a beacon of hope for those seeking justice in the digital world. Tele gram at: muyerntrusthackertech
    • I'm having the same problem as this other post and it seems whoever answered it deleted their account or something, so I cannot see the answer. I followed the same steps they said in their post. Can someone pls help. Other Post:   
    • idk why https://pastebin.com/uiaAQXRS
    • now it just says this -> https://pastebin.com/eAEFjLkJ
  • Topics

×
×
  • Create New...

Important Information

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