Kelp has two blocktypes

This commit is contained in:
mathias 2019-08-06 21:41:18 +03:00
parent 69ee352565
commit 8ac5e83044
3 changed files with 3 additions and 63 deletions

View file

@ -418,7 +418,7 @@ public class Main extends JavaPlugin {
Material.JUNGLE_DOOR,
Material.ACACIA_DOOR,
Material.DARK_OAK_DOOR,
Material.KELP,
Material.KELP_PLANT,
Material.TALL_SEAGRASS,
Material.TALL_GRASS,
Material.SUNFLOWER,
@ -503,7 +503,8 @@ public class Main extends JavaPlugin {
Material.FIRE_CORAL,
Material.HORN_CORAL,
Material.TUBE_CORAL,
Material.SEA_PICKLE
Material.SEA_PICKLE,
Material.KELP
);
Collections.addAll(
@ -584,7 +585,6 @@ public class Main extends JavaPlugin {
this.getCommand("console").setExecutor(new CommandConsole());
this.getCommand("destroyentities").setExecutor(new CommandDestroyEntities());
this.getCommand("enchantall").setExecutor(new CommandEnchantAll());
this.getCommand("herobrine").setExecutor(new CommandHerobrine(this));
this.getCommand("jumpscare").setExecutor(new CommandJumpscare());
this.getCommand("prefix").setExecutor(new CommandPrefix(this));
this.getCommand("pumpkin").setExecutor(new CommandPumpkin());

View file

@ -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;
}
}

View file

@ -18,9 +18,6 @@ commands:
enchantall:
description: Adds every enchantment to a held item
permission: extras.enchantall
herobrine:
description: I wonder...
permission: extras.herobrine
jumpscare:
aliases: scare
description: Scares a player