Skip to content

Commit d3ebe39

Browse files
Preparing for next version + PartyAndFriends addon fix.
1 parent b2514c1 commit d3ebe39

File tree

5 files changed

+130
-5
lines changed

5 files changed

+130
-5
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Jaime Martínez
3+
Copyright (c) 2018 Jaime Martínez | Copyright (c) 2021 BGHDDevelopment LLC
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ You can view the resource [here](https://www.spigotmc.org/resources/55011/) and
99

1010
While you may report issues via the "Issues" tab I recommend putting them on our [Discord](https://bghddevelopment.com/discord) as it will be a faster response.
1111

12-
**Suggestions**
13-
14-
We do have a suggestions and feedback site [here](https://feedback.bghddevelopment.com) which is reviewed by project maintainers, but feel free to make a pull request to add cool features without posting there!
15-
1612
**Build**
1713
* Clone this repository
1814
* Build with maven

partyandfriendsaddon/pom.xml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.bghddevelopment.partyandfriendsaddon</groupId>
8+
<artifactId>PBServerConnector</artifactId>
9+
<version>2.3.0-SNAPSHOT</version>
10+
<packaging>jar</packaging>
11+
12+
<name>Addon</name>
13+
14+
<properties>
15+
<java.version>1.8</java.version>
16+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17+
</properties>
18+
19+
<build>
20+
<plugins>
21+
<plugin>
22+
<groupId>org.apache.maven.plugins</groupId>
23+
<artifactId>maven-compiler-plugin</artifactId>
24+
<version>3.8.1</version>
25+
<configuration>
26+
<source>${java.version}</source>
27+
<target>${java.version}</target>
28+
</configuration>
29+
</plugin>
30+
<plugin>
31+
<groupId>org.apache.maven.plugins</groupId>
32+
<artifactId>maven-shade-plugin</artifactId>
33+
<version>3.2.4</version>
34+
<executions>
35+
<execution>
36+
<phase>package</phase>
37+
<goals>
38+
<goal>shade</goal>
39+
</goals>
40+
<configuration>
41+
<createDependencyReducedPom>false</createDependencyReducedPom>
42+
</configuration>
43+
</execution>
44+
</executions>
45+
</plugin>
46+
</plugins>
47+
<resources>
48+
<resource>
49+
<directory>src/main/resources</directory>
50+
<filtering>true</filtering>
51+
</resource>
52+
</resources>
53+
</build>
54+
55+
<repositories>
56+
<repository>
57+
<id>spigotmc-repo</id>
58+
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
59+
</repository>
60+
<repository>
61+
<id>sonatype</id>
62+
<url>https://oss.sonatype.org/content/groups/public/</url>
63+
</repository>
64+
<repository>
65+
<id>simonsators Repo</id>
66+
<url>http://simonsator.de/repo</url>
67+
</repository>
68+
</repositories>
69+
70+
<dependencies>
71+
<dependency>
72+
<groupId>de.simonsator</groupId>
73+
<artifactId>BungeecordPartyAndFriends</artifactId>
74+
<version>1.0.79</version>
75+
</dependency>
76+
<dependency>
77+
<groupId>net.md-5</groupId>
78+
<artifactId>bungeecord-api</artifactId>
79+
<version>1.17-R0.1-SNAPSHOT</version>
80+
<type>jar</type>
81+
<scope>provided</scope>
82+
</dependency>
83+
<dependency>
84+
<groupId>net.md-5</groupId>
85+
<artifactId>bungeecord-api</artifactId>
86+
<version>1.17-R0.1-SNAPSHOT</version>
87+
<type>javadoc</type>
88+
<scope>provided</scope>
89+
</dependency>
90+
<dependency>
91+
<groupId>org.spigotmc</groupId>
92+
<artifactId>PlayerBalancer</artifactId>
93+
<version>2.3.0-SNAPSHOT</version>
94+
<scope>system</scope>
95+
<systemPath>${project.basedir}/release/PlayerBalancer-2.3.0.jar</systemPath>
96+
</dependency>
97+
</dependencies>
98+
</project>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.bghddevelopment.partyandfriendsaddon;
2+
import com.jaimemartz.playerbalancer.helper.PlayerLocker;
3+
import de.simonsator.partyandfriends.api.PAFExtension;
4+
import de.simonsator.partyandfriends.api.friends.ServerConnector;
5+
import de.simonsator.partyandfriends.api.pafplayers.PAFPlayerClass;
6+
import net.md_5.bungee.api.ProxyServer;
7+
import net.md_5.bungee.api.config.ServerInfo;
8+
import net.md_5.bungee.api.connection.ProxiedPlayer;
9+
10+
public class PBServerConnector extends PAFExtension implements ServerConnector {
11+
12+
/*
13+
This was updated to use the updated PartyAndFriends API and newer PlayerBalancer versions.
14+
*/
15+
16+
public void onEnable() {
17+
PAFPlayerClass.setServerConnector(this);
18+
ProxyServer.getInstance().getConsole().sendMessage("Enabled PBServerConnector connection for PlayerBalancer!");
19+
}
20+
21+
public void connect(final ProxiedPlayer pPlayer, final ServerInfo pServerInfo) {
22+
PlayerLocker.lock(pPlayer);
23+
pPlayer.connect(pServerInfo);
24+
PlayerLocker.unlock(pPlayer);
25+
}
26+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: PlayerBalancerPartyAndFriendsAddon
2+
version: ${project.version}
3+
main: com.bghddevelopment.partyandfriendsaddon.PBServerConnector
4+
depends: [PartyAndFriends, PlayerBalancer]
5+
author: BGHDDevelopmentLLC

0 commit comments

Comments
 (0)