#help-development

1 messages · Page 209 of 1

mighty pier
#

in the arena manager make a bukkitrunnable?

torn shuttle
#

tell a man to go learn java and they may become a developer, spoonfeed a man code and they'll call you mommy for a lifetime

mighty pier
#

i learn well from spoonfeed code

#

because whhen i dnt understand it

#

i google

#

because not understanding makes me anwy

#

angwy

eternal oxide
mighty pier
#

$runnable

#

$runnables

#

send link to runnables

undone axleBOT
mighty pier
#

i love thread.sleep

hot panther
#

How can I store data on an ItemStack that is also stored on the block once it is set?

eternal oxide
#

it's going to be something really simple like java Bukkit.getScheduler().runTaskTimer(plugin, () -> { arenas.forEach( arena-> { arena.tick(); }); }, 20,20);

#

I missed a )

mighty pier
#

but like

#

wont they reset all at the same time

eternal oxide
#

you said you wanted it to fill a block every second

mighty pier
#

player can change the seconds for each arena

vast raven
#

@eternal oxide is there a way to create send a packet using ProtocolLib that changes the skin of the head in the tab next to the player name, or do I have to use NMS?

eternal oxide
#

so in the tick method of your arena class you have it fill the next block that is required

vast raven
#

actually I use TabAPI but I didn't find any methods

mighty pier
#

isnt eazynick or whatever that is open source

#

learn nms

vast raven
#

Maybe I can find it there?

mighty pier
#

dont use protocollib

#

learn nms

vast raven
#

if it's a question of packet it can be done with TABApi or just ProtocolLib

#

if nothing else work, well then NMS

mighty pier
#

you probably can do it with protocollib

#

but nms best

#

lie ^

golden turret
#

idk if that is just math but

#

I have a variable called ticks

#

and a Map<Integer, IntConsumer>

mighty pier
#

what ius love

golden turret
#

when the ticks is divisible by the key the IntConsumer is consumed

mighty pier
#

baby dont hurt me

#

dont hurt me

#

no more

golden turret
#

and the int passed to the IntConsumer is the ticks

#

and I want to do something like swtich (ticks) { case 0: ...}

mighty pier
#

what is intconsumer

#

i have golglge

#

dont tell me

golden turret
#

how could I fit the ticks into the switch?

remote swallow
golden turret
#

like

#

what if the ticks passes 3

#

like

#

4

#

I would like the case 0 to be executed

eternal oxide
#

default

golden turret
#

if 5, the case 1 would be executed

eternal oxide
#

oh

golden turret
#

if 6 the case 2

brave sparrow
#

Don’t use a switch

golden turret
#

if 7 case 3

brave sparrow
#

Use %

eternal oxide
#

then you are going to need modulo

golden turret
#

oh yea

#

fuck ifs

#

but ok

brave sparrow
#

switch (ticks % 4)

golden turret
#

better

brave sparrow
#

case 0:
case 1:
case 2:
case 3:

golden turret
#

thanks!

brave sparrow
#

Imagine not using java 8

echo basalt
#

consumer.accept(ticks % key)

#

o nvm I'm fuckin late

native nexus
golden turret
#

I already found a solution

fringe hemlock
#
Starting download of https://s3.amazonaws.com/Minecraft.Download/versions/1.8.8/minecraft_server.1.8.8.jar
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: https://s3.amazonaws.com/Minecraft.Download/versions/1.8.8/minecraft_server.1.8.8.jar
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
        at java.net.URL.openStream(Unknown Source)
        at com.google.common.io.Resources$UrlByteSource.openStream(Resources.java:72)
        at com.google.common.io.ByteSource.read(ByteSource.java:296)
        at com.google.common.io.Resources.toByteArray(Resources.java:98)
        at org.spigotmc.builder.Builder.download(Builder.java:1083)
        at org.spigotmc.builder.Builder.main(Builder.java:416)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)
#

sooo

#

what do i do now

mighty pier
#

how do set all the blocks to something in a boundingbox

fringe hemlock
#

Use buildtools

mighty pier
#

funny

eternal oxide
#

loop the blocks in teh BoundingBox

fringe hemlock
eternal oxide
#

?bt

undone axleBOT
lilac cobalt
wind aurora
#
public class DamageListener implements Listener {
    @EventHandler
    public void onPlayerDamage(EntityDamageEvent e) {
        if(e.getEntity() instanceof Player) {
            Player p = (Player) e.getEntity();

            ItemMeta playerTool = p.getItemInUse().getItemMeta();
            if(playerTool.getLore().contains("Damage")) {
                //nothing yet
            }
        }
    }
}

I started learning this yesterday and I'm not very good with java, how could I read the lore of the tool that the player is holding? For example, if a weapon has lore "Damage " and followed by an unknown number, how could I get that number and store it in a variable?

lilac cobalt
#

But then i get a much bigger, and scarier error lool
Class 'firstcommand' must either be declared abstract or implement abstract method 'onCommand(CommandSender, Command, String, String[])' in

eternal oxide
#

Hover and you get the option to implement unimplemented methods

dim bronze
lilac cobalt
eternal oxide
#

it should only add one, unless you did something wrong

lilac cobalt
#

It imported org.jetbrains.annotations.NotNull;, org.bukkit.command.CommandSender; and org.bukkit.command.Command;

eternal oxide
#

imports are fine

dim bronze
wind aurora
lilac cobalt
eternal oxide
#

imports are fine

molten hearth
#

welcome to java

lilac cobalt
#

ItemStack diamond = new ItemStack(Material.DIAMOND);
required both
import org.bukkit.Material;
and
import org.bukkit.inventory.ItemStack;

#

Oh okay so this is normal lol

eternal oxide
#

yes

dim bronze
#

remember that java is just a programming language and doesn't understand the concept of minecraft

#

so spigot includes these abstractions to make it easier

eternal oxide
#

each import tells that Class what the Object is. ItemStack requires the import so it knows what an ItemStack is

lilac cobalt
#

I thought the pom.xml did all that for me, although i just started lol

fringe hemlock
eternal oxide
fringe hemlock
#

Ok

dim bronze
lilac cobalt
dim bronze
#

wait, does java have a substring after method?

serene egret
dim bronze
serene egret
#

k

fringe hemlock
#
Attempting to build Minecraft with details: VersionInfo(minecraftVersion=1.8.8, accessTransforms=bukkit-1.8.8.at, classMappings=bukkit-1.8.8-cl.csrg, memberMappings=bukkit-1.8.8-members.csrg, packageMappings=package.srg, minecraftHash=a0671390aa0691e70a950155aab06ffb, classMapCommand=null, memberMapCommand=null, finalMapCommand=null, decompileCommand=null, serverUrl=null, mappingsUrl=null, spigotVersion=null, toolsVersion=0)
Starting download of https://s3.amazonaws.com/Minecraft.Download/versions/1.8.8/minecraft_server.1.8.8.jar
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: https://s3.amazonaws.com/Minecraft.Download/versions/1.8.8/minecraft_server.1.8.8.jar
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
        at java.net.URL.openStream(Unknown Source)
        at com.google.common.io.Resources$UrlByteSource.openStream(Resources.java:72)
        at com.google.common.io.ByteSource.read(ByteSource.java:296)
        at com.google.common.io.Resources.toByteArray(Resources.java:98)
        at org.spigotmc.builder.Builder.download(Builder.java:1083)
        at org.spigotmc.builder.Builder.main(Builder.java:416)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)
#

same error when trying to use builtools

eternal oxide
#

Where did you get your buildtools? That address is a 403

fringe hemlock
#

spigotmc

#

the link you sent

eternal oxide
#

?paste your full buildtools.log

undone axleBOT
eternal oxide
#

nm, it fails for me too on 1.8.8

fringe hemlock
#

It fails for every version ive tried

#

its weird

eternal oxide
#

then MC hosting is down

fringe hemlock
#

lol

eternal oxide
#

1.19 seems to be working

fringe hemlock
#

probably because it gets it directly from mc

rapid vigil
#

Nvm :)

fluid river
#

?tryitandsee

#

fug

#

?tas

undone axleBOT
wind aurora
dim bronze
#

getItemInUse() does not return the players current item but an item they are interacting with. The method you are looking for is getInventory().getItemInMainHand()

wind aurora
#

oh alright

#

Is that all I need to change?

dim bronze
#

stripColor returns a new string with the colours removed, so you'd need to assign that to a new variable (unless of course its not needed anyway so you can remove it)

Not something that would necessarily break the code depending on how the lore is set up, but you are checking if the line contains the string "Damage:" but then only taking the substring at 6 characters. If you can be sure that Damage: will be at the start of a line, then startsWith rather than contains probably relays your intent better, but not something that would break the code if it's set up that way

boreal python
#

Anyway to negate knockback when a player is using a shield?

tacit sierra
#

Hi, I made a portal using multiverse portals pointing towards my other world named "LoopSpace". I then made a plugin that deletes the world and regenerates it under the same name. My console tells me that when I try to enter the portal that Bukkit lost the world reference, and I am not sure why since it is generated under the same world name. Any help is appreciated!

Here is my error log: https://paste.gg/p/anonymous/6cf3dde9266b4e3fae12c6809303e6da

eternal oxide
#

When you delete teh world and create a new one, it has the same name, but it is still a different world object

wind aurora
dim bronze
#

ah yes missed that the first time

#

e.getEntity() on entitydamageevent returns the entity that was damaged and not the damager

#

I believe

#

You probably want the EntityDamagedByEntityEvent and getDamager()?

wind aurora
#

sounds right, thx

lilac cobalt
#

I'm trying to access the first arg in the array of args supplied by onCommand and use it to set the amount of items the player will get from .AddItems but i can't get it to work. carrots.setAmount(Integer.parseInt(args[0])); does anyone see what I'm doing wrong here?

tacit sierra
dim bronze
lilac cobalt
# dim bronze this looks right to me, could you share the rest of your code?
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

        if (sender instanceof Player) {

            Player player = (Player) sender;

            if(args.length == 0) {
                player.sendMessage("please supply an arg");
            } else {
                ItemStack carrots = new ItemStack(Material.CARROTS);
                carrots.setAmount(Integer.parseInt(args[0]));
                player.getInventory().addItem(carrots);
            }
        }

        return true;
    }
dim bronze
#

Material.CARROT

#

not plural

#

I believe that refers to the actual carrot crop, not the item

lilac cobalt
#

Yup. That fixed it

#

One more thing, how can i ask if the arg is an int or not?.. and if so, fail the code

dim bronze
#

are you familiar with try/catch blocks?

lilac cobalt
#

Nope

dim bronze
#

if you are expecting your code to throw an error for some reason, you can catch the error before it's thrown and handle it yourself. Some methods in java will force you to do this.

In this case the easiest way would be to wrap the parseInt call in a try and catch the NumberFormatException which is thrown if the input is not a number. Probably not the best practice solution, and in that case you should probably loop over the string and check if each character is a digit or use regex

https://stackoverflow.com/questions/5439529/determine-if-a-string-is-an-integer-in-java

wind aurora
lilac cobalt
#

So the try section runs the code in the brackets, and then the catch section examines the code that returned?

#

Very helpful, tyvm

dim bronze
dim bronze
wind aurora
#

yes

#

Damage: 5

#

with color &f

ancient plank
#

you're a c#

wind aurora
#

wdym here?

dim bronze
#

started okay, then got cursed

lilac cobalt
dim bronze
#

it's best to avoid nesting if possible as your code can get hard to read

#

like I said, using a try catch block for logic isn't the best practise but it is the easiest solution. In the case of checking if the player gave an argument, checking the array length is much easier than a try catch

lilac cobalt
#

Got ahead of myself

dim bronze
#

Good that you are thinking of edge cases

#

that's why I like kotlins toIntOrNull :D ashamed i got that function wrong the first time

tacit sierra
#

Hi, I made a portal using multiverse portals pointing towards my other world named "LoopSpace". I then made a plugin that deletes the world and regenerates it under the same name. My console tells me that when I try to enter the portal that Bukkit lost the world reference, and I am not sure why since it is generated under the same world name. Any help is appreciated!

Here is my error log: https://paste.gg/p/anonymous/6cf3dde9266b4e3fae12c6809303e6da

Any examples would be great, still getting used to java development.

dim bronze
#

what code are you using. Not got much experience with multiverse portals but like elgar said earlier, its likely because when you reset a world it will have a different object in memory
#help-development message

dim bronze
#

seeing a lot of redundant code here. Why would you create a new location object with all the information from getWorld("WaitingRoom").getSpawnLocation() rather than just using that?

#

