From 1d6e778049c0dacfe4179969f9926cc3ce4a770a Mon Sep 17 00:00:00 2001 From: Andy Pover <19779808+Blitheness@users.noreply.github.com> Date: Fri, 13 Oct 2023 01:34:20 +0100 Subject: [PATCH] Replace most Easter Egg Hunt references with Treasure Hunt --- .idea/inspectionProfiles/Project_Default.xml | 6 +++ README.md | 15 +++--- pom.xml | 10 ++-- .../{easteregghunt => treasurehunt}/Hunt.java | 6 +-- .../HuntTask.java | 8 +-- .../SnowTrailListener.java | 4 +- .../TreasureHunt.java} | 50 +++++++++++++----- .../TreasureItem.java | 10 ++-- .../TreasureListener.java} | 52 +++++++++++-------- .../christmas/FestivePenguin.java | 4 +- .../christmas/Gift.java | 4 +- .../christmas/GingerbreadHouse.java | 4 +- .../christmas/GingerbreadMan.java | 4 +- .../christmas/PlateOfCookies.java | 4 +- .../christmas/ReindeerPlushy.java | 4 +- .../christmas/Snowman.java | 4 +- .../easter/BadEgg.java | 4 +- .../easter/DragonEgg.java | 4 +- .../easter/PolkaDotEgg.java | 4 +- .../easter/RainbowEgg.java | 4 +- .../easter/RegularEgg.java | 4 +- .../easter/SunflowerEgg.java | 4 +- .../easter/VioletEgg.java | 4 +- .../halloween/BloodSpider.java | 4 +- .../halloween/CarvedPumpkin.java | 4 +- .../halloween/Cupcake.java | 4 +- .../halloween/CursedMummy.java | 4 +- .../halloween/Gumballs.java | 4 +- .../halloween/SpookyPenguin.java | 4 +- .../halloween/TrickTreatBasket.java | 4 +- .../thanksgiving/HotCocoa.java | 4 +- .../thanksgiving/NutRoast.java | 4 +- .../thanksgiving/RoastDinner.java | 4 +- .../thanksgiving/Turkey.java | 4 +- src/main/resources/config.yml | 8 +-- src/main/resources/plugin.yml | 14 ++--- 36 files changed, 158 insertions(+), 125 deletions(-) create mode 100644 .idea/inspectionProfiles/Project_Default.xml rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/Hunt.java (96%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/HuntTask.java (75%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/SnowTrailListener.java (90%) rename src/main/java/us/shirecraft/{easteregghunt/EasterEggHunt.java => treasurehunt/TreasureHunt.java} (90%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/TreasureItem.java (92%) rename src/main/java/us/shirecraft/{easteregghunt/EggListener.java => treasurehunt/TreasureListener.java} (80%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/christmas/FestivePenguin.java (83%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/christmas/Gift.java (82%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/christmas/GingerbreadHouse.java (83%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/christmas/GingerbreadMan.java (83%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/christmas/PlateOfCookies.java (83%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/christmas/ReindeerPlushy.java (83%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/christmas/Snowman.java (83%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/easter/BadEgg.java (84%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/easter/DragonEgg.java (84%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/easter/PolkaDotEgg.java (85%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/easter/RainbowEgg.java (85%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/easter/RegularEgg.java (85%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/easter/SunflowerEgg.java (85%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/easter/VioletEgg.java (84%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/halloween/BloodSpider.java (83%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/halloween/CarvedPumpkin.java (83%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/halloween/Cupcake.java (83%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/halloween/CursedMummy.java (83%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/halloween/Gumballs.java (83%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/halloween/SpookyPenguin.java (83%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/halloween/TrickTreatBasket.java (84%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/thanksgiving/HotCocoa.java (82%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/thanksgiving/NutRoast.java (82%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/thanksgiving/RoastDinner.java (83%) rename src/main/java/us/shirecraft/{easteregghunt => treasurehunt}/thanksgiving/Turkey.java (82%) diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..2a835da --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/README.md b/README.md index eb9cf12..52654c2 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This plugin is provided free of charge with no guarantees that it will work, and ## Configuration options ``` -eggHuntEnabled: false +treasureHuntEnabled: false apiEndpoint: '' apikey: '' hunts: @@ -18,19 +18,20 @@ hunts: enabled: true ``` -### eggHuntEnabled -true if the plugin should attempt to initialise and start egg hunts. -false if egg hunts are globally disabled and the plugin should do nothing. +### treasureHuntEnabled +true if the plugin should attempt to initialise and start treasure hunts. +false if treasure hunts are globally disabled and the plugin should do nothing. ### apiEndpoint URL of API endpoint for keeping track of player scores, without a trailing slash. -_e.g. apiEndpoint: 'https://example.com/egg-hunt-api'_ +_e.g. apiEndpoint: 'https://example.com/treasure-hunt-api'_ The data sent in the JSON payload has the following keys: - uuid (player UUID) - name (player name) - egg (name of the item found) - region (ID of the WorldGuard region the item was found in) +- world (name of world where item was found) The 'API Key' is sent as a query parameter in the GET request to the endpoint, with a name of 'k'. @@ -39,5 +40,5 @@ Token for authenticating your game server against the score tracking API ### hunts _**World and region names must be written in lowercase letters in config.yml**_ -Tree comprising world names, and regions within those worlds where egg hunts are to be configured. -Set 'enabled' _(boolean)_ below a region name to either **true** or **false** to enable or disable an egg hunt in this region. +Tree comprising world names, and regions within those worlds where treasure hunts are to be configured. +Set 'enabled' _(boolean)_ below a region name to either **true** or **false** to enable or disable a treasure hunt in this region. diff --git a/pom.xml b/pom.xml index c0768f3..30644c4 100644 --- a/pom.xml +++ b/pom.xml @@ -5,8 +5,8 @@ 4.0.0 us.shirecraft - EasterEggHunt - 0.4.19 + TreasureHunt + 0.5.0 17 @@ -53,7 +53,7 @@ io.papermc.paper paper-api - 1.20-R0.1-SNAPSHOT + 1.20.1-R0.1-SNAPSHOT provided @@ -65,13 +65,13 @@ com.mojang authlib - 3.11.50 + 5.0.47 provided de.tr7zw item-nbt-api-plugin - 2.11.3 + 2.12.0 org.apache.httpcomponents diff --git a/src/main/java/us/shirecraft/easteregghunt/Hunt.java b/src/main/java/us/shirecraft/treasurehunt/Hunt.java similarity index 96% rename from src/main/java/us/shirecraft/easteregghunt/Hunt.java rename to src/main/java/us/shirecraft/treasurehunt/Hunt.java index 8f8c1ff..cab9466 100644 --- a/src/main/java/us/shirecraft/easteregghunt/Hunt.java +++ b/src/main/java/us/shirecraft/treasurehunt/Hunt.java @@ -1,4 +1,4 @@ -package us.shirecraft.easteregghunt; +package us.shirecraft.treasurehunt; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.math.BlockVector3; @@ -21,7 +21,7 @@ import java.util.concurrent.ExecutionException; public class Hunt { - public Hunt(EasterEggHunt plugin, World world, RegionManager regionManager, ProtectedRegion region, String huntType) { + public Hunt(TreasureHunt plugin, World world, RegionManager regionManager, ProtectedRegion region, String huntType) { this.plugin = plugin; this.world = world; this.region = region; @@ -130,7 +130,7 @@ private int getRandom(int min, int max) { private final ProtectedRegion region; private final RegionManager regionManager; private final boolean enabled; - private final EasterEggHunt plugin; + private final TreasureHunt plugin; private final Random random; private int randomPointAttempts = 0; private final int MAX_RANDOM_POINT_ATTEMPTS = 25; diff --git a/src/main/java/us/shirecraft/easteregghunt/HuntTask.java b/src/main/java/us/shirecraft/treasurehunt/HuntTask.java similarity index 75% rename from src/main/java/us/shirecraft/easteregghunt/HuntTask.java rename to src/main/java/us/shirecraft/treasurehunt/HuntTask.java index 4c91814..9cf57f8 100644 --- a/src/main/java/us/shirecraft/easteregghunt/HuntTask.java +++ b/src/main/java/us/shirecraft/treasurehunt/HuntTask.java @@ -1,16 +1,13 @@ -package us.shirecraft.easteregghunt; +package us.shirecraft.treasurehunt; import org.bukkit.scheduler.BukkitRunnable; import java.lang.reflect.InvocationTargetException; public class HuntTask extends BukkitRunnable { - - private final EasterEggHunt plugin; private final Hunt hunt; - public HuntTask(EasterEggHunt plugin, Hunt hunt) { - this.plugin = plugin; + public HuntTask(Hunt hunt) { this.hunt = hunt; } @@ -24,5 +21,4 @@ public void run() { e.printStackTrace(); } } - } \ No newline at end of file diff --git a/src/main/java/us/shirecraft/easteregghunt/SnowTrailListener.java b/src/main/java/us/shirecraft/treasurehunt/SnowTrailListener.java similarity index 90% rename from src/main/java/us/shirecraft/easteregghunt/SnowTrailListener.java rename to src/main/java/us/shirecraft/treasurehunt/SnowTrailListener.java index ed224a4..d219718 100644 --- a/src/main/java/us/shirecraft/easteregghunt/SnowTrailListener.java +++ b/src/main/java/us/shirecraft/treasurehunt/SnowTrailListener.java @@ -1,4 +1,4 @@ -package us.shirecraft.easteregghunt; +package us.shirecraft.treasurehunt; import org.bukkit.Material; import org.bukkit.entity.Snowman; @@ -8,7 +8,7 @@ import org.bukkit.event.block.EntityBlockFormEvent; public class SnowTrailListener implements Listener { - public SnowTrailListener(EasterEggHunt plugin) { + public SnowTrailListener(TreasureHunt plugin) { plugin.getServer().getPluginManager().registerEvents(this, plugin); } diff --git a/src/main/java/us/shirecraft/easteregghunt/EasterEggHunt.java b/src/main/java/us/shirecraft/treasurehunt/TreasureHunt.java similarity index 90% rename from src/main/java/us/shirecraft/easteregghunt/EasterEggHunt.java rename to src/main/java/us/shirecraft/treasurehunt/TreasureHunt.java index feebae9..b65d1e9 100644 --- a/src/main/java/us/shirecraft/easteregghunt/EasterEggHunt.java +++ b/src/main/java/us/shirecraft/treasurehunt/TreasureHunt.java @@ -1,4 +1,4 @@ -package us.shirecraft.easteregghunt; +package us.shirecraft.treasurehunt; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldguard.WorldGuard; @@ -6,7 +6,6 @@ import com.sk89q.worldguard.protection.regions.ProtectedRegion; import com.sk89q.worldguard.protection.regions.RegionContainer; import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; @@ -19,15 +18,15 @@ import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.scheduler.BukkitTask; -import us.shirecraft.easteregghunt.christmas.*; -import us.shirecraft.easteregghunt.easter.*; -import us.shirecraft.easteregghunt.halloween.*; -import us.shirecraft.easteregghunt.thanksgiving.*; +import us.shirecraft.treasurehunt.christmas.*; +import us.shirecraft.treasurehunt.easter.*; +import us.shirecraft.treasurehunt.halloween.*; +import us.shirecraft.treasurehunt.thanksgiving.*; import java.io.IOException; import java.util.*; -public class EasterEggHunt extends JavaPlugin { +public class TreasureHunt extends JavaPlugin { @Override public void onEnable() { saveDefaultConfig(); @@ -38,12 +37,12 @@ public void onEnable() { _tasks = new ArrayList<>(); // Egg hunt enabled? - if(!_config.getBoolean("eggHuntEnabled")) { + if(!_config.getBoolean("treasureHuntEnabled")) { getLogger().info("Treasure hunts globally disabled in config.yml. Plugin will disable itself."); getServer().getPluginManager().disablePlugin(this); } else { // Initialise egg hunts - new EggListener(this); + new TreasureListener(this); new SnowTrailListener(this); initialiseHunts(); } @@ -78,7 +77,11 @@ private void initialiseHunts() { if(!worlds.isEmpty()) { for (String worldName : worlds) { // For each world, get the region(s) under it - LinkedHashSet regions = (LinkedHashSet) _config.getConfigurationSection("hunts." + worldName).getKeys(false); + LinkedHashSet regions = + (LinkedHashSet) Objects.requireNonNull( + _config.getConfigurationSection("hunts." + worldName) + ) + .getKeys(false); // Find object for this world World world = getServer().getWorld(worldName); @@ -89,7 +92,7 @@ private void initialiseHunts() { if(!regions.isEmpty()) { // Get regions - LinkedHashSet regions_tmp = (LinkedHashSet) regions.clone(); + LinkedHashSet regions_tmp = new LinkedHashSet<>(regions); for (String regionName : regions_tmp) { // Check if region is enabled in config file boolean regionEnabled = _config.getBoolean("hunts." + worldName + "." + regionName + ".enabled"); @@ -203,9 +206,12 @@ private void registerEggs() { private void startEggHunts() { for (Hunt hunt : getHunts()) { - Runnable huntTask = new HuntTask(this, hunt); - _tasks.add(this.getServer().getScheduler() - .runTaskTimerAsynchronously(this, huntTask, TASK_DELAY_TICKS, TASK_INTERVAL_TICKS)); + Runnable huntTask = new HuntTask(hunt); + _tasks.add( + this.getServer() + .getScheduler() + .runTaskTimerAsynchronously(this, huntTask, TASK_DELAY_TICKS, TASK_INTERVAL_TICKS) + ); getLogger().info("Hunt started: " + hunt); } } @@ -260,6 +266,7 @@ public void sendToWebServer(Player player, final String eggType, final String re + "\"name\":\""+ playerName +"\"," + "\"egg\":\"" + eggType + "\"," + "\"region\":\"" + regionName + "\"" + + "\"world\":\"" + worldName + "\"" + "}"; String endpoint = getConfig().getString("apiEndpoint"); @@ -281,15 +288,30 @@ public void sendToWebServer(Player player, final String eggType, final String re } private FileConfiguration _config; + private WorldGuard _worldGuard; + private RegionContainer _regionContainer; + private ArrayList _hunts; + private ArrayList _tasks; + + @SuppressWarnings("FieldCanBeLocal") private HashMap, Integer> _treasure; + + @SuppressWarnings("FieldCanBeLocal") private HashMap, Float> _data; + private HashMap, Float> _balancedData; + private final int TICKS_PER_SECOND = 20; // in an ideal situation + + @SuppressWarnings("FieldCanBeLocal") private final long TASK_DELAY_TICKS = TICKS_PER_SECOND * 3; + + @SuppressWarnings("FieldCanBeLocal") private final long TASK_INTERVAL_TICKS = TICKS_PER_SECOND * 15; + private final String[] VALID_HUNT_TYPES = new String[] {"easter", "halloween", "thanksgiving", "christmas"}; } diff --git a/src/main/java/us/shirecraft/easteregghunt/TreasureItem.java b/src/main/java/us/shirecraft/treasurehunt/TreasureItem.java similarity index 92% rename from src/main/java/us/shirecraft/easteregghunt/TreasureItem.java rename to src/main/java/us/shirecraft/treasurehunt/TreasureItem.java index 8d91114..6f1cd08 100644 --- a/src/main/java/us/shirecraft/easteregghunt/TreasureItem.java +++ b/src/main/java/us/shirecraft/treasurehunt/TreasureItem.java @@ -1,4 +1,4 @@ -package us.shirecraft.easteregghunt; +package us.shirecraft.treasurehunt; import com.mojang.authlib.GameProfile; import com.mojang.authlib.properties.Property; @@ -12,7 +12,7 @@ import java.util.List; import java.util.UUID; -public class TreasureItem implements Comparable { +public class TreasureItem implements Comparable { public TreasureItem(String name, int value, int frequency) { setName(name); setValue(value); @@ -52,7 +52,7 @@ public ItemStack getItem() { _item = new ItemStack(Material.PLAYER_HEAD, 1); // Create game profile - GameProfile profile = new GameProfile(UUID.fromString(_playerUuid), null); + GameProfile profile = new GameProfile(UUID.fromString(_playerUuid), "unknown"); PropertyMap propertyMap = profile.getProperties(); if (propertyMap == null) { return _item; @@ -91,8 +91,8 @@ public String toString() { return this._name; } - public int compareTo(Object o) { - return ((TreasureItem)o)._value > this._value ? -1 : 1; + public int compareTo(TreasureItem o) { + return o._value > this._value ? -1 : 1; } private int _value; diff --git a/src/main/java/us/shirecraft/easteregghunt/EggListener.java b/src/main/java/us/shirecraft/treasurehunt/TreasureListener.java similarity index 80% rename from src/main/java/us/shirecraft/easteregghunt/EggListener.java rename to src/main/java/us/shirecraft/treasurehunt/TreasureListener.java index 6a10acb..9f3cdbd 100644 --- a/src/main/java/us/shirecraft/easteregghunt/EggListener.java +++ b/src/main/java/us/shirecraft/treasurehunt/TreasureListener.java @@ -1,9 +1,11 @@ -package us.shirecraft.easteregghunt; +package us.shirecraft.treasurehunt; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldguard.WorldGuard; import com.sk89q.worldguard.protection.regions.ProtectedRegion; import de.tr7zw.nbtapi.NBTItem; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; import org.bukkit.*; import org.bukkit.entity.*; import org.bukkit.event.EventHandler; @@ -16,40 +18,45 @@ import java.util.Objects; import java.util.Random; -public class EggListener implements Listener { - public EggListener(EasterEggHunt plugin) { +public class TreasureListener implements Listener { + public TreasureListener(TreasureHunt plugin) { this.plugin = plugin; this.random = new Random(); plugin.getServer().getPluginManager().registerEvents(this, plugin); } @EventHandler(priority = EventPriority.LOW) - public void onPlayerPickUpEgg(EntityPickupItemEvent ev) { + public void onPlayerPickUpTreasure(EntityPickupItemEvent ev) { ItemStack is = ev.getItem().getItemStack(); - if(isEasterEgg(is)) { + if(isTreasureItem(is)) { if(ev.getEntity() instanceof Player player) { NBTItem nbtItem = new NBTItem(is); String huntType = plugin.validateHuntType(nbtItem.getString("EggHuntType")); String treasureType = nbtItem.getString("TreasureType"); String regionName = nbtItem.getString("EggHuntRegion"); - Location eggLocation = ev.getItem().getLocation(); - World world = eggLocation.getWorld(); + Location treasureLocation = ev.getItem().getLocation(); + World world = treasureLocation.getWorld(); assert world != null; - var adaptedEggWorld = BukkitAdapter.adapt(world); - var adaptedEggLocation = BukkitAdapter.adapt(eggLocation).toVector().toBlockPoint(); + var adaptedTreasureWorld = BukkitAdapter.adapt(world); + var adaptedTreasureLocation = BukkitAdapter.adapt(treasureLocation).toVector().toBlockPoint(); var wgRegionContainer = WorldGuard.getInstance().getPlatform().getRegionContainer(); - var regionsEggWasFoundIn = Objects.requireNonNull(wgRegionContainer.get(adaptedEggWorld)) - .getApplicableRegions(adaptedEggLocation) + var regionsTreasureWasFoundIn = Objects.requireNonNull(wgRegionContainer.get(adaptedTreasureWorld)) + .getApplicableRegions(adaptedTreasureLocation) .getRegions() .stream() .map(ProtectedRegion::getId) .toList(); - if(!regionsEggWasFoundIn.contains(regionName)) + if(!regionsTreasureWasFoundIn.contains(regionName)) { - player.sendMessage("§4 ** Sorry, there was a problem with the treasure you found and it has not been counted."); + player.sendMessage( + Component.text( + " ** Sorry, there was a problem with the treasure you found and it has not been counted.", + NamedTextColor.DARK_RED + ) + ); ev.getItem().remove(); ev.setCancelled(true); return; @@ -60,10 +67,10 @@ public void onPlayerPickUpEgg(EntityPickupItemEvent ev) { if(getRandom(1,100) < 6 && huntType.equals("easter")) { player.sendMessage("§a ** The egg hatched before you could collect it!"); - world.spawnParticle(Particle.EXPLOSION_LARGE, eggLocation, 2); + world.spawnParticle(Particle.EXPLOSION_LARGE, treasureLocation, 2); ev.getItem().remove(); - Chicken chicken = (Chicken) world.spawnEntity(eggLocation, EntityType.CHICKEN); + Chicken chicken = (Chicken) world.spawnEntity(treasureLocation, EntityType.CHICKEN); chicken.setBaby(); chicken.setTicksLived(1); world.spawnParticle(Particle.HEART, chicken.getLocation(), 2); @@ -82,10 +89,10 @@ public void onPlayerPickUpEgg(EntityPickupItemEvent ev) { if(getRandom(1,100) < 7 && huntType.equals("halloween") && treasureType.equals("Blood Spider")) { player.sendMessage("§a ** It's... §a§lALIVE§a!"); - world.spawnParticle(Particle.EXPLOSION_LARGE, eggLocation, 2); + world.spawnParticle(Particle.EXPLOSION_LARGE, treasureLocation, 2); ev.getItem().remove(); - CaveSpider spider = (CaveSpider) world.spawnEntity(eggLocation, EntityType.CAVE_SPIDER); + CaveSpider spider = (CaveSpider) world.spawnEntity(treasureLocation, EntityType.CAVE_SPIDER); spider.setTicksLived(1); world.spawnParticle(Particle.FLASH, spider.getLocation(), 2); world.playSound(spider.getLocation(), Sound.ITEM_TRIDENT_THUNDER, 1, 1); @@ -103,10 +110,10 @@ public void onPlayerPickUpEgg(EntityPickupItemEvent ev) { if(getRandom(1,100) <= 10 && huntType.equals("christmas") && treasureType.equals("Snowman")) { player.sendMessage("§a ** The snowman sprung to life before you could collect it!"); - world.spawnParticle(Particle.SPELL_INSTANT, eggLocation, 2); + world.spawnParticle(Particle.SPELL_INSTANT, treasureLocation, 2); ev.getItem().remove(); - Location spawnSnowmanLoc = eggLocation.clone(); + Location spawnSnowmanLoc = treasureLocation.clone(); spawnSnowmanLoc.add(0, .05d, 0); Snowman snowman = (Snowman) world.spawnEntity(spawnSnowmanLoc, EntityType.SNOWMAN); @@ -136,7 +143,7 @@ public void onPlayerPickUpEgg(EntityPickupItemEvent ev) { } else { player.playNote(player.getLocation(), Instrument.XYLOPHONE, Note.sharp(1, Note.Tone.F)); - world.spawnParticle(Particle.SPELL_INSTANT, eggLocation, 5); + world.spawnParticle(Particle.SPELL_INSTANT, treasureLocation, 5); ev.getItem().remove(); plugin.sendToWebServer(player, treasureType, regionName, world.getName()); } @@ -145,7 +152,7 @@ public void onPlayerPickUpEgg(EntityPickupItemEvent ev) { } } - public boolean isEasterEgg(ItemStack is) { + public boolean isTreasureItem(ItemStack is) { if(is.getType() == Material.PLAYER_HEAD) { NBTItem nbtItem = new NBTItem(is); return nbtItem.getKeys().contains("TreasureType"); @@ -153,10 +160,11 @@ public boolean isEasterEgg(ItemStack is) { return false; } + @SuppressWarnings("SameParameterValue") private int getRandom(int min, int max) { return random.nextInt(max - min) + min; } - private final EasterEggHunt plugin; + private final TreasureHunt plugin; private final Random random; } diff --git a/src/main/java/us/shirecraft/easteregghunt/christmas/FestivePenguin.java b/src/main/java/us/shirecraft/treasurehunt/christmas/FestivePenguin.java similarity index 83% rename from src/main/java/us/shirecraft/easteregghunt/christmas/FestivePenguin.java rename to src/main/java/us/shirecraft/treasurehunt/christmas/FestivePenguin.java index 53d5537..8baa906 100644 --- a/src/main/java/us/shirecraft/easteregghunt/christmas/FestivePenguin.java +++ b/src/main/java/us/shirecraft/treasurehunt/christmas/FestivePenguin.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.christmas; +package us.shirecraft.treasurehunt.christmas; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class FestivePenguin extends TreasureItem { public FestivePenguin() { diff --git a/src/main/java/us/shirecraft/easteregghunt/christmas/Gift.java b/src/main/java/us/shirecraft/treasurehunt/christmas/Gift.java similarity index 82% rename from src/main/java/us/shirecraft/easteregghunt/christmas/Gift.java rename to src/main/java/us/shirecraft/treasurehunt/christmas/Gift.java index 7a70280..8091818 100644 --- a/src/main/java/us/shirecraft/easteregghunt/christmas/Gift.java +++ b/src/main/java/us/shirecraft/treasurehunt/christmas/Gift.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.christmas; +package us.shirecraft.treasurehunt.christmas; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class Gift extends TreasureItem { public Gift() { diff --git a/src/main/java/us/shirecraft/easteregghunt/christmas/GingerbreadHouse.java b/src/main/java/us/shirecraft/treasurehunt/christmas/GingerbreadHouse.java similarity index 83% rename from src/main/java/us/shirecraft/easteregghunt/christmas/GingerbreadHouse.java rename to src/main/java/us/shirecraft/treasurehunt/christmas/GingerbreadHouse.java index 7fa44ca..efa4fea 100644 --- a/src/main/java/us/shirecraft/easteregghunt/christmas/GingerbreadHouse.java +++ b/src/main/java/us/shirecraft/treasurehunt/christmas/GingerbreadHouse.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.christmas; +package us.shirecraft.treasurehunt.christmas; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class GingerbreadHouse extends TreasureItem { public GingerbreadHouse() { diff --git a/src/main/java/us/shirecraft/easteregghunt/christmas/GingerbreadMan.java b/src/main/java/us/shirecraft/treasurehunt/christmas/GingerbreadMan.java similarity index 83% rename from src/main/java/us/shirecraft/easteregghunt/christmas/GingerbreadMan.java rename to src/main/java/us/shirecraft/treasurehunt/christmas/GingerbreadMan.java index 6723438..8f2e9dd 100644 --- a/src/main/java/us/shirecraft/easteregghunt/christmas/GingerbreadMan.java +++ b/src/main/java/us/shirecraft/treasurehunt/christmas/GingerbreadMan.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.christmas; +package us.shirecraft.treasurehunt.christmas; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class GingerbreadMan extends TreasureItem { public GingerbreadMan() { diff --git a/src/main/java/us/shirecraft/easteregghunt/christmas/PlateOfCookies.java b/src/main/java/us/shirecraft/treasurehunt/christmas/PlateOfCookies.java similarity index 83% rename from src/main/java/us/shirecraft/easteregghunt/christmas/PlateOfCookies.java rename to src/main/java/us/shirecraft/treasurehunt/christmas/PlateOfCookies.java index 8b324b8..3cae8a3 100644 --- a/src/main/java/us/shirecraft/easteregghunt/christmas/PlateOfCookies.java +++ b/src/main/java/us/shirecraft/treasurehunt/christmas/PlateOfCookies.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.christmas; +package us.shirecraft.treasurehunt.christmas; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class PlateOfCookies extends TreasureItem { public PlateOfCookies() { diff --git a/src/main/java/us/shirecraft/easteregghunt/christmas/ReindeerPlushy.java b/src/main/java/us/shirecraft/treasurehunt/christmas/ReindeerPlushy.java similarity index 83% rename from src/main/java/us/shirecraft/easteregghunt/christmas/ReindeerPlushy.java rename to src/main/java/us/shirecraft/treasurehunt/christmas/ReindeerPlushy.java index 9d825db..1be3002 100644 --- a/src/main/java/us/shirecraft/easteregghunt/christmas/ReindeerPlushy.java +++ b/src/main/java/us/shirecraft/treasurehunt/christmas/ReindeerPlushy.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.christmas; +package us.shirecraft.treasurehunt.christmas; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class ReindeerPlushy extends TreasureItem { public ReindeerPlushy() { diff --git a/src/main/java/us/shirecraft/easteregghunt/christmas/Snowman.java b/src/main/java/us/shirecraft/treasurehunt/christmas/Snowman.java similarity index 83% rename from src/main/java/us/shirecraft/easteregghunt/christmas/Snowman.java rename to src/main/java/us/shirecraft/treasurehunt/christmas/Snowman.java index 0984aca..51f1a13 100644 --- a/src/main/java/us/shirecraft/easteregghunt/christmas/Snowman.java +++ b/src/main/java/us/shirecraft/treasurehunt/christmas/Snowman.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.christmas; +package us.shirecraft.treasurehunt.christmas; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class Snowman extends TreasureItem { public Snowman() { diff --git a/src/main/java/us/shirecraft/easteregghunt/easter/BadEgg.java b/src/main/java/us/shirecraft/treasurehunt/easter/BadEgg.java similarity index 84% rename from src/main/java/us/shirecraft/easteregghunt/easter/BadEgg.java rename to src/main/java/us/shirecraft/treasurehunt/easter/BadEgg.java index 089aded..dd623dc 100644 --- a/src/main/java/us/shirecraft/easteregghunt/easter/BadEgg.java +++ b/src/main/java/us/shirecraft/treasurehunt/easter/BadEgg.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.easter; +package us.shirecraft.treasurehunt.easter; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class BadEgg extends TreasureItem { public BadEgg() { diff --git a/src/main/java/us/shirecraft/easteregghunt/easter/DragonEgg.java b/src/main/java/us/shirecraft/treasurehunt/easter/DragonEgg.java similarity index 84% rename from src/main/java/us/shirecraft/easteregghunt/easter/DragonEgg.java rename to src/main/java/us/shirecraft/treasurehunt/easter/DragonEgg.java index df780a3..e81a7e7 100644 --- a/src/main/java/us/shirecraft/easteregghunt/easter/DragonEgg.java +++ b/src/main/java/us/shirecraft/treasurehunt/easter/DragonEgg.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.easter; +package us.shirecraft.treasurehunt.easter; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class DragonEgg extends TreasureItem { public DragonEgg() { diff --git a/src/main/java/us/shirecraft/easteregghunt/easter/PolkaDotEgg.java b/src/main/java/us/shirecraft/treasurehunt/easter/PolkaDotEgg.java similarity index 85% rename from src/main/java/us/shirecraft/easteregghunt/easter/PolkaDotEgg.java rename to src/main/java/us/shirecraft/treasurehunt/easter/PolkaDotEgg.java index 371e397..ec536c2 100644 --- a/src/main/java/us/shirecraft/easteregghunt/easter/PolkaDotEgg.java +++ b/src/main/java/us/shirecraft/treasurehunt/easter/PolkaDotEgg.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.easter; +package us.shirecraft.treasurehunt.easter; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class PolkaDotEgg extends TreasureItem { public PolkaDotEgg() { diff --git a/src/main/java/us/shirecraft/easteregghunt/easter/RainbowEgg.java b/src/main/java/us/shirecraft/treasurehunt/easter/RainbowEgg.java similarity index 85% rename from src/main/java/us/shirecraft/easteregghunt/easter/RainbowEgg.java rename to src/main/java/us/shirecraft/treasurehunt/easter/RainbowEgg.java index 0a7a924..0b7d620 100644 --- a/src/main/java/us/shirecraft/easteregghunt/easter/RainbowEgg.java +++ b/src/main/java/us/shirecraft/treasurehunt/easter/RainbowEgg.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.easter; +package us.shirecraft.treasurehunt.easter; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class RainbowEgg extends TreasureItem { public RainbowEgg() { diff --git a/src/main/java/us/shirecraft/easteregghunt/easter/RegularEgg.java b/src/main/java/us/shirecraft/treasurehunt/easter/RegularEgg.java similarity index 85% rename from src/main/java/us/shirecraft/easteregghunt/easter/RegularEgg.java rename to src/main/java/us/shirecraft/treasurehunt/easter/RegularEgg.java index d7cf268..db1eb95 100644 --- a/src/main/java/us/shirecraft/easteregghunt/easter/RegularEgg.java +++ b/src/main/java/us/shirecraft/treasurehunt/easter/RegularEgg.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.easter; +package us.shirecraft.treasurehunt.easter; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class RegularEgg extends TreasureItem { public RegularEgg() { diff --git a/src/main/java/us/shirecraft/easteregghunt/easter/SunflowerEgg.java b/src/main/java/us/shirecraft/treasurehunt/easter/SunflowerEgg.java similarity index 85% rename from src/main/java/us/shirecraft/easteregghunt/easter/SunflowerEgg.java rename to src/main/java/us/shirecraft/treasurehunt/easter/SunflowerEgg.java index 9de1bb2..f031f3c 100644 --- a/src/main/java/us/shirecraft/easteregghunt/easter/SunflowerEgg.java +++ b/src/main/java/us/shirecraft/treasurehunt/easter/SunflowerEgg.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.easter; +package us.shirecraft.treasurehunt.easter; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class SunflowerEgg extends TreasureItem { public SunflowerEgg() { diff --git a/src/main/java/us/shirecraft/easteregghunt/easter/VioletEgg.java b/src/main/java/us/shirecraft/treasurehunt/easter/VioletEgg.java similarity index 84% rename from src/main/java/us/shirecraft/easteregghunt/easter/VioletEgg.java rename to src/main/java/us/shirecraft/treasurehunt/easter/VioletEgg.java index 557943c..bba5f10 100644 --- a/src/main/java/us/shirecraft/easteregghunt/easter/VioletEgg.java +++ b/src/main/java/us/shirecraft/treasurehunt/easter/VioletEgg.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.easter; +package us.shirecraft.treasurehunt.easter; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class VioletEgg extends TreasureItem { public VioletEgg() { diff --git a/src/main/java/us/shirecraft/easteregghunt/halloween/BloodSpider.java b/src/main/java/us/shirecraft/treasurehunt/halloween/BloodSpider.java similarity index 83% rename from src/main/java/us/shirecraft/easteregghunt/halloween/BloodSpider.java rename to src/main/java/us/shirecraft/treasurehunt/halloween/BloodSpider.java index f8a8f1d..7a7ff50 100644 --- a/src/main/java/us/shirecraft/easteregghunt/halloween/BloodSpider.java +++ b/src/main/java/us/shirecraft/treasurehunt/halloween/BloodSpider.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.halloween; +package us.shirecraft.treasurehunt.halloween; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class BloodSpider extends TreasureItem { public BloodSpider() { diff --git a/src/main/java/us/shirecraft/easteregghunt/halloween/CarvedPumpkin.java b/src/main/java/us/shirecraft/treasurehunt/halloween/CarvedPumpkin.java similarity index 83% rename from src/main/java/us/shirecraft/easteregghunt/halloween/CarvedPumpkin.java rename to src/main/java/us/shirecraft/treasurehunt/halloween/CarvedPumpkin.java index 31f73e9..81298c2 100644 --- a/src/main/java/us/shirecraft/easteregghunt/halloween/CarvedPumpkin.java +++ b/src/main/java/us/shirecraft/treasurehunt/halloween/CarvedPumpkin.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.halloween; +package us.shirecraft.treasurehunt.halloween; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class CarvedPumpkin extends TreasureItem { public CarvedPumpkin() { diff --git a/src/main/java/us/shirecraft/easteregghunt/halloween/Cupcake.java b/src/main/java/us/shirecraft/treasurehunt/halloween/Cupcake.java similarity index 83% rename from src/main/java/us/shirecraft/easteregghunt/halloween/Cupcake.java rename to src/main/java/us/shirecraft/treasurehunt/halloween/Cupcake.java index becdd45..c0eec74 100644 --- a/src/main/java/us/shirecraft/easteregghunt/halloween/Cupcake.java +++ b/src/main/java/us/shirecraft/treasurehunt/halloween/Cupcake.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.halloween; +package us.shirecraft.treasurehunt.halloween; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class Cupcake extends TreasureItem { public Cupcake() { diff --git a/src/main/java/us/shirecraft/easteregghunt/halloween/CursedMummy.java b/src/main/java/us/shirecraft/treasurehunt/halloween/CursedMummy.java similarity index 83% rename from src/main/java/us/shirecraft/easteregghunt/halloween/CursedMummy.java rename to src/main/java/us/shirecraft/treasurehunt/halloween/CursedMummy.java index dfd22a6..b434aa8 100644 --- a/src/main/java/us/shirecraft/easteregghunt/halloween/CursedMummy.java +++ b/src/main/java/us/shirecraft/treasurehunt/halloween/CursedMummy.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.halloween; +package us.shirecraft.treasurehunt.halloween; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class CursedMummy extends TreasureItem { public CursedMummy() { diff --git a/src/main/java/us/shirecraft/easteregghunt/halloween/Gumballs.java b/src/main/java/us/shirecraft/treasurehunt/halloween/Gumballs.java similarity index 83% rename from src/main/java/us/shirecraft/easteregghunt/halloween/Gumballs.java rename to src/main/java/us/shirecraft/treasurehunt/halloween/Gumballs.java index ac1201f..212b295 100644 --- a/src/main/java/us/shirecraft/easteregghunt/halloween/Gumballs.java +++ b/src/main/java/us/shirecraft/treasurehunt/halloween/Gumballs.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.halloween; +package us.shirecraft.treasurehunt.halloween; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class Gumballs extends TreasureItem { public Gumballs() { diff --git a/src/main/java/us/shirecraft/easteregghunt/halloween/SpookyPenguin.java b/src/main/java/us/shirecraft/treasurehunt/halloween/SpookyPenguin.java similarity index 83% rename from src/main/java/us/shirecraft/easteregghunt/halloween/SpookyPenguin.java rename to src/main/java/us/shirecraft/treasurehunt/halloween/SpookyPenguin.java index c642efe..0ef11bd 100644 --- a/src/main/java/us/shirecraft/easteregghunt/halloween/SpookyPenguin.java +++ b/src/main/java/us/shirecraft/treasurehunt/halloween/SpookyPenguin.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.halloween; +package us.shirecraft.treasurehunt.halloween; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class SpookyPenguin extends TreasureItem { public SpookyPenguin() { diff --git a/src/main/java/us/shirecraft/easteregghunt/halloween/TrickTreatBasket.java b/src/main/java/us/shirecraft/treasurehunt/halloween/TrickTreatBasket.java similarity index 84% rename from src/main/java/us/shirecraft/easteregghunt/halloween/TrickTreatBasket.java rename to src/main/java/us/shirecraft/treasurehunt/halloween/TrickTreatBasket.java index 7479c18..ad6187b 100644 --- a/src/main/java/us/shirecraft/easteregghunt/halloween/TrickTreatBasket.java +++ b/src/main/java/us/shirecraft/treasurehunt/halloween/TrickTreatBasket.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.halloween; +package us.shirecraft.treasurehunt.halloween; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class TrickTreatBasket extends TreasureItem { public TrickTreatBasket() { diff --git a/src/main/java/us/shirecraft/easteregghunt/thanksgiving/HotCocoa.java b/src/main/java/us/shirecraft/treasurehunt/thanksgiving/HotCocoa.java similarity index 82% rename from src/main/java/us/shirecraft/easteregghunt/thanksgiving/HotCocoa.java rename to src/main/java/us/shirecraft/treasurehunt/thanksgiving/HotCocoa.java index e3589ed..b1d05c4 100644 --- a/src/main/java/us/shirecraft/easteregghunt/thanksgiving/HotCocoa.java +++ b/src/main/java/us/shirecraft/treasurehunt/thanksgiving/HotCocoa.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.thanksgiving; +package us.shirecraft.treasurehunt.thanksgiving; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class HotCocoa extends TreasureItem { public HotCocoa() { diff --git a/src/main/java/us/shirecraft/easteregghunt/thanksgiving/NutRoast.java b/src/main/java/us/shirecraft/treasurehunt/thanksgiving/NutRoast.java similarity index 82% rename from src/main/java/us/shirecraft/easteregghunt/thanksgiving/NutRoast.java rename to src/main/java/us/shirecraft/treasurehunt/thanksgiving/NutRoast.java index acca04a..ac11b36 100644 --- a/src/main/java/us/shirecraft/easteregghunt/thanksgiving/NutRoast.java +++ b/src/main/java/us/shirecraft/treasurehunt/thanksgiving/NutRoast.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.thanksgiving; +package us.shirecraft.treasurehunt.thanksgiving; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class NutRoast extends TreasureItem { public NutRoast() { diff --git a/src/main/java/us/shirecraft/easteregghunt/thanksgiving/RoastDinner.java b/src/main/java/us/shirecraft/treasurehunt/thanksgiving/RoastDinner.java similarity index 83% rename from src/main/java/us/shirecraft/easteregghunt/thanksgiving/RoastDinner.java rename to src/main/java/us/shirecraft/treasurehunt/thanksgiving/RoastDinner.java index bda68e5..45114f4 100644 --- a/src/main/java/us/shirecraft/easteregghunt/thanksgiving/RoastDinner.java +++ b/src/main/java/us/shirecraft/treasurehunt/thanksgiving/RoastDinner.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.thanksgiving; +package us.shirecraft.treasurehunt.thanksgiving; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class RoastDinner extends TreasureItem { public RoastDinner() { diff --git a/src/main/java/us/shirecraft/easteregghunt/thanksgiving/Turkey.java b/src/main/java/us/shirecraft/treasurehunt/thanksgiving/Turkey.java similarity index 82% rename from src/main/java/us/shirecraft/easteregghunt/thanksgiving/Turkey.java rename to src/main/java/us/shirecraft/treasurehunt/thanksgiving/Turkey.java index 2df2562..eee19ff 100644 --- a/src/main/java/us/shirecraft/easteregghunt/thanksgiving/Turkey.java +++ b/src/main/java/us/shirecraft/treasurehunt/thanksgiving/Turkey.java @@ -1,6 +1,6 @@ -package us.shirecraft.easteregghunt.thanksgiving; +package us.shirecraft.treasurehunt.thanksgiving; -import us.shirecraft.easteregghunt.TreasureItem; +import us.shirecraft.treasurehunt.TreasureItem; public class Turkey extends TreasureItem { public Turkey() { diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 125ad0b..58908c3 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,7 +1,7 @@ # - - - - - - - - - - - - - - # -# EasterEggHunt Configuration # +# TreasureHunt Configuration # # - - - - - - - - - - - - - - # -# --- eggHuntEnabled --- +# --- treasureHuntEnabled --- # boolean. when set to false, plugin will do nothing. # --- apiEndpoint --- # The score tracking API endpoint without a trailing slash @@ -12,7 +12,7 @@ # If this value is invalid, 'easter' will be forced. Allowed values are 'halloween', 'thanksgiving', 'christmas' and 'easter'. # Hunt type value must be in LOWER-CASE letters. # --- hunts --- -# WorldGuard regions where egg hunts are taking place. Use LOWER-CASE letters in world and region names. Timings are in seconds. +# WorldGuard regions where treasure hunts are taking place. Use LOWER-CASE letters in world and region names. Timings are in seconds. # For example, # hunts: # world_name: @@ -21,7 +21,7 @@ # friendly_name: 'Region Name' # delay: 8 -eggHuntEnabled: false +treasureHuntEnabled: false apiEndpoint: '' apiKey: '' defaultHuntType: 'easter' diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index f9dfebf..f3456dc 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,18 +1,18 @@ -main: us.shirecraft.easteregghunt.EasterEggHunt -name: EasterEggHunt -version: '0.4.19' +main: us.shirecraft.treasurehunt.TreasureHunt +name: TreasureHunt +version: '0.5.0' description: "Treasure hunt using WorldGuard regions" -api-version: 1.19 +api-version: 1.20 load: POSTWORLD author: Blitheness website: shirecraft.us depend: [NBTAPI,WorldGuard] prefix: TreasureHunt commands: - egghunt: - aliases: egg + treasurehunt: + aliases: hunt1 description: Manage the treasure hunt plugin permissions: - egghunt.manage: + treasurehunt.manage: description: Ability to start or end a hunt default: op