mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Tweaked instant researching
Don't start researching when it's instant, just throw fireworks & message about completion
This commit is contained in:
parent
ce5ca5146e
commit
27a8aa6236
@ -228,10 +228,12 @@ public class Research {
|
||||
* @since 4.0
|
||||
*/
|
||||
public void unlock(final Player p, boolean instant) {
|
||||
Slimefun.runSync(() -> {
|
||||
p.playSound(p.getLocation(), Sound.ENTITY_BAT_TAKEOFF, 0.7F, 1F);
|
||||
SlimefunPlugin.getLocal().sendMessage(p, "messages.research.progress", true, msg -> msg.replace("%research%", getName()).replace("%progress%", "0%"));
|
||||
}, 10L);
|
||||
if (!instant) {
|
||||
Slimefun.runSync(() -> {
|
||||
p.playSound(p.getLocation(), Sound.ENTITY_BAT_TAKEOFF, 0.7F, 1F);
|
||||
SlimefunPlugin.getLocal().sendMessage(p, "messages.research.progress", true, msg -> msg.replace("%research%", getName()).replace("%progress%", "0%"));
|
||||
}, 10L);
|
||||
}
|
||||
|
||||
PlayerProfile.get(p, profile -> {
|
||||
if (!profile.hasUnlocked(this)) {
|
||||
|
Loading…
Reference in New Issue
Block a user