mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Fixed my bad code
This commit is contained in:
parent
073a618035
commit
d74846cde6
@ -33,8 +33,6 @@ public class Monitors extends FreedomService
|
||||
Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, () ->
|
||||
{
|
||||
for (Player player : recentlyThrownPotions.keySet())
|
||||
{
|
||||
if (plugin.al.isAdmin(player) && plugin.al.getAdmin(player).getPotionSpy())
|
||||
{
|
||||
List<ThrownPotion> playerThrownPotions = recentlyThrownPotions.get(player);
|
||||
ThrownPotion latestThrownPotion = playerThrownPotions.get(playerThrownPotions.size() - 1); // Get most recently thrown potion for the position.
|
||||
@ -53,7 +51,6 @@ public class Monitors extends FreedomService
|
||||
player.getName(), potionsThrown, potionsThrown == 1 ? "potion" : "potions", latestThrownPotion.getLocation().getBlockX(), latestThrownPotion.getLocation().getBlockY(), latestThrownPotion.getLocation().getBlockZ(),
|
||||
latestThrownPotion.getWorld().getName(), trollPotions > 0 ? String.format(" &c(most likely troll %s)", trollPotions == 1 ? "potion" : "potions") : "")));
|
||||
}
|
||||
}
|
||||
recentlyThrownPotions.clear();
|
||||
}, 0L, 40L);
|
||||
}
|
||||
|
@ -134,7 +134,10 @@ public class FAWEBridge extends FreedomService
|
||||
public void logBlockEdits(String playerName, EditSession editSession, Region region, Pattern pattern)
|
||||
{
|
||||
// Add the broken blocks to CoreProtect.
|
||||
World world = server.getWorld(region.getWorld().getName());
|
||||
if (world == null || !world.getName().equals(editSession.getWorld().getName()))
|
||||
{
|
||||
world = server.getWorld(editSession.getWorld().getName());
|
||||
}
|
||||
List<Block> blocks = new ArrayList<>();
|
||||
|
||||
for (BlockVector3 blockVector3 : region)
|
||||
|
Loading…
Reference in New Issue
Block a user