#help-development

1 messages · Page 218 of 1

pine forge
#

Well my time range is from 12000 to 24000 but it should be from 12575 to 23400

old cloud
#

tha'ts what I meant

pine forge
#

For some reason the english documentation has different numbers for when the moon disappears (167) and no time at all for when the moon appears

pine forge
#

and it seems more reasonable

#

now how do I adjust my moon angle function to this shortened time range?

kind hatch
#

Something doesn't add up here though. If the full cycle is 24000 ticks, one would assume that when you divide it in half, you get your two cycles, both at 12000 ticks. Sure you can subdivide those into sunrise and sunset, but just based off the numbers, the range of 12000-24000 should be enough.

#

According to that page, the moon is not "visible" for around 175 ticks which isn't much.

pine forge
#

The thing is that night is 9 minutes and day 11 minutes

pine forge
kind hatch
#

Hmmm, the odd part I find is that there shouldn't be an offset. The sun and moon are always opposite one another. Just because of how time is categorized doesn't change that fact, so your results being off by 10% or so is concerning.

pine forge
#

This is 24000. you can see how the sun is already very high

#

This is 12000, the sun is still very high

#

the moon cant be seen at both of these times anymore

void mason
#

Hi guys, little question. How can i check the blockstate of a block at a location ?

chrome beacon
kind hatch
pine forge
kind hatch
#

Half of it is showing at that time.

#

Meaning it's based on the center.

pine forge
kind hatch
#

But, if the starting value of 0 isn't good enough, then find a value that is and start from there.
Your overall range should still be 12000 ticks, but if you need to start at 11000, then by all means.

quasi patrol
kind hatch
#

Don't run that method asynchronously.

pine forge
#

The only explanation is that the sun moves slower than the moon

#

which explains the 9 minutes night

quasi patrol
pine forge
kind hatch
sharp crest
#

hi what is sweet berries name in spigot material api?

remote swallow
pine forge
#

When its night, the sky is sped up basically or the other way around

#

thats what im assuming

kind hatch
pine forge
#

Im saying the ENTIRE sky is sped up on night time and slowed down on day times

#

sun and moon

toxic sorrel
#

Is there a way/method/something to italicize or strikethrough a player name in a Spigot Scoreboard Team? Seeing as it's very possible to use any color you want on the Team i would assume it's possible somehow to use the other formatting codes.

kind hatch
#

I think the problem lies within the math.

tardy delta
#

i'm wondering if my plugin can connect to a mongodb server hosted on my pc, the two hosts are on the same local network

#

tried to set mongo host to "mongodb://<external ip of pc>:27017"

sterile token
#

Fourteen

#

Take a look about mongo cluster

#

I think that you have to use it, when you want to connect to mongo having 2 different servers

tardy delta
#

im going to host mongodb server on my pi anyways ig

sterile token
#

Ig?

remote swallow
#

i guess

tardy delta
#

i guess

sterile token
#

@sterile token

#

That is my ig

tardy delta
#

"who is pinging me"

#

lmfao

sterile token
#

did you ask for my instagram, ig?

remote swallow
sterile token
#

Yeah

tardy delta
#

just trying to connect my mongo instance to a server running on my pc

#

where client runs on pi

chrome beacon
#

Make sure there isn't a firewall blocking connections

#

Not sure if a pi has one enabled by default

tardy delta
#

service is running when i check with netstat

pine forge
#

It is correct at midnight

#

Its just about 10% off when the moon sets and when it rises

#

But you can try and search the issue, heres the code:

tardy delta
pine forge
kind hatch
#

It could just be poor documentation.

pine forge
#

or in other words, why can the sun be seen 2 minutes longer than the moon

white dew
#

Guys, I need your opinion. I have an item called "pig shooter", which, has the name suggests, is supposed to shoot pigs. My initial idea was making a projectile, like an arrow that if It hits the player, it spawns a bunch of pigs around the player (also gives slowness as a debuff)

next plume
white dew
#

second idea is actually spawning a pig on top of the players head and make them actually launch the pig in the direction they are looking

#

second idea sounds cooler, but I'm not sure

kind hatch
next plume
#

I dunno. I was talking about real life.

shadow gazelle
#

Alright so I've got the NBT part down for processing stuff from NBT schematics, but what the hell do you do to process the blocks?

#

It's just a giant thing of hex

sterile token
tardy delta
#

ah mongodb is not accepting remote requests by default

sterile token
#

You have to enabled it

tardy delta
#

might wanna make a free cluster thing

sterile token
#

I forget that, really sorry

sterile token
tardy delta
#

dont really care for now lol

#

better than running that shit on my pc for no reason

sterile token
#

IM being repesctfull with u

tardy delta
#

?

sterile token
#

Its mainly what i do with my 32 cores and 128gb ram machines

tardy delta
#

yes on my pc, so that shit shuts down whenever i close my pc

#

i could run it on my pc too

#

got 8 gigs ram

sterile token
#

Ik what you mean

#

I understand you

#

That why i use one my local severs

#

because whenever i stop the pc, all the severs that run my test plugins stop the db connection cuz of obviously reason as pc goes down, mongo sever goes down

kind hatch
#

Is this in a loop? I want to try and recreate this, but I don't know if this in in a listener class or not.

tardy delta
undone axleBOT
sterile token
undone axleBOT
quaint mantle
#

use an sql host

chrome beacon
quaint mantle
#

i hate the UI and the website feels so cramped

#

its also hard to find things in it

chrome beacon
#

I wouldn't say it's hard

sterile token
#

sql is shit💀

white dew
#

Hi guys, I'm making a plugin where you can have skills. I made a class called "PlayerPlus", which contains the player associated and the skills the player has. I was also thinking about implementing each skill on this class.

#

however, I suppose this would make the class very big

subtle folio
chrome beacon
white dew
#

hmmm, I think that makes sense

white dew
#

what do you think?

white dew
#

Interesting

#

I think you are right

#

makign every skill in the same class would make the code look ugly

#

and It would be more difficult to debug

#

I think

sterile token
white dew
#

ooooh, interesting

tardy delta
#

should i work with an username and password or certificate?

chrome beacon
#

I use username and pass because I'm lazy

#

Works just fine don't really need anything else

tardy delta
#

dont even know how to setup cetificate

chrome beacon
#

Same

white dew
#

:o

sterile token
#

And then

#

A profile user with a List<SKill>

#

And loop over each skill, calling the event or smth like that

white dew
#

I see

#

nice

patent fox
#

how can i teleport an entity while a player is on it?
teleport them both

white dew
tardy delta
#

lol running curl ifconfig.me on my pi thro ssh gives me the public ip of my pc

white dew
#

make so that every time the player you want moves, the player associated gets teleported to the other player location

patent fox
#

no, i meant when a player is a passenger

white dew
#

ooh

#

Idk, sorry :(

#

maybe teleport the entity and them set the player as a passanger to the entity, again?

sterile token
#

😂

tardy delta
#

doesnt make sense that public ip of pi and public ip of pc are the same?

vocal cloud
#

Ssh only exposes your public address if you first expose your pi to the public

#

You only have 1 public ip. When you open a port you specify a local IP that will have that request forwarded to it. So if you open SSH on 192.168.0.123 -> port 23. With a pub address of 1.2.3.4.5 if someone connects to 1.2.3.4.5:23 they'll be routed to the local ip of 192.186.0.123

tardy delta
#

so how can i get the pub ip of my pi 🤔

quaint mantle
tardy delta
#

exact same thing as when i google my pcs public ip

#

weird

quaint mantle
#

Your IP isnt resereved to your pc...

#

your IP is for your network

#

so if your raspberry pi is on that network then its the same ip

sterile token
#

And that what its?

tardy delta
#

ip6

sterile token
#

SHIT

quaint mantle
#

probably your public ipv6

sterile token
#

I have self doxed

#

💀

#

Also thanks for the one who deleted

tardy delta
#

did that 20 minutes ago too

sterile token
#

I was going to do that

quaint mantle
#

Tip: if it looks weird, dont send it

sterile token
quaint mantle
tardy delta
#

uh i clearly skipped networking classes

sterile token
#

But wait if its public, everyone can know it

#

🤔

#

I dont think it affect much

quaint mantle
tardy delta
#

how is my public ip not reserved for my pc 🤔

quaint mantle
#

because its to the network

#

Your PC doesnt generate a network connection

tardy delta
#

yes?

sterile token
#

That why my local severs works over a proxy network, so then they never leak private ips

quaint mantle
#

tracert

sterile token
tardy delta
#

i was playing a game in network classes so cant really say

sterile token
#

Oh intenet protocol

quaint mantle
tardy delta
#

win command

quaint mantle
#

The TRACERT diagnostic utility determines the route to a destination by sending Internet Control Message Protocol (ICMP) echo packets to the destination.

sterile token
#

Its for tracking intener packets

quaint mantle
#

I wonder if tracert would work on your proxy

hazy parrot
#

Probably not, proxies are made in a way to protect origin

#

It will tracert proxy isp

quaint mantle
#

yeah but i bet a poorly made one would be vulnerable

sterile token
quaint mantle
#

good job proxy

hazy parrot
sterile token
#

Mines are setup correctly, because my father works with base confidence information and a technich from his work have setup everything

#

It was an engeenier

hazy parrot
#

I mean, in most time it's "plug and play" kind of setup

#

There are already tools for that

sterile token
#

Imagine that i have lost one my router ip address and i cannot access his configuration dashboard

#

But as far its configured or protected so good, there is no way to tracert it to find the ip adress we assigned for it

#

I have tried everything, default gatway, tracking packets inbound and outbounds

tardy delta
#

dont you only need the subnet of your network to know the routers ip address?

sterile token
#

How?

#

Can u explain me

mighty pier
#

ipv4 very limited

sterile token
#

I reaslly need to find the router ip

tardy delta
mighty pier
#

tjats why i t doesnt really matter when it gets leaked

#

unless someone wants to ddos you

tardy delta
#

isnt router ip first available ip in the subnet too?

mighty pier
#

ipv6

#

funny words

#

i dont know what they mean

sterile token
# tardy delta

As i have said i try that but the proxy is setup between ISP moden and main router

mighty pier
#

++++

hazy parrot
sterile token
hazy parrot
#

Webserver can be ran in any ip in subnet

tardy delta
#

👀

#

only thing i remember from networking classes is how to calculate id and broadcast address of a subnet 💀

sterile token
#

My main problem is that the router i need to find the ip is in mode router

#

So its not so simple to find the ip

hazy parrot
tardy delta
#

ye

hazy parrot
#

.255 for ipv4

sterile token
#

goksi, do you have networking xp?

#

Would you like to give a small help?

hazy parrot
#

You already asked me if it's same thing xd

sterile token
#

ohh yea

#

we talked thp

#

I have mem problems so just ignore me

#

Drugs talks too much about me

#

💀

tardy delta
sterile token
#

Are u using mongo server on raspberry or from mongo cloud?

tardy delta
#

they give me a code example damn

sterile token
#

Yeah

tardy delta
#

mongo cloud tihing

sterile token
#

They give you everything

#

I have xp with that cloud

#

So if need smth just tagg me

tardy delta
#

ok it seems to work, only console being spammed with mongodb stuff

#

where would i need server api version for

sterile token
#

What?

tardy delta
#

in the code

sterile token
#

weird

tardy delta
#

just works with doing this

sterile token
#

never seen that from api version

#

💀

chrome beacon
#

I guess that's future proofing

sterile token
dire salmon
tardy delta
#

lets just do that then

sterile token
chrome beacon
sterile token
#

Mongo what use for working?

#

Ws right?

chrome beacon
tardy delta
#

dont even have that method in my ide lol

dire salmon
sterile token
#

Also why every shity udemy course, has mono audio instead of stereo? 😡 😡

chrome beacon
#

It wasn't

dire salmon
#

afaik this is what makes it run

        Bukkit.getScheduler().runTaskTimer(this, ParticlesGuiListener.SPIRAL_TRAIL_MANAGER, 0, 5);
chrome beacon
#

and how did you cancel it

tardy delta
#

ah im on 3.12.11 and there its just

dire salmon
chrome beacon
#

Sure

dire salmon
#

SpiralTrails Task, manager, gui listener

remote swallow
#

i found the location where ?whereami comes from

tardy delta
#

good good

sterile token
chrome beacon
#

I can't find it

sterile token
#

🤡

chrome beacon
#

Verano you drunk again

river oracle
#

He is always

chrome beacon
#

True

chrome beacon
dire salmon
#

how not bro

chrome beacon
#

Your start task method does infact not start the task

sterile token
chrome beacon
#

?scheduling

undone axleBOT
sterile token
#

Sorry for pinging you olivo

chrome beacon
#

No worries

tardy delta
#

hmm would this work to delete a home from an user object in the db which has a list of associated homes?

#

or do i need to users.updateOne or smth?

chrome beacon
#

You can find and remove in one operation

#

use findOneAndUpdate

tardy delta
#

but the table is a mongocoll<user> not home, user objects store homes

#

sec

sterile token
tardy delta
#

do i just need to set their homes back, but with the obj i want removed?

chrome beacon
#

Is homes an array?

tardy delta
#

their Document s are driving me crazy

chrome beacon
#

I've only used MongoDB with JavaScript

sterile token
chrome beacon
#

worked great

tardy delta
#

saved it as a document for some reason

#

lol

sterile token
#

Explain what you want

#

And i explain you

tardy delta
#

i want to remove a home from that user on the db

sterile token
#

Let ope na thread because

tardy delta
#

🤔

sterile token
#

Its better for me

#

Buit dont worry

dire salmon
#

stop task thing

sterile token
#

Fourten, you have a user collection right?

#

In user document, you have a list of home document right?

tardy delta
sterile token
#

yeah

#

better

#

ok

#

I understand now

#

And what you want to do?

#

Find a home via name and update it?

tardy delta
#

and remove it ye

sterile token
#

So you need how to update it and delete it

tardy delta
#

i guess

sterile token
#

ok

#

I will do pesudo code

tardy delta
#

dont tell me youre typing that on your phone

pine forge
sterile token
#

yeah

#

im on phone

pine forge
#

@kind hatch

public static void startChecking(Plugin plugin) {
    plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, () -> {
        for(Player player : plugin.getServer().getOnlinePlayers()) {
            long time = player.getWorld().getTime();

            //Check if nighttime
            if(time < 12575 || time > 23400) break;
            //Check if players yaw is on moons "orbit"
            if(Math.abs(player.getLocation().getYaw()) < 85 || Math.abs(player.getLocation().getYaw()) > 95) break;
            double moonAngle = getMoonAngle(time);
            player.sendMessage("Moon angle: " + moonAngle);
            if(moonAngle > 90) {
                if(player.getLocation().getYaw() < 0) break;
                moonAngle = 180 - moonAngle; // Moon Angle should always be between 0 and 90
            }
            else if(player.getLocation().getYaw() > 0) break;

            if(Math.abs(Math.abs(player.getLocation().getPitch()) - moonAngle) < 5) {
                player.sendMessage("You are looking at the moon!");
            }
        }
    }, 0, 20);
}

public static double getMoonAngle(long time) {
    time %= 24000; // 24000 ticks in a day
    return time / 24000.0 * 360.0 - 180;
}
sterile token
#

@tardy delta sorry its imposible thru cellphone, i will send you a link with basic CRUD operations with mongo

#

Extra info: Filters#gte() is used to make operations over nested documents

sterile token
#

fourten

#

Did you make it work?

twilit roost
#

when I do this on PlayerDropItemEvent, I see that hotbar "animation" item is getting dropped
but it isn't and nor is it being removed from my hand
why>

tardy delta
#

nah

quasi patrol
#

So, I made a discord channel that whatever command someone types, it is ran in game, but my only issue is that I have no clue how I would check for permissions especially since sometimes commands don’t have the permissions stuff inside the plugin.yml but instead just use haspermissions.

summer agate
#

Correct me if I am wrong, but I believe the permissions stuff in plugin.yml is mainly for convenience for server admins

dire salmon
#
BukkitRunnable spiralRunnable = new BukkitRunnable(){
                    @Override
                    public void run() {
                        makeSpiralTrail(2, 2);
                        Bukkit.getLogger().info("spiral task is running");
                    }

                    public void makeSpiralTrail(double radius,double height){
                        degree%=360;
                        for (Player player : Bukkit.getOnlinePlayers()) {
                            double radians = Math.toRadians(degree);
                            double x = Math.cos(radians) * radius;
                            double y = height;
                            double z = Math.sin(radians) * radius;
                            Location particleLoc = player.getEyeLocation().add(x, y, z);
                            player.getWorld().spawnParticle(Particle.FIREWORKS_SPARK, particleLoc, 0, 0, 0, 0, 0.1);
                        }
                    degree+=5;
                }
                }.runTaskTimer(Kingdoms.getInstance(), 0, 5);

what is wrong here? it says that incompatible types: org.bukkit.scheduler.BukkitTask cannot be converted to org.bukkit.scheduler.BukkitRunnable

#

true nvm lol

summer agate
#

Does plugin.yml handle that or do you have to enforce it yourself? Haven't dealt with permissions in a long time

#

Aye, thanks for the refresher

eternal oxide
#

permissions in the plugin.yml are registered and visible to permission plugins

dire salmon
#

so what method should i use to run it

eternal oxide
#

no real point

remote swallow
#

?scheduling

undone axleBOT
dire salmon
#

BukkitScheduler?

#

k

#

dawg

#

so something like this?

BukkitScheduler scheduler = Bukkit.getScheduler();
...
scheduler.runTaskTimer(Kingdoms.getInstance(), () -> {
  makeSpiralTrail(2, 2);
  Bukkit.getLogger().info("spiral task running");
}, 0L, 5L,);
undone axleBOT
sterile token
#

Sorry

#

I just need the url of scheduling

dire salmon
#

true lol

sterile token
#

💀

dire salmon
#

wat is DI

undone axleBOT
dire salmon
#

ah

remote swallow
#

would look something like the following

public class ClassName {
    private final MainClassName plugin;

    public ClassName(MainClassName plugin) {
      this.plugin = plugin;
    }
}
dire salmon
#

ok

remote swallow
#

forgot about that part

dire salmon
#

so

public class ParticlesGuiListener implements Listener {
    private final Kingdoms kings;

    BukkitScheduler scheduler = Bukkit.getScheduler();
    private int degree = 0;

    public ParticlesGuiListener(Kingdoms kings){
        this.kings = kings;
    }
...

