-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
813c8a2
commit ba4f7a4
Showing
12 changed files
with
130 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/main/java/net/permutated/pylons/compat/teams/FTBTeamSupport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package net.permutated.pylons.compat.teams; | ||
|
||
import dev.ftb.mods.ftbteams.FTBTeamsAPI; | ||
|
||
import java.util.UUID; | ||
|
||
public class FTBTeamSupport implements TeamSupport { | ||
@Override | ||
public boolean arePlayersInSameTeam(UUID player1, UUID player2) { | ||
return FTBTeamsAPI.arePlayersInSameTeam(player1, player2); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/net/permutated/pylons/compat/teams/NoTeamSupport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package net.permutated.pylons.compat.teams; | ||
|
||
import java.util.UUID; | ||
|
||
public class NoTeamSupport implements TeamSupport { | ||
@Override | ||
public boolean arePlayersInSameTeam(UUID player1, UUID player2) { | ||
return false; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/net/permutated/pylons/compat/teams/TeamCompat.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package net.permutated.pylons.compat.teams; | ||
|
||
import net.minecraftforge.fml.ModList; | ||
|
||
public class TeamCompat { | ||
private TeamCompat() { | ||
// nothing to do | ||
} | ||
private static TeamSupport instance = new NoTeamSupport(); | ||
public static TeamSupport getInstance() { | ||
return instance; | ||
} | ||
|
||
public static void init() { | ||
if (ModList.get().isLoaded("ftbteams")) { | ||
instance = new FTBTeamSupport(); | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/net/permutated/pylons/compat/teams/TeamSupport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package net.permutated.pylons.compat.teams; | ||
|
||
import java.util.UUID; | ||
|
||
public interface TeamSupport { | ||
boolean arePlayersInSameTeam(UUID player1, UUID player2); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters