mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Calling things that many times is BAD.
This commit is contained in:
parent
12e388a392
commit
01d10971a1
@ -3,6 +3,7 @@ package com.gmail.nossr50.util;
|
||||
import java.util.Collection;
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Entity;
|
||||
@ -193,8 +194,12 @@ public final class Misc {
|
||||
}
|
||||
|
||||
public static void resendChunkRadiusAt(Player player, int radius) {
|
||||
for (int x = player.getLocation().getChunk().getX() - radius; x < player.getLocation().getChunk().getX() + radius; x++) {
|
||||
for (int z = player.getLocation().getChunk().getZ() - radius; z < player.getLocation().getChunk().getZ() + radius; z++) {
|
||||
Chunk chunk = player.getLocation().getChunk();
|
||||
int chunkX = chunk.getX();
|
||||
int chunkZ = chunk.getZ();
|
||||
|
||||
for (int x = chunkX - radius; x < chunkX + radius; x++) {
|
||||
for (int z = chunkZ - radius; z < chunkZ + radius; z++) {
|
||||
player.getWorld().refreshChunk(x, z);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user