#help-development

1 messages · Page 264 of 1

jagged monolith
#

If you know it's a string, use getString()

distant ridge
#

I don't know its a string

#

Its an updater script that carries over the comments

#

So it's going through every key / value and then using YAML to write it out

#

Only when it's writing it out sometimes it removes quotes around the strings

#

Update, so ConfigurationSection .put removes quotes. Anyone know how to stop that?

eternal oxide
#

it removes them if they are not needed

distant ridge
#

Its not consistent. It's removing it from a string so when it reloads there is an error

#

I have key: "&@!" and put changes it to key: &@! so if someone edits my config to change it to key: **** it breaks on load because they see it without quotes and think that's the way to edit the file.

subtle folio
#

correct

misty ingot
#

hey so I am trying to release an update for my plugin in which I have added some new vaults to the config.yml file

#

now, when I load up the new plugin version it does not change the config from the past version at all

#

however, when it is trying to get the new values from the config, it does that successfully

#

what the hell is going on

jagged monolith
misty ingot
#

*if I delete the config file and regen it with the new version, it does regen with all the new values

jagged monolith
#

?paste

undone axleBOT
misty ingot
#

um

#

i kinda am not

jagged monolith
#

Then how is it suppose to know what version is new and what version is old

misty ingot
#

so thats why people put the "config-version: 1.4" # DO NOT CHANGE at top of their configs

jagged monolith
#

Yes. But I usually prefer it at the very bottom of the files

#

But that's personal preference

misty ingot
#

whats the easiest way to insert all the new values in the config when its old?
cuz say its 3 versions old, then you'll have to insert all the values for all the versions one by one without deleting the old ones because the user could have changed stuff as per their needs

jagged monolith
#

Honestly, I just use a library that i've found to work really well.

#

Probs not the best way, but it works for what i need it to.

misty ingot
#

what is the name of the library?

jagged monolith
#

I add that as dependency then just run a check on startup for the config version, using a config_version double in the config.yml and if it's not the correct version, I run the ConfigUpdater.update() method

misty ingot
#

what is "Arrays.asList()" for

jagged monolith
#

That's for this you want to ignore.

#

Like stringLists in the config that users add that you don't want being removed when it updates

misty ingot
#

so like

jagged monolith
#
      Groups:
        owner: "#6b6b6b&l[#570000STAFF#6b6b6b&l] %prefix%%displayname%%suffix%#ff4a4a>> #14abc9%message%"
        admin: "#6b6b6b&l[#570000STAFF#6b6b6b&l] %prefix%%displayname%%suffix%#14abc9>> #ff4a4a%message%"
        member: "%prefix%%displayname%%suffix% #14abc9>> #6b6b6b%message%"
#

For things like that, so it doesn't revert it to config defaults if the user has modified it.

misty ingot
#

ah

#

so I have manually put in like "groups.owner" "groups.admin" and stuff?

#

into the ArrayList

jagged monolith
#
      if(getConfigFile().getConfig().getDouble("Config_Version") != 2.10) {
        getConfigFile().getConfig().set("Config_Version", 2.10);
        getConfigFile().saveConfig();
        ConfigUpdater.update(plugin, "config.yml", getConfigFile().getFile(), Arrays.asList("Group_Name_Colour.Groups", "Group_Chat_Colour.Groups" ,"Name_Colour_Items", "Chat_Colour_Items", "Chat_Settings.Chat_Formats.Group_Formats.Groups"));
        Utilities.logInfo(true, "Stylizer has automatically updated your config.yml!");
      }

Example of how I used it.

#

My config handling probs aint the best example, but it works good enough

karmic dirge
#

I would like to ask one thing, I have created a plugin similar to luckperms and now I am creating a plugin like discordsrv, and so far so ok, but how do I get the rank from my plugin for ranks and use it in another plugin? do i need to create an api?

jagged monolith
#

Depends what you're wanting to achieve.

misty ingot
karmic dirge
#

hm ok

jagged monolith
misty ingot
#

so for something like this, I can add Arrays.asList("database") to avoid it getting changed?

jagged monolith
#

Correct.

misty ingot
#

wonderful.

#

thank you very much

jagged monolith
#

But as a good idea, test it before releasing obviously.

misty ingot
#

yep

charred blaze
#

whats wrong with this? The method runTaskTimer(Plugin, long, long) in the type BukkitRunnable is not applicable for the arguments (Main, long, long)

jagged monolith
#

You need to add an instance of the plugin as the first arg.

charred blaze
jagged monolith
#

That should be Plugin plugin

#

Not Main plugin

charred blaze
#

a

#

thx

jagged monolith
#

Again, That should be Plugin plugin not Main plugin

#

Wait.. you didn't call your main class Main did you...

charred blaze
#

why not

jagged monolith
#

That is a bad idea.

charred blaze
#

why

jagged monolith
#

?main

gleaming grove
#

Does somebody know a library for resourcepack generation?

misty ingot
#

what it was supposed to update to

#

what it updated to

sacred ridge
#

I have a problem when opening inventory opens and closes quickly is there a solution?
( e.getPlayer().openInventory )

misty ingot
#

@jagged monolith

#

nothing in console

jagged monolith
jagged monolith
misty ingot
#

the last 4 fields (is-death-banned etc.) were the ones which were supposed to be inserted in this update

jagged monolith
# misty ingot

Probably being weird because you have messages in the array list.

misty ingot
#

I put it in cuz if someone changed any of the previously available message fields then they wouldnt get reverted

harsh totem
jagged monolith
misty ingot
#

I removed the fields from the Array and it pretty much worked but removed all my comments

jagged monolith
#

If you don't want anything in the array, set it to "none"

misty ingot
#

I did

#

and it removed all my comments

jagged monolith
#

Change the version number to 1.0 or something, and get it to update again and see if it re-adds them

#

Apart from that, I'm not too sure as it's not my library haha.

misty ingot
#

so I generated the config with version 1.0 of the plugin

#

then changed over to the new version

#

and will "null" in the ArrayList, it updated everything successfully

#

and didnt revert changes made by me

jagged monolith
#

So it's working now?

misty ingot
#

yep

#

the comment problem was occuring because I wasnt saving the file properly :p

#

thanks for all the help

jagged monolith
#

Yeah, saving is important.

onyx fjord
#

is there a method to make player send message but also log it naturally to console?
#sendMessage doesn't log the message

topaz cape
#

@quiet ice remember yesterday's maven ProtocolLib thing? now it's the other way around

#

i did nothing it just happened

#

maven downloaded ProtocolLib and IDEA can't find ProtocolLib anymore

#

I really need to find a place to be mentally stable

#

😂

jagged monolith
#

Or create a method that will do both.

cunning shard
#

Anyone know a simple way to make coral not die when placed?

#

I dont understand how this shit works

#

I did find a plugin that does that but holy shit trying to remove the unnecessary shit is pain

jagged monolith
cunning shard
#

How would I go about that?

#

Just create a list of coral blocks? Or something else

jagged monolith
#

Listen for the BlockFadeEvent and check if the block is coral, and if it is, cancel the event

cunning shard
#

Oh that sounds simple

#

Thanks m8

compact solstice
#

is there any way to make players be able to break specific blocks in a wg region?

jagged monolith
#

You'd need to use the Worldguard API if you're wanting to implement it into a plugin you're making.

compact solstice
#

im just tryna make a region where players can only break for a example stone

jagged monolith
#

#help-server Is where you'd want to ask then. not in the plugin development channel

compact solstice
#

oh okay sry

karmic dirge
#

one question, how do I make a sort of leaderboard, more like taking the various data, I'll give an example, I take the kills of all the players, how do I take the player that has the most kills? to make like the first 10 that have the most kills in that server.

glossy venture
#

you sort the list

sage dragon
#

There was a plugin which was basically PersistentDataHolder, but for blocks and other stuff, does anyone know the name?

glossy venture
#

probably asynchronously in the background on specific intervals

#

and then display that data

primal goblet
#

Something weird occurs while I'm in my server sometimes the players are invisible and sometimes visible, however if they relog while invisible they become suddenly visible. How can I fix this problem?

#

message by: decembeer

quaint berry
#

I'm not sure how to stop a runnable from another class, the docs aren't helping

hot panther
#

Hello everyone, I'm about to start a survival project with some players and I want to program an AntiLag plugin for it.
My ideas so far:

  • Command to find out how many entities are in the CommandSender's chunk
  • Command to find out how many entities there are in the whole world.

Now I need some more ideas / a way to find out in which chunk most of the entities are. (pls ping me)

jagged monolith
hot panther
jagged monolith
#

Then you'll get no help here. As this is for spigot api only.

hot panther
jagged monolith
#

You need to pick one. Spigotapi or paper api.

hot panther
vale ember
#

Why is this happening?
(I am trying to create head with custom texture)
Stack trace: https://paste.md-5.net/ovuluhapim.cs

    public ItemStack toItemStack() {
        var item = new ItemStack(Material.PLAYER_HEAD);
        var meta = (SkullMeta) Objects.requireNonNull(item.getItemMeta());
        var profile = new GameProfile(UUID.randomUUID(), "");
        profile.getProperties().put("textures", new Property("textures", texture));
        try {
            var profileField = meta.getClass().getDeclaredField("profile");
            profileField.setAccessible(true);
            profileField.set(meta, profile);

        } catch (NoSuchFieldException | IllegalAccessException e) {
            throw new RuntimeException(e);
        }
        item.setItemMeta(meta);
        return item;
    }
#

texture is eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmIzYThjZTY2ZGMzOTI3YmI1NDgyYjI5ZTkzNmIzOWQyNDU4OWY5MWU5OTdiYjNkZmQ1NjczOTZlODcxMTIwIn19fQ==

jagged monolith
hot panther
hazy parrot
#

If yes, just make simple query

karmic dirge
#

Minecraft statistica

#

Statistics

echo basalt
vocal cloud
#

The real question is the impl. Unless they're using paper methods spigot can help

echo basalt
#

TLDR - don't ask for help about paper methods here

reef acorn
#

How can I make a chest private (can only be opened by one/multiple players)

tardy delta
#

pdc entries inside of the tilestate

quiet ice
tardy delta
#

i once wrote a locking plugin but the code looks terrible

vocal cloud
#

Thanks to PDC locking is a breeze

eternal oxide
#

put player's who can open it UUID in the chest PDC

#

Then simply check it on interact

quiet ice
#

Or be me and use a Quadtree instead of PDCs

rotund ravine
#

Lol

tardy delta
#

a quadtree is a datastructure where each node has four children right?

#

im looking into building some weird datastructure to represent functions

old cloud
#

wikipedia says each inner node has exactly 4 children

vocal cloud
rotund ravine
echo basalt
#

me omw to use an OctTree to represent abstract shapes instead of a set of lines

tardy delta
#

ill probably make a tree where each node has at most 26 children, to represent each char of a function call lol

echo basalt
#

static string name

#

wtf

near night
#

soo this java if (blocksStore.contains("blocks store")) { Base.PluginLogger.info("Loaded placed blocks: " + ((HashMap<Location, Integer>) blocksStore.get("blocks store")).size()); return (HashMap<Location, Integer>) blocksStore.get("blocks store"); } else { Base.PluginLogger.warning("Failed to load block store"); return new HashMap<Location, Integer>(); }
says Failed to load block store but my yml is https://paste.md-5.net/ajerurixag.nginx

tardy delta
#

why dont you do block-store?

near night
#

idk

#

is that a problem

#

(sorry for late reply)

#

changed it didnt fix

quiet ice
#

what is blockStore as a variable?

#

Or better said where does it come from?

tardy delta
#

custom FileConfiguration probably

quiet ice
#

Or a section of one

#

if it is a section it would explain it

sterile breach
#

hello, I was told, before learning to dev plugins, it would be necessary to learn java at least the basics (+50 hours of lessons) is really necessary? or just one or 2 hours to learn the big bases then I tackle the spigot director?

near night
quiet ice
eternal oxide
near night
#

but yeah public static FileConfiguration blocksStore = new YamlConfiguration(); this is blockstore

tardy delta
#

only 50 hours lol

quiet ice
#

50 hours were a really optimistic estimate by my standards to be honest

near night
#

wdym?

quiet ice
#

I only counted the really really necessary stuff, you can't get smaller than that

#

Then he isn't loading it

