#help-development
1 messages · Page 1519 of 1
that or nny is fine
just abbreviate it to jch
lol
That’s a shout
jch, I like this one
Yeah
anyways
how do you pronounce it tho
restart & update now
who wants to talk about how pride month is literally undercover satan worshiping pushed by the deep state
No
no
We had this last night
it's still relevant
We've been over this
for around 11 more days
it was RNG, so does not really matter
Why 11 days?
is satanism bad?
NNY did the internet arguing machine name you?
June
no, satanism is actually quite interesting
june ends at some point
What is special about June
and I find it to be quite close to my ideological landscape
I mean last I recalled satanism doesn't condone violence
pride month
bruh
It is? How come it is a whole month?
it doesn't condone violence but you could say it condones decadence
cause it's a month wdym
but regardless, satanism isn't satan worshiping anyway
Yeah but normally things just get a weekend or a day
unlike fucking pride month
yes that is true that it does lol
Ehhh - I just didn’t know it was a thing
hey @wraith rapids
did
https://youtu.be/PJiRijiLwbQ
name you?
It has finally arrived! Let the Comment Assistant™ fight your internet battles for you. A sample of the logical arguments the Comment Assistant™ is capable of:
DFGJKNABEHOÖägk'åD^KFIål'kuähiostöeagrluefykdtsrDY4579UEHOTI
FOLLOW ME ON TWITTER: http://twitter.com/simonegiertz
FACEBOOK: https://www.facebook.com/simonegiertz/
INSTAGRAM: https://in...
pride used to be a sin in the olden days as NNY said yesterday (I think)
Seems a bit weird but who am I to judge
depends where even if you are talking about olden days
yes, the first and foremost of the seven
I see
13th century
i'm an old fashioned guy
Yes
I meant geographically and culture @quiet ice
no other culture than central western european culture is worth talking about
everything else can get nuked
lol
Others weren't really present at that time
fuck the chinese
what are you talking about?
I like their rice
like fuck the chinese or
fuck the chinese
there was plenty of people that existed in many places XD
"people"
do you have reasons to hate it?
Sure, but they didn't end up having such a large impact
i may or may not
so what's your reason
i generally dislike china because everybody is raving about being eco friendly and shit
but like 75% of the plastic in the world's oceans comes from china
and nobody gives a shit
unless you want to go all the way back to the Neanderthal period @quiet ice and odds are they weren't everywhere XD
people just run around with petulant fucking petty complaints about muh diesel engine makes too much smoke
that is true
while ignoring the actual problem
can confirm
I do not want to
everything is plastic
the third world countries, and india and russia and china
they dont give a fuck about being ecofriendly
literally no waste disposal or care for the environment
they just ssay that
Well, who are we going to exploit then?
everything is just pumped into the fucking ocean
well not exactly right
some of these countries can't afford to
since most of china dont even have access to the ocean
meanwhile ME with my fucking diesel car need to pay triple the taxes of a normal person because diesel supposedly pollutes too much
We are the people wanting low prices and a decadent life yet we want ecology
Wasn't diesel supposed to be better for the climate?
it is if it runs properly
donno, I dont drive
in most instances diesel is cleaner then gas XD
but, it does have higher particle emissions
of course since I pour engine oil into my fuel tank it isn't anywhere close to clean
at least it isn't that blue stuff
adblue
think about this:
Gas > Car > Grocery Store > Food > Human > Walk
myeah
but it's also blue
that's used in trucks and shit for reducing nitrogen based oxidants iirc
just that alone is ironic because nitrogen isn't harmful to the air XD
iirc nitrogen oxidants are like harmful to the ozone layer or something? idr
ooo scary nitrogen
they're bad for some reason
well, nitrogen itself is safe, nitrogen based stuff may not be
they are bad because someone said so somewhere
is nitrogen safe itself tho?
Carbon itself is safe, carbon dioxide is deadly
nitrogen bombs
yes, but it depends on the ratio. If you have too high of a ratio of nitrogen vs oxygen it will cause problems with your lungs lol
dose makes the poison or however it goes
nitrogen poisoning is a thing usually with divers XD
that is when you surface too quickly
it's like the diver's sickness or smth right
any gas is the issue actually
the nitrogen in your blood which is enriched from the oxygen tanks ends up expanding too fast when you surface too quickly and can be quite fatal
Decompression sickness (DCS; also known as divers' disease, the bends, aerobullosis, or caisson disease) describes a condition arising from dissolved gases coming out of solution into bubbles inside the body on depressurisation. DCS most commonly refers to problems arising from underwater diving decompression (i.e., during ascent), but may be ex...
fuck america
and the middle and far east
I'm going to greenland
China includes Hong Kong Macao and Taiwan tho?
and all of africa
do you hate those too?
Nitrogen poisoning can be quite terrible though, because the initial symptoms are very minor like coughing and what not, when the fatal part happens like 2-3 weeks after that XD
and especially south and middle americas
Did you see their living conditions? It is basically a detention center there
fuck them extra hard
Serious Spigot and BungeeCord programming/development help | Ask other questions here
and fuck sweden
interesting
unfortunately not every country is like the US or the EU where people are mostly free
"mostly"
what does it mean to be free to begin with
in both countries there is limitations to your freedom
however in both you have to pay taxes to just live
so I mean if you call that free then so be it lol
you can kill yourself without being sentenced to death
yes but you will go to hell
forever
cause that's a sin
and the christians got rid of purgatory a few hundred years ago
but you dont get a death sentence
In some States in the US, it is illegal to kill yourself without the permission of a Judge 😉
the purgatory made things too easy
oh
who cares if you have to toil in hellfire for a few hundred years
you still go to heaven afterwards
I really have no idea how that law is particularly applied if someone does it anyways @keen kelp but still illegal XD
presumably the repercussions aren't placed on the person himself
I'm going to be honest the whole religion , you're going to hell because of this . Seems like the biggest lie
but probably stuff like their inheritance and wealth and whatnot
Well, what if the attempt fails?
that reminds me of the electric box where it says like "Warning: touching this box could result in electrocution and a 50euro fine"
you get a death sentence
I guess it gives them a reason not to?
I mean, it would be an attempted murder
"Attempted suicide"
attempted murder on yourself? lol
since we can't have direct natural selection anymore
we should encourage suicide
self subjected darwinism
That is dark
personally I am not against suicide it just really depends on why someone wants to. For instance I have a friend who is almost 90 and they don't want to live anymore.
Why should I be the one to tell them they should live longer then 90? Their wife died, they have ailments they can't stand anymore etc
Assisted suicide?
a fancier word
euthenisia?
yeees
If that was legal he would do that
Means "happy dying" or something like that iirc
He has lived a fulfilling life according to him and he is happy with that 🙂
you don't get to decide about your life
you must live and continue to consume, goy
who else will big pharma sell the medications to
if people could just choose to die rather than suffer with incurable and expensive to care conditions
People that are overly cautious about their health?
also, while I don't believe people should kill themselves if they are young, I am also not going to go out of my way to stop them. I mean if someone really wants to go they would find a way.
maybe
but there should be a 3 month clearance period
and you should have to fill paperwork to get a suicide permit
what in the fuck
I would support this
there was a guy who built himself a shotgun helmet
suicide permit sounds like smth from a parallel universe
iirc the helmet had like 12 rounds of shotgun shells rigged to fire simultaneously
where instead of everyone wanting to go to college and get paid get paid gatorade or some shit people just want to have s*x and die
I suppose that is one way to do it
can't you buy like painless suicide kits online
iirc they use like nitrogen or something to replace oxygen
anyways, it is only been in recent times have we really stopped people from killing themselves lol
like a bottle and a mask that you breathe from
if youre in the eagle nation you can just get a gun
but that is a bit painfull
thing with the nitrogen mask thing is that it doesn't trigger survival instinct
there was a reason why in times like medieval ages older men and women went to war XD
Especially if it fails
unlike a gun or jumping off a bridge
because no matter how shit things are, the brain is hardwired to want to live
iirc you cant kill someone even if you got their permit right
depends
depends on the circumstances
When I was in the Army, if I got deployed to hostile/combat places I pretty much had a permit to kill people lmao
ofc in peaceful time
Some legal systems would allow it (under some circumstances) others wouldn't
bounty hunting is still a thing too
permits and contracts generally don't go over the law in most legislations
I mean like if I want to die
and ask you to kill me
would it be illegal
if you actually shot me
in some US states assisted suicide is legal but only if you have some kind of terminal illness
This depends on some states mainly due to how they have the term murder written or manslaughter
i can shoot you with a bow
Ah, good ol bow and arrow
I haven't thought of that
if you had like a will that proved they ok'ed being shot/killed, you could technically get away with what most would state would be manslaughter or murder because you didn't have ill intentions and the other person is technically not a victim since they wanted it.
You could also use a kitchen knife
bows past a certain tensile strength are classified as guns here where I live so it'd have to be a puny bow
I want to look that up now
not sure about slingshots
in hk how powerful does a bow have to be in order to classify as a leagle
Or just use a club
manufacturing guns is super forbidden but I think I might be allowed to build a catapult
iirc it's dependent on the jouls of energy it consists of
what about flamethrowers?
not sure how that goes here
based on the elon musk memes it might be viable in the mericas
what about a nuclear bomb
yeah can't have one of those
is it illegal to build that tho?
yes
i kind of want to build a railgun
what would it classify as
or a gauss cannon
just get some ball magnets
Railguns are actually awesome
but i'm too much of an electronics noob to get it working properly
i wonder what it'd take for a DIY compulsator
we have already started installing railguns on US navy ships lol
yeah i heard
what is the difference there?
you talking smth like this?
gauss cannon is like an electrical pulse cannon @quiet ice or plasma type gun
yes, the us navy is installing wooden boards with pinballs attached with rubber on their ships
ah
Imagine
gauss cannons have one or more coils that pull the projectile forward, triggered in sequence
they just like like hundred of these in a roll
and the last ball just comes out faster than c
a railgun magnetizes the projectile and uses the current going between the rails to push it forward
requires less timing and gizmos but wears faster and uses more power
It could also melt the slug, thus increasing the damage
if the slug melts, the only thing you're damaging is the rails
The US Navy and government testing officials indicate that the prototype of the naval electromagnetic railgun is progressing towards eventual sea testing.
Railguns use bursts of massive electromagnetic energy to push solid projectiles at high speeds over great ranges without using gunpowder or chemical propellants. The U.S. Navy prototype is de...
Shouldn't the magnetic field prevent the slug from touching it in the first place
I hate how all of google's autocomplete for "railgun" is about a certain scientific railgun
magnetic field exists only in the rails, not the projectile
seems like I am misunderstanding how it works
well the give away in what you were looking at was wrong is that we were talking about weapons XD
I know youre talking about the weapon
magnetic fields if they are strong enough can move non-magnetic objects
I just dont like how the anime is more popular than the weapon
probably because railguns were announced I think somewhere in 2010-2011 and everyone has since forgotten about it XD
nyeh
does anyone know where to get a minifridge/minifreezer?
for storing drinks
We're moving in like a year or smth and I want a mini bar in me room
Hello, so I'm trying to add a tempban command into my core (finally) but I've run into a problem while testing my system. Integer.parseInt() will throw a NumberFormatException even though the string contains a (maybe parsable?) int at the beginning of the string. The strings are formatted like this: "7d, 1s, 1mo, 1m" etc
Is there a way around this?
i know it's not an int, but parseInt is supposed to take the int out of the string right?
thus throws NumberFormatException
no
it just takes it
and tries to make it into an int
I think it also errors out on stuff like 1.5, but I am not too sure
you can make it a int that stores the length in seconds
and convert it into string with a method
yeah cause 1.5 isnt an int
well the intention of the command is to be used like this: /tempban Player 7d reason
then you can make a converter
cut the string in half
take the last char and store it
take the rest and parseint it
Isn't there a parser for that
or you can do smth like this
https://stackoverflow.com/questions/16787099/how-to-split-the-string-into-string-and-integer-in-java
Use libraries that are meant for this
that's using regular expression in case you dont know
This is brute forcing and basically useless since someone else has already done it
but yeah using some lib that's dedicated to converting short time to value would be a better way
but if you only need something that "works" you can do what I sent
There is Duration#parse for example, which is in Java's runtime
i've already got a different system to parse time, I literally just needed to get the int from the command
so this should work
Also Period#parse
in that case you can just cut off the last one
well I'm also letting them input longer versions of the word if they want to, for example ("hours" or "days")
so i can't necessarily do that
otherwise i would lol
I see
then use regular expression
or you can look into some plugins that does this and see how they do it
https://stackoverflow.com/questions/16787099/how-to-split-the-string-into-string-and-integer-in-java
I'll try this one first
yep
does it matter how i make my regular expression in this case? or can I just use (?<=\D)(?=\d) and just get part[1]? or do i have to flip it around and get part[0] (never seen this before, so i'm not too farmiliar with it lol)
why that?
hm
Double escape
seems like it
after a quick print test, it seems that it will only grab the first int
as in?
\\\\d and \\\\D mean the exact opposite
if the string is "30d" for example, it will only pick up 3
+ actually
wait
@EventHandler(priority = EventPriority.HIGHEST)
public final void onInventoryClick(InventoryClickEvent e)
{
System.out.println("Inventory " + e.getInventory());
System.out.println(e.getView().getTitle());
System.out.println(name.getText());
System.out.println(name.toLegacyText());
System.out.println(e.getView().getTitle().equals(name.getText()));
System.out.println(e.getView().getTitle().equals(name.toLegacyText()));
if(e.getView().getTitle().equals(name.getText()))
...
[11:49:00] [Server thread/INFO]: Inventory org.bukkit.craftbukkit.v1_17_R1.inventory.CraftInventory@76777f3c
[11:49:00] [Server thread/INFO]: Select a Team
[11:49:00] [Server thread/INFO]: Select a Team
[11:49:00] [Server thread/INFO]: Select a Team
[11:49:00] [Server thread/INFO]: false
[11:49:00] [Server thread/INFO]: false
Select a Team is not equal with Select a Team ?????
Do not use the star wildcard here
No, + means "at least one"
oh
- means "0 or more"
man my memory is getting worse
nonoono
that's my best guess
dont
idk then
Stupid suggestion
but it's string right
right
I'd trim the text and see if the issue was the whitespace
Ok I will trim the text from both then
other than that, idk what happened here
from copying the the text he sent, theyre all 0x20
so either java/minecraft is being stupid or discord
Haha
likely discord
y' got it?
But in the Console they are exactly under each other
there's more than 1 invisible character with that width lol
Could still be whitespace that it appended after the text
it might not be the same space is what Im saying
worst case you just print all the characters manually and see what is really wrong there
print their unicode hex code XD
Oh I see here an issue: The class is not updated through Maven (from my API)
If I open the class I see the old class from 15 mins ago
Yes
actually how many versions backwards does spigot support
or only the newest
suppose to
If I add the dependency again to Maven I see the class updated
pog
Btw it is in my local repo
so is your problem solved?
No, because the console keeps printing with spaces, even with trim()
And it keeps also printing false at equals
string.replace(" ","")?
Ok good idea
Now Maven does auto update my class again so that is solved, but not the main problem
good luck
so emm how do yall do local servers for testing the plugin
like just press the run button and it automatically buillds, puts itself in the plugins folder and runs the server
usually you set the artifact path to the plugin folder and just build
then just reload the server
I see the problem: THE EVENT WON'T GET CALLED, instead InventoryCloseEvent gets called if I try to replace things in the inventory
I dont know how to make the plugin handle reloads
I just dont know the event that triggers it
you... handle the data... serialization yourself..
hashmaps shouldn't prevent this, just save the data in the hashmaps if they need to be saved, clear the hashmaps, then reload the information into it 🙂
like how do I know the server is reloading
onenable/ondisable?
onDisable() is a thing just like onEnabled()
wait that's it?
in onLoad check if Bukkit.getWorlds() isEmpty()
you put in the onDisable() anything you need saved
clear out your lists
in the onEnable() you would rebuild all your objects/hashmaps
I know onDisable, I alr save everything in there anyway
If its empty in onLoad then its a fresh start, if there are worlds its a restart
onLoad()
{
if(Bukkit.getWorlds().isEmpty)
//startup
else
//reload
}
no, isEmpty() not null
3x
[12:07:20] [Server thread/INFO]: Close
[12:07:20] [Server thread/INFO]: Inventory org.bukkit.craftbukkit.v1_17_R1.inventory.CraftInventory@59b38611
[12:07:20] [Server thread/INFO]: SelectaTeam
[12:07:20] [Server thread/INFO]: SelectaTeam
[12:07:20] [Server thread/INFO]: SelectaTeam
[12:07:20] [Server thread/INFO]: false
[12:07:20] [Server thread/INFO]: false
@EventHandler(priority = EventPriority.HIGHEST)
public final void onInventoryClose(InventoryCloseEvent e)
{
System.out.println("Close");
System.out.println("Inventory " + e.getInventory());
System.out.println(e.getView().getTitle().replaceAll(" ", ""));
System.out.println(name.getText().replaceAll(" ", ""));
System.out.println(name.toLegacyText().replaceAll(" ", ""));
System.out.println(e.getView().getTitle().equals(name.getText().replaceAll(" ", "")));
System.out.println(e.getView().getTitle().equals(name.toLegacyText().replaceAll(" ", "")));
...
@EventHandler(priority = EventPriority.HIGHEST)
public final void onInventoryClick(InventoryClickEvent e)
{
System.out.println("Click");
System.out.println("Inventory " + e.getInventory());
System.out.println(e.getView().getTitle().replaceAll(" ", ""));
System.out.println(name.getText().replaceAll(" ", ""));
System.out.println(name.toLegacyText().replaceAll(" ", ""));
System.out.println(e.getView().getTitle().equals(name.getText().replaceAll(" ", "")));
System.out.println(e.getView().getTitle().equals(name.toLegacyText().replaceAll(" ", "")));
...
NOTE: I only tried to replace one item
can't there just be some shit like onReload
Is this for a bug report or something?
they @eternal oxide , you can still get players even though the server is reloading right
if its a reload yes
@Override
public void onLoad() {
if(!Bukkit.getWorlds().isEmpty())
{
for(Player player: Bukkit.getOnlinePlayers())
{
//do stuff
}
}
}```
risky
you mean it throws error if no player is online?
you are safest going things to players in onEnable not onLoad.
oh
You can detect if its a reload in onLoad but you shoudl not do anything with the API in there
you can load your own db stuff and such
so like set a variable in onLoad saying if it's a reload or not
yes
and within onEnale deal with it
i normally just do stuff like this onload:
if (Bukkit.getWorlds().size() != 0) {
Bukkit.shutdown();
}
🙃
evil
so if it's a reload
the server fucking dies
correct?
idk what Bukkit#shutdown does
It waits until it finishes reloading and then closes
yes
That waits until the server starts ticking afaik
But - it is necessary cause one of the libs i am using has a fit if it gets /reloaded
no, so smth like schedule it for 3 mintues later
so they have no idea what is making the server die
no
cause it messes with the plugin
i do message the console
to tell them
but, it has to not be reloaded
new Random().nextDouble * 50 + 200
Is there an actually good /reload plugin
no there isn't
type
?
/
r
e
s
t
a
r
t
that's what it does
what
spigot handles it
kills the jvm and runs the start script again
/restart for me just stops the server?
thats what restart-script: is for in the spigot.yml
for some reason nobody knows that
i mean it is not documented afaik
and if youre using smth like pterodactyl panel, the restart button literally runs /stop and start it up again
bruh
in the server root ofc
@Override
public void onLoad() {
isReload = !Bukkit.getWorlds().isEmpty();
}```
easy
no where in the yaml file
Server root
line 26
i just couldnt see it
hf with your new discovery XD
i mean - i always just assumed it was kinda a joke or something
should I handle the loading hashmap in the listener itself or onEnable?
onEnable i imagine, what are you loading?
Yeah probs onEnable
ok
cause i imagine it is a vital part of the plugin
before or after the listener is registered
yeah it is
it's literally used every tick lol
i dont think it really matters cause the server dont tick until all plugins are enabled (i would do it before)
Why?
yes
that doesn't seem like such a good idea
why not
you should probs do it a little less frequently
well - its kinda useless to update them every tick
there is no way you need that sort of precision
well
what stats are you trying to display?
defence and magic mainly
How are your backpacks?
some others things too but you get it
it's working fine, but I cannot solve the teleportation underwater problem.
they can change in real time so
ok i guess
NNy said I should use packets to spawn the armor stand
so the armor stand is client side
what issue are you having?
Yeah - you could do
Im not to familiar with what it actually is.
Is the armour stand the backpack?
or like wearing it
Yes, it's actually an armor stand on player passengers, and on the armor stand helmet, i put the item with custom model data.
Very nice
oo sounds fancy
Simple, you can't teleport with passengers.
solution: dont
just remove them as passenger and add them back
yep
You can't if you're underwater.
teleport packets are sent more than you think
Mounts are kicked off underwater iirc
Because I keep cancelling the dismount.
What does that do ^^
what effect does it have
ie what happens without cancelling it and what happens with
if you don't cancel the dismount.
the armor stand will dismounted from the player
so it floats on the water
yes
but that event is fired a lot, just like PlayerMoveEvent.
if the player is underwater
i remove the armor stand first, and then add them back once teleport is completed
ok
So do you need to trick the server or the client here is the question you should be asking yourself i think
nice model btw
ServerCommandEvent and PlayerCommandPreprocessEvent, to which do I need to listen if I want to listen for all commands? Or both?
I am checking for reloads btw
i should trick the server i think, make the server think there is no armor stand.
but sometimes the client has logic as well to not allow mounts underwater, so its really gonna be trial and error. defo try packets though. have you used them before?
its not that bad
anyway, i'm having problem showing gif on spigot resource thread, can someone help me?
Yeah
spigot uses a proxy so it is sometimes a pain
if you upload them to giphy and then get the direct url it has worked for me in the past
yea it worked for me too, but now it doesn't
it shows on the description, but when i click the preview it just shows [IMG]
🤷
wait wtf, not it worked
I had similar issue with only some gifs
The gifs that were big in size
I use imgur btw
how do I make a command default to my plugin's instead of vanilla's
Must be a bug
mine doesnt
either
have a look to see if paper's does
you can just grab the enums from there then
it doesn't
its a bug with whatever you are using to view it
didn't you ask this the other day? o.O
can you see beyond?
I can yes
well - i guess chrome dont work
could have sworn someone asked the very question you did like 1-2 days ago @sour warren
yes
its fine on internet explorer
you asked
no you cant me my default shut up
i will screen one sec
how do i set specific directory as a VCS root in intelliJ?
which?
Firefox
oh
chrome for whatever reason has an issue with it
complains about something with javascript
didn't know Edge had issues too
but Firefox seems to be fine, at least for me anyways 🙂
Firefox works for me nicely
not sure what chrome or edge changed though to cause issues with it XD
must be something with chromium since edge uses that
Just to be 100% sure, string is not a primitive right
no
protected boolean CheckArgs(String[] arg, CommandSender sender) {
if(arg.length == 1 && !(sender instanceof Player) || arg[0].length() == 0)
{
return false;
}else
{
if(arg.length == 1)
{
arg = new String[]{
arg[0],
sender.getName()
};
}
return true;
}
}```
so why does this give me the error of arg is never used
can I not use =?
Not solved while updated to the latest spigot, can I make a bug report?
@eternal oxide
can you see why arg goes unused isntead of editing the original?
it's an override method if that changes anything
Nothing wrong with that code
Intellij say it goes unused
well you need a bracket around your && || checks
yes, it is unused
as you are modifying the passed in var
InteliJ being an ass
bruhh
why do I need brackets
if
there's only 1 argument
AND
The sender isn't a player
OR
There's no argument
you have an && as well as an ||
Intellij is doing nothing wrong
the first test must be true
why
if all of that, return
or the arg[0] is empty
arg[1] wouldn't exist if arg[0] is empty correct?
just confirming
cause you can't do double space for commands right
it will probably work. I just like parenthesis to clarify the grouping of checks
makes it readable
(Only 1 arg AND Sender isn't player) OR the first arg is empty
However, yes InteliJ is correct and your code is fine
no intellij is being a little shit on me not using this variable and telling me to delete it
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull org.bukkit.command.Command command, @NotNull String label, @NotNull String[] args) {
if(CheckArgs(args,sender))
{
return run(sender,command,label,args);
}else
return false;
}```
Thats the problem of using an IDE that tells you how to code instead of you telling it.
this is how it's used btw
just ignore it
https://hub.spigotmc.org/jira/projects/SPIGOT/issues/SPIGOT-6584?filter=allopenissues for the devs, does somebody also experience this weird issue?
has replied
Hi how i send message with actionbar ???
?uwu
I told you what you're looking for
I cant watch the vid
I just checked before and this not help me
How does it not help you?
Yes I don't know the video is not working, but don't know why
Anywhere else to upload?
Which part do we need to explain?
the send message actionbar
?spoon
Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.
I feel like ?spoon is very spammable
We won't spoon feed you code. We can however teach you the Javadocs
thanks you so much for help man
what's the error parseInt throws when it's not a string
like parseInt("ABC")
what error is it
NumberFormat iirc
Full error :P
hey guys i dont understand how i am supposed to import stuff i just do import org.bukkit; for example and then i get error package org.bukkit does not exist
am i supposed to download something
add it as a dependency
Hmmm - i think that if you could replicate this behaviour with a lot less code he may 'understand'. it is quite difficult to understand what is actually happening
or use maven/gradle
me?
How would you do this then? Creating a test plugin?
yes
Yeah
how do i do that
Do you use maven or gradle? @quaint mantle
read the getting started guide
maven
Just Fucking Google It helps you help others to use Google and search on their own!
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
ok thanks @opal juniper
http://www.just-fucking-google.it?s=spigot development&e=mover this one is much funnier
Just Fucking Google It helps you help others to use Google and search on their own!
I mean if theyre missing Bukkit as a lib they prob need to read the getting started guide first
ik mover is funnier but it's meaner :p
Bukkit#dispatch doesn't need a slash right
shouldn't
bruh
ah wait
Just Fucking Google It helps you help others to use Google and search on their own!
fuck you
You dare use my own trick against me Potter?
it's funny but not hard
the hitbox is huge as fuck
and you can always trap it in the upper corners
but it's funny
Its like duckduckgo
but they collect all your personal data
and we love it for that
Just Fucking Google It helps you help others to use Google and search on their own!
How do I make my command be used over the vanilla command with the same name
Isn't that default?
e.g. /say, I want it so that when player types /say, it uses my plugins instead of vanilla
maybe its because Im trying to do it with reload
wait reload isn't a vanilla command what am I saying
a bukkit/spigot command I meant
wait what
isn't that like...
imagine this music playing please
https://www.youtube.com/watch?v=0Wi8Fv0AJA4
so how do I make it have priory over the vanilla/spigot/bukkit one
I'd use PlayerCommandPreprocessEvent
Isn't that default?
I think that's what it's called
If not look at Essentials
then cancel the event, and do your own thing
Why so?
.
Essentials overrides all the Vanilla commands
I dont see how it's doing it
Is there some library or something that is able to put materials into categories (preferably similar to the creative tabs - but other things are fine)? It doesn't need to be feature-rich, but I wouldn't want to reinvent the wheel there
same
Basically something that has a Material.STONE -> "Building Blocks" map
Just however with all the materials and not just stone
api-version: 1.16
Im assuming we are at 1.17 now?
yes
any idea how to return the boolean?
Don't do it inside of the runnable
why would you return on an eventHandler?
EventHandlers are voids. you never return a boolean
Also that
You don't. you cancel the event or you don't
The issue is that the lambda will be executed long after the method returned
Wasnt there a command for this?
So you cannot delay it by a bit and you cannot put it in a lambda
Here you go
also can i call the event as onInteract() in different classes ?
off chance is there a way to check if a player is blocking a player in social interactions at all? just checking tbh
You don;t directly call Event methods. They are consumers for Spigot
what do you mean with that exactly?
You should use the plugin manager to fire events if that is meant by that
i mean i want to be able to attach a string value and check for each string value whether someone's armor piece has that piece of lore
But calling it directly is legal if that is the question, but not enouraged
i dont think that would be a spigot feature
only ask because it doesnt work with any chat plugins as far as I can see
eh be alright
Why doesnt WorldCreator.copy clone the world??
read teh javadoc
so if i call the event like this it wont register it?
no
uhh
what do you mean "register"?
What are you trying?
Use the plugin manager to fire events
Ah
Hello! how can I cast IChatBaseComponent[] to String? I tried (IChatBaseComponent[]).toString(), but server kicks me(NPE) when I chat.
my code:```public void injectPlayer(Player player) {
ChannelDuplexHandler channelDuplexHandler = new ChannelDuplexHandler() {
@Override
public void channelRead(ChannelHandlerContext channelHandlerContext, Object packet) throws Exception {
// Bukkit.broadcastMessage("PACKET READ: " + packet.toString());
super.channelRead(channelHandlerContext, packet);
}
@Override
public void write(ChannelHandlerContext channelHandlerContext, Object packet, ChannelPromise channelPromise) throws Exception {
// Bukkit.broadcastMessage("PACKET: " + packet.toString());
if (packet instanceof PacketPlayOutChat) {
// Bukkit.broadcastMessage(packet + ".r");
Bukkit.broadcastMessage(((PacketPlayOutChat) packet).components.toString() + "<");
}
super.write(channelHandlerContext, packet, channelPromise);
}
};
ChannelPipeline channelPipeline = ((CraftPlayer) player).getHandle().playerConnection.networkManager.channel.pipeline();
channelPipeline.addBefore("packet_handler", player.getName(), channelDuplexHandler);
}```
Isn't there a serializer of sorts for that?
wdym what pluginmanager, sorta confused
omg it so damn hot in my house
then just go to the basement, adapt
at some point it implements it
villager inception... WHAT HAVE I DONE
Hello
! How to modify packet data? I made following code: ```public void injectPlayer(Player player) {
ChannelDuplexHandler channelDuplexHandler = new ChannelDuplexHandler() {
@Override
public void channelRead(ChannelHandlerContext channelHandlerContext, Object packet) throws Exception {
// Bukkit.broadcastMessage("PACKET READ: " + packet.toString());
super.channelRead(channelHandlerContext, packet);
}
@Override
public void write(ChannelHandlerContext channelHandlerContext, Object packet, ChannelPromise channelPromise) throws Exception {
// Bukkit.broadcastMessage("PACKET: " + packet.toString());
if (packet instanceof PacketPlayOutChat) {
}
super.write(channelHandlerContext, packet, channelPromise);
}
};
ChannelPipeline channelPipeline = ((CraftPlayer) player).getHandle().playerConnection.networkManager.channel.pipeline();
channelPipeline.addBefore("packet_handler", player.getName(), channelDuplexHandler);
}``` and I want to send other message to edit `packet` (`super.write(channelHandlerContext, packet, channelPromise);` thanks you!
cancel the packet then send your own?
no,thats the solution
you dont modify the packet
you outright cancel it then send yours
no basement in my house
myPacket...
super.write(channelHandlerContext, myPacket, channelPromise);```
then make one
when I use this, server kick me (NPE) ((PacketPlayOutChat) packet).components.toString()
i can't get message
It's BaseComponent[]
is it possible to add light to a location or somehow fix a block thats showing black?
that should be a optifine issue
assuming you use
armorstands inside a block
e.setFireTicks(100); online told me to add this, but it just sets it on fire, fixes the issue but after 100 ticks its black again
i mean...
yes armorstands, and im not using optifine
you set 100 ticks ofc its gonna stay only 100 ticks..
yes i understand that, but if i have the armor stand set to e.setInvulnerable(true); the fire doesn't show up. but i need it set to false otherwise the armorstands start glitching. I know it stays only for 100 ticks i was just explaining what had happened.
do you know how
toString works on arrays?
yes but also this kicks
yes, because what you are sending is invalid
hmm okay i'll try to modify it!
sadly we dont have a jumpevent on spigot yet
make your own
or use...
playermoveevent and listen for the y
ffs https://papermc.io/javadocs/paper/1.16/com/destroystokyo/paper/event/player/PlayerJumpEvent.html
declaration: package: com.destroystokyo.paper.event.player, class: PlayerJumpEvent
Solved thanks you!
Does anybody know what the color codes for on maps are? I'm using 6 and 7, but they are green (normally they are gold and light gray)
or you can use hex if ur on newer versions
also
seems you are passing something strange? ${
As mentioned, "6" should be gold, but in my case it's green
go with the classic + string
kotlin syntax
ah nvm
ur fkd then
its very unlikely to get someone working with kotlin to help here
If you really need it in Java: "§6;" + player.getName()
I'm not using the Paper API for this, just Spigot
meh, support for kotlin is really bad in this Discord
idk why tho
I'll check there anyways, thank you
but
wait
nvm, i thought you maybe need to colorize the string
but its not needed because other char
He using kotlin
we already discussed that
To make a namespaced key, I used
final NamespacedKey key = new NamespacedKey(NamespacedKey.MINECRAFT, 200);
super(key);
But then is sais that the constuctor is undefined. I am trying to make a costom command and this is for the constructor. Could I have an example on how I would to this?
Isn't there NamespacedKey.minecraft()
lmao Sorry I wight have just gone into a deep rabbit hole.
I tried to make a new object to add into the super of the constuctor
I was dumb
Anyways thanks
is there a good way to move player's armor from their armor slot back to their inventory?
Im tryna make a /strip command here
get players armor
add armor to players inventory if it has space
set worn armor all to null
bam
not really
k
just have to make sure they have enough room in their inventory
ok
If they don't, either don't remove the item or drop it
yeah
or make a fancy item box where you store that and the player can pick it up via a fancy command
yeah
stripper like?
OH wait, are you not trying to make a stripper for like lap dances and stuff
but to check for autoarmor
oh ok XD
yeah drop it like a fountain as a punishment
Hello! How can I cast itemstack to entity? and how to cast entity to nms entity?
inventory.firstEmpty == null?

that's the best way I can find
you cant cast itemstack to entity lol
cast itemstack to entity
what the fuck
== -1
you mean get the entity that would be dropped?
then just world.dropNatually
but to only specic player
there you go my friend
i'm not good at englishlol.
I too, am bad at English
i am bad at english too
well -1 right?
there is any way to drop item to specific player?
idk :/

we can't use PacketPlayOutEntitySpawn
how do I make a player drop item
you can try this to check for free slots, just do it with all 27 slots :p
if(p.getSlot(1) == null){
do stuff
}
try world#dropItem
no I want the player to throw it lol
get the item stack, remove it, drop it via world at the location as an item
ah fric
i like to use getRawSlot
if you want to have it like a player dropped it, set it a velocity
e.getPlayer().getWorld().dropItem(e.getPlayer().getLocation(), helmet);
ItemStack helmet = e.getPlayer().getHelmet
maybe?
e.getPlayer().getInventory().remove(helmet);
as i said, do a fountain!!!!!!! 
Hello!
How can I drop item to only specific player? I tried PacketPlayOutSpawnEntity . but the problem is we can't cast itemstack to entity. is there any other ways?
well
nah
:(
make your own damn fountain
itemstack does not represent a dropped item
i have a villager fountain