Skip to content

Instantly share code, notes, and snippets.

@fpigerre
Created July 20, 2013 04:16
Show Gist options
  • Save fpigerre/6043840 to your computer and use it in GitHub Desktop.
Save fpigerre/6043840 to your computer and use it in GitHub Desktop.
CreditCommand Gist for ServerUtils
package io.github.psgs.serverutils.credits;
import io.github.psgs.serverutils.ServerUtils;
import org.bukkit.*;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Firework;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.FireworkMeta;
import net.milkbowl.vault.economy.Economy;
public class CreditCommand implements CommandExecutor {
ServerUtils plugin;
public CreditCommand(ServerUtils plugin) {
this.plugin = plugin;
}
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (cmd.getName().equalsIgnoreCase("credits")) {
if (sender.isOp() || sender.hasPermission("utils.credits")) {
//Return balance
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment