minecraft

How to i make a .bat that targets a program and types in a text box

本秂侑毒 提交于 2019-12-02 11:52:17
I have no idea where to start on this one. I have seen answers that are like this but I don't know how to format them for what I want. I just need to target the minecraft server while its open and close it by typing "stop" in the console. I have no code to show for but this will be in a other file so I can launch it and then have it close the program. btw I don't think I can use taskkill But anything will help ;) thankyou very much! This is not possible using a batch file alone. There are two main ways to get input to another program in the system (in this case, java.exe): Get your program to

What does this block of code do?

人盡茶涼 提交于 2019-12-02 07:27:16
问题 I'm not quite sure what this means or whats it doing, Could some one elaborate? Player player = (Player) sender; 回答1: It takes the object referenced by sender, and attempts to cast it into the type Player. Java objects are strongly typed, which means you have to declare the type of the object. If the object referenced by sender cannot be cast to a Player object, than an exception will be thrown for an InvalidCast. 回答2: That's a plain old java type cast. See the JLS Casting conversion for the

Python NameError from contents of a variable

百般思念 提交于 2019-12-02 07:25:59
I've been making a mod for the Raspberry Pi version of Minecraft and I'm getting a very frustrating error every time I enter one of the commands in my program. Here's my code: import minecraft.minecraft as minecraft import minecraft.block as block import time mc = minecraft.Minecraft.create(); print('newBlock - Change ID of block to spawn') print('blockType - Change subID of block to spawn') print('pos1') print('pos2') print('fill - fill specified area') print('clear - clear specified area') print while True: comm=str(input('Command: ')) if comm=="newBlock": blockId = int(input('Enter Block ID

How do I reference instances using an instance?

非 Y 不嫁゛ 提交于 2019-12-02 04:50:12
I'm trying to minimize how much I create an instance, as I am not particularly skilled in Java. Currently I have a set of instances of other classes in my Main, a quick example... public final class ClassName extends JavaPlugin { AntiSwear antiSwear = new AntiSwear(); Spam spam = new Spam(); @Override public void onEnable() { // Plugin startup logic } @Override public void onDisable() { // Plugin shutdown logic } } And instead of making more and more instances, I just want to make an instance of the main class, ClassName className = new ClassName(); and run something like className.spam...

Java & Eclipse: Resources in JAR?

女生的网名这么多〃 提交于 2019-12-02 02:53:45
问题 How can I add resources (images) directly into my JAR file? For example, if you open the minecraft.jar (of Minecraft) you can see a few classes and folders with resources. If I try to put any resources in my /src folder, Eclipse will show them in the Package Explorer which is annoying. When I decompile Minecraft (Minecraft Coder Pack) there are no resources in the /src folder. How can I add my resources like Minecraft does? Thanks in advance!! 回答1: You can just create a new folder and mark it

Scanner nextLine() NoSuchElementException

断了今生、忘了曾经 提交于 2019-12-02 02:31:41
I've been programming a Bukkit plugin for a while now, and this one issue has me stumped. I'm trying to read a line from a file using a Scanner, and add everything on the line before ": " to a HashSet. Every time I try, I get a NoSuchElementException, looking like this: 21:01:01 [SEVERE] Could not pass event PlayerLoginEvent to ServerProtect org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:341) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav a:62) at org.bukkit.plugin.SimplePluginManager.fireEvent

Launch Minecraft from the command line Python/C++

a 夏天 提交于 2019-12-02 02:20:19
I have an issue where I am trying to use my previous knowledge of programming to write a Minecraft launcher. I have use of commands that are in the standard C++ libraries and any Python eggs that are not huge. I would prefer to use system("java ...") in order to launch Minecraft. The question in short: How do I launch Minecraft from the command line without any auxillary Java code? (Without using launcher code like net.minecraft.LauncherFrame ) Is it possible? I tried java -cp mine craft.jar net.minecraft.client.Minecraft from the Terminal in Mac OS X, to no avail, ending with a

Scanner nextLine() NoSuchElementException

橙三吉。 提交于 2019-12-02 02:13:45
问题 I've been programming a Bukkit plugin for a while now, and this one issue has me stumped. I'm trying to read a line from a file using a Scanner, and add everything on the line before ": " to a HashSet. Every time I try, I get a NoSuchElementException, looking like this: 21:01:01 [SEVERE] Could not pass event PlayerLoginEvent to ServerProtect org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:341) at org.bukkit.plugin.RegisteredListener

This java instance does not support a 64-bit JVM

不羁的心 提交于 2019-12-02 01:39:27
问题 I home host a Minecraft server and I just updated Java to update 65, the server worked perfectly before updating but now, it says "This Java instance does not support a 64-bit JVM. Please install the desired version." Installing 32-bit Java doesn't help and this also happens when I run my Minecraft client. I have 64-bit Windows 7 running 64-bit Java 7. If anybody can help that would be great. EDIT: Fixed it, apparently I'm just an idiot and had 32-bit installed when I updated java, and since

This java instance does not support a 64-bit JVM

ⅰ亾dé卋堺 提交于 2019-12-02 00:36:36
I home host a Minecraft server and I just updated Java to update 65, the server worked perfectly before updating but now, it says "This Java instance does not support a 64-bit JVM. Please install the desired version." Installing 32-bit Java doesn't help and this also happens when I run my Minecraft client. I have 64-bit Windows 7 running 64-bit Java 7. If anybody can help that would be great. EDIT: Fixed it, apparently I'm just an idiot and had 32-bit installed when I updated java, and since I thought I had 64-bit installed I never thought to re-install it. Sorry for wasting your time As the