                scheduler.runTaskTimer(kings, () -> {
                    makeSpiralTrail(2, 2);
                    Bukkit.getLogger().info("spiral task running");
                }, 0L, 5L);

then in main

@Override
public void onEnable(){
particlesGuiListener = new ParticlesGuiListener(this);
}
remote swallow
#

yeah

dire salmon
#

just ignore that degree thing

remote swallow
#

if its a listener

getServer().getPluginManager().registerEvents(new ClassName(this), this);

floral mantle
#

So I wanted to launch entity in air in the direction I look BUUUT it doesn't work and I don't know why
attacked.setVelocity(attacker.getLocation().getDirection().multiply(3).setY(10));

it pushes the entity to where i'm looking to but not in the air. how can i fix that? i was trying to find the answer for an hour or so :(

remote swallow
#

if its the var getServer().getPluginManager().registerEvents(particlesGuiListener, this);

dire salmon
#

before yall say me to do DI lol

remote swallow
#

yeah thats correct

dire salmon
#

this.getServer().getPluginManager().registerEvents(new ParticlesGuiListener(), this);

#

so i can remove the first this?

remote swallow
#

^^

#

if its the var, you just need the var name

dire salmon
#

i meant this this

#

good

quasi patrol
#

Ye but it runs through console since idk how else to do it with 0 player’s online and so it basically bypasses the permissions anyways.

dire salmon
#

he did it?

floral mantle
#

let me try move it around

dire salmon
sterile token
#

this is used to refer to none static fields, methods

dire salmon
#

i guess you have to get eyeDirection OuO

floral mantle
dire salmon
#
                attacked.setVelocity(attacker.getEyeLocation().getDirection().multiply(3));
sterile token
undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

dire salmon
floral mantle
dire salmon
#

ye wait

floral mantle
#

Y-velocity doesn't work in any way in this. Even if I look upwards and hit mob

dire salmon
#

no? should work

floral mantle
#

wym?

#

wouldn't it just teleport it?

dire salmon
#

ye it would

floral mantle
#

so yeah

agile anvil
#

but it still win't solve the problem

dire salmon
#

well it does in particles lol

floral mantle
#

can the problem be in paper server?

dire salmon
#

nah

agile anvil
#

try applying a Vector of 0 10 0 to the mob just to see if it throws the entity

remote swallow
#

paper is a fork of spigot

floral mantle
agile anvil
#

Oh wait, are you setting the velocity in an event like damage entity event ?

remote swallow
floral mantle
#

uh huh yeah

agile anvil
#

if yes, try applying this velocity but one tick after the event

chrome beacon
#

Taking damage will reduce the velocity

floral mantle
#

bruh, how to make delays?

chrome beacon
#

?scheduling

undone axleBOT
floral mantle
#

im so stupid sry

dire salmon
#

runnable prob

chrome beacon
#

Make it run next tick

remote swallow
#

scheduler better imo

floral mantle
#

scheduler.runTaskLater(plugin, ...

what do i need to put in plugin?

dire salmon
#

instance of your main class

#

?di can help

undone axleBOT
eternal oxide
#

you can use runTask rather than runTaskLater.

dire salmon
#

yea

floral mantle
#

oh i see yeah

eternal oxide
#

runTask will schedule it for the next tick at the earliest

#

use runTaskLater if you need more than a 1 tick delay

marsh moat
#

any idea why?

agile anvil
marsh moat
#

It keeps loading on the cloudflare part

#

I have brave browser, that's all i have

agile anvil
#

well, try removing all cached files. that's all you can do I guess

marsh moat
#

Nope

#

I turned off brave shields as well

#

It works on Google Chrome but not on brave...

sterile token
white dew
#

Hi guys, What would be an efficient way of implementing cooldowns on given skills? My idea is to create variables that tell if some skill is on cooldown I set the isOnCooldown to True, and set an scheduler to set It to false after some time

#

this is easy to do, but I'm not sure if Its the most elegant approach/useful

marsh moat
remote swallow
#

iirc brave is built on chromium, just like operagx

sterile token
#

brave is not comparable with Opera gx

#

I would compare brave as firefox

white dew
#

hmmm, I see

#

thanks

agile anvil
#

It all depends. if you want an animation etc to represent the cooldown (for instance send a message when not in cooldown anymore) you'll have to use a bukkit task. Otherwise if you only want to prevent an item in cooldown to be used, save the time it was lastly used, and compute a difference with actual time

white dew
#

ah, I see

floral mantle
dire salmon
#

nice

#

well i got some errors while doing di
https://hastebin.com/iniqafaked.typescript

the main class:

private static Kingdoms i;

    @Override
    public void onEnable(){
        //init
        i=this;

        ParticlesGuiListener pgListener = new ParticlesGuiListener(this);
...

the listener

    BukkitScheduler scheduler = Bukkit.getScheduler();
    private int degree = 0;
    private final Kingdoms kings;

    public static void ParticlesGuiListener(Kingdoms kings){
        this.kings = kings;
    }
...
#

why does it says it require no arguments if i put Kingdoms as argument

remote swallow
#

remove the static void

#

just public ClassName

undone axleBOT
dire salmon
#

lol

sterile token
#

I agree with zacken

#

Sorry if sound rude

dire salmon
#

naw

trim creek
#

It sounds rude.

#

imo

sterile token
#

But bro you musnt code without learning the basics from java

dire salmon
#

i know coding, but coding without an IDE is kinda sad lol

trim creek
dire salmon
sterile token
#

I mean even more simply, not even without knowing the modifiers

#

Modifiers are essentially the most basic thing you have in java

dire salmon
agile anvil
trim creek
sterile token
trim creek
#

xDDDDD

sterile token
#

paper api is even worst

trim creek
#

Tought tho xd

sterile token
#

oh i forgot that haha

trim creek
#

holy fuck thats something I would not try i guess

sterile token
#

Yeah coding paper will make you left plugin coding

dire salmon
#

lmao im coding in github.dev

trim creek
#

i do game dev stuff but i use C# and not Java to code an entire API

sterile token
trim creek
#

i am lazy to do APIs

dire salmon
sterile token
#

oh ok

trim creek
#

is Eclipse an option here?

#

or pc too potato to handle that as well?

sterile token
agile anvil
sterile token
#

Eclipse 💀 💀 💀

trim creek
dire salmon
trim creek
#

and yes I use Eclipse because InteliJ is too weird for me, and my PC barely would run it :)

#

I need to agree. :D

trim creek
sterile token
#

Hahah in my case i used to had really bad xp with eclipse, but when i first started to work with Intellij having 4gb of ram on pc was a fucking mess. And then finally moved from 4gb into 64gb

dire salmon
#

i dont

sterile token
#

WFT¿?

trim creek
#

i have 8gb atm, but afaik thats still not enough

sterile token
trim creek
dire salmon
# sterile token WFT¿?

basicaly: a guy hired me to make him a plugin (bc he saw that i code for almost 2 years), so i code, build, give for someone to test, if it works, good, if not, fix and repeat

trim creek
#

im almost a grown man btw .-.

#

"by the law"

#

fuck the law

sterile token
#

I have downloaded more ram tho i can send the file

trim creek
#

law is an enforement 💀
I serously hate it

remote swallow
trim creek
#

btw i really dont care about age lol

sterile token
#

Weird, here you are adult having 18or +18

trim creek
#

in most cases

dire salmon
#

didnt even see the staircase i made before lol

trim creek
#

they are viruses

#

proof?

sterile token
#

I think that download more ram is a meme

dire salmon
trim creek
#

oh wait you can make SSD into RAM in Windows 10

#

.-.

agile anvil
#

gift

trim creek
#

XDDD

dire salmon
#

dawg

trim creek
#

"This isn't a scam, there isn't a virus, it's just a joke website. Made in jest, keep smiling" - bottom of the site :3

dire salmon
#

anyways i think its in github

sterile token
#

I never did something so big with C#

#

I mostly used it to make spywheres

trim creek
#

Use C or C++ instead.

#

C# is not really ideal for that

dire salmon
sterile token
#

Yeah, self doxing my self about what i have done

dire salmon
sterile token
#

I defintly be drunk on that momment

trim creek
#

and I approve it

#

TO BE GOOD :D

#

nah

#

I hate loops

dire salmon
#

this was an atempt to make particle spin around player

#

loop didnt work lol

river oracle
#

What is a loop

trim creek
#

bruh

dire salmon
#

i didnt know to make in that situation

trim creek
#

or maybe forever

river oracle
trim creek
#

like repeating a YouTube or Spotify music

sterile token
#

Why loop? Definetly use a while!

trim creek
#

idk what even a while is

#

🤣

#

never ever used them anyway lmao

dire salmon
#

z = sin(radians)*radius
x = cos(radians)*radius

#

nah i use while(true)

trim creek
#

Do you want to crash your server?
Because this is how you do it. :)

sterile token
#

while (true) Thread.sleep(); 💀

trim creek
#

Thread.sleep(); basically stops the main thread, and so, pauses the whole server, and crashes it because of no response lol

#

I tested it

#

it was hilarious

agile anvil
#

No I'm sire zacken is a smart boi and use Thread#sleep in a newly created thread

trim creek
#

bruh

#

I heard you can have a max TPS of 40

dire salmon
#

russian roulete
if(threadlocalrandom(0,6) == 3){
while(true){
Thread.sleep
}
}

trim creek
#

I just never realise dhow

#

but Thread.sleep crashes szerver

#

and is bad

#

veri veri bed

#

B. R. U. H.

#

x2

dire salmon
#

Math.random

sterile token
#

Please fix me this dude is when working over spigot its better using smth like a service executor or spigot scheduling?

river oracle
#

getShopLocation > shopLocation

#

I'm right admit it

dire salmon
#

hes not

trim creek
#

if shopLocation is represented as getting the shop location

river oracle
#

Blegh records suck

trim creek
#

its... eh.

#

get sounds better

sterile token
#

No need to name declarations with shop keyboard, its already understandtable that is for shop cuz of the object name

#

LMAo you defintly want to swear

#

Just do it bruh

trim creek
#

You are a master at life.

river oracle
#

I haven't used them even though I probably should I still make immutable classes

sterile token
#

I wont wanna follow you

agile anvil
#

Don't you guys prefer a() ?

trim creek
river oracle
#

This is surprisingly a good attitude

dire salmon
#

i dont even know what is a record

trim creek
#

bruh same

dire salmon
#

o

agile anvil
trim creek
dire salmon
#

16 or 17 iirc

agile anvil
trim creek
#

?

agile anvil
#

i decompiled minecraft and it's written like that so I assume real pro badass devs names their methods with letters

trim creek
dire salmon
#

best semicolon

agile anvil
#

no way, no one would do that for sure 🥸

#

I know... well It's a running joke...

#

and it's called obfuscation for info

sterile token
#

This is menu api implentation its pretty cool

MenuPlugin plugin = (MenuPlugin) getSever().getPluginManager().getPlugin("MenuPlugin");
if (plugin == null) return;
A a = plugin.getA();

B b = a.newC().a("&6Users").b(3).c(27, new C(itemstack, ClickType.RIGHT, (d) -> d.getPlayer().sendMessage("Stop")).e();

a.getA().a("users", b);

b.f(event.getPlayer());
#

Sorry i sent wrong code

agile anvil
#

Here I see a pro badass developer

trim creek
sterile token
#

I sent the obf one

#

Its a builder

#

Skidding ImIlussion coding ideas

#

I have literally skidded his menu impl

#

🤣

#

Also zacken, coding like that its not really diff

#

Just need to have clarify what means each letter

#

😂

white dew
#

Ayo, I need suggestions 🤔 🤔 . I'm making a plugin where you can MILK any entity and get powers when you drink It. For now, we have chicken milk, that gives you slow falling and pig milk, which gives you the ability to shoot pigs that give slowness

#

I'm looking for ideas for abilities that certain mobs are gonna give

white dew
#

yeah

sterile token
#

Oh nice

white dew
#

how did you find out?

#

Haha

sterile token
#

Im from UY and i fallao portuñol

white dew
#

oh, yeah, my description

#

I just realized

white dew
#

awesome

sterile token
#

Hahaha

chrome beacon
#

Verano: the drunk all seeing eye

dire salmon
#

true

dire salmon
white dew
#

I need something creative and epic

#

Haha

chrome beacon
#

make it so other players can shear you to get wool

white dew
#

oooh, this can be cool

dire salmon
#

so the players get naked?

white dew
#

I need some type of buff for the player tho

sterile token
#

Dont ask me why i have the thing for knowing alchool

#

👉 👈

chrome beacon
white dew
#

ooooh

#

and maybe get regeneration, or something

#

right?

#

when they eat the grass :o

agile anvil
white dew
#

oooh

agile anvil
#

or you explode in the end

sterile token
#

💀

white dew
#

aah, yea, maybe, but I think I liked the grass eating idea

agile anvil
#

are you talking of......

white dew
#

including villagers and players

agile anvil
#

okayy okay

white dew
#

Ahahaha

agile anvil
#

i see

sterile token
#

Shuting down intenet

white dew
#

Haha

#

idk, I'm gonna think a little bit more

#

but thanks for the ideas

sterile token
#

haha my ideas was just to see ur reaction

white dew
#

Hahaha

dire salmon
#

milking player gives u a children lol

#

mining fatigue too

sterile token
# agile anvil i see

What do you think about programming a simple plugin that only contains lowercase and uppercase letters, for declarations, methods, constructors, class names, class inners and then upload it to spigot? Just to see ppl reaction when they try to fork it

dire salmon
#

greek question mark better

agile anvil
sterile token
dire salmon
#

i talk math greek

sterile token
#

I used to work for a Greek sever and imposible to work with them because all spoken that greek which doesnt have translation

dire salmon
#

so you wanna XVI with me?

#

XVI 📷

#

nvm lol

#

video

#

lmao

sterile token
#

I have some of my gf media

dire salmon
#

😨

undone axleBOT
remote swallow
#

was just about to do that

dire salmon
#

lmfao

sterile token
#

what i wont send it obviously

remote swallow
#

just grannomg tjos

#

i can english

#

100%

agile anvil
#

what the heck guys 😂

dire salmon
#

haha

sterile token
#

I mean everybody is joking right now

#

Why wouldnt i joke tho

remote swallow
#

because your a serious person

dire salmon
sterile token
#

I also im not stupid to send that type of content

remote swallow
sterile token
#

I can go to jail bruh

agile anvil
#

wow guys I won't joke with you anymore

sterile token
dire salmon
#

youre always

sterile token
#

Enough jokings for today, it's time to stop fucking around. Before I end up banned

dire salmon
#

lol

sterile token
#

If your message get losts open a thread

#

Its better

shadow gazelle
#

Oh right

sterile token
#

I mean opening thread is better because the message wont get lost

shadow gazelle
#

Reading the Data in NBT Schematics

#

Might be finished executing in a few hundred years

dire salmon
#

weak

hazy parrot
#

Now new Thread() in most nested loop

dire salmon
#

setAi(false) lmfao

hazy parrot
#

And will be alright ig

dire salmon
#

lmao

sterile token
#

Is there a way if checking an number input is "null" ?

#

Because from what i know int is never null

dire salmon
#

if(input !.equals(null))

hazy parrot
dire salmon
#

ye lol

sterile token
#

Inventory

hazy parrot
#

?

dire salmon
#

i tought we were making bad code lol

#

lmfao

agile anvil
#

Why writing 1E+3 when you can write 1000?

#

or even 1E3

sterile token
#

Inventory has maximium 6 rows right?

#

its a question btw

dire salmon
#

nvm lol

agile anvil
#

6 lines

#

9 rows

dire salmon
#

ye

#

no

#

6 rows

sterile token
#

rows == lines

dire salmon
#

9 slots for each

agile anvil
#

mb

sterile token
#

oh ok

agile anvil
#

6 lines

dire salmon
#

57 slots in total

agile anvil
#

9 columns

dire salmon
agile anvil
#

yeah I agree, but for < 4 it's quicker to type the zeros

#

it's a double

#

write 1000 it will work

dire salmon
#

yall weak in coding

public class Main {
    public static void main(String[] args) {
        try {
            Thread.sleep(Integer.MAX_VALUE);
            //entire code in the project
        } catch (Exception e) {
            System.exit(0);
        }
    }
}
topaz cape
#

people i need help with my project

agile anvil
#

?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!

topaz cape
#

i need to use jdk17 and compile in 1.8

#

setting source and target didn't work out

agile anvil
#

you can't

drowsy helm
#

You have yo use jdk 8 then@

dim bronze
#

Why are you compiling to java 8 anyway

drowsy helm
#

And is this with maven?

topaz cape
#

because it's a lib that should support 1.8 - 1.19 and it refuses to use 1.17+ without jdk17

#

and yes it's with maven

drowsy helm
#

If you’re using intellij make sure it’s on your project setting aswell

dim bronze
#

You should still be able to run a plugin targetting java 8 no?

#

the server just has to run on jdk 17

agile anvil
#

java is backward compatible, so if you compile in java 8, java 19 could still use it

topaz cape
#

maven marks it as "inaccessable"

agile anvil
#

show us your pom

#

?paste

undone axleBOT
topaz cape
#

go to 1_17_R1

#

i have version in it set to 1.8

#

what are you doing

sterile token
topaz cape
#

bruh

sterile token
#

what?

agile anvil
#

Mc versions are such a pain

topaz cape
#

i know 😦

sterile token
agile anvil
#

my advice: drop older versions

topaz cape
#

no

#

bad advice

sterile token
agile anvil
#

(since the name is MODERNdisguise you are allowed to lead everyone into newer versions 🥹)

sterile token
#

So you will force ppl moe to newers versions when they realize you are not supporting then anymire

topaz cape
#

not because omg support the version i use only because i love it

agile anvil
#

bahahahah

#

you're refering to the people stuck in 1.8 I see you

#

it's like disabling android or ios auto update just because android 4 is better

#

fuck security vulnerabilities

#

new features

#

and improvements

#

but this debate is here since a long time and will remain, no need to argue anymore

naive bolt
#

How can i get an object of children in config.yml file

dim bronze
#

separate the name of each of the parents with a dot

#

getString("parent.parent.child")

agile anvil
#

grandparent.parent.child*

naive bolt
#

but i want to loop through each

dim bronze
#

getKeys(false)

naive bolt
#

ah ha

#

and i pass a boolean?

dim bronze
#

true will loop through every child recursively, false will only loop through the first level

agile anvil
dim bronze
#

thanks

naive bolt
#

im hoping to just list out all of the things in console like

parent:
  child1: "hi"
  child2: "hi"
  child3: "hi"
#

"Loaded "child1" from config."

dim bronze
#

get the config section of the parent, and loop through each of the keys

wet breach
rare rover
#

okay, i got this int amount = entry.getValue().size() - 1 == 0 ? 1 : entry.getValue().size() - 1; because if the size is 1 it'll be 0 and wont spawn anything so how would i fix this?

#

since that shows a warning

sterile token
#

How do i disable that when coding webs?

river oracle
#

what is "that"

#

the scrollbar?

sterile token
#

I mean its appear that bar like if you can type

#

Because its not a scrollbar

#

Its smth that didnt use to appear, its started this year

quaint mantle
#

Any good articles about making a Scoreboard and using Teams as well ?

rare rover
humble tulip
#

if i have a shulker placed with some PDC info and it's broken is the info transferred to the shulker item?

fluid river
#

it gets transfered to Item

#

which has #getItemStack method

#

and well here it is

#

i guess

worldly ingot
#

It doesn't, no

#

At least last I recall

#

Your best bet is to just... try it

humble tulip
shadow zinc
#

sup spigot need help with an error from one of my plugins that a user is currently experiencing

#

I figured out the line that this is occuring

#

so it happens here java if (cachedRedstoneActivity.size() > 0) { for (Iterator<Location> iterator = cachedRedstoneActivity.iterator(); iterator.hasNext(); ) { try { Location location = iterator.next(); Block block = location.getBlock(); BlockData data = block.getBlockData(); if (data instanceof Powerable) { Powerable powerable = (Powerable) data; powerable.setPowered(powerable.isPowered()); block.setBlockData(powerable); } else if (data instanceof AnaloguePowerable) { AnaloguePowerable analoguePowerable = (AnaloguePowerable) data; analoguePowerable.setPower(analoguePowerable.getPower()); block.setBlockData(analoguePowerable); } BlockData blockData = block.getBlockData().clone(); block.setType(block.getType());//HERE block.setBlockData(blockData); block.getState().update(true, true); } catch (Exception e) { throw new RuntimeException(e); } } }

#

my guess is that the chunk isn't loaded

#

would that be an alright assumption?

vocal cloud
#

Certified purpur moment

shadow zinc
#

I well them not to use purpur

#

but they insist

dusk flicker
#

do you list purpur as supported?

shadow zinc
#

I say 'server is server'

#

but is it because the chunk isn't loaded?

#

because wouldn't this fix it?

#
        if (cachedRedstoneActivity.size() > 0) {
            for (Iterator<Location> iterator = cachedRedstoneActivity.iterator(); iterator.hasNext(); ) {
                try {
                    Location location = iterator.next();
                    Block block = location.getBlock();
                    if (!block.getChunk().isLoaded()) { //here
                        continue;
                    }
                    BlockData data = block.getBlockData();
                    if (data instanceof Powerable) {
                        Powerable powerable = (Powerable) data;
                        powerable.setPowered(powerable.isPowered());
                        block.setBlockData(powerable);
                    } else if (data instanceof AnaloguePowerable) {
                        AnaloguePowerable analoguePowerable = (AnaloguePowerable) data;
                        analoguePowerable.setPower(analoguePowerable.getPower());
                        block.setBlockData(analoguePowerable);
                    }
                    BlockData blockData = block.getBlockData().clone();
                    block.setType(block.getType());
                    block.setBlockData(blockData);
                    block.getState().update(true, true);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        }```
hybrid spoke
#

just checked, depends on the version since in 1.8 f.e. #getChunk loads the chunk

agile fog
#

Hey!
Not really a spigot question, but why no results are returned from this query

val result = prepareStatement(
    """
        INSERT INTO dodge_user (kills) VALUES (0);
        INSERT INTO default_user (user_uuid, name, ip, dodge_user_id) VALUES (?, ?, ?, currval('dodge_user_id_seq')) RETURNING *;
    """.trimIndent()
).apply {
    setString(1, user.uuid)
    setString(2, user.name)
    setString(3, user.ip)
}.executeQuery()

RETURNING * should return the just created object. It actually works on Intellij console

#

but when executing...

org.postgresql.util.PSQLException: No results were returned by the query.
        at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:135) ~[?:?]
        at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52) ~[?:?]
        at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java) ~[?:?]
        at com.shiftmc.game.users.database.postgres.DatabaseAPI.createUser(DatabaseAPI.kt:61) ~[?:?]
        at com.shiftmc.game.users.database.postgres.UserController.createUser(UserController.kt:45) ~[?:?]
        at com.shiftmc.game.users.event.UserLoadingEvents.preLogin$lambda$2$lambda$1(UserLoadingEvents.kt:44) ~[?:?]
        at com.velocitypowered.proxy.scheduler.VelocityScheduler$VelocityTask.lambda$run$1(VelocityScheduler.java:228) ~[velocity.jar:3.1.2-SNAPSHOT (git-2d072151-b185)]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
ionic dagger
#

hi! was wondering what kind of tutorials you guys would suggest?

#

im already pretty familiar with java, have been using it for the past 3 yrs in compsci

#

but tbh id rather learn from a video series than scouring docs trying to figure out what to do

#

i see kodysimpson and codedred, but dont know if theres any actual recommended tutorials you guys have

vocal cloud
#

Besides the written ones the videos ones tend to be 25m to cover a 3m topic

agile fog
#

I've watched some kody simpson videos then just tryed making stuff.

#

Learned the basics with a youtube video, then just googled

ionic dagger
vocal cloud
#

A lot of video "tutorials" contain either lots of bad practice or spoonfeed people to death

agile fog
#

Yeah, most of then is just... Copy what i'm doing

ionic dagger
#

yea

#

theyre great to see how stuff was thought through tho

vocal cloud
#

Yeah, but they're built as if the person watching doesn't know java which increases their viewership

ionic dagger
wet breach
#

tutorials especially video ones should be showing or teaching the concept of something and show you an example of how to use it, not to necessarily copy from. Generally it is best to teach yourself in how to read documentation as well as to research and look to see how something is implemented. I routinely have discussions with people in regards to implementation and when they set out to actually look are quite surprised when something isn't implemented as they thought it would be 😉

#

this even includes Java API and the JVM

ionic dagger
#

i j hate being so clueless with programs

#

especially an api that i have no idea how to use yk

#

docs r always great but i feel a lot of times they dont provide enough practical information to know how to do something properly

wary topaz
vocal cloud
#

Jeez Louise

wary topaz
#

ikr

ionic dagger
#

thats repulsive

#

i love it

hybrid spoke
kindred path
#

Hey, for BungeeCord, what is the best event that exposes the server that the user had logged into on join?

shadow zinc
#

can I use an AtomicInteger for keeping track of indexing in my bukkit scheduler

sullen marlin
#

ServerConnectEvent?

#

There's not that mant events lol

#

Just look at them

shadow zinc
#

does return in a bukkit runnable end it or skip that iteration?

vocal cloud
#

If it's repeating return just stops that specific runnable but does not prevent another

#

You'd need to store the actual queued repeated task and cancel that

#

Or throw an exception but that's an ugly way to do it

ivory sleet
#

tho it might be smarter to use a singleton array or just a class that encapsulates a mutable int variable

shadow zinc
# ivory sleet yes

I decided to use a stack instead, having issues with empty stack exceptions tho

ivory sleet
#

well

#

what exactly are you doing?

shadow zinc
#

well first off the error is java [15:30:57 WARN]: [NeoPerformance] Task #111296 for NeoPerformance v1.14.2 generated an exception java.util.EmptyStackException: null at java.util.Stack.peek(Stack.java:101) ~[?:?] at java.util.Stack.pop(Stack.java:83) ~[?:?] at com.neomechanical.neoperformance.version.restore.HeartBeatWrapperNONLEGACY$1.run(HeartBeatWrapperNONLEGACY.java:36) ~[NeoPerformance-1.14.2.jar:?] at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.2.jar:git-Purpur-1839] at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[purpur-1.19.2.jar:git-Purpur-1839] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1500) ~[purpur-1.19.2.jar:git-Purpur-1839] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:486) ~[purpur-1.19.2.jar:git-Purpur-1839] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1424) ~[purpur-1.19.2.jar:git-Purpur-1839] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1194) ~[purpur-1.19.2.jar:git-Purpur-1839] at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:310) ~[purpur-1.19.2.jar:git-Purpur-1839] at java.lang.Thread.run(Thread.java:833) ~[?:?]

#

restoring redstone activity

#

chunking operations

#

💀 im actually special ed

#

why is the second line throwing a concurrent modification thing?

#
for (Iterator<Location> iterator = batch.iterator(); iterator.hasNext(); ) {//Line 41
                        try {
                            Location location = iterator.next();
                            Block block = location.getBlock();
                            if (!block.getChunk().isLoaded()) {
                                continue;
                            }
                            BlockData data = block.getBlockData();
                            if (data instanceof Powerable) {
                                Powerable powerable = (Powerable) data;
                                powerable.setPowered(powerable.isPowered());
                                block.setBlockData(powerable);
                            } else if (data instanceof AnaloguePowerable) {
                                AnaloguePowerable analoguePowerable = (AnaloguePowerable) data;
                                analoguePowerable.setPower(analoguePowerable.getPower());
                                block.setBlockData(analoguePowerable);
                            }
                            BlockData blockData = block.getBlockData().clone();
                            block.setType(block.getType());
                            block.setBlockData(blockData);
                            block.getState().update(true, true);
                        } catch (Exception e) {
                            throw new RuntimeException(e);
                        }
                    }```
quaint mantle
shadow zinc
# quaint mantle show full error
[15:55:51 WARN]: [NeoPerformance] Task #111459 for NeoPerformance v1.14.2 generated an exception
java.util.ConcurrentModificationException: null
        at java.util.ArrayList$SubList.checkForComodification(ArrayList.java:1415) ~[?:?]
        at java.util.ArrayList$SubList.listIterator(ArrayList.java:1284) ~[?:?]
        at java.util.AbstractList.listIterator(AbstractList.java:311) ~[?:?]
        at java.util.ArrayList$SubList.iterator(ArrayList.java:1280) ~[?:?]
        at com.neomechanical.neoperformance.version.restore.HeartBeatWrapperNONLEGACY$1.run(HeartBeatWrapperNONLEGACY.java:41) ~[NeoPerformance-1.14.2.jar:?]
        at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.2.jar:git-Purpur-1839]
        at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[purpur-1.19.2.jar:git-Purpur-1839]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1500) ~[purpur-1.19.2.jar:git-Purpur-1839]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:486) ~[purpur-1.19.2.jar:git-Purpur-1839]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1424) ~[purpur-1.19.2.jar:git-Purpur-1839]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1194) ~[purpur-1.19.2.jar:git-Purpur-1839]
        at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:310) ~[purpur-1.19.2.jar:git-Purpur-1839]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]```
shadow zinc
quaint mantle
#

Are you calling remove somewhere

shadow zinc
# quaint mantle Are you calling remove somewhere

Well there is this java dataManager.setRestoringRedstone(true); iHeartBeat.restoreServer(cachedData.cachedTeleport, cachedData.cachedRedstoneActivity); //The code of the hour cachedData.cachedRedstoneActivity.clear(); cachedData.cachedTeleport.clear(); dataManager.setRestoringRedstone(false);

quaint mantle
#

Do any of those contain batch

shadow zinc
#

batch is in that

quaint mantle
#

I dont see why you need to pop elements

#

Maybe that is your issue

#

Why not just iterate through them normally

shadow zinc
#

Because I want to do one batch at a time

quaint mantle
#

?

#

Is a simple list not good enough

shadow zinc
#

no, trying to deal with some performance issues

#

the list can get quite big

quaint mantle
#
        for (Player player : cachedTeleport.keySet()) {
            if (player.isOnline()) {
                player.teleport(cachedTeleport.get(player));
            }
        }
#

performance

quaint mantle
#

entrySet

#

I dont know why your code is throwing an exception

#

I think its something to do with that stack pop() though

rare rover
#

?paste

undone axleBOT
rare rover
#

how would i fix this?

#

code:

        net.minecraft.world.level.chunk.Chunk c = ((CraftChunk)chunk).getHandle();
        for (Player player : Bukkit.getOnlinePlayers()) {
            if((player.getLocation().distance(chunk.getBlock(0, 0, 0).getLocation()) < (Bukkit.getServer().getViewDistance() * 16))) {
                ((CraftPlayer) player).getHandle().b.sendPacket(new PacketPlayOutMapChunk(c));
            }
        }```
