mirror of
https://github.com/kaboomserver/extras.git
synced 2024-11-27 09:55:36 -05:00
Kelp has two blocktypes
This commit is contained in:
parent
69ee352565
commit
8ac5e83044
3 changed files with 3 additions and 63 deletions
|
@ -418,7 +418,7 @@ public class Main extends JavaPlugin {
|
||||||
Material.JUNGLE_DOOR,
|
Material.JUNGLE_DOOR,
|
||||||
Material.ACACIA_DOOR,
|
Material.ACACIA_DOOR,
|
||||||
Material.DARK_OAK_DOOR,
|
Material.DARK_OAK_DOOR,
|
||||||
Material.KELP,
|
Material.KELP_PLANT,
|
||||||
Material.TALL_SEAGRASS,
|
Material.TALL_SEAGRASS,
|
||||||
Material.TALL_GRASS,
|
Material.TALL_GRASS,
|
||||||
Material.SUNFLOWER,
|
Material.SUNFLOWER,
|
||||||
|
@ -503,7 +503,8 @@ public class Main extends JavaPlugin {
|
||||||
Material.FIRE_CORAL,
|
Material.FIRE_CORAL,
|
||||||
Material.HORN_CORAL,
|
Material.HORN_CORAL,
|
||||||
Material.TUBE_CORAL,
|
Material.TUBE_CORAL,
|
||||||
Material.SEA_PICKLE
|
Material.SEA_PICKLE,
|
||||||
|
Material.KELP
|
||||||
);
|
);
|
||||||
|
|
||||||
Collections.addAll(
|
Collections.addAll(
|
||||||
|
@ -584,7 +585,6 @@ public class Main extends JavaPlugin {
|
||||||
this.getCommand("console").setExecutor(new CommandConsole());
|
this.getCommand("console").setExecutor(new CommandConsole());
|
||||||
this.getCommand("destroyentities").setExecutor(new CommandDestroyEntities());
|
this.getCommand("destroyentities").setExecutor(new CommandDestroyEntities());
|
||||||
this.getCommand("enchantall").setExecutor(new CommandEnchantAll());
|
this.getCommand("enchantall").setExecutor(new CommandEnchantAll());
|
||||||
this.getCommand("herobrine").setExecutor(new CommandHerobrine(this));
|
|
||||||
this.getCommand("jumpscare").setExecutor(new CommandJumpscare());
|
this.getCommand("jumpscare").setExecutor(new CommandJumpscare());
|
||||||
this.getCommand("prefix").setExecutor(new CommandPrefix(this));
|
this.getCommand("prefix").setExecutor(new CommandPrefix(this));
|
||||||
this.getCommand("pumpkin").setExecutor(new CommandPumpkin());
|
this.getCommand("pumpkin").setExecutor(new CommandPumpkin());
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
package pw.kaboom.extras;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Location;
|
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
|
|
||||||
import org.bukkit.entity.EntityType;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
/* TODO: working command */
|
|
||||||
class CommandHerobrine implements CommandExecutor {
|
|
||||||
private Main main;
|
|
||||||
public CommandHerobrine(Main main) {
|
|
||||||
this.main = main;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void spawnHerobrine(Player player) {
|
|
||||||
final Location location = player.getLocation();
|
|
||||||
|
|
||||||
final Player herobrine = (Player) location.getWorld().spawnEntity(
|
|
||||||
location.add(location.getDirection().multiply(6)),
|
|
||||||
EntityType.PLAYER
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
final Player player = (Player) sender;
|
|
||||||
final Location location = player.getLocation();
|
|
||||||
|
|
||||||
if (args.length == 0) {
|
|
||||||
final Player herobrine = (Player) location.getWorld().spawnEntity(
|
|
||||||
location,
|
|
||||||
EntityType.PLAYER
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
if (args[0].equals("*") || args[0].equals("**")) {
|
|
||||||
for (Player p : Bukkit.getOnlinePlayers()) {
|
|
||||||
spawnHerobrine(p);
|
|
||||||
}
|
|
||||||
player.sendMessage("Successfully spawned Herobrine behind every player");
|
|
||||||
} else {
|
|
||||||
final Player target = Bukkit.getPlayer(args[0]);
|
|
||||||
|
|
||||||
if (target != null) {
|
|
||||||
spawnHerobrine(target);
|
|
||||||
player.sendMessage("Successfully spawned Herobrine behind player \"" + target.getName() + "\"");
|
|
||||||
} else {
|
|
||||||
player.sendMessage("Player \"" + target.getName() + "\" not found");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -18,9 +18,6 @@ commands:
|
||||||
enchantall:
|
enchantall:
|
||||||
description: Adds every enchantment to a held item
|
description: Adds every enchantment to a held item
|
||||||
permission: extras.enchantall
|
permission: extras.enchantall
|
||||||
herobrine:
|
|
||||||
description: I wonder...
|
|
||||||
permission: extras.herobrine
|
|
||||||
jumpscare:
|
jumpscare:
|
||||||
aliases: scare
|
aliases: scare
|
||||||
description: Scares a player
|
description: Scares a player
|
||||||
|
|
Loading…
Reference in a new issue