Minecraft Blogs / Tutorial

Bukkit plugin tutorial part 1

  • 306 views, 2 today
  • 1
  • 0
  • 1
Raymart23's Avatar Raymart23
Level 9 : Apprentice Miner
5
Enabling and Disabling plugin Message
Create the methods onEnable() and onDisable() inside the main class created in the previous section. It will look something like the following

package {$TopLevelDomain}.{$Domain}.{$PluginName};

import org.bukkit.plugin.java.JavaPlugin;

public final class {$PluginName} extends JavaPlugin {
@Override
public void onEnable() {
// TODO the enabling message example codes will be listed below
// First method System.out.println("Plugin successfully enabled");
// Second method getLogger().info("Plugin successfully enabled");
// the "//" thingy is only uses for comments
System.out.println("Plugin successfully enabled");
    }

@Override
public void onDisable() {
// TODO the disabling message example codes are kindly looks like above
System.out.println("Plugin successfully disabled");
    }
}
Tags

Create an account or sign in to comment.

1
06/22/2015 6:22 am
Level 9 : Apprentice Miner
Raymart23
Raymart23's Avatar
This is the simple explanation for onenable and ondisable process :P with message if the plugin successfully enabled or disabled

Part 2 would be the simple commands enjoy
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome