Use method references.

This commit is contained in:
tastybento 2024-03-10 22:36:42 -07:00
parent 1c4be17690
commit 253e5d7101
1 changed files with 4 additions and 4 deletions

View File

@ -78,14 +78,14 @@ public class BlueprintClipboard {
public BlueprintClipboard(@NonNull Blueprint blueprint) {
this.blueprint = blueprint;
// MythicMobs
mmh = plugin.getHooks().getHook("MythicMobs").filter(hook -> hook instanceof MythicMobsHook)
.map(h -> (MythicMobsHook) h);
mmh = plugin.getHooks().getHook("MythicMobs").filter(MythicMobsHook.class::isInstance)
.map(MythicMobsHook.class::cast);
}
public BlueprintClipboard() {
// MythicMobs
mmh = plugin.getHooks().getHook("MythicMobs").filter(hook -> hook instanceof MythicMobsHook)
.map(h -> (MythicMobsHook) h);
mmh = plugin.getHooks().getHook("MythicMobs").filter(MythicMobsHook.class::isInstance)
.map(MythicMobsHook.class::cast);
}
/**