jeeperscreeper77

test1

Aug 31st, 2014
236
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package me.Jeepeerscreeper77.Test1;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.ChatColor;
  5. import org.bukkit.command.Command;
  6. import org.bukkit.command.CommandSender;
  7. import org.bukkit.entity.Player;
  8. import org.bukkit.plugin.java.JavaPlugin;
  9.  
  10. public class Main extends JavaPlugin{
  11.  
  12. public void onEnable() {
  13. getLogger().info("Plugin Enabled");
  14.  
  15. }
  16.  
  17. public void onDisable() {
  18. getLogger().info("Plugin Disabled");
  19. }
  20.  
  21. public boolean onCommand(CommandSender sender, Command cmd, String iabel, String[] args) {
  22. if(sender instanceof Player) {
  23. Player player = (Player) sender;
  24. if(cmd.getName().equalsIgnoreCase("spawn")){
  25. String hub = "warp spawn " + player.getName();
  26. Bukkit.dispatchCommand(Bukkit.getConsoleSender(), hub);
  27. player.sendMessage(ChatColor.GOLD + "Welcome to spawn!");
  28.  
  29. }
  30. }
  31.  
  32.  
  33.  
  34.  
  35.  
  36. plugin.yml
  37. name: Test1
  38. author: Jeeperscreeper77
  39. version: 1
  40. description: my first plugin
  41. main: me.Jeeperscreeper77.Test1.Main
  42. commands:
  43. spawn:
  44. description: takes you back to spawn
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×