Giter VIP home page Giter VIP logo

partychat's Issues

[Bug] Plugin disables if it can't check for updates

Describe the bug
If SpigotMC's API is down (the entire site gives a 502 as of this post), the plugin does not enable.

To Reproduce

  1. Turn off internet access to the Minecraft server
  2. Boot the server with PartyChat

Expected behavior
The plugin fails to check for updates, but still boots without issues.

Software (please complete the following information):

  • Server Implementation: Purpur
  • Minecraft Version: 1.19.3
  • Java Version: 17
  • Plugin Version: 4.2.1

Additional context
Error message in console:

[18:19:20 INFO]: [PCv4] Cannot look for updates: Server returned HTTP response code: 502 for URL: https://api.spigotmc.org/simple/0.1/index.php?action=getResource&id=79295
[18:19:20 ERROR]: Error occurred while enabling PartyChat v4.2.1 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "String.replace(java.lang.CharSequence, java.lang.CharSequence)" because the return value of "dev.majek.pc.util.UpdateChecker.getSpigotVersion()" is null
        at dev.majek.pc.util.UpdateChecker.<init>(UpdateChecker.java:57) ~[PartyChat-4.2.1.jar:?]
        at dev.majek.pc.PartyChat.onEnable(PartyChat.java:179) ~[PartyChat-4.2.1.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:279) ~[purpur-api-1.19.3-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:192) ~[purpur-1.19.3.jar:git-Purpur-1933]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[purpur-1.19.3.jar:git-Purpur-1933]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[purpur-api-1.19.3-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_19_R2.CraftServer.enablePlugin(CraftServer.java:574) ~[purpur-1.19.3.jar:git-Purpur-1933]
        at org.bukkit.craftbukkit.v1_19_R2.CraftServer.enablePlugins(CraftServer.java:485) ~[purpur-1.19.3.jar:git-Purpur-1933]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:640) ~[purpur-1.19.3.jar:git-Purpur-1933]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:439) ~[purpur-1.19.3.jar:git-Purpur-1933]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:344) ~[purpur-1.19.3.jar:git-Purpur-1933]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1117) ~[purpur-1.19.3.jar:git-Purpur-1933]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321) ~[purpur-1.19.3.jar:git-Purpur-1933]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[18:19:20 INFO]: [PCv4] Disabling PartyChat v4.2.1

Seems to be broken on 1.19.3 Spigot

Describe the bug
Hello! For a while now, this plugin has been my go-to for party chats, as I run servers with alot of people who build and we need to split our chats apart for less congestion and confusion. Recently, we set up a new server on 1.19.3, and the server is throwing an error when starting. Running any command also throws an error.

When starting, it says this (both when running a latest manual build, and a release build):

[15:59:27] [Server thread/ERROR]: Error occurred while enabling PartyChat v4.2.2 (Is it up to date?)
java.lang.NoClassDefFoundError: net/kyori/adventure/builder/AbstractBuilder
        at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
        at java.lang.ClassLoader.defineClass(ClassLoader.java:1013) ~[?:?]
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:193) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:588) ~[?:?]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:104) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
        at dev.majek.pc.chat.ChatParser.getBuilderFromString(ChatParser.java:304) ~[?:?]
        at dev.majek.pc.chat.ChatParser.parse(ChatParser.java:172) ~[?:?]
        at dev.majek.pc.chat.ChatParser.parse(ChatParser.java:186) ~[?:?]
        at dev.majek.pc.chat.MessageHandler.sendFormattedMessage(MessageHandler.java:50) ~[?:?]
        at dev.majek.pc.PartyChat.onEnable(PartyChat.java:189) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_19_R2.CraftServer.enablePlugin(CraftServer.java:539) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at org.bukkit.craftbukkit.v1_19_R2.CraftServer.enablePlugins(CraftServer.java:453) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:587) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:412) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:250) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:973) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:301) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at java.lang.Thread.run(Thread.java:1589) ~[?:?]
Caused by: java.lang.ClassNotFoundException: net.kyori.adventure.builder.AbstractBuilder
        at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:147) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
        ... 24 more

And, when running a command, it throws this error:

org.bukkit.command.CommandException: Unhandled exception executing command 'pc' in plugin PartyChat v4.2.2
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_19_R2.CraftServer.dispatchCommand(CraftServer.java:847) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at org.bukkit.craftbukkit.v1_19_R2.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:50) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.commands.CommandDispatcher.performCommand(CommandDispatcher.java:306) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:290) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1957) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.server.network.PlayerConnection.lambda$18(PlayerConnection.java:1919) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.util.thread.IAsyncTaskHandler.b(SourceFile:67) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.util.thread.IAsyncTaskHandler.d(SourceFile:156) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(SourceFile:23) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1154) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:1) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.util.thread.IAsyncTaskHandler.x(SourceFile:130) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.server.MinecraftServer.bh(MinecraftServer.java:1133) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1126) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.util.thread.IAsyncTaskHandler.c(SourceFile:139) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.server.MinecraftServer.i_(MinecraftServer.java:1110) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1021) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:301) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3663-Spigot-a2190e3-b56426c]
        at java.lang.Thread.run(Thread.java:1589) ~[?:?]
Caused by: java.lang.NullPointerException: Error finding value for path prefix in en_US.yml, did you delete something?
        at dev.majek.pc.data.DataHandler.getConfigString(DataHandler.java:358) ~[?:?]
        at dev.majek.pc.chat.MessageHandler.sendMessageWithReplacement(MessageHandler.java:106) ~[?:?]
        at dev.majek.pc.command.PartyChatCommand.onCommand(PartyChatCommand.java:331) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]
        ... 23 more

image
The file "en_US.yml" is there.

image

Software (please complete the following information):

  • Server Implementation: Spigot
  • Minecraft Version 1.19.3
  • Java Version 19
  • Plugin Version: 4.2.1 / 4.2.2

I've tried manually building the latest commit, but the error persists. the V5 branch seems to be older than the latest, so I suspect a similar issue would exist there. A fix for this, or a pointer in the right direction so I can attempt a fix myself, would be highly appreciated! Thanks!

Changing the main command does not work

Describe the bug
I am trying to change the main command from /party to /roleplay, but the changes are ignored from the commands.yml file.

To Reproduce
Steps to reproduce the behavior:

  1. Set the main command to /roleplay
  2. Start the server
  3. Try running /roleplay

Expected behavior
A clear and concise description of what you expected to happen.

Software (please complete the following information):

Current: git-Purpur-1976 (MC: 1.19.4)*
Previous: git-Purpur-1970 (MC: 1.19.4)
* You are running the latest version
  • Plugin Version: 4.2.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.