Custom mining now only works in custom mining regions

Also added Playerhead regen
This commit is contained in:
Aria 2019-09-29 06:50:30 +02:00
parent 5c608b8439
commit 4b409b6e7c
8 changed files with 159 additions and 19 deletions

View File

@ -51,6 +51,9 @@ public class Profession {
if (config.contains("on-mine")) if (config.contains("on-mine"))
MMOCore.plugin.mineManager.loadDropTables(config.getConfigurationSection("on-mine")); MMOCore.plugin.mineManager.loadDropTables(config.getConfigurationSection("on-mine"));
if (config.contains("on-mine-playerhead"))
MMOCore.plugin.mineManager.loadPHDropTables(config.getConfigurationSection("on-mine-playerhead"));
if (config.contains("alchemy-experience")) { if (config.contains("alchemy-experience")) {

View File

@ -37,12 +37,14 @@ public class BlockListener implements Listener {
*/ */
boolean customMine = MMOCore.plugin.mineManager.isEnabled(player); boolean customMine = MMOCore.plugin.mineManager.isEnabled(player);
ItemStack item = player.getInventory().getItemInMainHand(); ItemStack item = player.getInventory().getItemInMainHand();
BlockInfo info = MMOCore.plugin.mineManager.getInfo(block.getType());
if (info == null)
return;
if (customMine) { if (customMine) {
BlockInfo info = MMOCore.plugin.mineManager.getInfo(block);
if (info == null) {
event.setCancelled(true);
return;
}
/* /*
* calls the event and listen for cancel & for drops changes... also * calls the event and listen for cancel & for drops changes... also
* allows to apply tool durability & enchants to drops, etc. * allows to apply tool durability & enchants to drops, etc.
@ -98,13 +100,13 @@ public class BlockListener implements Listener {
if (drop.getType() != Material.AIR && drop.getAmount() > 0) if (drop.getType() != Material.AIR && drop.getAmount() > 0)
block.getWorld().dropItemNaturally(dropLocation, drop); block.getWorld().dropItemNaturally(dropLocation, drop);
} }
}
/* /*
* enable block regen only if custom mine is enabled. * enable block regen.
*/ */
if (customMine && info.hasRegen()) if (info.hasRegen())
MMOCore.plugin.mineManager.initialize(info.generateRegenInfo(event.getBlock().getLocation())); MMOCore.plugin.mineManager.initialize(info.generateRegenInfo(event.getBlock().getLocation()));
}
} }
@EventHandler(priority = EventPriority.HIGH) @EventHandler(priority = EventPriority.HIGH)

View File

@ -12,6 +12,7 @@ import java.util.logging.Level;
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
@ -25,9 +26,11 @@ import net.Indyuce.mmocore.api.load.MMOLineConfig;
import net.Indyuce.mmocore.api.load.MMOLoadException; import net.Indyuce.mmocore.api.load.MMOLoadException;
import net.Indyuce.mmocore.api.quest.trigger.ExperienceTrigger; import net.Indyuce.mmocore.api.quest.trigger.ExperienceTrigger;
import net.Indyuce.mmocore.api.quest.trigger.Trigger; import net.Indyuce.mmocore.api.quest.trigger.Trigger;
import net.Indyuce.mmocore.version.VersionMaterial;
public class CustomBlockManager extends MMOManager { public class CustomBlockManager extends MMOManager {
private final Map<Material, BlockInfo> map = new HashMap<>(); private final Map<Material, BlockInfo> map = new HashMap<>();
private final Map<String, BlockInfo> headmap = new HashMap<>();
private final Set<RegenInfo> active = new HashSet<>(); private final Set<RegenInfo> active = new HashSet<>();
/* /*
@ -38,18 +41,38 @@ public class CustomBlockManager extends MMOManager {
public void loadDropTables(ConfigurationSection config) { public void loadDropTables(ConfigurationSection config) {
for (String key : config.getKeys(false)) for (String key : config.getKeys(false))
try { try {
register(new BlockInfo(config.getConfigurationSection(key))); register(new BlockInfo(config.getConfigurationSection(key), false));
} catch (IllegalArgumentException exception) {
MMOCore.log(Level.WARNING, "Could not load custom block '" + key + "': " + exception.getMessage());
}
}
public void loadPHDropTables(ConfigurationSection config) {
for (String key : config.getKeys(false))
try {
register(new BlockInfo(config.getConfigurationSection(key), true));
} catch (IllegalArgumentException exception) { } catch (IllegalArgumentException exception) {
MMOCore.log(Level.WARNING, "Could not load custom block '" + key + "': " + exception.getMessage()); MMOCore.log(Level.WARNING, "Could not load custom block '" + key + "': " + exception.getMessage());
} }
} }
public void register(BlockInfo regen) { public void register(BlockInfo regen) {
map.put(regen.getBlock(), regen); if(!regen.headValue.isEmpty()) {
MMOCore.log("Reistered Head Value: " + regen.headValue);
headmap.put(regen.headValue, regen);
}
else
map.put(regen.getBlock(), regen);
} }
public BlockInfo getInfo(Material material) { public BlockInfo getInfo(Block block) {
return map.containsKey(material) ? map.get(material) : null; if(block.getType() == VersionMaterial.PLAYER_HEAD.toMaterial()) {
String skullValue = MMOCore.plugin.nms.getSkullValue(block);
return headmap.containsKey(skullValue) ? headmap.get(skullValue) : null;
}
return map.containsKey(block.getType()) ? map.get(block.getType()) : null;
} }
/* /*
@ -64,11 +87,17 @@ public class CustomBlockManager extends MMOManager {
active.add(info); active.add(info);
info.getLocation().getBlock().setType(info.getRegen().getTemporaryBlock()); info.getLocation().getBlock().setType(info.getRegen().getTemporaryBlock());
if(info.getRegen().getTemporaryBlock() == Material.PLAYER_HEAD)
MMOCore.plugin.nms.setSkullValue(info.getLocation().getBlock(), info.getRegen().regenHeadValue);
new BukkitRunnable() { new BukkitRunnable() {
public void run() { public void run() {
active.remove(info); active.remove(info);
info.getLocation().getBlock().setType(info.getRegen().getBlock()); info.getLocation().getBlock().setType(info.getRegen().getBlock());
if(info.getRegen().getBlock() == Material.PLAYER_HEAD) {
MMOCore.plugin.nms.setSkullValue(info.getLocation().getBlock(), info.getRegen().headValue);
info.getLocation().getBlock().getState().update();
}
} }
}.runTaskLater(MMOCore.plugin, info.getRegen().getRegenTime()); }.runTaskLater(MMOCore.plugin, info.getRegen().getRegenTime());
} }
@ -91,6 +120,7 @@ public class CustomBlockManager extends MMOManager {
private final Material block; private final Material block;
private final DropTable table; private final DropTable table;
private final boolean vanillaDrops; private final boolean vanillaDrops;
private final String headValue;
private final List<Trigger> triggers = new ArrayList<>(); private final List<Trigger> triggers = new ArrayList<>();
private final ExperienceTrigger experience; private final ExperienceTrigger experience;
@ -100,18 +130,22 @@ public class CustomBlockManager extends MMOManager {
*/ */
private Material temporary; private Material temporary;
private int regenTime = -1; private int regenTime = -1;
private String regenHeadValue;
public BlockInfo(ConfigurationSection config) { public BlockInfo(ConfigurationSection config, boolean isPlayerHead) {
Validate.notNull(config, "Could not load config"); Validate.notNull(config, "Could not load config");
block = Material.valueOf(config.getName().toUpperCase().replace("-", "_").replace(" ", "_")); block = isPlayerHead ? Material.PLAYER_HEAD : Material.valueOf(config.getName().toUpperCase().replace("-", "_").replace(" ", "_"));
headValue = isPlayerHead ? config.getString("head-value") : "";
table = config.contains("drop-table") ? MMOCore.plugin.dropTableManager.loadDropTable(config.get("drop-table")) : null; table = config.contains("drop-table") ? MMOCore.plugin.dropTableManager.loadDropTable(config.get("drop-table")) : null;
vanillaDrops = config.contains("vanilla-drops") ? config.getBoolean("vanilla-drops") : true; vanillaDrops = config.getBoolean("vanilla-drops", true);
if (config.contains("regen")) { if (config.contains("regen")) {
String format = config.getString("regen.temp-block"); String format = config.getString("regen.temp-block");
Validate.notNull(config, "Could not load temporary block"); Validate.notNull(config, "Could not load temporary block");
temporary = Material.valueOf(format.toUpperCase().replace("-", "_").replace(" ", "_")); temporary = isPlayerHead ? Material.PLAYER_HEAD : Material.valueOf(format.toUpperCase().replace("-", "_").replace(" ", "_"));
if(temporary == Material.PLAYER_HEAD)
regenHeadValue = config.getString("regen.head-value");
regenTime = config.getInt("regen.time"); regenTime = config.getInt("regen.time");
} }
@ -131,6 +165,10 @@ public class CustomBlockManager extends MMOManager {
experience = opt.isPresent() ? (ExperienceTrigger) opt.get() : null; experience = opt.isPresent() ? (ExperienceTrigger) opt.get() : null;
} }
public String getHeadValue() {
return headValue;
}
public boolean hasVanillaDrops() { public boolean hasVanillaDrops() {
return vanillaDrops; return vanillaDrops;
} }
@ -162,6 +200,10 @@ public class CustomBlockManager extends MMOManager {
public Material getTemporaryBlock() { public Material getTemporaryBlock() {
return temporary; return temporary;
} }
public String getRegenHeadValue() {
return regenHeadValue;
}
public RegenInfo generateRegenInfo(Location loc) { public RegenInfo generateRegenInfo(Location loc) {
return new RegenInfo(loc, this); return new RegenInfo(loc, this);
@ -223,5 +265,6 @@ public class CustomBlockManager extends MMOManager {
@Override @Override
public void clear() { public void clear() {
map.clear(); map.clear();
headmap.clear();
} }
} }

View File

@ -1,5 +1,6 @@
package net.Indyuce.mmocore.version.nms; package net.Indyuce.mmocore.version.nms;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;
@ -38,4 +39,8 @@ public interface NMSHandler {
Object newContainerAnvil(Player player); Object newContainerAnvil(Player player);
BoundingBox getBoundingBox(Entity target); BoundingBox getBoundingBox(Entity target);
String getSkullValue(Block block);
void setSkullValue(Block block, String value);
} }

View File

@ -1,14 +1,20 @@
package net.Indyuce.mmocore.version.nms; package net.Indyuce.mmocore.version.nms;
import java.util.Set; import java.util.Set;
import java.util.UUID;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer; import org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory; import org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory;
import org.bukkit.craftbukkit.v1_12_R1.inventory.CraftItemStack; import org.bukkit.craftbukkit.v1_12_R1.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_12_R1.CraftWorld;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;
import org.bukkit.util.BoundingBox; import org.bukkit.util.BoundingBox;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.Indyuce.mmocore.api.item.NBTItem; import net.Indyuce.mmocore.api.item.NBTItem;
import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.AxisAlignedBB;
import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.BlockPosition;
@ -27,6 +33,7 @@ import net.minecraft.server.v1_12_R1.PacketPlayOutCloseWindow;
import net.minecraft.server.v1_12_R1.PacketPlayOutOpenWindow; import net.minecraft.server.v1_12_R1.PacketPlayOutOpenWindow;
import net.minecraft.server.v1_12_R1.PacketPlayOutTitle; import net.minecraft.server.v1_12_R1.PacketPlayOutTitle;
import net.minecraft.server.v1_12_R1.PacketPlayOutTitle.EnumTitleAction; import net.minecraft.server.v1_12_R1.PacketPlayOutTitle.EnumTitleAction;
import net.minecraft.server.v1_12_R1.TileEntitySkull;
public class NMSHandler_1_12_R1 implements NMSHandler { public class NMSHandler_1_12_R1 implements NMSHandler {
@Override @Override
@ -182,4 +189,19 @@ public class NMSHandler_1_12_R1 implements NMSHandler {
AxisAlignedBB aabb = ((Entity) target).getBoundingBox(); AxisAlignedBB aabb = ((Entity) target).getBoundingBox();
return new BoundingBox(aabb.a, aabb.b, aabb.c, aabb.d, aabb.e, aabb.f); return new BoundingBox(aabb.a, aabb.b, aabb.c, aabb.d, aabb.e, aabb.f);
} }
@Override
public String getSkullValue(Block block) {
TileEntitySkull skullTile = (TileEntitySkull)((CraftWorld)block.getWorld()).getHandle().getTileEntity(new BlockPosition(block.getX(), block.getY(), block.getZ()));
if(skullTile.getGameProfile() == null) return "";
return skullTile.getGameProfile().getProperties().get("textures").iterator().next().getValue();
}
@Override
public void setSkullValue(Block block, String value) {
TileEntitySkull skullTile = (TileEntitySkull)((CraftWorld)block.getWorld()).getHandle().getTileEntity(new BlockPosition(block.getX(), block.getY(), block.getZ()));
GameProfile profile = new GameProfile(UUID.randomUUID(), null);
profile.getProperties().put("textures", new Property("textures", value));
skullTile.setGameProfile(profile);
}
} }

View File

@ -1,15 +1,21 @@
package net.Indyuce.mmocore.version.nms; package net.Indyuce.mmocore.version.nms;
import java.util.Set; import java.util.Set;
import java.util.UUID;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_13_R1.entity.CraftPlayer; import org.bukkit.craftbukkit.v1_13_R1.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_13_R1.event.CraftEventFactory; import org.bukkit.craftbukkit.v1_13_R1.event.CraftEventFactory;
import org.bukkit.craftbukkit.v1_13_R1.inventory.CraftItemStack; import org.bukkit.craftbukkit.v1_13_R1.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_13_R1.CraftWorld;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;
import org.bukkit.util.BoundingBox; import org.bukkit.util.BoundingBox;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.Indyuce.mmocore.api.item.NBTItem; import net.Indyuce.mmocore.api.item.NBTItem;
import net.minecraft.server.v1_13_R1.BlockPosition; import net.minecraft.server.v1_13_R1.BlockPosition;
import net.minecraft.server.v1_13_R1.Blocks; import net.minecraft.server.v1_13_R1.Blocks;
@ -26,6 +32,7 @@ import net.minecraft.server.v1_13_R1.PacketPlayOutCloseWindow;
import net.minecraft.server.v1_13_R1.PacketPlayOutOpenWindow; import net.minecraft.server.v1_13_R1.PacketPlayOutOpenWindow;
import net.minecraft.server.v1_13_R1.PacketPlayOutTitle; import net.minecraft.server.v1_13_R1.PacketPlayOutTitle;
import net.minecraft.server.v1_13_R1.PacketPlayOutTitle.EnumTitleAction; import net.minecraft.server.v1_13_R1.PacketPlayOutTitle.EnumTitleAction;
import net.minecraft.server.v1_13_R1.TileEntitySkull;
public class NMSHandler_1_13_R1 implements NMSHandler { public class NMSHandler_1_13_R1 implements NMSHandler {
@Override @Override
@ -180,4 +187,19 @@ public class NMSHandler_1_13_R1 implements NMSHandler {
public BoundingBox getBoundingBox(Entity target) { public BoundingBox getBoundingBox(Entity target) {
return target.getBoundingBox(); return target.getBoundingBox();
} }
@Override
public String getSkullValue(Block block) {
TileEntitySkull skullTile = (TileEntitySkull)((CraftWorld)block.getWorld()).getHandle().getTileEntity(new BlockPosition(block.getX(), block.getY(), block.getZ()));
if(skullTile.getGameProfile() == null) return "";
return skullTile.getGameProfile().getProperties().get("textures").iterator().next().getValue();
}
@Override
public void setSkullValue(Block block, String value) {
TileEntitySkull skullTile = (TileEntitySkull)((CraftWorld)block.getWorld()).getHandle().getTileEntity(new BlockPosition(block.getX(), block.getY(), block.getZ()));
GameProfile profile = new GameProfile(UUID.randomUUID(), null);
profile.getProperties().put("textures", new Property("textures", value));
skullTile.setGameProfile(profile);
}
} }

View File

@ -1,7 +1,10 @@
package net.Indyuce.mmocore.version.nms; package net.Indyuce.mmocore.version.nms;
import java.util.Set; import java.util.Set;
import java.util.UUID;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_13_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_13_R2.entity.CraftPlayer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_13_R2.event.CraftEventFactory; import org.bukkit.craftbukkit.v1_13_R2.event.CraftEventFactory;
import org.bukkit.craftbukkit.v1_13_R2.inventory.CraftItemStack; import org.bukkit.craftbukkit.v1_13_R2.inventory.CraftItemStack;
@ -10,6 +13,9 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;
import org.bukkit.util.BoundingBox; import org.bukkit.util.BoundingBox;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.Indyuce.mmocore.api.item.NBTItem; import net.Indyuce.mmocore.api.item.NBTItem;
import net.minecraft.server.v1_13_R2.BlockPosition; import net.minecraft.server.v1_13_R2.BlockPosition;
import net.minecraft.server.v1_13_R2.Blocks; import net.minecraft.server.v1_13_R2.Blocks;
@ -26,6 +32,7 @@ import net.minecraft.server.v1_13_R2.PacketPlayOutCloseWindow;
import net.minecraft.server.v1_13_R2.PacketPlayOutOpenWindow; import net.minecraft.server.v1_13_R2.PacketPlayOutOpenWindow;
import net.minecraft.server.v1_13_R2.PacketPlayOutTitle; import net.minecraft.server.v1_13_R2.PacketPlayOutTitle;
import net.minecraft.server.v1_13_R2.PacketPlayOutTitle.EnumTitleAction; import net.minecraft.server.v1_13_R2.PacketPlayOutTitle.EnumTitleAction;
import net.minecraft.server.v1_13_R2.TileEntitySkull;
public class NMSHandler_1_13_R2 implements NMSHandler { public class NMSHandler_1_13_R2 implements NMSHandler {
@Override @Override
@ -181,4 +188,19 @@ public class NMSHandler_1_13_R2 implements NMSHandler {
public BoundingBox getBoundingBox(Entity target) { public BoundingBox getBoundingBox(Entity target) {
return target.getBoundingBox(); return target.getBoundingBox();
} }
@Override
public String getSkullValue(Block block) {
TileEntitySkull skullTile = (TileEntitySkull)((CraftWorld)block.getWorld()).getHandle().getTileEntity(new BlockPosition(block.getX(), block.getY(), block.getZ()));
if(skullTile.getGameProfile() == null) return "";
return skullTile.getGameProfile().getProperties().get("textures").iterator().next().getValue();
}
@Override
public void setSkullValue(Block block, String value) {
TileEntitySkull skullTile = (TileEntitySkull)((CraftWorld)block.getWorld()).getHandle().getTileEntity(new BlockPosition(block.getX(), block.getY(), block.getZ()));
GameProfile profile = new GameProfile(UUID.randomUUID(), null);
profile.getProperties().put("textures", new Property("textures", value));
skullTile.setGameProfile(profile);
}
} }

View File

@ -2,7 +2,9 @@ package net.Indyuce.mmocore.version.nms;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.Set; import java.util.Set;
import java.util.UUID;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.libs.org.apache.commons.lang3.reflect.FieldUtils; import org.bukkit.craftbukkit.libs.org.apache.commons.lang3.reflect.FieldUtils;
import org.bukkit.craftbukkit.v1_14_R1.CraftWorld; import org.bukkit.craftbukkit.v1_14_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftPlayer; import org.bukkit.craftbukkit.v1_14_R1.entity.CraftPlayer;
@ -13,6 +15,9 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;
import org.bukkit.util.BoundingBox; import org.bukkit.util.BoundingBox;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.Indyuce.mmocore.api.item.NBTItem; import net.Indyuce.mmocore.api.item.NBTItem;
import net.minecraft.server.v1_14_R1.BlockPosition; import net.minecraft.server.v1_14_R1.BlockPosition;
import net.minecraft.server.v1_14_R1.ChatMessage; import net.minecraft.server.v1_14_R1.ChatMessage;
@ -30,6 +35,7 @@ import net.minecraft.server.v1_14_R1.PacketPlayOutCloseWindow;
import net.minecraft.server.v1_14_R1.PacketPlayOutOpenWindow; import net.minecraft.server.v1_14_R1.PacketPlayOutOpenWindow;
import net.minecraft.server.v1_14_R1.PacketPlayOutTitle; import net.minecraft.server.v1_14_R1.PacketPlayOutTitle;
import net.minecraft.server.v1_14_R1.PacketPlayOutTitle.EnumTitleAction; import net.minecraft.server.v1_14_R1.PacketPlayOutTitle.EnumTitleAction;
import net.minecraft.server.v1_14_R1.TileEntitySkull;
public class NMSHandler_1_14_R1 implements NMSHandler { public class NMSHandler_1_14_R1 implements NMSHandler {
@Override @Override
@ -204,4 +210,19 @@ public class NMSHandler_1_14_R1 implements NMSHandler {
public BoundingBox getBoundingBox(Entity target) { public BoundingBox getBoundingBox(Entity target) {
return target.getBoundingBox(); return target.getBoundingBox();
} }
@Override
public String getSkullValue(Block block) {
TileEntitySkull skullTile = (TileEntitySkull)((CraftWorld)block.getWorld()).getHandle().getTileEntity(new BlockPosition(block.getX(), block.getY(), block.getZ()));
if(skullTile.gameProfile == null) return "";
return skullTile.gameProfile.getProperties().get("textures").iterator().next().getValue();
}
@Override
public void setSkullValue(Block block, String value) {
TileEntitySkull skullTile = (TileEntitySkull)((CraftWorld)block.getWorld()).getHandle().getTileEntity(new BlockPosition(block.getX(), block.getY(), block.getZ()));
GameProfile profile = new GameProfile(UUID.randomUUID(), null);
profile.getProperties().put("textures", new Property("textures", value));
skullTile.setGameProfile(profile);
}
} }