minecraft

Run and Receive a Command in screen via PHP

可紊 提交于 2019-12-10 23:39:32
问题 I'm making a Minecraft control panel, but are sort of confused on how to send a command to each screen. I understand how to execute a command to a screen, but I don't understand to read the output. Ex. I have screen A and screen B. I want to execute something in screen A, and get the output, and then exit the screen. 回答1: Here's an easier solution: Use Websend bukkit plugin (Download&info) in both servers. PHP can simply execute commands and receive outputs when plugin is installed and php

Sending command to java -jar using stdin via /proc/{pid}/fd/0

╄→гoц情女王★ 提交于 2019-12-10 17:40:03
问题 I'm trying to send a command to a minecraft server jar using /proc/{pid}/fd/0 but the server does not execute the command. To replicate what I'm trying to do you can do this on a Debian based machine (possibly other Linux distributuions aswell). What I use to test this: Ubuntu 14.04 minecraft_server.jar (testing with 1.8) OpenJDK Runtime Environment (installed with default-jre-headless) First console: $ java -jar minecraft_server.jar nogui Response: [ ... server starts and waiting for input]

Show date in 'System.out.println()' statement automatically

[亡魂溺海] 提交于 2019-12-10 16:54:57
问题 I know that it is possible that every line you print can be tagged with date (and also saved as a log file). For example in Minecraft: [16:21:43 INFO]: Minecraft Launcher 1.3.9 (through bootstrap 5) started on windows... How do I do that? Maybee with Logger? Or are external librarys required? 回答1: It's possible to show dates prefixed in your String by calling System.out.println Create your custom PrintStream class Override println method to prefix the String with the date Set System.setOut

Unknown Source in Stacktrace Java Eclipse

▼魔方 西西 提交于 2019-12-10 13:58:04
问题 I have the very annoying problem, that when exporting a jar-file out of my source code in eclipse I will get no information in the stacktrace about the source and line number in which the error occurs. I have checked the compiler settings in ecplise for the project and all options in the section classfile generation are set. I'm developing plugins for Minecraft which are executed by the server software bukkit. My source is in the package de.celestialcraft.agentestate. On occurance of an

Need auto-restart script in batch for minecraft server

◇◆丶佛笑我妖孽 提交于 2019-12-09 13:41:56
问题 I am currently an administrator on a private Minecraft server, though in this case the technical question lies outside the scope of typical minecraft supoort. I wish to have the batch file that launches the server restart at 12 am and 12 pm, though I have little experience in batch and a cursory google search brings up nothing helpful. The issue I run into is both that I have no idea if batch CAN execute commands within a java server console, send the commands to save the server and then exit

Large mutable byte array in Erlang

 ̄綄美尐妖づ 提交于 2019-12-09 09:42:08
问题 As I am writing a simple Minecraft server application in Erlang, I am now concerned with the question of how to efficiently store and modify chunk data. For those who don't know about Minecraft's internals: I need to store a lot of binaries (100-1000) of up to 32kB size in memory. Until this point Erlang's builtin binaries are sufficient. But the server has to read and change some bytes (by their id) in these binaries quite often and I don't want to copy them around all the time. A nice to

java.lang.IllegalArgumentException: Plugin already initialized. What's going on?

点点圈 提交于 2019-12-08 15:29:42
问题 When I'm testing my new plugin an exception keeps getting thrown: java.lang.IllegalArgumentException: Plugin already initialized! Please help! Here's the code: package me.plugin.example; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.event.Listener; import org.bukkit.ChatColor; import org.bukkit.GameMode; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.player

Mojang API - Retrieve latest UUID of username

跟風遠走 提交于 2019-12-08 09:18:23
问题 I am currently trying to make an API call using cURL with PHP to retrieve the UUID of the latest user that has used a username. Using the Mojang API: Username -> UUID at time When making an API call for example: the user ' Chocolates ' (Which has been used by four users according to NameMC) I get the UUID of the first ever user using that name. Code: public function api_Changedto($uuid, $username) { $ch = curl_init(); //Set other default cUrl settings curl_setopt( $ch, CURLOPT_FOLLOWLOCATION,

Python Recursive Data Reading

拟墨画扇 提交于 2019-12-07 04:06:29
问题 The following will make more sense if you have ever played minecraft. Since many of you have not, I will try to explain it as best as I can I am trying to write a recursive function that can find the steps to craft any minecraft item from a flatfile of minecraft recipes. This one has me really stumped. The flatfile is kinda long so I included it in this gist. def getRecipeChain(item, quantity=1): #magic recursive stuffs go here So basically I need to look up the first recipe then look up the

Sending Login Packet to Minecraft Server in Python Not Working

半腔热情 提交于 2019-12-06 09:23:16
问题 I have the following script in Python. What it does is tries to connect to a MineCraft server, first by sending a 'handshake', then sending a login request. The protocol specs can be found here: http://wiki.vg/Protocol Anyway, the python script works fine, and there are no errors. However, I'm fairly use I encoded the second packet wrong, as when it is sent, nothing appears on the server console. The player isn't connected or anything. It just eventually times out and closes the connection