Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

hello world in bukkit

package me.HelloWorld;
 
import java.util.logging.Logger;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;
 
public class HelloWorld extends JavaPlugin
{
    Logger log = Logger.getLogger("Minecraft");
 
    public void onEnable()
    {
        log.info("Your plugin has been enabled!");
    }
 
    public void onDisable()
    {
        log.info("Your plugin has been disabled.");
    }
 
    public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args)
    {
        if (cmd.getName().equalsIgnoreCase("hello"))
        {
            sender.sendMessage("Hello World!");
            return true;
        }
        return false;
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: how to get single value from input string in java 
Java :: how to print message to console java 
Java :: Bypass java web security permit All 
Java :: java blocks 
Java :: how to apply validation on aiphanumeric series starting with 4 characters with 4 letters in java 
Java :: javafx how to put multiple handlers in the same line 
Java :: action media scanner scan file android 30 deprecated 
Java :: a Java-8 stream of batches, 
Java :: run app by package android 
Java :: java quote of the day 
Java :: create a class 
Java :: sending file over socket stream 
Java :: How to handle exception if message lost during publishing to kafka 
Java :: how to clear cli screen 
Java :: substring in java 
Java :: java bean go to other page 
Java :: get time until start of next hour in java 
Java :: how to create gravity in Java 
Java :: error message pushes button down 
Java :: list all managed beans in spring 
Java :: print current user roles in java 
Java :: Java byte Keyword 
Java :: constraints in Grails 
Java :: java replace nans with 0 csv line 
Java :: ein wort in buchstaben zerlegen java 
Java :: MojoExecutionException when generate sources cxf-xjc-plugin:3.3.0 java11 
Java :: java no name array eg 
Java :: javafx check if enter pressed 
Java :: You may test the newly compiled and packaged JAR in maven 
Java :: compiling and running program in terminal 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =