#help-development
1 messages ยท Page 1039 of 1
special source 2?
Its in BuildData
Idk the exact difference but iirc it's not open sourced for some reason
Go to BuildData/bin
I see
Hi I've been thinking is it possible to have a centralized github repo that i pull the files from to each server so in lobby , it will pull the file , in game it will pull the kits.yml to game servers plugins game folder and so on
but the github repo will be diffrent for each user
is it better than using redis?
i will be getting the kits.yml when the server start
do you suggest i keep work on redis then?
Please use a proper communication protocol that support data transition instead of abusing the shit out of git
i have a similar system. i use RabbitMQ to send stuff like kit configurations to my game servers when they startup
Redis seems like a fine option too
entire file??
i can do that?
i thought i was able to send only objects like string , doubles .. etc
nice
Is it possible to control which "slot" your bossbar ends up in, or do I just have to hope?
does inventory.getContents get the contents in order? as in slot 0 -> 1 -> 2, etc
why are some classes excluded from deobfuscation? are they not needed or smth
what slot
no
not 4
it depends on screen size
eg smaller gui scale = more bars
you can check the amount of bars they have but that's all
if you use noxesium you can use their packets to retrieve gui scale/window scale
I thought it was always 4
why am i getting this error? i checked everything no errors in intelj?
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "st.stasio.staticpowers.StaticPowers.getCommand(String)" is null
at st.stasio.staticpowers.StaticPowers.onEnable(StaticPowers.java:23) ~[staticPowers-1.0.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.1.jar:git-Paper-196]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.1.jar:git-Paper-196]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:642) ~[paper-1.20.1.jar:git-Paper-196]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:553) ~[paper-1.20.1.jar:git-Paper-196]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.reload(CraftServer.java:1097) ~[paper-1.20.1.jar:git-Paper-196]
at org.bukkit.Bukkit.reload(Bukkit.java:993) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:54) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchCommand(CraftServer.java:987) ~[paper-1.20.1.jar:git-Paper-196]
Huh, I'll have to check that
https://github.com/noxcrew/noxesium might help you @young knoll
ew who changed github embed
s
turn down your window size
I see
??
have you added the command to your plugin.yml
ofc
coffee script
at what command is it erroring
that generally looks fine
Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "st.stasio.staticpowers.StaticPowers.getCommand(String)" is null
Command not in plugin.yml
just cheked and everything is in plugin.yml
this is the whole error
https://paste.md-5.net/babubuyeze.bash
yeah but that isn't useful to us as we don't have your full class
just
at what command is the error
like line number in correspondance to the line in the class
do i smell a paper-plugin.yml being (mis)used
it is
since i needed to edit someone a plugin and they sent me the package
and paper plugins use the command map
just use a regular plugin.yml
^
alr ill use that ty lmao
I have a Q is there any way to redirect a player from the lobby after login to the last left world
Can anyone help
๐๐
save the last left world
Like how ,will the player be Directly teleported to the same location where he left after he login in the lobby which is in the multiverse
I am using multiverse
It's easy to do with bungee
But I have no clue
How to do this in the multiverse
Let's say a user moved from Server A -> Server B
Can I safely say that when user leaves Server A and PlayerQuitEvent is called the user is already online and can be retrieved at Server B?
Yea
You sure?
Will I be able to retrieve the user by just using Bukkit#getOnlinePlayers() or do I have to look into pre login event and such?
See like I have two worlds present one is my lobby and the other is like the normal worlds of he left the server in any other server then when he join he will first join in lobby and then he will be redirected to his last left world where he disconnected
Like u are the player who joined my server after playing for sometime u left and when u join back first I will join my lobby world then u will login using the command and after login u will be instantly teleported to your last location in another world ( survival, nether or end)
How can I do this
Is there any way
Yea in bungee it's easy but currently I can't buy bungee
So I am finding a middle way
Okay so there is no possible way to do that
I mean to do that in multiverse
Instead of bungee
for combatlogx, does nayone know how to disable commands in combat?
If we use login plugin like n login or any other
Though this is a question for #help-server or the SirBlobman discord
To be specific I am facing a problem like if anyone tries to login from someone else's account he can still see his cords without entering the password
So he doesn't need to know the password to see the cords
I have a lot of cracked players
That sucks ig
Hello in which mc version PDC was added to Spigot? Because I can't recall. Specifically for Entities
In 1.14?
Yes
Thank you
what unicode is this
it looks similar but it looks abit off idk why
ima just use it, thanks
it's the same
Are there no API changes in 1.21 or do I need to update this dependency?
I just found out that
Bukkit.getServer().getClass().getPackage().getName()
doesn't contain the nms version anymore in 1.21 o-o.
Does anyone know how I get the nms version of the server now?
Previously I got it like that:
Bukkit.getServer().getClass().getPackage().getName().replace(".", ",").split(",")[3].substring(1);
thats because paper dont relocate
Did the enchantments and particles already change their names in 1.20.6?
do you know how I can get the nms version then?
I don't know
There are api changes though Spigot does try to be backwards compatible
So no need to update?
Where can I find the latest version? Every google search result just points me to an ancient version or the one I'm using right now.
and I'm not gonna guess it
1.21-R0.1-SNAPSHOT
a) ask paper b) #1077385604012179486 message
oh it is that simple
And dont forget to update ur api version in the plugin.yml
Just replace 1.20 with 1.21
Do it properly like ypu should've been Bukkit.getVersipn
Did they change how recipes are made or something?
It doesn't work anymore when I update to 1.21, but I also don't get any errors.
Or am I having a paper issue?
well, does it work on spigot?
bc you need to build the entire thing yourself
oh right I forgot
Anyone got this issue?
reset my chrome cache too
Can't do anything at all
Just keeps verifying over and over again
yeah, I get that a lot, its annoying
same
turn ur vpn off if you have one
kek
I don't get that... but I do get the re-verifying over and over
It just started happening randomly
i refreshed the page and suddenly it's just raw html
i paused all adblockers and antivirus for it too
nope
works on other devices in my house
just not chrome
other browsers work too
show the code you are using to create the recipe
probably a faster way to know if you are doing smth wrong
intellij keeps crashing hold on
oh there we go
I can't show every class in my project, but BlockItemPair is just a container (or wrapper, idk what you call it) for custom item data and block data.
private void democracyBlockRecipe() {
BlockItemPair itemData = itemPairMap.get("democracy_station");
ItemStack item = new ItemStack(itemData.itemMaterial);
item.setItemMeta(itemData.itemMeta);
ShapedRecipe recipe = new ShapedRecipe(new NamespacedKey(this, "democracy_table_recipe"), item);
recipe.shape(
" ",
"SBS",
"SSS"
);
recipe.setIngredient('S', Material.SPRUCE_PLANKS);
recipe.setIngredient('B', Material.BOOK);
Bukkit.addRecipe(recipe);
}
tell me if you need more tho
oh I think that was an issue just fixed on spigot that hasn't been upstreamed to paper yet. You can fix it in the mean time I think by removing that first line of the shape
so it can be crafted in either the top 2 or bottom 2 lines
I think that's what this is.
it had to do with vanilla changing how spaces were handled in recipes I think
ideally your recipe shapes shouldn't ever have whole rows or columns that are spaces
I think I just wasn't sure if it was going to be shapeless or shaped when I made the recipe.
And it worked, so I just left it in there
man I'm listening to 2 different minecraft soundtracks at the same time and I'm going crazy because of it
@carmine mica if you get time I published the second step in my additions to InventoryView I'd appreciate a review before I leave tomorrow
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/1036/overview.
ideally I want this entire thing to be something both paper and spigot can agree on
try Ctrl+Shift+R
mac
it'll reload the site and reset some cached stuff
well idk the alternative
yup, that was indeed the issue
command+something+R
Ah just what we don't need
It's not a reload issue
i've refreshed it and even reinstalled chrome
I've cleared my cache and all other data too
nothing
restarted router
well i'll be damned
no adblocks and no vpn
dynamic IP is the only thing that sounds like it could affect it?
i don't have a static
and now I can't even test anything because some dependency doesn't feel like working
amazing
You also use that?
oh
until I didnt and just switched to packetevents
it is 1.9.5 :/
Is there a better way to get string inputs from a player?
depending on the flow of your plugin might be pretty annoying
the config file
how do you get input from a book
you don't
ah yes, I'll just give server access to every player in my server
I'm sure they won't cheat
.
lmao
or just... have a chat prompt
I mean that is fancy
you werent lying
chat is limited to 256 chars :^)
and let them edit it
who is writing an essay for one line
you never know ........
Everyone uses chat prompts, no one uses books
and everyone uses anvils
and signs
just use chat
oh and signs yeah
Idek what a conversation is man
I just speak words and hope they fit with the context
if all you need is a chat string from thw player just write it yourself..
I'm confused
when a player types a message in chat, you know that input box right?
yeah?
just put the text you want them to edit inside that box
or do you just mean you want them to write something
then just use the chat? i dont get it
Person clicks button -> person has to enter a string (currently via an anvil) -> server handles received string
Chat prompt works perfect fine here
won't they be able to close and ignore it forever (only downside not being able to talk)?
AsyncChatEvent for this one then just event.getMessage for their input
in my plugin I have an inventory with a bunch of items and the player can filter them based on a string, so I have a button that pops up an anvil, which doesnt disrupt them from the menus
Pretty easy to work around that
but even so, what gives
If they never put an input you could keep prompting them, cancel that whole interaction, etc etc there are couple ways to deal with that gracefully
just have an option to say close
or 'exit'
in any case though, AnvilGUI is def updated for 1.21 so something must not be building right
oh wait it is
I also have a small lib that's updated to 1.21 that allows you to open working containers and just use spigot events
yes 2 days ago
must have something to do with my horrible code then
+1
10th experimental build rn
yeah is that latest?
not anymore
its so difficult to find actual server hiring for development now
I've got so much free time and a decent skillset for minecraft stuff
but the last 3 servers i've applied for
its like i'm talking to an 11 year old that's self conscious about using pre-made plugins
there are server owners who are not like that?
REAL
guess what
it's a fucking paper issue
qeidjfsqkjfslqdhf
And everyone becomes staff just by asking
I left after realising that "hiring" mean i wouldn't be paid, and that there were 7 other 'devs' on the staff team; their job was to configure plugins the owner downloaded
And he announced "looking for managers and co-owners" ??
I mean minecraft appeals to kids what makes you think their aren't a ton of kids trying to start minecraft servers
lmao this is also true
the staff team is basically the owner's friends who are completely incompetent in regards of anything administrative
and their average age is not enough to be on discord
I gave them the best advice theyll probably ever get, server has been in maintenance for like 3 days now lol
I don't know if they followed up on it though
Hey guys, Is there anyway to deserialize itemstack fromItemstack::toSTaring? '
yeah if you make your own deserializer
Personally I'd just use ItemFactory but all you
?jd-s
ItemFactory ?
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/ItemStack.html#deserialize(java.util.Map)
why did you grave that
deserialize(Map<String,Object> args) this one?
yes
ItemStack{APPLE x 4, UNSPECIFIC_META:{meta-type=UNSPECIFIC, display-name={"italic":false,"color":"red","text":"test"}, custom-model-data=10005, internal=H4sIAAAAAAAA/xXHQQ7AIAgEwE0PjaWvJLAHD1Qi+n/TuY0AAumLUerO2XB1x53M/PN8GqxUI17btUbYHFnAATgjnbg4AAAA}}
When I saved my itemstack with itemstack.toString the data looks like this
or you could use ItemStack#serialize ๐ญ
oh
im scared
Actually I've tried to save in Mongodb
btw
Is there a better way to put custom kit data into the database?
Wouldn't it be nice if I converted the entire Inventory into a string and stored it in the database?
byte array
congrats you reinvented a string
Lmao
could someone help me figure out how to set a skull item meta to a head from a website?\
i want this one specifically
check the command on that one
/give @p minecraft:player_head[minecraft:custom_name='{"text":"Black Question Mark","color":"gold","underlined":true,"bold":true,"italic":false}',minecraft:lore=['{"text":"Custom Head ID: 8767","color":"gray","italic":false}','{"text":"www.minecraft-heads.com","color":"blue","italic":false}'],profile={id:[I;682268746,544686284,-1914182079,-1376598889],properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDZiYTYzMzQ0ZjQ5ZGQxYzRmNTQ4OGU5MjZiZjNkOWUyYjI5OTE2YTZjNTBkNjEwYmI0MGE1MjczZGM4YzgyIn19fQ=="}]}] 1
so you would have to create a game profile with those texture values
I don't have access to a GameProfile object
do i need to add something to my pom.xml?
spigot has a player profile API for this
ohh cool
Hi! I'm wondering if is it possible to display player with packets Spyglass effect?
Guys, that's crazy, can we really register custom blocks (even crops) for server side since 1.21?```java
public static final Block ADAMANTIUM_ORE = registerBlock("adamantium_ore",
new ExperienceDroppingBlock(UniformIntProvider.create(2, 5), Blocks.STONE.getSettings().strength(2f)));
public static Block registerBlock(String name, Block block) {
return Registry.register(Registries.BLOCK, Identifier.of(Things.MOD_ID, name), block);
}```
everything use net.minecraft (no nmc)
nah actually, there wasn't Item#Settings I think
(net.minecraft.registry my beloved)
?mappings seems like a mapping issue
Compare different mappings with this website: https://mappings.cephx.dev
Yes, you can register them server side, but the client's gonna panic
nah I just didn't tried with older versions
Client has no clue what to do with it
hummm interesting
just passing the custom block to the client as another block which is vanilla
i haven't actually tested that out yet
we should add that to CombustMC : destroy client by adding custom blocks
yeaaahhhh
how do I get the GameProfile object?
it just had a red line under it for me lol
ohhh i need authlib
why?
if its for PlayerSkulls just use the PlayerProfile API
the PlayerProfile API doesn't seem to have when I need
it should have everything you need what are you trying to do?
i'm trying to make custom player heads from minecraft-heads.com
okay
Spigot 1.18.1 added the new PlayerProfiles class, which finally allows us to use custom heads without needing any reflection! You can obtain them as normal items, or actually place them down into the world. Iโll show you how both works: Creating a new PlayerProfile First, we gotta create a new PlayerProfile object. To do so,...
cool! thank you so much
banlist?
getBanList<PlayerProfile> or smth and then use offlinePlayer.getPlayerProfile().update() in the pardon() method (off the top of my head idk if this is all correct)
or if you are for some reason using a name ban list (which you shouldn't) it's analogous but even easier
Cannot resolve method 'pardon(CompletableFuture<PlayerProfile>)'
Bukkit.getBanList(BanList.Type.IP).pardon(offlinePlayer.getPlayerProfile().update());
what
what do you not understand
you either getPlayerProfile().update().join() or just getPlayerProfile()
istg every time you ask for help you just copy the code and not learn anything
method use " void pardon(@org.jetbrains.annotations.NotNull T t);" or @java.lang.Deprecated
void pardon(@org.jetbrains.annotations.NotNull java.lang.String s);
what the fuck this 't'
this is a generic.
Bukkit.getBanList(BanList.Type.PROFILE)
the signature of BanList is BanList<T>
hence T will turn into a PlayerProfile
which is why i'm asking you to get the fucking profile
spigot's banlist is so silly
i spin up my own ban system on my server
same
??
@blazing ocean ur next
???
:)
bro "Cannot resolve method 'pardon(PlayerProfile)' how i can give profile if the method needs either a string or some kind of object "t". profile not can casting to T
i not can find method what can give this "t" from profile
or from oflline player
i can ban only ONLINE player usage adress
but i need ban offline
what are you having fucking trouble with
reminder that Bukkit#getOfflinePlayer can do a web request so be careful!!
ah who cares anyway
update() probably also does (idk what it does, i've never once interacted with playerprofiles)
Yeah it does
i not has this
what version are you coding against
that won't work in java, if anything it'd be Bukkit.<PlayerProfile>getBanList(...)
oh true yeah my screenie has kotlin shenanigans
skill issue
zbll you are the rudest person in this channel ngl
like you're chill in all other channels
kekw
do you know how fucking tired i am like i could stab you rn
my mongodb just assumes a database name
that i don't provide anywhere
i've been trying to solve thjis for at least 3 hours
go way kotlin lover
go code something without relying on spoonfeeding mf
if you so love java you could've figured out to maybe place the generics where they usually are in java signatures
alternatively go learn some english
I need trooper to spoon feed me some reflection tricks
I can, but apparently for you any mistake is something terrible and unacceptable
Me too, mistakes cannot be made unless you want your fingers chopped off
i rus
learn to ask questions/read words and maybe your mistakes won't be so stupid
what witchcraft are you working with
zzzzzzz
lmao
iโve been reflecting on my time that i started reflection
CoinsEngine has no hook for their repo, soooooo reflection was my best guess
and now I understand the reasons for your temper
enlighten me
thanb
I donโt know what that is kek
oh you don't know it
dfu
my love
datafixerupper
the mojang serialization lib โค๏ธ
Pure generic hell
CoinsEngine uses vault as its backend for custom currency management
okay
So I was thinking maybe I can pull what I need from vault? But havenโt figured that
If you have the JAR you can also depend on it as an external jar
within Maven or Gradle
^ install it to your local maven repo
since you said it has no repo
the problem was in generics and not what you wrote lol
Ideally you'd just use vault
yeah
Hold on give me like 3 mins Iโll show you guys
wait, you don't like this!?!?!?
I mean the source
o yeah it is
The usage can be quite nice when you get it working
this kotlin?
yea
Exception in thread "main" java.lang.IllegalArgumentException: databaseName can not be null
Bitch
12:39 am
Who
i've been trying to get this working since maybe 7 pm
oh
Sleep
for 4 entire hours this bitch was pulling environmental variables from a file that i didn't even provide to it
isn't the db name here admin
and now that i've changed some names
o yeah that's dumb
as if i have fucking energy to fall for such obvious ragebait
So the issue is that coinsEngineGetBalance method always returns 0 ๐ฆ
wanna know the best part about this stacktrace
this is line 80
that's it
how in the flying fuck is it calling this error
I love Java Reflection (random remark)
same
I'm not sure how to derive the custom currency tho, vault has a #getBanks method that returns a list of banks and I assume that's giving me the list of all currencies? If so then all this reflection is quite useless kek
I remember some guy wanted an issue fixed in some closed source anticheat and I was able to fix it in a couple of lines
Best deal ever
Either a list of all the currencies or a list of all player banks I suppose, haven't really looked into vault internals
Prolly should kek
How would I go about this? Given I can't get vault to work anyway
Never had to do this before so sorry for the ping haha
Likely because of kotlin tho
that is true
Well the interop is shit so :(
nevermind
mfw
Oi con or rad since you guys are here โค๏ธ
no it was bc the jar was never getting updated basically
i have no idea on what vault even is
๐
so gl with that lol
You've never heard of vault???
Whatttttt
just a basic emoji plugin i made for #1242181722326569000
Its the spigot economy api thing
idk i don't use pre-made plugins
what the
i just reinvent the wheel
what this
Con do you much about vault?
Well Iโm still gonna blame kotlin for that one 
I used it back long time ago
But im a bit too lazy to read up on all that, u mind restating ur issue?
.
js fixed it after 5 hours
Using reflection to get coinsEngine methods, but coinsEngine backend uses vault so perhaps it'd be easier/better to just use vault
I'm just not sure on how
Why is there so much reflection ๐ญ
CoinsEngine has no hook D:
Oh noob plugin
reflection is love reflection is life
Literally their readme
well ru sure ur reflection works correctly even?
uh
no kek
The try/catches never print anything so I'm not 100% sure they're ever beeing invoked
Yeah its bad
I mean I wasn't sure what else to do but Oliver just said install to local maven repo, I just don't know how
but bottom line would just be better to use vault
so why ru not using vault?
It has special money?
CoinsEngine gives server ops the ability to make custom currencies
Which in my case would be apples
I think perhaps getBanks could get me a playerbank that holds this currency?
hmm, this was the source right?
of coinsEngine yes
Then thereโs a trivial way to find out, let me see
Also worth mentioning, these are vault methods not coinsEngine
well I think u could just add the jar to ur compile time classpath
Like basically add it as a provided(maven) dependency (or compileOnly w gradle)
Since they have an api class
I have no clue how to do this kek but yeah I was thinking that'd be easier too, I was just hoping since they use vault for the backend I could just get what I need from vault
But from what I've seen of getBanks returning a list of strings... Idk if thats the name of the bank or the currency or what
idk they have a bunch of crap here https://github.com/nulli0n/CoinsEngine-spigot/blob/master/src/main/java/su/nightexpress/coinsengine/api/CoinsEngineAPI.java
My point was just that their backend uses vault so in theory it should be easier / simpler to just derive what I need from vault right?
And this is only because CoinsEngine has no documentation for a proper hook
i mean idk if "easier", if anything using their specific apis will provide you more control, but using vault you can cater to more economy plugins rather than just that one specifically
Thatโs kind of the point as well, something further down the line
yeah use vault its better
Right now itโs hardcoded to just handle a specific servers currencies
But Iโve been using vault for the regular Econ stuff but now they want their regular money transferable to their premium currency which is handled by CoinsEngine
My issue is just the fact I donโt know how to use vault to get the premium currency
don't think vault has a concept of currencies
The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.
For example, only executing code if the main hand was used:
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
return; // do not progress past this point |
}
// provide functionality
}
?interactevent
yay
The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.
For example, only executing code if the main hand was used:
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
return; // do not progress past this point |
}
// provide functionality
}
fuck
Do you know what #getBanks() is actually returning then? Itโs a list of strings, I donโt understand the context of these strings however and last time I tried to print it out, it errored
How do I prevent custom item names from appearing in italics? It looked fine in 1.20.6.
i'm assuming it'd be a list of bank names, but ^ /shrug
yes, which the economy plugin would have to implement
Oh
coinsengine does not support multiple banks
that's their impl of vault's econ api
and looking at the src it seems like you can configure one currency to be the "vault currency"
Nevermind what I said. Lunar client is apparently the reason.
hm
is there any way to check if the player is clicking with its "mainhand"
iam getting dubble events
Right ok misunderstanding, well currently my reflection isnโt working so gonna have to figure that
what do you need reflection for anyway
Since coins engine has no hook and I donโt know how to do it any other way
you could install it in your maven local and depend on that artifact in your project
Thatโs the one I gotta look up
seeing it's a maven project you could just mvn install to put it in local
well, assuming you don't need any extra dependencies in your local that it depends on :^)
anyone willing to hop in the vc and help me figure out this stack trace? should be pretty simple
?paste
show the stacktrace
well i know where the error is occuring, and i tried to fix it
Check the spigot page, I believe coins engine does
but i dont know why
there shouldn't be anything null being passed through
clearly there is though
getPlaceName is null
shouldnt be
but it is
you are calling setup itemmeta before setting the place name
Hey, Is this last version 1.19-R0.1-SNAPSHOT of bungeecord-api?
i've tried the method and the property
neither work
i dont understand how it could be null
1.21-R0.1-SNAPSHOT, if your IDE tells you it is missing please ensure you have the proper repositories added to your project
wonderful
which group will be net.md-5?
I'm using repo https://oss.sonatype.org/#nexus-search;quick~bungeecord-api
Does anyone know what this error means I get this when shutting down my server with my plugin installed:
[22:14:38 WARN]: Exception in thread "Thread-8" java.lang.NoClassDefFoundError: org/h2/api/ErrorCode [22:14:38 WARN]: at org.h2.message.DbException.getJdbcSQLException(DbException.java:475) [22:14:38 WARN]: at org.h2.message.DbException.get(DbException.java:212) [22:14:38 WARN]: at org.h2.mvstore.db.Store.close(Store.java:402) [22:14:38 WARN]: at org.h2.engine.Database.closeOpenFilesAndUnlock(Database.java:1261) [22:14:38 WARN]: at org.h2.engine.Database.closeImpl(Database.java:1225) [22:14:38 WARN]: at org.h2.engine.Database.close(Database.java:1144) [22:14:38 WARN]: at org.h2.engine.OnExitDatabaseCloser.onShutdown(OnExitDatabaseCloser.java:85) [22:14:38 WARN]: at org.h2.engine.OnExitDatabaseCloser.run(OnExitDatabaseCloser.java:114) [22:14:38 WARN]: Caused by: java.lang.ClassNotFoundException: org.h2.api.ErrorCode [22:14:38 WARN]: at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445) [22:14:38 WARN]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592) [22:14:38 WARN]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) [22:14:38 WARN]: ... 8 more
If i want to look through the NMS code to see what i need to use, would i just read the classfiles from the remapped jar, or is there a better way?
could use something like mache, control click nms classes or use control shift f it
H2 isn't present during runtime
Is it something I should worry about as I don't see any problems in game?
I quite new btw
uhhhhhhhhh if h2 is a library you use in your plugin, it should be present during runtime
without seeing code I would guess you aren't closing your database onDisable
make sure to close it onDisable and wait for it to close
md does craftbukkit or spigot handle input scanning for spigot
I don't thank I have a database
onExitDatabaseCloser.onShutdown suggests to me its only closing because the server stopped, which is way too late (and improper)
if you don't have a database then what is H2 doing
How can you get the action of using number key to hotbar swap from inventory to container?
like pressing 4 to take item from hotbar into a chest
because spigot aint use or include H2 by itself
like console? CB
Well my plugin just adds a simple thing if a item is named jonnite you can click it to do abilities which has a cooldown
no like do you have any other plugons installed?
Because if you aren't using h2, what is?
if you aren't using H2 then that exception isn't related to your plugin
The only other thing is luckperms and via version
So do I need to download something to stop the error or..
sounds like a luckperms bug
How can you get the action of using number key to hotbar swap from inventory to container?
Like pressing 4 in a chest to move an item from hotbar into a chest
InventoryClickEvent
declaration: package: org.bukkit.event.inventory, class: InventoryClickEvent
Also just to clarify, spigot has no API to deal with world storage right, that something i'd have to do with NMS unlike world gen or something of that regard
Yeah I'm trying that, not working. Might be doing it wrong.
I mean if you send the code if something is wrong it could be found
I mean it's debug code of simple
int slot = e.getHotbarButton();
p.sendMessage("hb: " + e.getHotbarButton());
p.sendMessage("slot: " + slot);
What is โworld storageโ
How the world is saved to the disk
What about it
I mean i want to hook into world save and save it in my own format
so idk if i need to touch NMS to do that
can't find anything relavent in the spigot api but
What's wrong with current world saving format
Right so let me explain my usecase for this rq
Basically, i'm working on a plugin that will store the world in 16x16x16 cubes
This is because i'm trying to store an infinite height world, and the idea is at any given time, we can load or save slices on the y-axis of this world
While we could use multiple anvil worlds as slices, the issue is that we want slices to be arbitrary ranegs of y values, so using a custom world format to store cubes does the job
My goal here is to create a plugin that lets me save a world and load a world from this savefile format, with arguments specifying which range of y values i'm loading (anywhere from -64,320 to -1000,1000)
(The reason i need infinite height is because this is for a project where we build the earth in minecraft, so you can imagine default height limit is an issue)
And the format itself is a modified version of this
https://github.com/DaMatrix/RocksMC/
This only does it it I click on the hotbar item.
If I press '3' in the chest it doesn't do anything?
bumpp
wdym by that? Like, send the spyglass effect to someone?
Play around with an event debugger or check subclasses of inventoryevent
uh, there any 1.20 eventdebuggers?
I assume any would work
Is it correct to assume here that I am basically doing similar to slimeworldformat and have to use NMS or?
I'm assuming i have to but if there is a chance i can avoid
Pretty much
ok yeah checks out
Could someone help me look over this stack trace?
The plugin works fine, but it spams this in the console when I use the command
https://paste.md-5.net/sihiqefoko.sql
can i question gooncraft
lol
just the discord server name, not gooning
here's what an entry in the yml file looks like
and idt it lets you customize the LoaderOptions
Probably just want to deal with yaml loading yourself in such a case
yeahhhh ur right
See ConfigurationSerializable
i dont wanna do all that tho so i may just have to re-structure some of it
wait, could you give an example of the serialize() method?
as in, how i could use it
i see that it creates a map representation of an object
actually wait nvm i think i can figure this out
The javadocs should cover it
declaration: package: org.bukkit.configuration.serialization, interface: ConfigurationSerializable
You just put the fields you want in the map, and have a constructor which takes a map and reads it
That static map ow
Make a new LinkedHashMap, put the stuff you want to save in it, return
yes but im not exactly understanding what the structure of the map would be
like
here one sec
Map.of(
"name", this.name,
"icon", this.icon,
"location", this.location,
...
)
type deal
How does one get build-tools to output the build directory with all the craftbukkit files lol, i dosen't happen for me and i can't find a flag for it
the InventoryClickEvent doesn't fire when you numkey an item from hotbar -> container, but does container -> hotbat...?
yes
Wdym by this?
I figured it out
i was looking in the target dir not the dir with the buildtools jar
Is action bar the only suitable option for rendering stuff thatโs anchored to the bottom of the players screen
Action bar is the "ideal" way for that
You could also use things like titles but meh
Wait can NMS code (i'm changing the functionality of ServerLevel), call plugin methods or will it nuke itself
Problem is there is only one action bar and other plugins like to use it :/
Cause idt they use the same classloader
ignore this
Wait wait I read it wrong
even still theres no other ui component thats anchored to the bottom
empty string?
Same as action bar, can't be vertically offset (idk about custom fonts tho haven't tried that)
wait, how do you do action bar messages?
it's not p.sendActionBar("message") is it?
it is, just Component.text("")
Yeah vertical offset isnโt a problem, we have fonts
Bossbars would be good since you can have multiple, but they are too anchored
You can use the sidebar to go slightly lower but not quite as low as the action bar, and it can have any amount of horizonal offset
It's kind of like in the middle
Other than that then I guess bossbar is the only other option
Height isnโt an issue, we have font ascent magic for that
The issue is where itโs anchored
Font ascent magic?
Big Badguy
You can change height on sidebar and stuff too?
Yeah
I just tried debugging, for 2 hours... I forgot to register the listener .-.
That sucks
Is there a way to get shield break event, or at least shield lower?
ooh that's fun
did you just do trial and error for positioning the notifications with neg spaces?
always a bit of a pain
it's really not :D
they're fun once you got them working
negative spaces and figuring them out is the hardest part
there's no sonarlint equivalent that uses ai to autoimplement its own suggestions is there
I assume 99% of the work on this is the rsp
how do you use the scoreboard without making it display scores? I forgot
uh
it was number format or some shit
oh nvm i couldnt figure it out so i just used commands...
Scoreboard scoreboard = p.getScoreboard();
Objective objective = scoreboard.getObjective("test");
if (objective == null) {
objective = scoreboard.registerNewObjective("test", Criteria.DUMMY, Component.text("test"));
}
objective.getScore("test").resetScore();
for (int i = 0; i < 5; i++) {
objective.getScore("test"+i).setScore(i);
}
objective.setDisplaySlot(DisplaySlot.SIDEBAR);
// IDK HOW TO DO THIS SHIT, INSTEAD USE COMMANDS
// scoreboard objectives modify [your objective] numberformat blank
objective.numberFormat(NumberFormat.noStyle());
p.setScoreboard(scoreboard);```
heres this if u wanna test it
that numberFormat did not work for me btw i was just messing around with it
see if you can get it to work
actually i just realized this may be paper oops
seems like it it's not in the api as far as I can tell
bread
bread
bread
bread
bread
This is probs going to be the most stupid question xD
But I'm currently making a plugin to where when the player mines
block with said Pickaxe it will insta put the item in too their invin and
stop the item from dropping on the floor. (This all works)
But my issue is how would I make it so if the players inventory is full
this (includes if say a stack of dirt is 64 but if its 63 its not full for that block)
will make the items drop on the floor instead.
inventory.addItem returns a map of items that didnt fit
so you wanna check if the slot is available for the mined block?
declaration: package: org.bukkit.inventory, interface: Inventory
So would something like this work
if (p.getInventory().isEmpty() == true){
//This grabs the item the user mined
Collection<ItemStack> drops = e.getBlock().getDrops();
//This gets the item dropped
for (ItemStack item : drops) {
p.getInventory().addItem(item);
e.setDropItems(false);
}
return;
}
if (p.getInventory().isEmpty() == false){
p.sendMessage(Main.color("&cInvintoy full"));
e.setDropItems(true);
return;
}```
Hey, I can't find proper repo for bungeecord-api package: 1.21-R0.1-SNAPSHOT it should be the net.md-5?
isEmpty will return whether the whole inventory is empty, what you want to do is to call the method PlayerInventory#addItem, and get HashMap<Integer, ItemStack> and if its length is 1 (in your case) then the item couldn't be added to the players inventory, thus you want to drop it on the ground.
so:
Collection<ItemStack> drops = e.getBlock().getDrops();
for(ItemStack drop : drops) {
HashMap<Integer, ItemStack> leftItems = player.addItem(drop);
if(leftItems.size() == 1) //we should drop this item
}
Heya! How would I go about killing a dropped item?
dropped by player or dropped by block?
either way, don't kill it. just listen to item drop event and clear the list of dropped items
I was able to solve the issue, on the maven artifact service (https://oss.sonatype.org) I've seen only release,
so yes correct group is net.md5 and the Viewing Repository should be: Snapshots.
The dropped item entity, either way I don't want to clear dropped items, I want to kill a specific one
Entity#remove?
That kills the entity?
Because I need to kill the entity since if I use remove shulkers don't drop the items inside of them
so you want to kill the shulker or drops?
Is this one that you mentioned?
It works! Thanks
Didn't you just say you wanted the items in the shulker to drop I'm confused
Are you killing a shulker entity or do you want to remove a shulker box (block)?
ye
does anyone know the difference between Special Source and Special Source 2?
2
so the idea was to forward player to another Bungee not mc server
because SS2 is used to apply mappings and SS1 for access transformers
yes, that method would be great for that
Kinda works its now duping items. So when I mine it it will put it in my invin and put it on the floor
I guess I don't understand this description:
This is a client-side transfer - the host and port should not specify a BungeeCord backend server.For me, it means I should not use BungeeCord Host and Port, in other words, I should give Spigot IP and Port, or is it a misunderstanding?
no "backend" is a spigot server
you should not have a client connect directly to a spigot server using that method
as that would skip the proxy and well, explosion
Maybe you have drops enabled in either case
ok so it means do not provide backend (mc server) IP and port related to this BungeeCord proxy server
Yea sure
Ok, thanks for explanation
just input the host and port of a different proxy (not minecraft server) and you are good 
(or a MC server that is not managed by a proxy)
One more question, is DNS SRV record will work with it?
it can, but shouldn't be relied as the sole thing to work
there is no requirements for anything to actually use srv or pull such records
do i need to make a InstantCreator for ItemStack if iam using gson? and redis?
cuz its not reading it
oh i see why its removed from the config after each restart
interesting ..
i try to make items serlizable idk what's wrong when ever a server restart it does not save it to the file ..
it should ..
it should send this no?
how to use component in BookMeta
BookMeta.spigot()....
https://paste.md-5.net/sabeyefoze.js
i have a problem with something itemstacks is not being sent to redis ..
how the system works:
- lobby server load the kits.yml , add kits into map
- map is set to redis
systemCheckProtocol.getProxyRedisProtocol().getState().set("kits",kitsmap);
systemCheckProtocol.getProxyRedisProtocol().pushAll();
it sent all the data but not the itemstacks ..
are you really opening your redis connection again for every entry?
the system is kind of complicated
^ shield break event / lower event?
Not works
show what you tried
int i = 0;
TextComponent[] components = new TextComponent[pageSection.getKeys(false).size()];
for (String pageKey : pageSection.getKeys(false)) {
TextComponent component = new TextComponent(ColorUtil.process(pageSection.getString(pageKey + ".text", "ะคะฐะนะป config.yml ะฝะต ะฝะฐัััะพะตะฝ.")));
component.setHoverEvent(new HoverEvent(HoverEvent.Action.valueOf(pageSection.getString(pageKey + ".hover-action", "SHOW_TEXT")),
new Text(ColorUtil.process(pageSection.getString(pageKey + ".hover-text", "ะคะฐะนะป config.yml ะฝะต ะฝะฐัััะพะตะฝ.")))));
component.setClickEvent(new ClickEvent(ClickEvent.Action.valueOf(pageSection.getString(pageKey + ".click-action", "CHANGE_PAGE")),
ColorUtil.process(pageSection.getString(pageKey + ".click-text", "ะคะฐะนะป config.yml ะฝะต ะฝะฐัััะพะตะฝ."))));
HologramUsingBook.getInstance().getLogger().info("Component: " + component);
components[i++] = component;
}
meta.spigot().addPage(components);
is your meta book meta
yes
It seems damage() adds knockback.
How can I not do that?
Even event.getPlayer().playHurtAnimation(1); seems to add knockback.
@wet breach @eternal night
I have exception on client side on redirecting.
Cancel the EntityKnockbackEvent
"than I expected" lol
Hmmm. That would then ruin knockback for weapons too. But I suppose I'll play around with that and see if I can detect the damage source or something. Thank you my good person.
Any help pls, components not working in books
?paste
Components not working with Bookmeta
https://paste.md-5.net/ozakadakaf.java
?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.
Unfortunately it doesn't seem to help.
The problem is the character is being pushed out of the barbed wire - causing less than than I would like.
thats quite a bit of knockback
Put the entity in a collection, run damage, check in the event if the entity is in the collection, cancel the event and remove entity from collection
what happens when you jump straight into it from above
Uhm
๐ค
I mean, I could set velocity to 0, but I'd really like to avoid having to do that.
does that work then?
but you havent tried 
No, I have not tried. But there's no reason to assume that it wouldn't work.
Instead of setting it to 0 try to get the velocity before calling damage and set this value after the call
Might still have problems.
there is also no reason to assume that cancelling the knockback event doesnt work
Try
No, that one I tried - of course - and it didn't work.
yeah exactly
maybe print something to see if the event gets called at all
because it does not look like normal knockback
It should be completely normal knockback.
Caused by:
event.getPlayer().damage(1.0, DamageSource.builder(DamageType.GENERIC).build());
It really does not look like knockback, more like you're teleporting player
No, I just give the player damage.
Does commeting the damage call out not cause this ?
Just that one call.
That's not answering my question really
Yes. Commenting it out will not give player damage then.
I am fairly sure you're either doing something wrong, or spigot has a bug.
causing damage with the /damage command does not deal kb I believe, can't try rn
I don't know if it's "knockback", but what ever it is called, I don't like it. It's moving the player.
Same thing happens with normal damage sources like zombie attacking, though.
I thought it was normal. I haven't touched MC in 8 years.
yes, mobs do deal KB with the damage
make the damage source be from fire
fire doesn't give knockback
Also, doing:
event.getPlayer().playHurtAnimation(1);
Has the knockback.
but still gives you the damage effect
I will try that.
res?
resistance
The KB should not be dealt if the DamageSource does not specify either a location or an entity tho.
At least that's how I believe vanilla works.
fire resistance
believe resistance reduces the damage taken but I am not sure
