#help-development
1 messages · Page 1225 of 1
good job
well grab the leggings and /paper dumpitem while holding it I guess
see what the actual item looks like
Would location.getDirection().setY(0).getLength() always be proportional to location.getYaw()?
"proportial"?
proprortional 👀
yay
nbt
proprortional?
gaah
did you maybe not setEquipable
(you did not)
mb I didn't catch that, the esoteric language you chose to develop in hid that semi well
like, what do you mean by that
huh
i mean, the yaw does not affect the length of the vector
just the direction
so like yeah idk what you're asking
Yea I mean, the length of the vector there is going to be from 0 to 1 but based on the pitch
poor man's :this:
oh i'm brain dead
just flame the poor choice of programming language and move on 
is location.getDirection().setY(0).getLength() == 1 - Math.abs(location.getPitch())/90?
java sucks
there
wait no wtf
im high
wait am I??
no
wtf
is that correct??
😭
https://i.imgur.com/inanYif.png
Thanks @eternal night
no problemo
FUCK
1 - 90/45
THERE
das 1 - 2
im so cooked man 😭
its not getting better
why
yeah
but also north-west
does your pitch change anything?
some flag prolly
if those are custom added, yea just the flag
if those are the vanilla defaults, something you'd wanna ask paper 😅
given that differs to spigot rn
i'll ask paper
yaw in thise case
like
rubber duck debugging but we are the rubber ducks
the value of the expression on the left will be the same right
fr bro
vectors are hard 😭
no
Ok ok ok listen so we have this line and it runs which makes this value this... times the
no?? am I stupid??
direction is normalized
yeah ik
the length is 1
no
use the brain
maybe give up and look into a switch of hobbies /s
idk, your xy just seems to be hitting hard here
like, why do you want this to be equal
i dont, im just wondering why my calculations are messed up because im stupid in how vectors work or because my calculations are miswritten
seems like its the former
im not making sense rn am I
Well the premise of "I don't need this to be equal, I am just stupid" is kinda not making sense no
wait im so lost rn tho
isnt
changing yaw
the same as
rotating the vector around the y axis
no
there is no "the vector"
yaw/pitch <-> vector
not yaw/pitch -> vector
they represent the same
wait imma go get consulted by chat gpt rq
😔
hey man at least I tried to use my brain
it let me down tho
wait, so if new Vector(sqrt(2)/2, sqrt(2)/2, 0) is normalized, for my theory to hold new Vector(sqrt(2)/4, sqrt(2)/2, sqrt(2)/4) needs to be normalized but it's not?
am I right now at least?
no wait
thats bullshit
bro
screw you brain
bro you're so right ong 😭
the "percentage" of length the y component of the direction provides in a normalized vector is obviously affected by the values of x and z
cuz pitch rotates in a circle and not a square or smth
like, in the vector [0, 1, 0] the y component provides 100% of the length
in the vector [0.707, 0.07, 0] it provides 50%
well, x^2 + y^2 is always 1 in this case right?
no
wait
im actually
[0, 1, 0] is a valid vector
okay
shit
have a great day
:D

have anyone tried minestom
yes
like not just to test it
but for real impl use case
is there any protocol implementation nuances i need to look after
for example how does movement compared to NMS server
Player movement you mean?
what about entity AI
That's up to how you implement it
tbh minestom feels like when you develop a gamemode for SA-MP/open.mp server lol
its scriptable blank slate
Yes that's the idea
how does crafting work?
its there impl for that
what is VRI?
oh
How do i make zombie run away if a player comes near
basically im trying to revive my old project blackcomb idea that i've tried to develop on bukkit api a while ago, but on something more low level like minestom or fabric natively
i cancelled it due to my uni work
Can someone please explain why it doesn't work? 🤔
missing bukkit api dependency
have you included spigot-api as a dependency in pom.xml or build.gradle.kts
CatColor
Update intellij
good ol' if it doesnt work restart it lol
my friend works in tech support, and he usually asks people whether they restarted their device, and surprisingly so many people do not before calling, and it fixes like 80% of user problems
CatColor!?
Yes, other classes work
Did you update Intellij
honestly minestom could be a good way to prevent dupes and exploits, at the cost of big burden of maintenance
none of the exploits on NMS would work on minestom unless code is the same
its a perfect server for closed map servers
for example it would be pretty hard to exploit inventory GUI's to dupe items in minestom due to how there's no inventory gui ticking that's outside of gui's handling in a first place
You would need to reimplement the entire vanilla server
It's best for cleanroom servers that don't need vanilla mechanics at all. Lobbies, mostly
dont you do that in ur sleep
i always wonder how hypixel manages to have all these spinup servers
I mean yeah obviously I can rewrite the entirety of the vanilla server with my eyes closed in only a few hours, with Forge mod support, AND Fabric mod support, A N D Bukkit plugin support
But the average person can't do that
what are you like docker gods or smth
hypixel prob use k8s
they probably just use dark magic
its honestly not that far fetched
but can it run crysis?
no I hacked their mainframe, they use bash scripts and tmux
i bet even the rats living in hypixel's office's vents can run crysis
they are just too good man
-_-
make the ai check for players near itself
and then make it go in the other direction if there is one
It can actually run any game
We make sure those rats are well fed
i can imagine hypixel being run by a room full of rats on those rat wheels
and they are performing all the logic behind the scenes
They actually flip all the bits manually
can it play the YouTube snake loading circle Easter egg?
I miss that 😔
yeah minestom is supposed to be a completely barebones thing
i know some guy who was actually working on it and he made some nice stuff
i dont think minestom even has mobs or anything
It doesn't
It has zero logic at all
That's why I said it's meant more for something like a lobby where you can just implement some global lighting and that's about it
does someone know about Node Map Plugin?
How to Set it up?
i searched on google and it says download some plugins but i couldnt find them
does BlockDropItemEvent#getItems return a copy of the items list or the actual one
if i change it does it change the drops
It’s immutable iirc
drop ur item urself
k
is that why limbo is always night time?
Well, no, it's in the void lol
also they say creatures are in limbo but ive never seen a single soul
im waiting for limbo cthulu update
👀 They're watching
average game lore for the most irrelevant area in the game
but tbh imagine limbo had a dante style fight with cthulu going on and if you die you get sent outta limbo so you can only fight him during limbo wait thats just that big slime from the rift
Limbo is just the backrooms before it became mainstream
oops fell off bedwars into the backrooms
does someone know about Node Map Plugin?
How to Set it up?
i searched on google and it says download some plugins but i couldnt find them
What the heck is a node map plugin
sounds like google translate failing
Probably hub menu
i cant send screenshots but if you know the server crusalis you would know the map
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
Heya, I'm using Spigot 1.21.4 and I've got a REALLY weird bug(?)
I have 0 plugins on (I removed the 2 jars I had 1 by 1 to make sure), server all restarted and everything, and for some reason
CONSISTENTLY, when you rejoin the server(not reload not anything else), your MOVEMENT_SPEED base attribute going down to 0.05 (default is 0.1), it isn't halved further and setting it to another number via the /attribute command and rejoining still brings it down to 0.05... specifically this attribute... Since now there are 0 plugins running on my server I imagine it's a spigot thing? Anyone else had this happen to them?
I've got 1 datapack that adds block tags only
and no command blocks
nothing that should affect any attribute whatsoever
I only had my plugin in, and the Minekube Connect plugin
I've gotten rid of both just in case
restarted multiple timesa nd tested
and same result
You sure no one has hidden a command block somewhere
yeah I just created a new world and tested my plugin on it
I am the only one who played so couldn't be a command block
haven't touched them
also it's only on join(or leave idk) for commands blocks to pull this off you need a scoreboard and I checked and none exists
Nope
ah ok
why do you want that lol
Are the nodes like clan claims or something?
Is there at all, any way, to make a recipe require multiple of the same item in a crafting slot to make one of the output?
I've seen it done before on other servers
I just couldn't get around to it myself
checking the inventory on https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/PrepareItemCraftEvent.html im guessing
declaration: package: org.bukkit.event.inventory, class: PrepareItemCraftEvent
yeah i think thats too much effort for what its worth
actually i easily fixed it with
sendPacket(player, new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LISTED, ((CraftPlayer) player).getHandle() ));
that ^
I currently am using runTaskTimer on a BukkitRunnable, it starts correctly the first time. I then call the cancel() function. At some later point I need to be able to run it again. If I simply call runTaskTimer again, I get stuck with an illegalstateexception
yes, you cannot reuse a BukkitRunnable instance
you need to create a new instance of it
kk, replace each call to start it with a new instantiation that then starts instead?
if you really needed to reuse the same exact runnable instance then you could just have an active/inactive state, where if its inactive it just skips the iteration?
I don't have a particular need to, that is just how I conceptualized it initially.
can anyone tell me how to fix this (my gamemode is not getting changed when ever i change it says An unexpected error occurred trying to execute that command)
possibly if you send details about the command being executed, such as a code block
are there any plugins involved?
take em out and slowly put them back in until you figure out which one is causing it
ok
divide and conquer
ty it is fixed now that was deleuxe hub issue
@sage perch
DId you end up opening a ticket?
Their application actually seems to not require much knowledge of Spigot at all.
Is there any way to find out who placed the vehicle, like boat or minecart? I found VehicleCreateEvent, but it doesn't track who placed the vehicle
Vehicles are Entities.
EntityPlaceEvent
declaration: package: org.bukkit.event.entity, class: EntityPlaceEvent
Thanks
Vehicle create event is for natural generation, and dispensors.
why does when adding a new lore line to deluxe menus break everything
Are you doing this through it's API? Does it have an API?
What exactly are you adding? Can you show your code?
no
thru config
This is development.
You aren't developing
This is development. You aren’t developing.
deluxe menus probably knows better than we can tell you
i have another rank with 16 lore lines and its fine then when i add another lore line to this rank it breaks the entire plugin
weird
makes no sense
Go to there discord
il see if they have one
They do
Yeah but you aren’t developing so you’re in the wrong channel.
I’m not being abrasive.
There’s a channel here #help-server
Reminding the individual about the channel they’re in was a sign to switch over. Since I’m sure more server admins and owners check that channel than here.
Someone know why I have error without information about where is going on
sorry I was talking to bedless mostly
You'll find that this is a second error in a series. This error you're seeing is about the command not being invokable as the plugin is disabled. You'll need to scroll up to find why the plugin was disabled.
But also @upper hazel you're running paper 😉
Not to say that running Paper is you're issue, but you usually will not recieve support for Paper in this Discord Server.
Either way, I'll treat this as Spigot, because it's not inheritly something Paper is responsible for. But essentially your plugin either didn't load, or was disabled by another issue. You'll need to pinpoint that issue.
If my plugin disabled why I get this error then? I should see message like "this command not exist"
thats essentially whats happening
the first line literally says that the plugin is disabled
well no because its unusual that the plugin is disabled
i guess there is just no message
Or this another situation
i have no clue
Alr
but this is a non issue as plugins should not just be disabled all the time, you should fix that first
i have JDA plugin Logs and Commands but there is error when i send /mute 505t(my name in minecraft) for example
and the error
Thread JDA MainWS-ReadThread failed main thread check: command dispatch
java.lang.Throwable: null
at org.spigotmc.AsyncCatcher.catchOp(AsyncCatcher.java:15) ~[paper-1.19.4.jar:git-Paper-550]
at org.bukkit.craftbukkit.v1_19_R3.CraftServer.dispatchCommand(CraftServer.java:905) ~[paper-1.19.4.jar:git-Paper-550]
at Discord.Chat.onSlashCommandInteraction(Chat.java:55) ~[ExcellentServerManager-2.3.jar:?]
at net.dv8tion.jda.api.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:456) ~[ExcellentServerManager-2.3.jar:?]
at net.dv8tion.jda.api.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:98) ~[ExcellentServerManager-2.3.jar:?]
at net.dv8tion.jda.internal.hooks.EventManagerProxy.handleInternally(EventManagerProxy.java:88) ~[ExcellentServerManager-2.3.jar:?]
at net.dv8tion.jda.internal.hooks.EventManagerProxy.handle(EventManagerProxy.java:70) ~[ExcellentServerManager-2.3.jar:?]
[net.dv8tion.jda.api.JDA] One of the EventListeners had an uncaught exception
java.lang.IllegalStateException: Asynchronous command dispatch!
at org.spigotmc.AsyncCatcher.catchOp(AsyncCatcher.java:16) ~[paper-1.19.4.jar:git-Paper-550]
at org.bukkit.craftbukkit.v1_19_R3.CraftServer.dispatchCommand(CraftServer.java:905) ~[paper-1.19.4.jar:git-Paper-550]
at Discord.Chat.onSlashCommandInteraction(Chat.java:55) ~[ExcellentServerManager-2.3.jar:?]
at net.dv8tion.jda.api.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:456) ~[ExcellentServerManager-2.3.jar:?]
at net.dv8tion.jda.api.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:98) ~[ExcellentServerManager-2.3.jar:?]
Start a bukkit task and execute the command in that.
I guess
That's not it.
I mean what you put in the dispatchCommand call
ok if i do this
plugin.getServer().dispatchCommand(plugin.getServer().getConsoleSender(), "op " + event.getOption("player").getAsString().replace(" ", "")
maybe its work i think
why th do you replace nothing with more nothing
What's the point of that
did you AI gen that
ok, in that case use .trim()
where
?kick @misty ingot
Done. That felt good.
my headless minecraft client isnt receiving like half of the chat packets idk what the issue is bro
ive used pakkit (local proxy which logs packets) and the server is sending the packets, my stupid client just isnt reading them for some reason
i dont even know what to send
this is like
the whole client file
if thats of any use
login and everything works fine
btw
so it can definitely receive packets
its also deterministic it receives the same packets every time
so i dont think there is really a bug which isnt reading enough from the stream or something as the effects would depend on other packets sent influenced by activity on the server
it also used to work fine but i got a new laptop and reinstalled java and now im getting weird shit like this
@echo basalt hey were you the one who had a link to a page that shwoed how to mass alter millions of blocks in a server without having it crash out
?workdistro
is that for me?
Yes, not sure if that's what you mean
it's not entirely a problem of distribution, there was an nms method that was much faster than what worldedit does
I was just trying to remember what that was
Oh I remember reading that
yeah I'm not so happy I have to do it
but uh
worldedit just crashes my "realistic circumstances" test server so
just try FAWE
casues a ton of secondary problems
Well all of the actually fast methods on that post will be causing secondary problems too 
not ones that would matter for me
assuming it's just what is listed there
all I need to do is modify blocks in a void world so it's prepared for what is basically a minigame
players don't need to be able to see block changes in there
Well you'Ll still need to recompute lightning
but I guess go for it
The general vibe should still work
well if that's the only thing I need to do it should be fine
Palettes haven't changed
1.13 I believe
this reminds me of how much I hate nms
Limboapi and limbo auth is not working in velocity server but the files are extracted
?whereami
would Player#hasAi() always return false?
Yes
epic
Player#setAi(false) performs a lobotomy
Do you know of a script or plugin that can be used on a survival server where players can use /rankup, and it costs some money and items, for example? Or just what this type of plugin is called?
That's a question for #help-server
There’s one, verbatim called “Rankup”. But yeah see above.
Thanks do you have any experience with lucky perms?
Not replying here.
ok i have a very odd problem. i have a 2d shape of blocks and need to figure their arrangement order in a clockwise list as viewed from above and to a certain location.
I assume this can be done with vector math somehow?
aka sort by angle, but how do i calculate said angle from the two locations
"to a certain location"?
like, i dont want to calculate this relative to the world origin lol
i want this from the center of the shape
ah
so you want to rotate everything 90deg around the Y axis through the center of itself
? no
??
i just want to have the clockwise order of the blocks in the shape. its a circle outline
xy moment
angle in the xz plane compared to the (1,0,0) vector
explain what this is used for
okay but are the blocks continous?
like, why are you thinking in blocks
or is it like 10 blocks spread in a circle
find the circle's center, grab the min/max angle through trig and space the items out type shi
like i said a circular arrangement of blocks
im first scanning for the shape from an anchor point, so thats super fast, but i dont want to hardcode the order of all blocks in said shape bc thats a ton of work
but the why doesnt really matter when the problem boils down to this this
a filled or unfilled circle
tho yea just, compute the angle to whatever vector is your clocks "12"
exactly. how
what do you mean how
whats the math
ah
Hi i'm trying to fork a plugin called Light-API and i want to publish it in JitPack but it gives me this error:
[ERROR] Failed to execute goal on project v1_16_R2: Could not resolve dependencies for project ru.beykerykt.lightapi.nms:v1_16_R2🫙3.3.0: Could not find artifact org.spigotmc:spigot🫙1.16.2-R0.1-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :v1_16_R2
Notice that the project is multi-module and run buildtools
jitpack and buildtools don't play well
Guys I'm doing a shop chests project, but I'm conflicted, what would be the best way to load all the shops? or what would be the best way to load them? loading all on server starts and put them in cache? or what do you guys think of?
usually you can load them when their chunk is loaded if they are indeed bound to the chunk
Are you trying to figure out this angle or am I tripping?
im storing them into a sqlite, so i need to send a request to db when a chunk is loaded to get all shops in that chunk?
From the circle's origin, if you have the angle the target position is just sin(radians), cos(radians)
To reverse the angle I believe it's just atan2(dZ, dX)
sumn like that
might be in the wrong order
lemme find my example code
pretty sure bukkit's vector has an angle(Vector) method
ah it uses acos(dot)
that can also work
and now for the age old question: which is faster :V
but how do i publish it even if there's another site/way if possible?
I just need to save the coordinates of the sign then right?
because i only have this data
ok well
save owner by uuid
now I got to figure out what the data is in worldedit and what it needs to be when I do LevelChunkSection#setBlockState
because I definitely did not do it right first try
yea
worldedit kinda sucks for that
good point
well, unfortunately it's what I have
you gotta use WE or do you have schem files
i have a maybe-functional library to handle sql. want to test it for me :V
I recently added ItemsAdder support for worldedit pastes and realised they overcomplicated everything for no reason
if you only did it recently you haven't even seen the half of it
you should see how the format randomly changes
when mc updates
messed with extents, block factories n stuff
FAWE vs regular WE
it calling different methods across versions
because this used to work on 1.19 and then they changed everything and half the code I had was useless
I've had issues where blocks in schematic files were showing up as __reserved__ instead of the nbt I was expecting
can I pass bukkit's blockstate to nms blockstate easily, I am pretty sure I should be able to right
fantastic
all I need is a way to get blockstate from WE to get blockstate from nms
well really all I need is to bypass WE's paste
using something that doesn't crash servers when pasting a few hundred thousand blocks
you can make an extent that just pastes nothing
unless I'm tweaking and it's not what you want
that's not what I want
I have schematics
they're modules
I am arranging them
then mass pasting
the mass paste will crash servers if you using WE
workdistro moment
so I am getting the schem data block by block and doing the placement "manually"
Yeah you can do that with an extent
in WE?
Yeah
with no nms?
You can use NMS for the pasting
ok well
I mean do I even need to do that part, it really doesn't matter how I bypass it
what else would I need from WE functionality
you can skip WE and just do all the pasting yourself
that's what I'm doing
well
that's what I've started doing
I just don't have the correct data yet
So.. we need to convert worldedit's blockstate to nms?
yeah I just don't know what ot look at
I haven't really dealt with blocks that much
you know a lot of problems could be fixed with 10 lines of code if only you knew what 10 lines you need
might break with tile entities but that's a problem for later you
no
then what counts
hm
ok well that's definitely something I should think about after I figure out how WE structures data and what data NMS wants
definitely feels like I should just be able to pass BlockData around for this no?
so do I go WE blockstate-> bukkit blockdata -> NMS blockstate here
can't skip it anyway because I'm using a shaded library I made
and it doesn't have WE as a depend
plus I'd prefer to have something more "generic"
private static final Map<worldedit.BlockState, nms.BlockState> STATE_CONVERSION_CACHE = ...;
public static nms.BlockState convert(worldedit.BlockState state) {
return STATE_CONVERSION_CACHE.computeIfAbsent(state, this::convertState);
}
private static nms.BlockState convertState(worldedit.BlockState state) {
String serialized = state.getAsString();
BlockData bukkit = Bukkit.createBlockData(serialized);
// sanity check suggested
return ((CraftBlockData) bukkit).getState();
}
I'd skip the bukkit step but it seems to do some pretty important code
not a developer but question, so today I was bored and I'm looking if there's a way to increase my attack reach
and ya then I found a plugin that allows me to do that but how does getTarget even works?
I know player.attack maybe deal direct damage to the target upon left click if checked the target exists in the eye distance of player but now what about the range for the reach?
but what does ! means in target !=null
and what statement detects if the range is in player cursor?
@EventHandler
public void b(PlayerInteractEvent e) {
if (e.getAction() == Action.LEFT_CLICK_AIR || e.getAction() == Action.LEFT_CLICK_BLOCK) {
Player player = e.getPlayer();
if (!this.pl.settings.getBoolean("usepermission") || player.hasPermission("reach.use")) {
Entity target = this.pl.utils.getTarget(player);
if (target != null) {
player.attack(target);
}
}
}
}
}
oh ya I forgot to mention there's raytracing
public Entity getTarget(Player player) {
RayTraceResult result = player.getWorld().rayTrace(player.getEyeLocation(), player.getEyeLocation().getDirection(), (double)this.pl.settings.getInt("range"), FluidCollisionMode.NEVER, true, 0.0D, (entity) -> {
return entity instanceof LivingEntity && !entity.equals(player);
});
Object closer = this.getCloser(result);
return closer instanceof LivingEntity ? (Entity)closer : null;
}
public Object getCloser(RayTraceResult result) {
if (result == null) {
return null;
} else {
LivingEntity entity = (LivingEntity)result.getHitEntity();
Block block = result.getHitBlock();
if (entity == null) {
return block;
} else {
return block == null ? entity : null;
}
}
}
}
getTarget is a function call. Without the code of that function, no one will be able to tell you what exactly it does to determine the target.
However if you just want to increase the attack range, you can increase the attack_reach entity_interaction_range attribute of a player. This can be achieved with ingame commands as far as I know. At least you can put it on items to grant that effect
Edit: Ok strike the first part now :)
Here's the command to increase your attack and interaction range for entities:
/attribute @s minecraft:entity_interaction_range base set 10
wait so how does raytrace even checks for the target?
how is it even possible
oh i get it
i searched online and saw that ray tracing acts as a straight line
I'm not sure whether I understand your question?
It basically draws an invisible line in the direction you are looking and then finds the first entity/block hit. Although blocks are filtered out
The idea of a raytrace is that we get the player's eye and shoot a "ray" through it
And then it matches the intersection of that ray
There are a couple algorithms to optimize it
In this video I look at how the "traditional OLC" method of raycasting in various videos is in fact terrible, and look at the more intelligent DDA algorithm which can significantly (orders of magnitude) be more effective at determining ray length in tile or voxel based worlds.
Source: https://github.com/OneLoneCoder/Javidx9/blob/master/PixelGam...
oh the tetris guy
guys why my code https://pastecode.io/s/fu8t76cs is giving me this error https://paste.md-5.net/uxapivowak.apache
the database is connected and it is not null
Your Connection object is not null but it's failing to establish an actual connection. My mind goes immediately to your File not yet being created. You constructed it, but you didn't create it, so the file still doesn't exist
I also don't know how Kotlin does this, if it just calls toString() or what, but I don't know if jdbc:sqlite:$file is correct either
If it just toString()s it, it's probably fine? Might still want to double check it though. Might need to use the absolute path instead
But it exist
i use this code for all my plugins, this is first time using it on kotlin so thats weird
Right, so you've changed something. Things that work in Java might not work in Kotlin. Java most definitely doesn't have the $object syntax, so double check what that actually results in
Your Connection is not null. Your NPE would have been much earlier in the stack if it were
it prints this
i have this on java, but is literally the same
When it comes to SQLite the connection string is the file path
tried the absolute path ?
yea, is the same output
"java.lang.NullPointerException: null" doesnt help me lol
something is null
ye
i used println in everything and nothing is null
?paste the error then
createTable actually
i cant paste my code on this web for some reason
uses smth else like https://pastes.dev
that code gives me this error:
https://pastes.dev/eOoh5GFqvL
does the same happen using getConnection("jdbc:sqlite:${file.absolutePathString}")
i think thats a thing on file i dont remember exactly
let me try
thats weird because that code works well on java
first try on kotlin and it is giving me issues lol
tried but nope, the same error
does the error still happen after that?
im so confused how that error is even happening tbh
me too
searching it for like 2 hours
yea two hours damn
somehow the sql strng isnull
meanwhile, me with intellij open for 16 hours a day
wait i made it work
ive delayed the createTable thing
for like 3 seconds
and it worked
what the fuck
i have a feeling the init is calling before variables are getting init'd maybe
I did consider maybe that your statement was null too, but I don't know kotlin enough to know that init() isn't equivalent to an init block
after two hours
Or maybe it is equivalent to an init block :p I didn't think that the position of the init block mattered if it wasn't static
Your queries should definitely be static constants by the way, I don't know if Kotlin has an equivalent
companion object
yea companion object
but why static
i just use them there
Because they don't change and don't belong to the class instance
They should be private, static, and final
in kotlin that would be a private val in a companion object
mmm
Yeah of course. How could I be so silly
just cant believe ur so silly
kotlin is silly
might need to go and play with the huskies to remove it
i mean kotlin is cool
but i learned one thing today
the same code is different in kotlin and in java
yah
🤦♂️
and dont trust init
init has its place
Guys, help me, I can't understand why my message when I click on the block is written twice
check if the hand if the HAND
put this if(event.getHand()==EquipmentSlot.OFF_HAND) return
lol, saw you have to transition to Java brain in real time
conventions when
do you have any specific trick you use to relight chunks out of curiosity
I'm about to blind try one
it's just annoying because this is a shaded library and because maven is shit I have to do a ton of stuff to do one try
haha im still learning kotlin
And when I gave him the code I said, that's right, that's Java.
starlight hehe
how can i put like to the j the opening of a gui?
you mean the key?
the j?
if you mean the key you cant
You are my hero, thank you
Well if the player has something like offhanding bound to J, you can
nope don't think that worked
np
starlight deprecate
moonrise still uses it
i swear it reimpld it
under the same name tho
it only keeps existing because moonrise kinda depends on it
but it doesn't really have a reason to exist otherwise
how get and set face from block in 1.16.5
in 1.20 how i see exists getFacing
but
not in 1.16.5
The Limbo auth and limboapi's file is extracted but not working
im directly connect to lobby and drakness is there and it is not disappering
can a interface have fields?
bc it looks to me rn that if i have a field that i more or less need in every implementation needs to either be in every implementation, or i need to have another class extending the interface to contain that field
no
someone can say why triumph api not work? https://paste.md-5.net/falucuhiyo.xml
(gui api)
Those are called abstract classes :p
I renamed a mob with livingEntity.customName(...) but it shows up in the console when it dies. How can i encounter this so it has a name visible over his head without it being mentioned in the console.
visually there are no errors, but when compiling...
so show the errors?
ah.
btw if a superclass has a field that's <something>, can you change that in the extending classes to a ? extends something ?
Not sure I understand
field Collection
extend
field List
You would have to make it a generic or something, or cast when using it
...why do final fields in abstract classes require instantiation?
well yea but abstract classes cant be instantiated
hm completely different problem now
my abstract class has a reference to 'World world', how do i pass it a consumer that makes use of that variable? is it possible without usinr reflection?
an abstract class can have a constructor
I'm aware an implementing class would have access to 'world', but the consumer does not necessarily originate from one of those
what?
abstract class Shape {
World world;
Consumer<Particle> consumer;
}
//elsewhere
//How to access world?
new Line(locationList, particle -> {world.renderParticle(particle, location, 1);});
so your Line class has a constructor that takes a List and a Consumer
so make a getter or something?
or your Shape class can
you saying consumers can take tuples?
A Consumer can take literally anything you want, as long as it's a valid type
I'm so confused
Or you can use something like a BiConsumer if you need two things lol
or just make an interface
That too. Nothing stopping you from making your own functional interface
yea that runs back into the same problem
is the only workaround a getter for the stored world reference or a biconsumer that also takes world?
wait
\o
What is the name of the library that adds "official" annotations for nullable and such ?
There are many, but Bukkit uses JetBrains Annotations
not entirely sure what you mean by official?
jspecify and jetbrains are the popular ones
Still not "official" but a collaborative effort to make a standard
Aaah I see ty
I didn't really look much at this besides knowing it exists before
very relevant xkcd
Shape shape = new Line(a, b, location ->
{world.renderParticle(this.getParticle(), location, 1);}
would the 'this' here refer to the class its called from or to Shape
the caller
howd you use getters in consumers at construction time, then?
just make everything part of the consumer feels wrong
I'm so confused as to what you're actually trying to achieve
allow manipulation of how something is rendered without having to write a completely new class
Then pass in the shape instance if you really need it?
oh
hm
yea that could work
if i give the shape a getter for the locations and particle
feels very circular tho
Just make an abstract method for all of that?
Just override that in Line?
ok whats going on here lol
abstract class
? extends shape gives the same error
public abstract Shape
ah
public abstract Shape got me thinkin like
the shape do be abstract
Does Someone Know How to Set up the Nodes Plugin its a map like this
Are you making a plugin
no i am trying to set up a plugin it exists but i dont know how to set it
for my server
Then this is the wrong channel
oh where do we send it
Ask in #help-server
okay thanks
And do ask a better question
Hello! I've been testing my plugin on 1.21.4 and noticed that the bossbar it adds just disappears after a player leaves the server and rejoins, has anyone experienced this before or knows what could potentially cause this?
How did you add the bossbar
Great question, checking now
When a player joins, I call a method "ShowEnergyBar" which takes some values from the save files and displays the bar for them, showing their energy, which is a part of my plugin
?paste
What this does is takes the list of players that should have a bossbar displayed, checks if its enabled in the config, then displays the energy and the progress out of the max energy they can have
Looks like this guy had the same problem
But didn't seem like he solved it?
They got an answer
Yeah but I don't understand what that answer means-
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
System.out.println("sex");
if (isSkillpunkteUtilitySet(player)) {
player.setWalkSpeed(1.51f);
System.out.println("DEBUG: Die Skillpunkte::utility.1::" + player.getUniqueId().toString() + " Variable ist gesetzt für " + player.getName());
} else {
player.setWalkSpeed(0.2f);
System.out.println("DEBUG: Die Skillpunkte::utility.1::" + player.getUniqueId().toString() + " Variable ist NICHT gesetzt für " + player.getName());
}
}
why is no println triggered? like nothing happens, what did i do wrong?
Did you forget to register the listener
println("sex")
i can explain that

