!factions support

This commit is contained in:
Indyuce 2022-01-21 23:14:34 +01:00
parent 8f37b7bbfb
commit f68ae70690
2 changed files with 83 additions and 18 deletions

76
pom.xml
View File

@ -114,21 +114,7 @@
<scope>provided</scope>
</dependency>
<!-- Public repos -->
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.9.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.lumine</groupId>
<artifactId>MythicLib-dist</artifactId>
<version>1.3-R17</version>
<scope>provided</scope>
</dependency>
<!-- Extra libs -->
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
@ -142,6 +128,21 @@
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
<scope>provided</scope>
</dependency>
<!-- Plugin dependencies -->
<dependency>
<groupId>io.lumine</groupId>
<artifactId>MythicLib-dist</artifactId>
<version>1.3-R17</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.lumine</groupId>
<artifactId>MythicMobs-Dist</artifactId>
@ -150,9 +151,9 @@
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.9.2</version>
<scope>provided</scope>
</dependency>
@ -177,5 +178,44 @@
<scope>provided</scope>
</dependency>
<!-- Party plugins -->
<dependency>
<groupId>de.simonsator</groupId>
<artifactId>PartyAndFriends</artifactId>
<version>1.0.65</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.alessiodp</groupId>
<artifactId>Parties</artifactId>
<version>3.1.14</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.gmail.nossr50</groupId>
<artifactId>mcMMO</artifactId>
<version>2.1.209</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>de.erethon</groupId>
<artifactId>DungeonsXL</artifactId>
<version>0.18-PRE-02</version>
<scope>provided</scope>
</dependency>
<!-- Guild plugins -->
<dependency>
<groupId>com.massivecraft</groupId>
<artifactId>Factions</artifactId>
<version>1.6.9.5-2.9.8-RC</version>
<scope>provided</scope>
</dependency>
<!-- Quest plugins -->
</dependencies>
</project>

View File

@ -0,0 +1,25 @@
package net.Indyuce.mmocore.guild.compat;
import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.FPlayers;
import com.massivecraft.factions.Faction;
import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.guild.AbstractGuild;
import net.Indyuce.mmocore.guild.GuildModule;
public class FactionsGuildModule implements GuildModule {
@Override
public AbstractGuild getGuild(PlayerData playerData) {
FPlayer fPlayer = FPlayers.getInstance().getByPlayer(playerData.getPlayer());
return new CustomGuild(fPlayer.getFaction());
}
class CustomGuild implements AbstractGuild {
private final Faction faction;
CustomGuild(Faction faction) {
this.faction = faction;
}
}
}