The Meaning of Life, the Universe, and Everything.
Join Date:
2/11/2017
Posts:
662
Member Details
I executed this command:
/execute ae42a5d0-0aa2-34ce-97d6-7b6ee3e07e5a ~ ~ ~ /tellraw @p ["", {"text":"hello. your score is ","bold":true,"italic":true,"strikethrough":false,"underlined":true,"obfuscated":false,"color":"gray","clickEvent":{"action":"run_command","value":"/say this works"}}, {"score":{"name":"ydStudent","objective":"score"},"bold":true,"italic":true,"strikethrough":false,"underlined":true,"obfuscated":false,"color":"gray","hoverEvent":{"action":"show_text","value":"get more score."}}]
When running this as the player, I get a null pointer exception with a description of null. Stacktrace:
java.lang.NullPointerException: null
at net.minecraft.command.EntitySelector.getWorlds(EntitySelector.java:233) ~[EntitySelector.class:?]
at net.minecraft.command.EntitySelector.matchEntities(EntitySelector.java:154) ~[EntitySelector.class:?]
at net.minecraft.command.EntitySelector.matchOneEntity(EntitySelector.java:108) ~[EntitySelector.class:?]
at net.minecraft.command.EntitySelector.matchOnePlayer(EntitySelector.java:93) ~[EntitySelector.class:?]
at net.minecraft.command.CommandBase.getPlayer(CommandBase.java:271) ~[CommandBase.class:?]
at net.minecraft.command.server.CommandMessageRaw.execute(CommandMessageRaw.java:54) ~[CommandMessageRaw.class:?]
at net.minecraft.command.CommandHandler.tryExecute(CommandHandler.java:126) [CommandHandler.class:?]
at net.minecraft.command.CommandHandler.executeCommand(CommandHandler.java:98) [CommandHandler.class:?]
at net.minecraft.command.CommandExecuteAt.execute(CommandExecuteAt.java:93) [CommandExecuteAt.class:?]
at net.minecraft.command.CommandHandler.tryExecute(CommandHandler.java:126) [CommandHandler.class:?]
at net.minecraft.command.CommandHandler.executeCommand(CommandHandler.java:98) [CommandHandler.class:?]
at mymod.CommandHelper.executeCommandAsEntity(CommandHelper.java:32) [CommandHelper.class:?]
at mymod.CommandHelper.tellRaw(CommandHelper.java:276) [CommandHelper.class:?]
at mymod.items.MyItem2.onItemRightClick(MyItem2.java:74) [MyItem2.class:?]
at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:234) [ItemStack.class:?]
at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClick(PlayerControllerMP.java:542) [PlayerControllerMP.class:?]
at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1692) [Minecraft.class:?]
at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2361) [Minecraft.class:?]
at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2127) [Minecraft.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1915) [Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1171) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:436) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_141]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_141]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_141]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_141]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_141]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_141]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_141]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_141]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
inside of EntitySelector.java in the function getWorlds which is this:
/**
* Returns the worlds to match the entities in for the specified command sender and token. This returns the sender's
* world if the selector specifies a location or all currently loaded worlds on the server if not.
*/
private static List<World> getWorlds(ICommandSender sender, Map<String, String> argumentMap)
{
List<World> list = Lists.<World>newArrayList();
if (hasArgument(argumentMap))
{
list.add(sender.getEntityWorld());
}
else
{
Collections.addAll(list, sender.getServer().worlds);
}
return list;
}
This command works perfectly when I place it into a command block.
I have tried changing the selector to @s, with the same result. The order that the json is generated doesn't seem to matter. Switching my code to only run on the server didn't change anything.
Can you help me?
Rollback Post to RevisionRollBack
Remember those versions that minecraft pranked us with? Specifically:
Minecraft 2.0
Minecraft 1.VR-Pre1
Snapshot 15w14a
Minecraft 3D
Those are still downloadable! Watch this video for 2.0:
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
I executed this command:
/execute ae42a5d0-0aa2-34ce-97d6-7b6ee3e07e5a ~ ~ ~ /tellraw @p ["", {"text":"hello. your score is ","bold":true,"italic":true,"strikethrough":false,"underlined":true,"obfuscated":false,"color":"gray","clickEvent":{"action":"run_command","value":"/say this works"}}, {"score":{"name":"ydStudent","objective":"score"},"bold":true,"italic":true,"strikethrough":false,"underlined":true,"obfuscated":false,"color":"gray","hoverEvent":{"action":"show_text","value":"get more score."}}]
(computer generated)
using this code:
(this is the same way command blocks do it)
When running this as the player, I get a null pointer exception with a description of null. Stacktrace:
The line of code where it came is this:
inside of EntitySelector.java in the function getWorlds which is this:
This command works perfectly when I place it into a command block.
I have tried changing the selector to @s, with the same result. The order that the json is generated doesn't seem to matter. Switching my code to only run on the server didn't change anything.
Can you help me?
Remember those versions that minecraft pranked us with? Specifically:
Those are still downloadable! Watch this video for 2.0:
https://www.youtube.com/watch?v=PQdu9LKAdIU
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
15w14a is on this link:
http://minecraft.gamepedia.com/15w14a
1.RV-Pre1 is here:
http://minecraft.gamepedia.com/1.RV-Pre1
Minecraft 3D is here:
https://minecraft.gamepedia.com/Java_Edition_3D_Shareware_v1.34
bump
Remember those versions that minecraft pranked us with? Specifically:
Those are still downloadable! Watch this video for 2.0:
https://www.youtube.com/watch?v=PQdu9LKAdIU
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
15w14a is on this link:
http://minecraft.gamepedia.com/15w14a
1.RV-Pre1 is here:
http://minecraft.gamepedia.com/1.RV-Pre1
Minecraft 3D is here:
https://minecraft.gamepedia.com/Java_Edition_3D_Shareware_v1.34