#help-archived
1 messages · Page 15 of 1
C:\Users\dimit\Desktop\MiniCraft>java -Xmx1024M -Xms1024M -jar spigot.jar nogui
Picked up _JAVA_OPTIONS: -Xmx512M
Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size
C:\Users\dimit\Desktop\MiniCraft>pause
Press any key to continue . . .
it says that now
@subtle blade its perfectly fine to have them set as the same
But you should not
all that happens when it is, is that dynamic allocation does not happen
Just once is enough
it is actually more efficient to allocate for MC then to dynamically allocate since you don't get back that ram it consumes anyways
also have to wait on it to expand its ram limits as well
i need helpppp
We see your question
me?
Yes
omg thank you
Likely sets fire ticks every time an arrow hits an entity whether or not it's on fire, which seems like a bug imo
Let me confirm that
Honestly i think so
because im cancelling the combustion event to handle combustion myself
it doesnt happen with melee
Ah thank you
That's where I ended up as well
I'm baffled why j is equal to -20.....
when in the first pick....
its clearly 160
is this somehow a timing issue?
¯_(ツ)_/¯
this is going to make me go insane
can i zoom out of intellij
is that possible lol
OH
I understand
Dunno. I'm in Eclipse
I'm setting the fireticks once the event is called
the event is called AFTER J is set
is that
a bug? should that be that way?
does spigot not support « » properly?
like... byte manipulation?
I think i'm going to just use Entity#setOnFire
but this is nuts lmaoooo
im 99% confident if that variable declaration was moved after the event being called i would be fine
what's the problem?
me?
yea
so i have an entity being shot with a fire arrow
i am cancelling them being combusted by the fire arrow, so i can handle it myself
what is happening though, is spigot is extinguising the player immediately after i do this
oh no
probably would help if you showed the code you are using
havn't been following too closely but could you cancel the fire arrow event then do your stuff on the next tick?
this is my interpretation
@golden vault i could but i feel like thats a dirty solution, would this be a worthy PR?
j should be defined after the event is called
maybe i'm overlooking the reasoning for why j is defined there
but i dont see a reason why it shouldnt be moved
wheres the code where you handle it yourself?
heres an imgur album
i'm trying to prove spigot is overwriting the value i set instantly
would need to see how you have it coded
it shouldnt matter
im using entity#setFiretick
you can see it is set to 160, but only for a very brief moment
i'm not doing anything... wrong?
you wouldn't know unless you had it peer reviewed, obviously something is wrong
whether it is your code or its some kind of quirk
i dont know what you want to see.... im setting the fire tick... debug says i am
what else do you need?
im not setting it back to 0
that i have confirmed
with other things
the class file where you have it coded to cancel the event and then you setting the fire ticks etc etc
oh i see, so it gets the fire ticks before the event is called, so changing it in the event has no effect because it sets the fire ticks to whatever they were before the event anyway?
exactly
well im canceling the event all together and using setFireTick myself
and the reason im not providing snippets is because its a very large chunk of code
that spans accross 3 or 4 different methods
doesn't bother me none in how large of a code piece it is. But most here won't be able to effectively help without seeing what exactly you are doing to compare with your debug frames
im not providing code snippets.... its a lot of code and all that matters is i know i'm setting the fire tick to the correct value and im not setting it after that
i appreciate your interest to help, but there is no reason to see the code when the problem isnt with my code
ok, my point is this you are saying you are using entity.SetFireTicks() it does matter in how you are obtaining the entity reference and whether or not you have the correct entity object you are trying to manipulate.
i'm using the exact same way with melee and it does not produce the same effect
so i know im using the correct entity in that regard
line 337
this plugin isnt even mine, to be fair, im just updating it
does the bow have enchants that you are testing with?
line 316 is where 160 is coming into play
level of the bow is 2 which times 80 gets your 160. So the enchant code is conflicting with your projectile one
in my version
i manually set it to 160 to rule out the amount
normally it would be correct
is that problem solved?
ah ok
when the entity gets hit by the arrow, i know you cancel the fire damage, but does the arrow damage still apply?
yes
ill have to double check but i think i handle arrow damage too
which gives me an idea to maybe handle fire there but for now im focussed on this
by the looks of it, that method you're looking at only sets the fire ticks to what they were before if the damage isn't applied, which makes sense
you are correct....
(thanks for that observation, that helps)
but idk if that is an intended behaviour so to speak
well if you cancel the damage, it makes sense to revert back to what you had before
i should probably go to sleep now lol, but good luck with solving your issue
thanks you helped with me understanding the problem better
this is why being able to look at code helps us in helping you 🙂
well he actually got that from the spigot code not mine... id argue it didnt help at all. lol
and besides my greatest worry from sharing the code was questions about how it worked
why would that worry you?
its a lot of code that has a lot of moving parts
beyond that its not even mine to begin with, so sometimes i may have trouble answering stuff myself
I understand that completely. Explaining other peoples code can be quite difficult, however if you try to anyway you will tend to learn and understand the code better.
^
well, if its a timing issue, you could wait a tick to re-apply fire ticks
I think I may know how you are getting that -20
because I don't think its suppose to be negative anyways o.O
nvm didn't look at it right, but I did find a different spot where ticks are set for the fire
like ive said, ive triple checked that my own plugin wasnt the interference
so i have that covered
i know why it happens now
I got around it by checking for projectile damage in the EntityDamageByEntityEvent
and setting the damage to 0.000001 which still allows my plugin to handle damage while allowing for fire to be present
without scheduling for the next tick
Anyone know if it's possible to access multiple CraftItemEvent results? Like when a user uses Shift+Click? At the moment I can only seem to get the first item crafted
I am trying to use my custom domain for Dynmap. I changed the dynmap port to 80, but I am unsure of what type of DNS record I will need. play.elyriamc.com links to my server on port 25565, but I want map.elyriamc.com to link to the Dynmap site on port 80
If you want to point to a specific port you'll need to use an SRV record I believe
Not sure if you need to be using SRV but that's the only one I know of that works
I don't know if it's really a "specific" port though, seeing as how 80 is the http port
if I type localhost into my browser with no port it automatically connects
Oh, you shouldn't need any manual port setting then, since Minecraft will automatically go to 25565 when given a standard URL, and the browser will automatically go to 80 - so just use an A record or a CNAME or something, right?
As far as I know, an A record just takes an IP address and nothing more - what're you using to set them up?
I haven't used google domains but afaik you'll have name, value and ttl columns?
That should work fine
You might have to wait a while for your local DNS cache to update, so even if the record worked you may not be able to connect for a while
could you show me a screenshot?
What IP are you putting in it?
I'm not going to connect anyways, you can remove the IP later from comments if you want
Actually
Delete the entire play record and try adding it again
Is there a reason i can't use a synthetic record?
It looks like you're adding more than one entry to the data, maybe that's why it keeps throwing errors
you don't need an srv record if you are not changing the port mc uses. By default the client will attempt to connect to 25565 if a port isn't entered after the domain
I got it to work with the synthetic record
Just do play / A / 1h / <IP Address>
I already have my server domain up and working
This is for Dynmap on port 80
And it works now
Okay, you dont need to reference port 80
As far as i can tell
just do a cname off of play
Just the IP address again
You could also reverseproxy it
Browser works off port 80 regardless
Oh wait
The only thing is that the synthetic record redirects to my local IP. It is blatantly in the url. I don't know if freely advertising that would be the best idea
And just make sure you have the ports forwarded correctly for the web server too, same way you did the MC server
Ok, thanks
Well, if it's in the URL
That could be a domain / or website issue
The website would have to be updated in your config to use the domain name as well
Sometimes at least, not sure for dynmap
is the server home hosted ? o.O
It could be on a dedicated server
that would be ideal
Guys so I have been using HashMaps for a while, and in Java 8, you can just initiate them right then and ther efor example.
HashMap<Integer, Double> map = new HashMap<Integer, Double>();
I want to know when would the hashmap be initiated first, by doing that, or initiating it in the onEnable function.
cos I always feared when I access it it might be null
@frigid ember its initiated the same as like in the co nstructor.
but my main function
And it's not null
Its initiated like you used a constructor
so then its before onEnable for sure
Yeah
since to call onEnable
It wont ever be null
u need an instance
Yeah
Thanks.
@dusky herald and another question
what is the difference between doing
ArrayList<Integer> i = new ArrayList<>();
do u need the argument in the second
Nope
ArrayList<Integer> i = new ArrayList<Integer>();
so there is no difference
dang, ive wasted my whole life
xd
<> just means its also an Integer and ( number) sets the size of the array initially
You could do it as List<Integer> I = new ArrayList(); too
you can leave it blank to initialize at JVM defaults
Ok
or set a number there if you already know the size you need which is more optimal as the JVM doesn't need to spend time expanding the array because it wasn't large enough to begin with 😉
can you show ane xample
of setting the size
I am confused.
Setting the size of an arraylist?
Almost seems pointless to me
I just never knew arraylists let you limit.,
Or just int[5]
The way I showed will initialize at that size but still allows for it grow
the way Blackveiled showed is similar except it won't grow
Yeah
the limit is 2,147,483,647
if it grows anyway
But it's better to do fixed arrays if you always know its gonna be that size
because arrays are backed by int
the limit is 2,147,483,647
@keen compass Integer.MAX_VALUE
Lol
@frigid ember Queue's don't always have allow for all objects to wait in line. If you wanted to say a Queue is full you could impose a limit to make things wait for the Queue to clear up
Queue's generally use an array of some sort to implement
also if you wanted to ensure your array didn't go haywire and started consuming a bunch of resources
you could set a limit to ensure it wouldn't go beyond a certain point if its not expected that it should
ok
if you initialize your array at the beginning the JVM doesn't spend time guessing how large it needs to be so it will add objects, stop, expand array and then add objects again. If you already know the starting amount you could start it from there instead.
its not a requirement, but helps speed things up especially when you deal with large arrays lol
That wastes memory
ik
🙂
so it was a joke
Or was it
Let's say I am creating a really really large server.
In java.
And I deal with so many players, more than Integer.MAX_VALUE
lets say i tried storing all in an arraylist
them im fucced
ArrayIndexOutOfBoundsException
You would get index out of bounds exception
or if your JVM wants to throw a curve at you, you just might get a buffer overflow exception lol
ik id get it
Ik what exceptions id get
what is the best way to temporary store this amount of users
ExceptionException
temporary store
Define temporary
what would you recommend
temporary as, an example, when they leave, I don't want to have their data anymore
as if they never existed
kinda like a mc server
but if you had to deal with the limits of the integer, it can get a bit complicated but its pretty easy. And that is you would just make use of 2 arrays and combine them together when you need the data. The hard part is keeping organized in way that both are in sync together lol
Use HashMap?
hashmap has the same limit
exactly
you just create a second array
Map<UUID, PlayerData>
thsn constantly adding new arraylists
anyways odds are you are not going to hit the int limit with the amount of players XD
I mean
or maps
no game server has yet either
so if yours does you would have broken the world record
What is double limit
which currently eve online holds that record if I recall 😉
why did java set the limit to 2 billion whatever
Java didn't. That is the limit of a 32 bit integer
since most of the stuff in java was created before 64 bit came about, most everything is backed by the integer
when 64bit came out, they added the long, but since 32bit was still popular, they didn't create alternative arrays and what not to be backed by a 64bit address space
64 bit's limit is way higher (2^64) versus 32 bit 2^32
yep
if you really wanted to you could change the JVM source
and just change the backing of the address space to 64bit 😉
And then also, ints have negative values too so
Uh, look up data types
so its confusing
They show you how many bits they are per data type
double does not use a 64bit address space
it may be 64 bits, but that is because it uses 2 32bit address spaces
Ok.
Just think, like file size
NEED halp
1 byte = 8 bits
So basically, to conserve memory, you would want to appropriately use data types
indeed
Like, dont use Double if you dont need to
you could specify int16 as well if you wanted a smaller int
Or, keep as many things Local as possible
?ask
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.
ok
so can i get help from someone
And the data types are even more important if you ever plan to use MySQL
@dusky herald I do use MYSQL
sets ur tab name and name tag
but it has 16 char limit on the name tag
idk how to fix it
why do you loop through the online players twice?
can someone help me
Lol you beat me to it
Put the Scoreboard board outside of the loop
And get rid of 1 loop
yea
to get around the limit, make a new line
that wont fix the 16 char problem
initiate the scoreboard out of the loops
16 char is all you got
no there is way to get more than 16
in spigot forums they said u can use prefix + main + suffix to get 48 char
but idk how to use them
hypixel got over 16 char on their name tag
so its possible
this is 1.8 picture
more than 16 char
prefix and suffix doesn't count towards the limit on the line
haha
<+?
they dnt?
lmao
Ahhh
Less than or equal to
well they said they do
Keyboard issues? Lmao
Then what have you been doing?
Lmao
can anyone focus on my issue
the only way to get past the limit is to use the prefix and suffix with the line
the main line itself has a 16 character limit
you are going to have to do checks yourself to ensure what you want is in the proper place
yes
bitshift operators are awesome
fastest way to do math in java or simply change numbers without much processing 😛
lol
He never said it didnt
the only way I have known to get around the limit is to make a new line
that is blank
You'll get 16 chars per
if anything go find a scoreboard plugin that supposedly exceeds the limit and see how they do it 😉
generally easier if you can find an open source plugin
@dusky herald weird question, when initiating doubles, many people initiate differently, some people just initiate integers like
double a= 100;
some people do 100D(D is optional but is there areason to do it, cos you waste your time lol) and some people do 100.0 like me
is there a reason why people
do it so different
maybe im missing something
Doesnt really matter
ok
It's still a double
yea
why do they do it then
adding the D is useless
they wasted one character
lol
Double and double are different. One is boxed the other is unboxed. same goes for 100d and 100D
Double is just a wrapper class for a primitive double type
the second version is just convenience especially if you were going to translate it to a different data type anyways
double is primitive
Double* is not
They are. Double is a wrapper class. double is a primitive data type
^
Double.getClass()
oh
ur right
haha
Integer i = new Integer(5);
int i = new int(1);```
the second line will give an error
that's what im tryna say
using new int is incorrect anyways
And int isnt an object
int i = 1
yes
IK java lmao
im just tryna make sense of some stuff
that made no sense
to see if they have a reason
HERE wanna see some example of java
why does an arraylist not let u enter in int
I AM GOD
Becayse
It only takes objects
because int is not an object
ok
No primitive data types
its just annoying converting Integer to int soemtimes
imagine getting chunk banned
haha
Just cast it
you don't need to convert Integer to int o.O
Or dont convert it at all
Lmao
Doesnt really matter
It's better to use primitives anyways
that is what i say fam
And use the classes as you need them
btw, u said only use double when u need it
and then do the fancy boxing and unboxing unnecessarily like many do and then cast it anyways at the end 😄
versus an int
using the lowercase or uppercase d both creates the primitive type not the wrapper
Pick the data type based on the range you expect to utilize.
floats are more resource intensive fyi.
really
and have even less precision
more so that its actually used as a measurement for your CPU in how many floating points it can calculate 😉
double means double precision
also to note, if you need to turn a float into an int, make use of the rounding functions to round your float. Otherwise you can end up with unexpected numbers. for instance 0.0000000000001 can still equal 1 which is weird sometimes
Yeah (:
alright
usually it happens when you do the casting
System.exit(0); is still most useful code here
Absolute
absolute
oh yea
0.1 + 02! = 0.3
means remove the signs
sorry, I don't do school in English here.
i found a solution i am gonna check the player name and if the player name length is aboe 16 the extra char will then be shown as suffix
It means the muscles obv
lol
how is the solution
float can only store powers of two nicely
there is all kinds of math functions in java
Math.round() is garbage
Ok
ah yes
if you get a run on float, it will generally be appended with a 1 sometimes too
so 0.5+0.25 is fine
also another weird thing of java
Use +.5 before you do round
you mean 3
that is if you have it round down. It can also round up as well
IKR
Wrongggg
I was so mad when that happened
2.99999 rounds to 2
no, I meant there is a function to round it up
Math.ceil
you could also use Math.min as well or Math.max
those dont round
guys I learned a lot of math because of java
they just get the smaller or bigger number
Ceil does the opposite of what I'd want it to do
🙏 java
nope but you can combine them with round though
before for me, all math functions, seemed like part of java
Like I thought Math.abs was "invented" by java
lol
lol
fortunately in java unlike say the C languages you don't have to worry about pointers 😉
use c++ boiz
i mean the Math package is part of java...
lol
as basic as you want it to be
Or if you really wanna be tough just code in binary
well that would be just setting everything to a byte array
people like my jsloader bro
until you have to mess with compatibility between intel and amd
use MASM
there is no compatibility lmao
or just join the rest of us in 2020 and use java or c#
I program in msdos
what is that
2 people liked it https://www.spigotmc.org/resources/jsloader-now-free.77360/
im proud
the first resource that got a like
MSDOS is old school
and 2 even
That's what it is
I am new school
the only annoying part of msdos is when you are making a program and there is in an error in there somewhere
and then you have to go hunt through it all to find it
That applies to all coding
while true, back then there was no IDE's
Woo 3 more hours til I go home
yay]
you literally programmed the 1's and 0's and if you had a 1 in the wrong place odd things happened but the hard part was figuring out where you went wrong though. Its not like it underlines it for you and says hey this is not right
and its 2 am for u
@dusky herald
what are u doing outside
ma guy went CLUBBING
ahaha
Yeah
um
now a days with IDE's its so much simpler other then the abstracted higher languages being much nicer at times to work with
weird mf
People work at night y'know
ight
face reveal
ah crane operator or just the driver
They’re the crane
The seat is the driver and operators seat
ah
discord while working
are we gonna see some headlines tomorrow
well, I operated tanks. That is the heaviest equipment I used.
In the military?
no outside the military because I love having me a tank on the road 😉
yes In the military lol
I hate strykers
Lmao
can someone follow me https://github.com/purplexdev
i have no followres
so do me a favor
one of things I loved about the military is when it comes to some of the random tests they do
And btw I've been out for a few years now, I hear tanks and I think of a lot more things than just the vehicle tanks lol
My brother got to be part of the test of, can a bradley turret fit on a M113
sure enough they managed to fit a bradley turret on a M113, but turned out it wasn't very effective though
Or they go crazy at the end of the fiscal year
yeah that was part of my job
I remember I was giving medical support for a range
Shooting off AT-4s
And we had I recall about 110 rounds
lets spend 1-2 million dollars on items and not only on items but I have to justify why I need said items as well
Of the actual AT-4 round, not the 9mm tracers
AT-4 rockets can be fun
Yeah I just remember hearing nobody has ever seen so many rounds at one range lmao
Or they coulda just been fuckin with me idk
so, one of the tests btw I actually got to see not in person but on video which the Army tries to keep covered up. Is the test of dropping an abrams out of a globemaster
Idk what a globemaster even is tbh
army bois? 😮
C-17
(hooyah from a fellow sailor 😉 )
Well, lets just say the Army will not attempt that test ever again
Hooyah lel
it was the most expensive test considering the tank was a complete loss
Hey i was wanting to take my server from 1.15 to 1.8 and unsure on how to do this
used to be HUA until the panda organization trademarked it >>
it stands for Heard Understood Acknowledged. Changed to Hooah so the sound stayed the same lol
yeah, Army didn't think it needed to do that
but then the Panda organization trademarked it and used it against the Army lmao
idk just know that is why the Army had to change the spelling on their slogan
of course this time around Hooah is trademarked
I definitely dont miss the Army.
anyways, in case you were curious about that tank test. The reason it came about is because the Russians dropped a BRD out of plane with a crew and safely parachuted it to the ground
Makes sense, Russians are fuckin crazy
the math for the Abrams being parachuted wasn't exact. In other words in theory it could work. In reality, it didn't. It just came smacking into the Earth like no other and basically obliterated.
BRD that was dropped didn't weigh 75tons battle ready either
It would have to be designed to withstand the shock load force of the tank
At least 5x the weight of the tank
So 75x5 around 375 tons
Would probably be about how strong you want your chute to be
does anyone know like a generator i could use to put my serrver discripton
well, the chutes deployed just fine, just didn't slow the tank like they needed too since all the chutes couldn't take up all the surface area it needed without taking space from the others.
yeah, well Army tested it just so they could say yeah we tried it, didn't work
but a tank costs like $5mil per though so it was just one big expensive test to just figure out, yeah we can't do that
well $10mil now if you factor in inflation lol
Just to show power...be like yeah we can just drop these boys and fuck your shit up real quick
it would be cool if we could just air drop tanks anywhere
I know for fact if we could, the Army would be air dropping them on mountains XD
for now, we have to use C-5 galaxies to get them in the mountains lol
Lmao
But anyways, large open areas because you cant control your landing
It's just gonna go where it drops
Lmao
yep, and then if the rigger didn't rig them chains right, your vehicle will also go rolling away 5 miles or so away
😄
currently most vehicles are not straight air dropped unless they are light vehicles. If they have armor they just do a runway drop. But those runway drops can be funny though
especially if its not your supplies they are dropping
lol
Satisfaction of shoving 30k lb valves in ways you never thought possible 😂
In tight ass places lol
I went through Air assault school. So I got to learn how to rig stuff to helicopters. I thought I was just going to learn how to jump out of helicopters and just repel in etc. Nope, you get to learn how to do loadouts for various vehicles, how they have to be attached etc.
Definitely more advanced rigging practices here than the Army does, since Army likes to keep it simple
But
It's all relative anyways
Army doesnt give a fuck about safety either
you know, I have almost died in the Army mostly because of other soldiers and while state side as well.
"Yeah we did a risk assessment, only a few of us might die, that's worth it"
I have had a grenade thrown at me, fortunately I had a bunker for cover. I have almost been ran over or squished by a tank 3 different times.
I have had a soldier have a runaway machine gun and decided to walk with it, instead of just leaving it on the ground and just watch it like you are supposed to.
Or made a big uh oh
Lmao what a tard
The funny thing about rigging outside the Army is
I went to the range with uparmored humvee's and we were doing our range qualifications for the .50 cal on the humvee's
Everyone I work around thinks they know how to do it, just cause they know basic stuff lol
And also ignore the fact I'm the only one here qualified to do it atm lol
so we have 2 lanes, but 1 lane operates at a time while the others on the other lane just sit back and wait. Well we were doing our night training portion. So someone had the bright idea to not only mark the targets with green chem lights but also mark the vehicles with green chem lights. Generally not a big deal though because your targets are in front of you. Well my humvee got shot up with .50 cal rounds because the guy on the turret decided to shoot left -.-
yeah basic stuff helps
but doesn't mean you are an expert at it
That's Army logic right there
or qualified to just randomly hook things up because you think it should work
Make it all green fuck it lol
Lol, we had a guy who was always like I know what I'm doing
yeah until someone dies or nearly dies
And I was helping him and he asked to rig it his way
then you will think otherwise >>
And I told him no and to suck a dick because it would literally invert
not usually a good thing to have happen
And he goes and gets someone and says I'm not doing it right
And I say only, show him how you want it then
So he changes it all and everyone looks at him like hes a fucking dumbass
lol
you know its one thing if its just you and someone else. But when you have everyone else disagreeing with you that should clue you in that just maybe what you are doing isn't quite right
But forgot Center of Mass still exists
how can you forget that o.O
lmao
@dusky herald i got a question
That's pretty much it, this is stuff you never had to be certified or anything to do in the past
when catching an exception, is it better to specify which exception, or is it ok to just use Exception generally
does it affect performance
It all changed because people died a lot from stupid bullshit
Specify the exception
Generally its better to catch the specific exception so that you don't accidentally catch exceptions you didn't want to catch
Generally its better to catch the specific exception so that you don't accidentally catch exceptions you didn't want to catch
@keen compass ignore that part
ignore that case
but
generally
why not just use Exception when i only expect one exception
like instead of a null
there is no performance difference other then, if its not your exception it won't register
Sometimes I am unsure what exception Iw ill get
If I try to access a config value that doesn't exist
But you don't have to handle the exception if you don't want to either btw
what exception do i get
lets say its a boolean
what exception do I get
null right?
Just try catch throwable everywhere
Your exception depends on how you're trying to retrieve it first.
No exceptions anywhere in your code then 😂
Boolean val = getConfig()...
so i know if the value exists
i catch a null
right
Boolean cant be null
I've always just used Exception, but I wanna specify
Expected behavior should never raise exceptions
It either is Null like it doesnt exist
I JUST SAID
Or true or false
Just always call config with default values
if a boolean is null you will get a null pointer exception
so that I know if it exists
Way less hassel that way
If it doesnt exist, then its null
Then you get NullPointerException
If Sure hope you don't try to catch a nullpointer exception...
Because objects are pointers
because the pointer that is expected to have data doesn't have data and therefore its an exception
Ok
C# calls it null reference, might be a bit more clear
you only get a nullpointerexception when you try to call a method or field on an object that is null
ik what is FRICIN IS
You can also
Just do a Null Check
or use Optionals
ik how null pointer exceptions work
theyre much better than excessive null checking
Then you wont get a null pointer exception
Ok
IK
i just asked WHY ITS CALLED
nullpointer
lmao
thanks for the answer
frostalf
lol
lmao
you guys give me a whole introduction o java
lmao
Just try stick to answering what was asked
cos you were explaining what a nullpointerexception is
I just think it's funny how some people ask questions like
well, I think we are in common agreeance we don't just give answers. We like to ensure that you get all the necessary information with why the answer is what it is or why it is.
Hey I'm working on a plugin what does main extends JavaPlugin mean? Just help me out I dont want to learn a lot of Java, reading is boring so just tell me how to do this
I wasnt talking about you
and not Plugin
Lol
Because JavaPlugin extends Plugin
add its directory in its config
see u did it again
lmao
oh
good explanation actuall
they coluldn't think of another name
Plugin is Ambiguous without some kind of identifier.
also it depends if Plugin exists already too
but by extending JavaPlugin / BasePlugin they do some of the work for you
because they needed another name
Because its a Plugin made in Java 😄
Isnt that as ambiguous as calling it Plugin?
they need a name that isnt Plugin
😂
so they came up with JavaPlugin
pretty much
"I'm coding a plugin in Java, fuck it JavaPlugin"
@dusky herald will this give me an error
BukkitPlugin wouldve probably been better
boolean val = getConfig().getBoolean("bar_enabled");
val = (val == (Boolean) null) ? true : val;```
PornHub
I want default to be true
and you dont need to cast the null lmao
the null?
yea
wtf
open IntelliJ
i get error for doing this
if(getConfig().getBoolean("bar_enabled") != null) {
}```
u need to cast null to (Boolean) null
Oh sorry try
oh i know why
getConfig has exists right?
Just do exists("bar-enabled")
so it will be false
because that method cannot return null
exists doesn't exist