tardy delta
near night
#
public static void load() {
        //if dosent exist make it
        if (!blocksStoreFile.exists()) {
            try {
                blocksStoreFile.createNewFile();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        blocksStore = YamlConfiguration.loadConfiguration(blocksStoreFile);
    }```
sterile breach
tardy delta
#

its not about hours, its about learning stuff till you know well enough how to tackle your problems

quiet ice
#

I sadly cannot really give a good estimate about learning java thanks to me having learnt is over years with months in between of trying - not hours.

sterile breach
quiet ice
#

Html/css is not a real language

eternal oxide
#

none of those are really any help. May cut a few hours off your learning

sterile breach
#

Yes 👀

tardy delta
#

maybe nodejs could help a little but the syntax is just different

quiet ice
civic zenith
#

hi

#

I need help to devlop a lifesteal server

sterile breach
#

But for spigot, the base of java ar engouh?

civic zenith
#

I pay 5 $ for it

near night
# quiet ice And do you call that method anywhere?

yep ```java
public static HashMap<Location, Integer> getBlocksStore() {
//check if blocks store is null
if (blocksStore == null) {
//if it is, load it
load();
}

    //get the blocks store hashmap from the blocks store file
    //return the blocks store hashmap
    if (blocksStore.contains("blocks-store")) {
        Base.PluginLogger.info("Loaded placed blocks: " + ((HashMap<Location, Integer>) blocksStore.get("blocks-store")).size());
        return (HashMap<Location, Integer>) blocksStore.get("blocks-store");
    } else {
        Base.PluginLogger.warning("Failed to load block store");
        return new HashMap<Location, Integer>();
    }
}```
civic zenith
#

dm me if someone intrested

quiet ice
#

blockStore cannot be null

#

So it will not load

quiet ice
#

?services

undone axleBOT
near night
sterile breach
#

But for spigot, the base of java ar engouh?

quiet ice
#

Because it always means that someone is going to ask hundreds of questions on here that they shouldn't be asking

near night
#

i started programing with forge lamo

tardy delta
#

it will never be null in that way

near night
#

ahh ok thanks

sterile breach
#

Ah okkay

quiet ice
#

Myeah, honestly creating the new instance of YamlConfiguration as late as possible is the proper approach

#

At least I don't know a better approach in the heat of the moment

tardy delta
#

there isnt even a point of creating one as you can just call .loadConfiguration(file)

olive lance
#

what is the shit called hosting sites use to create and configure servers and give ftp and rcon in web browser ?

quiet ice
#

panel?

olive lance
#

ok yes sort of i looked it up and its multicraft but that pointed me in the right direction

#

im sure there is probably many now

quiet ice
#

pterodactyl or however it is written also is a well known one

#

But I don't know if those have ftp

#

FTP in web browser is a bit sus anyways

gilded knot
gilded knot
#

I use it myself

#

Requires a VPS though

tardy delta
#

mvn reload?

orchid gazelle
tardy delta
#

me having no idea what im doing as usual

gilded knot
orchid gazelle
gilded knot
#

a little sticky to set-up, but once you understand it

orchid gazelle
#

But kind of hard to set up if you do not know what you are doing

gilded knot
#

it's pretty straight forward

#

exactly.

quiet ice
gilded knot
#

I know how to do it well

orchid gazelle
#

Lmao 2 persons one thought

gilded knot
quiet ice
#

Not as a IJ whatever dependency

gilded knot
#

right

orchid gazelle
quiet ice
#

Slap it in the pom.xml

gilded knot
#

aight cheers blod

quiet ice
#

After installing it and whatever

olive lance
#

i am thinking ab buying a dedicated server and running a lot of server off that, was looking for ways to do that sort of automated-ish

#

and to give remote access and the likes

orchid gazelle
#

Yeah I used to set up lots of servers for people

#

But now I do not have money for a dedicated

gilded knot
#

pterodactyl is dope

gilded knot
#

Oracle has a free-tier VPS

olive lance
#

I bought a dedicated for my dad and it wass super cheap which is why i wanna buy one now

quiet ice
gilded knot
#

24GB RAM and 4 Cores for free

orchid gazelle
#

And tbh do not use a VPS for gameservers

gilded knot
quiet ice
#

Although with inflation it might be easily doable

gilded knot
orchid gazelle
#

Hmm okay

gilded knot
#

Requires a credit card for human verification, that's the downside

#

but works pretty well

orchid gazelle
#

Bruh I do not have a credit card

gilded knot
#

credit/debit

olive lance
#

The server has 2 Xeon E5s and 8gb of ram, but has space for 768gb of ram so I will add ram as needed

orchid gazelle
#

Do not have

gilded knot
#

Rip

olive lance
#

it was 350

gilded knot
#

yeah that's normal

#

I thought you said you have 768GB RAM

orchid gazelle
#

Lol

#

Thats a lot of RAM

olive lance
#

nah but i could i guess lol which is what got my thinking about setting up a lot of servers

#

but 2 e5 proc is only like 12 cores total

gilded knot
#

that's still good

#

you only need like 4 cores for a gamemode that will run stable

orchid gazelle
#

Thing is that Xeons are Server cpus

gilded knot
#

overkill tbh lol

gilded knot
olive lance
orchid gazelle
#

Which are meh for minecraft servers with high load

gilded knot
#

I have one actually

gilded knot
orchid gazelle
#

What you want for minecraft servers to get max performance is something like a i9-12900K

gilded knot
#

It's not a required thing, but yeah you have a point

orchid gazelle
gilded knot
orchid gazelle
olive lance
#

theoretically then if we were talking doing mc servers with those 2 e5s at what amount of ram would it not make sense to add any more? and at how many active servers

gilded knot
olive lance
#

if 4 cores for 1 server and 8gb per server then thats only like 24gb

orchid gazelle
#

Yes for sure

gilded knot
#

Revenue can go towards Intel i9s and shit

gilded knot
#

but if you want a mass-scale one

#

like 50 players

#

3-4 cores

orchid gazelle
#

yeah

gilded knot
#

Clockspeed matters too

orchid gazelle
#

Clockspeed does not only matter, it is insanely important

olive lance
#

let me find the exact spec on that

tardy delta
orchid gazelle
#

Server CPUs are mainly high cores at low clock, consumer CPUs are mainly high singlecore clock

gilded knot
#

12/24 Cores

#

but 2.4GHz

olive lance
orchid gazelle
#

Thats nothing

gilded knot
#

¯_(ツ)_/¯

#

they are still good though

orchid gazelle
#

2.4 is way too low

rotund ravine
#

For minecraft, since they're usually running a single-thread. They have gotten better, a higher clockspeed was useful. It's less obvious but still useful now

orchid gazelle
#

For high scale

gilded knot
rotund ravine
gilded knot
#

async threading right?

rotund ravine
#

Yes

orchid gazelle
olive lance
#

the i912900 lists like 6 different clock speeds

gilded knot
orchid gazelle
#

the game was never designed for things like 50 players

eternal night
#

not to mention how hard it would fuck up plugins

orchid gazelle
sterile breach
#

So, how to earn spigot librairie ?

eternal night
#

ticking the world in regions on different threads would yeet the entire plugin eco system

rotund ravine
eternal night
#

or lock on everything, ending up with no benefit

gilded knot
rotund ravine
gilded knot
#

I'm on a quest for my next spigot library

gilded knot
orchid gazelle
rotund ravine
eternal night
#

well yea

orchid gazelle
#

Yeah but plugins already exist

rotund ravine
sterile breach
eternal night
#

the same world multiple server thing is an approach for large players counts

orchid gazelle
#

So they would all need to get updates a lot

rotund ravine
orchid gazelle
#

If game gets multithreaded, 90% of all plugins and mods get fucked

eternal night
#

but that is not regionalised ticking. Its just syncing up servers into one whole KEKW

#

the servers themselves still tick on one thread

#

the plugins live on one thread

sterile breach
gilded knot
#

Stupid question but; How do I reference IntelliJ dependency in pom.xml?

orchid gazelle
gilded knot
rotund ravine
#

Like

#

what

olive lance
#

Learn

#

maybe

orchid gazelle
#

Hella buggy, hard to organize, fucks every plugin

gilded knot
#

I mean

#

It can just be a slow migration

olive lance
#

He wants to learn java and spigot

rotund ravine
# gilded knot

You should have added it via the pom.xml in the first place.

eternal night
#

KEKW a slow migration

tardy delta
#

seems to work lol

eternal night
#

man people are crying when their 1.8 plugin does not work

gilded knot
gilded knot
tardy delta
#

lets ask chatgpt to optimize my code \💀

eternal night
#

minecraft won't do shit

#

lol

gilded knot
#

If they were bothered

eternal night
#

at best paper gets there

rotund ravine
eternal night
#

or one of its forks

orchid gazelle
olive lance
#

ask chatgpt to rewrite my single class 1000 line plugin into an actual java project

orchid gazelle
#

Lmao

gilded knot
#

imma ask chatgpt if i can have esex imo 💀

olive lance
#

That was when i didnt realize you could use multiple classes

orchid gazelle
#

Hahaha real?

gilded knot
olive lance
#

yes i am one of those delinquents which learned java through spigot tuts

orchid gazelle
#

Ouch

#

Hehe im not

tardy delta
# rotund ravine it's not made for that haha

lmao

Here are a few suggestions for optimizing the CharTree class:

Consider using a trie instead of a tree. A trie is a tree-like data structure that is optimized for searching and inserting strings. In a trie, each node stores a single character, and the edges between nodes represent the characters of the string being inserted. This allows you to search and insert strings in O(n) time, where n is the length of the string.

Use a more efficient data structure to store the children of each node. The HashMap used in the current implementation has a worst-case time complexity of O(n) for searching and inserting elements, which may not be efficient if you need to perform these operations frequently. Consider using a TrieMap or a TreeMap, which both have a time complexity of O(log n) for these operations.

Consider using a char[] or a StringBuilder to store the characters in each node, rather than using a Map. This will allow you to access the characters directly, rather than having to look them up in the Map, which will improve the performance of the insert and search methods.

Use lazy initialization to avoid creating unnecessary nodes. Currently, the Node constructor is called every time a new child is added to a node, even if the child already exists. Instead, you can use lazy initialization to create the child node only when it is needed.

Consider using a switch statement instead of a Map to store the children of each node, if you know that the number of children will be small and fixed. A switch statement can be more efficient than a Map when the number of keys is small, as it allows the compiler to generate more efficient code.

I hope these suggestions help! Let me know if you have any questions.```
olive lance
#

i cringe even when i say i know java bc of that

tardy delta
#

tf is a trie

gilded knot
#

I still kinda need help

olive lance
#

a tree-like data structure that is optimized for searching and inserting strings

gilded knot
#

I have an external library

eternal night
rotund ravine
gilded knot
#

says it does not exist

eternal night
#

publish the library to maven local

gilded knot
#

how tf do I do it

tardy delta
#

i love O(n)

eternal night
#

that is not the group id

#

nor the right artifact id

gilded knot
#

It's been awhile lol

remote swallow
#

?google moment

undone axleBOT
eternal night
#

run mvn install in your library

tardy delta
eternal night
#

that deploys it to your local maven repo

gilded knot
#

right

orchid gazelle
#

Maven...

#

I kinda still love maven more than gradle

gilded knot
#

gradle faster

river oracle
#

Let's go based maven enjoy3r

rotund ravine
#

i don't love maven at all

gilded knot
#

but i grew up sticking to maven

olive lance
#

just received a review for my 1000 line single classer which says 1.16 in the title saying it doesnt work above y 255 lol

orchid gazelle
#

Maven devs just built different

olive lance
#

i should have deleted it

orchid gazelle
#

♥️

tardy delta
#

hmm is Math.log the e log or the 10 log?

olive lance
#

Did it write any code lol

quiet ice
#

ln is e log

olive lance
quiet ice
#

And there is no base X log

tardy delta
#

always confused cuz there are other programs that do it the other way around

quiet ice
#

Well it should really be lg for base 10, ln for base e and log for base X

tardy delta
#

\👍

quiet ice
#

But log for base e is very very uncommon

#

(as in it doesn't make sense and I haven't heard or seen it being used that way)

gilded knot
#

Ran install

#

I think it's good

tardy delta
#

i thought lets have a map of rootnodes for each different letter that function names can start with \🤔

eternal night
#

it isn't

gilded knot
eternal night
#

your grip id presumably is fucked

gilded knot
#

right

rotund ravine
# olive lance Did it write any code lol

meh

import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class SuperOvercomplicatedTeleportKiller extends JavaPlugin implements Listener {

    private static final int MIN_Y_COORDINATE = 0;
    private static final int MAX_Y_COORDINATE = 255;
    private static final String SPAWN_WORLD_NAME = "world";
    private static final int SPAWN_X_COORDINATE = 0;
    private static final int SPAWN_Y_COORDINATE = 64;
    private static final int SPAWN_Z_COORDINATE = 0;

    @Override
    public void onEnable() {
        Bukkit.getServer().getPluginManager().registerEvents(this, this);
    }

    private boolean isPlayerOutsideAllowedYCoordinateRange(Player player) {
        // Check if the player's y coordinate is outside the allowed range
        Location playerLocation = player.getLocation();
        int playerYCoordinate = playerLocation.getBlockY();
        return playerYCoordinate < MIN_Y_COORDINATE || playerYCoordinate > MAX_Y_COORDINATE;
    }

    private void teleportPlayerToSpawnAndKill(Player player) {
        // Teleport the player to the spawn location and kill them
        World spawnWorld = Bukkit.getServer().getWorld(SPAWN_WORLD_NAME);
        Location spawnLocation = new Location(spawnWorld, SPAWN_X_COORDINATE, SPAWN_Y_COORDINATE, SPAWN_Z_COORDINATE);
        player.teleport(spawnLocation);

        player.setHealth(0);
    }

    @EventHandler
    public void onPlayerMove(PlayerMoveEvent event) {
        Player player = event.getPlayer();
        if (isPlayerOutsideAllowedYCoordinateRange(player)) {
            teleportPlayerToSpawnAndKill(player);
        }
    }
}

gilded knot
#

Nope?

#

It compiles

#

godly feeling

olive lance
#

looks like it might work

eternal night
#

oh

#

then your groupId is still fucked

#

just on the other side

#

lol

orchid gazelle
#

Lmao

rotund ravine
eternal night
#

you have BiomeLib in both group and artifact id

olive lance
#

damn i tried chatgpt and it just gave me TODOs

#

to implement logic

rotund ravine
#

@olive lance tell it to implement them

#

You can refer to previous things asked as long as it's in the same thread

olive lance
#

oh bet i think its working

gilded knot
olive lance
#

it keeps making up new functions and i keep making it define them and it keeps making new ones lol

rotund ravine
#

you're just bad at using it then haha

olive lance
#

it seems to work very well though

#

how can i share a whole thread?

tardy delta
#

fast hashmap? lol

olive lance
#

why is this better than codex

#

even tho its not for code

tardy delta
#

how would a hashmap have a O(n) complexity in this case

#

just no

#

biggest size it can become is 26

#

ig there are 26 letters in the alphabet lol

eternal night
#

worst case in a hash map is O(n)..

tardy delta
#

dont think a treemap will give me any advantages, dont need even it to be sorted

eternal night
#

I mean, if you need a tree like setup, then tree map makes sense

tardy delta
#

mmh

#

its just complaining about the map which makes sense

eternal night
#

but yea, hashmaps can be O(n) in worst case

#

simply due to the way they handle collision

tardy delta
#

\🥺 i was thinking of a char[26] but that will leave too much empty space

eternal night
#

what KEKW

tardy delta
#

actually Node[26] where the index 0 represents 'a' then 'b' etc

#

root node should just be an invalid node ig \🤔

quiet ice
#

what do you want to do?

#

An array of size 26 is generally pretty small btw

tardy delta
#

creating a way to parse functions for my expression parser

quiet ice
#

For presence I have arrays that are a few thousand elements large (and mostly unused)

tardy delta
#

hmm

#

Node[26] should do the work then ig

quiet ice
#

I think I allocate one 65k element array per world - then allocate more the futher the players are spread out

tardy delta
#

lol

#

that will work ig

quiet ice
#

but why would you need to represent functions are trees?

#

like I know: parsers and stuff, but I don't understand why parsers would need that

tardy delta
#

cuz when parsing my expression i dont know how long the function string will be so i just start to look for the first character and then keep searching thro the tree

quiet ice
#

sounds like a tokenization issue

tardy delta
#

so when i have smth like 6*sqrt(9) i will start looking in the tree for a rootnode 's' and if it exists for 'q' etc till it finds smth

#

i just thought that was the most optimal way lol

eternal night
#

any point to not just parse till (

tardy delta
#

malformed expressions ig

#

or optimisation idk

quiet ice
#

Yeah that is defo a tokenization issue

tardy delta
#

first time lol

#

seems to work tho

echo basalt
#

this bitch is writing documentation

tardy delta
#

now ai is complaining about the array lol

echo basalt
tardy delta
#

ah yes

#

sometimes i just need to get rid of the chat history and then it starts behaving normally

vale ember
#

How do i create heads with custom textures (base64) in 1.19 spigot?

tardy delta
#

debugger decided to explore the winNTFIlesystem

echo basalt
#

I don't see a difference

#

nvm I see something

#

shouldn't matter but still

tardy delta
#

not me who thought that String#charAt was a heavy operation

echo basalt
#

why would it be a heavy operation

tardy delta
#

i thought it transformed the byte array to a char array

#

not really heavy too but anyways

echo basalt
#

well

#

with utf-16 strings it's weird

tardy delta
#

utf16 \👀

echo basalt
#

like

#

each char is made from 2 bytes iirc

vivid skiff
#

How can i use packets to change the player vision to a mob visual like when im spectating a creeper?

echo basalt
#

so charAt is no longer just a chars[index] but instead otherstuff

echo basalt
tardy delta
#

bleh

echo basalt
#

there's no other way

vivid skiff
tardy delta
#

hmm instead of having a isEndWord field i might just make that node extend the normal node class and add a function call env \👀

#

where is daddy in the tree

echo basalt
tardy delta
#

seems to work fine

#

i might have a tokenisation issue but whatever

primal goblet
#

Something weird occurs while I'm in my server sometimes the players are invisible and sometimes visible, however if they relog while invisible they become suddenly visible. How can I fix this problem?

quiet ice
#

Hello, does anyone know whether CompletableFuture#exceptionally treats null specially?
I.e. would code such as

            CompletableFuture<RepositoryAttachedValue<Path>> future = remote.getResource(path, executor).exceptionally((ex) -> {
                resolverStatus.updateEntryErrored(remote.getRepositoryId(), "", System.currentTimeMillis());
                return null;
            }).thenApply((rav) -> {
                resolverStatus.updateEntrySuccess(remote.getRepositoryId(), System.currentTimeMillis());
                write(rav.getValue(), localFile);
                return new RepositoryAttachedValue<>(localFile, rav.getRepository());
            });

brick my application? So should I instead do .exceptionally((ex) -> /* .... */ throw ex;) or would that make things worse?

tardy delta
tardy delta
#

so that thenApply would run anyway

quiet ice
#

Well I just want to know whether return null; or throw ex; is best suited to relay an exception when using .expectionally()

#

I don't want .thenApply to run when .exceptionally is executed heh

tardy delta
#

when returning null that wont happen

#

you still need to handle the exception in the exceptionally method as its a throwable and not a runtimeexception :/

eternal night
#

exceptionally goes back to a non exceptional stage

quiet ice
#

I can rethrow those, yeah

quiet ice
eternal night
#

it isn't

tardy delta
#

^^

#

tested it

quiet ice
#

okay

eternal night
#

3 months ago geol be thinking wrong 😭

quiet ice
#

Then just replace all return null with throw t - so easy enough

tardy delta
#

then wondering why you need to catch them :(

echo basalt
#

returning null does not fire exceptionally

#

you can just make a constant exception for special cases

quiet ice
#

I mean return null in exceptionally block

echo basalt
#

that just allows the chain to continue, with the new value

quiet ice
#

Which in this case I don't want to happen (or well in other cases I just want to be able to do that if it is possible to recover)

echo basalt
#

do the .exceptionally last

#

then

#

like

#

supplyAsync.thenAccept.thenRun.exceptionally

quiet ice
#

It's not that easy heh

echo basalt
#

¯_(ツ)_/¯

#

or just use null as an invalid value

quiet ice
#

Nah, I'll rethrow that exception

tardy delta
#

doesnt that exception gets given to the next completionstage?

#

hmm seems to work

quiet ice
#

As long as the resulting future completes exceptionally, I wouldn't care

tardy delta
last sleet
#

Anyone knows why an arrow would not hit a player? (Dealing 0 knockback, and 0 damage)?
On the hit players' screen it appears the arrow "bounces" off him

#

Fully charged arrows do deal knockback, which is pretty weird. Mobs also receive knockback, even from uncharged arrows

#

here's some code in which I'm handling the damage. I'm doing custom damage, so even if the arrow doesn't hit the player, the plugin detects the event and removes some health

vale ember
#

Hi, could anyone help with creating custom textured heads?

last sleet
#

After some further testing, it appears the arrow hits only like 50% of the time, and does so more when I aim at the top of the player rather than his torso

#

I have absolutely no idea whats causing this

#

After some more testing, the arrow seems to hit only when it does more than 2 hearts of damage... WTf?

tardy delta
#

my toString method can use a lil help

arctic moth
tardy delta
#

children=, }}}}} empty spaces lol

last sleet
#

Okay, so it appears the bug only works with custom-enchanted bows (i made my own custom enchants) and it's this code block in particular that's causing it.

Bows that don't have the persistent data container "data" work fine.

#

oh wait a minute, the "data" pdc also sets the arrow damage to 0 (because I'm not using vanilla's system), perhaps that makes the game think the arrow shouldn't deal KB? hmm

#

Ahh this appears to have fixed it...

#

thanks all my imaginary friends that helped me ;)

chrome beacon
# vale ember ?

What part do you need help with? Also what version are you making the plugin for?

vale ember
# chrome beacon What part do you need help with? Also what version are you making the plugin for...

newest - 1.19.2
i tried this code:

    public ItemStack toItemStack() {
        var item = new ItemStack(Material.PLAYER_HEAD);
        var meta = (SkullMeta) Objects.requireNonNull(item.getItemMeta());
        var profile = new GameProfile(UUID.randomUUID(), null);
        profile.getProperties().put("textures", new Property("textures", texture));
        try {
            var profileField = meta.getClass().getDeclaredField("profile");
            profileField.setAccessible(true);
            profileField.set(meta, profile);

        } catch (NoSuchFieldException | IllegalAccessException e) {
            throw new RuntimeException(e);
        }
        item.setItemMeta(meta);
        return item;
    }

but it crashes with the following error: https://paste.md-5.net/ovuluhapim.cs

#

texture is eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmIzYThjZTY2ZGMzOTI3YmI1NDgyYjI5ZTkzNmIzOWQyNDU4OWY5MWU5OTdiYjNkZmQ1NjczOTZlODcxMTIwIn19fQ==

chrome beacon
vale ember
#

shit i never knew about this, ill try it thx

twilit roost
#

How can I access name() from annotation?

tardy delta
#

why combining annotations and methods

#

probably want to look at Class#getDeclaredAnnotation

vale ember
hoary timber
#

Short requestion related to BungeeCord, should BungeeCord chaining with ip forwarding be a supported feature? Would create a pr, and will only be used when online mode is false, which is normally not the case anyway

sterile breach
#

there is a difference in the code of the plugin between 1.19 and 1.16 for example?

faint cypress
#

For the Adventure API when using MiniMessage, I format my messages like:

MiniMessage MM = MiniMessage.miniMessage();
String message = "<base_style>Hello my name is <arg0> and I am <arg1> years old!";

Style baseStyle = // Some style that includes a color and TextDecoration.ITALIC
Component c1 = // Some component with just a color, no TextDecoration
Component c2 = // Some component with just a color, no TextDecoration

TagResolver[] tagResolvers = new TagResolver[3];
tagResolvers[0] = Placeholder.component("arg0", c1);
tagResolvers[1] = Placeholder.component("arg1", c1);
tagResolvers[2] = TagResolver.resolver("base_style", Tag.styling((builder -> builder.merge(baseStyle))));

