Latest changes

This commit is contained in:
mathias 2018-07-10 22:07:29 +03:00
parent e7420d9b6e
commit a74663af19
4 changed files with 164 additions and 80 deletions
pom.xml
src/main/java/pw/kaboom/extras

View file

@ -33,11 +33,6 @@
<artifactId>worldedit-bukkit</artifactId> <artifactId>worldedit-bukkit</artifactId>
<version>6.1.1-SNAPSHOT</version> <version>6.1.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib</artifactId>
<version>4.3.0</version>
</dependency>
</dependencies> </dependencies>
<repositories> <repositories>
@ -59,10 +54,6 @@
<enabled>true</enabled> <enabled>true</enabled>
</snapshots> </snapshots>
</repository> </repository>
<repository>
<id>dmulloy2-repo</id>
<url>http://repo.dmulloy2.net/content/groups/public/</url>
</repository>
</repositories> </repositories>
<build> <build>

View file

@ -319,8 +319,9 @@ class CommandVote implements CommandExecutor {
Player player = (Player)sender; Player player = (Player)sender;
player.sendMessage("Feel free to vote for the server to help it grow"); player.sendMessage("Feel free to vote for the server to help it grow");
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "minecraft:tellraw " + player.getName() + " [\"\",{\"text\":\"[1] \",\"color\":\"dark_green\"},{\"text\":\"TopG.org\",\"color\":\"green\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"https://topg.org/Minecraft/in-414108\"}}]"); Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "minecraft:tellraw " + player.getName() + " [\"\",{\"text\":\"[1] \",\"color\":\"dark_green\"},{\"text\":\"TopG.org\",\"color\":\"green\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"https://topg.org/Minecraft/in-414108\"}}]");
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "minecraft:tellraw " + player.getName() + " [\"\",{\"text\":\"[2] \",\"color\":\"dark_green\"},{\"text\":\"MinecraftServers.org\",\"color\":\"green\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"http://minecraftservers.org/vote/153833\"}}]"); Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "minecraft:tellraw " + player.getName() + " [\"\",{\"text\":\"[2] \",\"color\":\"dark_green\"},{\"text\":\"MinecraftServers.biz\",\"color\":\"green\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"https://minecraftservers.biz/servers/140916/\"}}]");
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "minecraft:tellraw " + player.getName() + " [\"\",{\"text\":\"[3] \",\"color\":\"dark_green\"},{\"text\":\"Minecraft Multiplayer\",\"color\":\"green\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"http://minecraft-mp.com/server/155223/vote/\"}}]"); Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "minecraft:tellraw " + player.getName() + " [\"\",{\"text\":\"[3] \",\"color\":\"dark_green\"},{\"text\":\"MinecraftServers.org\",\"color\":\"green\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"http://minecraftservers.org/vote/153833\"}}]");
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "minecraft:tellraw " + player.getName() + " [\"\",{\"text\":\"[4] \",\"color\":\"dark_green\"},{\"text\":\"Minecraft Multiplayer\",\"color\":\"green\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"http://minecraft-mp.com/server/155223/vote/\"}}]");
return true; return true;
} }
} }

View file