@Override
public void onEnable() {
PluginManager pluginManager = getServer().getPluginManager();
pluginManager.registerEvents(new abfrage(), this); }
i did
i crap myself
where is my plugin
i did something wrong this time there is no plugin.yml from the beginning
why is it still not existing?
resources to be packaged in the jar go in the resources directory next to the java sources directory
Why is the screenshot so terrible
because my parents dont love me
like it's just what feels like 12x56px
^
yeah i patched that
src/main/resources
So did you clean build
And you copied the jar?
the jar rebuilds automatically in my plugin folder
i can redo it rn wait
maybe i am dumb
I sure hope you're using a copy task
rad and their copy jar task 
can server 1.16.1 running in 1.17?
of course
It requires Java 17 doesn't it?
Or was that 1.18?
I always forget
Anyways the answer is yes. Java is largely forwards compatible, so unless you have a plugin doing something very stupid, you should be fine
You can't have a plugin compiled with Java 17 run on a server that's running Java 8 (or anything below 17, that is), if that's what you're asking
The server has to be running at least the version of Java your plugin is compiled against
so this is why i ask 1.16 server can be in 17 java?
the answer is yes. Java is largely forwards compatible
Copy tasks my beloved
<repositories>
<repository>
<id>papermc-repo</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
<id>skript-releases</id>
<name>Skript Repository</name>
<url>https://repo.skriptlang.org/releases</url>
</repository>
<repository>
<id>destroystokyo-repo</id>
<url>https://repo.destroystokyo.com/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.21.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.SkriptLang</groupId>
<artifactId>Skript</artifactId>
<version>2.8.5</version>
<scope>provided</scope>
</dependency>
</dependencies>
i tried to add the skript plugin but its still not found in the plugin, even tho i reloaded maven
in pom.xml is no error but i cant import it
You showed a project with gradle earlier-
Sounds like a you issue and somebody not using a copy task
guys, is it possible to send the client like 3 resource packs on join and toggle between them while they are on
the fuck is a copy task
A gradle task that copies your jar
You can't just toggle them
You can remove them sure
does that mean they will have to redownload?
okay, so you only have to download once right
This feels like an XY problem 
If you provide the right hash and UUID, yes
if you have a better way to make 5 different worlds appear in 5 different ways feel free to tell me
25 worlds? 
I mean it depends on what you want
I want different worlds to use different resource packs
if there is a way to do that without resource packs id be glad to hear it
Sounds reasonable. This is correct ^
No redownload if the hashes match. Will just apply from a local cache. Packs are downloaded to .minecraft/server-resource-packs
No choco
It's downloads nowadays
How dare you not know the entire .mc dir by heart and call yourself a real plugin dev smh smh
How firework particle custom color
Can we not even form proper sentences now
But iirc there's some dust colour option
fun spawnFireworks(location: Location, amount: Int, colour: Color) {
val firework = location.world.spawnEntity(location, EntityType.FIREWORK) as Firework
val meta = firework.fireworkMeta
meta.power = 0
meta.addEffect(FireworkEffect.builder().withColor(colour).flicker(true).build())
firework.fireworkMeta = meta
firework.detonate()
for (i in 0 until amount) {
val firework2 = location.world.spawnEntity(location, EntityType.FIREWORK) as Firework
firework2.fireworkMeta = meta
}
}
``` Found this old piece of code of mine
ew kotlin?
This is from 2.5 years ago okay
is it possible to tell when the client goes out of that big red resource pack loading screen thingy
ResourcePackStatusEvent or something similar
declaration: package: org.bukkit.event.player, class: PlayerResourcePackStatusEvent, enum: Status
declaration: package: org.bukkit.event.player, class: PlayerResourcePackStatusEvent
ah yea that was the name
You won't get much help with random nms methods here
Consider not breaking the lighting in the first place 🧠 ||\s||
sure, just as soon as the api lets me edit a few million blocks without it lagging out
Work distro time
I don't want to do it over a 3 day period either
Make AI do it, job done!
it's working really well with the data palette
pretty much instant as far as I can tell
just has the one problem with the lighting
not yet, been trying to follow the scarce docs from other people on this thus far but I'm all out and it clearly hasn't worked
Does a chunk snapshot contain lighting data?
You need to replace blocks fast, but the lighting could be performed slower
yeah I'm fine with that compromise
I don't even need the lighting to instantly work everywhere
but I would like it to work at some point
I've not messed with lighting so can't help you there
you'd think there would be a method for this
ngl the thought of just filling it with lamps and removing them has crossed my mind
I guess you could spawn a light every x blocks and delete it
yeah that was what I was thinking lol
Not sure how far they reach
I should probably just go to bed, I can barely keep my eyes open
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>at.dnalor.skilltree</groupId>
<artifactId>untitled1</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>untitled1</name>
<properties>
<java.version>21</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<defaultGoal>clean package</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>papermc-repo</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
<id>skript-releases</id>
<name>Skript Repository</name>
<url>https://repo.skriptlang.org/releases</url>
</repository>
<repository>
<id>destroystokyo-repo</id>
<url>https://repo.destroystokyo.com/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.21.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.SkriptLang</groupId>
<artifactId>Skript</artifactId>
<version>2.8.5</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
why can i still not import skript plugin?
did your maven reload?
no like if you edit the pom you need to hit that maven update symbol so it actually updates
thats how i do it


