mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 11:45: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
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
public void unlock(final Player p, boolean instant) {
|
public void unlock(final Player p, boolean instant) {
|
||||||
|
if (!instant) {
|
||||||
Slimefun.runSync(() -> {
|
Slimefun.runSync(() -> {
|
||||||
p.playSound(p.getLocation(), Sound.ENTITY_BAT_TAKEOFF, 0.7F, 1F);
|
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%"));
|
SlimefunPlugin.getLocal().sendMessage(p, "messages.research.progress", true, msg -> msg.replace("%research%", getName()).replace("%progress%", "0%"));
|
||||||
}, 10L);
|
}, 10L);
|
||||||
|
}
|
||||||
|
|
||||||
PlayerProfile.get(p, profile -> {
|
PlayerProfile.get(p, profile -> {
|
||||||
if (!profile.hasUnlocked(this)) {
|
if (!profile.hasUnlocked(this)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user