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

    • While living in Copenhagen, I became deeply involved in a vibrant local crypto community. The energy was palpable; people were passionate about the potential of blockchain technology and the myriad of opportunities it offered. I was initially skeptical but soon found myself captivated by the discussions surrounding various cryptocurrencies. After much deliberation, I decided to invest 4,000 DKK in Dogecoin, motivated by both the community's enthusiasm and the coin’s unique charm as a meme-driven currency. To my astonishment, my investment blossomed into a staggering 100,000 DKK within a few months. The thrill of watching my investment grow was exhilarating, and I felt a sense of belonging and achievement among my peers. However, as the community grew, so did the differences in opinion about the direction of our projects and investments. I found myself caught in a heated disagreement with a prominent member regarding strategic decisions, which escalated tensions within the group. Things took a turn for the worse when, following this disagreement, I was locked out of my email account. This was more than just a mere inconvenience; it felt like a nightmare unfolding. My email was the gateway to my crypto assets and exchanges, and without access, I was paralyzed. I frantically attempted to regain control but found myself hitting dead ends. The thought of losing my investment sent waves of anxiety through me. Desperate for a solution, I reached out to friends in the community, hoping they could offer guidance. To my relief, several members were sympathetic to my plight and shared their experiences of similar challenges. One name kept surfacing: ADRIAN LAMO HACKER. I Consult ADRIAN LAMO HACKER Via email: Adrianlamo@ consultant. com / Telegram: @ADRIANLAMOHACKERTECH they also have an active Whats App: ‪+1 (90 9) 73 9‑0 2 69‬ It was touted as a reliable service for recovering compromised accounts, and I was eager to give it a try. With their swift assistance, I provided the necessary information, and the team quickly went to work. They were professional and responsive, keeping me updated throughout the process. Within a short period, I received the long-awaited notification that my email account had been restored. A wave of relief washed over me; I could finally access my assets and continue participating in the community. Regaining control not only allowed me to protect my investment but also reinforced the importance of security in the crypto space. It served as a valuable lesson about the risks and challenges inherent in this rapidly evolving world. With newfound confidence, I re-engaged with the community, more vigilant than ever about safeguarding my digital assets.
    • As the title says, I'm trying to install Forge on Linux. Whenever I load up the installer, and let it run, I end up getting an error that says: "Processor failed, invalid outputs:" Then, it shows the .jar file I used for the installer, and some codes that don't make any sense to my pea-sized brain. All I can tell however, is that they're different and they aren't supposed to be. (Mostly because it tells me.) I don't know how to fix this, and I've encountered this for every file I've tried so far.
    • Descargo un mod y luego, en archivo jar, lo mando a la carpeta "mods" en minecraft, pero al entrar a minecraft forge no me aparecen los mods por ningun lado, si pongo un mod incompatible me sale un error pero no me aparecen los demas mods, ¿Que puedo hacer?  
    • Descargo un mod y luego, en archivo jar, lo mando a la carpeta "mods" en minecraft, pero al entrar a minecraft forge no me aparecen los mods por ningun lado, si pongo un mod incompatible me sale un error pero no me aparecen los demas mods, ¿Que puedo hacer?  
  • Topics

×
×
  • Create New...

Important Information

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