@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH) public void onPlayerFish(PlayerFishEvent event) { double amount = event.getExpToDrop(); if (amount > 0) { amount = Math.ceil(amount * SettingsYML.EXP_MULTIPLIER_FISHING); ProjectileSource projectileSource = event.getHook().getShooter(); if (projectileSource instanceof Player) { ItemStack stack = ((Player) projectileSource).getItemInHand(); int enchantmentLevel = stack.getEnchantmentLevel(Enchantment.LUCK); if (enchantmentLevel > 0L) { amount = Math.ceil(amount * (enchantmentLevel * SettingsYML.EXP_MULTIPLIER_LUCK_PER_LEVEL)); } } event.setExpToDrop((int) amount); } }
@EventHandler(priority = EventPriority.NORMAL) public void Grappler(PlayerFishEvent event) { Player player = event.getPlayer(); if(event.getState() == State.IN_GROUND) { AnniPlayer p = AnniPlayer.getPlayer(player.getUniqueId()); if(p != null && p.getKit().equals(this)) { if(isGrappleItem(player.getItemInHand())) { //event.getHook(). Location playerloc = player.getLocation(); Location loc = event.getHook().getLocation(); if (playerloc.distance(loc) < 3.0D) pullPlayerSlightly(player, loc); else pullEntityToLocation(player, loc); // Vector vec = playerloc.toVector(); // Vector vec2 = loc.toVector(); // player.setVelocity(vec2.subtract(vec).normalize().multiply(1)); player.getItemInHand().setDurability((short)0); } } } }
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onFish(PlayerFishEvent event) { if (event.getState() == PlayerFishEvent.State.CAUGHT_FISH && event.getCaught() instanceof Item) { if (!contest.hasStarted() && plugin.getConfig().getBoolean("general.no-fishing-unless-contest")) { event.setCancelled(true); String msg = plugin.getLocale().getString("no-fishing-allowed"); event.getPlayer().sendMessage(msg); return; } if (!isFishingEnabled(event)) { return; } executeFishingActions(event.getPlayer(), event); } }
private void executeFishingActions(Player catcher, PlayerFishEvent event) { CaughtFish fish = plugin.getFishManager().generateRandomFish(catcher); PlayerCatchCustomFishEvent customEvent = new PlayerCatchCustomFishEvent(catcher, fish, event); plugin.getServer().getPluginManager().callEvent(customEvent); if (customEvent.isCancelled()) { return; } boolean new1st = contest.hasStarted() && contest.isNew1st(fish); announceMessages(catcher, fish, new1st); if (fish.getRarity().hasFirework()) launchFirework(catcher.getLocation().add(0, 1, 0)); if (!fish.getCommands().isEmpty()) executeCommands(catcher, fish); if (new1st) { contest.addRecord(catcher, fish); } ItemStack itemStack = plugin.getFishManager().getItemStack(fish, event.getPlayer().getName()); Item caught = (Item) event.getCaught(); caught.setItemStack(itemStack); }
@Override public void change(Event e, Object[] delta, Changer.ChangeMode mode){ Number xp = (Number)delta[0]; Number xpNow = ((PlayerFishEvent)e).getExpToDrop(); if (mode == ChangeMode.SET) { ((PlayerFishEvent)e).setExpToDrop(xp.intValue()); } if (mode == ChangeMode.ADD) { ((PlayerFishEvent)e).setExpToDrop(xpNow.intValue() + xp.intValue()); } if (mode == ChangeMode.REMOVE) { ((PlayerFishEvent)e).setExpToDrop(xpNow.intValue() - xp.intValue()); } if (mode == ChangeMode.RESET) { ((PlayerFishEvent)e).setExpToDrop(xpNow.intValue()); } }
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onPlayerFish(PlayerFishEvent event) { if (event.getState() != PlayerFishEvent.State.CAUGHT_FISH) { return; } Player player = event.getPlayer(); NormalAchievements category; Item caughtItem = (Item) event.getCaught(); if (caughtItem.getItemStack().getType() == Material.RAW_FISH) { category = NormalAchievements.FISH; } else { category = NormalAchievements.TREASURES; } if (plugin.getDisabledCategorySet().contains(category.toString())) { return; } if (!shouldIncreaseBeTakenIntoAccount(player, category)) { return; } updateStatisticAndAwardAchievementsIfAvailable(player, category, 1); }
public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) { if (entityhuman.hookedFish != null) { int i = entityhuman.hookedFish.e(); itemstack.damage(i, entityhuman); entityhuman.ba(); } else { // CraftBukkit start EntityFishingHook hook = new EntityFishingHook(world, entityhuman); PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), null, (org.bukkit.entity.Fish) hook.getBukkitEntity(), PlayerFishEvent.State.FISHING); world.getServer().getPluginManager().callEvent(playerFishEvent); if (playerFishEvent.isCancelled()) { return itemstack; } // CraftBukkit end world.makeSound(entityhuman, "random.bow", 0.5F, 0.4F / (g.nextFloat() * 0.4F + 0.8F)); if (!world.isStatic) { world.addEntity(hook); // CraftBukkit - moved creation up } entityhuman.ba(); } return itemstack; }
public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) { if (entityhuman.hookedFish != null) { int i = entityhuman.hookedFish.c(); itemstack.damage(i, entityhuman); entityhuman.aV(); } else { // CraftBukkit start EntityFishingHook hook = new EntityFishingHook(world, entityhuman); PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), null, (org.bukkit.entity.Fish) hook.getBukkitEntity(), PlayerFishEvent.State.FISHING); world.getServer().getPluginManager().callEvent(playerFishEvent); if (playerFishEvent.isCancelled()) { return itemstack; } // CraftBukkit end world.makeSound(entityhuman, "random.bow", 0.5F, 0.4F / (f.nextFloat() * 0.4F + 0.8F)); if (!world.isStatic) { world.addEntity(hook); // CraftBukkit - moved creation up } entityhuman.aV(); } return itemstack; }
@EventHandler public void onFish(PlayerFishEvent event) { debug("PlayerFishEvent(%s, %s, %s) called", event.getCaught(), event.getState(), event.getPlayer().getName()); if (!event.getState().equals(PlayerFishEvent.State.CAUGHT_ENTITY) || event.getCaught() == null) { return; } EntityProtection protection = this.module.getProtection(event.getCaught().getUniqueId()).orElse(null); if (protection == null) { return; } if (!this.module.isAllowedToInteract(protection, event.getPlayer())) { event.setCancelled(true); // Only notify every 15 seconds Instant lastNotification = this.notifiedMap.getOrDefault(event.getPlayer().getUniqueId(), Instant.MIN); if (Duration.between(lastNotification, Instant.now()).getSeconds() > 15) { sendFailure(event.getPlayer(), "Dieses Objekt wurde von " + protection.getOwner().getName() + " gesichert und du darfst nicht damit interagieren."); this.notifiedMap.put(event.getPlayer().getUniqueId(), Instant.now()); } } }
@EventHandler public void onPlayerFishEvent(PlayerFishEvent event) { Fish hook = event.getHook(); if (event.getState() != PlayerFishEvent.State.FISHING) { boolean isBlock = false; for (int dx = -1; dx <= 1; dx++) { for (int dy = -1; dy <= 1; dy++) { for (int dz = -1; dz <= 1; dz++) { if (!RParticles.isAirlike(hook.getWorld().getBlockAt(hook.getLocation().getBlockX() + dx, hook.getLocation().getBlockY() + dy, hook.getLocation().getBlockZ() + dz))) { isBlock = true; break; } } } } try { event.getPlayer().getEquipment().getItemInMainHand().setDurability((short) 0); } catch (Exception e) { } if (isBlock) { pullEntityToLocation(event.getPlayer(), hook.getLocation()); } else { event.getPlayer().sendMessage(ChatColor.RED + "Your grapple wasn't hooked on anything."); } } }
@EventHandler public void nerfFishing(PlayerFishEvent event) { if (Config.Fishing.disableTreasure() && event.getCaught() instanceof Item) { Item caught = (Item) event.getCaught(); if (caught.getItemStack().getType() != Material.RAW_FISH) { caught.setItemStack(new ItemStack(Material.RAW_FISH)); } } }
/** * Drops cooked fish whenever a player is fishing and receives raw fish. * * @param event The event */ @EventHandler(ignoreCancelled = true) public void onPlayerFish(PlayerFishEvent event) { Entity caught = event.getCaught(); if (caught instanceof ItemStack) { ItemStack fish = (ItemStack) caught; if (fish.getType().equals(Material.RAW_FISH)) { fish.setType(Material.COOKED_FISH); } } }
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH) public void onPlayerFishEvent(PlayerFishEvent event) { Entity caught = event.getCaught(); if (caught instanceof Item) { validateIllegalEnchants(((Item) caught).getItemStack()); } }
/** * This is to cancel dragging the player closer when you reel in */ @EventHandler(priority = EventPriority.HIGHEST) private void onReelIn(PlayerFishEvent e){ if(!isSettingEnabled("cancelDraggingIn") || e.getState() != PlayerFishEvent.State.CAUGHT_ENTITY) return; e.getHook().remove(); //Nuke the bobber and don't do anything else e.setCancelled(true); }
@EventHandler public void onPlayerCatchEvent(PlayerFishEvent event){ if(event.getCaught() instanceof Item){ Item drop = (Item)event.getCaught(); drop.setItemStack(new ItemStack(Material.APPLE, 1)); } }
@SuppressWarnings("unchecked") private final static void registerExecutor() { if (registeredExecutor) return; for (final Class<? extends Event> c : new Class[] {BlockExpEvent.class, EntityDeathEvent.class, ExpBottleEvent.class, PlayerFishEvent.class}) Bukkit.getPluginManager().registerEvent(c, new Listener() {}, SkriptConfig.defaultEventPriority.value(), executor, Skript.getInstance(), true); }
@EventHandler(priority = EventPriority.NORMAL) public void onFishOn(PlayerFishEvent event) { if (tournament.isInProgress()) { Entity theCatch = event.getCaught(); if (theCatch instanceof Item) { tournament.addCatchToPlayer(event.getPlayer()); } } }
private boolean isFishingEnabled(PlayerFishEvent event) { // Check if the world hasn't disabled if (plugin.getConfig().getStringList("general.contest-disabled-worlds") .contains(event.getPlayer().getWorld().getName())) return false; // Check if the contest is ongoing if (plugin.getConfig().getBoolean("general.only-for-contest") && !contest.hasStarted()) return false; // Check if the caught is fish return (!plugin.getConfig().getBoolean("general.replace-only-fish") || ((Item) event.getCaught()).getItemStack().getType() == Material.RAW_FISH); }
@EventHandler(ignoreCancelled = true) public void disableFishingRodPull(PlayerFishEvent e) { if (e.getCaught() instanceof Player && config.checkEnabled(Config.Node.FISHING_HOOK, e.getCaught().getLocation())) { final Player shooter = e.getPlayer(); Player caught = (Player) e.getCaught(); if (!shooter.equals(caught) && !helper.isPvPAllowed(shooter, caught)) { final int heldSlot = shooter.getInventory().getHeldItemSlot(); shooter.getInventory().setHeldItemSlot((heldSlot + 1) % 9); Bukkit.getScheduler().runTaskLater(WorldGuardFix.getInstance(), new Runnable() { @Override public void run() { shooter.getInventory().setHeldItemSlot(heldSlot); } }, 2L); e.setCancelled(true); shooter.sendMessage(ChatColor.RED.toString() + ChatColor.BOLD + "Hey!" + ChatColor.GRAY + " Sorry, but you can't PvP here."); } } }
public boolean init(Expression<?>[] args, int arg1, Kleenean arg2, SkriptParser.ParseResult arg3) { if (!ScriptLoader.isCurrentEvent(PlayerFishEvent.class)) { Skript.error("You can not use Get XP expression in any event but 'on fishing:' event!"); return false; } return true; }
public boolean init(Expression<?>[] args, int arg1, Kleenean arg2, SkriptParser.ParseResult arg3) { if (!ScriptLoader.isCurrentEvent(PlayerFishEvent.class)) { Skript.error("You can not use Get Hook expression in any event but 'on fishing:' event!"); return false; } return true; }
public boolean init(Expression<?>[] args, int arg1, Kleenean arg2, SkriptParser.ParseResult arg3) { if (!ScriptLoader.isCurrentEvent(PlayerFishEvent.class)) { Skript.error("You can not use Get Caught expression in any event but 'on fishing:' event!"); return false; } return true; }
public boolean init(Expression<?>[] args, int arg1, Kleenean arg2, SkriptParser.ParseResult arg3) { if (!ScriptLoader.isCurrentEvent(PlayerFishEvent.class)) { Skript.error("You can not use Fishing State expression in any event but 'on fishing:' event!"); return false; } return true; }
public void cancelSameTeam(PlayerFishEvent e) { if (e.getCaught() instanceof Player) { Player damager = e.getPlayer(); Player player = (Player) e.getCaught(); TeamId playerTeam = plugin.pm.getTeamId(player); TeamId damagerTeam = plugin.pm.getTeamId(damager); if (playerTeam == damagerTeam) { e.setCancelled(true); } } }
public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) { if (entityhuman.hookedFish != null) { int i = entityhuman.hookedFish.e(); itemstack.damage(i, entityhuman); entityhuman.ba(); } else { // CraftBukkit start EntityFishingHook hook = new EntityFishingHook(world, entityhuman); PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), null, (org.bukkit.entity.Fish) hook.getBukkitEntity(), PlayerFishEvent.State.FISHING); world.getServer().getPluginManager().callEvent(playerFishEvent); if (playerFishEvent.isCancelled()) { entityhuman.hookedFish = null; return itemstack; } // CraftBukkit end world.makeSound(entityhuman, "random.bow", 0.5F, 0.4F / (g.nextFloat() * 0.4F + 0.8F)); if (!world.isStatic) { world.addEntity(hook); // CraftBukkit - moved creation up } entityhuman.ba(); } return itemstack; }
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { if (p_77659_3_.fishEntity != null) { int i = p_77659_3_.fishEntity.func_146034_e(); p_77659_1_.damageItem(i, p_77659_3_); p_77659_3_.swingItem(); } else { // CraftBukkit start EntityFishHook hook = new EntityFishHook(p_77659_2_, p_77659_3_); PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) p_77659_3_.getBukkitEntity(), null, (org.bukkit.entity.Fish) hook.getBukkitEntity(), PlayerFishEvent.State.FISHING); p_77659_2_.getServer().getPluginManager().callEvent(playerFishEvent); if (playerFishEvent.isCancelled()) { return p_77659_1_; } // CraftBukkit end p_77659_2_.playSoundAtEntity(p_77659_3_, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); if (!p_77659_2_.isRemote) { p_77659_2_.spawnEntityInWorld(hook); // CraftBukkit - moved creation up } p_77659_3_.swingItem(); } return p_77659_1_; }
/** * Monitor PlayerFishEvents. * <p> * These events are monitored for the purpose of handling the various * Fishing skills and abilities. * * @param event The event to monitor */ @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onPlayerFishMonitor(PlayerFishEvent event) { Player player = event.getPlayer(); if (!UserManager.hasPlayerDataKey(player) || !SkillType.FISHING.getPermissions(player)) { return; } FishingManager fishingManager = UserManager.getPlayer(player).getFishingManager(); Entity caught = event.getCaught(); switch (event.getState()) { case FISHING: if (fishingManager.canMasterAngler()) { fishingManager.masterAngler(event.getHook()); } return; case CAUGHT_FISH: fishingManager.handleFishing((Item) caught); return; case CAUGHT_ENTITY: if (fishingManager.canShake(caught)) { fishingManager.shakeCheck((LivingEntity) caught); } return; default: return; } }
@EventHandler public void onCatch(final PlayerFishEvent event) { if (!(event.getCaught() instanceof Item)) return; final Item caught = (Item)event.getCaught(); final ItemStack item = caught.getItemStack(); if (!Enchantments.getAllEnchantments(item).isEmpty()) { Enchantments.removeAllEnchantments(item); mechanics.generateEnchantments(event.getPlayer(), item, bookLevel, false, random.nextLong()) .getEnchantments().forEach((enchant, level) -> enchant.addToItem(item, level)); caught.setItemStack(item); } }
@EventHandler(priority = EventPriority.LOW) public void onPlayerFish(PlayerFishEvent event) { if (event.getState() == PlayerFishEvent.State.CAUGHT_FISH) { event.getCaught().remove(); int roll = random.nextInt(101); if (roll > (100 - (getFishingConfig().getInt("chance") + 1))) { event.getPlayer().sendMessage(ChatColor.YELLOW + "The caught fish looks a bit off..."); } else { roll = random.nextInt(fish.size() + 1); event.getPlayer().getWorld().dropItemNaturally(event.getHook().getLocation(), fish.get(roll)).setVelocity(reelVelocity(event.getPlayer(), event.getHook())); } } }
public InteractionResultWrapper<ItemStack> a(ItemStack itemstack, World world, EntityHuman entityhuman, EnumHand enumhand) { if (entityhuman.hookedFish != null) { int i = entityhuman.hookedFish.j(); itemstack.damage(i, entityhuman); entityhuman.a(enumhand); } else { // CraftBukkit start EntityFishingHook hook = new EntityFishingHook(world, entityhuman); PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), null, (org.bukkit.entity.Fish) hook.getBukkitEntity(), PlayerFishEvent.State.FISHING); world.getServer().getPluginManager().callEvent(playerFishEvent); if (playerFishEvent.isCancelled()) { entityhuman.hookedFish = null; return new InteractionResultWrapper(EnumInteractionResult.PASS, itemstack); } // CraftBukkit end world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.H, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.j.nextFloat() * 0.4F + 0.8F)); if (!world.isClientSide) { world.addEntity(hook); // CraftBukkit - moved creation up } entityhuman.a(enumhand); entityhuman.b(StatisticList.b((Item) this)); } return new InteractionResultWrapper(EnumInteractionResult.SUCCESS, itemstack); }
@EventHandler public void onPlayerFish(PlayerFishEvent event) { Player p = event.getPlayer(); ArenaManager am = SimpleSurvivalGames.instance.getArenaManager(); // Is the current player playing if(am.isInArena(p)) { ArenaPlayer ap = am.getPlayer(p); // Is the player in the lobby of the arena if(ap.isInLobby()) { // Has the player a arena spawn assigned if(ap.hasAssignedAreanSpawn()) { // Cancel the event and send a status message event.setCancelled(true); p.sendMessage(ChatColor.DARK_RED + "You can't fish inside the lobby of an arena!"); } } // Is the player an spectators if(ap.isSpectator()) { event.setCancelled(true); ap.sendMessage(ChatColor.DARK_RED + "You can't fish while spectating!"); } } }
@Test public void shouldHandleSimpleCancelableEvents() { withServiceMock(listenerService) .check(listener::onPlayerShear, PlayerShearEntityEvent.class) .check(listener::onPlayerFish, PlayerFishEvent.class) .check(listener::onPlayerBedEnter, PlayerBedEnterEvent.class) .check(listener::onPlayerDropItem, PlayerDropItemEvent.class) .check(listener::onPlayerHitPlayerEvent, EntityDamageByEntityEvent.class) .check(listener::onPlayerConsumeItem, PlayerItemConsumeEvent.class) .check(listener::onPlayerInteract, PlayerInteractEvent.class) .check(listener::onPlayerPickupItem, PlayerPickupItemEvent.class) .check(listener::onPlayerInteractEntity, PlayerInteractEntityEvent.class); }
public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) { if (entityhuman.hookedFish != null) { int i = entityhuman.hookedFish.c(); itemstack.damage(i, entityhuman); entityhuman.bK(); } else { // CraftBukkit start EntityFishingHook hook = new EntityFishingHook(world, entityhuman); PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), null, (org.bukkit.entity.Fish) hook.getBukkitEntity(), PlayerFishEvent.State.FISHING); world.getServer().getPluginManager().callEvent(playerFishEvent); if (playerFishEvent.isCancelled()) { return itemstack; } // CraftBukkit end world.makeSound(entityhuman, "random.bow", 0.5F, 0.4F / (e.nextFloat() * 0.4F + 0.8F)); if (!world.isStatic) { world.addEntity(hook); // CraftBukkit - moved creation up } entityhuman.bK(); } return itemstack; }
@EventHandler public void onFish(PlayerFishEvent e) { Player p = e.getPlayer(); if (!RUtils.isInInfectedWorld(p)) return; e.setExpToDrop(0); PConfManager pcm = PConfManager.getPConfManager(p); float thirst = pcm.getFloat("thirst"); if (!pcm.isSet("thirst")) { thirst = 1F; pcm.set("thirst", thirst); } p.setExp(thirst); }
public PlayerCatchCustomFishEvent(Player who, CaughtFish fish, PlayerFishEvent fishEvent) { super(who); this.fish = fish; this.fishEvent = fishEvent; }
public PlayerFishEvent getPlayerFishEvent() { return fishEvent; }
@EventHandler public void onPlayerFish(PlayerFishEvent e) { if (e.getState() != PlayerFishEvent.State.CAUGHT_FISH) { return; } if (!QuestManagerPlugin.questManagerPlugin.getPluginConfiguration().getWorlds() .contains(e.getPlayer().getWorld().getName())) { return; } //e.setCancelled(true); e.getCaught().remove(); QuestPlayer qp = QuestManagerPlugin.questManagerPlugin.getPlayerManager().getPlayer(e.getPlayer()); int level = qp.getSkillLevel(this); FishRecord record = getFish(level, e.getHook().getLocation()); if (record == null) { e.getPlayer().sendMessage(BAD_RANGE_MESSAGE); return; } FishEvent event = new FishEvent(qp, new QualityItem(record.icon), record.difficulty); Bukkit.getPluginManager().callEvent(event); if (event.isCancelled()) { return; } int deltaDifficulty = Math.max(0, record.difficulty - level); double obstacleTime, obstacleDeviation, completionTime; int rows, amount; float reelDifficulty, reelDeviation; obstacleTime = baseObstacleDifficulty + (deltaDifficulty * obstacleDifficultyRate); obstacleDeviation = baseObstacleDeviation; completionTime = baseTimePerDifficulty * record.difficulty; rows = (int) Math.min(5, Math.max(1, 1 + ((int) record.difficulty / (int) difficultyPerRow))); amount = 1 + (int) Math.floor(extraFishPerLevel * Math.max(level - record.difficulty, 0)); reelDifficulty = baseReelDifficulty + (reelDifficultyRate * deltaDifficulty); reelDeviation = baseReelDeviation; ////////Modifer Code - Move to eventhandler if mechs moved out of skill///////// event.setObstacleDifficultyModifier(event.getObstacleDifficultyModifier() - (obstacleDifficultyDiscount * level)); event.setReelDifficultyModifier(event.getReelDifficultyModifier() - (reelDifficultyDiscount * level)); event.setTimeModifier(event.getTimeModifier() - (timeDiscount * level)); event.setQualityModifier(event.getQualityModifier() + (level * qualityRate)); //////////////////////////////////////////////////////////////////////////////// //apply modifiers obstacleTime *= event.getObstacleDifficultyModifier(); obstacleDeviation *= event.getObstacleDeviationModifier(); completionTime *= event.getTimeModifier(); reelDifficulty *= event.getReelDifficultyModifier(); reelDeviation *= event.getReelDeviationModifier(); QualityItem reward = new QualityItem(record.icon.clone()); reward.getUnderlyingItem().setAmount(amount); reward.setQuality(reward.getQuality() * event.getQualityModifier()); FishingGui gui = new FishingGui(e.getPlayer(), reward, record.difficulty, rows, reelDifficulty, reelDeviation, letRate, obstacleTime, obstacleDeviation, completionTime); InventoryMenu menu = new InventoryMenu(qp, gui); QuestManagerPlugin.questManagerPlugin.getInventoryGuiHandler().showMenu(e.getPlayer(), menu); gui.start(); }