Skip to content

Commit

Permalink
Add Log Output when Biome changing is done.
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Jan 6, 2019
1 parent f002219 commit 703f4b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.objects.Island;
import world.bentobox.bentobox.hooks.VaultHook;
import world.bentobox.biomes.BiomesAddon;
import world.bentobox.biomes.objects.BiomesObject;
import world.bentobox.biomes.utils.Utils.UpdateMode;

Expand Down Expand Up @@ -166,7 +167,7 @@ public void updateIslandBiome()

// Calculate minimal and maximal coordinate based on update mode.

BiomeUpdateTask task = new BiomeUpdateTask(this.callerUser, this.world, this.biome);
BiomeUpdateTask task = new BiomeUpdateTask((BiomesAddon) this.addon, this.callerUser, this.world, this.biome);

switch (this.updateMode)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.bukkit.scheduler.BukkitRunnable;

import world.bentobox.bentobox.api.user.User;
import world.bentobox.biomes.BiomesAddon;
import world.bentobox.biomes.objects.BiomesObject;
import world.bentobox.biomes.utils.Utils;

Expand All @@ -15,8 +16,9 @@
*/
public class BiomeUpdateTask extends BukkitRunnable
{
public BiomeUpdateTask(User user, World world, BiomesObject biome)
public BiomeUpdateTask(BiomesAddon addon, User user, World world, BiomesObject biome)
{
this.addon = addon;
this.user = user;
this.world = world;
this.biome = biome;
Expand All @@ -43,6 +45,9 @@ public void run()
this.user.sendMessage("biomes.messages.information.update-done",
"[biome]",
this.biome.getFriendlyName());

this.addon.log(this.user.getName() + " changes biome to " +
this.biome.getBiomeName() + " from x=" + this.minX + ":" + this.maxX + " z=" + this.minZ + ":" + this.maxZ);
}


Expand Down Expand Up @@ -95,6 +100,8 @@ public void setMaxZ(int maxZ)
// Section: Variables
// ---------------------------------------------------------------------

private BiomesAddon addon;

private User user;

private World world;
Expand Down

0 comments on commit 703f4b5

Please sign in to comment.