minecraft

Minecraft (bukkit) plugins, send user a clickable link

蹲街弑〆低调 提交于 2019-12-12 01:39:06
问题 Im developing a bukkit plugin and I need to send a URL to the user, I need to have the link clickable by the user so it can be opened in the users's browser. I tried using HTML and other types of tags but nothing worked. I also searched Bukkit Java library and did not find anything other than colouring the text output. 回答1: To send a clickable link to a client you need to send a raw json message to him, there are different methods to do this: Using the /tellraw command Using Server

OpenGL Drawing quads in minecraft display weirdly

时光毁灭记忆、已成空白 提交于 2019-12-12 00:46:56
问题 Im trying to draw some quads in minecraft but this is the problem im having: http://imgur.com/DgnAqv1 but it should draw triangles on each sides so there should be 4 triangles in total, I dont know why this isnt working. GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glDepthMask(false); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glColor4f(0F, 0.5F, 0.8F, 1F); GL11.glBegin(GL11.GL_QUADS);

Start/Stop Minecraft Server with PHP

浪尽此生 提交于 2019-12-11 22:37:26
问题 For the last 10 hours I have been trying to find a way to start/stop a craftbukkit.jar file that is in the same directory as my php script. I have tried nearly all of the solutions I could find on stackoverflow and none of them worked. I tried both shell_exec("java -Xms1024M -Xmx1024M -jar craftbukkit.jar -o true"); and exec("java -Xms1024M -Xmx1024M -jar craftbukkit.jar -o true"); I also tried putting the java -Xms1024M -Xmx1024M -jar craftbukkit.jar -o true in a external start.sh file and

Returning an extended class

亡梦爱人 提交于 2019-12-11 19:13:05
问题 I'm not sure if this will really make any sense (I've kinda confused my self ) but what I am trying to do is create a mini-game plugin and I'm trying to make it cycle between maps, I create a new class that extends BaseGame I pass in plugin instance, world name and xml file name to the super class BaseGame, The basegame class then parses the information from xml file and setup variables. I have some methods in side the class extending BaseGame because most maps have different game types so I

Launch minecraft 1.6.4 from command line with C#

喜夏-厌秋 提交于 2019-12-11 13:53:12
问题 I'm currently working on a custom Minecraft 1.6.4 launcher. I have written most of the code is C# however I'm writing the final piece of code in batch. This seems to work to launch the minecraft 1.5.2 jar cd "%~1" java -Xms512m -Xmx1g -Djava.library.path=Bin\bin\native\ -cp Bin\bin\* net.minecraft.client.Minecraft %~2 %~3 pause (C# Works out the session ID (%~3)) However in minecraft 1.6.4 I get an error: Error: Could not find or load main class net.minecraft.client.Minecraft I have heard

Java - Removal of META-INF from jar not working

放肆的年华 提交于 2019-12-11 10:33:35
问题 I'm currently working on a application that installs mods into Minecraft and I have almost finished version 3.1DEV, the only thing that is stoping me is that my code just won't remove the META-INF, here is my code ZipInputStream modZip = new ZipInputStream(new FileInputStream(mod.getDir())); ZipInputStream minecraftZip = new ZipInputStream(new FileInputStream(new File(mcDir + "\\bin\\", "minecraft.jar"))); ZipOutputStream tmpZip = new ZipOutputStream(new FileOutputStream(new File("temp\\tmp

I want to kill a player if he went higher then 24 blocks

徘徊边缘 提交于 2019-12-11 05:45:38
问题 I want to make a Spigot Plugin that kills a Player if he is over 24 Blocks. I already made a code but it doesn't work Here is the full code, I don't need to register a new class because I wrote the event in the main class import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.plugin.java.JavaPlugin; public class MainFFA extends JavaPlugin implements Listener{ @Override public

Failed to apply plugin [id 'forge']

我只是一个虾纸丫 提交于 2019-12-11 04:18:36
问题 This is a continuation of this question My initial issue has been solved, but a new one came after. Following the tutorial mentioned in it, having solved a few errors, I now get an error when I try to run .\gradlew tasks: FAILURE: Build failed with an exception. * Where: Build file 'C:\Users\benji\MinecraftWorkspace\forge-1.7.10-10.13.4.1614-1.7.10-src\build.gradle' line: 18 * What went wrong: A problem occurred evaluating root project 'forge-1.7.10-10.13.4.1614-1.7.10-src'. > Failed to apply

Minecraft Bukkit Events

倖福魔咒の 提交于 2019-12-11 02:14:15
问题 I'm trying to get into bukkit programming for minecraft, but for some reason I'm stuck with events. Here's my code: Main class file: package com.plugin1; import java.util.logging.Logger; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.event.Listener; import org.bukkit.plugin.PluginDescriptionFile; //import org.bukkit.plugin.PluginManager; import org.bukkit

Merging two Config.yml Files in Java?

ε祈祈猫儿з 提交于 2019-12-11 01:52:45
问题 While programming my bukkit plugin, i realized that i needed to have my own config file so i can add comments into the file. I also needed to be able to update the config (if it has been created and is old). I had also recently finished a simple jQuery plugin, where I used jQuery.extend and i merged two settings arrays. I wanted to know if this was possible in java with config files. My Question: Is there a way i can merge the new default config with the one the user already has? (Removing