@ -87,6 +87,15 @@ class Tick extends BukkitRunnable {
} }
} }
class Update extends BukkitRunnable {
public void run() {
File file = new File(plugin.getDataFolder(), ".update");
file.createNewFile();
EditSession editSession = ClipboardFormat.SCHEMATIC.load(spawn.schematic).paste(Bukkit.getServer().getWorld("world"), new Location(0, 85, 0), false, !noAir, (Transform) null);
}
}
class Events implements Listener { class Events implements Listener {
Main main; Main main;
Events(Main main) { Events(Main main) {
@ -115,8 +124,14 @@ class Events implements Listener {
@EventHandler @EventHandler
void onBlockBreakEvent(BlockBreakEvent event) { void onBlockBreakEvent(BlockBreakEvent event) {
Block block = event.getBlock(); Block block = event.getBlock();
if (block.getWorld().getName().equals("world")) { double x = block.getLocation().getX();
event.setCancelled(true); double y = block.getLocation().getY();
double z = block.getLocation().getZ();
if (block.getWorld().getName() == "world") {
if (x > -20 && x < 20) && (z > -20 && z < 20)) {
event.setCancelled(true);
}
} }
} }
@ -124,93 +139,139 @@ class Events implements Listener {
@EventHandler @EventHandler
void onBlockBurnEvent(BlockBurnEvent event) { void onBlockBurnEvent(BlockBurnEvent event) {
Block block = event.getBlock(); Block block = event.getBlock();
if (block.getWorld().getName().equals("world")) { double x = block.getLocation().getX();
event.setCancelled(true); double y = block.getLocation().getY();
double z = block.getLocation().getZ();
if (block.getWorld().getName() == "world") {
if (x > -20 && x < 20) && (z > -20 && z < 20)) {
event.setCancelled(true);
}
} }
} }
@EventHandler @EventHandler
void onBlockDamage(BlockDamageEvent event) { void onBlockDamage(BlockDamageEvent event) {
Block block = event.getBlock(); Block block = event.getBlock();
if (block.getWorld().getName().equals("world")) { double x = block.getLocation().getX();
event.setCancelled(true); double y = block.getLocation().getY();
double z = block.getLocation().getZ();
if (block.getWorld().getName() == "world") {
if (x > -20 && x < 20) && (z > -20 && z < 20)) {
event.setCancelled(true);
}
} }
} }
@EventHandler @EventHandler
void onBlockExplode(BlockExplodeEvent event) { void onBlockExplode(BlockExplodeEvent event) {
Block block = event.getBlock(); Block block = event.getBlock();
double x = block.getLocation().getX();
double y = block.getLocation().getY();
double z = block.getLocation().getZ();
double tps = Bukkit.getServer().getTPS()[0]; double tps = Bukkit.getServer().getTPS()[0];
event.setYield(0); if (block.getWorld().getName() == "world") {
if (x > -20 && x < 20) && (z > -20 && z < 20)) {
if (block.getWorld().getName().equals("world")) { event.blockList().clear();
event.blockList().clear(); }
} }
if (tps < 14) { if (tps < 14) {
event.setCancelled(true); event.setCancelled(true);
} }
event.setYield(0);
} }
@EventHandler @EventHandler
void onBlockFade(BlockFadeEvent event) { void onBlockFade(BlockFadeEvent event) {
Block block = event.getBlock(); Block block = event.getBlock();
if (block.getWorld().getName().equals("world")) { double x = block.getLocation().getX();
event.setCancelled(true); double y = block.getLocation().getY();
double z = block.getLocation().getZ();
if (block.getWorld().getName() == "world") {
if (x > -20 && x < 20) && (z > -20 && z < 20)) {
event.setCancelled(true);
}
} }
} }
@EventHandler @EventHandler
void onBlockFromTo(BlockFromToEvent event) { void onBlockFromTo(BlockFromToEvent event) {
Block block = event.getBlock(); Block block = event.getBlock();
if (block.getWorld().getName().equals("world")) { double x = block.getLocation().getX();
event.setCancelled(true); double y = block.getLocation().getY();
double z = block.getLocation().getZ();
if (block.getWorld().getName() == "world") {
if (x > -20 && x < 20) && (z > -20 && z < 20)) {
event.setCancelled(true);
}
} }
} }
@EventHandler @EventHandler
void onBlockGrow(BlockGrowEvent event) { void onBlockGrow(BlockGrowEvent event) {
Block block = event.getBlock(); Block block = event.getBlock();
if (block.getWorld().getName().equals("world")) { double x = block.getLocation().getX();
event.setCancelled(true); double y = block.getLocation().getY();
double z = block.getLocation().getZ();
if (block.getWorld().getName() == "world") {
if (x > -20 && x < 20) && (z > -20 && z < 20)) {
event.setCancelled(true);
}
} }
} }
@EventHandler @EventHandler
void onBlockPhysics(BlockPhysicsEvent event) { void onBlockPhysics(BlockPhysicsEvent event) {
Block block = event.getBlock(); Block block = event.getBlock();
if (block.getWorld().getName().equals("world") || double x = block.getLocation().getX();
block.getType() == Material.SOIL) { double y = block.getLocation().getY();
event.setCancelled(true); double z = block.getLocation().getZ();
if (block.getWorld().getName() == "world")) {
if (x > -20 && x < 20) && (z > -20 && z < 20)) {
event.setCancelled(true);
}
} }
if (block.getType() == Material.LAVA || if (block.getType() == Material.LAVA ||
block.getType() == Material.SOIL ||
block.getType() == Material.STATIONARY_LAVA || block.getType() == Material.STATIONARY_LAVA ||
block.getType() == Material.STATIONARY_WATER || block.getType() == Material.STATIONARY_WATER ||
block.getType() == Material.WATER) { block.getType() == Material.WATER) {
event.setCancelled(true); event.setCancelled(true);
/*if (main.physicscount == 5) {
main.physicscount = 0;
} else {
event.setCancelled(true);
main.physicscount = main.physicscount + 1;
}*/
} }
} }
@EventHandler @EventHandler
void onBlockPlaceEvent(BlockPlaceEvent event) { void onBlockPlaceEvent(BlockPlaceEvent event) {
Block block = event.getBlock(); Block block = event.getBlock();
if (block.getWorld().getName().equals("world")) { double x = block.getLocation().getX();
event.setCancelled(true); double y = block.getLocation().getY();
double z = block.getLocation().getZ();
if (block.getWorld().getName() == "world") {
if (x > -20 && x < 20) && (z > -20 && z < 20)) {
event.setCancelled(true);
}
} }
} }
@EventHandler @EventHandler
void onBlockRedstone(BlockRedstoneEvent event) { void onBlockRedstone(BlockRedstoneEvent event) {
Block block = event.getBlock(); Block block = event.getBlock();
double x = block.getLocation().getX();
double y = block.getLocation().getY();
double z = block.getLocation().getZ();
double tps = Bukkit.getServer().getTPS()[0]; double tps = Bukkit.getServer().getTPS()[0];
if (block.getWorld().getName().equals("world") || tps < 14) {
if (block.getWorld().getName() == "world") && (x > -20 && x < 20) && (z > -20 && z < 20) ||
tps < 14) {
event.setNewCurrent(0); event.setNewCurrent(0);
} }
} }
@ -222,19 +283,19 @@ class Events implements Listener {
int onChunk = 0; int onChunk = 0;
for (Entity chunkEntity : entityLocation.getWorld().getEntities()) { for (Entity chunkEntity : entityLocation.getWorld().getEntities()) {
if (entityLocation.getChunk().equals(chunkEntity.getLocation().getChunk())) { if (entityLocation.getChunk() == chunkEntity.getLocation().getChunk()) {
onChunk++; onChunk++;
} }
} }
if (onChunk >= 50) { if (onChunk >= 50) {
entity.remove(); entity.remove();
} else if (entity.getType().equals(EntityType.MAGMA_CUBE)) { } else if (entity.getType() == EntityType.MAGMA_CUBE) {
MagmaCube magmacube = (MagmaCube) event.getEntity(); MagmaCube magmacube = (MagmaCube) event.getEntity();
if (magmacube.getSize() > 100) { if (magmacube.getSize() > 100) {
magmacube.setSize(100); magmacube.setSize(100);
} }
} else if (entity.getType().equals(EntityType.SLIME)) { } else if (entity.getType() == EntityType.SLIME) {
Slime slime = (Slime) event.getEntity(); Slime slime = (Slime) event.getEntity();
if (slime.getSize() > 100) { if (slime.getSize() > 100) {
slime.setSize(100); slime.setSize(100);
@ -245,18 +306,24 @@ class Events implements Listener {
@EventHandler @EventHandler
void onEntityChangeBlockEvent(EntityChangeBlockEvent event) { void onEntityChangeBlockEvent(EntityChangeBlockEvent event) {
Block block = event.getBlock(); Block block = event.getBlock();
if (block.getWorld().getName().equals("world")) { double x = block.getLocation().getX();
event.setCancelled(true); double y = block.getLocation().getY();
double z = block.getLocation().getZ();
if (block.getWorld().getName() == "world") {
if (x > -20 && x < 20) && (z > -20 && z < 20)) {
event.setCancelled(true);
}
} }
} }
@EventHandler @EventHandler
void onEntityDamage(EntityDamageEvent event) { void onEntityDamage(EntityDamageEvent event) {
Entity entity = event.getEntity(); Entity entity = event.getEntity();
if (entity.getType().equals(EntityType.PLAYER)) { if (entity.getType() == EntityType.PLAYER) {
if (event.getCause().equals(DamageCause.VOID) && entity.getLocation().getY() > -64 || if (event.getCause() == DamageCause.VOID && entity.getLocation().getY() > -64 ||
event.getCause().equals(DamageCause.CUSTOM) || event.getCause() == DamageCause.CUSTOM ||
event.getCause().equals(DamageCause.SUICIDE)) { event.getCause() == DamageCause.SUICIDE) {
event.setCancelled(true); event.setCancelled(true);
} }
} }
@ -269,8 +336,10 @@ class Events implements Listener {
event.setYield(0); event.setYield(0);
if (entity.getWorld().getName().equals("world")) { if (entity.getWorld().getName() == "world") {
event.blockList().clear(); if (x > -20 && x < 20) && (z > -20 && z < 20)) {
event.blockList().clear();
}
} }
if (tps < 14) { if (tps < 14) {
@ -285,7 +354,7 @@ class Events implements Listener {
int onChunk = 0; int onChunk = 0;
for (Entity chunkEntity : entityLocation.getWorld().getEntities()) { for (Entity chunkEntity : entityLocation.getWorld().getEntities()) {
if (entityLocation.getChunk().equals(chunkEntity.getLocation().getChunk())) { if (entityLocation.getChunk() == chunkEntity.getLocation().getChunk()) {
onChunk++; onChunk++;
} }
} }
@ -310,32 +379,56 @@ class Events implements Listener {
@EventHandler @EventHandler
void onLingeringPotionSplash(LingeringPotionSplashEvent event) { void onLingeringPotionSplash(LingeringPotionSplashEvent event) {
Entity entity = event.getEntity(); Entity entity = event.getEntity();
if (entity.getWorld().getName().equals("world")) { double x = entity.getLocation().getX();
event.setCancelled(true); double y = entity.getLocation().getY();
double z = entity.getLocation().getZ();
if (entity.getWorld().getName() == "world") {
if (x > -20 && x < 20) && (z > -20 && z < 20)) {
event.setCancelled(true);
}
} }
} }
@EventHandler @EventHandler
void onPotionSplash(PotionSplashEvent event) { void onPotionSplash(PotionSplashEvent event) {
Entity entity = event.getEntity(); Entity entity = event.getEntity();
if (entity.getWorld().getName().equals("world")) { double x = entity.getLocation().getX();
event.setCancelled(true); double y = entity.getLocation().getY();
double z = entity.getLocation().getZ();
if (entity.getWorld().getName() == "world") {
if (x > -20 && x < 20) && (z > -20 && z < 20)) {
event.setCancelled(true);
}
} }
} }
@EventHandler @EventHandler
void onHangingPlace(HangingPlaceEvent event) { void onHangingPlace(HangingPlaceEvent event) {
Entity entity = event.getEntity(); Entity entity = event.getEntity();
if (entity.getWorld().getName().equals("world")) { double x = entity.getLocation().getX();
event.setCancelled(true); double y = entity.getLocation().getY();
double z = entity.getLocation().getZ();
if (entity.getWorld().getName() == "world") {
if (x > -20 && x < 20) && (z > -20 && z < 20)) {
event.setCancelled(true);
}
} }
} }
@EventHandler @EventHandler
void onPlayerBucketEmpty(PlayerBucketEmptyEvent event) { void onPlayerBucketEmpty(PlayerBucketEmptyEvent event) {
Player player = event.getPlayer(); Player player = event.getPlayer();
if (player.getWorld().getName().equals("world")) { double x = entity.getLocation().getX();
event.setCancelled(true); double y = entity.getLocation().getY();
double z = entity.getLocation().getZ();
if (player.getWorld().getName() == "world") {
if (x > -20 && x < 20) && (z > -20 && z < 20)) {
event.setCancelled(true);
}
} }
} }
@ -345,17 +438,17 @@ class Events implements Listener {
String world = player.getLocation().getWorld().getName(); String world = player.getLocation().getWorld().getName();
/*PermissionAttachment p = main.permissionList.get(player.getUniqueId());*/ /*PermissionAttachment p = main.permissionList.get(player.getUniqueId());*/
if (world.equals("world_the_end")) { if (world == "world_the_end") {
player.sendTitle(ChatColor.GRAY + "The End", "Return to the hub by typing /hub in chat", 10, 160, 5); player.sendTitle(ChatColor.GRAY + "The End", "Return to the hub by typing /hub in chat", 10, 160, 5);
} else if (world.equals("world_flatlands")) { } else if (world == "world_flatlands") {
player.sendTitle(ChatColor.GREEN + "Flatlands", "Return to the hub by typing /hub in chat", 10, 160, 5); player.sendTitle(ChatColor.GREEN + "Flatlands", "Return to the hub by typing /hub in chat", 10, 160, 5);
} else if (world.equals("world_nether")) { } else if (world == "world_nether") {
player.sendTitle(ChatColor.RED + "Nether", "Return to the hub by typing /hub in chat", 10, 160, 5); player.sendTitle(ChatColor.RED + "Nether", "Return to the hub by typing /hub in chat", 10, 160, 5);
} else if (world.equals("world_overworld")) { } else if (world == "world_overworld") {
player.sendTitle(ChatColor.DARK_GREEN + "Overworld", "Return to the hub by typing /hub in chat", 10, 160, 5); player.sendTitle(ChatColor.DARK_GREEN + "Overworld", "Return to the hub by typing /hub in chat", 10, 160, 5);
} }
/* if (world.equals("world")) { /* if (world == "world") {
p.unsetPermission("DoBlockImage.doblockimage"); p.unsetPermission("DoBlockImage.doblockimage");
p.unsetPermission("essentials.bigtree"); p.unsetPermission("essentials.bigtree");
p.unsetPermission("essentials.tree"); p.unsetPermission("essentials.tree");
@ -429,7 +522,7 @@ class Events implements Listener {
/*PermissionAttachment attachment = player.addAttachment(main); /*PermissionAttachment attachment = player.addAttachment(main);
main.permissionList.put(player.getUniqueId(), attachment); main.permissionList.put(player.getUniqueId(), attachment);
if (!player.getWorld().getName().equals("world")) { if (!player.getWorld().getName() == "world")) {
PermissionAttachment p = main.permissionList.get(player.getUniqueId()); PermissionAttachment p = main.permissionList.get(player.getUniqueId());
p.setPermission("DoBlockImage.doblockimage", true); p.setPermission("DoBlockImage.doblockimage", true);
p.setPermission("essentials.bigtree", true); p.setPermission("essentials.bigtree", true);
@ -453,14 +546,14 @@ class Events implements Listener {
event.allow(); event.allow();
} }
@EventHandler /*@EventHandler
void onPlayerMove(PlayerMoveEvent event) { void onPlayerMove(PlayerMoveEvent event) {
Player player = event.getPlayer(); Player player = event.getPlayer();
double x = player.getLocation().getX(); double x = player.getLocation().getX();
double y = player.getLocation().getY(); double y = player.getLocation().getY();
double z = player.getLocation().getZ(); double z = player.getLocation().getZ();
if (player.getWorld().getName().equals("world")) { if (player.getWorld().getName() == "world")) {
if ((x > -19 && x < -13) && (y > 62 && y < 72) && (z > -1 && z < 2)) { if ((x > -19 && x < -13) && (y > 62 && y < 72) && (z > -1 && z < 2)) {
if (!main.enteredPortal.containsKey(player.getUniqueId())) { if (!main.enteredPortal.containsKey(player.getUniqueId())) {
player.teleport(Bukkit.getWorld("world_the_end").getSpawnLocation()); player.teleport(Bukkit.getWorld("world_the_end").getSpawnLocation());
@ -509,9 +602,9 @@ class Events implements Listener {
main.enteredTitle.remove(player.getUniqueId()); main.enteredTitle.remove(player.getUniqueId());
} }
} }
} }*/
@EventHandler /*@EventHandler
void onPlayerPortal(PlayerPortalEvent event) { void onPlayerPortal(PlayerPortalEvent event) {
Player player = event.getPlayer(); Player player = event.getPlayer();
if (player.getWorld().getName().equals("world_overworld")) { if (player.getWorld().getName().equals("world_overworld")) {
@ -530,10 +623,10 @@ class Events implements Listener {
double y = event.getTo().getY(); double y = event.getTo().getY();
double z = event.getTo().getZ(); double z = event.getTo().getZ();
if (event.getTo().getWorld().getName().equals("world")) { if (event.getTo().getWorld().getName() == "world")) {
event.setTo(new Location(Bukkit.getWorld("world_overworld"), x, y, z)); event.setTo(new Location(Bukkit.getWorld("world_overworld"), x, y, z));
} }
} }*/
@EventHandler @EventHandler
void onPlayerQuit(PlayerQuitEvent event) { void onPlayerQuit(PlayerQuitEvent event) {
@ -547,11 +640,11 @@ class Events implements Listener {
void onPlayerRespawn(PlayerRespawnEvent event) { void onPlayerRespawn(PlayerRespawnEvent event) {
Player player = event.getPlayer(); Player player = event.getPlayer();
World world = event.getRespawnLocation().getWorld(); World world = event.getRespawnLocation().getWorld();
if (world.getName().equals("world")) { if (world.getName() == "world") {
if (player.getBedSpawnLocation() != null) { if (player.getBedSpawnLocation() != null) {
event.setRespawnLocation(player.getBedSpawnLocation()); event.setRespawnLocation(player.getBedSpawnLocation());
} else { } else {
event.setRespawnLocation(new Location(world, 0, 63, -22)); event.setRespawnLocation(new Location(world, 0, 85, 0));
} }
} }
} }
@ -559,8 +652,9 @@ class Events implements Listener {
@EventHandler @EventHandler
void onPlayerSpawnLocation(PlayerSpawnLocationEvent event) { void onPlayerSpawnLocation(PlayerSpawnLocationEvent event) {
Player player = event.getPlayer(); Player player = event.getPlayer();
World world = event.getSpawnLocation().getWorld();
if (!player.hasPlayedBefore()) { if (!player.hasPlayedBefore()) {
event.setSpawnLocation(new Location(event.getSpawnLocation().getWorld(), 0, 63, -22)); event.setSpawnLocation(new Location(world, 0, 85, 0));
} }
} }
@ -596,10 +690,10 @@ class Events implements Listener {
} }
class WorldEditEvent { class WorldEditEvent {
@Subscribe(priority = Priority.VERY_EARLY) /*@Subscribe(priority = Priority.VERY_EARLY)
public void onEditSessionEvent(EditSessionEvent event) { public void onEditSessionEvent(EditSessionEvent event) {
if (event.getWorld().getName().equals("world")) { if (event.getWorld().getName() == "world") && (x > -20 && x < 20) && (z > -20 && z < 20)) {
event.setCancelled(true); event.setCancelled(true);
} }
} }*/
} }

View file

@ -355,9 +355,6 @@ public class Main extends JavaPlugin {
int physicscount = 0; int physicscount = 0;
public void onEnable() { public void onEnable() {
getServer().createWorld(new WorldCreator("world_flatlands"));
getServer().createWorld(new WorldCreator("world_overworld"));
this.getCommand("clearchat").setExecutor(new CommandClearChat()); this.getCommand("clearchat").setExecutor(new CommandClearChat());
this.getCommand("console").setExecutor(new CommandConsole()); this.getCommand("console").setExecutor(new CommandConsole());
this.getCommand("destroyentities").setExecutor(new CommandDestroyEntities()); this.getCommand("destroyentities").setExecutor(new CommandDestroyEntities());
@ -377,6 +374,7 @@ public class Main extends JavaPlugin {
this.getCommand("vote").setExecutor(new CommandVote()); this.getCommand("vote").setExecutor(new CommandVote());
new Tick().runTaskTimer(this, 0, 1); new Tick().runTaskTimer(this, 0, 1);
new Update().runTaskTimer(this, 0, 200);
this.getServer().getPluginManager().registerEvents(new Events(this), this); this.getServer().getPluginManager().registerEvents(new Events(this), this);
WorldEdit.getInstance().getEventBus().register(new WorldEditEvent()); WorldEdit.getInstance().getEventBus().register(new WorldEditEvent());