Skip to content

Commit

Permalink
Updated to 1.4
Browse files Browse the repository at this point in the history
Changed to spigot plugin more support for functions.
And works perfect

Forked from https://github.com/RapahelS/ReferralDomains

He added CNAME & A RECORD support

Updated to support 1.21.1+
  • Loading branch information
noaskers committed Oct 4, 2024
1 parent f8f1b36 commit c9571f7
Show file tree
Hide file tree
Showing 21 changed files with 131 additions and 27 deletions.
7 changes: 7 additions & 0 deletions .idea/discord.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 19 additions & 12 deletions dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<groupId>me.xIdentified</groupId>
<artifactId>ReferralDomains</artifactId>
<name>ReferralDomains</name>
<version>1.3</version>
<version>1.4</version>
<build>
<defaultGoal>clean package</defaultGoal>
<resources>
<resource>
<filtering>true</filtering>
Expand All @@ -15,15 +16,15 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.11.0</version>
<configuration>
<source>11</source>
<target>11</target>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>3.5.3</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -37,8 +38,8 @@
</build>
<repositories>
<repository>
<id>papermc-repo</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>sonatype</id>
Expand All @@ -51,20 +52,26 @@
</repositories>
<dependencies>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.19.3-R0.1-SNAPSHOT</version>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.21-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.5</version>
<version>2.11.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.41.2.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
37 changes: 22 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,32 @@

<groupId>me.xIdentified</groupId>
<artifactId>ReferralDomains</artifactId>
<version>1.3</version>
<version>1.4</version>
<packaging>jar</packaging>

<name>ReferralDomains</name>

<properties>
<java.version>1.8</java.version>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<defaultGoal>clean package</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.11.0</version>
<configuration>
<source>11</source>
<target>11</target>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>3.5.3</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -51,8 +52,8 @@

<repositories>
<repository>
<id>papermc-repo</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>sonatype</id>
Expand All @@ -66,9 +67,15 @@

<dependencies>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.19.3-R0.1-SNAPSHOT</version>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.21-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.6</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -77,10 +84,10 @@
<version>20231013</version>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.5</version>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.41.2.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
</project>
Binary file added target/ReferralDomains-1.4-shaded.jar
Binary file not shown.
Binary file added target/ReferralDomains-1.4.jar
Binary file not shown.
27 changes: 27 additions & 0 deletions target/classes/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# ReferralDomains by xIdentified
# Join Discord for support - https://discord.gg/rV7emXHSjp

cloudfare-api-key: <PASTE_YOUR_KEY_HERE>
zone-id: <ZONE_ID_HERE>
server-ip: 0.0.0.0
server-port: 25565
domain: "archforge.net"
record-type: "A" # or "CNAME"
# cname-content: "dynDNS or other domain" # Domain for CNAME-Record

referrer-rewards:
- 'give {player} diamond 5'
- 'eco give {player} 1000'
- 'say Thanks for referring a friend, {player}!'
referrer-random-reward: true # if false they'll get all rewards instead

new-player-rewards:
- 'give {player} iron_ingot 10'
- 'eco give {player} 500'
- 'say Welcome to the server, {player}!'
new-player-random-reward: true

required_online_minutes: 10 # How long does the new player need to stay online before both players get rewards?
allow_same_ip_referrals: false

debug_mode: false
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
31 changes: 31 additions & 0 deletions target/classes/plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: ReferralDomains
version: '1.4'
main: me.xidentified.referraldomains.ReferralDomains
api-version: '1.19'
commands:
referral-link:
description: Generate a referral link
usage: /<command>
referralcount:
description: Check the number of players you've referred
usage: /<command>
check-domain:
description: Check the status of a player's referral domain
usage: /<command> <playerName>
remove-referral-link:
description: Delete a player's referral DNS record
usage: /<command> <playerName>
testreferral:
description: Simulate a referral for testing purposes
usage: /<command> <referrer> <referred>
permission: referral.admin
permissions:
referral.create:
description: Allows creation of referral links
default: true
referral.check:
description: Allows you to check status of a player domain
default: op
referral.admin:
description: Allows use of admin commands (remove links, etc)
default: op
3 changes: 3 additions & 0 deletions target/maven-archiver/pom.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
artifactId=ReferralDomains
groupId=me.xIdentified
version=1.4
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
me\xidentified\referraldomains\commands\CheckDomainCommand.class
me\xidentified\referraldomains\commands\ReferralLinkCommand.class
me\xidentified\referraldomains\commands\RemoveReferralCommand.class
me\xidentified\referraldomains\SQLiteStorage.class
me\xidentified\referraldomains\EventListener.class
me\xidentified\referraldomains\PlaceholderAPI.class
me\xidentified\referraldomains\ReferralDomains$1.class
me\xidentified\referraldomains\commands\ReferralCountCommand.class
me\xidentified\referraldomains\ReferralDomains.class
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
C:\Users\Sven\IdeaProjects\ReferralDomains\src\main\java\me\xidentified\referraldomains\ReferralDomains.java
C:\Users\Sven\IdeaProjects\ReferralDomains\src\main\java\me\xidentified\referraldomains\commands\CheckDomainCommand.java
C:\Users\Sven\IdeaProjects\ReferralDomains\src\main\java\me\xidentified\referraldomains\commands\ReferralLinkCommand.java
C:\Users\Sven\IdeaProjects\ReferralDomains\src\main\java\me\xidentified\referraldomains\SQLiteStorage.java
C:\Users\Sven\IdeaProjects\ReferralDomains\src\main\java\me\xidentified\referraldomains\commands\RemoveReferralCommand.java
C:\Users\Sven\IdeaProjects\ReferralDomains\src\main\java\me\xidentified\referraldomains\EventListener.java
C:\Users\Sven\IdeaProjects\ReferralDomains\src\main\java\me\xidentified\referraldomains\PlaceholderAPI.java
C:\Users\Sven\IdeaProjects\ReferralDomains\src\main\java\me\xidentified\referraldomains\commands\ReferralCountCommand.java
Binary file added target/original-ReferralDomains-1.4.jar
Binary file not shown.

0 comments on commit c9571f7

Please sign in to comment.