Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
46ac8e9
ty Paper
Diamondback88 May 12, 2024
2a05adb
Update mapping of plugin
UnknownSilicon May 19, 2024
0b9db81
Update to 1.20.6
UnknownSilicon May 19, 2024
709ffac
Update shadow config
UnknownSilicon May 19, 2024
b60af51
Bump plugin versions
UnknownSilicon May 24, 2024
f79fd14
Fix reflection errors
UnknownSilicon May 24, 2024
3120762
Bump parallelitems
UnknownSilicon May 24, 2024
b361ffa
Merge branch 'point-system' into 1.20.6
UnknownSilicon May 25, 2024
6441863
Update parallelitems
UnknownSilicon May 25, 2024
1d0d628
Merge pull request #83 from ParallelMC/1.20.6
Diamondback88 Aug 11, 2024
4131765
Merge pull request #84 from ParallelMC/staging
Diamondback88 Aug 11, 2024
a226441
Shiba Inu size modification code
Diamondback88 Aug 11, 2024
137e415
Merge pull request #85 from ParallelMC/1.20.6
Diamondback88 Aug 11, 2024
1087d54
Merge branch 'staging' into main
Diamondback88 Aug 11, 2024
d57624d
Merge pull request #87 from ParallelMC/main
Diamondback88 Aug 11, 2024
448f37f
Merge pull request #88 from ParallelMC/staging
Diamondback88 Aug 11, 2024
4475907
Initial 1.21.1 updates
Diamondback88 Aug 11, 2024
d7f0444
Merge pull request #89 from ParallelMC/1.21.1
Diamondback88 Oct 26, 2024
7ac42ad
Fix ProtocolLib not building
Diamondback88 Oct 26, 2024
d6deb90
Enchantment temp fixes, this has to be permanently fixed soon
Diamondback88 Oct 26, 2024
38573e1
Merge pull request #90 from ParallelMC/enchantment-temp-fixes
Diamondback88 Oct 26, 2024
2fd0978
Initial 1.21.3 code
Diamondback88 Nov 9, 2024
730665d
Merge pull request #91 from ParallelMC/main
Diamondback88 Nov 14, 2024
dd9edea
Add config toggle for speedy minecarts
Diamondback88 Nov 29, 2024
6a6041f
Merge pull request #95 from ParallelMC/staging
Diamondback88 Dec 10, 2024
ab6499d
Merge branch 'staging' into 1.21.3
Diamondback88 Dec 10, 2024
2823ef4
Merge pull request #94 from ParallelMC/1.21.3
Diamondback88 Dec 10, 2024
01ad597
Merge branch 'main' into staging
Diamondback88 Dec 10, 2024
4fbce42
Merge pull request #96 from ParallelMC/staging
Diamondback88 Dec 10, 2024
a06ba18
Fix point msg if player only gets 1 point
Diamondback88 Dec 10, 2024
9b92265
Merge pull request #97 from ParallelMC/points-msg-fix
Diamondback88 Dec 10, 2024
ec5e2ec
Merge pull request #98 from ParallelMC/staging
Diamondback88 Dec 10, 2024
f0377b8
Merge pull request #100 from ParallelMC/main
Diamondback88 Dec 17, 2024
5ea2fab
Merge pull request #101 from ParallelMC/staging
Diamondback88 Dec 17, 2024
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
21 changes: 12 additions & 9 deletions api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import io.papermc.paperweight.userdev.ReobfArtifactConfiguration

plugins {
id 'net.minecrell.plugin-yml.bukkit'
Expand All @@ -7,13 +8,15 @@ plugins {

group = 'org.parallelmc'

version = '4.4.0'
version = '4.5.0'
description = 'A set of utilities and features for use on the Parallel Minecraft server'

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}

paperweight.reobfArtifactConfiguration = ReobfArtifactConfiguration.getMOJANG_PRODUCTION()

compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
processResources.filteringCharset = "UTF-8"
Expand All @@ -25,17 +28,17 @@ repositories {

dependencies {
//compileOnly 'io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT'
paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.20.6-R0.1-SNAPSHOT")
paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.21.3-R0.1-SNAPSHOT")

implementation 'org.jetbrains:annotations:24.0.1'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
implementation 'net.dv8tion:JDA:5.0.0-beta.20'
compileOnly 'me.clip:placeholderapi:2.11.5'
implementation 'net.dv8tion:JDA:5.0.0-beta.24'
compileOnly 'me.clip:placeholderapi:2.11.6'
compileOnly fileTree('libs') { include '*.jar' }
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.9'
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.12'
implementation 'com.mysql:mysql-connector-j:8.3.0'
compileOnly 'com.comphenix.protocol:ProtocolLib:5.1.0'
compileOnly 'dev.esophose:playerparticles:8.5'
compileOnly 'com.comphenix.protocol:ProtocolLib:5.3.0'
compileOnly 'dev.esophose:playerparticles:8.7'
implementation 'org.reflections:reflections:0.10.2'
}

Expand All @@ -46,11 +49,11 @@ artifacts {

tasks {
assemble {
dependsOn(reobfJar)
//dependsOn(reobfJar)
}

build {
dependsOn(reobfJar)
//dependsOn(reobfJar)
}

compileJava {
Expand Down
18 changes: 11 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
import io.papermc.paperweight.userdev.ReobfArtifactConfiguration

plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id "io.papermc.paperweight.userdev" version "1.7.1"
id "xyz.jpenilla.run-paper" version "2.3.0"
id 'io.github.goooler.shadow' version '8.1.7'
id "io.papermc.paperweight.userdev" version "1.7.4"
id "xyz.jpenilla.run-paper" version "2.3.1"
id 'net.minecrell.plugin-yml.bukkit' version '0.6.0'
}

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}

paperweight.reobfArtifactConfiguration = ReobfArtifactConfiguration.getMOJANG_PRODUCTION()

dependencies {
paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.20.6-R0.1-SNAPSHOT")
paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.21.3-R0.1-SNAPSHOT")
}

compileJava.options.encoding = "UTF-8"
Expand All @@ -20,7 +24,7 @@ processResources.filteringCharset = "UTF-8"

allprojects {
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'io.github.goooler.shadow'
apply plugin: "io.papermc.paperweight.userdev"

repositories {
Expand All @@ -38,12 +42,12 @@ allprojects {
}

dependencies {
paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.20.6-R0.1-SNAPSHOT")
paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.21.3-R0.1-SNAPSHOT")
//paperweight.paperDevBundle("1.20.6-R0.1-SNAPSHOT")

//compileOnly "io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT"
compileOnly 'net.luckperms:api:5.4'
compileOnly 'dev.esophose:playerparticles:8.5'
compileOnly 'dev.esophose:playerparticles:8.7'
compileOnly "com.github.MilkBowl:VaultAPI:1.7.1"
}
}
58 changes: 31 additions & 27 deletions modules/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

import io.papermc.paperweight.tasks.RemapJar
import io.papermc.paperweight.userdev.ReobfArtifactConfiguration

group = 'org.parallelmc'

Expand All @@ -9,6 +10,8 @@ java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}

paperweight.reobfArtifactConfiguration = ReobfArtifactConfiguration.getMOJANG_PRODUCTION()

compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
processResources.filteringCharset = "UTF-8"
Expand All @@ -19,14 +22,14 @@ dependencies {

compileOnly 'org.jetbrains:annotations:24.0.1'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
compileOnly 'net.dv8tion:JDA:5.0.0-beta.20'
compileOnly 'me.clip:placeholderapi:2.11.5'
compileOnly 'net.dv8tion:JDA:5.0.0-beta.24'
compileOnly 'me.clip:placeholderapi:2.11.6'
compileOnly fileTree('libs') { include '*.jar' }
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.9'
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.12'
compileOnly 'com.mysql:mysql-connector-j:8.3.0'
compileOnly 'com.comphenix.protocol:ProtocolLib:5.1.0'
compileOnly 'dev.esophose:playerparticles:8.5'
compileOnly "io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT"
compileOnly 'com.comphenix.protocol:ProtocolLib:5.3.0'
compileOnly 'dev.esophose:playerparticles:8.7'
compileOnly "io.papermc.paper:paper-api:1.21.3-R0.1-SNAPSHOT"
}

def names = []
Expand Down Expand Up @@ -63,7 +66,8 @@ names.each { mod ->
def name = (String) "${mod}"
exList.remove(name)

archiveClassifier.set("shadow-${mod}")
archiveBaseName.set("")
archiveClassifier.set("${mod}")
from sourceSets.main.output


Expand All @@ -74,23 +78,23 @@ names.each { mod ->
// Figure out how to exclude META-INF
}
}

names.each { mod ->
task "reobf-${mod}" (type: RemapJar) {
dependsOn "shadow-${mod}"
group = "ReobfMod"
description = "Remap the compiled module jar to Spigot's obfuscated runtime names"

fromNamespace = reobfJar.fromNamespace
toNamespace = reobfJar.toNamespace
mappingsFile = reobfJar.mappingsFile
remapClasspath.from(reobfJar.remapClasspath.getFrom())
remapper.from(reobfJar.project.configurations.named("remapper"))
remapperArgs = reobfJar.remapperArgs


inputJar.set(new File("$buildDir/libs/modules-shadow-${mod}.jar"))
//outputJar.set(new File("$buildDir/libs/${mod}-${project.version}.jar"))
outputJar.set(new File("$buildDir/libs/${mod}.jar"))
}
}
//
//names.each { mod ->
// task "reobf-${mod}" (type: RemapJar) {
// dependsOn "shadow-${mod}"
// group = "ReobfMod"
// description = "Remap the compiled module jar to Spigot's obfuscated runtime names"
//
// fromNamespace = reobfJar.fromNamespace
// toNamespace = reobfJar.toNamespace
// mappingsFile = reobfJar.mappingsFile
// remapClasspath.from(reobfJar.remapClasspath.getFrom())
// remapper.from(reobfJar.project.configurations.named("remapper"))
// remapperArgs = reobfJar.remapperArgs
//
//
// inputJar.set(new File("$buildDir/libs/modules-shadow-${mod}.jar"))
// //outputJar.set(new File("$buildDir/libs/${mod}-${project.version}.jar"))
// outputJar.set(new File("$buildDir/libs/${mod}.jar"))
// }
//}
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,14 @@ public void onEnable() {

manager.registerEvents(new DoorKnocker(), plugin);
manager.registerEvents(new SpecialItems(), plugin);
manager.registerEvents(new SpeedyMinecarts(), plugin);
manager.registerEvents(new OnPvp(), plugin);
manager.registerEvents(new ShardLotto(), plugin);
manager.registerEvents(new ChickenFeatherDrops(), plugin);
manager.registerEvents(new EntityTweaks(), plugin);

if (config.getBoolean("speedy-minecarts", false)) {
manager.registerEvents(new SpeedyMinecarts(), plugin);
}

if (config.getBoolean("disable-ender-chests", false)) {
manager.registerEvents(new DisableEnderChest(), plugin);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package parallelmc.parallelutils.modules.bitsandbobs.minimodules;

import org.bukkit.NamespacedKey;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeInstance;
import org.bukkit.entity.Wolf;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.CreatureSpawnEvent;

public class EntityTweaks implements Listener {

@EventHandler
public void onShibaInuSpawn(CreatureSpawnEvent event) {
if (event.getEntity() instanceof Wolf wolf) {
// Check if the wolf is a shiba inu variant
if (wolf.getVariant().getKey().equals(NamespacedKey.fromString("parallel:shiba_inu"))) {
// Set scale to 0.8
AttributeInstance scale = wolf.getAttribute(Attribute.SCALE);
if (scale != null) {
scale.setBaseValue(0.8D);
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void checkForDonors() {

// Check if recipient needs to be healed
double recipientHealth = recipient.getHealth();
double recipientMaxHealth = recipient.getAttribute(Attribute.GENERIC_MAX_HEALTH).getBaseValue();
double recipientMaxHealth = recipient.getAttribute(Attribute.MAX_HEALTH).getBaseValue();
if (!(recipientHealth < recipientMaxHealth)) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ public BukkitRunnable getRunnable(Player player, ItemStack item, CharmOptions op
if (dataBlockDataType.getType() == Types.STRING) {
String blockData = (String) dataBlockDataType.getVal();

// suck my nutsack paper
BlockData data = CraftBlockData.newData(material.asBlockType(), blockData);
BlockData data = material.createBlockData(blockData);

builder.data(data);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public PlayerJoinContainerListenerOverwrite() {
Field field;
Field field1;
try {
field = ServerPlayer.class.getDeclaredField("dc");
field = ServerPlayer.class.getDeclaredField("containerSynchronizer");
field.setAccessible(true);
field1 = ServerPlayer.class.getDeclaredField("dd");
field1 = ServerPlayer.class.getDeclaredField("containerListener");
field1.setAccessible(true);
} catch (NoSuchFieldException e) {
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package parallelmc.parallelutils.modules.charms.util;

import io.papermc.paper.enchantments.EnchantmentRarity;
import io.papermc.paper.registry.set.RegistryKeySet;
import net.kyori.adventure.key.Key;
import net.kyori.adventure.text.Component;
import org.bukkit.NamespacedKey;
Expand All @@ -9,8 +10,11 @@
import org.bukkit.entity.EntityCategory;
import org.bukkit.entity.EntityType;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.EquipmentSlotGroup;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.ItemType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import parallelmc.parallelutils.ParallelUtils;

import java.util.Set;
Expand Down Expand Up @@ -88,6 +92,11 @@ public int getMaxModifiedCost(int level) {
return 0;
}

@Override
public int getAnvilCost() {
return 0;
}

@Override
public @NotNull EnchantmentRarity getRarity() {
return null;
Expand All @@ -108,6 +117,36 @@ public float getDamageIncrease(int i, @NotNull EntityType entityType) {
return Set.of();
}

@Override
public @NotNull Set<EquipmentSlotGroup> getActiveSlotGroups() {
return Set.of();
}

@Override
public @NotNull Component description() {
return null;
}

@Override
public @NotNull RegistryKeySet<ItemType> getSupportedItems() {
return null;
}

@Override
public @Nullable RegistryKeySet<ItemType> getPrimaryItems() {
return null;
}

@Override
public int getWeight() {
return 0;
}

@Override
public @NotNull RegistryKeySet<Enchantment> getExclusiveWith() {
return null;
}

@Override
public @NotNull String translationKey() {
return "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public void onAdvancementDone(PlayerAdvancementDoneEvent event) {
}
Points.get().awardPoints(player, points);
// wait 1 tick to send the message so it shows after the advancement
ParallelChat.sendDelayedParallelMessageTo(player, 1, "You've received " + points + " advancement points!");
if (points == 1) {
ParallelChat.sendDelayedParallelMessageTo(player, 1, "You've received " + points + " advancement point!");
} else {
ParallelChat.sendDelayedParallelMessageTo(player, 1, "You've received " + points + " advancement points!");
}
}
}
Loading