fixed sample code in README

This commit is contained in:
mung3r 2012-12-10 12:55:08 -08:00
parent 820b40e356
commit 2d9d4e17a0

View File

@ -116,7 +116,6 @@ package com.example.plugin;
import java.util.logging.Logger;
import net.milkbowl.vault.Vault;
import net.milkbowl.vault.chat.Chat;
import net.milkbowl.vault.economy.Economy;
import net.milkbowl.vault.economy.EconomyResponse;
@ -125,7 +124,7 @@ import net.milkbowl.vault.permission.Permission;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;
public class ExamplePlugin extends JavaPlugin {
@ -137,17 +136,17 @@ public class ExamplePlugin extends JavaPlugin {
@Override
public void onDisable() {
log.info(Level.INFO, String.format("[%s] Disabled Version %s", getDescription().getName(), getDescription().getVersion()));
log.info(String.format("[%s] Disabled Version %s", getDescription().getName(), getDescription().getVersion()));
}
@Override
public void onEnable() {
if (!setupEconomy() ) {
log.info(Level.SEVERE, String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName()));
log.severe(String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName()));
getServer().getPluginManager().disablePlugin(this);
return;
}
setupPermission();
setupPermissions();
setupChat();
}