honestly, doesn't look like you are using much of the multiverse functionality here, and programming by just running in game commands is bad practise. Unload the world and delete the world from the filesystem, and then use spigots methods to create a new world.

#

should avoid those issues

#

you certainly shouldn't be sending titles this way too.

tacit sierra
#

Ok, ill change some of my code

boreal python
#

How am I able to kill a player if they are under a specific Y level in a specific world?

dim bronze
#

definitely will, but I doubt its necessary for this use case

boreal python
#

on it boss.

#

So should I just schedule a repeating task for every second?

#

Alrighty, will try it out and see what works better for me 👍

#

ty for the help!

outer sorrel
#

is there a way to check if a player was sent to a server by bungeecord and get the server they were sent from? (hub, minigame server, survival etc) using just spigot or would i need to have the plugin on bungeecord too using its API

torpid sapphire
#

am i missing something or why is every single item meta i get, regardless of the item damageable?

#

or am i missing something

dim bronze
#

don't think javas assertions are used by default

#

I would just replace that with

if(!(stack.getItemMeta() instanceof Damageable)) return;
torpid sapphire
#

just threw the assert in there to make it obvious what the problem is

#

stack.getItemMeta() instanceof Damageable; returns true

#

and i dont know why it would do that

#

its just pseuocode

dim bronze
#

what minecraft version?

torpid sapphire
#

1.19.2

dim bronze
#

nvm irrelevant question anyway

#

well they definitely should not be

#

could you send your actual code?

torpid sapphire
#
if (!(event.getCurrentItem().getItemMeta() instanceof Damageable)) event.setCancelled(true);```
#

tried multiple things, but every item i try returns true there

dim bronze
#

if that if statement returns true then every item IS NOT damageable

torpid sapphire
#

mightve worded it wrong

#

what im saying is event.getCurrentItem().getItemMeta() instanceof Damageable always evaluates to true

dim bronze
#

hmm I can't see why that would be the case sorry

torpid sapphire
#

yeah even after a server restart, still does the same thing

#

prints true

eternal oxide
#

wrong import of Damageable

dim bronze
#

still though, the item meta shouldn't be a damageable entity either?

eternal oxide
#

his test is sayign it's never an instanceof Damageable. He's using the wrong import so it's never true

dim bronze
#

that's what I thought they meant initally

#

but they mean it's always an instance of it

eternal oxide
#

err, he's testing ! so it IS always ! true which = false

#

so passing

dim bronze
#

that isn't testing the negative of it

#

and it returns true

eternal oxide
#

ah I see

#

his first code showed using !

dim bronze
#

class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {

#

that's the nms implementation of item meta

#

all metas are damageable

#

I guess that's the point in hasDamage()

#

so I guess the javadoc comment isn't really accurate

#

very vexing that it's called CraftMetaItem and not CraftItemMeta

#

yes, I'm aware. But what's happening here is intended behaviour

#

I wouldn't say that all item meta's being damageable is intuitive

#

I didn't know regular items could store damage data

#

The way the rest of the page is worded, I'd say that this is saying that only items with durability can have the damage tag

#

Proof?

#

Haven't got the game open otherwise I would

torpid sapphire
#

so is there a way to check for items that naturally take damage like tools and armor?

#

if i can’t just check for damageable

dim bronze
#

since all item metas are damageable you should be able to cast safely

dim bronze
# torpid sapphire if i can’t just check for damageable

Looking through nms code, it seems the durability given to items when they are registered is the only thing that makes a tool/armor differ from a regular item, so you'd just have to check if it actually has durability with getDamage()

lilac cobalt
#

ItemStack item = player.getActiveItem(); is failing with a NoSuchMethodError printed in my server console.. but in my ide everything seems to be fine. Is there a desync between my ide and minecraft?

fringe hemlock
#

does 1.8.8 buildtools still not work?

outer sorrel
#

would that be possible in plain spigot or would i need a bungeecord plugin installed too

torpid sapphire
#

so theres really no way other than just checking for every possible item

dim bronze
#

The maximum durability of an item is set somewhere

#

hang on

lilac cobalt
torpid sapphire
#

Material#getMaxDurability() is a thing, might work

dim bronze
#

yes

#

that's what I'm looking for

#

that's whats set for all damageable items

sonic goblet
#
            String[] args = entry.getValue().split("_");
            double weight = Double.parseDouble(args[2]);
            items.add(weight, entry.getKey());
        }
        for(int i = 0; i < amountOfItemsToGet; i++) {
            ItemStack is = items.next();
            String[] args = allItems.get(is).split("_"); // allItems.get(is) is returning null :(
            is.setAmount(Main.ranNum(Integer.parseInt(args[0]), Integer.parseInt(args[1])));
            outputtedItems.add(is);
        }```
Anybody know a reason allItems.get(is) would be returning null?
#

I checked and allItems is populated with all the itemstacks I want

torpid sapphire
drowsy helm
sonic goblet
#

Ya thats the goal xd

dim bronze
#

therefore items.next() will return null

#

and unless there is a null key in allItems so will the get call

dim bronze
# fringe hemlock Has anyone found a fix yet?

like elgar said, the 1.8 hosting is down apparently. not sure there is much you can do. paper might host it differently, so you could try paperclip (I forget how theirs works so you'll have to check)

fringe hemlock
#

okie

wet breach
#

Probably a good thing 🙃

sonic goblet
#

But the only "modification" that gets done to the itemstack is adding it from the HashMap to a list

wet breach
#

Or does not contain a null value

#

As stated above. Hashmaps are allowed 1 null key as well

wind tulip
#

Hello, does anyone know why I'm getting this error:

All I have in this yml file is

vars: '{"hi":{"val":"goodbye","type":"TXT"}}'```

And the code for this is
```java
if(varConfig.getConfig().get("vars") == null) return;```
echo basalt
wind tulip
river oracle
#

Just use json then

wind tulip
#

I already have a class for saving stuff in yml files

#

who cares

wet breach
# wind tulip I am serializing and deserializing using jackson

Well your definition of serializing is different then because that isn't serialized. Anyways the problem is the : characters. You need to use double quotes. Also note yaml is a subset of json as well and should be able to convert from one to the other easily

#

If it were me I would just serialize that json stuff into a base64 string.

wind tulip
#

yeah well I never asked about that but thanks for the solution 👍

wind aurora
#

I get error:
Operator '/' cannot be applied to 'double', 'org.bukkit.attribute.AttributeInstance'

At line 22
How can I fix this?

drowsy helm
#

playerMaxHealth isnt a number vlaue

round finch
#

org.bukkit.attribute.AttributeInstance not a number

wet breach
#

Problem is maxhealth isn't an int. It is a string. So use Integer class to make it one.

round finch
#

In Java, we can use Integer.valueOf() and Integer.parseInt() to convert a string to an integer.

glad prawn
#

Change AttributeInstance to double 🤔🤷

ivory sleet
#

Above code doesnt use a string tho?

#

p.getHealth()/maxPlayerHealth.getValue()*10

#

is presumably what you’re looking for Id say

glad prawn
#

Yep.

wet breach
ivory sleet
#

Ah fair enough

glad prawn
#

double maxHealth = p.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue();

ivory sleet
#

Yeah

#

Like that

round finch
#

nice!

earnest forum
#

is "orb" a typo or did you actually try to import that?

wide fern
#

sorry, i deleted it bc i solved it and it didn't register you were talking to me and not asking your own question

#

i did mistype org, only here though, im not entirely sure what i did tbh, but i think i made a new project and then intelji coppied everything? idk tbh

#

its working now though

#

maybe im missing something, but for the tab complete override doing a command, it works for the first argument, but once it's done, it starts suggesting online players still, is there a way to fix that?

cobalt thorn
#

Hi a question for md5 hastebin for making request i need to use as User-Agent: Hastebin Java Api as a normal Hastebin or something else?

wet breach
#

Hard to know what you are asking

cobalt thorn
#

When you try to do a request in the official hastebin website you put as user agent Hastebin Java API

#

Or something else

wet breach
#

You could. But I am not aware of hastebin hosted sites caring about the user agent

#

Unless you mean actual hastebin site. In which case not entirely sure

cobalt thorn
#

I mean the md5 version

wet breach
#

?paste

undone axleBOT
wet breach
#

You mean that?

cobalt thorn
wet breach
#

Not entirely sure. Don't think it really matters. Try it and see

wind aurora
#

How could I set up a code that sends an action bar about every second or so and lasts as long as the player is online?
Here is what I'm trying to send.

p.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent("Health: " + playerScaledHealth));
crimson terrace
#

?scheduling

undone axleBOT
quaint mantle
#

yeah but i want accurate blockdata (I have oak trapdoor in blocks) thanks

vital sandal
#

why pp write codes likes this ?
i have no clue about the benefit of it

#

and an example of why should i code like that is great

wet breach
#

Are you referring to the comments?

#

If so comments are useful ways to add information for yourself or others. It isn't required either

jagged monolith
#

Comments are one of the most important things in coding

hybrid spoke
#

but why tf under the refering statement

glossy venture
#

but that shouldnt matter except when using CraftBukkit classes now because the net.minecraft.server package is now version independent

glossy venture
molten hearth
#

I find comments to be one of the most annoying and irrelevant things

#

I only comment what is explicitly hard to understand when looking at it

#

If I have a method called sumStats and it loops over the players stats there is no need to comment anything imo

earnest forum
#

if you are writing the code it is much easier to understand

#

but think of it objectively

#

somebody whos never seen the code before

#

and is looking at it

#

do you think they would fully understand it?

#

comments just help reinforce understanding and provide context for where there isnt

#

theyre extremely helpful and better to have than not to have

tardy delta
#

None

hybrid spoke
tardy delta
#

?

remote swallow
wet breach
#

Sure I know what happens in the method but that doesn't tell me what is using it.

quaint mantle
#

Did anyone tell me how I setup vote

hybrid spoke
molten hearth
#

ah yes

quaint mantle
#

Can anyone help me

hybrid spoke
#

?ask

molten hearth
#
/* Sums the stats */
public int sumStats() {...}
undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

hybrid spoke
# molten hearth ```java /* Sums the stats */ public int sumStats() {...} ```

no,

    /*
     * Bloating up like a bubble until a reachable block is found
     * The block itself might not be passable, but at least reachable from the outside
     *
     * NOTE: The reachable block is not guaranteed to be the closest reachable block
     */
    private PathBlock bubbleSearch(PathLocation target, PathVector[] offsets) {

for example

#
/*
 * alternateTarget - Whether to allow the pathfinder to end at a different block than the target if the target is unreachable.
 * NOTE: In most cases fallback is the better option since this can be in the worst case a very expensive radical operation
 * in addition to the regular pathfinding with only the goal to find an alternate target
 * no matter where or in what relation to anything.
 */
``` and where it is used
quaint mantle
molten hearth
#
/* Loops through the player stats and adds them all and returns the sum
 * 
 * NOTE: The stats will be treated as 0 if they are not set.
 *
*/
public int sumStats() {
    ...
}
#

that whole comment

#

is just

#

common sense

molten hearth
#

if you look at

#

the 2 words in the method name

wet breach
quaint mantle
#

@hybrid spoke you are a dev

hybrid spoke
hybrid spoke
quaint mantle
#

Ooo

wet breach
hybrid spoke
#

@ivory sleet

wet breach
molten hearth
#

I guess but even if you use github you can just search the method name and it tells you which files contain it

#

so unless someone is using notepad to look at your code it shouldnt really be a problem

quaint mantle
hybrid spoke
quaint mantle
#

Ooo sorry

wet breach
#

Sure, and I am not saying it needs to be documented in all cases where it used as well. It was just an example of how something can appear obvious but not be

quaint mantle
#

Do not warn me

#

@hybrid spoke sorry my mistake

molten hearth
#

One type of commenting I like is examples but that seems very specific to JS

#

usually I find those more useful than the actual comments but I've never seen them used in java lol

#

the only gud comment 😔

crimson terrace
#

never actually seen this. will use tho 🙂

#

except for the fact it doesnt actually exist in java

molten hearth
#

🤣

#

I just find that examples tell you a lot more than descriptions

crimson terrace
#

true, any idea where I can get one of those custom java doc tags?

molten hearth
#

well I found this but its a bit scuffed ```java
/**

  • This is an example to show usage of HTML pre tag while code snippet formatting in Javadocs
  • <pre>
  • public class Application(){
  • List<Integer> nums = new ArrayList<>();
    
  • }
  • </pre>
    */```
#

it looks a bit scuffed

mortal hare
#

sorting algorithm for turing's machine 😄

karmic mural
#

I feel like I am going insane. I have an if statement to check if a value matches something... Sometimes it doesn't work? I decided to print the value I am checking to see if it's correct, and it's identical. Specifically, I have items with a PDC that stores the string "UnformedVoid", which I check if the held item has when a player interact event is detected. The code is dead simple: java p.sendMessage("§2itemData: " + itemData); if (itemData == "UnformedVoid"){ new formVoid(e); } In the formVoid class I just print that "Hi, User how are you?" message, as a way to show it went through before I keep working. Anyone know what the issue could be? I am completely lost

eternal night
#

comparing strings using ==

tall dragon
#

use #equals

eternal night
#

is not a good idea

#

^

karmic mural
#

The item it checks is a crafted item, if it matters. When it works the item is freshly crafted, then something happens and it stops working

karmic mural
crimson terrace
#

compare strings with .equals()

karmic mural
#

Strange. Is there somewhere I can read about why this behavior happens? Why would it not be true when using '=='?

mortal hare
#

== compares the memory locations of the objects

crimson terrace
#

because using == it has to be the same object

eternal oxide
#

== compares memory address (instance)

mortal hare
#

but not the contents of the objects

karmic mural
#

Ah, thank you

#

Then that explains why it broke so quickly

tall dragon
karmic mural
#

and why items could be "fixed" by combining into a freshly crafted itemstack

mortal hare
#

"UnformedVoid" actually gets stored in java string pool, in practical terms its value gets stored before runtime, while itemData one is created dynamically

mortal hare
#

also you can override .equals() method to your code btw, so you can do some funky stuff with that

crimson terrace
#

you could make it only respect an id attribute for example

tall dragon
#

yea ^ you could for example make the check alot for performant if your object has an "id" for example

tardy delta
glad prawn
#

smort

tardy delta
#

only lookin bloat

tall dragon
eternal night
#

sshhh

#

large class files mean good developer

tall dragon
#

my bad, my bad

tardy delta
#

if java had pairs i'd just do (lore, consumer) = loc.isWorldLoaded() ? (a, b) : (c, d)

#

rust 🥺

#

anyone knows an answer on this tho?

remote swallow
tall dragon
tardy delta
#

why is that a string

tall dragon
#

so i can copy it from the console

#

and paste into my code

tardy delta
#

🤔

tall dragon
#

bigger file = better developer

hybrid spoke
crimson terrace
hybrid spoke
vale ember
#

with what periodicity should i spawn particles so that theres no blinking?

crimson terrace
#

or pepsi, depends on preference

molten hearth
#

technically, addons are just lines sold separately

hybrid spoke
#

and bugs attack you

#

and decrease your health

#

and once your health is <= 0 your ide just closes without saving

mortal hare
#

that's a hell of an LSD trip

crimson terrace
#

you can buy hp potions with gold earned by getting your plugins downloaded on spigot

hybrid spoke
#

how would my ide know that

crimson terrace
#

database

mortal hare
#

it used the "TRUST ME BRO" as a source of data

hybrid spoke
#

nah

crimson terrace
#

😮

hybrid spoke
#

one hp potion per test

#

and every method costs mana

crimson terrace
#

some bugs you can tame and turn into something called "Features"

hybrid spoke
#

just like every class

hybrid spoke
#

i need that plugin

crimson terrace
#

you want a plugin plugin?

#

minigame: Plugin development

tardy delta
hybrid spoke
#

with nice sounds and fancy visualization

#

like the super mario plugin

crimson terrace
#

we would need a texture pack for items and mobs

mortal hare
#

i've never realised how time-saving insert button on the keyboards can be

tardy delta
#

made it two lines shorter lmao

mortal hare
#

for the past 10-12 years of my computer usage, i've finally got it what it means 😄

tardy delta
#

what does insert button even do

mortal hare
#

lets say you have a text

crimson terrace
#

it can replace letters

hybrid spoke
tardy delta
#

ctrl + r

mortal hare
#

and you want to insert something without breaking the text alignment (if its space aligned)

#

you can press insert and replace the chars

tardy delta
#

im an expert in breaking text allignments

mortal hare
#

it should be called replace mode instead

crimson terrace
mortal hare
#

because the default writing mode is literally inserting chars at the positions

#

this is same shit as the naming of iceland and greenland

tardy delta
#

damn worldedits eval command is even slower than my expressionparser

mortal hare
#

flex

tardy delta
#

1+1 took like half a second

#

facts

crimson terrace
mortal hare
#

worldedit eval should be removed, prove me wrong

#

eval functions never been very safe in the past or the present

tardy delta
mortal hare
#

what if parser cant parse properly and the injected code could be passed?

tardy delta
#

log4j 🤡

mortal hare
#

it was a default config issue

#

not a bug afaik

tardy delta
mortal hare
#

i've saw a dude who glued sql statement to drop speed limiter's db tables somewhere on the net😄

tardy delta
#

🤔

remote swallow
tardy delta
#

this block looks cursed lmao

hybrid spoke
robust sinew
#

why does PlayerInteractEntityEvent not run when I right click an armor stand and what can I use instead?

hybrid spoke
tardy delta
hybrid spoke
robust sinew
#

ah ok

#

I googled it and couldn't find any difference between the two

karmic mural
#

I've been looking around a bit and can't seem to find it. Is there a way to entirely remove the displayname of an item? I tried setting displayname to nothing, which obviously didn't change anything. Then I tried just a space, but there's still something being displayed. Is it possible to remove entirely?

hybrid spoke
remote swallow
hybrid spoke
#

thats basically everything

#

except the thing that armorstands only fire the at event

vale ember
#

hey, so i am currently trying to draw 3d objects via particles in minecaft, but there is a problem: particles constantly disappear and reappear and that results in blinking. with what period should i spawn particles to minimize or remove blinking?

hybrid spoke
robust sinew
#

I'm interested now

karmic mural
hybrid spoke
#

maybe because armorstands cant naturally move

robust sinew
#

ah ok

mortal hare
karmic mural
mortal hare
#

why have filler items in the first place

#

it is because you guys try to find a lazy way to detect if an item is part of gui 😄 ?

#

this is what i call a GUI

tardy delta
#

not everyone is that fancy

#

my gui

heady spruce
#

Hello! I've got a problem, my messages are getting send twice, anyone got an idea?
My code:

 @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        if (GameManager.instance.getCurrentGameState() == GameState.PAUSED) {
            startReminderCountdown();
            event.getPlayer().sendMessage("Test");

            // Give player items
            event.getPlayer().getInventory().clear();
            event.getPlayer().teleport(new Location(Bukkit.getWorld("lobby"),0, 51, 0));
            event.getPlayer().getInventory().setItem(4, ItemBuilder.createItemMeta(Material.COMPASS, "KitSelector", null, 1));

            GameManager.getInstance().getPlayingPlayers().put(event.getPlayer(), 0);
            if (GameManager.getInstance().getPlayingPlayers().size() == 2) {
                Bukkit.getScheduler().cancelTask(reminderTask);
                startStartingCountdown();
            }
        }
    }```
glossy venture
#

will you build the resource pack dynamically

#

if so you can use filebin to automatically host it

tardy delta
#

some of the comments in the stash make me depressive

echo granite
#

Hello, I have an efficiency question.
I'm getting a list from the config from which I want to filter out illegal values, and then check if a material is there, the question is which is more efficient:

Way 1:

materials.stream()
.filter() //filter illegal values
.anyMatch(configMaterial -> configMaterial == material);

Way 2:

materials.stream()
.filter() //filter illegal values
.collect(toSet())
.contains(material);
tardy delta
#

collecting it and then calling ::contains would be less efficient in my eyes

dim bronze
#

then it would definitely be quicker since it would return early

echo granite
tardy delta
#

cant you just do material::equals as anyMatch predicate? :)

#

same thing

echo granite
#

well I prefer to keep my streams readable and divided into steps

tardy delta
#

as Material::equals calls == internally anyways

#

just making it fancy :)

keen basin
#

How can I get the open sign ?

tardy delta
#

what open sign lol

dim bronze
#

collecting to a set would require the hash function to be run for each material first, so it's definitely slower

hybrid spoke
#

always only compare enums by ==

echo granite
#

still no performance difference?

tardy delta
#

why would you

dim bronze
#

Collecting them first will always be slower

hybrid spoke
tardy delta
#

no need to collect it as you can just call anyMatch

hybrid spoke
#

the only thing faster and more efficient would be a for loop

tardy delta
#

^^

keen basin
hybrid spoke
#

or overengeenier and go native async

echo granite
#

thinking about it again, even if I collect into a O(1) contains collection, I still need to add all the stream elements into it - which is always less efficient

hybrid spoke
#

or even better make a c++ script

tardy delta
#

just make your plugin native and code it in c++ lol

echo granite
#

I will just use anyMathc

tardy delta
#

collecting is just slow

#

my head still hurts from looking to the stream impl

echo granite
tardy delta
#

heeheehee 💀

echo granite
dim bronze
#

for well defined objects a hashmap/set get call should always be O(1)

tardy delta
#

ReferencePipeline.Head brrr

#

not that worse as Math.pow atleast

echo granite
hybrid spoke
dim bronze
#

depends what the object is

hybrid spoke
tardy delta
#

Objects.hash 🤤

dim bronze
#
public class MyObject {
  private static int nextId = 0;
  private final int id;
  
  public MyObject() {
    id = nextId++;
  }

  @Override
  public int hashCode() {
    return id;
  }
}
#

kek

#

100% success

tardy delta
#

lets hope copilot has more talents with acf

onyx fjord
#

1.19.1 bukkit removed chat links right

mighty pier
#

how to register command on 1.19

#

never mined

sterile token
#

Anyone else love mongo?

sterile token
#

😡

tardy delta
#

i might actually use mongo

#

as now im using sql but theres no real reason for it

wary harness
#

So I got question what would be easiest way to make public api jar
Currently I use interfaces for each class and then I add methods which I want to make public
Thing is that it is annoying to have interface for each class

#

so any suggestions

sterile token
#

Yeah that is really painful

wary harness
sterile token
#

I used to read that information and its pretty cool

#

It helped a lot to understand more about exposing application api(s)

mortal hare
#

then downcast it if you need and replace field which holds the needed class instance with reflection

icy bone
#

Hello, im new to the server and I was wondering if this is the right channel to ask for help with spigot plugin code?

mortal hare
#

yes, but im currently busy rn so i cant help you

sterile token
#

I suggest reading the output from ?ask command and using ?paste command output url for sending code/snippets

icy bone
#

Alright thank you

#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

sterile token
# icy bone Alright thank you

Your welcome my guy, if need smth else just ask it. We are here to help each other. Sorry for my bad english but im not english native speaker - hahaha

icy bone
#

I'm working on a plugin that's like a racing game, I already got everything working from joining to voting to teleport players on a the vehicle (aka a pig) but i'm having one problem I cant solve right now.. I want to edit the speed/velocity of a pig. I still want to use the Carrot on a Stick, so i'm not looking to rewrite the whole driving mechanic, I just want it to move alot faster. I saw online that on max speed it walks around 5 blocks/sec, and that's to slow for me. I already looked around for events triggering Pig moves with the idea to get the velocity and multiply is but couldn't find it right now. Already used VehicleMoveEvent but that doesn't trigger on Pigs.

TL;DR Does someone know how to increase a Pig speed or an event that gets triggerd when you ride a pig and move?

onyx fjord
#

is anyone aware where i can find old i think bukkit code related to link detection in messages?

chrome beacon
#

You could just find a regex

#

Or do you specifically need the bukkit one?

sterile token
onyx fjord
#

ye i found it

#

what a mess

sterile token
#

Map#putIfAbsent(key, object) doesnt return put and return the object, in case it doesnt exists?

onyx fjord
#

cant i just parse url tho lmao

sterile token
#

Because i have done a method Object getOrCreate(String name) { return map.put(key, new Object(name)); } but then when i use it it returns null - LMAO java is so fucking 🤡 with some type of things

onyx fjord
sterile token
mortal hare
sterile token
#

So i have read that Map#putIfAbsent() will put the the object and return it, if the map doesnt contain it - So it musnt ever return null

tardy delta
#

check the docs

sterile token
#

I wouldnt be using it without reading the docs

tardy delta
#

lmao do you think im not checking the docs either?

sterile token
#

We started again... i could be dumb but im not idiot

tardy delta
#

why the question then

sterile token
#

🤔

tardy delta
sterile token
#

wait i think i missunderstand what i read

#

Let me translate it to spanish tho

#

🤦‍♂️

tardy delta
#

so itt only returns null when the wasnt present in the map

#

otherwise it returns the already present value

sterile token
#

Oh shit i missunderstand the docs, that the method look for the key, if doesnt exists it put inside the map and finally return the object your passed thru params

tardy delta
#

you can always check the impl yourself

sterile token
#

I have a nightmare now

#

I know that there was a map method which create the key and assign the value, if it didnt previously exists and finally return the value

desert loom
#

I believe you're looking for computeIfAbsent

#

something like that

sterile token
#

oh

#

Yes you are totally right

#

Really thanks for both of you

#

No it wasnt that because computeIfAbsent() ask for a function

tardy delta
#

still working at that claim plugin thing?

sterile token
#

Since june im with this shit

tardy delta
#

is that thing even working?

sterile token
#

yeah just having some small issues

#

I have been checking the docs, and definitly there is not method which: "check for key, if not exists create it and assign the value, to finally return the assigned value"

tardy delta
#

thats computeIfAbsent

#

takes a function, live with it

sterile token
#

but how would be to use it with an obj?

#

Giveme an small example

sterile token
#

Im reading that

#

And there is no example for objs

#

😡

tardy delta
#

what are you tryin to do

sterile token
#

check for key, if not exists create it and assign the value, to finally return the assigned value

#

But without having hundred of lines

eternal oxide
#

map.computeIfAbsent(key, k -> Object);

desert loom
sterile token
#

Oh thanks

keen basin
#

Guys why getType().getID() is deprecated ? i need it for sending packets

fluid river
#

cuz id is deprecated

fluid river
#

minecraft now uses minecraft:stone

#

not 1

sterile token
#

He is not working with items

fluid river
hybrid spoke
#

materials

fluid river
#

i guess

keen basin
fluid river
#

glass is 40

#

just use deprecated method ig

keen basin
fluid river
#

sad

hybrid spoke
#

what are you even trying to do

keen basin
fluid river
#

you can hardcode id's yourself tho

#

afair glass was 40

#

dirt 2

#

glowstone 89

#

maybe you can just find old chest id

#

and try to use it

keen basin
# fluid river glowstone 89

i know👀 but when i write it like 54 is the chest id but i get error
This > Field index out of bounds. (Index: 2, Size: 2)

fluid river
#

showyourcode

keen basin
fluid river
#

?paste

undone axleBOT
fluid river
#

verify yourself

fluid river
#

that's not cuz of id i guess

#

you are just filling packet wrong

vocal cloud
#

love to see it

fluid river
echo basalt
#

yo mike unrelated thing but I'm very sad

#

apparently I gotta switch plans to enjoy the gifted nitro

keen basin
echo basalt
#

rip my 5 bucks

rocky tree
#
AttributeModifier damage = new AttributeModifier(UUID.randomUUID(), "generic.attackDamage", 1, AttributeModifier.Operation.ADD_NUMBER, EquipmentSlot.HAND);```

Cannot resolve constructor 'AttributeModifier(UUID, String, int, Operation, EquipmentSlot)'
vocal cloud
chrome beacon
#

Looks like that constructor doesn't exist

#

?jd-s

undone axleBOT
brisk wasp
#

How do I make a crates menu with excellent crates/golden crates

chrome beacon
brisk wasp
fluid river
#

but size of writable integers buffer is 2

rocky tree
fluid river
#

so you can only write 2 things

#

not 3

keen basin
chrome beacon
chrome beacon
#

The Javadoc link you sent is for 1.19

#

The constructor probably does not exist in 1.12.2

rocky tree
wraith apex
#

Quick Question, how does one create a custom Async Event?

chrome beacon
wraith apex
#

Something similar to how AsyncChatEvent works

rocky tree
chrome beacon
sterile token
#

Which is the contract for not seeing anymore the shity Null annotation?

#

Because spigot api is so amazing that doesnt have contract in some methods

#

😡

chrome beacon
sterile token
#

I will have to read about them

tardy delta
#

the contract for not seeing anymore the shity Null annotation huh

sterile token
#

Because its really annoying having to use Objects#requireNonNull()

chrome beacon
#

You can just ignore the warning or do a null check

tardy delta
#

ConstantConditions, assuming youre talking about how to suppress the warning

sterile token
#

And i have try disabling those warnings thru the IDE and is not ignoring them

wraith apex
tardy delta
#

you shouldnt be ignoring them 90% of the time

wraith apex
#

thanks again!

sterile token
#

That why they exists!

tardy delta
#

contracts?

sterile token
#

🤔

tardy delta
#

talking about @Contract("_ -> fail") for example?

sterile token
#

Yeah

#

Spigot should use that, so you dont have annoying warnings telling you that x method can be null

chrome beacon
#

They won't magically fix the issue

#

The warning you're getting probably won't be fixed with a contract

tardy delta
#

^^ i see no reason to use those anyways

#

i only fixed one issue with using a contract annotation

#

i love how ij infers method contracts tho

rocky tree
chrome beacon
#

You need an example to use a constructor??

icy bone
#

Got a question, if read the ask command and told me to just put the question in the chat and not like ping others (seems logical to me because thats annoying to get spammed for). I do notice this chat is very active (Which is nice to see!) is it okay to sometimes like reply on the question to let others see it again, so it doesnt drown in all the talking? or should I just keep being patient?

tardy delta
#

its fine

chrome beacon
#

You can bump your question or create a thread. Just don't spam

hasty prawn
#

Replying to your question saying bump or something is totally fine if it wasn't answered and got lost

