#help-development

1 messages Β· Page 167 of 1

noble lantern
#

kick -> world-save -> shutdown

#

and other steps between

#

bungee tho

#

is different iirc

molten hearth
#

forcefully terminated -> timeout -> corruption is how I like it

tender shard
#

probably

#

is there any way to tell javadoc to exclude all methods with a certain annotation or certain javadoc tag? I have a custom annotation "Internal" and a custom javadoc tag called "internal" and I'd like to tell javadoc to NOT show those methods in the docs

#

I know there's the @exclude tag, but I'd like to have this added automatically to all methods that already have a certain tag or annotation nvm, it's only a proposed tag

#

I've tried javadoc's -nodeprecated option but it doesnt seem to exclude anything

#

I found out that @ hidden works but I don't wanna add this manually D: is there no way to tell javadoc that my custom tag "extends" @ hidden or make it based on actual annotations or anything?

brave pilot
#

???

tender shard
#

@ hidden pinged you

brave pilot
#

Oh lmao

tender shard
#

stupid discord

#

sry lol

brave pilot
#

πŸ˜†

torn oyster
#
    @EventHandler
    public void onSpawn(EntitySpawnEvent e) {
        if (e.getEntity() instanceof LivingEntity entity && e.getEntity().hasMetadata("gameEntity")) {
            AreaEffectCloud cloud = (AreaEffectCloud) entity.getWorld().spawnEntity(entity.getLocation(), EntityType.AREA_EFFECT_CLOUD);
            new BukkitRunnable() {
                @Override
                public void run() {
                    if (entity.isDead()) {
                        cloud.remove();
                        cancel();
                        return;
                    }
                    cloud.setCustomName(getProgressBar(entity.getHealth(), entity.getMaxHealth(), 8));
                    cloud.teleport(entity.getLocation().clone().add(0, 1.8, 0));
                    cloud.setCustomNameVisible(entity.getPassengers().size() == 0 && entity.isCustomNameVisible());
                }
            }.runTaskTimer(MinigameLib.getPluginInstance(), 0L, 1L);
        }
    }
#

how come this is not working

#

lmfao

#

it just doesn't spawn

#

i registered listener and stuff

young knoll
#

Are you sure the entity has the metadata by the time the spawn event is called

torn shuttle
#

oh my god

#

I never thought writing documentation could be this time consuming

molten hearth
#

my documentation: // yooo this works

chrome beacon
#

My documentation:

torn shuttle
#

It's been like 8 hours and I'm still editing the scrip thing

#

I don't even have all the actions down

molten hearth
#

perhaps its because these scripts look like writing assembly

#

the pain

#

YML Scripting

torn shuttle
#

Yep

molten hearth
#

I personally always preferred JSON

#

just looks more readable to me

chrome beacon
#

Why not just add JavaScript support

#

So people can do what they want

torn shuttle
#

Because the target audience only knows how to configure yml files

#

I'd rather they use the api

chrome beacon
#

They really don't

torn shuttle
#

You think people have been hiding the fact they know Javascript from me on a massive scale?

chrome beacon
#

50% of my support tickets are people who can't read
40% are people who can't format a yaml file correctly (They are included in the 50% above since the instructions show how to structure the file)

molten hearth
#

omg my config doesnt work

the config: eliteScript:Example: Events:- EliteMobDamagedByPlayerEvent Actions:- action: PUSHtarget: SELF vValue: 0,.3,0Cooldowns: local: 60 global: 20

molten hearth
#

its the most enjoyed programming language or something

torn shuttle
chrome beacon
torn shuttle
#

If I wanted easy I wouldn't have made this in the first place

molten hearth
#

he likes it rough

#

πŸ™

stoic vigil
#

is there a way to open a writable book to a player? thy already

fluid river
#

typical final fan

#

average don't give a shit enjoyer

molten hearth
#

relatable

warped escarp
#

Hey, how to send messages to all players who have messages == true in the database?

torn shuttle
#

is getting a potion effect type by key a new thing? someone's reporting a no such method for paper 1.17

#

I thought that was around for a while

warped escarp
#

I know how to make the statement but I don't know which one to make and which check to send to all the players

molten hearth
#
for(UUID playerUuid : uuidProviderFunction()) {
    Bukkit.getPlayer(playerUuid).sendMessage(...);
}```
civic wind
warped escarp
#

i delete the code (not all)

civic wind
#

You mean a config file or?

compact crane
#

Is it somehow possible to find out in the PlayerExpChangeEvent if it comes from a XPBottle? Or is there a kind of EXPPickUpEvent?

eternal oxide
#

?jd-s has a search box

undone axleBOT
warped escarp
pale pendant
#

how do i spawn a tnt thats 20 blocks high when a tnt exploded?

civic wind
#

getAmount() returns how much the player has picked up

#

Ah my bad , read it wrong , you want from the bottle specifically

compact crane
#

Yes

golden turret
pale pendant
#

k imma try to use this

#

uh the docs are too hard to see whats going on, can you give me a instruction of how to use it?

stoic vigil
#

jeah, thats a written book, but i need a writable book...

spice shoal
#

who can help me for create MySQL database and user?

molten hearth
#

Bruh

spice shoal
spice shoal
#

i tried to connect my database in Jpremium but ..

#

eads = 1, queued tasks = 0, completed tasks = 1]
[14:28:35 ERROR]: at java.base/java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2065)
[14:28:35 ERROR]: at java.base/java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:833)
[14:28:35 ERROR]: at java.base/java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1365)
[14:28:35 ERROR]: at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:479)
[14:28:35 ERROR]: at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:470)
[14:28:35 ERROR]: at com.velocitypowered.proxy.console.VelocityConsole.setupPermissions(VelocityConsole.java:94)
[14:28:35 ERROR]: at com.velocitypowered.proxy.VelocityServer.start(VelocityServer.java:231)
[14:28:35 ERROR]: at com.velocitypowered.proxy.Velocity.main(Velocity.java:64)

#

@molten hearth

pale pendant
#

look, were not the velocity server so uh join their server

chrome beacon
#

They won't help him since he's running a cracked server

spice shoal
#

why?

#

is a option

pale pendant
#

they only help with premium servres

chrome beacon
spice shoal
#

offline mode is a option

#

idc

chrome beacon
#

Offline mode isn't supported

#

Buy the game

spice shoal
#

i have lunar cosmetic and mc premium

#

lmao

chrome beacon
#

The use online mode

#

Also Lunar cosmetics don't matter

spice shoal
chrome beacon
#

You probably won't

molten hearth
#

Turn your server in online mode and go to the velocity discord and then get it fixed and turn it back off lol

halcyon hemlock
pale pendant
#

is it in a loop?

halcyon hemlock
pale pendant
#

the id of the player

#

to print

#

to the console

#

oh wait its a handler list id i think

halcyon hemlock
#

i checked and there was nothing i set to sout

pale pendant
#

can you give the code?

halcyon hemlock
#
org.bukkit.event.HandlerList@6387e6a9
halcyon hemlock
pale pendant
#

not that

#

for the handler list

#

that your using

halcyon hemlock
#

where do i get it

pale pendant
#

its your code

#

so you dont get it

halcyon hemlock
#

i dont use anything related to that pretty sure

#

oh my god nvm

#

im stupid

pale pendant
#

how many listeners do you have?

halcyon hemlock
#

System.out.println(e.getHandlers());

pale pendant
#

oh yeah

halcyon hemlock
#

thanks for the help

pale pendant
#

thats why i think

halcyon hemlock
#

i thought i cleared everything with system.out.println

pale pendant
#

yeah

#

you can uh

halcyon hemlock
#

oh another thing

pale pendant
#

?

halcyon hemlock
#

i have a bow

#

and i have a arrow

pale pendant
#

yeah?

halcyon hemlock
#

i set player to the shooter of the arrow

#

theres an event called

#

projectilehitevent

#

and

pale pendant
#

and?

halcyon hemlock
#

i want to damage entity

pale pendant
#

when shooted?

halcyon hemlock
#

when projectile hits the entity, thats not the problem i've got that done

#

i want to damage the entity while setting the cause to the player

#

but i dont want it to effect the damage i give it

pale pendant
#

you want it to not damage?

halcyon hemlock
#

i want it to damage with my custom damage calculation

#

but if i put source as player it doesnt work

pale pendant
#

uh do e.setcancelled() or what it is and uh

halcyon hemlock
#

what??
why

pale pendant
#

damage the entity somehow

#

after that line

halcyon hemlock
#

i can damage entity

#

but

#

ent.damage(damage, e.getEntity()); -> this damage output
ent.damage(damage); -> this damage output

#

both are different

pale pendant
#

like ```
e.SetCancelled()
(damage the entity)

#

also yeah

#

ent.damage(damage, e.getEntity()); -> this damage output

#

to the entity

#

so uh

halcyon hemlock
#

bro what

#

i dont think u understand,

#

i can damage the entity ok?

pale pendant
#

bro i dont understand you

halcyon hemlock
#

i can damage the entity with my custom script

#

but

#

if i put source as player it does less damage than it should. but i need to put source

pale pendant
#

then idk

halcyon hemlock
#

i need it to do the damage i want it to do while putting source as player

pale pendant
#

do you atleast know how to use EntityExplodeEvent? because i need help

halcyon hemlock
#

yeah whats up?

pale pendant
#

i want to spawn a tnt 20 blocks high when tnt explodes

halcyon hemlock
#

wait what

#

when tnt explode u spawn another one 20 blocks up?

pale pendant
#

yeah

halcyon hemlock
#

ill tell in pseudo since i never used the event but

#

yea

#

ok

pale pendant
#

k

halcyon hemlock
#

do u know how to get the tnt?

pale pendant
#

public EntityExplodeEvent(Entity tnt?

#

but uh idk how to set the entity

halcyon hemlock
#

wdym

#

ok so

#

thats not how events work

#

u do

#

public void funcName(EntityExplodeEvent e)

pale pendant
#

ohhh

halcyon hemlock
#

and then u can do e.getEntity() for the exploding entity

#

put @EventHandler on top too

pale pendant
#

k

#

how do i make something like this?

opal juniper
#

?learnjava

undone axleBOT
halcyon hemlock
pale pendant
#

oh wait nvm i forgot something

#

also how do i summon something?

halcyon hemlock
pale pendant
#

because float doesnt like when its just "getLocation()"

eternal oxide
#

a location is not a float

#

a location is a Location

pale pendant
#

oh

worldly ingot
#

Just as a note, if you're doing what's in the screenshot, call e.getEntity().getLocation() once and hold it in a variable

#

A new Location instance is created each time you call it and there's no reason for it

pale pendant
#

oh alright

worldly ingot
#
  • readability, but there's at least a reasonable benefit to storing a variable here lol
pale pendant
#

wait so its something like this?

eternal oxide
#

no

worldly ingot
#

Re-use the tntLocation

eternal oxide
#

spawn(tntLocation.add(0,20,0)...

worldly ingot
#

ye

pale pendant
#

oh l

#

k*

fossil lily
#

Hmm okay. But it seems that putting the book in an anvil with a sword also doesn’t allow for output. Do I need to manually do that too?

bleak dagger
#

Hello guys, im making a Plugin and I need to pass a variable in Command Class into a Listener Class, does someone know how to do it

hasty prawn
#

Well either they have that permission or gmuted is false

civic wind
#

Neither

#

Player has no permissions and gmuted is true

pale pendant
#

i got it working!

hasty prawn
civic wind
#

Messages are sent on command

hasty prawn
#

Wait, does it say test3 or no?

civic wind
#

Nope

#

hang on let me sort out indentation i'll restart and re test

hasty prawn
#

You should also put test 2 in a better spot

civic wind
#

Yeah it's just stuck at the if statement, if i swap them around it gets stuck at the boolean check too?? So confused

hasty prawn
#

That means gmuted is false.

fossil lily
#

okay thanks

hasty prawn
#

What? Which line?

#

Why do you keep deleting your messages

echo basalt
bleak dagger
civic wind
#

Literally makes 0 sense why it doesn't work

fringe hemlock
bleak dagger
#

No, I dont want to do that

#

Is there anyway to pass the arg

fringe hemlock
fossil lily
bleak dagger
#

Put api-version:"1.19.2" in your config.ymk

civic wind
eternal oxide
#

1.19

#

plugin.yml

bleak dagger
#

Like the version of the plugin

civic wind
#

What?

#

Click the attachment i'm not asking about api versions

fringe hemlock
#

I have made punishment GUI's in the past and would recommend having a whole class dedicated to "API" in which has all your methods that does everything for you. All my projects have one class in which has all the methods which is callable by like "PunishAPI.get()" which holds the HashMaps for holding and all other variables that are used by other class. it also lets people from outside your project use your API and create addons or makes it customizable. What I would recommend @bleak dagger, is create a Class called
"PunishmentData" which is created on the command and placed in an accessible HashMap. Then the listener can call that and retrieve Variables from the class/add to the class.

eternal oxide
fossil lily
eternal oxide
#

its not valid, so use unsafe

bleak dagger
#

I just wnat to access the variable of the Command CLass

fossil lily
eternal oxide
#

yes

#

addUnsafeEnchantment

fossil lily
#

oh!

fringe hemlock
#

Make your commandclass have a instance variable and call it from listener.

fossil lily
bleak dagger
#

Yh let me test that

civic wind
#

Anyone have a solution? The listener is getting stuck at the boolean check

#

even if i check its true it still gets stuck

fringe hemlock
#

Did you set gmuted to false by default in ur class constructor?

civic wind
#

Yeah

tardy delta
#

wdym stuck at rthe bool check?

civic wind
#

As in, it goes no further, message isn't sent, event isn't cancelled

fringe hemlock
#

so it is broadcasting test?

civic wind
#

Test2, yes

tardy delta
#

gmuted being false

civic wind
#

Yes, i've tried to check if true also, then send message, cancel event etc, both have the same result... (nothing)

fringe hemlock
#

Exceptions in console?

tardy delta
#

print when it becomes true

civic wind
civic wind
stiff knot
#

hey, pretty new to spigot and java in general, just wanted some help, what would be the best way to send a request to a player and have them accept/deny?

remote swallow
#

chat message with text/base components

civic wind
#

Still doesn't work this way either

fringe hemlock
#

Will hold the request

#

:D

stiff knot
#

i've got a clickable messages in chat, but all it can do is run a command and i need it to run actual code :/

bleak dagger
#

Extend the listener to wha

tardy delta
#

make your listener class implement Listener from the bukkit package

stiff knot
tardy delta
#

Map<UUID, UUID>

fringe hemlock
tardy delta
#

WeakHashMap best

bleak dagger
#

Ok

mellow pebble
#

how do i get rid of those smileys

shrewd sphinx
#

veltpvp?

remote swallow
#

can i ask how were meant to help without code/config

shrewd sphinx
#

isnt that dead

civic wind
#

Show config

#

He's downloaded a leaked core probably

mellow pebble
#

lol

#

im just making practice core in kotlin but i use veltpvp for instance

civic wind
#

Show code/config

mellow pebble
#

look alike smthng like that

bleak dagger
#

Dont ask that in spigot server

mellow pebble
bleak dagger
#

Ask that in the server where you download the leaked config

civic wind
#

You're coding a core but you don't know how to find/remove those?

bleak dagger
civic wind
#

bruhh thats sus

mellow pebble
fringe hemlock
civic wind
#

sus

remote swallow
stiff knot
karmic stirrup
#

The second debug messages don't trigger and I don't know what else to do to check if it is a player inventory https://imgur.com/a/ynkhNDz

mellow pebble
civic wind
mellow pebble
#

i can show you main class if you want

#

?paste

undone axleBOT
stiff knot
mellow pebble
# civic wind sus

bruh tf are you talking about there is nothing sus i never had problems with that stupid emojis

shrewd sphinx
#

making his own core but doesnt know how to remove some unicode characters from the code he wrote πŸ€”

bleak dagger
fringe hemlock
#

UUID is just a way to keep the players UUID in which can be called to see if they have a request or not

remote swallow
#

and doesnt even know how to read

bleak dagger
#

Just admit it

mellow pebble
#

it is not only on scoreboard

civic wind
mellow pebble
#

it is on join message

#

almost everywhere

civic wind
#

You downloaded leaked core

mellow pebble
#

NO NO I DID NOT

civic wind
#

I've seen it before, it doesn't just happen

mellow pebble
#

okay okay sure

shrewd sphinx
#

show me your config @mellow pebble

mellow pebble
#

no no no

#

okay send me link of leaked core

#

please

#

AHHAHAHA

shrewd sphinx
#

specifically the main color

mellow pebble
#

i want to see that leaked code

ivory sleet
#

guys what is going on?

remote swallow
mellow pebble
civic wind
#

I don't search for leaked cores, so i can't. But, i'm sure there's loads on youtube lol

remote swallow
mellow pebble
shrewd sphinx
#

config

#

give

#

us

#

the config

#

ffs

civic wind
#

lmfao

bleak dagger
mellow pebble
bleak dagger
#

ur telling me uve coded a core but dont even know whats

mellow pebble
#

this is config

civic wind
#

That's not harassment

mellow pebble
dawn hazel
#

What the stupid

shrewd sphinx
#

man using leaked core :hollow:

mellow pebble
dawn hazel
#

Bro I’m confused

ivory sleet
#

Yes, please drop this non sense right now, either help them or just don't help them

mellow pebble
#

the fuck

#

literally i coded whole core

bleak dagger
mellow pebble
#

i sent it already

civic wind
#

Show the code for the scoreboard, simple...

mellow pebble
#

scoreboard will be edited later on i just have to put few stuff into code it is not big deal

ivory sleet
#

or inconsistent usage of encoding and decoding charsets

mellow pebble
#

i really dont see anything wrong so i asked here

civic wind
mellow pebble
#

but i didnt know people are such tards because i just wrote veltpvp.com in my plugin as example what will be written in future

ivory sleet
#

ch4ron do u use maven/gradle?

mellow pebble
#

no not really

mellow pebble
ivory sleet
#

make sure you use utf8 when exporting resources and for other stuff also

mellow pebble
#

?

ivory sleet
#

ye

civic wind
karmic stirrup
#

The second debug messages don't trigger and I don't know what else to do to check if it is a player inventory https://imgur.com/a/ynkhNDz

mellow pebble
ivory sleet
#

also

undone axleBOT
ivory sleet
#
MainColor: "Β§c"

try

MainColor: "\u00a7c"
mellow pebble
#

that is why i neven saw this because i have never had any problems with this

dawn hazel
#

The color code isn’t the issue from what I can see

civic wind
mellow pebble
ivory sleet
dawn hazel
#

It’s possible but not likely

mellow pebble
dawn hazel
#

This is the weirdest issue I’ve ever seen

#

I do know sometimes character encoding can be wonky

dawn hazel
ivory sleet
#

yes thats probably what Id blame given the limited resources we're exposed to

mellow pebble
civic wind
#

I'm pretty sure its the Β§

dawn hazel
#

You never know till u try

ivory sleet
#

what java version do u use ch4ron?

molten hearth
#

Goddamn you're annoying

remote swallow
#

its probably the Β§

mellow pebble
#

and it is a must

civic wind
dawn hazel
#

If it’s not your issue then ok it’s not your issue

mellow pebble
#

MUST

ivory sleet
dawn hazel
#

If it works then it works

#

It’s that simple

ivory sleet
#

just keep those comments to yourself

dawn hazel
#

It takes 2 seconds to paste the code in

molten hearth
#

It's not I've been watching this conversation and all I see is just refusal to accept the help

dawn hazel
#

And another maybe 10 seconds to change the stuff

ivory sleet
#

yes, but it doesn't make it any better by you dropping such a comment by any stretch of the imagination

mellow pebble
molten hearth
#

Idk doesn't make it any better not to

civic wind
dawn hazel
#

Your wasting more time not trying than actually taking our advice

molten hearth
#

Unless hopefully the comment wakes him up and he takes the help

dawn hazel
#

If your not gonna take our help then so be it. You don’t need to be rude about it

mellow pebble
ivory sleet
quiet ice
#

Go Conclure!

mellow pebble
#

like bruh

ivory sleet
#

@mellow pebble

#

?

mellow pebble
#

just because i used veltpvp as name

mellow pebble
dawn hazel
#

2 wrongs don’t make a right

ivory sleet
#

they stopped long ago, drop it as well

civic wind
dawn hazel
#

You not just trying our help is wasting far more time than it would otherwise

fringe hemlock
mellow pebble
civic wind
#

Forgive us for jumping to conclusions, I've seen chat errors like that in leaked cores before.

mellow pebble
ivory sleet
#

?kick @mellow pebble

undone axleBOT
#

Done. That felt good.

dawn hazel
#

Good riddance

bleak dagger
#

He was literally copyng a core

#

Like there is no chance+

fringe hemlock
#

The funny thing was, the problem was that symbol. He probably formatted his file using ASCII instead of UTF-8 Which causes the faces

dawn hazel
#

No wonder he couldn’t use his tiny brain to figure it out himself

#

He just yoinked all his code

ivory sleet
#

yeah sounds like speculations mostly

bleak dagger
#

He dindt even know what he was doing

tardy delta
#

had to install gh desktop for school :(

ivory sleet
#

the desktop app?

tardy delta
#

ye

ivory sleet
#

πŸ’€

#

tho its not that bad

tardy delta
#

and then those fuckers gave me a 18page long explenation of gh πŸ’€

ivory sleet
#

but gitkraken is nicer imo

#

lol

tardy delta
#

looks hot atleast

ivory sleet
#

yea it is pretty hot

fringe hemlock
#

What is the most overpriced and cheapest host you guys know about?

tardy delta
#

most cheapest i know is doing it myself huh

quiet ice
fringe hemlock
#

Im asking for 2 hosts :P

quiet ice
#

Probably two queries in one go

fringe hemlock
#

Yessirrr

#

Im just curious to see how expensive hosts would go

#

There has to be one out there where ur like, wtf?

quiet ice
#

there are too many of that kind

remote swallow
#

blooms pretty good

bleak dagger
#

Hey, how can I get the variable of a command and pass it to a Listener?

fringe hemlock
#

What about HeavyNode?

#

Ive used them a lot and they are very cheap

bleak dagger
tardy delta
#

what context

quiet ice
remote swallow
#

bisec and apex are really bad

#

along with shockbyte

fringe hemlock
#

Thank yall

fringe hemlock
quiet ice
#

I have a small office PC running as a server next to my desk, never had anything go wrong

#

The threat of someone's IP getting leaked is negligible for the average user

tardy delta
#

i have a pi running a damn mc server

fringe hemlock
quiet ice
#

You probably are big enough to afford proper solutions at that point

fringe hemlock
#

I just contacted my host and closed all open ports so i should be protected, but home hosting REQUIRES 25565 to be open

tardy delta
#

ill ddos you mc port

fringe hemlock
#

yea

quiet ice
#

I just don't port forward those ports at all

#

Which is kind annoying if you want to spin up a new service

#

Through the ports I do actually port forward?

#

I do everything on the router level - I mostly joinked the firewall from my systems

#

Like I still maintain a small blacklist for north korean ips that attempt to join my server all the time, but otherwise everything is open

#

Also, what is the difference between modem and router?

#

I guess that is what you call a router here in germany.

#

Modems are explicitly internet over phone lines afaik

#

Hence my confusion

naive bolt
#

whats the bukkit alternative of ConfigurationProvider in bungee

quiet ice
bleak dagger
#

How can I use a vaaraible from a Command CLass into a Listener Class

tardy delta
#

bruh give context

#

or use di or whatever

bleak dagger
#

Are you talking to me?

remote swallow
#

who else would they be talking to

bleak dagger
#

I cant send screenshots

remote swallow
#

?img

undone axleBOT
remote swallow
#

?paste

undone axleBOT
bleak dagger
#

Ok

#

?img

undone axleBOT
bleak dagger
#

?paste

undone axleBOT
bleak dagger
#

What?

remote swallow
#

click the links

bleak dagger
#

Ok

remote swallow
#

they're websites

molten hearth
#

Average minecraft hosting experience

#

You're only missing Hetzner and Contabo lol

bleak dagger
remote swallow
#

add a variable that gets set on the command that you can call in ClickEvent

bleak dagger
#

For example?

remote swallow
#

il type it one sec

#

public class MyCommandClass implements CommandExecutor {

  private Player reciever;

  @Override
  public boolen onCommand(stuffhere) {
    if (sender ect) {
      Player reciever = reciever;
    }
  }

  public Player getReciever() { return reciever; }
}
#

call on getReciever in click event

bleak dagger
#

Ok Ill do it later

#

Ok

#

I thinkj I have it

tardy delta
#

every time that command gets executed by another player, that player changes

#

dont try to do that stuff rather use a collection with uuids

bleak dagger
remote swallow
#

what fourteenbrush said is better but MyCommandClass.getReciever()

bleak dagger
#

Doesnt work

remote swallow
#

What does it say in ClickEvent

bleak dagger
#

ΒΏ???

remote swallow
#

Hover over it in ClicKEvent and tell me what it says

bleak dagger
remote swallow
#

you need to type BanMenuCommand.gerReciever()

bleak dagger
#

Ok

#

Oh

#

Perhaps cause its private?

glad prawn
#

Nope

remote swallow
#

your calling on a pulbic

bleak dagger
remote swallow
#

probably needs converting to static

bleak dagger
#

Everything is static

remote swallow
bleak dagger
#

Oh

#

Bruh

#

Ok ilm test it later

#

Thx bye

untold jewel
#

Wtf

tardy delta
#

thats what they call static abuse

undone axleBOT
fluid river
#

FREE JAVA LESSONS

checkmybio

#

hello everyone

#

❀️

glad prawn
#

No, bye.

fluid river
#

wait what

#

Goksi?

#

@hazy parrot

#

are u russian

iron glade
#

privjet

hazy parrot
#

We use Cyrillic too

tardy delta
#

you should change your name to that

warm light
#

is it possible to save itemstacks from a custom inv like this?

#

on BukkitValues

hazy parrot
#

You mean using pdc?

#

If yes, you can save itemstack into pdc

fluid river
#

ok

#

@remote swallow FREE JAVA LESSONS

fluid river
#

i can't tho

#

verified

molten hearth
#

FREE FULLY AUTOMATIC JAVA VERSION ADHESION

sterile token
blazing river
#

Hello. I'm looking for DynMap Towny plugin.

fluid river
#

and?

#

why are you asking it here

sterile token
#

For asking about none programming question please use #help-server

#

delete it please

#

If not he will continues asking here

#

Is not so diff to read the rules!

blazing river
sterile token
#

This channel is only for programming/development questions

blazing river
sterile token
#

Na no problem dont worry

small current
#

i have a 2d region class
how can i check if a region is inisde the region?

here is my isIn

#

should i do the isIn for every block in the region

small current
#

i don't want region overlapping

#

its a claiming plugin

sterile token
#

Do a cuboid area which has 2 locations corner A and B

small current
#

its not a cuboid

#

its 2d

#

i do that but no y

#

its ignoreY

sterile token
#

reasons?

small current
#

is it important?

sterile token
#

take care its a 3d game

small current
#

claim plugin

sterile token
#

Yes bruh

small current
#

i want it to be 2d

sterile token
#

It wont work like that

small current
#

how can i check if another region class is overlapping it like this

small current
#

thats the isInIgnoreY method renamed to isIn

sterile token
tender anvil
#

anyone have any idea why transparent blocks wouldn't work with a custom block breaking system?

small current
#

dude i don't want it to check for the y

#

like griefprevention

#

check the plugin

#

you select 2 corners

#

it does it

#

thats not my question

sterile token
#

Weird

hasty prawn
#

There's tons of stuff on intersecting 2d boxes on Google

sterile token
#

I really like how you try to help hahaa

hasty prawn
#

Because that's the easiest thing to do KEKW

small current
sterile token
#

🀣

hasty prawn
#

Why would I re-explain something when it's been explained hundreds if not thousands of times better on the internet

sterile token
sterile token
small current
#

google says

google says
if(xMin1 < xMax2 || xMax1 > xMin2)
 
if(yMin1 < yMax2 || yMax1 > yMin2)

if(zMin1 < zMax2 || zMax1 > zMin2)
#

what is xMin1 and xMax2

#

x1 and x2 ?

hasty prawn
#

No

#

Not the center

#

xMin1 is left side of square 1, xMax2 is the right side of square 2, etc

small current
#

xmin1 is the first corner

#

and xmin2 the second?

sterile token
#

So i was right shit

#

He must need a cuboid area (Corner A: x, y, z and Corner B: x, y, z)

#

Yes i know

#

In my case not

#

Because i dont really like to use things that works weird and not how i would implement thems

#

Although he was wrong too

#

Because he was using 2d, when a claim is not 2d

fluid river
#
if (center1.distanceSquated(center2) <= ((length1 * length1) / 2) {
    // they intersect
}```
#

yeah i just need to change the formula

#

changed

#

this will only work for square regions tho

#

not rectangle

#

cuz diagonal of square is side * sqrt(2)

tender shard
#

Math.sqrt isn't nearly as expensive as people think it is, though

fluid river
#

still

#

distanceSquared is faster

tender shard
#
    private static final int TIMES = 1_000_000;

    public static void main(String[] args) {
        double[] randomNumbers = new double[TIMES];
        for(int i = 0; i < TIMES; i++) {
            randomNumbers[i] = Math.random();
        }
        double[] squareRootNumbers = new double[TIMES];
        long start = System.nanoTime();
        for(int i = 0; i < TIMES; i++) {
            squareRootNumbers[i] = Math.sqrt(randomNumbers[i]);
        }
        long end = System.nanoTime();
        System.out.println("Duration: " + TimeUnit.MILLISECONDS.convert(end - start, TimeUnit.NANOSECONDS) + "ms");
    }

Getting 1 million square roots took 4ms for me

tender shard
fluid river
#

never actually checked how guys get square root

#

but isn't it getting harder to get square root if number is getting bigger

#

random()
Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0.

#

umm

#
private static final int TIMES = 1_000_000;

    public static void main(String[] args) {
        double[] randomNumbers = new double[TIMES];
        for(int i = 0; i < TIMES; i++) {
            randomNumbers[i] = ThreadLocalRandom.current().nextDouble(Double.MAX_VALUE);
        }
        double[] squareRootNumbers = new double[TIMES];
        long start = System.nanoTime();
        for(int i = 0; i < TIMES; i++) {
            squareRootNumbers[i] = Math.sqrt(randomNumbers[i]);
        }
        long end = System.nanoTime();
        System.out.println("Duration: " + TimeUnit.MILLISECONDS.convert(end - start, TimeUnit.NANOSECONDS) + "ms");
    }```
#

Try this code

tender shard
#

I have used Math.random() * 10_000_000 and now it only took 3ms

#

so no, it's not slower for bigger numbers

fluid river
#

alr

hasty prawn
#

It took less time with bigger numbers? KEKW

fluid river
#

just don't know the realization

#

Of random in java

fluid river
#

alr

#

million of square roots be like

#

omg somebody finally calculated us with a reason

tender shard
#

10 million square roots between 0 and Double.MAX only takes 17ms

grim ice
quiet ice
#

isn't that standard practice?

tender shard
#

many people don't even know its possible lol

grim ice
#

yeah

tender shard
#

i also only know it since a year or so

grim ice
#

i learnt it when i was learning kotlin

hasty prawn
#

I can't even remember the last time I defined a constant that big though lol

quiet ice
#

I believe I learned about it while working with decompilers, but could've also been before that

grim ice
#

1_000

#

even this is nice

fluid river
#

hey guys

grim ice
#

though, it's weird to use it like that

fluid river
#

name a java method you never used

#

from any class

ivory sleet
#

Flow::defaultBufferSize

grim ice
#

String#toString

grim ice
fluid river
#

ye

#

Intger#parseInt

#

xD

grim ice
#

why

#

parseInt is cool

fluid river
#

i always used valueOf for some reason

ivory sleet
#

a the stricter variant

noble forge
#

incrementExact()?

fluid river
grim ice
#

valueOf also takes in an int

noble forge
fluid river
#

what about bukkit methods

#

no googling

hasty prawn
#

Player#getPlayer

fluid river
#

xD

noble forge
#

anything related to raids

ivory sleet
#

runTaskAsynchronously

fluid river
#

Player#getDisplayName

hasty prawn
fluid river
#

i don't even know what displayName returns

grim ice
fluid river
#

yeah

grim ice
#

except if you're dealing with 1 byte worth of decimals

#

since its cached

fluid river
#

but still i never touched parseInt

#

or any parse method

ivory sleet
fluid river
#

Which exception you never handled

#

I know one

#

Nobody handled

tender shard
# hasty prawn
Entity nmsEntity = craftEntity.getHandle().getBukkitEntity().getHandle().getBukkitEntity().getHandle().getBukkitEntity().getHandle();
fluid river
#

NullPointerException

ivory sleet
fluid river
#

String#toString().toString().toString()

#

<T extends Object>.getClass().getClass().getClass()

ivory sleet
hasty prawn
#

One can only hope that it does

#

Although if someone is doing that they shouldn't be programming tbh

fluid river
ivory sleet
#

assert booleanExpression

fluid river
#

jetbrains stuff?

fluid river
#

or like new java

ivory sleet
#

well

#

its been around for a while

#

but basically

sterile token
#

Conclure please mate i need your help

ivory sleet
#

assert throws it if you enable assert with a jvm flag,

and certain classes throw it

#

like Objects::<init>

fluid river
#

i see

ivory sleet
fluid river
#

String.trim() users πŸ’€

ivory sleet
#
public final class Objects {
    private Objects() {
        throw new AssertionError("No java.util.Objects instances for you!");
    }
sterile token
#

I need help with git i need to replace the full repo branch from another branch?

tender shard
#

replace? wdym?

ivory sleet
#

^

fluid river
#

delete branch

#

make second one main

ivory sleet
#

do u wanna merge/rebase?

sterile token
fluid river
#

manually drag&drop files to formatted main branch

sterile token
fluid river
#

so hard to guess

sterile token
#

I mean i cannot do that, that is called harcoding

tender shard
#

just PR dev to master? o0

quiet ice
#

git merge --no-rebase or something like that

sterile token
#

I was looking someone to say a command atleast

quiet ice
#

Actually, probably not that

#

git pull --no-rebase it is I believe

#

Whatever, git pull will say what is wrong

sterile token
#

git pull is for downloading changes from remote

#

Im not working with remote althought im doing everything locally

quiet ice
#

Usually conflicts occur with remote (or an upstream repo), so I never really used anything but git pull

#

git merge probably is the right command then, but I do not know how it should be used

fluid river
#

get folder -> remove all files -> copy files from another folder -> paste to the first one with Java Files class (no github required)

tardy delta
fluid river
#

omg

quiet ice
fluid river
#

no

#

what does VCS stand for

echo basalt
#

Nuker you have like 0 knowledge to contribute in this conversation if that's the case

ivory sleet
#

version control sys

fluid river
#

bro i'm just trolling a guy for like 10 minutes straight

#

oh version control

sterile token
#

Yes!!

echo basalt
#

🀑

fluid river
#

sry we call it different way in russia

#

Π‘ΠšΠ’

echo basalt
#

We're here to be helpful

fluid river
echo basalt
#

Yeah that shits annoying

fluid river
#

and say ?learnjava

#

and sometimes actually pasting some spoonfeed

tardy delta
#

some of us are here to talk shit

#

🀑

echo basalt
#

Eh imma block

fluid river
#

no offense tho

sterile token
#

so my best option would be merging them

quiet ice
#

that is basically what you need to do one way or the other

#

Unless you want to completely erase one branch

fluid river
#

umm basically you get first and second branch and merge them, parameters are given on git wiki

sterile token
#

Would it make conflict if source code doesnt match ? I mean dev code its totally diff from master branch

fluid river
#

but that would not erase first branch

sterile token
quiet ice
#

If it is very different you are fucked, if it is only slightly different you'll have some fun resolving merge conflicts

ivory sleet
#

hehe

sterile token
#

Big problems sh**

tardy delta
#

goddamn 18 pages

quiet ice
#

I mean, you can still resolve the merge conflicts, but it'll take ages to do

sterile token
fluid river
# sterile token Yeah i suppouse

well if your classes depend on non-existing classes now(which you removed on second branch) or smth then you would have to manually fix errors

quiet ice
#

Protip: To reduce conflicts you can use the IDE's auto-formatter on both branches

sterile token
#

Explanin details please

hoary quartz
#

can someone say why I am getting this error and how can I fix it?

fluid river
#

Code formatter

quiet ice
#

The thing you IJ guys use far too often

tardy delta
#

i mean hover it

fluid river
#

Alt + Enter + L

sterile token
hoary quartz
fluid river
#

i can see typeMismatch

quiet ice
#

It expects List<ItemStack> but you put List<?> (List<Object>)

fluid river
tardy delta
#

so cast it

quiet ice
#

Just do something like (List<ItemStack>) (List) myList

#

And suppress all warnings

fluid river
#

^

#

raw types

tardy delta
#

no need for List actually?

#

unchecked

quiet ice
#

No, suppress all warnings

fluid river
tardy delta
#

mf /j

#

@SuppressWarnings("all")

quiet ice
#

IDEs don't like this kind of stuff, hence you need to supress all warnings if you like to stay in peace

fluid river
#

or @SuppressWarnings("unchecked") at least

sterile token
quiet ice
fluid river
quiet ice
fluid river
#

from IDE

tardy delta
#

huh i was able to cast my config stuff to a list<itemstack> actually

fluid river
tardy delta
#

idk

quiet ice
#

Probably because they were already raw types

tardy delta
#

a list<?> ig

#

too long ago to remember

sterile token
fluid river
#

well you can mess with itemstack and create a list where you put all returned items by getItemStack() from config

#

with for loop

#

and have no warnings at all

quiet ice
sterile token
quiet ice
quiet ice
fluid river
sterile token
#

Because its never null

fluid river
#

idk how to disable JetBrains annotations in IntellIJ

sterile token
#

πŸ€¦β€β™‚οΈ

quiet ice
quiet ice
fluid river
#

No i just disabled them

quiet ice
#

It's disabled by default

fluid river
#

no it's alright

fluid river
quiet ice
fluid river
#

i switched from 06 to 09 and it's default now

#

Had to change theme to dark

quiet ice
#

Also use paper-api, they tend to have better contract annotations

fluid river
#

It can be null tho

#

IDEA don't watch your config files

quiet ice
fluid river
#

and they can easily be manually edited

fluid river
#

with disabled annotations

#

from the beginning

zealous osprey
#

Anyone remember how you add the line numbers to discord code blocks? I'm asking here, cause I saw someone use it here

quiet ice
#

Like it would require a significant policy change in order to support jetbrains annotations

fluid river
#

In 2021-smth they were enabled tho, as far as i remember

#

i started getting @NotNull and stuff on every method

tardy delta
#

lmfao

fluid river
#

when declared

#

shit

tardy delta
#

they do

quiet ice
sterile token
#

Lmao @urban grotto annotation is declared on discord

fluid river
#

over 09

quiet ice
#

09 has ANSI terminal, so too late

fluid river
#

((

quiet ice
#

they always did

sterile token
#

@gritty pebble

#

you appear?

fluid river
#

It started to be really slow when you open Run Configurations window

#

Not crashing but freezing a lot now

#

in 06 there was no such problem for me

#

on both PC and Laptop

quiet ice
#

that was always the case even on desktop though

#

For at least three years now

#

At least I remember ranting with gecko (paper regulars should know him) about that ages ago

zealous osprey
#

Wait, did you add the line nums yourself? If so, what a pitty, hoped dc would have added them automatically

tall dragon
#

i did add them myself. i was testing if they would be color formatted

#

which they are

noble lantern
quiet ice
quiet ice
#

Why the hell did they change that behaviour

#

Eclipse-compiler at its finest

tardy delta
#

NotNull notNull = @NotNull :(

#

gn anyways

sterile token
#

NotNull isNull = getClass().getMethods().map(method -> method.getAnnotation(NotNull.class) != null).first();

#

🀌

worldly ingot
hoary quartz
sterile token
hoary quartz
sterile token
noble lantern
#

casting is fairly basic imo

quiet ice
sterile token
#

Because then happens this type of things were we explain suppousing that people know java

quiet ice
#

Actually, probably caused by me using annotations-java5

worldly ingot
#

Might be

quiet ice
#

And tada .. that was the issue

hoary quartz
#

so I am kinga learning java in the same time I learn how to make a plugin

sterile token
#

Oh shit

#

Defintly never do that

fallow violet
quiet ice
#

Eh, that is more or less the only way to learn java

sterile token
civic wind
#

I’m learning java and bukkit at the same time. I do bits of java then do bukkit snd i’m seeing improvements and it’s helping me remember stuff

sterile token
river oracle
#

I've learned completely through spigot and I will say it was one hell of a shitty experience would not reccomend

sterile token
hoary quartz
hoary quartz
#

idk if it helps, but here it's the code

sterile token
#

That why most of the time i dont know simple java things like mutation, concurrencies, etc that the problems of not learning the lang starting doing plugins directly

fallow violet
#

If u have bad experience, your fault, but im good with it

civic wind
#

People learn in different ways, theres more than one way to skin a rabbit πŸ˜‰

quiet ice
#

I learned the basics by working with canarymod, which should still be similar enough to bukkit. It wasn't that bad

sterile token
#

I have a client wondering get a custom mod for his network*

quiet ice
#

Canarymod was kinda like bukkit

#

Fork of hmod (and later a rewrite) to be exact

sterile token
#

hmod?

#

hmod was a forget mod

quiet ice
#

hmod is ancient, yes

#

And yet it was the birthplace of bukkit

sterile token
worldly ingot
#

A cube? ;p

sterile token
#

Im really bad with math

worldly ingot
#

Half of the dimensions

#

minX + (sizeX / 2)

#

Same for all dimensions

sterile token
#

oh perfect

quiet ice
#

[(x1 - x0) / 2 + x0, (y1 - y0) / 2 + y0, (z1 - z0) / 2 + z0]

fallow violet
#

I see math and i dont understand it :)

sterile token
echo basalt
quiet ice
#

Terrible in what way?