#help-development
1 messages · Page 1595 of 1
I could make it work over a longer distance but it all take time
it can currently navigate any maze so long as you are within around 20 blocks
what if it flys into a cavern
umm
ok
so
what if it flew under an overhang that was then a dead end
guys i found this in me old code
{
d *= 100;
if (d >= 0.0) d += 0.5;
else d -= 0.5;
int i = (int)d;
return (double)i / 100d;
}```
somthin tells me its bad 😳 cn any1 confirm?
So long as you are within 20 or so blocks of your target it can navigate out
but how would it know it was gonna fly into and therefore needed to fly over
you run the path algo before you move. It will return a path of block locations for you to navigate between
one sec
meh
i asked in paper and they were like "code it urself or use the ghast shit"
he is getting it
rn
i imagine
cause it aint public yet
this was the plan
let me show what im doing atm
?paste
https://paste.md-5.net/madobuhune.java
this was the proof of concept code
for going from point a to b
i dont like how i calculate the distance
yeah that figures
so i mean
idrk how to incorperate the height shit into it
huh?
must have missed it
or just been stupid
yeah
so
sure
true
ok, you have a 1.17 client?
yeah
server at palmergames:1
am i being stupid or is that not an ip
#math #progammin #lessons 🤓 im takein notes
true
its a server addres, don;t forget the :1
how do i join
oh sorry
im stupid
does callEvent pause the current code until all event handlers have run?
i was just wandering because the handlers are not directly called, im just firing the event
also i know how java works im not stupid
ok
Hey there, I have a problem when checking whether an item is damageable or not. Doesn't matter which item I check my code always returns true:
ItemMeta meta = item.getItemMeta();
if (meta instanceof Damageable) {
return true;
}
i was just making sure. Calm down
What items are you checking
every Item of a players inventory
thats what I thought.... Any ideas how to check if an item can actually be damaged?
ok im back
so
what were you saying i needed
an if statement to check it is actually wrong
ok
😄
if (vectorDistance > distance) velocityVector.multiply(distance / vectorDistance);
?
ok
persistentdatacontainers vs sql database
always over sql database?
what r some cases in which sql database be appropriate?
sha256
@ebon abyss
this approach causes it to majorly overshoot
should i take a fraction of the vector?
yeah, but i had a method to make the vector a tad better
lemme do some control + z
private double getMultiplier(double distance) {
if (this.maxDistance == 0.0) this.maxDistance = distance;
return (distance/this.maxDistance) * 4;
}
idk what i was thinking about with the if statement
but poorly named vars
distance = distance
between drone and end
maxDistance was the distance from start to end
but i just did it stupid
well
it would never be small enough to get to 0
cause of the if distance <= 1 {cancel()}
but essentially yes
myeah but:
if (start.distance(end) <= 20) {
sender.sendMessage(ChatColor.RED + "You are too close to the target!");
return true;
}
so
it was not an issue
true
http://palmergames.com/libs/Simple_AI.zip Not bothering with a repo for it as its not a lot of code
corrupted?
np
it goes like 10000000 mph
cooool
the prune method may nto be quite right but its close
vector: 0.0,0.0,22.5
yeah this is gonna be too fast
30 blocks
this.distance = this.startingNode.distance(this.finalNode);
startingNode = spawn
finalNode = target
wat?
oh
i just changed it to this:
if (vectorDistance >= 0.5) velocityVector.multiply(0.5 / vectorDistance);
works
now the gravity is an issue
ie
it is being pulled down
but i want to
i mean
yeah i then realised
no it wont overshoot
considers
yeah i get you
i just mean in general it wont overshoot
yeah
fair
https://paste.md-5.net/ekicomujak.java
this seems good
i will probs work out a better way to scale the speed at some point but this is good for now
now, pathfinding
meh, not atm
but an idea
i mean
are you familiar with the game satisfactory
ojk
so
Hello!
How can I change mob's pathfindergoal while mob is living? (I meant, I want to change pathfindergoal when it spawned. not before spawn)
i saw a dev log the other day
of them implementing drones
and the way they did
is that they had a "world grid"
so essentially each "chunk" had a height that was safe to fly at
im thinking of using that and then elgarls algo to find the route from one y to another
yeah
that was my initial plan
most likely deliveries
but could be anything
ummm no it is unlikely, it would be more like player x wants to send 64 diamonds to player y
using their locations as the start and end
this is an issue
so
despawn the entity
👍 we have the same idea
mhm
only issue is if the player goes and unloads the chunk for delivery
may want to add a load on start
something like this
yea i see what you mean about caching
howver i dont really know how much there is to cache
i mean
this was not gonna be the usecase
but i see what you mean
true
ok
so
what is the best solution to getting them to manage their y
cause to work out the y of a chunk
u need to know the chunk the drone is about to fly into
oh wow
cause atm you have to just loop thru every block to get the highest
its gonna be nms i reckon
lemme ask the paper people
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
ok
can someone review my first plugin? I posted on github
here is the link: https://github.com/LaivyTLife/DataAPI
😄
there are 16 chunk sections right?
D:
Hey, jeff how i can use multiples versions in my plugin with Maven?
nms versions?
static
Might have to translate to the other version of nms due to net Minecraft server doesn't fully exist anymore in 1.17 with other packages
oh, i will use lowercase now
?conventions
Java Coding Conventions: https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html
its the right way?
Look at that link for conventions
Folders are structured like a maven project but there is no pom.xml
Currently at -6000220 points
-6005220 points
This point system seems arbitrary
Try to be more specific and creative with names than this
its new PlayerVariable(player, varname)
looks more sense
Yeah but the name tells us nothing about what it's for or what it does
Only the Main class of an application should ever be allowed to be named Main
And since it's a plugin you shouldn't use that
yes, now that i realized it, i wouldn't realize it alone
Created and spawned a custom cow entity, server just closes, no error. Great fun.
no?
For the main
🤔
A decent amount of plugin devs just use the plugin name as the main class name
I'm surprised noone said anything about the wildcard static import
omg sounds perfect
^^
I thought originally that had some sort of enums or smithing but it’s a class
So yeah don’t do that
How many points
No it’s not
For some reason in 1.15.2 when i try to code and use "extends JavaPlugin" New project im working on btw but it doesnt work
120141241112 points
We're at -6005220 rn
renamed, renamed
I really didn’t want to pull this out
Lol
☕
Just name it by the name of your Plugin
PluginMain is literally no difference still. Implying Main the first place in general is despised severely
Adds unnecessary verbosity to the name
Exactly
Just name it your plugin
So what?
Do you have to add Main for everyone to know it’s the main class?
Not at all
It isn’t accurate, it has worse side effects lol
It may be confusing and awkward to work with if you have dependents who depends on your plugin main class
^
sure it would work fine if its just internal
well it would work fine all the time
true
Hey, this got posted the same day I joined this discord again
you see my readme.md? 😄
looks good?
do you find it necessary to put this in async?
just an Alter table
where do i start the process to reset my stash password? I get the following in an email when trying to reset my password:
Bitbucket is unable to reset the password for your account because it is managed by a read-only external directory. Please contact your administrator to change your password.
I don't believe the stash has public accounts
ok
Is anyones else Firefox on mobile broken when visiting a redirect site like spigotmc?
Aight
I will never go near chrome
It is
Chrome is ass
Right @daring sierra @quaint mantle
no “I give you ads I give you money”
but it's main selling point is "privacy" and it's obnoxious ads
It shows ads as a notification on windows and you get BAT
Currently it’s worth nothing
who cares about privacy
I have heard that facebook can reduce the oculus price by around 300$ simply by selling your data
Sounds good to me
So, I wouldn't say that privacy is worth nothing
but yes I agree chrome has poor resource managment and awful loading times with slow internet
Not like anything bad happens because companies sell your info?
Just cheaper prices and more relevant annoying ads
Nothing all too bad has happened yet
❤️
And even if they would know all my personal info - most of this personal info is public anyways for me
Mac is ass
Most of them got it by exploiting epic games
I have bought and cancelled a lot of times
how to use main thread variables in async?
People say nitro is ridiculous and that everything is nitro but they forget discord is free.
or push them in some kind of struct to pass them around the threads
Ye
ni
Wait wat
Idiot
Juice man
You there
Im not sure how i should go about getting the chunk that the drone should fly at
should i take the max height of the three 9 chunks it is in/surround it
like this?
makes senes
yeah
not equally sized 😭
to get the vector direction i assume i have to calculate it manually
lmao
something like tan^-1(x/z)
where x & z are the respective components of teh drones vector?
wait
hmm
im not sure that is the whole thing cause it just returns the internal angle of the triangle
will Array index is out of bounds error stop my code from working
?paste
wait i could just work it out by using the sign of the components
It's not special, it's a runtime exception
If you let an exception climb all the way up, it screws you
Though an AIOOB exception isn't something you catch. Again, it's a runtime exception, so it's something to be prevented, not fixed
https://paste.md-5.net/ucojuqucij.js (im trolling my friend in a troll server) so i want everything i say after /shadow get executed without showing in the console even without me having op perms
dw its just a troll server with my friends lol
and they agreed for the server to be troll plugins only
I don't think anyone cares about motives here, it's fine man lmao
idk man i dont wanna get banned or smth
We're just here to fix code
@grim ice Java arrays start at 0
ik that
You don't know that args[0] exists
You need to determine the size of the array at runtime and why it'd not be there
i know
Like they're saying, you're showing no guarantees that these accesses will be there
Error, he's getting AIOOBd
Yeah he's said both
I see
I mean they're the same thing, IDE is just telling him the error is gonna happen LOL
Check if args.length >= 1
Also, hex, get the command sender on one line first of all
And your chain of ifs is a job for switch
Well, think about it this way as well:
You're checking if args.length is 1, and then accessing the second index. It never exists.
i cant find it its way before
how?
Why are you giving the player op with this command
Wdym how
That's out of nowhere
Listen, if the args length is 1, the only index you've got is 0
You don't have index 1
^
That'd be length 2
ty
Now slow down, that's not the only thing weird with your code
Why are you giving players op inside the command
That's strange
wat
Look at the code
yes?
I think that's what it's intended to do
If the command is "shadow" you're giving them op
For the troll
yes
But like why?
One note I'd make is that the console can be defined outside the if statements
Since it's all the same
i was just copy pasting thats why
Ah ok
alr alr
copy pasting :(
Honestly it's still weird. I don't understand what giving op is doing
how do you assign data to an entity
Please be more specific
You probably want PersistentDataContainer, but please specify
I'm not really sure, It's for a future project I didn't start yet
What
anyways, I'll check out the persistent data container
I mean, maybe tell us what sort of data you'd want to attach to the entity
Maybe you haven't made the project you speak of, but what is your purpose
how do i prevent myself from a NULL error?
Don't access a null value
You make sure you don't- ^^^^
Spoonfeeding but this happens when you have a type at runtime which is null and you try to act on it. NullPointerException, because you're working with a pointer to null, which doesn't make sense. So be sure what you access isn't null
this isnt spoonfeeding
lol
spoonfeeding is
tell him to
Or you always use try and catch for nullpointerexception Kappa
if(thing != null){
//code
}
Cursed
it isnt
Unless it's from IO or user input somehow
thats just pseudo code, wouldnt define it as spoonfeeding
im pretty sure an ide will show what is a npe
It can show you what may be
i mean uh
how r u even supposed to spoonfeed npe
Because there is the @Nullable tag and such things
And it'll say "Hey, this may be null, be careful"

ignoring exceptions?
Did you code your code defensively or is it more regular code?
wdym
lmao nnyak got banned again
Who
well, you cannot ignore NPEs if your code wasn't written defensively
Jolly christmas hitler
Hehhhh?
He gets banned often
apparently he was racist in paper
and he's banned so as long as he comes back hes getting banned
So we are banning for peoples behavior in other Discords now? or did he do something in here?
atitude
he was rude to people in here and was warned alot
k
Dang
he wasn't just racist in paper to begin with
?paste
yeah he was super helpful but a shitty person
Anyone knows why is my plugin not working? https://paste.md-5.net/liniwujaco.cs
no error in console
anyways he will probably find a way to disguise himself and snake into this discord again so presumably wont be the last time you meet him
Bruh you know
this is against tos
If you're gonna cancel the event in all branches, just cancel it at the end
so you can probably report him
Not an error, but just saying
nothing we can do about it
Okay but that wont change it
_ _
its not
Who actually reads the tos seriously...
just dont break rules
I do
You're so weird
He's one of those people who is fine for a bit, quite helpful at times, then needs a ban to quieten him down
not really
I have read them over 20 times
What...
its pretty easy to remember
I'm a mod too, do not care for TOS
in the time of 3 years
It is common sense, all of it
anyways
Anyone knows why is my plugin not working? https://paste.md-5.net/liniwujaco.cs
No error in console
What is it supposed to do and what is it doing
seems like a horrible command to have
When you do..what command?
/shadow
Ikr? I kept asking him why it would just make anyone op, but no clear answer
Why not just have op to begin with
_ _
I can't stop it from showing?
You can
you can but idk why
gamerule broadcastConsoleToOps
I thought it will since im doing the code before the command is happening
PlayerCommandPreprocessEvent
anyways may you help me
So let me get this straight, /shadow would just give you op, and that's it. /shadow give @a dirt would give you op then give everyone dirt on behalf of the console
Your logic is very weird. Rather than having that chain of arg lengths, cut off "shadow " from the input and run that
what
How do I make that simpler
I've heard of dispatchCommand being unreliable
wat do i use then
...
Wdym?
did you even read my code
I don't remember, but a friend attempted to make something like this and he said dispatchCommand wouldn't work well
And it wouldn't actually run as the console
It will if you use it correctly
Is he using it incorrectly?
Bukkit.getServer().getConsoleSender().dispatchCommand(console, args[1]);
Sounds like it
That's...no
Then show me the correct way please
Bukkit.dispatchCommand(sender, command)
when a player holds nothing in the hand is it then Material.AIR ?
Item will be null
okay thx
why is this in the PlayerInteractEvent always true (Intellij says that)? if(event.getItem().getType() != null)
oh yeeeess true thx lmao
Bukkit.dispatchCommand(Bukkit.getServer().getConsoleSender(), args[1]);
If args 1 is the command yes
then why is it not workig
Also I don't think you need to use getServer
Show what you typed in the command
?paste
Anyone knows why is my plugin not working? https://paste.md-5.net/liniwujaco.cs
No error in console
bro chill
https://paste.md-5.net/dayenofuci.cs why does this class not work?
Why are you trying to add a secret hidden op command?
yeah
i wont give it to anyone
or publish it
lol
if i was gonna give it to someone i wouldve not sent it here
what exactly is not working..?
there is an exception when i try to right/left click the fire charge
so send it
what?
the exception obv.
oh okay
also enums should be always compared with the "==" operator
oh okay
Anyone knows why is my plugin not working? https://paste.md-5.net/liniwujaco.cs
No error in console
another repost ig
and why?
gogole it
because its null safe and there is no extra method call
okay
?paste
Gah !
whats in line 20
so either your metadata is null or anything with your enchantments
My guess is args[0] is never "shadow"
Its probably "/shadow" or the command isn't included maybe?
Put some print statements, see where it gets, learning to debug your code is something you need to do
the command should be always args[0]
^
appreciation post for the people who reply to questions here
you guys are very swag and cool and great thank you guys
I wouldn't know since I don't use CommandPreProcessEvent for logic ¯\_(ツ)_/¯
same
Okay I'm back did you fix Hex's shadow bs yet
no
Dang
like you do this work for free so thank you
Anything new?
Teaching is the best way to learn
facts
arg 0 is the command
#getMessage returns the command the player has sent. so shadow is args[0], but probably its "/shadow" @grim ice
a month ago i didn't know anything about spigot
Any updates in code?
because of the /? xd
Also yeah it probably is /shadow
Gets the command that the player is attempting to send.
All commands begin with a special character; implementations do not consider the first character when executing the content.
I'd think the / is included
by just adding a "/" to your equals check?
ok=
when ran from the console the / isn't included, is it ?
as you can run commands in the console without /
You should consider this case as well
its not supposed to be used in the console
Well that's misleading. It can and can't be
^
Huh
lol
uh
It's not hard to do
We are trying
yeah
thanks then
Hey guys, look my first plugin: https://github.com/LaivyTLife/DataAPI
please, send me tips to improve it 😄 thanks
I think it’s fine
it's not advertising, they're looking for tips
Not like it suits any other channel better, after all it’s programming help
like if they sent the spigot link it would be an ad
anyways
its a code review
but it's the source code so...
anyone has an idea
we just told you a solution ???
which is?
goddamn
Oh my god.
i only need tips to upgrade my plugins
sorry im dumb
do you read the messages
search it up yourself
Amnesia
scroll
yeah it's fine
im the only one who will use it
I'm not experienced enough to give hints yet i guess
Daniel uh well first of all, follow official java naming specifications
🤔
like... ?
package names, lowercase
its correct uppercase the "plugin" package?
nah, package name should always be lowercase
^
oh, okay i will lowercase now
refractor it with intellij, don't rename it raw
yeah, made it
good
Yep
yup
ngl this looks better too
your naming convention is shit. you are totally static abusing, why are you nulling the bukkittask but nothing else? its null by default. you don't have to explicit instantiate your vars inside the onEnable. such as the gitlink you can instantiate right away.
why do you have 2 database folders? dont run your database stuff sync. dont close the connection in your try catch, close it in the finally so it will be closed for sure. choose an other name for your Variable class, its redundant and non-telling what it actually do. think of the SRP when creating your classes.
thats for everything i looked at yet. so 2 classes or smth. now gonna get some food
Oh that might come a little harsh for the guy
^
Eh
thats not looks a constructive suggestion
They ask for tips, i mean that was kinda rude but at least it's helping
Well I’m not in the mood for reviewing code today but maybe another day 🙌
ill use the finally to close connections
but... what is the difference?
finally is called whatever happens
your try catch can break at any time
so it could cause a memory leak
yeah, i know
oh
its not rude. its the hard truth
maybe you can tell me your "hard truth" saying how i can fix
anyway, i understand a few things, i'll fix it
i did.
brb
we already fixed your issue @grim ice
or is it a new one?
yeah we already fixed it. read the chat.
i read it
so brb
BREH'
control + f 🙃
It wouldn't be useful to, ya know, actually say what order the items should be in...
Myes Bukkit design
like this?
Try with resources
hm?
?paste
try (PreparedStatement statement = ...prepare) {
}
When I do this, and use the spawn egg, it spawns like 500 of them and I have no idea why.
@EventHandler
public void spawnEntity(CreatureSpawnEvent e) {
if (e.getEntityType().equals(EntityType.COW)) {
((CraftWorld) e.getLocation().getWorld()).getHandle().addEntity(new CowAngus(e.getLocation()));
Bukkit.getLogger().info("Spawned Cow!");
}
}
its a loop
when a entity is spawned it repeats itself
I assumed, but how do I spawn the entity without calling the event again.
@grim ice You should add a break otherwise you have a fall through
Ohhh
Let me try it.
v
case 2:
Bukkit.dispatchCommand(console, event.getMessage());
event.setCancelled(true);
break;
case 3:
Bukkit.dispatchCommand(console, args[1] + " " + args[2]);
event.setCancelled(true);
break;
case 4:
Bukkit.dispatchCommand(console, args[1] + " " + args[2] + " " + args[3]);
event.setCancelled(true);
break;
like this
?
should be fine
how?
or you could you use switch expression if you use java 13 or greater
Consider try with resources
thats make sense
It implements AutoCloseable, which is a Java held interface
Java knows to do that for you
so... thats auto close?
Yes
wowowowo amazing
When the scope leaves, Java will close for you
Also you can just put that loadPlayer after the try-catch, no need for the finally
Did you try with the /
wdym
like this?
im trying getMessage now
Newline that please
;-;
But yes
ok
wat
You're only executing "shadow". And if that's not all, try putting "/shadow" there and tell me what it says
if that was the case saying shadow would work
Like I said, try /shadow
Okay
Because I don't know if getMessage will include the slash
But I think it will. The docs don't imply otherwise
thats what we already discovered before
and he didn't even noticed it
and was too lazy to look it up
Lmao
Yeah didn't we say to try "/shadow" like 15 minutes ago LOL
15 minutes ago 15 times
Not being good at programming does not mean that
Does your beard go down to your stomach
uh, no
Okay but did you fix it
Not yet, im compiling'
Alr, so I am going to need some custom plugins for a server. I plan on creating them myself but needed a place to start. I am familiar with HTML/CSS and can somewhat read java without being taught.
I just need some info.
-
What is all used for plugin creation? I assume java, but does it use more than just java? Like javascript or smth similar.
-
Is there a place where I can find a list of MC variables for the coding, or do I have to play it by ear?
Also, I assume I can use Dreamweaver since you can code just about anything in it. But is it better to use smth like eclipse or netbeans?
Ty in advance!
- yaml but it doesn't count
- what...
- If you're comfortable with...whatever that is, go ahead. But most will recommend IntelliJ IDEA
Also, I don't mind being pinged or DMed if you need more info
JSON is also used sometimes, depends on what you're doing
- Java, YAML, build tool lang, spigot (or any other fork) - really depends
- javadocs i guess, whatever you mean
what is dreamweaver
Dreamweaver is like netbeans or eclipse. It is Adobe's coding software
ew
I was afraid to look it up
And I was right to
What the heck is this UI
VSC is better than this
editing my photos in my dreamwaver IDE from adobe
Yes
lmfao
Adobe needs to stick to graphics bruh
nah adobe is just for making graphics
I mean like the variables in the code that are relative to Minecraft. Because Java is used for so many diff things. There has to be some argument or variable for MC
?Jd-s
@unkempt ore
it worked
@tribal elbow
Ok
Yes...that is what I told you
I mean sure there are variables but Java is fully object oriented to no inherited top stuff like other langs
Ah, gotcha
Everything is basically contained in classes which you need to import in order to use their respective variables and functions
So it's more a case by case thing?
For example, to create a command like /stone that simply places a stone block. Wouldn't there be some term or name for the code to.know what that is amd what to do? (Haven't looked at Java too much sry xd)
Mr. Fisher I'll ask right up front. Do you know Java
?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.
I said I did not
Ah, didn't see
I would strongly suggest reading into Java a little bit more 😉
What do you know
I know a moderate amount of html/css
And can read stuff like java but dont know the lang
Hmmmm, yeah, no, forget everything you know. This is a different world
Like I can see that this does this but idk why xd
HTML and CSS vary humongously from Java
Deff xd
That's why I was asking what languages were used
So I can do some studyinf
Studying
Yeah just Java should be the answer
Would be kinda nice to have a safe navigation operator in Java now that I think about it
Off the topic
Javascript would be more if I wanted to link smth to a website right?
Safe navigation operator?
I mean it’s just too make websites interactive and functional
Exactly
possibleNull?.doSomething()
But it's something like var thing = object.getThing() ?? (fallback thing);
Alr
And it reacts if it's null
That's the java I remember xd
Trust me, it's not
Java has ternary but it’s not like that
Been like 6 years since I last looked at java xd
Well you didn't see that
thats gotta be javascript if you saw that
Oh guess you mean this tho Operation
And some other language, I forgot
Kotlin has it, in fact a lot of high level langs got it
Conclude, could you DM basically what you told me?
What code is used and those educational links for java.
?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.
^
Always wanted to learn java and be able to code plugins and such..just never started xd
Aight
I am familiar with the idea of coding, just not java
I looked into java like 6 years ago and just never tried to actually learn it
6 years
Like 4-6
That's like...how long I've been programming for
Breh xd
Back in 4th grade bruh
Anyone know a calculation to check how much of something a player can afford with an increasing price? Without the need of for loops.
Like the max the player can afford
What
I'm graduated and was in votec xd
How does it signify nothing
for all we know you could be a 5th grader
I was in 4th grade 6-7 years ago
how old are u 😳
16
😂
uh
Are you okay?
no
he just said he was 4th grade 6 to 7 years ago
Ok
yeah but you don't have to be [insert age here] to be in 4th grade
And the number 16 is just hilarious to him
when either the chest or the paper in my main gui gets clicked not the depositGUI nor the withdrawGUI gets opened
@EventHandler
public void guiClick(InventoryClickEvent e){
Player player = (Player) e.getWhoClicked();
if (ChatColor.translateAlternateColorCodes('&', e.getView().getTitle()).equals(ChatColor.DARK_GRAY + "Bank Menu")) {
if (e.getCurrentItem() != null) {
e.setCancelled(true);
switch (e.getCurrentItem().getType()){
case CHEST:
bankerGui.depositGUI(player);
break;
case PAPER:
bankerGui.withdrawGUI(player);
break;
default:
return;
}
}
player.closeInventory();
}
}
They might be from the united kingdom or another country
We use a thing called "Years" in the united kingdom
Year 11 = 15-16
light years 😂
wow