icy bone
#

Alright, then i'll wait a while and sometimes bump it so people who maybe know the anwser can help out 👍

sterile token
icy bone
#

Thread in discord? how does that work>

sterile token
#

There where is a #

tardy delta
icy bone
#

Oh wow, is this new to discord or something i just never saw before?

tardy delta
#

uhh its been here for a while

chrome beacon
#

A year maybe less

icy bone
#

Oh never knew this / saw this. Alright, I'll make a thread. Thank you very much

chrome beacon
#

Turns out they're newer than I thought

icy bone
#

Chance pig movements

sterile token
icy bone
#

Glad to hear that

quaint mantle
#

Hello There!

#

Could someone mind helping?

#

Havin troubles with end of parsing

#

currently this

#

`package me.renek.tp;

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

public final class Tp extends JavaPlugin {
public class Main extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
        Bukkit.getPluginManager().registerEvents(this, this);
        getLogger().info("Plugin enabled.");
    }

    @EventHandler
    public void onJoin(PlayerJoinEvent event) {

        Player player = event.getPlayer();
        Location location = new Location(Bukkit.getWorld("Lobby"), 1, -60, -1);
        player.teleport(location);

    }`
undone axleBOT
quaint mantle
#

The last }

fluid river
#

you need one more }

#

to close the class body

