GithubHelp home page GithubHelp logo

kangarko / foundation Goto Github PK

View Code? Open in Web Editor NEW
306.0 306.0 66.0 5.57 MB

Foundation™ helps you create highly customized Minecraft plugins (based on Spigot/Paper API) that support multiple MC versions.

Home Page: https://mineacademy.org

Java 100.00%
library minecraft minecraft-library minecraft-plugin plugin plugin-library spigot spigot-plugin spigotmc

foundation's People

Contributors

adrianjanocko avatar bertgarretsen avatar broken1arrow avatar coobmc avatar dybol avatar elbananaa avatar elroykr avatar emiljimenez21 avatar epicgodmc202 avatar gamer153 avatar iihero4 avatar ingpleb avatar kangarko avatar katalijst avatar lenjoyofficial avatar lorenzo0111 avatar luf3n avatar magnum97 avatar md5sha256 avatar monkamaczna avatar mrcrazys avatar mynameisares avatar spongecade avatar starozytnysky avatar supermrk avatar takivad11 avatar tnt10128 avatar tvhee-dev avatar ultimating avatar zffu 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

foundation's Issues

Removal of "vanish" metadata on PlayerUtil.normalize()

This is something that I've noticed whilst using the Foundation library. I used the library to design a simplified Vanish plugin to teach one of my students.

Basically, these lines make no sense at all:

if (player.hasMetadata("vanished")) {
	final Plugin plugin = player.getMetadata("vanished").get(0).getOwningPlugin();

		player.removeMetadata("vanished", plugin);
	}

	for (final Player other : Remain.getOnlinePlayers())
		if (!other.getName().equals(player.getName()) && !other.canSee(player))
						other.showPlayer(player);

Now while this does "unvanish" players, that is game breaking to most vanish plugins, who keep an internal state of who is vanished so that server-switches and other game events do not break vanish.

It is my opinion that this should be removed from the normalize method. Either that or all metadata should be removed from the player, as that would be "normalizing" them.

Please comment on your thoughts!

Thanks,
Noah

1.16.1-R0.1-SNAPSHOT: SimpleEnchantment name duplicated

1.16.1-R0.1-SNAPSHOT
Foundation version: 5.6.3

Going through the lesson on creating custom enchantments. If I pass a name into the constructor:

private BlackNovaEnchant() { super("Black Nova", 5); }
It will duplicate the text "Black Nova I" (I = Level) in the item, upon using the custom enchantment command. When I first type the '/ce' command, it will create the sword with "Black Nova I" 3x. It will then duplicate the name a couple more times, every so often.

In addition to this, it will also duplicate the name if you click on the sword, so it's now free to be moved around in your inventory, and then place it again. This results in a massive list of ''Black Nova I" names.

I've copied and pasted the code from your original project in the download button. However, this didn't resolve the issue either.

Below is a screenshot to further demonstrate what I'm referring to.
2020-08-21_13 44 58

EDIT
I understand a previous Github issue reported this as well. In issue #71 It might be the exact same issue. It was supposedly fixed in version 5.6.3. However, I'm still experiencing that issue. Could it be that I messed up my POM file?https://pastebin.com/Dp4vBQrv
I ran a few Maven commands to see if there were any build issues, but there weren't.

EDIT 2
Created a blank project. Copied and pasted the (relevant) code from Matej's Orion code. The issue was still there.

Ability To set a ItemStack to the BackReturnButton

I would like to set custom skull for a back button, and with the current setTitle, setMaterial and setLore method, this is not a option. So mu suggestion is you add another method that allows for setting of ItemStacks as well.

This would be nice to you can create nice looking back button with custom heads.

(1.15.2/1.16.3* known): NoSuchMethodError on getConfig in SimpleYaml

I'm trying to use the getConfig() method from Foundation. I tested the method in two projects. The first project is built with the latest version of Foundation and the Minecraft version is 1.15.2. The second project is one version prior to the current release of Foundation and the Minecraft version is 1.16.3

When I use the method I receive the following error:
https://pastebin.com/AFfZDRev

I'm using the method in a YamlConfig extended class with an Object type property. In my onLoadFinish method, I call it test = getConfig.get("Test"); (test is an Object).

