Skip to content
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
20 changes: 10 additions & 10 deletions api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {

group = 'org.parallelmc'

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

java {
Expand All @@ -20,15 +20,15 @@ processResources.filteringCharset = "UTF-8"


dependencies {
implementation 'org.jetbrains:annotations:23.0.0'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
implementation 'net.dv8tion:JDA:4.4.0_350'
compileOnly 'me.clip:placeholderapi:2.11.2'
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.10'
compileOnly 'me.clip:placeholderapi:2.11.3'
compileOnly fileTree('libs') { include '*.jar' }
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.7'
implementation 'mysql:mysql-connector-java:8.0.29'
compileOnly 'com.comphenix.protocol:ProtocolLib:5.0.0-SNAPSHOT'
compileOnly 'dev.esophose:playerparticles:7.25'
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.8'
implementation 'mysql:mysql-connector-java:8.0.33'
compileOnly 'com.comphenix.protocol:ProtocolLib:5.0.0'
compileOnly 'dev.esophose:playerparticles:8.2'
implementation 'org.reflections:reflections:0.10.2'
}

Expand Down Expand Up @@ -67,7 +67,7 @@ bukkit {

main = 'parallelmc.parallelutils.ParallelUtils'

apiVersion = '1.19'
apiVersion = '1.20'

depend = ['PlaceholderAPI', 'ProtocolLib']
softDepend = ['Multiverse-Core', 'FractalForest', 'WorldGuard', 'VoteParty', 'PlayerParticles', 'ProNouns']
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/parallelmc/parallelutils/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class Constants {

public static final Version VERSION = new Version(3, 5, 2);
public static final Version VERSION = new Version(4, 0, 0);
public static final String PLUGIN_NAME = "ParallelUtils";
public static final String DEFAULT_WORLD = "world2";
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;

import java.net.URLClassLoader;
import java.util.List;

public abstract class ParallelModule
Expand Down
9 changes: 4 additions & 5 deletions api/src/main/java/parallelmc/parallelutils/ParallelUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.net.URLClassLoader;
import java.sql.*;
import java.util.*;
import java.util.jar.JarEntry;
Expand Down Expand Up @@ -42,7 +41,7 @@ public final class ParallelUtils extends JavaPlugin {

private HashMap<String, ParallelModule> registeredModules;

private HashMap<ParallelModule, ClassLoader> classloaders = new HashMap<>();
private final HashMap<ParallelModule, ClassLoader> classloaders = new HashMap<>();
private Commands commands;

private boolean loadedModules = false;
Expand Down Expand Up @@ -71,8 +70,8 @@ public void onEnable() {
config = this.getConfig();

config.options().copyDefaults(true);
config.options().copyHeader(true);
config.options().header(HEADER);
config.options().parseComments(true);
config.options().setHeader(List.of(HEADER));

// Read config
this.saveDefaultConfig();
Expand Down Expand Up @@ -140,7 +139,6 @@ public void onEnable() {
port = Integer.parseInt(portStr);
} catch (NumberFormatException e) {
log(Level.WARNING, "Invalid address string. Using default port");
port = 3306;
}
}

Expand Down Expand Up @@ -399,6 +397,7 @@ private void loadModules() {
ParallelModule module = modules.get(0).getDeclaredConstructor(ParallelClassLoader.class, List.class).newInstance(classLoader, dependents);

availableModules.put(module.getName(), module);
loadedList.add(module.getName());

currentlyLoading.remove(name);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.command.*;
import org.bukkit.craftbukkit.v1_19_R1.command.ServerCommandSender;
import org.bukkit.craftbukkit.v1_20_R1.command.ServerCommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -220,7 +220,7 @@ public static Location convertLocation(CommandSender sender, String sx, String s
*/
public static List<String> getTargetedBlockTabHelper(@NotNull Player player, int depth) {
ArrayList<String> list = new ArrayList<>();
Block targetedBlock = player.getTargetBlock(5);
Block targetedBlock = player.getTargetBlockExact(5);

if (targetedBlock != null && targetedBlock.isSolid()) {
// Autofill targeted coords
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public enum TimeUnit {
HOURS(3, 20*60*60, "h"),
DAYS(4, 20*60*60*24, "d");

public int index;
public int ticks;
public String val;
public final int index;
public final int ticks;
public final String val;

/**
* Create a new TimeUnit with a given index, ticks equivalent, and one character string representation
Expand Down
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id("io.papermc.paperweight.userdev") version "1.3.7"
id "xyz.jpenilla.run-paper" version "1.0.6"
id 'net.minecrell.plugin-yml.bukkit' version '0.5.2'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id("io.papermc.paperweight.userdev") version "1.5.5"
id "xyz.jpenilla.run-paper" version "2.1.0"
id 'net.minecrell.plugin-yml.bukkit' version '0.6.0'
}

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


Expand Down Expand Up @@ -39,9 +39,9 @@ allprojects {
}

dependencies {
paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.19.2-R0.1-SNAPSHOT")
paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.20-R0.1-SNAPSHOT")

compileOnly "io.papermc.paper:paper-api:1.19.2-R0.1-SNAPSHOT"
compileOnly "io.papermc.paper:paper-api:1.20-R0.1-SNAPSHOT"
compileOnly 'net.luckperms:api:5.4'
compileOnly 'dev.esophose:playerparticles:8.2'
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
16 changes: 8 additions & 8 deletions modules/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ dependencies {
compileOnly project(':api')
compileOnly fileTree('../libs') { include '*.jar' }

compileOnly 'org.jetbrains:annotations:23.0.0'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
compileOnly 'net.dv8tion:JDA:4.4.0_350'
compileOnly 'me.clip:placeholderapi:2.11.2'
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.10'
compileOnly 'me.clip:placeholderapi:2.11.3'
compileOnly fileTree('libs') { include '*.jar' }
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.7'
compileOnly 'mysql:mysql-connector-java:8.0.29'
compileOnly 'com.comphenix.protocol:ProtocolLib:5.0.0-SNAPSHOT'
compileOnly 'dev.esophose:playerparticles:7.25'
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.8'
compileOnly 'mysql:mysql-connector-java:8.0.33'
compileOnly 'com.comphenix.protocol:ProtocolLib:5.0.0'
compileOnly 'dev.esophose:playerparticles:8.2'
}

def names = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import net.minecraft.nbt.CompoundTag;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_19_R1.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_20_R1.inventory.CraftItemStack;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.craftbukkit.v1_19_R1.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_20_R1.inventory.CraftItemStack;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.block.data.BlockData;
import org.bukkit.craftbukkit.v1_19_R1.block.data.CraftBlockData;
import org.bukkit.craftbukkit.v1_20_R1.block.data.CraftBlockData;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.scheduler.BukkitRunnable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import net.minecraft.world.inventory.*;
import net.minecraft.world.item.ItemStack;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_19_R1.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_20_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
Expand All @@ -26,9 +26,9 @@ public PlayerJoinContainerListenerOverwrite() {
Field field;
Field field1;
try {
field = ServerPlayer.class.getDeclaredField("cZ");
field = ServerPlayer.class.getDeclaredField("cW");
field.setAccessible(true);
field1 = ServerPlayer.class.getDeclaredField("da");
field1 = ServerPlayer.class.getDeclaredField("cX");
field1.setAccessible(true);
} catch (NoSuchFieldException e) {
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package parallelmc.parallelutils.modules.charms.playerparticles.styles;

import dev.esophose.playerparticles.PlayerParticles;
import dev.esophose.playerparticles.config.CommentedFileConfiguration;
import dev.esophose.playerparticles.manager.DataManager;
import dev.esophose.playerparticles.manager.ParticleManager;
import dev.esophose.playerparticles.particles.PParticle;
Expand Down