Coder Social home page Coder Social logo

georgh93 / pcgf_pluginlib Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 12.0 2.39 MB

Collection of classes useful for Bukkit/Spigot/Paper/BungeeCord/Waterfall plugins

License: GNU General Public License v3.0

Java 98.71% FreeMarker 1.29%
bukkit java minecraft spigot spigot-plugin

pcgf_pluginlib's People

Contributors

dependabot[bot] avatar georgh93 avatar lgtm-migrator avatar machinebreaker avatar markuswme avatar nogapra avatar qveshn avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pcgf_pluginlib's Issues

Improve handling of RGB colors on BungeeCord

BungeeCord allows players with older Minecraft versions to connect. If a player is connected with a Minecraft version that does not support RGB, the best fitting legacy color should be used instead.

Error to load the plugin

[17:32:06 ERROR]: [PCGF_PluginLib] Failed to extract "/lang/en.yml" because it does not exist!
[17:32:06 WARN]: [PCGF_PluginLib] Fallback language file failed to extract!
[17:32:06 WARN]: [PCGF_PluginLib] Failed to load item name language file!
[17:32:06 WARN]: java.util.NoSuchElementException
[17:32:06 WARN]: at java.base/java.util.Scanner.throwFor(Scanner.java:937)
[17:32:06 WARN]: at java.base/java.util.Scanner.next(Scanner.java:1478)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.yaml.YAML.load(YAML.java:123)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.yaml.YAML.load(YAML.java:67)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.yaml.YAML.(YAML.java:31)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.Config.YamlFileManager.load(YamlFileManager.java:247)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.Config.Language.load(Language.java:177)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.Config.Language.load(Language.java:157)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.Config.Language.load(Language.java:145)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.Bukkit.ItemNameResolver.load(ItemNameResolver.java:57)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.PluginLib.Bukkit.ItemNameResolver.(ItemNameResolver.java:48)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.PluginLib.Bukkit.PluginLib.onEnable(PluginLib.java:89)
[17:32:06 WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264)
[17:32:06 WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370)
[17:32:06 WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:501)
[17:32:06 WARN]: at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugin(CraftServer.java:559)
[17:32:06 WARN]: at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugins(CraftServer.java:473)
[17:32:06 WARN]: at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:671)
[17:32:06 WARN]: at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:438)
[17:32:06 WARN]: at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:352)
[17:32:06 WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1181)
[17:32:06 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:322)
[17:32:06 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
[17:32:06 ERROR]: [PCGF_PluginLib] Failed to extract "/lang/en.yml" because it does not exist!
[17:32:06 WARN]: [PCGF_PluginLib] Fallback language file failed to extract!
[17:32:06 WARN]: [PCGF_PluginLib] Failed to load language file!
[17:32:06 WARN]: java.util.NoSuchElementException
[17:32:06 WARN]: at java.base/java.util.Scanner.throwFor(Scanner.java:937)
[17:32:06 WARN]: at java.base/java.util.Scanner.next(Scanner.java:1478)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.yaml.YAML.load(YAML.java:123)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.yaml.YAML.load(YAML.java:67)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.yaml.YAML.(YAML.java:31)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.Config.YamlFileManager.load(YamlFileManager.java:247)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.Config.Language.load(Language.java:177)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.Config.Language.load(Language.java:157)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.Config.Language.load(Language.java:145)
[17:32:06 WARN]: at PCGF_PluginLib-1.0.36-SNAPSHOT.jar//at.pcgamingfreaks.PluginLib.Bukkit.PluginLib.onEnable(PluginLib.java:92)
[17:32:06 WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264)
[17:32:06 WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370)
[17:32:06 WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:501)
[17:32:06 WARN]: at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugin(CraftServer.java:559)
[17:32:06 WARN]: at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugins(CraftServer.java:473)
[17:32:06 WARN]: at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:671)
[17:32:06 WARN]: at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:438)
[17:32:06 WARN]: at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:352)
[17:32:06 WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1181)
[17:32:06 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:322)
[17:32:06 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)

Gradle ShadowJar Exclusion

Do you have an example of this for gradle?

I am trying to use shadowJar, but when I do exclude('*.yml') , it also excludes my plugin's plugin.yml. Do you know how I can exclude for only the plugin lib dependency?

PCGF_PluginLib doesn't load on my server

I've downloaded marriagemaster to my server, but it need PCGF, i've already add PCGF_PluginLIB.jar to my server, but marriagemaster doesn't load, i have the following issue
dsds

NoSuchMethod - NBTItemSerializer - 1.12

2017-06-08 16:40:08 [WARN] java.lang.NoSuchMethodException: net.minecraft.server.v1_12_R1.ItemStack.createStack(net.minecraft.server.v1_12_R1.NBTTagCompound) 2017-06-08 16:40:08 [WARN] at java.lang.Class.getDeclaredMethod(Unknown Source) 2017-06-08 16:40:08 [WARN] at at.pcgamingfreaks.Reflection.getMethod(Reflection.java:130) 2017-06-08 16:40:08 [WARN] at at.pcgamingfreaks.Bukkit.ItemStackSerializer.NBTItemStackSerializer.<clinit>(NBTItemStackSerializer.java:46)

Bug on Purpur 1.19.3 kernel version - build_1920

After updating Paper to separate its plugins from bukkit plugins, a bug occurs on the fork of purpur 1.19.3 build_1920
изображение
[17:58:00] [ServerMain/ERROR]: [io.papermc.paper.plugin.provider.source.DirectoryProviderSource] Error loading plugin: Directory 'plugins\PCGF_PluginLib-1.0.39-SNAPSHOT.jar' failed to load! java.lang.RuntimeException: Directory 'plugins\PCGF_PluginLib-1.0.39-SNAPSHOT.jar' failed to load! at io.papermc.paper.plugin.provider.source.FileProviderSource.registerProviders(FileProviderSource.java:59) ~[purpur-1.19.3.jar:git-Purpur-1920] at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.lambda$registerProviders$2(DirectoryProviderSource.java:32) ~[purpur-1.19.3.jar:git-Purpur-1920] at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?] at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?] at java.util.Iterator.forEachRemaining(Iterator.java:133) ~[?:?] at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1921) ~[?:?] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?] at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?] at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?] at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?] at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:30) ~[purpur-1.19.3.jar:git-Purpur-1920] at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:14) ~[purpur-1.19.3.jar:git-Purpur-1920] at io.papermc.paper.plugin.util.EntrypointUtil.registerProvidersFromSource(EntrypointUtil.java:14) ~[purpur-1.19.3.jar:git-Purpur-1920] at net.minecraft.server.Main.main(Main.java:119) ~[purpur-1.19.3.jar:git-Purpur-1920] at org.bukkit.craftbukkit.Main.main(Main.java:316) ~[purpur-1.19.3.jar:git-Purpur-1920] at io.papermc.paperclip.Paperclip.lambda$main$0(Paperclip.java:42) ~[app:?] at java.lang.Thread.run(Thread.java:1589) ~[?:?] Caused by: org.bukkit.plugin.InvalidPluginException: java.lang.RuntimeException: Could not copy 'plugins\update\PCGF_PluginLib-1.0.39-SNAPSHOT.jar' to 'plugins\PCGF_PluginLib-1.0.39-SNAPSHOT.jar' in update plugin process at io.papermc.paper.plugin.provider.source.FileProviderSource.checkUpdate(FileProviderSource.java:95) ~[purpur-1.19.3.jar:git-Purpur-1920] at io.papermc.paper.plugin.provider.source.FileProviderSource.registerProviders(FileProviderSource.java:49) ~[purpur-1.19.3.jar:git-Purpur-1920] ... 19 more Caused by: java.lang.RuntimeException: Could not copy 'plugins\update\PCGF_PluginLib-1.0.39-SNAPSHOT.jar' to 'plugins\PCGF_PluginLib-1.0.39-SNAPSHOT.jar' in update plugin process at io.papermc.paper.plugin.provider.source.FileProviderSource.checkUpdate(FileProviderSource.java:85) ~[purpur-1.19.3.jar:git-Purpur-1920] at io.papermc.paper.plugin.provider.source.FileProviderSource.registerProviders(FileProviderSource.java:49) ~[purpur-1.19.3.jar:git-Purpur-1920] ... 19 more Caused by: java.nio.file.FileSystemException: plugins\PCGF_PluginLib-1.0.39-SNAPSHOT.jar: Процесс не может получить доступ к файлу, так как этот файл занят другим процессом at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92) ~[?:?] at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) ~[?:?] at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) ~[?:?] at sun.nio.fs.WindowsFileCopy.copy(WindowsFileCopy.java:171) ~[?:?] at sun.nio.fs.WindowsFileSystemProvider.copy(WindowsFileSystemProvider.java:284) ~[?:?] at java.nio.file.Files.copy(Files.java:1304) ~[?:?] at io.papermc.paper.plugin.provider.source.FileProviderSource.checkUpdate(FileProviderSource.java:83) ~[purpur-1.19.3.jar:git-Purpur-1920] at io.papermc.paper.plugin.provider.source.FileProviderSource.registerProviders(FileProviderSource.java:49) ~[purpur-1.19.3.jar:git-Purpur-1920] ... 19 more

