PC-63 and PC-64

This commit is contained in:
Shaun Bennett 2016-04-01 10:47:21 +11:00
parent da99a12b23
commit 49441cfaf4
3 changed files with 7 additions and 3 deletions

View File

@ -152,13 +152,11 @@ public abstract class Tutorial implements Listener, ObjectiveListener
@Override @Override
public void onObjectiveStart(Player player, Objective objective) public void onObjectiveStart(Player player, Objective objective)
{ {
player.playSound(player.getLocation(), Sound.NOTE_PLING, 1f, 1f);
} }
@Override @Override
public void onObjectivePlayerUpdate(Player player, Objective objective) public void onObjectivePlayerUpdate(Player player, Objective objective)
{ {
player.playSound(player.getLocation(), Sound.NOTE_PLING, 1f, 1f);
} }
private void finish(Player player) private void finish(Player player)

View File

@ -7,6 +7,7 @@ import java.util.Set;
import java.util.UUID; import java.util.UUID;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Sound;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
@ -203,6 +204,8 @@ public abstract class Objective<Plugin extends Tutorial, Data extends ObjectiveD
if (_displayFinishMessage) if (_displayFinishMessage)
Bukkit.getServer().getScheduler().runTaskLater(getJavaPlugin(), () -> showFinishMessage(player), _finishMessageDelay); Bukkit.getServer().getScheduler().runTaskLater(getJavaPlugin(), () -> showFinishMessage(player), _finishMessageDelay);
player.playSound(player.getEyeLocation(), Sound.LEVEL_UP, 1f, 1f);
customFinish(player); customFinish(player);
_listeners.forEach(listener -> listener.onObjectiveFinish(player, this)); _listeners.forEach(listener -> listener.onObjectiveFinish(player, this));

View File

@ -5,6 +5,7 @@ import java.util.Set;
import java.util.UUID; import java.util.UUID;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Sound;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
@ -122,6 +123,8 @@ public abstract class ObjectiveGoal <T extends Objective> implements Listener
Bukkit.getServer().getScheduler().runTaskLater(_objective.getJavaPlugin(), () -> displayFinishMessage(player), _finishMessageDelay); Bukkit.getServer().getScheduler().runTaskLater(_objective.getJavaPlugin(), () -> displayFinishMessage(player), _finishMessageDelay);
} }
player.playSound(player.getEyeLocation(), Sound.ORB_PICKUP, 1f, 1f);
customFinish(player); customFinish(player);
_objective.completeGoal(this, player); _objective.completeGoal(this, player);