Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.MyBakedTurtle;
- import org.bukkit.Bukkit;
- import org.bukkit.ChatColor;
- import org.bukkit.GameMode;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import org.bukkit.plugin.java.JavaPlugin;
- import org.bukkit.potion.PotionEffect;
- import org.bukkit.potion.PotionEffectType;
- public class PluginMain extends JavaPlugin {
- public void onEnable() {
- getLogger().info("Plugin successfully enabled!");
- }
- public void onDisable() {
- }
- public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
- Player player = (Player) sender;
- if(cmd .getName().equalsIgnoreCase("Fast")) {
- player.sendMessage(ChatColor.GREEN + "Fast mode activated!");
- player.removePotionEffect(PotionEffectType.SLOW);
- player.removePotionEffect(PotionEffectType.JUMP);
- player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 2000, 3));
- return true;
- }
- if(cmd.getName().equalsIgnoreCase("Slow")) {
- player.sendMessage(ChatColor.RED + "You have gained 500 pounds!");
- player.removePotionEffect(PotionEffectType.SPEED);
- player.removePotionEffect(PotionEffectType.JUMP);
- player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 2000, 3));
- }
- if(cmd.getName().equalsIgnoreCase("Suicide")) {
- player.setGameMode(GameMode.SURVIVAL);
- player.addPotionEffect(new PotionEffect(PotionEffectType.HARM, 2000, 10));
- Bukkit.broadcastMessage(ChatColor.RED + player.getName() + " has, died today :/" );
- }
- if(cmd.getName().equalsIgnoreCase("High")) {
- player.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 2000, 1));
- player.sendMessage(ChatColor.GOLD + player.getName() + " Nice Jordans bro!");
- player.removePotionEffect(PotionEffectType.SLOW);
- player.removePotionEffect(PotionEffectType.SPEED);
- }
- if(cmd.getName().equalsIgnoreCase("OFast")) {
- player.sendMessage(ChatColor.RED + "Your super sonic speedy boots are now off!");
- player.removePotionEffect(PotionEffectType.SPEED);
- }
- if(cmd.getName().equalsIgnoreCase("OSlow")) {
- player.sendMessage(ChatColor.RED + "You have lost 500 Pounds GG!");
- player.removePotionEffect(PotionEffectType.SLOW);
- }
- if(cmd.getName().equalsIgnoreCase("OHigh")) {
- player.sendMessage(ChatColor.RED + "Byebye Jordans!");
- player.removePotionEffect(PotionEffectType.JUMP);
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement