#help-development
1 messages · Page 774 of 1
right click with customItem
You could easily store that in pdc
^^
ok
If you don’t need it when they are offline
um
what about the path ? where should i save it
hmmm
?morepdc
You can create custom persistent data types on your own, or use one of the many libraries available which have implemented those which match your needs. Learn about more persistent data types here: https://www.spigotmc.org/threads/more-persistent-data-types-collections-maps-and-arrays-for-pdc.520677/
thats big brain
Can be saved to items chunks player etc etc
ye
i guess the chats now free so i can ask again, has anyone got an idea why my
player.setPlayerListHeader("TestTest2");
Does absolutely nothing?
Its registered in an event that i registered and its an onJoin event
Try delaying it a tick
how to do that?
BukkitRunnable
run a new task on the scheduler
You only do scheduling
okay then someone has to explain how bukkit runables work. because i havent scheduled tasks yet
Bukkit runnables are fun, so fun I even implemented my own ones once
}.runTaskLater(plugin, 20L * 30L /*<-- the delay */);
is 20L+30L the delay and what means L
20L means 20 ticks in type long iirc
L is a cast for long
okay so this would do 30seconds
Yea
typo
yes
Yes, 20*30 is indeed 30 seconds in ticks
30 seconds
why does it throw Field lengh out of bounds when I join
so this would do the trick??
new BukkitRunnable() {
@Override
public void run() {
player.setPlayerListHeader("TestTest2");
}
}.runTaskLater(plugin, 20L * 1L /*<-- the delay */);
you can do just runTask iirc
Does it delay by a tick?
Yes
I want to assume there is no current api for exploring the NBT of a chunk that isn't NMS? (Got my structure discorver working using an NBT library but want to see if there is a way to do it thru spigot itself.
runTask will run it on the next tick
That's cool
and how do i get the plugin parameter is it just this.plugin or what
that's your plugin instance, normally you pass it from your listeners' instantiation point
I thought runTask was there to run code on the main thread from a seperate thread in case it's needed, like in forge
Unless it’s the pdc part or in any of the methods
No
Why rho
welp thats how i did it
public class createTablist {
public static void createBoard(Player player) {
new BukkitRunnable() {
@Override
public void run() {
player.setPlayerListHeader("TestTest2");
}
}.runTaskLater(plugin, 20L * 30L);
}
}
30 seconds is way too long, next tick is just fine
i still dont understand how to shade the shit in
Why is the class in camelCase
ok
1L = 1 tick
ok
Ah, so I will just have to use what I am doing now to read the structures from the MCA files on first load with my plugin. (After first load I can easily use the event to get the data for newly generated structures)
fixed it
well yea that's what the scheduler is also used for
how do i get the plugin from the listener though?
public class PlayerChangedEvent implements Listener {
@EventHandler
public void PlayerChangedWorld(PlayerChangedWorldEvent event) {
Player player = event.getPlayer();
String world = player.getWorld().getName();
if(world.equals("lobby")) {
createScoreboard.createLobbyBoard(player);
} else {
createScoreboard.createDefaultBoard(player);
}
createTablist.createBoard(event.getPlayer(), this);
}```
this is marked red
Do we have an article on dependency injection or whatever it was called
?di
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
ok thanks 👍
qq if i want the death message to show the 'killed with magic' which order do i call player.damage and player.setLastDamageCause?
Yeah good luck with that
oy
how do i shade this fucking thing 😭
Calling .damage is what kills them
But it’ll also set their last damage cause
You’d have to use the death event in combination
mhh still not showing the tablist header
View is?
Hey, so I'm getting really close to finishing my clan plugin, i'm working on stats now right. So I have a /global clans - which display all the clans from 1st place to last.
how should I go about calculating which clan has the most kills, what clan is the richest, which clan is the oldest, how many members, and how many deaths, to give the order from 1st to last ?
@worldly ingot @solar musk
I mean, who the fuck knows wat method they are calling
im streaming all players near it - which is view, for particle effects - and filter by distanceSquared to the center, then use .toList()
It just causes the message to be “X died”
We need api to damage entities with a specific cause
yeah toList's immutable pretty sure
bleh. ill worry about this part tmrw then
.toList is immutable use Collect
I think a damage api is being worked on
question. If i cache a player object twice its different concerning == but equal concerning equals, correct?
how can i shade all my dependencies in maven
no
do i have to compare uuid?
the player instance remains the same
no like
i have a 'Player cause' and a List<Player> nearby
wouldnt that mean two player objects at different memory locations
no
Player "Moterius" would have the same instances both as the value of cause and in the list
A player object will be the same the entire time they are online
A new one will be made if they relog
I'd still compare using .equals
yea this just looks wrong lol
just use .equals yea
welp
thx for the help ig, and ill deal with the death thing tomorrow
wait 1.0 damage was 1/2 heart right?
yes
How can I set the Entity Spawn reason?
Okay
Want an opinion. Would it be better to save the structure data I extract / collect ( will be used later) in a database, external file or the Persistent Data for the world that the structure is in? Since I don't want to have to discover the structures every startup.
Probably a database
make an interface
Depends how big the data is
and make all 3 implementations
Well, the data per structure is the bounding box, and its structure type.
It could also be better just to discover them every server start. But that could take a very long time depending on the size of the world.
does this also work with players offhands?
theres a huge bug with ExcellentCrates players can put the key in their offhand i'm trying to fix it
It should work for both, yeah
i don't see why offhand isnt blocked here then
this is actually happening with both ExcellentCrates and CrazyCrates
No they put the key in their offhand they can open the crate as many times as they want
That’s odd
Should be unrelated to those options tho, it just involves decreasing the stack size of the item
If i wanna update the tablist every second how to do that exactly, i tried this but its not working:
BukkitScheduler scheduler = getServer().getScheduler();
scheduler.scheduleSyncRepeatingTask(this, new Runnable() {
@Override
public void run() {
for(Player player : Bukkit.getServer().getOnlinePlayers()) {
createTablist.createBoard(player, LaserServerManager.this);
}
}
}, 0L, 20L);
That should work
@Override
public void onEnable() {
getServer().getPluginManager().registerEvents(new ServerPingListener(), this);
getServer().getPluginManager().registerEvents(new PlayerChangedEvent(this), this);
getServer().getPluginManager().registerEvents(new PlayerJoin(), this);
getServer().getPluginManager().registerEvents(new PlayerLeave(), this);
getServer().getPluginManager().registerEvents(new PlayerMove(), this);
getCommand("lobby").setExecutor(new lobby());
getCommand("maintenance").setExecutor(new maintenance());
BukkitScheduler scheduler = getServer().getScheduler();
scheduler.scheduleSyncRepeatingTask(this, new Runnable() {
@Override
public void run() {
for(Player player : Bukkit.getServer().getOnlinePlayers()) {
createTablist.createBoard(player, LaserServerManager.this);
}
}
}, 0L, 20L);
getLogger().info("registered commands and events");
}```
how can you prevent players from doing stuff in a chunk if they don't have perms like breaking blocks
check their coords and then cancel the breaking block event
just create a breaking block event and check the condititons
You’ll have to cancel various events
one of them being this
BlockBreakEvent
And you’ll need some way to mark who has perms in said chunk
Yes but the code inside it runs every second
If a sysout inside it works that means it is running, which means there is an issue with whatever code you have in it
well the code is working
because its also triggered by the onPlayer join event and shows it correctly
We’d need to see the code for createTablist.createBoard then
When an ItemStack is let's say passed into another inventory, is another ItemStack object created?
ItemStacks are kinda weird, so it depends
Then excluding the 1.14+ PersistentDataContainer, is there another way to mark an item for it to have a unique identifier?
raw NBT
You could use NbtAPI
Which is not runtime-dependent
Basically pdc but not
Then how does the api do it?
What api?
well Bukkit and NBTAPI just use NMS
Yeah
I never knew how to interact with raw nbt using spigot
What’s people up to?
You don’t
you can't with spigot
too add neither should spigot
Well that's not an issue
No
But will it stay after the server restarts?
did you just ask how to do something and then say no to the solution?
NBT is exactly that
use NBTApi
I said no to the api, how did you confuse my response?
Wait, so this is an external api, a?
yes
Then I won't use it
why not
If i use nms can ViaVersion work with that and translate them to the right packets for the version?
why be so combative against a genuinely good tool
Yes
I'm just asking whether runtime changes to the nms nbt will be saved or is there like a weird system involved?
They’ll be saved
Experience
I can be illogical
But it's because I never actually use the APIs
Sounds like ur making things harder for yourself
Either cuz they have no documentation, don't work or I just find it easier to do it by hand
I'm just letting you know ahead of time if you do go with NMS you do know you will need a module for every single version you plan to support
Or a bunch of reflection
Why is that?
this is no small task with obfuscated mappings
Reflections rule.
because NMS is version dependent
Question Coll1234567, since you have started working on the structure API how hard is it to actually add new stuff like that to Bukkit / Craftbukkit. I know you need PR in both Bukkit and Craftbukkit to do it.
I know
biggest hurdle is probably signing the CLA 
I suppose you could also use 1 module and go pure reflection
Reflections aren't that slow and you can make them really efficient if used correctly
beyond that, well, its an open source project maintained by someone not paid to do so that is a terrible large project
half of contributing is being patient
reflection is actually pretty fast especially if you use MethodHandles. Well reflection under the hood uses method handles anyways now iirc
MethodHandles 🙏
I just cache em

Yeah the main thing is just waiting on PRs
such as Inventory PR
I don't use that stuff
Once you sign the CLA and have a decent workflow setup making the PRs is easy
you should check out MethodHandles they are fast as fuck. iirc they can be pretty much just as fast as direct calls
JIT will just optimize it anyway
Yo whaat
If it gets called enough
true
What is that?
Some static bongers?
reflection is reimplemented with fast method handles
Have that already from quite a few years ago (back when I started college), when I made a PR that apparently broke stuff I didn't test, and honestly, I am lucky I can even touch spigot to make PR considering how big of an asshole I was. But 4 or more years with College and Working seem to have straightened me out.
and then jit is gucci also
Inventories 😈 . sorry I can't help myself around my bestest friend
This was back when Spigot didn't have a discord and only had IRC as well.

Well I was looking through the code of reflections and didn't find a MethodHandles call
Reflectasm is good too
my fav
hey slave are you going to stay at a normal blood alcohol level this weekend
it's reimplemented in java 18 and higher
sorry ?
thank me later :)
typo ?
you have much work to attend to this weekend my friend
paper is going to work you to the bone

I see
Then I won't thank you now, as instructed
I feel like people also overlook the fact that before that reflection would compile to bytecode once you called it a few times?
but yea I'll be at normal blood alcohol levels
👀
yeah indeed, jit is amazing
What the heck is paper doing this weekend
paper planes maybe?
yes!!
Anti-folia? Moves every single thing possible onto 1 thread
removes paper plugins
So bukkit?
never
finally main thread chat
what is a paper plugin
the thing that coll has been thinking about for like
ohio software
the past couple weeks
Shut
Except netty what else is done async?
I was reminded plugins can be disabled at runtime
chat

Connection handling?
some other stuff also idr
World generation
a shit load of stuff is offloaded yea
If a plugin is disabled what they heck am I supposed to do
Well it's partially netty, right?
Unregister it’s stuff
hey how do you use vault and permissionsex and stuff in maven? how to import it from local disk as a jar?
Isn't the sync-chunk-write or smthg true by default?
Bukkit.suffer() new method
You can use mvn install-file
@eternal night actually curious though what is this paper plugin stuff? Did paper make their own plugin loader or something
Yeah they did
VaultAPI has a maven repo
yea, it sits at a point where it can mutate registries
Or just a system depend scope which everyone does
and has tighter classloader restrictions
It’s also good at yelling about circular dependencies
How do I always see Sex whenever sb mentions that
Indeed
no 🥲
me when config phase
that? https://mvnrepository.com/artifact/net.milkbowl.vault where do i look?
common mojang moment
Technically I could just remove freezing and register/unregister stuff as needed
I just put it as a dependeny in pom.xml?
Also use luckperms. Find the maven repository
But like… 
how about pex, permissionsex?
idk, rn it is mostly waiting on what stunt mojang pulls in 1.23
given config phase
Eeeee
they are certainly working on something
That’s what I’m trying to prepare for
Permissionsex
Also I want custom biome api :(
Well
does PermissionsEx have a repository
Thing is like, what you setup now can just be fucked down the line 
how can I get the connection of a player with nms to send packets since PlayerConnection connection = ((CraftPlayer)player).getHandle().playerconnection doesnt exist in 1.20.1
xD
True
like, if they allow unfreezing and mutating registries down the line (does config phase kinda suggest that ? maybe) you don't need to hook at bootstrap
nvm found it
and all your shit is useless
A powerful permissions plugin for Minecraft. Contribute to PEXPlugins/PermissionsEx development by creating an account on GitHub.
this is why mojang needs to release the source code and do all of their work on a branch on github!
Reflections. Find a declared field with that type
I mean xD
given how complete server source code recreations are these days
Men please. Really. Use LuckPerms
e.g. papermc/mache
For now we rely on old faithful
public static void unfreezeRegistry(Registry<?> registry) {
try {
Field intrusiveHolderCache = getField(MappedRegistry.class, Map.class, 5);
intrusiveHolderCache.set(registry, new HashMap<>());
Field frozen = getField(MappedRegistry.class, boolean.class, 0);
frozen.set(registry, false);
} catch (ReflectiveOperationException e) {
e.printStackTrace();
}
}```

mmm this for getting code from Snapshots
interesting
someone link this guy the luckyperms plugin thats just a fork of pex
What is this? i get that when i try to include vault api in maven pom.xml:
😭 only if
its sadness
xD
would reduce our update time a lot to have most patches applied when rcs roll around
spigot snapshot branch drops when?
Paper contributes to spigot when?
You know that's not the reason
meh we have plently people that have yet to sign it and do not seem willing too
I don't agree with them
I don't mind
Can I teleport an armor stand with a falling block as a passenger or do I have to abort and respawn it instead?
but that is a rather personal decision
Yet the people that have signed the cla don't contribute either
👀
Ehhh
I may be guilty of this :>
xd
But of a hiatus in there
I'm pretty sure teleportation ejects all passangers
@river oracle u promised to teach my how to pr, gonna enjoy once that takes place
just lmk when
He did
PR comments true
Check the source code
So I will run stand.eject() and then teleport
I think it does that automatically
infact, a new spigot PR of mine is floating the stash way this very minute
which
now to write ages of javadocs
I hate writing javadocs
its my fav
Tests: Passed
Checkstyle: Passed
Hotel: Trivago
mostly to then smugly point out "read the docs" when people have obvious questions
pretty sure I need someone to check the javadocs for my PRs they are well rough to say the least
Y2k am i gonna end up in vc untill 5am again today
Okey, but do I have to add passenger on armor stand after eject?
RIP
this is dry but fkn laughed at this lol
Idk he’s kinda smelly
@worldly ingot ban this orange guy for slander
Last time i checked rip does not answer a yes or no question, but idk if thats changed
I read it is I am
Rip
to answer your question though absolutely you are
Amazing
Can’t believe vcs are getting used
we do chat sometimes you must join in its quite fun!
Im being held at gun point
daily dev night
once me and smile finishes some business we gonna hop on vc again
wait I was reminded I need to look at the inventory events for my PR
coll u should join
Conclube has businesss with the smiley guy 🫢
My dog is attacking her bed barking
Probably discussing a takeover of the server
But how do I remove a falling block as a passenger on an armor stand, that's why remove doesn't seem to work, should I run eject, that's why I think it didn't work either
Smh orange people always plotting
yep, we are plotting to take over sponge, minestom, paper and spigot with this new php server software
Entity#remove will work
Ah yes the best language
Embed me into it
How does one embed a human into php
Every carefully
I guess you could probably serialize a human as a giant byte array
I will run /help
How many bytes is the human genome
3
And how long until Marco puts it in a plugin
2
hm, having something strange happen while trying to setup my dev env to work on craftbukkit.
java -jar BuildTools.jar --dev
what is PacketPlayOutPlayerInfo in nms 1.20
Oof it’s a lot, even at the lowest it’s like 750mb
ClientboundPlayerInfoUpdatePacket
And before that it was
ClientboundPlayerInfoPacket
Do it

He does kill children though
Yeah, he a little bad for that
I would have assumed it followed a pattern but apprently it doesnt so thats why I gotta ask you whats EnumPlayerInfoAction in 1.20 NMS
I'll just send you my class for that
?mappings
Compare different mappings with this website: https://mappings.cephx.dev
Very useful for checking names
I'm trying to transfer chunks to a line in Minecraft. This gui will be a main chunk and surrounding chunks will be visible. I'm making a mathematical mistake on the 63rd line. Can you help me?
Yo wtf is "~"
bit negation
https://mappings.cephx.dev/1.20.1/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket$Action.html but why doesnt this have a REMOVE_PLAYER anymore then
version: 1.20.1, hash: c1a7cd8c7d
~0100 == 1011
Ah, okay
complement :>
You are mad handsome

Take me.
@young knoll look at top comment would this be considered breaking?
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/926/overview. Its an ideal change, but ig technically it could break code given someone used the event in a non intended fashion previously
something something event constructors are not public API something something
I tried to do a LFSR in java the other day
His java journey
Didn’t succeed
Does anyone have any knowledge about this?
fair wasn't sure
thx
I mean, its a grey area
but I would switch it yea
you should not be calling those yourself, if you do it live with the consequences
Yeah we tend to try to keep them the same
We have no greater idea of what doesn't work
like switch it back or you mean like keep as I did
¯_(ツ)_/¯
ig regardless I'll just wait for slime to comment
Usually we deprecate old constructors but keep them
Lol
might be the "nicest" solution
instant deprecate(forRemoval=true) on it too (the then blind cast old one)
seems redundant especially if a cast is required anyways it'd just change the palce it'd blow up at xD
Well
Mfo is coding The Bible

I suppose you could have the old one with a preconditions check
At least that blows up nicely
Isn’t it already
erm not the interface stuff iirc
idk how tf to use it
though ig that's a good reason to learn
do we?
i mean just a nice brig exposure would be nice
:>
there's never too much bytecode manipulation
🥲
Yeah commodore has been around a while
prob since the IDs being absolutely destroyed
Hm Thinking about how to do this extra work to add getting what structures exist in a chunk since MC does this annoying thing where structures have a start, then a list of structure pieces that can span over multiple chunks. So there is no "good" way to check for a structure in a chunk.
?paste
Do you wanna just represent base and empty chunks in a gui?
GuiExcption is a specific exception from the dev of your Gui lib. Ask the dev or rather ensure that you dont pass -1 as a slot.
yes i want
.
what is solving of problem
And is the base chunk always in the middle?
usually but changeable in config
Then can't you just
Check the line where you pass -1 to your GUI and double check how you produce this slot id
Iterate through the inventory items by x and y with checking their respective chunks like: startX + x
I am already doing this but there is a mathematical error somewhere can you review my code
But you do "-" instead
And you do
~offSet
Instead of
-offSet
This is greatly different
https://paste.md-5.net/uyuxelebun.java my greatest scheduler invention
Spigot doesn't have
A way to invoke a method each tick synchronously
I would need ByteBuddy for that
What are you doing bitwise complements for here?
/\
.
Invoke a method each tick synchronously
Is that not just a respecting task with a period of 1
~ I really misunderstood the function of this, so I changed the code as follows and got closer to the solution.
BukkitScheduler#runTaskTimer(Runnable, delay, period)
That would defeat the purpose of creating your own scheduler impl
I guess
Yeaaah
what is '~' on java
Dunno
are you forking Bukkit?
if you're going to reimplment so much you might as well lol
How am I supposed to interpret this
the ultimate experience, reimplment the entire server
it got more holes
Whatchu meaaan
Belonging to, derived from, or associated with a divine power; sacred.
Regarded with veneration or specified for a religious purpose.
Living or undertaken with highly moral or spiritual purpose; saintly.
Common meanings for holy
I do understand that md5 is an evil deity
I reimplemented something that’s available on spigot and paper using something that’s only available on paper
Stonks?
So my version is holier
But let's not exaggerate
Stonks.
Explain
no thanks im good
Stinks
Invalid opinion, next
Would switch(packet.getClass().getSimpleName()) be the fastest way to check whether it's a certain packet?
We talking 4+ cases
@twin venture
Show your
thats a weird town
Profile classes
are you watching?
as you can see the Profile class
Concurrent?
yes
So it's not concurrent
the profiles map is
The current situation is like this: red zone is enemy territory
private final ConcurrentHashMap<UUID, SWUser> profiles;
But you use both in an async scenario
oh I see thats how it looks like
just split into sectors
you doing RTS gamemode?
so i take that is wrong?
Yeah
yeah
But that shouldn't cause only one first player's data to be loaded
Cuz you mean
It's for 2 different Players right?
ofc , each player will have his own profile
not only 2
for unlimited amount of player's xD
alr
But on the command
It did
yes
The user is null
alright
And how do you get it later on?
getProfile(UUID uuid);
Show where it's invoked
Wait
You use a HashMap as well?
Man use a ConcurrentHashMap
You can use ConcurrentHashMap.newKeySet() to get a concurrent set
I think it was like PlatformDependant.newConcurrentSet
if u want
let me try the first one
It'll work, yeah
Just make sure to use a different Map instance
It's an instance method
I think
Or maybe it was a static one?
Remove the "new"
no static
Just make it a Set
like that?
It probably won't fix the issue tho
tbh i don't use the Set anywhere
yeah i will debug it
[23:09:10 ERROR]: Could not pass event InventoryClickEvent to
java.lang.NullPointerException: Cannot invoke "me.dev.mskywars.core.users.SWUser.player()" because "user" is null
it works for the first user .
You sure?
yes
bcz it send him and teleport him
so that mean the user is loaded correctly
but the problem come for the second user who joins
See for errors
?_?
The error is right in the console, I'mma go
i saw it ..
Y'all got enough live streams going on over there?
Not presently. I want to say there was an initiative to do this at some point? @young knoll?
but Player's have a PDC so long as they are online
I can set a PDC
You have to smh load offlineplayer then get the pdc
im pretty sure its mostly y2ks stream being watched
Myeah it’s on the list
What is he streaming
More inventory blasphemy?
item stuff i think
are you gonna join 🥰
Nah I'm doing some work atm

YESSSSSSSSSSSSSSS!?
ooo

@sterile axle GET IN HERE AND LOOK AT UR EX
"Plss give me mvp++"
@river oracle look also
what server version... do you GUYS USE!? (/s)
He’s actually updating it to 1.20
OooO
ayo
choco when were you going to tel us
Real answer, been interviewing all of October, offered on Monday, signed the contract Wednesday
Man made it past the 67 interviews
are you disappearing now
also what stuff are you working on
or is that nda
I mean I do have two full time jobs, so there's that
who is gonna do component PR
just like dont disappear from us
what
hes a hypixel dev
congrats
are you allowed to talk about what kinda of stuff you work on choco
are you just a general developer then
Minigame developer
skyblock isnt minigame sad
Not my department sorry :(
She's still there, but not sure
Revive Mega Walls plz and thanks.
smh
Yeah
now choco is gonna leave us
Tbf that’s not hypixel’s fault
he'll only pop in every few weeks
True, but everyone wants to be Hypixel so copiers go brrrr
Yeah I’ll be starting my skyblock plugin tomorrow
okay so coll
you live in canada
choco lives in canada
go and steal chocos computer and ip and steal hypixel
(in game)
ru allowed to disclose how many? :>
Interviews? Yeah probably. Just 5. Technically 6, but they had no questions, they just offered there
how did you do 5 i thought it was like 10
ahhh I see, congrats! :)
That’s still kinda ridiculous imo
@echo basalt is gonna be jelous of you now choco
And here I thought 3 interviews was pushing it
:(
3 interviews is pushing it
lmao
one thing I realized now that I'm a lot more experienced in making minigames
is that making minigames is fucking depressing
Oh?
I just don't enjoy it
Would simon still even be involved
I have been applying once every few months but they haven't been emailing me back
It cost them to educate u maybe
it costs them to educate any new hires
Dies anyone know where i get the .json file for mcp for a client?
is he canada
welp the hypercompetitive in me is starting to go bonkers
time to work
and build my portfolio even more
if choco did it so can I
good
ah hes a french one
They both were afaik
was it secretly choco under a different name
Question just started the switch ti IntelliJ idea and was wondedring iss gradle or maven better to use just opinions unless there the same
they both do pretty much similar things so its personal preference
Kk then maven it is thanks
well thats 3 for maven 0 for gradle maven it is thanks guys!
does it matter what order I put my attibutes for my plugin.yml like does name need to be first then verison etc?
hm m
thanks!
would
metricsDatabase
.createMetric("player-count")
.setField("count", 123)
.push();
be clean 
Oooh shiiii bStats 2
I could just make a bstats adapter
in inteliJ i have the minecraft plugin does it there a way to auto export it to jar or do I have to do that myself?
could you be kind enough to maybe show where that button is sorry very new programmer here or tell me
thank you
Right click the maven button to your right
both ways work
yeah i feel bad that im using hypixel skyblock as an inspiration
I prefer this one
lm ao
although I do want more of rpg mmo centered approach
ok
guess what I'm working on
the green trinagle just runs the command
without idle stuff
or the code not downloadws
hmm
ok thank you!
wait till u learn about double clicking ctrl
well I got everything I wanted and me plugin works which is awesome however how do I install more plugins on intetllij since the homepage I can not get back to like a idiot
Hello, does anyone know what event is triggered when a structure is saved by a structure block?
https://hub.spigotmc.org/javadocs/spigot/ cheeck here maybe
for spoigot idk ther est lol
I already looked at the doc and saw nothing
ctrl alt shift s
and go to plugins
ok thanks
but that brings up project structure
Don’t think there is an event for that
Anyone know how what a LongSet is used for in mojangs code? Investigating adding to the API to get structures that exist in a chunk, but other then starts (first part of a structure) eveything else is defined as references which are based somehow around logsets. (Probably to reference the chunk thaT the actual data is in but I haven't foudn where its used yet.)
Well this is part of the Structure data in the IChunkAccessor class. Its used in the structuresRefences field.
structuresRefences is a hashmap of Structure (The mojang class) to LongSet.
someone know why in this event the plugin broadcast the message on the third kill and not on the fifth
public void onPlayerDeath(PlayerDeathEvent e) {
Player victim = e.getEntity();
Player killer = victim.getKiller();
if (killer != null) {
UUID killerId = killer.getUniqueId();
int killCount = killCounts.getOrDefault(killerId, 0) + 1;
killCounts.put(killerId, killCount);
if (killCount == 5) {
double bountyValue = generateBountyValue();
setBountyValue(killerId, bountyValue);
String formattedBounty = formatBountyValue(bountyValue);
if (!bounties.containsKey(killerId)) {
Bukkit.broadcastMessage(Color("&eE' stata piazzata una taglia di &6&l" + formattedBounty + " &esu &c" + killer.getDisplayName() + "&e."));
}
killCounts.put(killerId, 0);
} else if (killCount > 5) {
killCounts.put(killerId, 0);
}
}
}```
debug your kill count 🤷♂️
how can i do it?
Print it out.
how do i disable picking items up through walls
EntityPickupItemEvent(LivingEntity entity, Item item, int remaining)
maybe this
i take it back its when something is picked up
wait so is that fake
what is dis
What do you mean by this
you can pick items up through corners
and thin walls
You'd need to cancel the entity pickup item event and handle it your self
they intend to update it but can't seem to beat LP
i already have the event
right now i am cancelling it if they aren't directly on the block
it works
Okay
but its just annoying since you expect to pick it up from further
Then check further and check blocks around the item or the player
eh, LP. I love pex, it still works and is highly customizable
xD
Check the position of the item, and the player and the blocks around it
If everything is how you want it, then add the item to their inventory
the crash exploit still works too
it's glorious
I never used in-game commands though
But now i wonder if I set the player rank by code is that the same as if I did it with commands?
@slender elbow 🤔
"PaperSpigot ... Dang it ... I think @zml2008 said something about PaperSpigot either being not supported or badly programmed somehow."
Luckily I'm on Spigot
i'm no longer a fan of Pex, it's outdated, last time I used it was 4 years ago.
Making everything data driven is so much work
just ask chatgpt
and if you keep reading it one user assesses it affects spigot as well as paper(spigot)
why even use pex is it even still updated
nope
yeah no pex is dead
of course you are free to use whatever permission plugin you want, none either, but for me and for many other thousands of servers pex lacks some arguably fundamental mechanics a permission plugin should provide that lp does
a LongSet is just a set of longs. there is nothing special about it specific to minecraft. its just a general data type
like IntSet, ShortSet, CharSet, FloatSet, DoubleSet
and the 4000 other fastutil collection types
Turns out MC is using it to hold a ChunkPos encoded as a single Long. (Why they are using a LongSet to store a single Long who knows)
Blasphemy
i love pex i love pex i love pex

Hi spexx
luckperms is much more customizable
it has so much weight support
like i can link 6 roles to eachother
all having permissions from eachother
and the editor is insanely nice
many plugin add there custom items. so it can be obtain by /give <P> PluginName:ItemName
how can I make this?
I checked google. but didn't found any solution
also I forgot the plugin name so can't check its src
@grand flint if I register own give command. its going to overwrite the orginal command right?
no you dont need to do that
there is another way
i forgot though
cuz u can do it w biomes and sounds using texturepacks and datapacks
just wait for someone else to reply
for spigot, i have listener class that is only used when halted=true, would it make more sense to make every listener in that class check if halted=true or only register the class when halted=true, and then unregister when it equals false
Using the Chat Component API for the first time, and I'm a bit confused.
ComponentBuilder builder = new ComponentBuilder("[Plotty]").color(ChatColor.DARK_BLUE)
.append("Your Plots:").color(ChatColor.BLUE)
.append("\n");
TextComponent plotId = new TextComponent(Integer.toString(plot.id));
plotId.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/plot tp " + plot.id));
plotId.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text(ChatColor.AQUA + "Click to teleport\nto plot " + plot.id)));
builder.append(plotId)
.append(" [x:").color(ChatColor.BLUE);
In the above example, isn't the hover/click event only supposed to apply to plotId? Why does it carry on to the [x: string and onwards?
one would think so...
except the default is to copy the style of the previously appended component for whatever reason
you have to add a second arugment when you append " [x: ", FormatRetention.NONE or smth
Ah, well that's not documented on the wiki page
I see now. Much appreciated.
I do see the usefulness (don't have to keep re-applying the same colour for different snippets) but it's a bit unintuitive.
well components are a tree. so ideally you wouldn't repeat the same color like that, you would color the parent component and then that color would be applied to all the children when rendered





