#help-development
1 messages Β· Page 167 of 1
forcefully terminated -> timeout -> corruption is how I like it
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?
???
@ hidden pinged you
Oh lmao
π
@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
Are you sure the entity has the metadata by the time the spawn event is called
my documentation: // yooo this works
My documentation:
https://github.com/MagmaGuy/EliteMobs/wiki/Elite-Scripts gaze upon my creation and despair
It's been like 8 hours and I'm still editing the scrip thing
I don't even have all the actions down
perhaps its because these scripts look like writing assembly
the pain
YML Scripting
Yep
Because the target audience only knows how to configure yml files
I'd rather they use the api
They really don't
You think people have been hiding the fact they know Javascript from me on a massive scale?
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)
omg my config doesnt work
the config: eliteScript:Example: Events:- EliteMobDamagedByPlayerEvent Actions:- action: PUSHtarget: SELF vValue: 0,.3,0Cooldowns: local: 60 global: 20
perhaps
its the most enjoyed programming language or something
And 100% of them are from Javascript developers?
I wasn't saying everyone knows js. It's just easier for you :p
If I wanted easy I wouldn't have made this in the first place
is there a way to open a writable book to a player? thy already
relatable
Hey, how to send messages to all players who have messages == true in the database?
if statement
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
yes I tried but I don't really know how to do it
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
for(UUID playerUuid : uuidProviderFunction()) {
Bukkit.getPlayer(playerUuid).sendMessage(...);
}```
Show me your code π
i delete the code (not all)
Is it somehow possible to find out in the PlayerExpChangeEvent if it comes from a XPBottle? Or is there a kind of EXPPickUpEvent?
?jd-s has a search box
mysql
how do i spawn a tnt thats 20 blocks high when a tnt exploded?
expChangeEvent is for how much a player picks up too
getAmount() returns how much the player has picked up
Ah my bad , read it wrong , you want from the bottle specifically
Yes
listen for EntityExplodeEvent
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?
jeah, thats a written book, but i need a writable book...
who can help me for create MySQL database and user?
Bruh
bro im stupid sorry
hello?
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
look, were not the velocity server so uh join their server
They won't help him since he's running a cracked server
..
oh yeah
they only help with premium servres
Are you asking why offline mode is an option?
no , why you can't help me
offline mode is a option
idc
If I use it, can you help me?
You probably won't
Turn your server in online mode and go to the velocity discord and then get it fixed and turn it back off lol
why??
sorry elder god , you're right
is it in a loop?
what is?
the id of the player
to print
to the console
oh wait its a handler list id i think
i checked and there was nothing i set to sout
can you give the code?
org.bukkit.event.HandlerList@6387e6a9
for what
where do i get it
how many listeners do you have?
System.out.println(e.getHandlers());
oh yeah
thanks for the help
thats why i think
i thought i cleared everything with system.out.println
oh another thing
?
yeah?
i set player to the shooter of the arrow
theres an event called
projectilehitevent
and
and?
i want to damage entity
when shooted?
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
you want it to not damage?
i want it to damage with my custom damage calculation
but if i put source as player it doesnt work
uh do e.setcancelled() or what it is and uh
what??
why
i can damage entity
but
ent.damage(damage, e.getEntity()); -> this damage output
ent.damage(damage); -> this damage output
both are different
like ```
e.SetCancelled()
(damage the entity)
also yeah
ent.damage(damage, e.getEntity()); -> this damage output
to the entity
so uh
bro i dont understand you
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
then idk
i need it to do the damage i want it to do while putting source as player
do you atleast know how to use EntityExplodeEvent? because i need help
yeah whats up?
i want to spawn a tnt 20 blocks high when tnt explodes
yeah
k
do u know how to get the tnt?
wdym
ok so
thats not how events work
u do
public void funcName(EntityExplodeEvent e)
ohhh
and then u can do e.getEntity() for the exploding entity
put @EventHandler on top too
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
bro?
why make it into 3 different locations
because float doesnt like when its just "getLocation()"
oh
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
oh alright
- readability, but there's at least a reasonable benefit to storing a variable here lol
wait so its something like this?
no
Re-use the tntLocation
spawn(tntLocation.add(0,20,0)...
ye
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?
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
Well either they have that permission or gmuted is false
i got it working!
But it doesn't say test3?
Yeah, but the command im using, sets gmute to true, i deop player and can still type in chat
Messages are sent on command
Wait, does it say test3 or no?
You should also put test 2 in a better spot
Yeah it's just stuck at the if statement, if i swap them around it gets stuck at the boolean check too?? So confused
That means gmuted is false.
okay thanks
are we just gonna ignore how he passed 2 params on an eventhandler
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
Yeah the boolean my bad, I don't get why it's not changed when i've set it to
Literally makes 0 sense why it doesn't work
You could possibly merge the classes into one.
Could you tell me what argument you are trying to pass?
https://pneumonoultramicroscopicsilicovolcanoconiosis.club/WOUMjQdy Any reason why this is happening?
WEAPON shows enchant target
GOLDEN_SWORD is what I'm holding and what its trying to apply it to.
Put api-version:"1.19.2" in your config.ymk
Anyone?
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.
what enchantment are you applying?
Custom
Thats not what I want
its not valid, so use unsafe
I just wnat to access the variable of the Command CLass
me?
oh!
Make your commandclass have a instance variable and call it from listener.
it worked! thanks :)
Can someone help me
Aaa ok
Yh let me test that
Anyone have a solution? The listener is getting stuck at the boolean check
even if i check its true it still gets stuck
Did you set gmuted to false by default in ur class constructor?
Yeah
wdym stuck at rthe bool check?
As in, it goes no further, message isn't sent, event isn't cancelled
so it is broadcasting test?
Test2, yes
gmuted being false
Yes, i've tried to check if true also, then send message, cancel event etc, both have the same result... (nothing)
Exceptions in console?
print when it becomes true
I've already tried this, as stated, same result
No errors
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?
chat message with text/base components
HashMap
Still doesn't work this way either
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 :/
Extend the listener to wha
make your listener class implement Listener from the bukkit package
i have no idea how to do this lmao, do you have any links to a video or something explaining it?
Map<UUID, UUID>
are you testing on an account that has staffmode.bypass?
WeakHashMap best
Ok
veltpvp?
can i ask how were meant to help without code/config
isnt that dead
no
lol
im just making practice core in kotlin but i use veltpvp for instance
Show code/config
look alike smthng like that
code/config of what
Ask that in the server where you download the leaked config
You're coding a core but you don't know how to find/remove those?
Do yuou even know whats a plugin
bruhh thats sus
yeah i am coding a plugin and idk how to remove those
You can create a HashMap Like this:
HashMap<UUID,UUID> map = new HashMap<>();
sus
give us code/config
is the UUID part important? im just using "String" from an example i found online
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
code of what exactly i have many things in my whole project
What are you storing?
the scoreboard...
essentially sending a request to a player, they can then accept or deny it
bruh tf are you talking about there is nothing sus i never had problems with that stupid emojis
making his own core but doesnt know how to remove some unicode characters from the code he wrote π€
Bro me know you didnt code the plugin
UUID is just a way to keep the players UUID in which can be called to see if they have a request or not
and doesnt even know how to read
Just admit it
it is not only on scoreboard
Are you storing message or player? If message, string, if player, uuid
You downloaded leaked core
NO NO I DID NOT
I've seen it before, it doesn't just happen
okay okay sure
show me your config @mellow pebble
specifically the main color
i want to see that leaked code
guys what is going on?
this has nothing to do with the scoreboard
yes i know
I don't search for leaked cores, so i can't. But, i'm sure there's loads on youtube lol
so give us the scoreboard code or config
sure find me one where i coppied code of ?
lmfao
BRO IR SO DUMB
scoreboard code is in that main class that i sent paste link of
ur telling me uve coded a core but dont even know whats
That's not harassment
yes i do not know what those smiley are
What the stupid
man using leaked core :hollow:
dumb because i have never saw those simleys before
Bro Iβm confused
Yes, please drop this non sense right now, either help them or just don't help them
BRUH
the fuck
literally i coded whole core
We're trying to
Ok, sorrycan you send me the scoreboard config
there is no config for scoreboard it is just one main config
i sent it already
Show the code for the scoreboard, simple...
scoreboard will be edited later on i just have to put few stuff into code it is not big deal
or inconsistent usage of encoding and decoding charsets
i really dont see anything wrong so i asked here
Use this for chat colours instead, https://paste.md-5.net/tugamedute.php
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
ch4ron do u use maven/gradle?
no not really
maven only
make sure you use utf8 when exporting resources and for other stuff also
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
?
ye
@mellow pebble use what i sent and use normal '&'
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
it is set
also
?paste
MainColor: "Β§c"
try
MainColor: "\u00a7c"
why would that make any difference i already have used Β§ in my past project where i used same Β§ character for using color codes and i didnt have any problems like this
that is why i neven saw this because i have never had any problems with this
The color code isnβt the issue from what I can see
Just try it... It's simple. No harm in trying. I've never experienced this issue
it shouldnt be i already used Β§ character in past
myeah the color is still being recognized
Itβs possible but not likely
i really dont need it but thanks π€·ββοΈ
This is the weirdest issue Iβve ever seen
I do know sometimes character encoding can be wonky
Itβs worth a try
yes thats probably what Id blame given the limited resources we're exposed to
but it wont change anything it will be the same thing
Try it
I'm pretty sure its the Β§
You never know till u try
what java version do u use ch4ron?
Goddamn you're annoying
its probably the Β§
Try what I told you or stop asking for help...
If itβs not your issue then ok itβs not your issue
MUST
that was unnecessary
just keep those comments to yourself
It takes 2 seconds to paste the code in
It's not I've been watching this conversation and all I see is just refusal to accept the help
And another maybe 10 seconds to change the stuff
yes, but it doesn't make it any better by you dropping such a comment by any stretch of the imagination
and i would have to use that stupid way of color codes through all of my code currently
Idk doesn't make it any better not to
Stop asking for help then. End of conversation...
Your wasting more time not trying than actually taking our advice
Unless hopefully the comment wakes him up and he takes the help
If your not gonna take our help then so be it. You donβt need to be rude about it
bruh hop of my d you are annoying on first i was a skid and "i stole the code" and now you are giving me that solution that wont change anything like you dont have to be such a dickhead at first and now decide to end conversation
still, just be respectful and appropriate when interacting here thanks
Go Conclure!
rude about it ... he started first being rude from whole start i was someone who "stole code"
like bruh
just because i used veltpvp as name
what ?
2 wrongs donβt make a right
they stopped long ago, drop it as well
You can either try what I sent you and most likely fix the problem or not and have the same problem occur
You not just trying our help is wasting far more time than it would otherwise
i would rather get help from @dawn hazel or @ivory sleet you know someone who is not a dickhead that is accusing people on the start of asking for help yk
Forgive us for jumping to conclusions, I've seen chat errors like that in leaked cores before.
Grow up.
bruh hop of literally AHHAHAAH
?kick @mellow pebble
Done. That felt good.
Good riddance
The funny thing was, the problem was that symbol. He probably formatted his file using ASCII instead of UTF-8 Which causes the faces
yeah
Ah the classic case of code theft
No wonder he couldnβt use his tiny brain to figure it out himself
He just yoinked all his code
yeah sounds like speculations mostly
He dindt even know what he was doing
had to install gh desktop for school :(
the desktop app?
ye
and then those fuckers gave me a 18page long explenation of gh π
looks hot atleast
yea it is pretty hot
What is the most overpriced and cheapest host you guys know about?
most cheapest i know is doing it myself huh
If you look at the energy bills: Homehosting I guess
Im asking for 2 hosts :P
Probably two queries in one go
Yessirrr
Im just curious to see how expensive hosts would go
There has to be one out there where ur like, wtf?
there are too many of that kind
blooms pretty good
Hey, how can I get the variable of a command and pass it to a Listener?
Do you need some screenshots?
what context
You probably want to ask this question in communities such as syscraft - not in a channel full of developers that have never run a server
Thats true
Thank yall
I tried home hosting years ago, very bad decision lol
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
i have a pi running a damn mc server
giggachad
You probably are big enough to afford proper solutions at that point
I just contacted my host and closed all open ports so i should be protected, but home hosting REQUIRES 25565 to be open
ill ddos you mc port
yea
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
whats the bukkit alternative of ConfigurationProvider in bungee
(known as dial-up - forgot the word)
How can I use a vaaraible from a Command CLass into a Listener Class
Are you talking to me?
who else would they be talking to
I cant send screenshots
?img
Not verified? Upload screenshots here: https://prnt.sc/
?paste
Not verified? Upload screenshots here: https://prnt.sc/
?paste
What?
click the links
Ok
they're websites
Ok so I want to make so I can use a varaible from a Command Class to a Listener https://prnt.sc/1meVx52-IBwh https://prnt.sc/iti5SgM7rzjg
add a variable that gets set on the command that you can call in ClickEvent
For example?
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
every time that command gets executed by another player, that player changes
dont try to do that stuff rather use a collection with uuids
Ive added that to the CommandCLass but then how do i use it in the Listener
what fourteenbrush said is better but MyCommandClass.getReciever()
What does it say in ClickEvent
ΒΏ???
Hover over it in ClicKEvent and tell me what it says
you need to type BanMenuCommand.gerReciever()
Nope
your calling on a pulbic
Then https://prnt.sc/l2bn8tMaTCiA no idea why ut doesnt work
probably needs converting to static
Everything is static
Wtf
thats what they call static abuse
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
No, bye.
privjet
you should change your name to that
FREE FULLY AUTOMATIC JAVA VERSION ADHESION
Agree
Hello. I'm looking for DynMap Towny plugin.
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!
I am disoriented. I'm making my own server and I'm having a hard time finding the plugins I want to use.
Please use the correct channels
This channel is only for programming/development questions
OK. Sorry for the inconvenience.
Na no problem dont worry
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
Never
Do a cuboid area which has 2 locations corner A and B
reasons?
is it important?
take care its a 3d game
claim plugin
Yes bruh
i want it to be 2d
It wont work like that
how can i check if another region class is overlapping it like this
i used that thing in like 2 or 3 plugins
thats the isInIgnoreY method renamed to isIn
when i started with region areas i didnt know how to do them so i did it 2d which of course fucked me a lot
anyone have any idea why transparent blocks wouldn't work with a custom block breaking system?
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
if you know the math tell me
how can i check for this
https://cdn.discordapp.com/attachments/741875863271899136/1027294042230378597/unknown.png
Weird
There's tons of stuff on intersecting 2d boxes on Google
Haha you always tells them to look on google
I really like how you try to help hahaa
Because that's the easiest thing to do 
do you want lands claimed on top of each other by players ?
π€£
Why would I re-explain something when it's been explained hundreds if not thousands of times better on the internet
I mean if i dont check for "Y" in the claims it wouldnt have "profundidad"
Yeah indeed you are applying the wheel theory which said "why will you reinvent the wheel when its was already invented"
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 ?
No
Not the center
xMin1 is left side of square 1, xMax2 is the right side of square 2, etc
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
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)
Math.sqrt isn't nearly as expensive as people think it is, though
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
sure, it's still neglible in 99% of cases
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
I have used Math.random() * 10_000_000 and now it only took 3ms
so no, it's not slower for bigger numbers
alr
It took less time with bigger numbers? 
that also took 3ms
alr
million of square roots be like
omg somebody finally calculated us with a reason
10 million square roots between 0 and Double.MAX only takes 17ms
when someone finally uses _ in 3+ digit ints: i finally can die in peace
isn't that standard practice?
many people don't even know its possible lol
yeah
i also only know it since a year or so
i learnt it when i was learning kotlin
I can't even remember the last time I defined a constant that big though lol
I believe I learned about it while working with decompilers, but could've also been before that
it doesnt need to be that big
1_000
even this is nice
hey guys
though, it's weird to use it like that
Flow::defaultBufferSize
String#toString
its funny
i always used valueOf for some reason
a the stricter variant
incrementExact()?
from which class?
valueOf also takes in an int
math
Player#getPlayer
xD
anything related to raids
runTaskAsynchronously
Player#getDisplayName
i don't even know what displayName returns
funnily enough, valueOf() is worse in most cases for hot calls
yeah
ah it does indeed
Entity nmsEntity = craftEntity.getHandle().getBukkitEntity().getHandle().getBukkitEntity().getHandle().getBukkitEntity().getHandle();
NullPointerException