rare rover
#

Nvm, i fixed it

#

Just a minor bug

ionic dagger
#

how would i get rid of the enchantment.level.14?

#

would i have to change the way the enchantment is listed itself

#

lets not talk about the lore pls

sonic goblet
#

Bruh wtf people making these days 😭

ionic dagger
#

design decision fr

sonic goblet
#

You can use that to hide the enchant, then just readd the word “Impaling” with lore

ionic dagger
#

tysm

#

youre exempt from the stick of zest ❤️

onyx fjord
#

can i somehow loop thru each PDC element or set items PDC to some other PDC which is a variable?

woven tide
#

is it possible to get all the arguments after arg[0]?

onyx fjord
#

it will return all items after first one

woven tide
#

ima try it out

woven tide
onyx fjord
#

show code

woven tide
#

ok

#

I tried this

#
ArrayList.sublist(1, ArrayList.size);
#

is it from java.util.ArrayList?

hazy parrot
#

So you can't just ArrayList.size

onyx fjord
#

you gotta use your arraylist lol

woven tide
#

so... it's not for the command?

#

I mean like not for the commandexecutor

onyx fjord
#

idk what u mean

woven tide
#

nvm

#

okay then is there a way to make the other arguments only arg 1?

#

instead of their own seperate argument

hazy parrot
#

Just get subarray using Arrays.copyOfRange or smth and string join them

woven tide
tardy delta
#

imagine handling nulls

woven tide
#

for the "arr.length" do you mean args.length or its the same thing?

woven tide
#

so do I keep it that way?

hazy parrot
#

Or just string.join ig

tardy delta
#

String.join impl is weird

onyx fjord
#

i also need persistent data type

tardy delta
#

you need the persistent data type and the namespacedkey

chrome beacon
#

Ah right the get methods requires you to input a type

#

Maybe you don't want that

tardy delta
#

you manually keep track of those

onyx fjord
#

damn