Component c3 = MM.deserialize(message, tagResolvers);

If I sent c3 to a Player, the colors are all correct however entire message will be italic.
I don't want c1 and c2 to inherit the TextDecoration.ITALIC or any TextDecoration.
I want it to simply substitute c1 and c2 into <arg0> and <arg1>, where the rest of the message is italic.
How can I accomplish this?

hoary timber
fresh timber
#

For a custom block breaking system I am making, I have a list of lists of objects to hold the blocks that need to be reset to their normal form and it resets them after 10 seconds of being in the list. I am making the list and putting objects in it as a list of Long (System.currentTimeMillis()), BlockType or Material for the block type to replace, and a Location for the location of the block. Here is the code I use to replace the blocks:

        for (List<Object> list : blocksToReplace) {
            if ((((long) list.get(0)) + 10000L) <= System.currentTimeMillis()) {
                Bukkit.broadcast("test2", "tete");
                Material material = (Material) list.get(1);
                Bukkit.broadcast("test3", "tete");
                Location location = (Location) list.get(2);
                location.getWorld().getBlockAt(location).setType(material);
                Bukkit.broadcast("test4 - " + material, "tete");
                blocksToReplace.remove(list);
                Bukkit.broadcast("test5", "tete");
            }
        }

The broadcasts were me testing, sorry xD

Here is generally what I use for putting something in this:

                        List<Object> list = new ArrayList<>();
                        list.add(System.currentTimeMillis());
                        list.add(currentlyMining.get(UUID).getType());
                        list.add(currentlyMining.get(UUID).getLocation());
                        blocksToReplace.add(list);

with this code, I am getting a ton of errors/exceptions. The picture is what the console outputs.

Does anyone know how I can not get these errors. By the way... it works fine and it resets the blocks and everything it just gives this exception for some reason and I wanted to figure out the reason why and not just surround it with try/catch xD

#

oop

#

lemme edit that im not done lol

faint cypress
# hoary timber ```kt Tag.styling { it.decoration(TextDecoration.ITALIC, false) } ``` you can ex...

Thanks. I'm a little confused. Where do I disable this?
I want "Hello my name is ", " and I am " & " years old!" to still be italic / inherit any TextDecoration in the baseStyle.

I effectively want to try and replicate what would happen if it was:

Component.textOfChildren(
  Component.text("Hello my name is ").style(baseStyle),
  c1,
  Component.text(" and I am ").style(baseStyle),
  c2,
  Component.text(" years old!").style(baseStyle)
);
fresh timber
#

For a custom block breaking system I am making, I have a list of lists of objects to hold the blocks that need to be reset to their normal form and it resets them after 10 seconds of being in the list. I am making the list and putting objects in it as a list of Long (System.currentTimeMillis()), BlockType or Material for the block type to replace, and a Location for the location of the block. Here is the code I use to replace the blocks:

        for (List<Object> list : blocksToReplace) {
            if ((((long) list.get(0)) + 10000L) <= System.currentTimeMillis()) {
                Bukkit.broadcast("test2", "tete");
                Material material = (Material) list.get(1);
                Bukkit.broadcast("test3", "tete");
                Location location = (Location) list.get(2);
                location.getWorld().getBlockAt(location).setType(material);
                Bukkit.broadcast("test4 - " + material, "tete");
                blocksToReplace.remove(list);
                Bukkit.broadcast("test5", "tete");
            }
        }

The broadcasts were me testing, sorry xD

Here is generally what I use for putting something in this:

                        List<Object> list = new ArrayList<>();
                        list.add(System.currentTimeMillis());
                        list.add(currentlyMining.get(UUID).getType());
                        list.add(currentlyMining.get(UUID).getLocation());
                        blocksToReplace.add(list);

with this code, I am getting a ton of errors/exceptions. The picture is what the console outputs.

Does anyone know how I can not get these errors? By the way... it works fine and it resets the blocks and everything it just gives this exception for some reason and I wanted to figure out the reason why and not just surround it with try/catch xD

spice shoal
#

Guys is there a way to change the color of the text after the /?

hoary timber
faint cypress
torn shuttle
fresh timber
#

yea I was just looking at a bukkit thread about that

#

I think I got it lol tysm tho

torn shuttle
#

use an iterator

fresh timber
#

I just changed to just using the list size

#

yea

torn shuttle
#

or a second list

#

you're just going to cause another issue if you go through a list relying on list size but then change the size of the list as you go

fresh timber
#

hmm

torn shuttle
#

go look up iterators

fresh timber
#

I could loop from the last index of the list

#

that would fix that problem

torn shuttle
#

no

fresh timber
#

yes

eternal night
fresh timber
#

because the size would not change for all objects lower than it if i removed an object at a higher index

#

or not size index

#

and we are going lower as we go

eternal night
#

cool kids use removeIf

torn shuttle
#