AssertionError if that counts
String#toString().toString().toString()
<T extends Object>.getClass().getClass().getClass()
compiler, or jit probably optimizes those obvious and redundant calls
One can only hope that it does
Although if someone is doing that they shouldn't be programming tbh
i don't even know what it is lol
assert booleanExpression
jetbrains stuff?
or like new java
Conclure please mate i need your help
assert throws it if you enable assert with a jvm flag,
and certain classes throw it
like Objects::<init>
i see
just ask
String.trim() users π
public final class Objects {
private Objects() {
throw new AssertionError("No java.util.Objects instances for you!");
}
I need help with git i need to replace the full repo branch from another branch?
replace? wdym?
^
do u wanna merge/rebase?
I have the main branch and the development branch, so the branch of development != main, so it doesnt allow me to merge them
manually drag&drop files to formatted main branch
are u trolling?
so hard to guess
I mean i cannot do that, that is called harcoding
just PR dev to master? o0
git merge --no-rebase or something like that
oh thanks
I was looking someone to say a command atleast
Actually, probably not that
git pull --no-rebase it is I believe
Whatever, git pull will say what is wrong
git pull is for downloading changes from remote
Im not working with remote althought im doing everything locally
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
get folder -> remove all files -> copy files from another folder -> paste to the first one with Java Files class (no github required)
i saw people catching npe and outofbounds
omg
Have you ever worked with an VCS?
Nuker you have like 0 knowledge to contribute in this conversation if that's the case
version control sys
Yes!!
π€‘
We're here to be helpful
i'm here to offer free java lessons
Yeah that shits annoying
Eh imma block
umm should i give a shit about that?
no offense tho
so my best option would be merging them
that is basically what you need to do one way or the other
Unless you want to completely erase one branch
umm basically you get first and second branch and merge them, parameters are given on git wiki
Would it make conflict if source code doesnt match ? I mean dev code its totally diff from master branch
but that would not erase first branch
No, its just look to the hash and check what is already added to replace it and if not it added it to the branch
If it is very different you are fucked, if it is only slightly different you'll have some fun resolving merge conflicts
Yeah i suppouse
hehe
Big problems sh**
goddamn 18 pages
I mean, you can still resolve the merge conflicts, but it'll take ages to do
yes it takes lot of problems
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
Protip: To reduce conflicts you can use the IDE's auto-formatter on both branches
auto-formatter?
Explanin details please
can someone say why I am getting this error and how can I fix it?
Code formatter
The thing you IJ guys use far too often
i mean hover it
Alt + Enter + L
OH please, dont abuse static!
if needs do code, I will send
what does your map contain
i can see typeMismatch
It expects List<ItemStack> but you put List<?> (List<Object>)
in eclipse Ctrl + Shift + F
so cast it
No, suppress all warnings
true
IDEs don't like this kind of stuff, hence you need to supress all warnings if you like to stay in peace
or @SuppressWarnings("unchecked") at least
Is posible to disable the @urban grotto annotation?
It is needed
just remove JetBrains stuff
Yes, but why would you
from IDE
huh i was able to cast my config stuff to a list<itemstack> actually
tho https://git-scm.com/docs/git-merge @sterile token
idk
Probably because they were already raw types
I really hate them when i need to do Config#getString() because its saying that can be null and a appears all yellow the code
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
Then add a static util method that will put an Objects#requireNonNull on it
Switch to eclipse
na its better to supress it, but there is a way to do it via Jetbrains settings
Eclipse also has that feature
It isn't better to suppress it - this warning is legitimate
It's not enabled for me
is totally shitt that warning
Because its never null
idk how to disable JetBrains annotations in IntellIJ
π€¦ββοΈ
Perhaps you should cache it then?
NOOB
No i just disabled them
It's disabled by default
no it's alright
oh true
Is it really never null?
Also use paper-api, they tend to have better contract annotations
Wha, how?
and they can easily be manually edited
i mean it's clean
with disabled annotations
from the beginning
Anyone remember how you add the line numbers to discord code blocks? I'm asking here, cause I saw someone use it here
Like it would require a significant policy change in order to support jetbrains annotations
In 2021-smth they were enabled tho, as far as i remember
i started getting @NotNull and stuff on every method
lmfao
they do
Maybe even a large refractor too because eclipse (at least 2022-06) shits the bed when the annots are missing
Lmao @urban grotto annotation is declared on discord
well as i can see you are better stick to 06
over 09
09 has ANSI terminal, so too late
((
they always did
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
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
Wait, did you add the line nums yourself? If so, what a pitty, hoped dc would have added them automatically
i did add them myself. i was testing if they would be color formatted
which they are
?whereami

I see now. FUCK
Sadge
NotNull isNull = getClass().getMethods().map(method -> method.getAnnotation(NotNull.class) != null).first();
π€
You can still do this. Not sure why yours is disallowing it
sorry, I am kinda new in coding so where should I put this?
Did you learnt java before working with an api?
actually not much, I just know the very basic
Oh that why, so first learn java completly and them yes go ahead with plugins
casting is fairly basic imo
Just updated today (albeit without m2e), so probably hit a recent regression
Because then happens this type of things were we explain suppousing that people know java
Actually, probably caused by me using annotations-java5
Might be
And tada .. that was the issue
it's cuz I am "working" in a minecraft server and I took the code from someone and when I was editing this error showed up, and I have no idea how
so I am kinga learning java in the same time I learn how to make a plugin
Idk i learned it through this way
Eh, that is more or less the only way to learn java
CRY ABOUT IT!!
public enum class Roles (id: Integer, name: String) {
Owner(4, "[Owner]"), Manager(3, "[Manager]"), Admin(2, "[Admin]"), Mod(1, "[Mod]");
}
that is a record my people
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
Waiting them on Java π‘
+1
I've learned completely through spigot and I will say it was one hell of a shitty experience would not reccomend
Kotlin*
weal, I tried that with unity/c# and it worked well kinda, now I am trying Java to see
-1
Happens to me also
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
If u have bad experience, your fault, but im good with it
People learn in different ways, theres more than one way to skin a rabbit π
+1
I learned the basics by working with canarymod, which should still be similar enough to bukkit. It wasn't that bad
Dod you actually make mods?
I have a client wondering get a custom mod for his network*
How do i get the middle of 3d square?
A cube? ;p
Im really bad with math
oh perfect
[(x1 - x0) / 2 + x0, (y1 - y0) / 2 + y0, (z1 - z0) / 2 + z0]
I see math and i dont understand it :)
Happens to me
terrible naming but ok
Terrible in what way?