#help-development
1 messages · Page 1344 of 1
when you send a packet it goes through Netty, it isnt buffered til the next tick
the 20tps 'constraint' (cant think of a better word) is tied to game logic, like entity movements and block updates, which followed scheduled movement, the transport layer (netty) is async and not tick gated.
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
Not an intelliJ issue, this is an issue with your Extension
which plugin are oyu using
MC Development
just redownload
lmfao
no i just realized im somehow running 2024.2-1.8.6 but i also have minecraft 26.2 which is weird
?howold 1.8.6
Minecraft 1.8.6 is 10 years, 11 months old.
smh
Is there a specific event being called when ever a block breaks no matter if breaked by the player/explosion/etc..
Not in Spigot.
BlockDestroyEvent if Paper
In Spgiot, I imagine you need to check: BlockBreakEvent, BlockExplodeEvent, BlockBurnEvent, BlockFadeEvent, RetractEvent
Thank you!
the fuck is block Fade event 😭
?jd-s
declaration: package: org.bukkit.event.block, class: BlockFadeEvent
Don’t “the fuck” me.
why dont u remove the the... then we'll talk..
Nevermind
verifyItem.getType() != Material.AIR works fine to items right?
just does not work fine to blocks
for items i'd rather use ItemStack#isEmpty()
yes but for items no need use this right? just for blocks
I know it's not recommended and I'll change it; I just want to know if my plugin is currently broken yk
if i need restart or smth
why wouldn't it?
wat
the method I mentioned is on ItemStack, therefore it only applies to ItemStacks
@ashen turtle I need to send you a message but it won't let me or send you a request, and I need urgent help.
You will need to double check few things, as I can't send you PM's at the moment
Discord won't let me DM you or add you as a friend. Please DM me first or temporarily enable friend requests.
If that's not possible, could you please check and unblock my account from the Zrips Plugins Discord server? I only need access to the server so I can get support there.
whats the best code ide for spigot dev intellij is not working
IntelliJ is by far the best IDE 
|| Disclaimer this is personal opinion ||
What about it isn't working
i downloaded a really old version by accident i think i fixed it now
the thing thats not working is importing towny
closed intellij to get a newer version so cant remember the error msg tho
oh well if you run in to it again let us know
its summit abt class file versions i think
possible i did summit wrong in pom.xml file but heres the error
java: package com.palmergames.bukkit.towny does not exist
this is highlighted in red on the url so maybe this in pom.xml
<groupId>com.palmergames.bukkit.towny</groupId>
<artifactId>towny</artifactId>
<version>0.103.0.0</version>
<scope>provided</scope>
</dependency>```
im new to java if you cant already tell lol
Do you have the repository set up for towny?
lemme check
i think so
<id>glaremasters repo</id>
<url>https://repo.glaremasters.me/repository/towny/</url>
</repository>```
these are the docs i was following https://github.com/TownyAdvanced/Towny/wiki/TownyAPI
Maybe look for the newest version?
Usually wikis have a very old placeholder version
mayb
lemme check the jitpack thing first but thats a good idea actually
quick question
surely it would just import an older version of towny?
not completely break
idk im new to java
on the gh releases page the latest version is the same as the one in the wiki
i dont think its a version issue
You did show that a package was missing
I think if you hover over dependency it tells what's wrong
?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
kay
imgurs blocked cos uk gov lmaoo
thx for being so patient this must be so annoying lol
There's a button on the right side
oh
thanks
no didnt work
worth saying i switched to jitpack.io for the repo cos its supported on the wiki
com.palmergames.bukkit.towny:towny:jar:0.103.0.0 was not found in https://jitpack.io
switch towny ver ?
Yea
kay
Unless you absolutely need the latest
no i think its fine
also lemme change the aretifact id i think i was meant to do that when i switched to jitpack
Not just version
omg it might have worked thx so much
The package name also
yeah i did tat i think
Jitpack has a different name scheme
IT WORKED I THINK
Nice
TYSM :))
it worked thanks for your time youve been so helpful 🙂
succesfull build 🙂
Anyone got help with ChestShop
Don't post in every channel
shoo
i quit being a dev
People are online just no one that can read your mind
lol
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
Well i would attach them but last time I did that ppl tried to say it was theirs and i copied them
or less allocation pressure
a good portion of that 10% of the "unknown native" stuff looks to be zgc related
and also a bunch of hidden libc stalls on stuff that looks like it allocates, adding up to another 10% at least, probably more
...have you taken an allocation profile yet
I feel like Phil in Groundhog Day
fixed, pack problem, my bad
Phil? I thought your name was Emily!
Has anyone worked with Redis in Minecraft plugins?
What's best for two-way communication between a plugin and a website?
Jedis, Lettuce, Redisson?
pick your personal poison
EmilyJails
I prefer Redisson
but lettuce so fancy, so good
crispy water
Ok thank you. I'll need buy 128 gb ram then
To do that, I'll need more RAM, no?
I also experience CPU usage spikes to 80% sometimes; I suspect it's when GC is called
This server is practically vanilla; therefore, I don't think I can do much either
based
no
allocation pressure = how much memory is being allocated / how much memory is being freed
increasing your total memory allows the gc to work more efficiently (generally speaking), increasing how fast it is freed
optimizing your actual allocations is going to reduce the amount of work the gc needs to do in the first place
and to do this you need to take an allocation profile, a heap dump tells you nothing about what is allocating how much
i'm just watching a vinyl skip back over and over again
i see
I'm going to upgrade the RAM anyway, since the system is using a lot of swap space because it doesn't have enough RAM, and this is definitely affecting the server's performance. If the problem occurs after upgrade, then I'll do a allocation profile
And I'm going to increase the heap dump size to see if garbage collection is called less frequently
allocation profile, free? nahhhhh
more ram, hundreds of dollars? yuhhhhhhh
Buying more RAM is inevitable on my situation
i have 7 servers running
in which 5 servers, each with an 8 GB heap dump and every support a maximum of 50 players
I wouldn't go that route until ultimately necessary
https://imgur.com/a/ePwzGUy and this is my memory usage
there's probably a lot you can do to optimize your memory usage
I've never analyzed an allocation profile and I don't have time to waste
This is the most premature solution I can do
then hire someone to do it
The price of calling will certainly be much higher
And I won't know if it will help me since my server is almost vanilla
I do feel like you're being outpaced by your server growth, you will need an extra set of hands with more expertise than you sooner or later
so I would consider it if I were you
The plugins that can probably consume the most RAM on my server are geyser, floodgate, viaversion,viabackwards and grim
Waiting for a solution from these free software plugins won't solve it so quickly either
So, upgrading will solve this for now, and then I can analyze and learn more calmly later
why would floodgate be consuming a lot of RAM
isnt that just a login authentication plugin
usage != allocation
grim eats up a fair bit of memory for its per-player clientside data like chunks and shit, but a fairly recent pr improved this considerably by making the chunk data make use of fastutil collections for block palettes
off the top of my head, it barely has any ongoing allocations, however
pretty insane to think u pmuch need fastutils if u work w primitives n collections n u want it scalable
cue the fucking skeleton rotting in a chair meme captioned with "waiting for valhalla" or panama or whatever the codename for the value types project was
surely this decade
not that i like any of the proposals
most of them end up making the type system even more difficult to reason about than it already is
i'll honestly stick to fastutil over any of them
yea, tho im not sure how well fastutil complements on the thread safe part regarding colls
apart from the standard synchronized wrappers
how so
they've been severely hinting that we'll be seeing valhalla previews on 28, so march next year hopefully 🤞
ig like identity and value types for example
I mean, there is not much to consider there, identity doesn't really affect how we look at types, but how we look at the objects
if anything null-restricted types is the more pressing matter as far as the type system goes
that does get funny when you have to think "is this type null-restricted or not"
in a similar note, serial GC is slowly dying 😔 https://openjdk.org/jeps/523
serial was already nieched for smaller system, assumption would be they havent really tried to optimize or improve serial by much in comparison to all the other gcs
hence g1 is competing w it
I just liked it because it was much easier to grasp
yea thats fair
I can not follow recent G1 or ZGC changes, let alone others like Shenandoah that I have no clue where it's even useful lol
yea I mean on a very detailed level, dont even think every official java employee knows that, but on a high level its kinda easy to grasp
it depends a bit, but one proposal would have you use e.g. List<!Integer> for non-null, or ?Integer for nullable, and Integer would remain as undefined nullability, same way how List remains a valid but unparameterized type
generics are already kind of clunky and thecombinatoric explosion resulting from this would not help
this isn't the value types proposal itself iirc, it was something like null-restricted types, which tries to solve the problem of primitive specialization through a different route
https://openjdk.org/jeps/401 on the other hand, with the more sensible value types proposal, bundles in undesirable shit like "larval objects" and "safe constructors", which I don't like because, at least from what I understood by reading the proposal, it isn't limited to value types; it will fuck me over in the constructors of all types
sometimes premature publication is necessary to get things working the way you need them to
https://openjdk.org/jeps/8277163 this one for the actual value types is more reasonable but i still foresee things getting hairy, it's in some sense just a more implicit and invisible null-restricted type
it avoids the combinatoric explosion but will definitely take some getting used to if it goes through, and we will probably realize it doesn't work as well as we thought after the fact
i think trivago or something maintains some RW-locked fastutil map, but it's basically just the synchronized wrapper except with a read-write lock instead of an object monitor
there are no actually concurrent impls that I know of, they're all just wrappers
it's kind of difficult to justify since doing something like the java concurrent hashmap relies on the data being laid out in buckets, and a large portion of the fastutil savings comes from stuff being laid out in parallel arrays instead
i did write an actually-concurrent lockfree linear probing fastutil hashmap, but it required an obnoxious amount of twiddling with low-level primitives like compare-and-set through varhandles
hey all, so I switched from maven to gradle and all of a sudden my listeners aren't working, i think my command executors are broken too, anyone know why?
is the plugin even enabling? what do you see in the server log? and what does your build script look like? and project folders layout
i'll venture a guess that either
- plugin.yml isn't getting packaged in as a resource anymore, so the whole plugin isn't loading at all
- some command framework or other dependency you're using isn't getting shaded in anymore, so it throws on onEnable
post your things
nonheap
wdym
idk
I think it's just paper being paper
That's because my servers without chunk loading don't have low tps
https://imgur.com/a/4D1ZlXV island server (with advancedslimeworldpaper)
https://imgur.com/a/ktCaQ60 resources server (with paper)
looks to be mostly entities
i don't see anything related to chunk loading
net.minecraft.world.level.entity.EntityTickList.forEach()46.56%
this is ticking entities directly
net.minecraft.server.level.ChunkMap.tick()5.32%
net.minecraft.server.level.ChunkMap.newTrackerTick()5.32%
this is entity tracking (not chunk loading)
i see about ~4% sinking into chunk loading/unloading
i don't know what an "island server" is, but if it's something like skyblock, it's much more about the size of the world and the amount of stuff in it than "chunk loading"
in a skyblock world, the only things that exist in the world are the things that players create in them
in a regular world with regular world gen, you have a high baseline of stuff in the world and then additionally everything players create in it
you have about ~100 entities per player, which seems a bit high
is it the mnecarts
looks to be just a ton of monsters at the top of the tick times
Entity Counts:
creeper: 303
zombie: 273
item: 266
skeleton: 263
chicken: 259
sheep: 222
pig: 199
enderman: 185
falling_block: 180
cow: 110
spider: 80
chest_minecart: 64
strider: 56
wolf: 53
zombified_piglin: 51
this is quite a few monsters for 40 players
server.properties
bukkit.ymlsettings spawn-limits monsters: 70 animals: 10 water-animals: 5 water-ambient: 20 water-underground-creature: 5 axolotls: 5 ambient: 15
yeah uh
are you running the default settings?
you should probably look up an optimization guide or something and set things to the recommended values
these numbers are whack
i used purpur optimization guide
purpur dev said I should use docker/ptero to solve this
maybe i edited
let me see
🤡
i don't remember any optimization guides off the top of my head (you'll have better luck asking in help-server as this is not really a dev issue any longer) but i think there is one on spigot
but uh
reduce monsters
reduce all the numbers
reduce spawning range
reduce despawning range
make sure despawning range isn't less than spawning range
And don't you think this has to do with not installing Docker/Ptero to isolate resources ?
https://github.com/YouHaveTrouble/minecraft-optimization yea for some reason monsters is 70
here is 20
what? docker won't fix your configs
https://pastes.dev/cxAipW5TXJ That's what he said. I didn't understand very well
But I think he's right
Does your processor even have P/E cores? It doesn't look like the system is overloaded, either
yes
TPS went up to 14 at some points
I changed to this:
spawn-limits
monsters: 20
animals: 5
water-animals: 2
water-ambient: 2
water-underground-creature: 3
axolotls: 3
ambient: 1
In that case yeah you do want to pin your server main threads to them
cpu pinning is not recommended ig
i think i should use docker idk
Well docker isn't going to magically solve it either unless you know what to tell it to do
https://imgur.com/a/wX072c1 cpu usage on smp servers are insane comparing to the others
He's saying your servers are competing for the perf cores and e.g. the island server is shoving some useless background work like async bukkit tasks onto the perf cores, kicking the resource server's main thread off of them
what should i do then?
Get a better cpu :kek:
When I ask if a particular CPU is good before buying it, people say it's good
People only say it's bad after I buy it
aaaaaaaaaaaaaaa
We're not saying it's bad, just that it's not good enough
There is always a better cpu
And without optimizing your server, no cpu is going to be enough
i mean there also reaches a point where you can't just shove a factions, smp and towny into a single pentium 3
What I find strange is that the box servers are fine, but the SMP server isn't
.
box servers have almost no chunk loading
Wdym box servers?
box servers = island servers
Well, that's just a given. (Small isolated area = less resource usage regardless)
yes
.
And I use software where the world is in RAM instead of on disk
Chunk loading isn't your issue on the resource server
🥱
It accounts for maybe 4% of the load
Have you read anything I've said
yes
So then you should know normal worlds are inherently different from whatever an island world is
^
a island server suppostly have mobs gen too
Different challenges with different setups
Read this message
Normal worlds start with shit already in them
Players add to it
and island servers no?
Depends
Read the message above that message
my island world suppostly have the same spigot/paper config than smp servers
Yeah but 90% of the fucking world isn't there
But the island world is 300x300
You are begging to get clown emoted
https://imgur.com/a/NSn2Jqh this is a island world
But the world has blocks for mobs to spawn
all my homies hate imgur
-# My VPN doesn't let me view images from them.
A player on the SMP server doesn't load more chunks than a 300x300 world
What's managing those worlds though?
box servers = player home, farms, redstone farms etc
smp servers = just mining bc is a resource world
Question still stands.
I can only assume it's some plugin handling those instances.
Even if it is, those worlds are not your problem.
Combining all of your 300x300 per person worlds is still going to be less than the 30,000,000x30,000,000 resource world that you have.
Plus the additional management that the plugin likely does (which is only loading those worlds when the player is online anyways)
It's no wonder one is more performant than the other.
It's a different problem altogether
I'm assuming it's actually world instance management.
Not actual server instances.
(That would be very expensive and wasteful)
-# But it would be pretty cool
A quick fix for SMPs is to just reduce the view-distance down from the default, but it's not ideal for the player experience.
Imagine every hypixel skyblock instance is a separate server
@worldly ingot get on that for maximum performances!!!
i'm not sure how it works now with paper and mojang both having implemented the same thing, but you can set the simulation distance to something low like 4, and the view distance to something more reasonable
on paper with async chunk loading, the view distance (that is, no-tick view distance as we used to call it, idfk what it is now) is essentially free except for chunk ticket updates, bandwidth, and memory pressure
alternatively, you can use a view distance extender plugin; some of them promise to reduce at least chunk ticket updates, maybe memory pressure as well
in my experience however all the extenders I've used are fucking 🅱️tarded and actually allocate like 5x more than nms/paper no-tick view distance would
Pretty sure paper removed their no tick view distance in favour of simulation distance
yeah i think it's implemented by mojang now
simulation distance is the old view distance
view distance is the old no-tick view distance
the new names make more sense but it's kind of confusing historically
either way, async chunk loading benefits from paper carry over
it's "free" except for having to propagate chunk ticket updates farther, and except for the dumb fuck nbt parser allocating 5gb/s ShortArrayTag or whatever the shit when parsing the region file into a chunk
guys how do yall save ur minigame maps, with for example also in the case of bedwars locations of spawners and such?
yaml anchors are great, I wonder why so few people know about them
What are they? Pointers?
their parser support is a bit patchy
it's one of those parts of the spec that nobody implements properly and every implementation behaves slightly differently
Used to not be widely supported neither
e.g. recursive anchors are technically supported by the spec, but most parsers will oom/stackoverflow trying to parse them
they are definitely very useful, though
it's a shame they don't support back-references
i.e. they're forward only
kind of, but since it's yaml they have to overcomplicate it
e.g. in the above screenshot <<: *base merges all the entries from whatever section was anchored as &base, which is kind of (but not quite) like using that section as defaults
if you did foo: *base it'd create a subsection that's a copy of/reference to &base instead
so when you do
mySection: &anchor
foo: bar
child: *anchor
90% of parsers will naïvely recurse forever and oom/stackoverflow
Does SnakeYAML handle it
i don't remember
i think it shits out an error but i don't think it was a stackoverflow
snakeyaml does support anchors, but not back-referencing (you can't reference anchors that aren't "yet" defined "above" your position), and i remember it breaking on recursion, but that was a long time ago and i could be wrong
it should be pretty easy to fix since snakeyaml uses a tree structure internally anyway, so it probably got fixed since
at org.bukkit.configuration.file.YamlConfiguration.fromNodeTree(YamlConfiguration.java:161)
at org.bukkit.configuration.file.YamlConfiguration.fromNodeTree(YamlConfiguration.java:161)
at org.bukkit.configuration.file.YamlConfiguration.fromNodeTree(YamlConfiguration.java:161)
at org.bukkit.configuration.file.YamlConfiguration.fromNodeTree(YamlConfiguration.java:161)
at org.bukkit.configuration.file.YamlConfiguration.fromNodeTree(YamlConfiguration.java:161)
:q
Just get a bigger stack
a graceful stack overflow
surely + 1024 stack depth will fix it
The Purpur developer said that view-distance doesn't affect the server's TPS. I don't know why either
maybe bc of that yea
You didn't specify the actual message chain context.
The actual TPS as long as ur now loading new chunks / movin fast / loading old chunks. Is only affected by simulation distance and not view distance.
@sullen marlin bungeecord api (not bungee chat) docs dont seem to be web-viewable rn
https://javadoc.io/doc/net.md-5/bungeecord-api/latest/index.html idk how to change the command
?cc help
**Syntax:
**?customcom Alias:```
?cc
cooldown Set, edit, or view the cooldown for a custom command.
create Create custom commands.
delete Delete a custom command.
edit Edit a custom command.
list List all available custom commands.
raw Get the raw response of a custom command, to get the proper...
search Searches through custom commands, according to the query.
show Shows a custom command's responses and its settings.
?cc edit
**Syntax:
**```
?customcom edit <command> [text]
Example:
?customcom edit yourcommand Text you want
Arguments:
<command>The custom command to edit.<text>The new text to return when executing the command.
Custom command successfully edited.
?jd-bc
ty
?jd
?cc show jd
Command: jd
Author: conclube (299969655915806741)
Created: 12/06/2021 00:13:40
Type: Normal
Responses:
- [Spigot](<https://hub.spigotmc.org/javadocs/spigot>)
[BungeeCord](<https://ci.md-5.net/job/BungeeCord/ws/api/target/apidocs/index.html>)
[BungeeCord Chat](<https://javadoc.io/doc/net.md-5/bungeecord-chat/latest/index.html>)
?cc edit jd Spigot
BungeeCord
BungeeCord Chat
Custom command successfully edited.
?jd
i lowk forgot why i needed the bungee web docs rip
(fwiw the jenkins link is now /reports/ https://hub.spigotmc.org/jenkins/job/BungeeCord/ws/api/target/reports/apidocs/index.html)
but jenkisn has disabled javascript on /ws/ for ages now
?turk
what can I change on the server config to increase the TPS?
better cpu, but you should head over to #help-server
this is weird bc the server is on a performance core
i alr see ppl running 200 palyers on a single server instance
and my server is being dead with 50 players lol
depends on the game mode
smp too
well you're on an i5-13500
not really a great cpu
i don't think anyone is running a survival 1.21 server with 200 concurrent players on any existing hardware
1.8 maybe
skyblock maybe
When I bought it, people said I was investing too much for beginning xd
but not modern versions
well yeah you were beginning then
is 1.21
we're using Ryzen 9 9950X3D for all our servers and we're at about 15 tps at 150 players per instance (1.21.11 too)
yes, that's part of the problem
i can you send the server ip
i'll believe it when I see it
and you know it's a single instance how?
bc the owner bought a plugin from me
i still don't believe it; even if they somehow did it, i definitely wouldn't set it as a goal
they are using universespigot
idk if is the universpigot doing miracles
prob not lol
bc they dont have 1 fucking benchmark on their website
maybe just their cpu doing miracles idk
interval 10ms
try running a lower-interval report, the default interval of 5/10ms is a bit coarse
on spark?
how can i see the current interval
oh is 10ms
the important value is not on simulation-distance?
How much of an impact does view distance have on tps though
simulation-distance: 4
nevermind i forgot we call it this now
it can have some if you're bottlenecked by the gc
i desincreased mob-spawn-range and entity-activation-range
but that doesn't seem to be the case here
to the values on this website: https://github.com/YouHaveTrouble/minecraft-optimization#entity-activation-range
maybe will help
reducing entities definitely helped
entity ticking went down from like 50-60% to 38%ish
but you added like 20 more players
entity-tracking-range:
players: 128
animals: 96
monsters: 96
misc: 96
display: 128
other: 64
ill reduce this too
in this one you have 55, in the previous one it was 30-something
you might be able to squeeze a bit more out of it by like banning enderman grinders or something
i think just on simulation distance
this is just a mining world
i think endermans are important
i see a bunch of endermen
Entity Counts:
falling_block: 486 item: 265 chicken: 225 sheep: 201 pig: 192 skeleton: 144 cow: 142 strider: 128 creeper: 127 chest_minecart: 107 zombie: 97 piglin: 86 zombified_piglin: 78 enderman: 70 rabbit: 60
or i don't know, i see not that many endermen but they take up a lot of tick time relatively speaking, i guess they're just expensive
not sure what's up with the 500 falling blocks
dude just needs a better cpu
despawn-ranges: ambient: hard: default soft: default axolotls: hard: default soft: default creature: hard: default soft: default misc: hard: default soft: default monster: hard: default soft: default underground_water_creature: hard: default soft: default water_ambient: hard: default soft: default water_creature: hard: default soft: default
idk the default value too let me see
i didnt applied some optimizations on purpur guide
yea the default value is not on docs
just make sure the hard despawn range is greater than the spawning range or else you will be thrashing mob spawning
keep in mind that mob spawning range is a square measured in horizontal chunk distance and the despawning range is a sphere
so something something square root of two
im just copying purpur optimizations
i think they are good
i know i didnt applied some purpur configs
update-pathfinding-on-block-update
Good starting value: false
Disabling this will result in less pathfinding being done, increasing performance. In some cases this will cause mobs to appear more laggy; They will just passively update their path every 5 ticks (0.25 sec).
Is this consuming too much server tick?
I wouldn't want to disable it, but if I have to, I will
i hardly see any pathfinding calls
it's just death by a billion cuts of moveTo and travel and a gazillion collision lookups and other mundane shit
If you limit mob collisions that will probably help if you have a bunch of enderman farms
this is suppostly a resources world
ppl will not do farms here suppostly
i mean, looking at the flat view
net.minecraft.world.entity.Entity.move() 4.35ms
just the hard-collisions with blocks, which are one of the most basic things that needs to be done and you can't just optimize out or defer, is already using 10% of the tick budget
cue the fucking napoleon "there is nothing we can do" meme
there are around 40 entities per player (what is up with the 500 falling blocks?), you can probably try reducing it further, but you'll start impacting gameplay negatively
beyond that you're kind of fucked
reducing view-distance might improve the chunk ticking just by virtue of it having to sort down far fewer chunks to find the ticking one
i don't know, it probably won't help
one of those forks that does entity movement asynchronously, supposing one still exists and doesn't just segfault the server, could help
i looked into doing it as a mixin at one point but it wasn't really worth all the diff surface with nms
and it turned out my hardware's instruction set didn't include a certain bit-fiddly primitive which i would've wanted for doing the collisions through SWAR nonsense
I'm making a passive ability where if the player is holding a specific item in their offhand, they will get 4 absorption hearts from eating a golden apple instead of just 2, however I am not sure how to do this. Every time I try to, it never works for some reason, I have tried using the absorption potion effect, doing player.setAbsorption(), delaying the absorption to allow minecraft to register it, and much, much more but it never works.
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
what is th e500 falling blocks?
like sand being broken etc?
here
import com.armorability.core.ArmorAbilityCore;
import com.armorability.core.data.AbilityStone;
import org.bukkit.Material;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeInstance;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerItemConsumeEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
public class GappleListener implements Listener {
private final ArmorAbilityCore plugin;
public GappleListener(ArmorAbilityCore plugin) {
this.plugin = plugin;
}
@EventHandler
public void onConsume(PlayerItemConsumeEvent event) {
if (event.getItem().getType() != Material.GOLDEN_APPLE) {
return;
}
Player player = event.getPlayer();
ItemStack offHandItem = player.getInventory().getItemInOffHand();
if (plugin.getAbilityStoneManager().getStoneType(offHandItem) == AbilityStone.BLOOD) {
new BukkitRunnable() {
@Override
public void run() {
if (!player.isOnline()) return;
AttributeInstance maxAbsorption = player.getAttribute(Attribute.MAX_ABSORPTION);
if (maxAbsorption != null) {
maxAbsorption.setBaseValue(8.0);
}
player.setAbsorptionAmount(8.0);
}
}.runTaskLater(plugin, 3L);
}
}
}
?
.
i was adding my code
cuz the guy did ?nocode on me 💀
Have you tried debugging everything ensuring each line is running?
yes
the max absorption attribute and the player.setAbsorptionAmount dont seem to be doing anything
well they probably are but its probs just being overwritten by the golden apple
What does /version output
as in?
If you run the command
on my server?
Yes
And what else
[21:40:58 INFO]: This server is running Spigot version 1.21.11-132-ver/1.21.11@c5eb079 (2026-05-11T11:43:09Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT)
thats the console message
quickly
delete it before anyone sees
and re-post it with "spigot" in place of paper
lol
otherwise they will send you to the gulag (paper discord)
It’s too late
Didn’t paper do stuff with attributes? (Which is why i asked)
Bake him away toys
😭
ok well the only debugging I did was removing different lines of code and adding print statements 💀
u cant really call it debugging
cuz idrk how to debug a server tbh
well, a plugin on a server
this is kinda my first plugin so like
Well. Add a debug line for each new bracket then
That works
I wanna see that i passes each if statement etc.
im a lil busy so i cant test rn
oh wait ok so its not running
cuz I added the System.out.println functions
and its not working
so yea
I think its this line tbh
return;
}```
bcuz my code def works
I use getStoneType literally everywhere and it works
so its definately that line
but idk why
so what's the type
idk
its supposed to be a golden apple
like a normal golden apple
so i have no idea why that wouldnt work
okay so print the type
so above that line add a sys out
and see what the type is, if it isn't a golden apple
i have a fair idea of what the issue is already, but in the interest of teaching you how to solve your own problems, try the sysout
ok
wait ok im kinda stupid cuz apparently system.out.println doesnt work on server consoles or something idk
is your plugin even enabling
yes it is
cuz all the abilities are working
ok wait no something is very wrong
either the listener is just not running at all
or something is wrong 😭
bcuz i did event.getPlayer().sendMessage(event.getItem().getType().toString());
did you re-build, make sure to copy the new jar and restart your server?
yes
I did
wait I think i know the probleem
ok no
its just not running
the listener
because I ate a steak instead of a golden apple to verify
and it didnt say anything
Did you register it
OH MY FLIPPING GOSH I FORGOT TO REGISTER IT
im such an idiot 😭
im actually such an idiot oh my gosh
yea its working now
thanks for pointing out the most obvious thing ever to me idek how i even forgot to do that omg
Hello, is PlayerInteractEntityEvent working on spigot 26.1?
It should be
Weird, tried to use it but didnt seem to be working, i'll try again without other plugins
Do make sure you're actually running Spigot as well
Definitely
Also remember to register it, and probably have something in your hand anddd probably not be in creative
You cannot right click an entity without an item in hand then?
I just listed reasons it might not work, try it out
umm, i'll try again in some hours
PlayerInteractEntityEvent is a seperate event
what is this? https://pastes.dev/f2rI9qvQjx
Do you have a bunch of mods on the client
this error is on my server
yeah but answer my question
idk who caused this error
Then just ignore that
It's usually caused by a bunch of client mods
If you really want to fix it paper has a flag to disable that check
Sorry, what that means exactly?
is there some refresh variant of Player#sendBlockChange?
to update with the real block data ^
you can just send the block's data
sendBlockChange(loc, loc.getBlock().getBlockData())
how many servers u can run on AMD EPYC 4464P?
[19:23:56 ERROR]: Error executing task on Server
java.lang.IllegalStateException: Thread failed main thread check: Accessing poi chunk off-main, cont
ext=thread=Paper Common Worker #0, world=resources_world, chunk_pos=[2555, -5167]
at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:65) ~[pap
er-1.21.11.jar:1.21.11-131-6d5b910]
at net.minecraft.world.entity.ai.village.poi.PoiManager.getOrLoad(PoiManager.java:89) ~[pape
r-1.21.11.jar:1.21.11-131-6d5b910]
at net.minecraft.world.entity.ai.village.poi.PoiManager.exists(PoiManager.java:338) ~[paper-
1.21.11.jar:1.21.11-131-6d5b910]
at net.minecraft.server.level.ServerLevel.lambda$updatePOIOnBlockStateChange$18(ServerLevel.
java:2325) ~[paper-1.21.11.jar:1.21.11-131-6d5b910]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.11.jar:1.21.11-131-6d5b9
10]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:177) ~[pap
er-1.21.11.jar:1.21.11-131-6d5b910]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLo
op.java:24) ~[paper-1.21.11.jar:1.21.11-131-6d5b910]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1525) ~[paper-1.21.11
.jar:1.21.11-131-6d5b910]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:188) ~[paper-1.21.11.
jar:1.21.11-131-6d5b910]
at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:123) ~[paper
-1.21.11.jar:1.21.11-131-6d5b910]
wtf is this? this happened on server disabling
free custom mods/plugins service. DM me if you intrested
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
I can give them a compass which can open a kit menu
hm yes?
Can anyone help with NMS?
I am trying to create an enchantment that spawns a chicken. This chicken will then chase a hostile mob and explode similar to a creeper.
I have the enchantment setup and it works perfectly, but my custom chicken entity called Cockatrice targets the hostile entities correctly, but doesn't chase them correctly.
I am using PathfinderGoalNearestAttackableTarget to select the target, but this doesn't make the Cockatrice follow the targe. I tried using PathfinderGoalFollowEntity as a goalSelector, which actually worked quite well, it would follow entities very well, but wouldn't always follow the targeted entity (E.g targets a zombie -> follows a skeleton).
I want to make the chickens explode when they are within a few blocks of their target, but because of the whole following the wrong entity it won't work.
I have tried all current PathfinderGoal's I could see but none have worked, the best ones are the FollowEntity goal and the MeleeAttack one (crashes server when used with chicken).
Any advice would be great!
Jet did you just want to initialize a value ?
yeah
Not with that pfp
abstract class Upper {
final X x;
{
x = x();
}
abstract X x();
}
class Lower extends Upper {
X x() { return new X(); }
}
@supple elk
uhhh
just basically overidding
Where is your annotation
stoopid
Bru
ok but this means that I have to have the field in my parent class
In the example I posted earlier, the compass is an InteractableItem (wrapper of Item)
I don't want to store an InteractableItem field inside the parent class
and what if in one class I need to give people multiple items?
That was an example I’m not at home rn but maybe us an array or define a list ?
Does anyone know of a RP friendly "make money" plugin. Having Salaries?
Ideally I'd be able to define this stuff statically, however to define my item statically I need to define a GUI statically, but the GUI needs a manager which is passed in as a dependency which I can't really get statically?
idk why but I read
I'm not at home rn
as
I'm horny rn
lol yeah
It's cause you're horny rn
👀
wha
^
wtf is this:
Could not pass event PlayerDeathEvent to DeathMessages v1.0
org.bukkit.event.EventException: null
yeah we need the full error
and the relevant code
if(!plugin.getConfig().getBoolean("Lockdown_enabled")) { plugin.getConfig().set("lockdown_enabled", true);
case sensitive
full error:
Could not pass event PlayerDeathEvent to DeathMessages v1.0
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:319) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:780) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.EntityPlayer.die(EntityPlayer.java:566) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.EntityLiving.damageEntity(EntityLiving.java:1241) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.EntityHuman.damageEntity(EntityHuman.java:745) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.EntityPlayer.damageEntity(EntityPlayer.java:719) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.EntityLiving.killEntity(EntityLiving.java:194) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.CommandKill.a(SourceFile:32) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.CommandKill.b(SourceFile:22) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:262) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:176) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.CommandDispatcher.a(CommandDispatcher.java:182) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at org.bukkit.craftbukkit.v1_16_R3.command.VanillaCommandWrapper.execute(VanillaCommandWrapper.java:45) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:763) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.PlayerConnection.handleCommand(PlayerConnection.java:1788) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.PlayerConnection.c(PlayerConnection.java:1631) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
thaaaat's weird
at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:1584) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(SourceFile:144) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(SourceFile:118) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:942) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:935) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(SourceFile:127) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:919) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:851) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[server.jar:2991-Spigot-018b9a0-f3f3094]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_271]
at com.mounterisastudios.deathmessages.listeners.ListenerJoin.onDeath(ListenerJoin.java:28) ~[?:?]
what's on line 28
^
I would get the entity's type and then have a good ol switch statement
k thx
isn't java c-based
The syntax of Java is largely influenced by C++ and C. Unlike C++, which combines the syntax for structured, generic, and object-oriented programming, Java was built almost exclusively as an object-oriented language. ... Java reuses some popular aspects of C++ (such as the printf method).
it is
thought so
in fact, have you heard about JNI
it is able to run native code
oh I've heard of this
like C/C++
never heard JNI before tho
by using the built in native keyword
that is in java
some things in Java can't be done in Java like the fundamental fundamental stuff
that is done by stuff like C and C++
native is poggers when you need it
is it posibble to have:
getConfig().getString("stuff").replace("<Player>", "bluh bluh bluh").replace("<OtherPlayer>", "bluuuuh");
wat?
my code:
event.setDeathMessage(Utils.chat(plugin.getConfig().getString("death").replace("<Player>", victim.getName()).replace("<Killer>", attacker.getName())));
a .replace on a .replace
replace().replace()
that code doesn't make any sense at all
the replace method defined in the string class returns a String that you could then call replace on again, yes. Regarding your specific code I agree ^
yes you can have multiple replaces
Yes multiple replace works fine, but if there is no config entry it will error with an npe
🦴 💥 go to horny jail
Dirty
yo he was the one that read 'I'm going home' as 'I'm horny'
You got wet tho
lol
wot
I was just calling him out. Only a horny person would misread like that all I'm saying

Just tag @humble stirrup if someone is horny and let him interact with her.
lol
😋
@fervent robin you have to use § instead of & or ChatColor.translateAlternateColorCodes('&', text);
Random design question not sure if this is the best place to ask, but how expensive is a sql call? If I have an economy plugin with a database that tracks player currency, should I be updating the DB on every transaction? On player log out? Does it matter?
you called?
more thirsty teens looking for an Actual Real-Life Girl™️ to simp over?
Yeah, someone was horny.
epic
You should request money from the thirsty teens
i could pull a belle delphine
jump in the bath, dye my hair pink and sell some bathwater
profit :D
Nah, i've seen some of the latest stuff, she does hardcore porn shit now.
lmao
Anyone here familiar with EulerAngels and knows how to translate an Movement from an json file to Euler Angels tried different formulars but non is working (Sorry for my trash english)
angels or angles
I seriously cannot think of how to add CRUD operations. https://paste.md-5.net/weberehaki.java
I've tried so many random things that don't even make sense in the end.
Any ideas?
How do I transfer every single property of one entity to another
manually
(execpt uuid of course)
Which kind of property?
all of them
sadly
don't think you can clone entities
oh
ooh an HK fan
what about nbt
probably manually as well
can you directly get and set the nbt of an entity?
if i want it to work with every kind of entity
then there would be thousands of properties to manually set?
or am i missing something
How to change the Y of a player without changing the others(X, Z, Yaw, Pitch)?
location.add
location.setY
Teleport him to a location relative to his own. So as ElgarL suggested: tp to -> currentLocation.add(0, dy, 0)
Try not to put a space between the message and the colorcode
There are quite a few things wrong here... But im just gonna point out the critical ones:
- You should return true in your last line of your command
- You probably never called the
startmethod so yourtagsInvas well as yourtagsInvNameare null
But thats exactly what your stack trace tells you.
Feel like this question has been asked a hundred times, but can't seem to get a straight answer for 1.16.5. What's the correct way to place a door?
place one half, then cast to bisected, get th eother half and place it
set one as top and one as bottom
I am trying to add a config file that records the number of times a player gets a special Beer potion item through a command, but I'm having some strange results. The code snippet included runs every time the player receives a new beer using the command: https://pastebin.com/CN481Kt7 I want the value of <UUID>.name.beers to increase by one every time, but that isn't working. Neither is storing data under "name". The results in the config and terminal repeat every time I enter the command. Any ideas?
@split light there is nothing wrong with your code
The two printed nulls are because they are ConfigurationSections, not strings
Well functionally there may not be, but it’s not achieving the goal I want
But why isn’t the Beers subsection not increasing?
the first time it runs its setting zero, so there is no config entry.
It then set the section and increments by 1, so saves 1
What is a configurationsection vs a string?
I think I’m mixing up how they’re stored
configurationsection is the path of everything that is below a path
like a section of the config
below.setBlockData(blockData, false);
above.setBlockData(blockData, false);
((Bisected) below.getState()).setHalf(Bisected.Half.BOTTOM);
((Bisected) above.getState()).setHalf(Bisected.Half.TOP);
doesn't seem to work. am I casting correctly?
you have to update as you are using BlockStates
ohh my bad
thanks
below.setBlockData(blockData, false);
above.setBlockData(blockData, false);
((Bisected) below.getState()).setHalf(Bisected.Half.BOTTOM);
((Bisected) above.getState()).setHalf(Bisected.Half.TOP);
above.getState().update();
below.getState().update();```
doesn't work either
@eternal oxide if I were to try to store the player name and number of times they’ve run the command, what would that look like? The wiki article I’ve been trying hasn’t been helpful
no because you are calling getState again
what object do I need to update?
the state you aready obtained
even when I store the state it still only places half
BlockState belowState = below.getState();
BlockState aboveState = above.getState();
((Bisected) belowState).setHalf(Bisected.Half.BOTTOM);
((Bisected) aboveState).setHalf(Bisected.Half.TOP);
belowState.update();
aboveState.update();```
Because ideally I want it to look like
<UUID>:
name: OpticsVision
beers: 4
try update(false) as you don;t want to update with physics
still no luck :\
I'm assuming you are setting the blockdata
yeah, OAK_DOOR
private void placeDoor(Block below, BlockData blockData) {
World world = Splinter.getInstance().mainWorld;
Block above = world.getBlockAt(below.getLocation().add(new Vector(0, 1, 0)));
below.setBlockData(blockData, false);
above.setBlockData(blockData, false);
BlockState belowState = below.getState();
BlockState aboveState = above.getState();
((Bisected) belowState).setHalf(Bisected.Half.BOTTOM);
((Bisected) aboveState).setHalf(Bisected.Half.TOP);
belowState.update(false);
aboveState.update(false);
}```
this is the entire function as of now
you are settign blockdata on the blocks
then overwriting when you update teh state
should I set the state first?
do everything on teh states
BlockState belowState = below.getState();
BlockState aboveState = above.getState();
belowState.setBlockData(blockData);
aboveState.setBlockData(blockData);
((Bisected) belowState).setHalf(Bisected.Half.BOTTOM);
((Bisected) aboveState).setHalf(Bisected.Half.TOP);
belowState.update(false);
aboveState.update(false);
I think I'm missing something. The bottom half places fine
is there a way to do tab completer for other plugins trought externals plugins?
You'd need to somehow apply a TabCompleter to the command https://hub.spigotmc.org/javadocs/spigot/org/bukkit/command/TabCompleter.html
if you get the plugin object, and call getCommand it might work
Which you can get through Server#getPluginCommand I believe
on there you can simply call setTabCompleter
^^
whats the maven dep for nms
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
that's just the spigot api
no lol
unless they added it?
that is the entire spigot server
hm I already added that so it makes no sense getting class not found exceptions
run buildtools
intellij?
yeah
right click, maven, reload project?
did they change it from 1.8 to the latest in terms of that?
not sure why it doesn't out put enchants in chat
Map<Enchantment, Integer> enchants = Chest.getInventory().getItem(i).getEnchantments();
for (Entry<Enchantment, Integer> en : enchants.entrySet()) {
int level = en.getValue();
Bukkit.broadcastMessage("" + en.getKey() + ":" + level);
}
face palm myself wut i'm doing wrong
yeah it'll be under net.minecraft.server.SOMEVERSION....
I mean, just NMS used to be:
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>minecraft-server</artifactId>
<version>1.16.5-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
but that does not really help you much
are you sure there are items in that inventory and that item has enchants?
it could be that the entry set is empty
well this is what I have now <dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot</artifactId> <version>1.8.8-R0.1-SNAPSHOT</version> <scope>provided</scope> </dependency>
oh god
oh it might be different for 1.8
yeah that's what I thought
i've only developed for 1.15+
run buildtools
so what are you trying to do Fersk?
I mean, check your local maven repo ?
just trying to edit some entity stuff through nms
but getting class not found exceptions
so I'm just wondering what the correct depends are
maybe they don't exist in 1.8.8
You could certainly edit entities through nms in 1.8
I didn't say that you couldn't
but when it says "class not found" it means that the class you're seeking doesn't exist
did you run buildtools for 1.8.8?
yep
check the javadoc
what do I look for there?
You need to call update(true)
That forces it to update the material
update(true, false) is what you want actually
But at the same time you shouldn't need block states at all
even with true, false no luck. how would you suggest going about it? I'm guessing there's another way without using blockstates
@minor fox you can also check under external libraries, to see if you can find NMS there
if maven updates without errors, you probably have the right dependencies
Bisected data = (Bisected) Material.OAK_DOOR.createBlockData();
data.setHalf(Half.BOTTOM);
Bisected top = data.clone();
top.setHalf(Half.TOP);
block.setBlockData(data, false);
block.getRelative(BlockFace.UP).setBlockData(data, false);```
it was lol
I think I'm just gonna add it to the project locally
the jar with nms
still don't understand i loop though every item and some of the items in the chest have enchant or is it different for enchant books?
uhh
I was speaking to Fersk with that message but make sure that the item isn't air
@dusty herald dam me
i figure out it only enchanted items and not enchant book enchants
@dusty herald it was to understand what the problem was
😂
@dusty herald how i loop enchant on enchant books?
uhh no idea
never been so pleased to see a door. thanks a ton
private void placeDoor(Block block, BlockData blockData) {
Bisected belowData = (Bisected) blockData;
Bisected aboveData = (Bisected) belowData.clone();
belowData.setHalf(Bisected.Half.BOTTOM);
aboveData.setHalf(Bisected.Half.TOP);
block.setBlockData(belowData, false);
block.getRelative(BlockFace.UP).setBlockData(aboveData, false);
}
for reference (and for anyone searching for this) here is how to place an entire door
No problem
for walking through
I mean why place it with code
um
seems a bit uh
why not use A-SWM?
dangerous
Note that SWM is not intended to be used on big survival worlds
SWM sounds pretty fucking neat
I'll use it for a big survival world
Hi, how would i block all commands with : in (making a bungeecord plugin that blocks it)
make sure to use Advanced-SWM because the original one isnt maintained
**update note: ** i just did this works well for enchant books 🙂
if(Chest.getInventory().getItem(i).getItemMeta() instanceof EnchantmentStorageMeta) {
EnchantmentStorageMeta meta = (EnchantmentStorageMeta) Chest.getInventory().getItem(i).getItemMeta();
Bukkit.broadcastMessage(meta.getStoredEnchants().toString());
}
It is: i use it for lobbies and maps and stuff
😮 mini game maps? @outer crane
that would be so cool
tnt run is pretty basic for me since im young
for generating map
or speelf xd
i actually did spleef earlier
it was a mess though
right now im working on a common lib
Im trying to save data for my plugin, for some reason it didnt write any data into file. Arenadata: https://sourceb.in/5GjQSEqlZ0, ArenaManager:https://sourceb.in/DlN6DZK7Ex
private void placeBed(Block block, BlockData blockData) {
Bed footData = (Bed) blockData;
Bed headData = (Bed) footData.clone();
footData.setPart(Bed.Part.FOOT);
headData.setPart(Bed.Part.HEAD);
block.setBlockData(footData, false);
block.getRelative(footData.getFacing()).setBlockData(headData);
}
how to place a bed, for anyone searching
so I am trying to switch from eclipse to intellij and I am just making a test plugin just to see how everything works, and for the life of me, I cannot figure out how to export my test plugin. Can anyone help?
you need to make an artifact under "project structure" (alt+shift+ctrl+s)
make sure you include your plugin.yml
what is "plugin attempted to register task while it was disabled'"
or export it using maven if its a maven project
exactly that
you tried to use the scheduler when your plugin was disabled
disabled?
yes
when would it be disabled?
if your onenable threw an error or you disabled it yourself
it just randomly happened when I placed a block
none of my plugins do anything related to that
did u reload the server
yes, but like 10 minutes before that happened
I just looked at the logs and it's filled with luckperms error spam
onLoad = not enabled
init = not eabled
onEnable = enabled
I know, i worded the question wrong
No you just gave not enough info 😉
but I don't know what info to give
The stacktrace and the class mentioned.
there is no stacktrace, it just kicked me
if there was, I couldn't find it because of error spam
from a plugin that isn't the one I'm working on
Was wondering, How could I make it that if a player eats a specific food it gives them a potion effect?
Listen for the player eating food event, see if it's the right type of food, then apply the effect
Thanks!
How should I make a player slowly lift in the air on right click?
give them levitation
Listen to PlayerInteractEvent, check the Action, give them levitation or apply velocity
@oak mica
anyone know how to catch when a tnt block turns into an entity? I don't want to use playerinteract since it won't catch spreading, or ignition through other means
EntitySummonEvent or something
doesn't catch it :(