well don't come back crying in a few weeks about how you had to rewrite it all

fresh timber
#

why would I

#

have to write it all

#

rewrite

torn shuttle
#

you are writing yourself into a corner

fresh timber
#

how

torn shuttle
#

following bad code practices like they one you are currently insisting on doing creates quirks you have to work around later down the line which will eventually lead you to having to rewrite everything because you built your system on pillars of kerosene

#

but hey your time is yours to waste

fresh timber
#

we'll see I guess

hoary timber
fresh timber
#

I don't know what a simple class/record is

#

just do the stuff I know about

torn shuttle
#

you're going to be in for a bad time if you try to make this not through oop

fresh timber
#

I started to read a website about oop I almost died in 5 minutes

#

💀

torn shuttle
#

?learnjava

undone axleBOT
torn shuttle
#

second one from the bottom

fresh timber
#

I already did the sololearn course

torn shuttle
#

I recommend the second one from the bottom, it's how I got started

fresh timber
#

ive already started

torn shuttle
#

don't stop until you have a good idea of how oop works

fresh timber
#

but I forgot all of sololearn because I never used it as I learned 💀

torn shuttle
#

I don't know that there is a worse way of doing what you're trying to do now that I am looking at it

hoary timber
torn shuttle
#

maybe if you tried to directly modify the jvm so you can really brick something

hoary timber
#

Or learn Kotlin, way faster to work with:

data class BlockReplace(
    val expire: Long,
    val material: Material,
    val location: Location
)

val blocksToReplace = mutableListOf<BlockReplace>()
blocksToReplace += BlockReplace(System.currentTimeMillis() + 10_000L, ..., ...);

val curTime = System.currentTimeMillis()
blocksToReplace.removeIf { 
    if (it.expire <= curTime) {
        // ...
        true
    } else false
}
eternal night
#

the only actual "code save" there is the += instead of .addAll

#

the entire rest can be coded in java in the exact same line length lol

hoary timber
#

Ok yea Java copied data classes,.. and you also have Lombok, but for example you don't have to write the last closure as parameter :p

eternal night
#

wow xD

dusk flicker
#

lmao

eternal night
#
blocks.removeIf {
}

vs

blocks.removeIf(it -> {
});
torn shuttle
#

you don't need lombok if you don't know oop in the first place

eternal night
#

switch now 🔫

hoary timber
eternal night
#

and a stdlib you get to carry everywhere with enough parameter overload to jump ship the second my eyes have to witness it

#

its a subjective thing

#

¯_(ツ)_/¯

sage patio
#

Hi, i've an EventException: null error in InventoryClickEvent and there is my code

torn shuttle
#

no, you have a cme

eternal night
#

player.closeInveotry() removes them from the viewer list KEKW

hoary timber
eternal night
#

I have had the opportunity to try kotlin xD

sage patio
#

and the closeInventory executes after for loop

torn shuttle
#

which you can't do

eternal night
#

its alright, I would not switch to it over java for the added functionality it delivers

#

especially with the pretty damn bright future java has ahead

hoary timber
eternal night
#

hm ?

#

well yea

#

if you are referring to project valhalla

tardy delta
sage patio
torn shuttle
topaz cape
#

how do you guys send a remove player packet in ProtocolLib

#

this is my first time to try it

#

so far i created a packet container and I don't even know more than how to send a packet through it lol

sage patio
quaint mantle
#

minecrafT???

#

minecraft????????????????

sage patio
quaint mantle
#

game?

torn shuttle
#

no, this is terraria

eternal night
#

hytale actually

torn shuttle
#

hytale waiting room here

#

any resident sleepers on chat

topaz cape
sage patio
topaz cape
#

I'm looking through code all over GitHub and i still don't get it so a wiki won't be bad ig

topaz cape
#

JavaDoc isn't a wiki

sage patio
#

JavaDoc*

topaz cape
#

yes still

quiet ice
#

Well well-written javadocs can still act as a wiki

topaz cape
#

well not really no

#

depends on the project size

quiet ice
#

90% of all wikis are fully stupid

eternal night
#

If you are looking for something more beginner friendly, probably go for packet events and make retropper happy KEKW

sage patio
quiet ice
topaz cape
quiet ice
#

Well written javadocs even more so

topaz cape
quiet ice
#

A good wiki is worse than a good javadoc imo

eternal night
#

I mean idk

torn shuttle
#

good wikis are great, especially for their convenient download button at the top of the page where i can steal enums

eternal night
#

if you fail to send a packet with protocol lib

#

¯_(ツ)_/¯

torn shuttle
#

really convenient

sage patio
topaz cape
#

no

#

Mmd sucks ass

quiet ice
#

Oh yeah, and those legacy Java 7- javadoc pages are absolutely trash

topaz cape
sage patio
topaz cape
#

he's a good guy i know

topaz cape
sage patio
eternal night
#

hence why I suggested potentially switching libraries

eternal night
#

its a very very generic framework

sage patio
#

btw don't look at the code (for now)

echo basalt
#

also yeah this is not a good way of doing it

sage patio
echo basalt
#

yeah

#

that one

topaz cape
sage patio
river oracle
#

Is there an easy way to find NBT tags on a spawner ItemStack so I can change the spawner type

topaz cape
#

but not for now i really want to try ProtocolLib xd

eternal night
echo basalt
#

ah shit I gotta post my NMS tutorial in a week

sage patio
sage patio
#

lol

echo basalt
eternal night
#

which ever you actually needed

indigo cave
#

how exactly can I send in the newest version sound packets with protocollib?

echo basalt
#

I'm only halfway there

gilded knot
#

this gonna make devs go out of business 💀

eternal night
#

so what is your issue 😂

gilded knot
sage patio
gilded knot
#

Yup

#

Literally type in Make me a minecraft spigot plugin that messages new players the word "Hello" when they join.

echo basalt
#

I used it to fix a bug with my database caching system

topaz cape
echo basalt
#

where deleting an entry would delete all of them

sage patio
gilded knot
#

fr

sage patio
#

for using that stuff

gilded knot
#

requires phone number

#

thats it

#

its free

eternal night
#

@topaz cape

sage patio
agile anvil
#

Guys keep it secret

sage patio
#

lol

gilded knot
agile anvil
#

F*ck

gilded knot
#

no point

agile anvil
#

I didn't use my brain for 2 weeks

#

Thanks to it

gilded knot
#

the owners said they were gonna monetise it

agile anvil
#

Yep

gilded knot
#

so I suggest abusing the crap out of it before you cant

echo basalt
agile anvil
#

2b $ they can earn

tardy delta
river oracle
#

Is there a way to change spawner time while its an ItemStack

eternal night
#

CreatureSpawner

#

its a BlockStateMeta

smoky oak
#

is it possible to place a block hitbox, or something resembling one (full block) off-grid? I tried shullkers but they snap to the block grid, but im unsure if theres not another option.
I can simulate one of course by teleporting the player there or by telling their client they're standing on a shulker and remove it when they walk off but i really dont want to have to do that geometry & it might break sneaking