Could be using this method incorrectly but I don't see cause for the error to pop up.

Multiple HEX colors not parsed properly

When a new HEX color is added to a JSON string (serialized message) that is sent over BungeeCord or within the server as a component (see Remain.sendComponent), only 1 HEX color is supported. More colors will result in colors not being properly placed:

a

SimpleEnchantment non-alphabet enchantments

Currently, SimpleEnchantment is registering Enchantment with

    private static NamespacedKey toKey(@NonNull String name) {
        if (name == null) {
            throw new NullPointerException("name is marked non-null but is null");
        } else if (!MinecraftVersion.atLeast(V.v1_13)) {
            throw new RuntimeException("SimpleEnchantment requires Minecraft 1.13.2 or greater. Cannot make " + name);
        } else {
            name = new String(name);
            name = name.toLowerCase().replace(" ", "_");
            name = ChatUtil.replaceDiacritic(name);
            Valid.checkBoolean(name != null && VALID_NAMESPACE.matcher(name).matches(), "Enchant name must only contain English alphabet names: " + name, new Object[0]);
            return new NamespacedKey(SimplePlugin.getInstance(), name);
        }
    }

this checks if name is in alphabetic form because it's using name as namespacekey.

Instead doing something like

            UUID uuid = UUID.nameUUIDFromBytes(name.getBytes());
            return new NamespacedKey(SimplePlugin.getInstance(), uuid.toString());

may be able to store unique key for enchantment while accept non-alphabet Enchantment names

1.8.8: CompMaterial POTATO_ITEM

The CompMaterial class does not have a "POTATO_ITEM" entry
minecraft 1.8.8 cannot render the normal "POTATO" item so this will need to be added
the same problem existed with carrots. that was fixed previously though

1.16.2 (but I guess any version): SkullCreator#itemWithBase64 throws NoSuchMethodException

I am trying to create a player head with custom texture by calling SkullCreator#itemWithBase64(ItemStack, String), and makeProfile(String base64) throws a NoSuchMethodException:
https://pastebin.com/hc8JjWJj

It's because makeProfile tries to create a new Property with a single String parameter. The Property class only has (String name, String value) and (String name, String value, String signature) constructors. From what I've learned, the solution would be to change these lines:

final Class<?> propertyClass = ReflectionUtil.lookupClass("com.mojang.authlib.properties.Property");
final Object property = ReflectionUtil.instantiate(propertyClass.getConstructor(String.class), b64);

to

final Class<?> propertyClass = ReflectionUtil.lookupClass("com.mojang.authlib.properties.Property");
final Object property = ReflectionUtil.instantiate(propertyClass.getConstructor(String.class, String.class), "textures", b64);

because as far as I know, the constructor arguments would be "textures" and the Base64 value.

Feel free to correct me if I'm wrong in any of these!

A Few Customisation Features

When Leonhard was with MineAcademy I asked him to add customisation to a few features.

  • ItemStack and position of first page, prev page, next page and last page buttons in MenuPagged
  • Changing the order and color of the label, args, usage and description of sub commands in a command group
  • Location of the return and info buttons in menus

Another small thing is that there are two #setInfoButtonMaterial() and #setInfoButtonTitle() method when the return button only has one(https://i.imgur.com/w8oA0Rt.png). I suggest you do the same thing as the ButtonReturnBack and make the class called ButtonInfo.

All the customisation features above will give developers more freedom and can make their plugin how they want it. I know you have mentioned in the past that you want everything to look the same so users don't get confused and need to learn each plugin. But as a developer I feel like this should be a choice for us, and it should be our job to make the plugin easy for the users, and these customisation feature will allow us to do that while adding a personal design to the plugins we make.

Issue with MenuButtons on 1.15

Hello, I wrote a program with Foundations that works fine on 1.14.4 but most of the buttons don't work on 1.15. I tried with spigot and paper, but paper was the only one that actually gave me an error message. This happens when I try to press a button

