22
22
import me .matsubara .realisticvillagers .tracker .VillagerTracker ;
23
23
import me .matsubara .realisticvillagers .util .ItemBuilder ;
24
24
import me .matsubara .realisticvillagers .util .PluginUtils ;
25
+ import me .matsubara .realisticvillagers .compatibility ;
25
26
import net .wesjd .anvilgui .AnvilGUI ;
26
27
import org .apache .commons .lang3 .tuple .Pair ;
27
28
import org .bukkit .*;
@@ -460,12 +461,14 @@ && cancelEquipment(player, interact)) {
460
461
461
462
npc .setProcreatingWith (playerUUID );
462
463
new BabyTask (plugin , villager , player ).runTaskTimer (plugin , 0L , 20L );
463
- } else if (isCustomItem (current , "divorce" )) {
464
+ } else if (isCustomItem (current , "divorce" ) || compatibilityManager . isMarried ( player ) ) {
464
465
// Return if it's a kid.
465
466
if (conditionNotMet (player , villager .isAdult (), Messages .Message .INTERACT_FAIL_NOT_AN_ADULT )) return ;
466
467
467
468
// Return if not married.
468
- if (conditionNotMet (player , isPartner , Messages .Message .INTERACT_FAIL_NOT_MARRIED )) return ;
469
+ if (conditionNotMet (player , isPartner || isMarriedInMarriageMaster , Messages .Message .INTERACT_FAIL_NOT_MARRIED )) return ;
470
+
471
+
469
472
470
473
// Only remove divorce papers if the villager isn't a cleric partner.
471
474
boolean hasDivorcePapers = (isPartner && villager .getProfession () == Villager .Profession .CLERIC )
@@ -486,6 +489,10 @@ && cancelEquipment(player, interact)) {
486
489
messages .send (player , npc , Messages .Message .DIVORCE_NORMAL );
487
490
}
488
491
492
+
493
+
494
+
495
+
489
496
// Divorce, remove and drop previous wedding ring.
490
497
npc .divorceAndDropRing (player );
491
498
} else if (isCustomItem (current , "combat" )) {
0 commit comments