Last active
August 29, 2015 13:56
-
-
Save 97WaterPolo/8815801 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Using config int breadfood = getConfig().getInt("Bread.Food"); Bread is the indent, food is what you need. | |
//https://gist.github.com/AgentTroll/6382979 Contructosr | |
package com.rebelempiremc.sigler; | |
import java.util.ArrayList; | |
import org.bukkit.Bukkit; | |
import org.bukkit.ChatColor; | |
import org.bukkit.command.Command; | |
import org.bukkit.command.CommandSender; | |
import org.bukkit.entity.Player; | |
import org.bukkit.event.EventHandler; | |
import org.bukkit.event.Listener; | |
import org.bukkit.event.player.PlayerDropItemEvent; | |
import org.bukkit.plugin.java.JavaPlugin; | |
@SuppressWarnings("unused") | |
public class InstaEat extends JavaPlugin //implements Listener | |
{ | |
public void onEnable() | |
{ | |
getServer().getLogger().info("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); | |
getServer().getLogger().info(getDescription().getName() + " Version: " + getDescription().getVersion() + " By: 97WaterPolo " + " has been enabled!"); | |
getServer().getLogger().info("Please suggest ideas by sending a PM at: " + getDescription().getWebsite()); | |
getServer().getLogger().info("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); | |
this.getServer().getPluginManager().registerEvents(this,this); | |
saveDefaultConfig(); | |
} | |
public void onDisable() | |
{ | |
getServer().getLogger().info(getDescription().getName() + " Version: " + getDescription().getVersion() + " Has been disabled!"); | |
} | |
ChatColor aqua = ChatColor.AQUA; | |
ChatColor black = ChatColor.BLACK; | |
ChatColor bold = ChatColor.BOLD; | |
ChatColor daqua = ChatColor.DARK_AQUA; | |
ChatColor dblue = ChatColor.DARK_BLUE; | |
ChatColor dgray = ChatColor.DARK_GRAY; | |
ChatColor dgreen = ChatColor.DARK_GREEN; | |
ChatColor dpurple = ChatColor.DARK_PURPLE; | |
ChatColor dred = ChatColor.DARK_RED; | |
ChatColor gold = ChatColor.GOLD; | |
ChatColor gray = ChatColor.GRAY; | |
ChatColor green = ChatColor.GREEN; | |
ChatColor italic = ChatColor.ITALIC; | |
ChatColor lpurple = ChatColor.LIGHT_PURPLE; | |
ChatColor magic = ChatColor.MAGIC; | |
ChatColor red = ChatColor.RED; | |
ChatColor reset = ChatColor.RESET; | |
ChatColor strike = ChatColor.STRIKETHROUGH; | |
ChatColor under = ChatColor.UNDERLINE; | |
ChatColor white = ChatColor.WHITE; | |
ChatColor yellow = ChatColor.YELLOW; | |
/* | |
***Simple List for enable and disable commands | |
ArrayList<String> [VARIABLE] = new ArrayList<String>(); | |
***Bukkit Runnable - | |
BukkitScheduler scheduler = Bukkit.getServer().getScheduler(); | |
scheduler.scheduleSyncDelayedTask(this.plugin, new Runnable() | |
{ | |
@Override | |
public void run() | |
{CODE} | |
}, [TICKS]L); | |
***Use [main].plugin in other classes- | |
public static AntiDrop plugin;//The variable to refer to the Main | |
public HeadsUpDisplay(AntiDrop plugin) | |
{//The constructor | |
[main].plugin = plugin; | |
} | |
*/ | |
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) | |
{ | |
Player player = (Player)sender; | |
if (cmd.getName().equalsIgnoreCase("COMMAND") && (sender.hasPermission("SOME.PERMISSION"))) | |
{ | |
}else | |
{ | |
player.sendMessage(ChatColor.RED + "You do not have permission to use that command!"); | |
} | |
return false; | |
} | |
/* @EventHandler (priority=EventPriority.[LEVEL]) | |
public void [ROUGHNAME]([BUKKIT EVENT] event) | |
{ | |
Player player = event.getPlayer(); | |
if (something) | |
{CODE} | |
} | |
*/ | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment