Git Product home page Git Product logo

minigamesbox's People

Contributors

hsgamer avatar jt122406 avatar lagggpixel avatar montlikadani avatar tigerpanzer02 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

minigamesbox's Issues

NPE from MiniGamesBox when starting BuildBattle 5.0.2 on Paper 1.20.4.

NPE starting BuildBattle 5.0.2 on Paper 1.20.4.

[16:59:18 ERROR]: Error occurred while enabling BuildBattle v5.0.2 (Is it up to date?)
java.lang.NullPointerException: Profile name must not be null
        at java.util.Objects.requireNonNull(Objects.java:233) ~[?:?]
        at com.mojang.authlib.GameProfile.<init>(GameProfile.java:31) ~[authlib-6.0.52.jar:?]
        at plugily.projects.buildbattle.minigamesbox.classic.utils.helper.ItemUtils.getSkull(ItemUtils.java:67) ~[buildbattle-5.0.2.jar:?]
        at plugily.projects.buildbattle.handlers.menu.registry.playerheads.PlayerHeadsRegistry.registerCategories(PlayerHeadsRegistry.java:65) ~[buildbattle-5.0.2.jar:?]
        at plugily.projects.buildbattle.handlers.menu.registry.playerheads.PlayerHeadsRegistry.<init>(PlayerHeadsRegistry.java:54) ~[buildbattle-5.0.2.jar:?]
        at plugily.projects.buildbattle.handlers.menu.OptionsRegistry.registerOptions(OptionsRegistry.java:79) ~[buildbattle-5.0.2.jar:?]
        at plugily.projects.buildbattle.Main.initializePluginClasses(Main.java:105) ~[buildbattle-5.0.2.jar:?]
        at plugily.projects.buildbattle.Main.onEnable(Main.java:84) ~[buildbattle-5.0.2.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:190) ~[paper-1.20.4.jar:git-Paper-364]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.4.jar:git-Paper-364]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugin(CraftServer.java:637) ~[paper-1.20.4.jar:git-Paper-364]
        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugins(CraftServer.java:548) ~[paper-1.20.4.jar:git-Paper-364]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:673) ~[paper-1.20.4.jar:git-Paper-364]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:433) ~[paper-1.20.4.jar:git-Paper-364]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.4.jar:git-Paper-364]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1132) ~[paper-1.20.4.jar:git-Paper-364]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321) ~[paper-1.20.4.jar:git-Paper-364]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Looks like this is caused by name being set to null on line 67 in ItemUtils#getSkull

image

Proposals for changes in Locale & Language Manager

First way

  1. Load the locale defined in config.yml from the cloud as a Properties. If the locale is not found, load the default locale (English)
  2. Put the key-value pairs of the Properties to language.yml
  3. The plugin will use language.yml to get & set messages

The users have full control of the language, and if there is a change in the messages, we can just update it in language.yml.
The drawback is that they must remove language.yml and let the plugin refresh it if they want to get the updated translated messages or change the locale.

Second way

  1. Load the locale defined in config.yml from the cloud as a Properties. If the locale is not found, load the default locale (English).
  2. Store the Properties in a temporary location.
  3. language.yml is empty & only contains overridden strings for the Properties.
  4. When getting a message, the plugin first check if there is a path in language.yml. If it's found, load it; otherwise, get the message in the Properties.

language.yml is smaller in file size as it only contains the replacement of the messages in the locale file. If there is a change in the messages, we can simply update the locale file.
The drawback is that the users have to find the correct path to set in language.yml if they want to replace a line.

VersionUtils.teleport() Paper Server async problem.

I have no idea why the code of teleporting for paper servers is async, howerver, it generates the bug that special items that should be updated into the player's inventory after the teleporting code don't show up when it comes to multiverse. The async codes make the inventory updating too early due to the gap of dimension changing. So if there's no special reason for keeping async for paper servers (the only reason comes to my mind is the optimization), just simply clean the code: if(isPaper){...} and only use entity.teleport(location);

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.