Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.19 Update #3

Merged
merged 5 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/maven-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will test a package using Maven

name: Maven Test

on:
push

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
java: [ '8', '11', '17' ]

name: Java ${{ matrix.java }} build
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
cache: 'maven'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn -B test --file pom.xml
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

45 changes: 25 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.dogonfire</groupId>
<artifactId>werewolf</artifactId>
<version>0.9.0</version>
<version>0.10.0</version>
<name>Werewolf</name>
<description>Werewolves in Minecraft!</description>
<url>https://github.com/DogOnFire/Werewolf</url>
Expand All @@ -16,10 +16,10 @@
</licenses>
<properties>
<jdk.version>1.8</jdk.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>${jdk.version}</maven.compiler.source>
<maven.compiler.target>${jdk.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<bukkitAPIVersion>1.17.1-R0.1-SNAPSHOT</bukkitAPIVersion>
<bukkitAPIVersion>1.19.4-R0.1-SNAPSHOT</bukkitAPIVersion>
<sonar.host.url>http://localhost:9000/</sonar.host.url>
<!--suppress UnresolvedMavenProperty -->
<sonar.dependencyCheck.reportPath>${dependency.check.report.dir}/dependency-check-report.xml
Expand All @@ -37,12 +37,12 @@
<!-- Vault repo for Vault -->
<repository>
<id>vault-repo</id>
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
<url>https://nexus.hc.to/content/repositories/pub_releases</url>
</repository>
<!-- MD_5 repo for other known plugins -->
<repository>
<id>md_5-public</id>
<url>http://repo.md-5.net/content/groups/public/</url>
<url>https://repo.md-5.net/content/groups/public/</url>
</repository>
<!-- <repository>-->
<!-- <id>robingrether-repo</id>-->
Expand All @@ -53,15 +53,20 @@
<id>dmulloy2-repo</id>
<url>https://repo.dmulloy2.net/repository/public/</url>
</repository>
<!-- Sk89q repo for Essentials, WorldEdit, etc. -->
<!-- EngineHub (prior Sk89q) repo for Essentials, WorldEdit, etc. -->
<repository>
<id>sk89q-repo</id>
<url>http://maven.sk89q.com/repo/</url>
<id>enginehub-repo</id>
<url>https://maven.enginehub.org/repo/</url>
</repository>
<!-- PlaceholderAPI repo for PlaceholderAPI -->
<repository>
<id>placeholderapi</id>
<url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url>
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
<!-- CodeMC repo for SkinsRestorer -->
<repository>
<id>codemc-releases</id>
<url>https://repo.codemc.org/repository/maven-releases/</url>
</repository>
</repositories>
<dependencies>
Expand All @@ -83,35 +88,35 @@
<dependency>
<groupId>LibsDisguises</groupId>
<artifactId>LibsDisguises</artifactId>
<version>10.0.26-SNAPSHOT</version>
<version>10.0.34</version>
<scope>provided</scope>
</dependency>
<!-- MySkin -->
<!-- SkinsRestorer API -->
<dependency>
<groupId>eu.blackfire62.myskin.bukkit</groupId>
<artifactId>MySkin</artifactId>
<version>3.3</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/MySkin.jar</systemPath>
<groupId>net.skinsrestorer</groupId>
<artifactId>skinsrestorer-api</artifactId>
<version>14.2.10</version>
<scope>provided</scope>
</dependency>
<!-- WorldGuard -->
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>7.0.7-SNAPSHOT</version>
<version>7.0.7</version>
<scope>provided</scope>
</dependency>
<!-- ProtocolLib -->
<dependency>
<groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib</artifactId>
<version>4.7.0</version>
<version>5.0.0</version>
<scope>provided</scope>
</dependency>
<!-- PlaceholderAPI -->
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.10.10</version>
<version>2.11.3</version>
<scope>provided</scope>
</dependency>
<!-- SonarQube Code Analysis -->
Expand Down
40 changes: 12 additions & 28 deletions src/com/dogonfire/werewolf/ClanManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ public enum ClanType

private HashMap<ClanType, String> werewolfTextures = new HashMap<ClanType, String>();
private HashMap<ClanType, String> werewolfTextureSignatures = new HashMap<ClanType, String>();

private String alphaTexture = "eyJ0aW1lc3RhbXAiOjE0MzQyNzgzMTczMzYsInByb2ZpbGVJZCI6ImUwZDA3NGJkNjcyMjQ3ZmM5NWQzZjI4ZTI4OTllMTU1IiwicHJvZmlsZU5hbWUiOiJXZXJld29sZkFscGhhIiwiaXNQdWJsaWMiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS9lMDMzODY5NWQwMWY0NTQ2ZmVmZGU0YzllOTVlMTRiNzgzMmExMzg3Mjc3MjQ1ZDI4MmMyOThkNzgxYmFkNTMiLCJtZXRhZGF0YSI6eyJtb2RlbCI6InNsaW0ifX19fQ==";
private String alphaTextureSignature = "KVI3HBmEn027sMbETloJRyyVjG1gf4p9+S1QmF7r3mEr2UPp+vHEjz/9+aJmOXrYfj4Xvj5xAJRJJYGc9Q5sTk+zimxTDUTRHSyk1lAy5R0fmULRspCKy7+Z7gL5MyFLB/Pcc9Jqwax/JrhH1Sj8Buq5fA4xzBQ5R1dY2yjONfuz1CYUf4jUHm+X4iEXBZ2nSKLaum6ZUf3qWSoUdV9cd3kgokN2xocm0fNwSXpOLyaaD55pbdeZJBXXiPipZKab7wQW0loWVSh+G1e931Ex/Zk3Kxeq1IszOCMBC54DYUk8MDHN+UayeiyaV3na2tgGWpWvJQtUqX57uaVKSoyUHLwYEn0D2V4lbzcJ/hDyErtJMQgclmylseB8TAuJNGF+cSVm8u5ug++bYwv2ZSb4lxXtvoqgimV+aStzE/PIwEZSHwD/rTTLd6IxV0Yak1XqasFNt08boymghCgd/JnHqbXJysPXKxQQv36A7do2rMM7fJKKhojCO400mYnfvrog8/mkqk7C+G1cMwSCzHjVLs/dk12meMS+7gVZY+2mgfoN9uYPyUk4TgpIU7XH70KFcQ2BSHPcYrS24s/XmYwrRsH7eudAuuCke60/FX5n8W2L26TXcBqHsuk/ralIh7Xgu5DF1NcPat6C61adeAMuwJfCBAScYpkDVqlqzDrtbEk=";


private FileConfiguration clansConfig = null;
private File clansConfigFile = null;
Expand Down Expand Up @@ -86,13 +82,13 @@ public void load()
this.werewolfAccountId.put(ClanType.WerewolfBite, UUID.fromString(plugin.werewolfBiteAccountUUID));
this.werewolfAccountId.put(ClanType.WildBite, UUID.fromString(plugin.wildBiteAccountUUID));

this.werewolfTextures.put(ClanType.Potion, "eyJ0aW1lc3RhbXAiOjE0MzI5MDc2Nzk1NDgsInByb2ZpbGVJZCI6IjAzOWM1M2FhNTg3MzQ0MjBhMDk1OWFmOTcxMzIxNDA4IiwicHJvZmlsZU5hbWUiOiJ4ZW9uYnVpbGRlciIsImlzUHVibGljIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTBiYTQ1YmFmY2MyNTZmNjJjYWYyYzRiNjliNjVjNzEwZjZhZmE2MDIxOTllMmIyYTMyZDlkOTdmMzJlZTAiLCJtZXRhZGF0YSI6eyJtb2RlbCI6InNsaW0ifX19fQ==");
this.werewolfTextures.put(ClanType.WerewolfBite, "eyJ0aW1lc3RhbXAiOjE0MzI5OTYxMjcxNzksInByb2ZpbGVJZCI6ImI2OGE4ZjAwN2QyNDRjNTJiNmFkMTQyM2JmYmUyNmVlIiwicHJvZmlsZU5hbWUiOiJTTV9XZXJld29sZiIsImlzUHVibGljIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGE4YmI5OWI2YTg2ZGFkOGM3NmUwNDc1OWNmNmY3MDc1OTYyN2EzMmQ0YTRjMWEzM2ZjZGQyNjZlZGMzN2M4IiwibWV0YWRhdGEiOnsibW9kZWwiOiJzbGltIn19fX0=");
this.werewolfTextures.put(ClanType.WildBite, "eyJ0aW1lc3RhbXAiOjE0MzI5MDg3NTY2MjEsInByb2ZpbGVJZCI6ImRhNTA4ZWNjZGJkOTQ2YzU4MDk1NDdiOTFhYTRmZjVmIiwicHJvZmlsZU5hbWUiOiJCTV9XZXJld29sZiIsImlzUHVibGljIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTZjNjMwZjI0YzhkMzhkNWQ0OWYzOGExN2YzNmZmNjQ4ZTZiNjgzYTRjZDU2MWIyZTM1NjU3Y2ZhIiwibWV0YWRhdGEiOnsibW9kZWwiOiJzbGltIn19fX0=");
this.werewolfTextures.put(ClanType.Potion, plugin.potionSkinValue);
this.werewolfTextures.put(ClanType.WerewolfBite, plugin.werewolfBiteSkinValue);
this.werewolfTextures.put(ClanType.WildBite, plugin.wildBiteSkinValue);

this.werewolfTextureSignatures.put(ClanType.Potion, "vN7JzBCT9Fr2sKQmk0chBLUH4qNHsFBsC09U44HOpSWvH3qFt+3lKPkctUhQuBqrM6/TOPgG9yFB3k/5LA+vW4v+pk94vSYbh/iWMUHfNHN5FSNrwIMvIk9Qr8Bn8QKIHHn2Guq4V6y1xV9eM6GM5c9mUNgdbNs3Mqp80r5Pm8L04pr69/VhB5uKRzDBVI1UrRubq6ibYJKG/cktYkakiejAnv7y8YFzWkUwBKHPcsAkj0GzbmDx1a8vgvogS+CYCqvvbHZD9Tva2/UC81N4jbdiB0Dl1zIT0FAYjkyx6DPPFoTOqV9m6DjowwA7D6cCoS29YfgHB9kUiZnbcOO9qnrCImx998v0a71an1pvmETaH9WF+5SpP0SWDWl9ccQdI9Roc1UNzzg9ueBapzsoYgQ957H2iBuWdOZVGYnhFJ1pcHrwd8c6l2dgKQ1WMABV+W3p5N6KCStAfbz25kPdmnQCY+g7wpT6q/WJ9/a0vliUH8aWqhpNoDq79w5URsTgSoQrzTDa+wvGxWW7w+D56nD2yl86gxn5ELdzTjYRr4K8ThbYUprErvFHDjACSYVW/WveMT9+diKEAcTAFsy0kNM1oUUz1sjTpuUj57UM+AzY6c4cyUak7tiDWai4O3brkRyVCLY6r8nOZXWWw69h0zabDHM+bsJDQ8+52aNbcYQ=");
this.werewolfTextureSignatures.put(ClanType.WerewolfBite, "rmVoUjl/eeoJbDV2Twh/G8/HQeTcu1my04dnfckjpLzrMhBRW9F8O2diI6x7n9BI0chB7CPa/AmnvkqBxM6RViGD3p9Iw532ddYk9Dk7/jBJ/XAMKNQfsDuyB95lgHfDyuP+DsJXsWQ4CzmUAOahhOjswtT13nKZkGRtyzpmx4GiOtVgQlgnTJyhoRU7YRu6fYAAWPMyAKtx+c8/uflRpbGoJV1BaMYp8skCoB8eoi3ylo3gUy63Zgwcqs68g68P4YNuokcHrMXs0UbjAUVFWza7tcCdKj22Rou/erQPcCbRZKofjECFSb71M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Natp3Bxrztf8=");
this.werewolfTextureSignatures.put(ClanType.Potion, plugin.potionSkinSignature);
this.werewolfTextureSignatures.put(ClanType.WerewolfBite, plugin.werewolfBiteSkinSignature);
this.werewolfTextureSignatures.put(ClanType.WildBite, plugin.wildBiteSkinSignature);

for (ClanType clan : ClanType.values())
{
Expand Down Expand Up @@ -168,12 +164,12 @@ public UUID getWerewolfAccountIdForAlpha(ClanType type)

public String getWerewolfTextureForAlpha(ClanType type)
{
return this.alphaTexture;
return plugin.alphaSkinValue;
}

public String getWerewolfTextureSignatureForAlpha(ClanType type)
{
return this.alphaTextureSignature;
return plugin.alphaSkinSignature;
}

public void handleMobKill(Player player, ClanType clanType, EntityType mobType)
Expand All @@ -190,30 +186,18 @@ public void handleMobKill(Player player, ClanType clanType, EntityType mobType)
points = 5.0D;
break;
case SKELETON:
points = 3.0D;
break;
case ENDERMAN:
points = 3.0D;
break;
case SHEEP:
points = 3.0D;
break;
case COW:
case SHEEP:
case ENDERMAN:
points = 3.0D;
break;
case SPIDER:
points = 2.0D;
break;
case ZOMBIE:
points = 2.0D;
break;
case RABBIT:
points = 1.0D;
break;
case SILVERFISH:
points = 1.0D;
break;
case CHICKEN:
case SILVERFISH:
points = 1.0D;
break;
default:
Expand Down Expand Up @@ -353,7 +337,7 @@ public UUID getAlpha(ClanType clan)
if (alphaPlayerId != null)
{
assignAlphaInClan(clan, alphaPlayerId);
}
}
}

return null;
Expand Down
Loading