river oracle
eternal night
#

obviously use sparingly 😅

smoky oak
#

um well

#

i was thinking along the lines of the archimedes mod

eternal night
#

I mean, give it a whirl

topaz cape
eternal night
#

you want to remove them from the tablist right ?

topaz cape
#

let's say that yeah

eternal night
topaz cape
#

should hide the player as well

eternal night
#

so you also need a destroy entities packet

#

two packets then

#

any reason you don't use inbuild hidePlayer functionality ?

topaz cape
#

this is the reason

#

Line 123

quaint mantle
#

sssaaasss

#

j

#

j

#

j

subtle folio
#

@quaint mantle

eternal night
#

because this recently changed in 1.19.3

topaz cape
#

i have it implemented in all versions except 1.7.10 which i wanna implement

eternal night
#

well I cannot help you then I have no idea who 1.7.10 looks

#

lol

topaz cape
#

because im getting paid for it💀

quaint mantle
eternal night
#

Well, get the server source code of 1.7.10

#

and find the packet source code

subtle folio
eternal night
#

that is pretty much the only way here, I don't think 1.7.10 has any docs left, especially not for the damn internals

subtle folio
#

me when non 1.14+ developer 💀

tardy delta
#

lol when i enter input in my application i get an exception in initializer exception cuz the static block only seems to run at that point \🤔

#

my entry method calls the Expression constructor and only then the static field in Expression seems to be initialized \🤔

echo basalt
#

help my nms tutorial is getting big

#

I'm gonna start writing packet interception

tardy delta
#

you know whats big too

subtle folio
#

me patiently waiting for nms tutorial to be done

#

didn’t you start it like@last month

echo basalt
#

yes

topaz cape
subtle folio
#

jesus

echo basalt
#

It's at about 220 lines of text

subtle folio
#

wow

#

all in md?

echo basalt
#

not strict

#

I'm just formatting it like whatever

subtle folio
#

mhm mhm

tardy delta
subtle folio
#

LOL

#

he’s rewriting it

tardy delta
#

what language is that

echo basalt
#

I had to zoom out

#

bitch

tardy delta
#

im sorry

subtle folio
#

i think it’s called brainfuck

#

i can make out “all”

echo basalt
#

it's a weird style

subtle folio
#

LOL

tardy delta
#

nms crash course

subtle folio
#

nms crash course

#

me when the beach course

echo basalt
#

nms for dummies

#

made by ImIllusion, revised by ChatGPT

#

I literally just paste stuff and say "how can I make this simpler?"

tardy delta
#

you mean written by chatgpt

subtle folio
#

really ?

echo basalt
#

no

#

I'm writing this

tardy delta
#

i literally wrote my english assignment with chatgpt

subtle folio
#

chatgpt does this

echo basalt
#

then tossing it on chatgpt

tardy delta
#

i should do the same thing for code revision

echo basalt
#

and using it to simplify the contents

tardy delta
#

love it how my static block only gets called when my programming is already scanning for input

#

does this look like abuse?

orchid gazelle
#

What does the h behind the cos,sin,tan mean?

tardy delta
#

idk im not a mathematician

#

just saw them in the java.math.expression.parser and decided to add them too

#

looks like it is hyperbolic

echo basalt
#

still need to write these

#

then I can start formatting it on spigot

sterile token
#

Which is the second hand slot? Because i need to cancel putting items in the second hand

#

I have been looking online and appear many slots

echo basalt
#

it's weird

#

the slot in the protocol is not the same slot in bukkit

sterile token
#

Yeah that why. its pretty messy

echo basalt
#

this is the protocol explanation

sterile token
#

So second hand slot is number 5?

echo basalt
#

this is the protocol version

#

this is the bukkit version

sterile token
#

Ok thanks i will try that bro

#

okay, im messed up, you brokened my brains

echo basalt
#

top is how the protocol handles it

#

bottom is how bukkit handles it

#

setItem(40) on bukkit makes the client receive at slot 45

sterile token
#

So in my case im not working with NMS so i just need to use slot 40

#

Thanks man

echo basalt
#

yeah

#

or just

#

setItemInOffhand

sterile token
#

Also are you mad with me?

echo basalt
#

no

#

I couldn't care less

sterile token
echo basalt
#

I just see you as the guy that likes to copy my old utils

sterile token
echo basalt
#

¯_(ツ)_/¯

#

new menu engine is wild

sterile token
#

I have really bad logic and problems, i mean im really bad with logical things

sterile token
echo basalt
#

It's similar to IF

#

but all abstract

sterile token
#

Sorry for pinging 😬

echo basalt
#

I don't care

sterile token
#

What do you mean by IF?

echo basalt
sterile token
#

oh ok

#

I never seenthat

#

I will take my time to read it tho

echo basalt
#

except instead of XML I just make it all with code and configurations

sterile token
echo basalt
#

it lets me do stuff like this

echo basalt
#

I just had to make a ConfigurableLayer thing

#

and a registry

sterile token
#

oh nice

#

Im really sad tho because i cannot figure how to make to work Jackson stuff 💀

#

I was planning to use it for making an Yaml and Json based custom library but when ever i give a try i fail it

tardy delta
#

lol im confused, the FunctionContainer static block isnt called until i enter input in the main method

#

class should be loaded when calling toString on the class ig

echo basalt
#

just do Class.forname

#

JIT probably optimized your toString

tardy delta
#

could be

#

lol my executeNormally method asks for input first and then the statis block is run

#

looks like the Expression class isnt loaded

sterile token
tardy delta
#

never got problems

tardy delta
#

a bunch of classes dont seem to be loaded yet

sage patio
#

are you speaking to me?

tardy delta
#

no

#

performant enough id say

young nimbus
#

why do i get nullGlacies and nullHarenae? Can somenone help me? would really appreciate it

tardy delta
tardy delta
young nimbus
#

in the last picture

#

when im ingame

tardy delta
#

ugh and were are you calling setTitle with that message

young nimbus
#

line 50-52

#

1st pic

tardy delta
#

uh just dont use that symbol, use & with ChatColor.translateAlternateColors

tardy delta
#

cant really find where, that white is hurting me

young nimbus
#

😂

sterile token
young nimbus
#

yes wanted to change it haha

#

but focused on fixing that first

sterile token
#

In my case i use IntelliJ because its more opened in terms of plugins

young nimbus
#

yeah i consider using intellij too

river oracle
#

is there an easier reliable way to tell how many mobs of a type a player has killed, or am I just going to have to make one of the most massive SQL tables

tardy delta
#

isnt there a statistic?

young nimbus
tardy delta
#

aka player.getStatistic(MOB_KILLS, EntityType.WHATEVR) or smth?

sterile token
#

Just a total

sterile token
tardy delta
river oracle
tardy delta
#

and encoding does even more

river oracle
young nimbus
sterile token
tardy delta
#

you know the color thing

#

dunno where tf that is on the keyboard so cant send it

#

§ this maybe

young nimbus
#

ahh

#

for color code