#help-development
1 messages · Page 1043 of 1
where does it stop at?
do a debug on each line and see where it stops executing
Well, without the intervention of the player and the transfer of data on what skin he uses from this site is not possible I understand. That is, it can not be automated and will have to use a random skin at the entrance
that will tell you what bit isnt working
The debug was first line and it was not triggering on put item.
can you send the entire event handler method
is there a way to get info about my plugin inside of my plugin?
i keep track of which version of my plugin the server is running in its config.yml, i want to check if its the same as the one on spigotmc
and if not send a message to update
that sort of thing should be hardcoded
not a config
whats stopping the user from going in and changing the number
lmao then theyre not gonna get the latest version
its not gonna break anything
it just notifies server when a new version comes out
declaration: package: org.bukkit.plugin, class: PluginDescriptionFile
can use this for the version in the plugin.yml
alr but how do i get the version thats on spigotmc
@EventHandler
public void onClick(InventoryClickEvent e) {
Player p = (Player) e.getWhoClicked();
if(e.getCurrentItem() == null) {
return;
}
if(e.getAction() == InventoryAction.HOTBAR_SWAP) {
ItemStack item = p.getInventory().getItem(e.getHotbarButton());
if(item != null && item.hasItemMeta() && item.getItemMeta().hasCustomModelData() && item.getItemMeta().getCustomModelData() == 76 && item.getType() == Material.GHAST_TEAR) {
e.setCancelled(true);
}
}
if(e.getCurrentItem().hasItemMeta() && e.getCurrentItem().getItemMeta().hasCustomModelData() && e.getCurrentItem().getItemMeta().getCustomModelData() == 76 && e.getCurrentItem().getType() == Material.GHAST_TEAR) {
e.setCancelled(true);
}
if (e.getInventory().getHolder() instanceof Upgrade) {
if (e.getClickedInventory().getHolder() instanceof Upgrade) {
if (e.getSlot() != 20) {
e.setCancelled(true);
} else {
if (!UpgradeTools.contains(e.getCurrentItem().getType())) {
e.setCancelled(true);
}
}
}
}
}
}```
most people just use spiget
can you show me it
oh
isn't it ratelimited
Use that or look at the code it uses
Idk I’ve never had a rate limit issue
How often are ya checking for updates
wheres the debugs
on startip
also some plugins have an autoupdate feature
how is that done
some github shit?
can do that with spiget aswell, not sure how the spigot api works for that one
but usually i recommend staying away from auto updaters
im not trynna do that rn its kinda shitty that its even possible
i was just curious
what stops people from downloading malware on servers with an "autoupdater"?
I just do a check at startup and then repeating task every hour
Nothing
should i send it to admins ingame or just console
what do you think is best
alr thanks
is there a way to check if its the "default" ender dragon spawn or if a player respawned the dragon manually using the CreatureSpawnEvent?
or is there an other event, which is better to do that?
Hi there. How can I compare two inventory instances when I also have item animations? I'm iterating through an ItemStack array every 2 ms and using Inventory#setItem, but it seems they don't match an initially stored instance.
iir?
If I recall correctly
do you just want to compare the contents?
I'm the same guy haha, it's a replacement for InventoryHolders
isn't .equals the same?
hmmh, let me try
do jdocs say whether a method is overriden?
believe so
alr, thx c:
@young knoll can you help me shade it
it says its missing the .jar artifact
where tf do i put it
The readme has all the code you need to shade it
what error
have there been any reports about InventoryItemMoveEvent not working correctly between hoppers and crafters?
to me it looks like when I cancel the event the moved item just disappears
if not I will report it now since Paper works fine
Jora
Shut
distributing spigot jars is illegal. you must build it yourself
distributing spigot jars is illegal. you must build it yourself
I build spigot jars in Columbia and distribute it to US
great
how do i smooth teleport? so basiclaly it blacks out your screen for a second then teleports you
like this
i suppose by not using a client that probably added that fade in as that fade is not a vanilla feature
if i just do Player#teleport it doesn't do the effect
i'm not sure what they did here to teleport like that
It's probably an issue with your resourcepack.
so this is someone elses video?
no this is mine
the only thing i can think of is that they're briefly given the darkness or blindness effect during the teleport
or some other plugin is doing that
the fade effect doesnt exist in vanilla as far as i know
It doesn't
ok
anyway i came here because ive been having this issue for a couple of days and i would really like a way to work with it
the issue being I get a NoClassDefFoundError on an nms mojang mappings class exclusively on 1.21, which I also run the server on that same jar. my project has several modules to account for version differences and there's no real difference between each module's pom.xml besides obviously the version numbers. this issue does not occur on papermc
is it because im running the server on a remapped jar? if i want to test a plugin using mojang mappings do i need to do so on a separate jar built without the --remapped argument, so i would need to build each twice?
^^ trying the solution right now but i reckon this kind of stuff should be documented clearly somewhere
I still need help with this
entity#getcustomname can return null? spigot 1.8
titles can do that
you make a big font image that's full black, then play a short title
it does fade in/fade out on it's own
oh right
yeah it can return null
for next time you can read the documentation on that method
you can google something like "spigot 1.8 Entity" and it'll pop up the documentation on that class which has that method
After two hours, a coffee, and using many Suppliers<>, I managed to get it to work. However, I cannot compare two non-chest inventories
Is it normal?
how do i get an entity from UUID?
im not able to save entities
im working with textdisplays btw
Server#getEntity()
i think Bukkit.getEntity(UUID) also works
which one should i use
either
it's a huge upscaled bitmap which is just a 1x1 black pixel, faded with a title
it's a pretty cool effect
You're not supposed to run the server with the remapped jar.
Just use the regular spigot one.
As long as you have the specialsource maven plugin configured correctly, it will work as intended.
Entity#remove
thank you
did anything change in how it's supposed to be configured
Not to my knowledge.
it's refusing to work even without a remapped jar
Just make sure you have the correct spigot version set in the pom
actually the result is the same strangely
?paste your pom
[16:34:59] [Server thread/INFO]: org.bukkit.craftbukkit.v1_17_R1.inventory.CraftInventoryCustom@5e5f3b06 AGAINST org.bukkit.craftbukkit.v1_17_R1.inventory.CraftInventory@40df74e CHECK N*3```
How can I compare a player's Dispenser-type inventory to a Dispenser inventory?
They seem to be generated from entirely different classes: `CraftInventory` and `CraftInventoryCustom`
pdc or something? be more specific
Inventories
?pdc
Isn't PDC for items?
Show code
inventories are PD holders
tile entities are
fuck
An inventory is not persistent, how would it have a persistent data container
Bukkit.createInventory(null, type, title); generates a CraftInventoryCustom instance. When I cache that and then use #getTopInventory() (which returns an instance from CraftInventory), they don't match.
[16:44:34] [Server thread/INFO]: Inventory has type: DISPENSER N*3
[16:44:34] [Server thread/INFO]: org.bukkit.craftbukkit.v1_17_R1.inventory.CraftInventoryCustom@4647d1f AGAINST org.bukkit.craftbukkit.v1_17_R1.inventory.CraftInventory@71ccf783 CHECK N*3
System.out.println("Inventory has type: " + inventory.getType() + " N*" + i);
System.out.println(customInventory.getInventory() + " AGAINST " + inventory + " CHECK N*" + i);
yeah well the top inventory isn't the inventory
it is, it works with chests
chests are different from dispensers
how can I get the open dispenser inventory?
why not compare against the inventory itself
That’s what they are trying to do
they are comparing the inventory and the top inventory
Either storing data in a file like you are currently doing or utilizing the PDC if you can.
And? Those are inventory instances
i cant do a pdc so ill stick to files thank you
player.getInventory() returns a PlayerInventory, which I'm pretty sure isn't what I want
never said player inventory
why call getInventory again
public HashMap<UUID, List<UUID>> playerFriends;
what is the best way to save this in a MySQL database
I'm using it as a library, so I don't declare it directly. In this case, the inventory is defined as:
Inventory topInventory = player.getOpenInventory().getTopInventory();
getInventory() is just a cached inventory that comes from Bukkit.createInventory(...)
wut?
yes, because its 2 different instances
Oh, GodChiper! Hi 🙂
You're the first person who helped me years ago
yeah
how can I compare a Dispenser to a TopInventory?
Google about one to many relationship. Or many to many, depends
isnt a "topinventory" also the dispenser?
yeah, but it returns me a CraftInventory instance
hmm this doesnt seem to run the annotation processor tho (https://www.spigotmc.org/wiki/spigot-plugin-yml-annotations/)
i always do the no-no shit by just implementing inventoryholder and comparing it by the holder
yeah i see. the topinventory is a CraftInventory while the whole inventory is a CraftInventoryView
It doesn't work using <1.16 versions with custom-type inventories
Then get the inventory from the view
The InventoryView contains both the top and the bottom inventories.
topInventory = player.getOpenInventory().getTopInventory();
I'm already doing it
?paste
Show the entire code
could getOpenInventory perhaps create a copy of the inventory?
im not that much into gui stuff
that's not helpful
It's * really * big but I'll try:
Checker called: https://paste.md-5.net/ezatelokav.cs # Note that the inventory closes 20 ms after being opened
Checker: https://paste.md-5.net/upolugugop.cs
@kind hatch
I am thinking to put the key in a column and the value in another column
I don't really know
have the player UUID be the PK and then just relations ig
can you show us the part where you create the inventory?
ayoo anyone knows how this works, it simply doesnt generate a plugin.yml and my plugin doesnt load?
unless i need to do some maven trick
I'm trying to send a https://wiki.vg/Protocol#Update_Section_Blocks but I'm unsure how to retrieve the "local" xyz coordinates
where
inventory = Bukkit.createInventory(null, type, ComponentsUtil.serialize(title));
Returns a
public class CraftInventoryCustom extends CraftInventory {
public CraftInventoryCustom(InventoryHolder owner, InventoryType type, String title) {
super(new MinecraftInventory(owner, type, title));
}
instance
Why are you comparing against that?
Inventory inv = Bukkit.createInventory();
Should be comparing against the interface.
so I would need a cast
You shouldn't need one.
If you are trying to compare types, there's InventoryType#DISPENSER
You can also do an instanceof check.
I'm not trying to compare types; I'm trying to avoid the misuse of InventoryHolder to define GUI ownership
Yea, and this is part of how you do that. :p
@blazing ocean plugins should work with kotlin out of the box no?
ohh... I see
yeah
yes 👉👈
CraftInventoryCustom/CraftInventory are internals, I cannot access them through the API lmao
You're not supposed to. 💀
That's what the api methods are for.
Otherwise you're basically implementing your own inventory system.
Which you would still need to fork craftbukkit for.
this is getting tricky haha
Here's the new question: How can I compare a cached CraftInventoryCustom (that extends CraftInventory) to an open inventory view that also extends CraftInventory? While CraftInventory and CraftInventoryCustom classes are inaccessible
yeah
forgive me for silly questions, havent been making plugins in basically two years
never again
make sure you're compiling kotlin
heres pom https://pastes.dev/LpAsLirNC3
forgor that once and took me an hour to debug
Why tf would you use maven with kotlin
you still have the objects to compare
cuz i dont want to use java?
if its the same inventory, it should be the same instance
@tardy delta any errors in console
can't believe i'm gonna ?notworking your ass
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
uhh no
I believe .equals is overridden inside the Inventory class
jdgui pullin a java.lang.InternalError: platform encoding not initialized on me smh
well its there, plugin.yml too 🤷♂️
comparing by the adress should do the job
==
unless /plugins/update doesnt work on paper
use recaf
whatever
I was doing that before, it doesn't work
I'm pretty sure you'd want to use == in the case of inventory instance comparison
update: plugins/update doesnt work on paper or smth, works fine now
@hybrid spoke, I love you
only issue i have is this now #help-development message
created a plugin.yml manually for the sake of testing
just doesnt generate one
no idea how it works what you are using, but my intellij always screams at me with "enable annotation processing"
maybe its that
it does not you gooflord
well i doubt just adding a repo and dependency will run an annotation processor
paper lunatics
why would the update folder not work on paper
After some more testing it seems all multi-line messages in spigot.yml are broken in Spigot 1.21 (Eg. outdated-server, restart, etc under the messages section).
No matter how you define them.
?paste
I mean, the update folder will only update existing plugins
I'm getting the following error only on spigot 1.21, paper 1.21 works fine and any lower version also works fine. Using mojang mappings for my project, no mappings for the server I'm testing on, and there's no differences besides versions to pom.xml between the 1.21 module and its lower counterparts. I don't understand why. Is there a possibility that buildtools is not working properly?
you need to remap if you want to run on spigot
here's the pom.xml if needed
remap? like using mojang mappings? I am doing that
i tried running the server both with and without mappings to no result
no like, the maven plugin you have should map from mojang (the mapping your source code compiles against) to spigot mappings
maybe you are not using the right jar?
the specialsource plugin right
using the right jar as dependency? I think so, I rebuilt and updated it several times
Yea the special source plugin
idk, I am not versed enough with the spigot setup sadly
does anyone know how to make i to where people can place blocks if they are tagged in combat logX
i just had a stroke reading that
lol myf
does PlayerQuitEvent fire even if the client crashes?
Depends. How did you run BuildTools?
it should
same as how i assume everyone else does it, "open git bash here" in the explorer window containing buildtools which i put in my .m2 folder and executing java -jar BuildTools.jar --rev 1.21 --remapped
removing the --remapped for the jar i use for the server
You ran BT in your .m2 folder?
I mean, they have the right setup no? Given they have access to the mojang mapped soruce code to compile against
yeah i dont see why not, kinda messy yeah but it shouldnt break anything
the special source remapping just fails
it did the job for the other 8 versions i support but 1.21 specifically breaks
huh
hmm no matter what causes the crash?
It looks right to me
maybe some java version fuckery?
1.20.6 also uses java 21 right
that one was also fine
i hate to go pointing fingers but could it not be buildtools somehow
it doesnt make sense to me why papermc would work when spigot doesnt
You can always check the log file for BT
paper does not use spigots mappings at runtime
Did you guys switch over to mojmaps?
yea
Fancy
and removed craftbukkit package relocation
Must be nice.
it is 
yeah, just watch out for kicks
thatd be the kick event
i mean i guess its the server jar im using then right?
Could be
alr thank you
when you guys build a spigot jar for server stuff do you use --remapped or no
the remapped thing just puts the remapped server into your local repo
didnt know if for example the jdk corrupts or something (a bit extreme), it wouldn't fire
the jar stays with spigot mappings
^
man
As long as you are using the spigot jar that it spits out and not the one labeled with -remapped, then you should be using the correct spigot jar.
yeah so that cant be it then
could buildtools be messing up at all
imma go look at that log file rq
how can i make my own custom model data item's name translatable with a custom key in the languages of my server's texture pack
afaik you cant do that
What java version is being used to compile that module?
Cause I'm currently using Java 17 to compile stuff for 1.21
also 17
gonna throw stuff at the wall and see if java 21 sticks
oh, i do see a warning saying "the requested profile "remapped" could not be activated because it does not exist
so thats probably it right lol
Probably
nevermind
if i have a 1.19 server and do some shit with text displays and a player joins on 1.12 for example, will he be able to see the textdisplays? (using viaversion and viabackwards)
lmao what
he accidentally pinged the wrong guy he must be a criminal
mods cut his balls off
.
The answer is likely no.
Aye stop being disrespectful
calm your tits big guy
alr ill test it out later to make sure haha
@quaint mantle calm down bucko
is that levan on your banner?
I don't care if you're pissed about a random ping, don't insult people
he pinged me mods cut his balls off
@kindred valley idk if you typo'd a name or what, but y'know
If you dont want to be criticized then dont post random stuff
if you looked up their messages and found that out, stop that
because that's fucking creepy
How you know him
same country
Levan or devon
levan
Well I already had limpeex blocked for quite some time now (must have been over half a year ago).
So yeah, there must have been some history of them being not great to deal with already
can anyone help with this error im having
think that's the wrong image buddy
sorry I didn't have time
here:
public void onClick(InventoryClickEvent e) {
Player p = (Player) e.getWhoClicked();
if(e.getCurrentItem() == null) {
return;
}
if(e.getAction() == InventoryAction.HOTBAR_SWAP) {
ItemStack item = p.getInventory().getItem(e.getHotbarButton());
if(item != null && item.hasItemMeta() && item.getItemMeta().hasCustomModelData() && item.getItemMeta().getCustomModelData() == 76 && item.getType() == Material.GHAST_TEAR) {
e.setCancelled(true);
}
}
if(e.getCurrentItem().hasItemMeta() && e.getCurrentItem().getItemMeta().hasCustomModelData() && e.getCurrentItem().getItemMeta().getCustomModelData() == 76 && e.getCurrentItem().getType() == Material.GHAST_TEAR) {
e.setCancelled(true);
}
System.out.println("debug");
if (e.getInventory().getHolder() instanceof Upgrade) {
if (e.getClickedInventory().getHolder() instanceof Upgrade) {
if (e.getSlot() != 20) {
e.setCancelled(true);
} else {
if (!UpgradeTools.contains(e.getCurrentItem().getType())) {
e.setCancelled(true);
}
}
}
}
}
}```
Dude has some dedication to still be annoying someone about "static" after 2 years.
look helpers they still try to provoke me
this is a help channel and i gave advices
thats it dont cry zacken dont use statics
lol whats wrong with it
you are cringe
using static is fine
I didnt reply to you for this one ok?
pinging random people when they havent spoke here for a month is a bit weird
my man there's no static there
yeah no just let them be
stop telling them what to do
while static abuse is bad
i use static for all my code
it doesn't mean you should harass them about it
Just block them :p
guys what do you think about static?
(kotlin)
Idk man, some people deserve a block
big fan of companion objects + lateinit var plugin: JavaPlugin private set
Fr
opinion on variable get() methods
Y’all got decade old beef?
huge W
ye obsessed with your ignorance
public static {
static static() {
static.static.static("static");
}
}```
not valid code
ok we get it
you are incapable of being friendly and writing code
you definitely weren't
okay
both of you just stop and move on I don't care about your past issues
@kindred valley stop randomly pinging this guy to say things about static
it was?
it was
???
lolll
please explain how it wasnt random, he has not spoken in a month
how is pinging people at random times for saying "stop abusing static" not random pinging
Mk, moving on
be gone
hi choco
Take a breather. Go outside. Touch some grass. All good
how are the huskies
cant believe you wont tell us how the huskies are
Good. Huskin'
are they singing
@eternal night @kind hatch so i figured out what was wrong and as it turns out, somehow, in the pom.xml you can see how the whole specialsource plugin was wrapped in another pluginManagement block. how that got there I have no idea, but I didn't catch on to it at first because I compared it to a previous version which happened to have the same mistake that I never caught because I test 1.20.6 on paper and not spigot.
sorry for the trouble, lol
nice
Lol
did you read y2ks pr he wanted you to review
no 
monster
today is my one day of paper work
you arent streaming
if I have time later, I'll read it
go look at his pr
oh I am about to head to the germany game
read the pr smh
actually @river oracle can you throw me the PR link in DMs
oh nice
i think its that one anyway
enjoy holiday then!
thats his only open pr
so you can review it while hes gone for a surprise when he returns
big fan of dependency injection
Java > Kotlin
don't listen to the kotlineers
traitor
oh wait, integrating papi inside custom guis' text means no item caching, doesn't it?
How i can share the playerUUID in another class?
that's true static abuse
used some non-ascii characters there
but public static static static sure does look fancy
howdy, so im trying to run a task in the long term and stuff, why isn't this running after 5 seconds
https://paste.md-5.net/pitaxahoxe.coffeescript
I am geniunely confused
static class static {
class static1 {
static static1 static() {
return (new static()).new static1();
}
}
}```
christ
fortunately you can't use static like that
5sec are like 100 ticks but you did 500
👍
oh shit its measured in ticks?
yup
Isn't there still an easy way to create custom brewing recipes?
text displays can be seen from any version as long as the servers main version supports then
them
i just tested it out
bad class file: /C:/Users/***/.m2/repository/com/mojang/authlib/3.4.40/authlib-3.4.40.jar!/com/mojang/authlib/GameProfile.class
class file has wrong version 60.0, should be 52.0
💀
how do i make a new line in textdisplays? \n just does a weird character
is it \\n or smth?
?tryandsee
what’s generally most appreciated for server owners?
managing everything through GUIs or commands
GUIs being more clean, more straightforward, commands being easier to handle?
ahh had to do this, kapt is in maintenance mode tho and ksp is recommended but cant figure it out
Is there a way to do custom mining speed without mining fatigue I think I saw someone but I don't remember if I did or where it was
The only reason mining fatigue is even useful is cuz of the block damage animation and the only reason I don't want it is because it just looks weird to have the constant effect, fist goes down slower, and I could be wrong but I think in the newer versions it makes you attack slower?
ProtocolLib? I'm not sure
There is in 1.20.5+
rip I am looking for a 1.19+ way
use components
i wouldnt ask if i hadnt tried asshole
both being an option
wdym?
oh there's no TextDisplay.Spigot yeah you're cooked
yeah it does affect your attack speed but you could make the mining speed slower when theyre mining your block or something idk
items have mining speed atteibute
pickaxes and stuff
its an entity
ive done it before but i cant remember how i did it im so stupid
which is such a spigot skill issue ngl
spigot is a skill issue in itself
why is minecraft so against modding and the community changing things around?
like why doesnt nms have an api itself
it is
nms literally is an api what are you talking about
everything is obsfucated and shit
use mojmaps
yeah its so useful and the names of every object is very understandable thank you
Compare different mappings with this website: https://mappings.cephx.dev
?nms
sometimes they aren't but you're using spigot mappings
which just outright suck
i guess
maybe its being more supportive of modding by each update
like in 1.8 it was basically impossible
?1.8
Too old! (Click the link to get the exact time)
It was worse but very mich possible
Much*
The community supplied mappings for the most commonly used parts
every doc i see or code snippet on textdisplays uses \n for new line but for me it creates a weird character
that's because it doesn't work like that
actually i was on 1.12.2 when i saw that to test if it worked on there maybe thats why?
components ftw
what
how tf did you get text displays on 1.12.2
bruh
join with 1.12
💀
cause most people do it like that
lmao i was just testing the compatibility
yes they do
So it's a backwards translation error
most servers are 1.20 or 1.21 and allow older versions to join
that's a you issue then
people shouldn't join a 1.19 server with 1.12 
basically every server does this
no?
they can join it with 1.16
okay?
and there wouldnt be an issue depending on the derver
you arent familiar with the server scene then
if thats what you think
lol
im gonna test it out on 1.19 later
you've never seen a modern server then
literally 99% or more servers support more than 1 mc version
stop arguing about that
its a fact
minigame servers or lobbies support backwards and forwards
depending on what the servers theme is
more than 1 mc version
there's a lot of servers which still run on 1.8 which i assume you're talking about
99% modern servers nowadays run on 1.19.4+ and only allow upwards
im not fucking talking about 1.8 servers
just shut the fuck up and stick to making plugins
1.20 servers support 1.16 too
a lot of them
and for sure the servers im making my plugin for
would appreciate if you would stop being rude to people trying to help you
i'm also working on a server so erm yeah i do kinda know a thing or two
youre not trying to help me youre just arguing w me
you are trying out a modern feature with an ancient version 
and youre also replying to my messages with clown emojis ??
😇
just shut the fuck up bro
its a modern feature
im talking abt servers supporting multiple versions
those use armour stands
bro
youre actually braindead
they use armour stands for cross-version compatibility
Agreed.
tf did i do to you
idgaf 😭😭
you were saying cross version compatibility was not a modern feature
earlier
gl trying to implement a 1.19.4 feature for 1.12
that's not what i said
is it okay if i tell you to get your gay ass outta here? not in a homophobic way
youre pissing me off
no
lil dumb
wouldnt really ask if people wouldnt get their titties hurt here if i mention the word gay
my issue there was not the word gay
👏
can y'all not be rude to each other
so i can use it then?
my issue was that you're being a complete dickhead to me lol
yeah, idk why they're just being rude to me, same thing happened yesterday lol
i'm trying so hard to be nice rn
dw handled ^^
I cant type /plugin anymore.
All I get is "incomplete command" error..
0 errors in console
/plugins
not working.
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
Rad stfu
Ur the most annoying person in this discord server ngl
I just described it
I didn't know today was being rude day

Cant send a ss in here, or u mean from console
Yea you suck!
damn :(
Time to take a break a ig
The world is against you
I do , it says Spigot 1.20.4
😔
Also the server ran perfect, and after our normal restart we figured out nothing is protected, /plugins isnt working and so on.
are you sure you have the permission / op
yeah.
Are you running the command in the console or as a player
both
what plugins are you running (check your plugins folder)
something something logs
I have more then 1 server
but actually nothing special
send a list
Or just recreate the issue without plugins
And then binary search them
(As in the algorithm, and if it's fixed when removing the plugins)
This guide will help you diagnose your server's problem before reporting it to PaperMC or the plugin's author.
(this is a paper link as they have docs for it)
(definitely not trying to promote paper)
Neat
bro asked for help then told the guy helping him to shut up
wild
helping him?
great help Logy
okay in the console is /pl and /plugins working but not ingame.
are you 100% sure you have the correct permissions
??????????whereami
???????????????????????????forkkkkkkkkkkkkkkkkkk
Yeah one of the plugin hiders would be the cause of that
I got OP
???????????????????????????whoareyou
can they just hide that for players only 🤔
Yes
oh damn
player command pre process event
^^ block that
ah
Hey Guys ! I just figured out that the bukkit event PortalCreateEvent isn't trigger for end_portals . any of you got a solution ?
okay seems like a bungee problem, cant say it on single server and on the hub
hi , iam using pubsub to send a message in redis but , for some reason this :
the kit_serilizeditem is not being sent
what iam missing?
it send only the first 5 or 8 letter from it and it stop sending it
My changes make damage system broken again wtf
I made my armor unbreakable
because i have to hit myself hundreds of times
smh
and then i havent noticed the durability changes
Thanks Doc
this issue was resolved immediately

Breaking things is my job :c
Broke branches so hard at work that I'm no longer allowed to git merge :(
git gud
tbf
getMaximumAge() not working anymore ?
it just looks like a cpu
wrong Ageable imported
you want org.bukkit.block.data.Ageable
whats a houe
Hoe in french
french hoe
uhm, when clicking a compass in the air and listening to the interact event it doesnt say anything, is there a way to fix this? How do the big plugins make this happen?
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
can you change a entitytype of an existing entity? (with packets or api) Or is this immutable?
So confused, I'm trying to make 2 recipes in my plugin, but one of them doesnt work and one of them does. not really sure why
The pickaxe works for reference
Like the axe appears in the recipe book but when i click it, the items go into the grid but there is no result
nvm
i think this may be out of my control
dont' have complete columns or rows of spaces
you have a full column of spaces, just remove it
shape("NN ", "NB ", " B ") -> shape("NN","NB"," B")
will that make a difference
it will make it work, and it will make it a better recipe because it can be constructed in either of the 2 arrangements
the shape should always be the minimal. If your recipe requires a 2x3 grid, the shape should be that
i see
I hate that instead of trying the solution of the first comment he said it was out of his control 😭
i cant make this on secondary thread?
you cannot interact with world state off the main thread
So what's above can't be done if it's asynchronous?
^ must be queued on main thread with scheduler or attained before jumping onto the second thread
you are querying some world state. You are getting the state of a block, that is interacting with the world
you can't read from the world, write to the world, interact with inventories, spawn entities, interact with entities, and lots more off the main thread
You can copy sections of the world with ChunkSnapshot and then interact with that snapshot off the main thread. Useful for doing lookups in larger areas. That works because it's essentially copying chunks.
Could you tell me more about this? What would chunksnapshot be?
A copy of a chunk
if you are just looking at one block that you already know the location of, just do it on the main thread
He tries to involve the topic like its about him then complaining about people being rude at him
what are you on about
ChunkSnapshot is useful if like, I want to find all iron ore in a section of the world. I don't know where it is, so I make copies of chunks, and then search through it off the main thread. Then I have a list of locations, and can check those exactly back on the main thread without having to check every single block in the area on the main thread
but it looks like you already know the location, so just do the check on the main thread
Literally no one speaks anything to you why you still try to provoke
they are always talking some weird shit, just ignore them
a lot of people speak something to me
you're just that cool and popular
probably because you use kotlin
why do i need to sleep
its 10pm and im listening to greenday live
Anyone know how to clear Block damage at a block?
player.sendBlockDamage(block.getLocation(), 0);
Nothing I do seems to work as 0 is the first stage
player.sendBlockDamage(block.getLocation(), 0);
1 is the last stage
and it has to be a float between 0 and 1
Can't find anything in the docs to clear
The only way it clears is if I start breaking another block
Can't wait for the surprise in 5 days
you broke collectors smh
I know it'll be okay tho
i fixed it already
You're our QA department
we outsource that to @young knoll
Hmmm fact
I didn't test it at all before pushing to prod
thats what im meant to do
What damage you mean
The block break animation
Isnt it already being cleared when you stop breaking it
No Im showing it to the player
the block isn't actually breaking
HI, How do i check if an inventory click event was a villagers inventory, because there isnt a 'villager' inventory type
MerchantInventory
Q: if I have a ArrayList and I add duplicate String STONE, STONE.. how can I remove just one of them? Doesn’t matter which one, not all stone values?
A for loop
Oh tyy
Np
The loop would realize there’s 5 STONE in the array and can just remove 1?
Leaving 4 behind
Or you could just stop the loop after the first one
Why would it need to go through every element if you've already found the first entry you're looking for
It’s keeping count of shops that contain that item, don’t want one shop to remove all of them. I usually use array.remove(item) but I’m guessing that would remove all 5 stone values instead of just picking one to remove
No it only removes the first entry
thanks ill use it
how would it know that that's the correct data for it?
should i do if path.contains(AnvilRain) ?
Make a switch with key as argument
is that the only way?
Map
You can use reflection to get the class for name if you store it in the configuration and call the constructor
A bit gross but yeah you can do that
This says nothing
Whens the next 1.21 build?
a map instead of a switch is what he's saying
Monday 13:43 EST
In this case he needs to create a map with an association key to class, but it's an extra step
And he also needs to use reflection then
You can have a map String -> some kind of factory method
An extra extra step
thanks for suggestions , i will try to finish it torrmow its 3am for me 🥲
You could just have a static factory method for each cosmetic that takes in a ConfigurationSection and grabs the data it needs
Although in this case it looks like they all use the same data so you can simplify that even further
At this point why don't just implement the ConfigurationSerializable on all classes?
But it's useless if all classes have the same constructor
The smallest way in terms of code lines is using Class.byName and call the constructor via reflection
WinEffects , WinDance , KillEffects , KillMessage ...
Well yeah but you can avoid the reflection by having a Map that just maps a string to a custom functional interface
Which takes in price, rarity, and mode and returns a Cosmetic
That's the same as making a switch (but the switch is smaller)
yeb that what i did
.this
do i need to edit it and have ConfigurationSection in each cosmetic?
The switch doesn't need a map and interfaces
and just set data from there?
And you can find all the stuff in one place
switch (x)
case ->
case ->
case ->
Vs
Map.of(name, A::new, name, B::new, name, C::new)
which java ver i can do the second thing?
Pretty sure map.of is fairly old
Yeah it’s java 9
And functional interfaces are java 8
thx gonna work on it tomrrrow 😮💨
But of which type actually are the interfaces?
Hmm?
If he needs to call a method in the interface that takes 2 strings and 1 int of which type the functional interface would be?
Custom one
Isn't faster to do it with the switch?
public interface CosmeticFactory {
public Cosmetic apply(String type, String rarity, int price);
}```
Faster? Yeah probably marginally so but how often are you parsing configs
One benefit of using a map is you can allow other plugins to register custom cosmetic types
I know how to make a functional interface, I was only interested to know if there was an existing one that makes it
And you don’t end up with a giant switch as you add more types
I don’t think java has a TriFunction
Kek
Smh java get on that
only when the server start i load them from config
We wait for this in Java 23 XD
Don't you have a reload command?
And consumers of course
🙂↔️🙂↔️no
Var args functions
Man ya gotta have that reload command
If every plugin did that we could just yeet /reload
just restart for proper data handling ..
Image using a plugin manager plugin to disable and reenable the plugin only for reload its configs
You don’t seem to understand how lazy the average server owner is
And how much they can’t afford 30 seconds of downtime!!!!11
It's faster to use spigot reload command and disable and enable all the plugins
Yes but that’s likely to break everything
Plugins that break only for being disabled suck
¯_(ツ)_/¯
The devs should have designed around that
But disabling stuff at runtime is quite hacky so sometimes it’s difficult
Where is the difference for a plugin to being disabled at runtime or on the server's shutdown?
Pretty sure the classloader just gets closed and a remade
Can cause all kinds of strange things with static variables and whatnot
And if the plugin is messing with stuff in NMS who knows what might explode
Everyone likes exploding things
so long as "things" doesn't include sewers
I never heard about sewers
Do you live in Madagascar or something?
I actually learned what them are
My english sucks
Like plugins that blow up when re-enabling them
Yes, but my existence is ghostly because i was discarded by the latest mob vote
it's pretty good
Really?
All wanted the dog armor
Dog armour is pretty good
What do you mean?
But still, F to the penguins and the crabs
Is overpower
The dog is actually immortal
But Mojang decides to nerf the mace
i have no idea
Lol
You only need to compensate with numbers
Breed one thousand dogs and go
And one cat to pss pss creepers and phantoms far away
Good luck fighting anywhere close quarters with 1000 dogs :p
Ehehe
can someone help me with luckperms quickly?
how do i give all players that join default rank on luckperms
resolved
What would be the best way to get the amount of deaths that has happend in a day then reset when its a new day ?
Have two variables:
One counter
One date
Each time there is a death, before hands check the date variable and compare if the current date is a new day, if so set the counter to zero. Then in anycase add one to the counter
Of course this is fairly simple and not resistant to restarts, and also one server only. You can overcome these issues using a database, or other systems to fit your setup
probably should have asked which day they refer to
real world day or in game
Does anyone know the new enum name of SNOW_SHOVEL?
And for how the explosion particle enums work, now there is only EXPLOSION, but before there was EXPLOSION_NORMAL, LARGE, and HUGE
Poof
Actual real one, this is exactly what I needed
Is there a way to make this stick somehow?
private void sendBlockDamage(Player player, Location blockLocation, int stage) {
PacketContainer packet = protocolManager.createPacket(PacketType.Play.Server.BLOCK_BREAK_ANIMATION);
packet.getIntegers().write(0, player.getEntityId());
packet.getBlockPositionModifier().write(0, new BlockPosition(blockLocation.getBlockX(), blockLocation.getBlockY(), blockLocation.getBlockZ()));
packet.getIntegers().write(1, stage);
protocolManager.sendServerPacket(player, packet);
}```
(If it repeat it every tick it looks extremely weird like it's just going away for a milisecond and coming back or something and it looks buggy asf)
Why not use the spigot API for this ?
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Player.html#sendBlockDamage(org.bukkit.Location,float)
(Might want to use one of the other methods, idk)
Cuz u can't remove it 💀
Also I just remove it with that peice of code its the same thing with the spigot api
It's buggy asf
It only sticks when u don't want it too 💀
Maybe im slow
Wouldn't progress of 0 remove it ?
No
Might be something with using the same entity for multiple breaking animations.
progress 0 is the first one
and u cant go below 0
or above 1
and it just multiplies the float but 9
Then docs are incorrect ig
ig cuz I tried 0 and it didn't work it just set it to the first stage
0 is no damage
Hi, i need help. So, how to sendMessage "Hello world" that contains link (Example: youtube.com). Like a vanilla command -> ||/tellraw @a [{"text":"Hello World","clickEvent":{"action":"open_url","value":"youtube.com"}}]||
This is very helpful https://www.spigotmc.org/wiki/the-chat-component-api/
umh wait
message.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://www.youtube.com"));```
like this?
If the code above is correct, how do I put it into sendMessage()?
Yes you did it!
sendMessage(message)?
In your case yes.
hey, any idea how to check if args[1] is null or empty? Its not working like this
basically if its empy like player only type /vz create and not /vz create <name> i want to send the sender message something like &cMissing argument <name>.
if args lenth is 2 then create and <name> are present
if args length is 1 only create is present
oh okey, i will add it here
i thought that there is different way
I mean i added it into args.length == 0
i am begginer, so sorry for mistakes
try it lol
oh yeah, it said "cannot resolve method 'sendMessage(TextComponent)' "
spigot().sendMessage
still doesn't show any text.
should I use this?
you should be able to use exerc.spigot().sendMessage(message)
can i do this maybe?
in theory can it work?