https://ci.pcgamingfreaks.at/ is throwing an error

I am not sure if this is the right place but https://ci.pcgamingfreaks.at/ is down and PCGF_PluginLib throws an error.

Server console error:

[13:54:46 ERROR]: [PCGF_PluginLib] The updater could not contact https://ci.pcgamingfreaks.at to check for updates!
[13:54:46 ERROR]: [PCGF_PluginLib] If this is the first time you are seeing this message, the site may be experiencing temporary downtime.
[13:54:46 ERROR]: [PCGF_PluginLib] Message: Server returned HTTP response code: 500 for URL: https://ci.pcgamingfreaks.at/job/PluginLib/lastSuccessfulBuild/api/json?tree=artifacts[relativePath,fileName],fingerprint[hash],number,timestamp,url,fullDisplayName,changeSet[items[comment]]

https://ci.pcgamingfreaks.at/ error:

java.lang.IllegalStateException: An attempt to save the global configuration was made before it was loaded
	at jenkins.model.Jenkins.save(Jenkins.java:3379)
	at jenkins.model.Jenkins.saveQuietly(Jenkins.java:3398)
	at jenkins.model.Jenkins.setSecurityRealm(Jenkins.java:2637)
	at jenkins.model.Jenkins$16.run(Jenkins.java:3342)
	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
	at jenkins.model.Jenkins$5.runTask(Jenkins.java:1129)
	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused: org.jvnet.hudson.reactor.ReactorException
	at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:282)
	at jenkins.InitReactorRunner.run(InitReactorRunner.java:50)
	at jenkins.model.Jenkins.executeReactor(Jenkins.java:1162)
	at jenkins.model.Jenkins.<init>(Jenkins.java:962)
	at hudson.model.Hudson.<init>(Hudson.java:85)
	at hudson.model.Hudson.<init>(Hudson.java:81)
	at hudson.WebAppMain$3.run(WebAppMain.java:295)
Caused: hudson.util.HudsonFailedToLoad
	at hudson.WebAppMain$3.run(WebAppMain.java:312)

This has been happening for the past 7 or so days.

Not Working

Hey, I am trying to use the UUID converter, and I can't seem to get it to work.
I added edited my pom.xml exactly as is mentioned here. I added the repo and dependencies, and edited the . I fixed the shadedPattern part to have my package name (net.infinitycraft.bungeereport). Upon adding this to my plugin, however, I can't get it to load.

Here is a startup log:
https://hastebin.com/felulijifa.md

Please help me get this working because it will be a life saver!

Improve handling of legacy chat messages

Legacy chat messages should be converted to JSON messages properly.

Currently long chat messages will lose there formatting once the client breaks the message into one or more lines.

Improve message placeholder support

Currently placeholders in messages are handled through String.format this approach is rather limited. Problems with the current implementation:

  • It's impossible to support RGB colors in placeholders
  • Formatting in placeholders is broken if it is split across 2 lines
  • Adding JSON in placeholders is impossible
  • String.format does not allow for format caching
  • It's possible to create broken messages way to easy
  • PAPI integration is really unsafe
  • Data for placeholders has to be retrieved, even when it's not used

The new interface should use proper placeholders instead of replaceAll.
There will be a IPlaceholderFormatter interface, that gets implemented by the user and it retrieves and formats the placeholder on demand. The placeholder resolver will be registered with the message via this method: void registerPlaceholder(String placeholderName, IPlaceholderResolver placeholderResolver)

Add per user language

Allow each player to set their own language.
There should also be a MultiLanguageMessage that will automatically send the message in the users language.

Add revision support for language files

If the update method upgrade is used, it should be possible to upgrade values changed (in the bundled language file), if and only if they have not been changed by the user.

Minecraft 1.17 support

Minecraft 1.17 has been released. This plugin needs to be updated. This might take some time.

TODO:

  • NMS has been moved to different packages
    • Update Reflection
    • Update code generator
  • Fix Java 16 compatibility issues
  • Testing

Add support for language dialects

It should be possible to create language dialects that uses most translations form a parent language file and only replace some language values with dialect specific values.

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.