zealous osprey
#

Can't have a public class within another though, right?

fluid river
#

can

quaint mantle
zealous osprey
#

does the final make it possible?

#

ah

fluid river
#
public class MyClass {
    public class MyAnotherClass {

    }
}```
#

then in other code you do

#

MyAnotherClass anotherClass = new MyClass().new MyAnotherClass();

zealous osprey
#

wait you can, wtf, why did I think you werent able to ?!

fluid river
#

is this possible in java lol

#

before i used

#

MyClass myClass = new MyClass();

#

and

#

MyAnotherClass mac = myClass.new MyAnotherClass();

quaint mantle
#

Lmao fixed it by this

#

}

}   }
fluid river
#

What's your ide

quaint mantle
#

What?

fluid river
#

IDE

#

Eclipse, IntellIJ

river oracle
#

Or vscode

quaint mantle
#

intelijj

fluid river
#

NetBeans

river oracle
#

Damn 😞 intellij continue I guess

fluid river
#

it's not working

#

🙂

#

ye

#

wanted to type same thing

#

about static inner classes

#

static inner

quaint mantle
#

Why are always my plugins dont work :C

fluid river
#

cuz you bad at coding?

quaint mantle
#

Rude

#

._.

undone axleBOT
fluid river
#

learn java

#

FREE JAVA LESSONS

checkmybio

sterile token
#

Mongo doesnt parse UUID class?

quaint mantle
#

Bruh

round finch
sterile token
#

Because im saving a List<UUID> wihich is saved. But then is not loaded back

round finch
#

no way wtf

quaint mantle
#

Yeah super! Thanks for excellent support

#

👍

chrome beacon
#

There are other discords for learning Java

round finch
#

if you can't use {}

#

you have much to learn

#

open{

} close

#

that term i heard before

#

nested loops 😵‍💫

#

i truely need to search for it

#

sounds interesting

fluid river
#

that's developed to be "alternative" to inheritance

round finch
#

me like: Ludisurprise

fluid river
#

but i prefer "inheritance or everything in one class" over it anyways

#

just a design choice

round finch
#

Fava my farv programming languge

fluid river
#
public class Bycicle {
    public class Seat {

    }

    public class ByWheel {

    }
}```
fluid river
lilac cobalt
#

How do I keep track of data on players? Like assigning or incrementing a variable on a player when they hit someone

fluid river
fluid river
#

so it's not erased after restart

#

Maps for session storage

sterile token
#

Does Mongo not allow saving UUID into databases?

lilac cobalt
#

I'm fine with it being erased on restart

fluid river
#

maps then

lilac cobalt
fluid river
#

UUID#toString()

#

UUID#fromString()

sterile token
fluid river
round finch
#

@fluid river did you invent a new programming languge? brainpower

round finch
#

fava

fluid river
#

F# + Java

sterile token
#

I think he didnt learn java

fluid river
#

Fava

round finch
#

that sound so cool!

fluid river
#

i guess Rava would be better

lilac cobalt
#

I started with datapacks so i thought you meant literally storing it on a Minecraft map.. whew

fluid river
#

Rustava

fluid river
#

Rust++

#

in 10 years Rust#

round finch
#

@subtle garden did you remeber to check your plugin.yml

#

or what is the problem

fluid river
#
public HashMap<UUID, Integer> playerStatTrack = new HashMap<>();


// somewhere in your code
playerStatTrack.put(player.getUniqueId(), 1);```
sterile token
#

What? Translator got broken with that phrase

fluid river
#

Translate string to binary array

woven tide
#

hey guys when I use the schedule can I use it multiple times or only once?

fluid river
#

and store it

sterile token
fluid river
#

showcode

#

and exact problem

woven tide
#

no like the code is perfect

tardy delta
#

byte array

round finch
#

why Integer?
priority?

tardy delta
#

ez with a bytebuf

woven tide
#

but like whenever I use it multiple times it gets with errors

fluid river
#

show code then

fluid river
woven tide
fluid river
#

well i guess you can easily kill more than 127 mobs for some stat

woven tide
#

I changed the variable name tho

fluid river
#

so Byte won't suit me

#

well short is nice

#

for some stats

fluid river
woven tide
fluid river
#

idk what are you talking about

#

show your code

#

you can just store task to variable

#

and run schedule on it

woven tide
sterile token
#

Here we ago again with shity errors!! "Cannot invoke "java.util.Collection.toArray()" because "c" is null"

fluid river
#

:genius:

#

🤓

sterile token
#

Were the fuck "c" is cumming from?

sterile token
#

😡

sterile token
fluid river
#

who knows

#

it's your C

sterile token
fluid river
#

your list i guess

echo basalt
#

It's internals might have a c

sterile token
#

So what i can do?

#

Its not my fault

fluid river
#

you know

round finch
#

what lists is the best for some stuff?

#

to store in memory

brisk wasp
#

Nerds

fluid river
#

depends

round finch
#

quick question

fluid river
#

LinkedList is for looping

#

ArrayList is for searching element

round finch
#

hashmap?

sterile token
#

I dont even understand why its thrown

fluid river
#

that was not to you

#

well you can write each method on a new line

#

arraylist
.stream()
.sort()

#

and find line which throws error

#

you might have null list

#

or some of your lines are not uuid format

#

tho why don't you just use .toList()

round finch
#

avoid null listing?

#

sets?

fluid river
#

instead of collect()

round finch
#

i probably gotta look at the docs

fluid river
#

sets are not lists

#

i mean

#

lists are just category of collections

round finch
#

👍

fluid river
#

so you'd better ask about collections

#

not just lists

sterile token
fluid river
#

java8?

sterile token
#

No?

#

Everything setup to Java 17 thi

fluid river
#

hmm

#

strange then

round finch
fluid river
#

np lol

round finch
#

full pic?

#

seems more is connected below

fluid river
#

maps are also part of JCF, but don't implement collection

#

tho map's entrySet is a set so actually is a collection

round finch
#

wtf queue

fluid river
#

fifo collection

round finch
#

Damm so much stuff i gotta study

sterile token
#

🤡

fluid river
round finch
#

oh shet technical stuff

#

Computing and processing i mean