java.lang.NullPointerException
[15:53:37 INFO]: at org.bukkit.inventory.ItemStack.isSimilar(ItemStack.java:275)
[15:53:37 INFO]: at org.bukkit.inventory.ItemStack.equals(ItemStack.java:256)
[15:53:37 INFO]: at org.mineacademy.fo.menu.Menu.getButton(Menu.java:287)
[15:53:37 INFO]: at org.mineacademy.fo.menu.MenuListener.onMenuClick(MenuListener.java:71)
[15:53:37 INFO]: at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor63.execute(Unknown Source)
[15:53:37 INFO]: at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69)
[15:53:37 INFO]: at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
[15:53:37 INFO]: at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[15:53:37 INFO]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePlugin

You say I shall post my mns For update other gui`s

This is for update hopper gui, It works for 1.16.5 But if I´m not wrong use 1.16.4 similar if not same mns version. Has not try it, but should work for any gui (only change enum from Hopper to an other container). You can play show all from 19 to 16 gui too (but are only a "gost gui" ).

I need this in my plugin, so will update for 1.17 and older versions too. now when Foundation not have it for 17.

I dont know it is better way to use IChatBaseComponent, i has not work with BaseComponent so are unfamiliar with it. I have ether way use like this " ' ' " with out ' ' it will only show first world.

Has try add the imports too here (my idea set it to * so have to fix it in manually).
https://pastebin.com/6G3EWPZe

1.16.4: Problem with save() method

Hello, when I call save() method from a class that extends YamlConfig and implements ConfigSerializable, nothing happens. I have to specify explicitly what I want to save. Here is an example:

public class ArenaSettings extends YamlConfig implements ConfigSerializable {
    private Location entranceLocation;

    @Override
    protected void onLoadFinish() {
    this.entranceLocation = getLocation("Entrance_Location");
    }

    public void setEntrance(final Location entranceLocation) {
	this.entranceLocation = entranceLocation;
        
        //save() <-- This doesn't work 
	save("Entrance_Location", entranceLocation); //this works
    }

    @Override
    public SerializedMap serialize() {
        return SerializedMap.ofArray(
            "Entrance_Location", entranceLocation
        );
    }
}

Is it a bug? Or is it supposed to work that way? If so, how to use save() method properly?

SMOOTH_STONE_SLAB missing on CompMaterial

CompMaterial.getFromBlock() returns null for smooth_stone_slabs

I checked the class and discovered that it is missing on the CompMaterial Enum.

I encountered it while getting the material in an BlockPlaceEvent handler, and I did not check it for null.

How to reproduce

final CompMaterial testMaterialOne = CompMaterial.fromString("smooth_stone_slab");
final CompMaterial testMaterialTwo = CompMaterial.fromString("stone_slab");

Valid.checkNotNull(testMaterialTwo, "Stone slab is null"); // Does not Throw
Valid.checkNotNull(testMaterialOne, "Smooth stone slab is null"); // Throws

Another dye issue

BLACK_DYE("GRAY_DYE", "INK_SACK", 8), BLAST_FURNACE("FURNACE"), BLUE_DYE("LIGHT_BLUE_DYE", "INK_SACK", 12), BRICK_WALL("COBBLESTONE_WALL"), BROWN_DYE("GRAY_DYE", "INK_SACK", 8), GREEN_DYE("CACTUS_GREEN", "INK_SACK", 2),

should be change to

BLACK_DYE("INK_SACK", "GRAY_DYE", 8), BLAST_FURNACE("FURNACE"), BLUE_DYE("INK_SACK", "LIGHT_BLUE_DYE", 12), BRICK_WALL("COBBLESTONE_WALL"), BROWN_DYE("INK_SACK", "GRAY_DYE", 8), GREEN_DYE("INK_SACK", "CACTUS_GREEN", 2),

INK_SACK should always be legacy name, or it will cause issues while older minecraft version using it.

Minecraft Version: 1.8.8: Unbreakable tag doesnt apply

When i'm trying to use the .unbreakable() method in ItemCreator.of then it just does nothing.
Heres an example code i tried:
ItemStack mysticsword = ItemCreator.of(CompMaterial.GOLDEN_SWORD, "&eMystic Sword").unbreakable(true).build().make();
When i give someone this item in the game it still breaks. Please fix.

1.15.2/1.16.3: CompMaterial.fromItem (also) returns NoSuchMethodException. (Resolved by specifying API version)

When I use CompMaterial.fromItem(ItemStack item) I get a NullPointerException error. I've tried to use it in a ButtonMenu and a command.

    ItemStack item = new ItemStack(Material.DIAMOND_AXE);
    CompMaterial material = CompMaterial.fromItem(item);

    Common.log(material + " I am material");

Error log (1.15.2): https://pastebin.com/PZYZ2but

I've also tested in 1.16.3 and got the exact same result. Much like my previous Issue (which I believe should be reopened), there seems to be an issue with using these static methods.

Unless I'm doing something incorrectly, but I am fairly confident the above example should work fine.

SimplePlugin Error

Hi there! I was having no problem building the project and running it on Minecraft yesterday until the evening. I keep getting this error.
https://pastebin.com/jHaxpUjG

I have made sure in my .m2 that everything is there, and it is. I checked multiple times that my pom is correct. It builds just fine but I get that error when I run in run/debug mode on IntelliJ.

1.8.8: BossBar API issue

Okay so when I use BossBar from Foundation it works perfectly fine on newer versions like 1.16.5, but it shows the enderdragon entity on 1.8.8

2021-08-07_16 28 24

This is how I set the bossbar.
Remain.sendBossbarTimed(player, "Sheeqz picka", 5, CompBarColor.GREEN, CompBarStyle.SOLID);

Common method: get World object by Name or UUID

  1. How it would benefit others? (Not just you, but 1,000s of other people using the same plugin.)
    Getting a world object by a String or UUID (overload)
  2. What would happen if we won't implement this feature? How's your server being affected?
    I won't be affected, it's just for saving some minutes when we want to perform this action, mostly in searching the Bukkit method for it.
  3. If suggesting something new - Can the old system be modified/improved instead?
    There is a function called getWorldNames but the implementation of that would just mostly be for checking if the given string is being used for the name of a world as it just returns a list of strings.

These 2 new methods will return the world you want if exists, passing the name or UUID, otherwise returns null. Added the necessary annotations.

	@Nullable
	public static World getWorldByName(final @NotNull String worldName) {
		return Bukkit.getServer().getWorld(worldName);
	}

	@Nullable
	public static World getWorldByUUID(final @NotNull UUID worldUUID) {
		return Bukkit.getServer().getWorld(worldUUID);
	}

paper 1.16.5 , getString() from YamlStaticConfig encoding error

    public static class Jobs {
        public static class General {
            public static String Butcher;
            public static String Digger;
            public static String Farmer;
            public static String Fighter;
            public static String Fisher;
            public static String Miner;
            public static String Woodcutter;

            private static void init() {
                pathPrefix("Jobs.General");
                Butcher = getString("Butcher");
                Digger = getString("Digger");
                Farmer = getString("Farmer");
                Fighter = getString("Fighter");
                Fisher = getString("Fisher");
                Miner = getString("Miner");
                Woodcutter = getString("Woodcutter");
            }
        }
       

and checked with this

            Common.tell(getPlayer(), ""+ Localization.Jobs.General.Butcher)

I tried with Korean, you can try with this example

Butcher: "도축" 

Thanks

Command Group Help Message Idea

I have an idea for command groups. My idea is a page system to the help message. For example 10 commands per page (this could be customised as well). Please let me hear what you think of this.

This feature will make it so players using plugins with foundation wont get chat spammed if a command group has many commands.

1.16.2: Plugins Using Foundation Break Recent Versions of Multiverse

Whenever I run a server with the most recent official release version of Multiverse-Core (version 4.1.0) or the latest dev build (version 4.1.1) and a plugin that uses the Foundation Library (version 5.6.3) I am given a null pointer exception upon startup that causes Multiverse-Core to disable itself. Here is the error: https://pastebin.com/U2jw60Nu For my server, I have been using an old version of Multiverse-Core (2.5.0) but if a public resource uses the Foundation Library it would be impossible to ask everyone who downloads it to also download an old version. Thank you!

Tolmikarc

1.16.4: Unhandled exception listening to BlockBreakEvent

I have a SimpleListener registered to listen to the BlockBreakEvent. Whenever I open a furnace and take an item out after it is done smelting, I get this error saying java.lang.ClassCastException: class org.bukkit.event.inventory.FurnaceExtractEvent cannot be cast to class org.bukkit.event.block.BlockBreakEvent (org.bukkit.event.inventory.FurnaceExtractEvent and org.bukkit.event.block.BlockBreakEvent are in unnamed module of loader 'app').

EDIT: I am on Foundation 5.7.5, going to try 5.7.6.
EDIT 2: Still occurring on 5.7.6...

command default permission cause no tabcomplete.

because DEFAULT_PERMISSION_SYNTAX doesn't replace the placeholders, so for example if I have a command /testcmd, and I don't give it permission (means foundation gives it permission "{plugin.name}.command.{label}"), when I type /tes, system won't show me "/testcmd" tabcomplete.

Tell Replaced

Adding the following Common.tellReplaced to SimpleCommand would allow devs to use Common#tellReplaced without needing to specify the command sender.

protected void tellReplaced(final String message, final Object... replacements) { tell(Replacer.replaceArray(message, replacements)); }

1.8.8: Nashorn library for JavaScript placeholders

Hi!
When I try to export and run my plugin separately and not through IntelliJ and the debug function, I get the error below - I've tried to install the JDK for Java 8 multiple times and nothing, the weird part is that this only happens when I try to export the plugin and run it via a Start.bat.

Foundation version: 5.7.8
Server version: 1.8.8

Error:

[13:33:12 INFO]: [zGangs] JavaScript placeholders will not function!

[13:33:12 INFO]: [zGangs] Your Java version/distribution lacks the

[13:33:12 INFO]: [zGangs] Nashorn library for JavaScript placeholders.

[13:33:12 INFO]: [zGangs] Please install Oracle Java 8 JDK.

[13:33:12 INFO]: [zGangs] Plugin is now disabled.

[13:33:12 INFO]: [zGangs] Disabling zGangs v1.0.0

[13:33:12 INFO]: java.lang.RuntimeException: Script execution failed for ''

[13:33:12 INFO]: java.lang.NullPointerException: Cannot invoke "javax.script.ScriptEngine.getBindings(int)" because "me.Zcamt.zgangs.lib.fo.model.JavaScriptExecutor.engine" is null

Thank you in advance :D

Add custom colors to ItemCreator for leather armor

Currently you can only color leather gear basically with the default chat colors which looks very ugly on armor in my opinion. It would be VERY helpful if you could add a way to add custom hex colors to leather armor so you can set them to any color which leaves a LOT more room for custom / special / armor gear than if you only have a few chatcolors available. I believe a lot of people could benefit from it because when you have many custom items in the game especially custom armor then its a lot easier for players to tell them apart if they have a greater and more bright color range. Most chatcolors look rather grayish and ugly on armor, i prefer pure red and other pure colors because it looks a lot better.

I basically can't implement any custom armor for now because there are like 3-4 chatcolors that even look remotely good on armor so theres no point even adding custom armor because its so limited visually.

I'm not sure but it shouldn't be too hard to just add a method that lets you change the hex color of it because thats very easily possible in bukkit/spigot. I would use it myself but then i couldn't use the itemcreator anymore which would be a whole lot more work defining all the items.

I don´t know if I shall say is a bug or you has not think on add support for it.

For one of my containers, you can store in theory 1 million or more items of one type.

And int has a max limit ofc, so I use BigInteger and it seams work fine, for Serialized and deserialize.

But your toStringFormatted() method not like BigInteger at all (is say it can't recognize the class).
I solve that problem self and copy over your toString() method to my class :)

I don´t know, perhaps are my need extraordinarily or/and because of the complexity of my plugin.

HEX codes in JSON only support 1 color

This commit is limited to 1 color only, that is the last color: ea1bda5

Steps to reproduce: Call sendJson() on a message containing {test} with SerializedMap.orArray("test", "{#00c792}hello {#5b04b3}world")

Feature creep does not a bootstrap make

There's a lot that goes into developing a plugin. That said, not every plugin needs a database module. And an IP-Geolocation module. And a JSON parsing module. And a web module. And a particle module..

You get the idea.

Please, split this monster of a library into multiple, smaller projects that can individually be released to Maven repos for incorporating into Maven/Gradle projects.

Edit: GitHub (and git) provides a feature called "Submodules" if you'd like this repo to reference and utilize other repos. It's designed for exactly this sort of thing.

[Suggestion] Ignore case sensitivity while checking required settings

My suggestion isn't really a major feature or improvement to the library, it's more of a change to the library that liberates the developer using it to not force a specific naming style in the settings.yml.

It's great that you're teaching students proper programming practices and showing them how to write fast, readable code, however some things should be left up to the developer. My only real gripe is forcing people to use Version: 1 instead of version: 1. Doesn't really seem like the library should limit the scheme to just pascal case.

I know this is ridiculous thing to worry over but I would like to see the checker in SimpleSettings ignore casing. Also, because this is a ridiculous thing it doesn't take precedence over other issues, but I would eventually like to see it added.

Adding Custom Head Util To Foundation

When Leonhard was doing the live calls I ask about custom heads he used in PunishControl, he then gave me this class (https://pastebin.com/C9BcuBKs), But since you have made changes to MineAcademy I cant get this class to work:

So having a class in foundation that gets customs heads would be an excellent addition to foundation as it will 1) solve my issue and 2) allow people to add custom heads with ease

1.16.1: Enchants multiplying

I am following Project Orion and when I give myself an item with the enchant it applies it to the item multiple times. I am trying to get it to only apply it once like every enchant. I was told this is a foundation issue.

What I am getting (no errors): https://i.imgur.com/veBbQWw.png, the more times I give myself the sword, the more times the enchant will be on one of them: https://i.imgur.com/MQ9r7Gc.png

What I am supposed to get (picture is from the video): https://i.imgur.com/uSMJKq0.png

The enchant class: https://pastebin.com/hzWTHQfb
The command class that gives me the item: https://pastebin.com/EHcAP50b

Success, Warning, and Error methods in Common class

Here are the suggestions:

Common.log("&aSuccess! "+success) will be same as Common.logSuccess(success)
Common.log("&eWarning! "+warning) = Common.logWarning(warning)
Common.log("&cError! "+error) = Commong.logError(error)

Also, same logic applies to tellSucces, tellWarning, and tellError which use Common.tell(...) method.

This is not really important, but maybe can be helpful sometimes. I think it's not much and can be easily included in code. :)

1.16.5: Dependency being excluded from the shaded jar - NoClassDefFoundError / ClassNotFoundException

So I'm trying to make a linking system between discord and a server.
For that I've imported JDA which I've played around with before when creating a stand-alone discordbot and I know the dependency I've used works.

However, when I try and launch the plugin, I get the error attached below:
Error in console: https://pastebin.com/YLaeMcZi

I then tried to look at the build process and the messages popping up there, and I realized that it seems like the JDA dependency gets excluded from the shaded jar.
"[INFO] Excluding net.dv8tion:JDA:jar:4.3.0_277 from the shaded jar."

I'm guessing this is the issue, but how do I fix this.

My pom looks like this:
https://pastebin.com/kHE1SfyA

I know that I'm using an older version of foundation(5.8.0), I've tried using multiple different versions, also the newest ones(including 5.9.6) and it doesn't seem to fix the issue.

1.17/1.16.5: hasGsonSupport always null

1.17: Getting NullPointerException error

In the latest (5.9.0) Foundation release. No matter what version I use, 1.16.5 or 1.17, I get the same error of hasGsonSupport is null. The line is:
java.lang.NullPointerException: Cannot invoke "java.lang.Boolean.booleanValue()" because "com.cursedplanet.cursedlibrary.lib.fo.remain.nbt.MinecraftVersion.hasGsonSupport" is null

Whilst the entire stacktrace is below:

https://pastebin.com/uncesney

My version of paged menu

I will probably work more and fix up the code (but are 100% working).

I have to use instance, in other case I it create new instances every time and I can´t easy access the data. Will clean it up and make it better in future.

For example make it more customized, should move some of the method to own class (but when make it, I was lazy and not create a second class).

https://pastebin.com/X6nneVqx

This is the core, to create the items inside the paged menu (so it add items on all rows but not last one).
https://pastebin.com/d9uEbynb

and is not 100% my code has be inspired of someone else code, I cold not use your code because that not work well and hard to collect all code you use for your method (is at least 3 different classes you has use for your paged menu and top of that it branch out in other methods and classes).

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.