#help-development
1 messages · Page 1287 of 1
I used Loading BuildTools version: git-BuildTools-844940e-193 (#193)
which im pretty sure is the latest one
yeah i also have same
sounds like trouble though, id imagine u wna favor portablegit for reproducibility
portablegit also not work
for my scenario
did u try fiddling around with other java binaries?
actually u can prob get em from archives
^^ (and yea, clear the work files and just run everything on fresh btw)
[--rev, 1.8.8]
Loading BuildTools version: git-BuildTools-844940e-193 (#193)
Java Version: Java 8
Current Path: C:\Users\rokel\Documents\Minecraft-Folders\BuildTools\BuildTools
*** Could not find PortableGit installation, downloading. ***
Starting download of https://github.com/git-for-windows/git/releases/download/v2.45.2.windows.1/PortableGit-2.45.2-64-bit.7z.exe
Downloaded file: PortableGit-2.45.2-64-bit\PortableGit-2.45.2-64-bit.7z.exe with hash: 851a15074dea6b272785b2a2a4697a72970256de2afe7b8e4a9c5e168c27ccdd
Extracting downloaded git install
*** Using downloaded git PortableGit-2.45.2-64-bit\PortableGit ***
*** Please note that this is a beta feature, so if it does not work please also try a manual install of git from https://git-for-windows.github.io/ ***
git version 2.45.2.windows.1
openjdk version "1.8.0_452"
IBM Semeru Runtime Open Edition (build 1.8.0_452-b09)
Eclipse OpenJ9 VM (build openj9-0.51.0, JRE 1.8.0 Windows 10 amd64-64-Bit Compressed References 20250504_1243 (JIT enabled, AOT enabled)
OpenJ9 - 31cf5538b0
OMR - 9bcff94a2
JCL - a00de86921 based on jdk8u452-b09)
Attempting to build version: '1.8.8' use --rev <version> to override
Found version
{
"name": "582a",
"description": "Jenkins build 582a (hotfix 2)",
"refs": {
"BuildData": "838b40587fa7a68a130b75252959bc8a3481d94f",
"Bukkit": "01d1820664a5f881665b84b28871dadd132deaef",
"CraftBukkit": "741a1bdf3db8c4d5237407df2872d9857427bfaf",
"Spigot": "21fe7077d9140e0f9db01587a39c2ffec29e3ec8"
}
}
Applying CraftBukkit Patches
Patching BiomeTheEndDecorator.java
Patching Block.java
Exception in thread "main" java.lang.RuntimeException: Error patching Block.java
at org.spigotmc.builder.Builder.lambda$startBuilder$2(Builder.java:617)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
at org.spigotmc.builder.Builder.startBuilder(Builder.java:568)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:60)
Caused by: difflib.PatchFailedException: Incorrect Chunk: the chunk content doesn't match the target
at difflib.Chunk.verify(Chunk.java:86)
at difflib.ChangeDelta.verify(ChangeDelta.java:78)
at difflib.ChangeDelta.applyTo(ChangeDelta.java:44)
at difflib.Patch.applyTo(Patch.java:43)
at difflib.DiffUtils.patch(DiffUtils.java:70)
at org.spigotmc.builder.Builder.lambda$startBuilder$2(Builder.java:605)
... 13 more
java version is doesnt matter
this happens between 1.8-1.9.4
Applying CraftBukkit Patches
Backing up NMS dir
Patching Block.java
Exception in thread "main" java.lang.RuntimeException: Error patching Block.java
at org.spigotmc.builder.Builder.lambda$startBuilder$2(Builder.java:617)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
at org.spigotmc.builder.Builder.startBuilder(Builder.java:568)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:60)
Caused by: difflib.PatchFailedException: Incorrect Chunk: the chunk content doesn't match the target
at difflib.Chunk.verify(Chunk.java:86)
at difflib.ChangeDelta.verify(ChangeDelta.java:78)
at difflib.ChangeDelta.applyTo(ChangeDelta.java:44)
at difflib.Patch.applyTo(Patch.java:43)
at difflib.DiffUtils.patch(DiffUtils.java:70)
at org.spigotmc.builder.Builder.lambda$startBuilder$2(Builder.java:605)
intriguing
what is your guys opinion on Interface Segregation Principle
like what granularity do you guys prefer or you just straight up model interfaces by grouping behaviour independent from its use case (instead of PasswordReader/Writer you use PasswordRepository with read and write etc)
at that case, how do you mock interfaces?
ISP: A client (user class) should not be forced to depend on an interface that contains methods it does not use. Instead of creating a single fat interface and making clients dependent on it, create small, meaningful, cohesive interfaces.
Implementation&Abstraction details depends to your business logic.
for example if you implement large-scale web domains you have to provide more scopes for testing. (mock interface?)
sure what i ask how do you generally manage it, it pollutes your codebase quite quickly if you model class specific interfaces for each
yes
it is depends to your use cases.
There is no silver spoon in oop
for me it will depend whether i'm writing a library or framework, a service, or an end-user application
shit's just structured differently
granural interfaces sounds good as if you're making them as granural as one method interface just like in go, you can make use of lambda implementation but then you have massive constructors which do nothing but declare methods it uses
i like how programming is literally a game where you have to write shitty code no matter what you choose because every decision has pros and cons
it depends™
2 rules are important when it comes to decision.
1- coupling -> is your class depent to other classes more or less ?
2-cohesion -> is your class need to change for only 1 reason?, if it is then its good (highly cohesive) - SRP
clean coders try to implement things loosely coupled and highly cohesive
Legit
Personally I try, just as serteranon said, to create meaningful interfaces. I might have one that only contains one method, but it's easier to have this one interface to check for on backend instead of a couple dozen which could have the same funcitonality
You don’t use mockito? Or are we talking about implementing a dummy for other purposes than testing?
i could use a mojito rn
what im sayin init
i'm lacking that mint punch
@mortal hare for example which one is more clean to you
That’s a very unrealistic example
forget namings, try to look deeply
class A -> Represent Anemic domain entity model -> JPA entities (we call this Database entity object in DDD)
class B -> Represent Rich domain entity model -> Player, Entity etc something that has behaviors. This way behaviors are not spreaded in services.
they both are usefull
but both depends to your use case
if you want to fast developed product -> you go anemic
if you want to more maintainable system -> you go rich
anemic causes big ball of mud in big enterprises.
i mean
you don't go neither nor the other exclusively in the entirety of whatever code base you're working on
you mix and match depending on the needs of the current problem you're trying to solve
You have to write technology-agnostic code, when you want to write code that doesnt break easily. The infra code. Developers who use this idiom and write backend APIs even count the web frameworks they use as technology.
persistence api is also technology
anemic domains are dependent to persistence apis
In practice its also not very useful to just boil it down to a duality such as rich vs anemic, there are almost always more important factors at play.
in web its pretty usefull
but for game dev, game modding
its a bit a lot of abstraction
You have to write technology-agnostic code
you certainly do not
im speaking oop general.
it really depends on the problem you are solving
the technology itself is the problem in large scale apps
yes it is depends
but this is fact
DDD abstract the code from technology
but rarely anything modern is just purely oop though
for example spring framework forces you to use its container. but you can rid of him easily with this perspective.
nor persistence apis
tbh it really sounds like you‘re throwing around with catch-phrases without any context
i give resources before
if you want to resource
im not debating, im just trying to insipire
idealised textbook examples are useful in idealised textbook situations
inspire with false information?
:))
saying that something "is a fact" doesn't make it one if you haven't worked in the field professionally
k im not gonna explain more
im not insulting anyone, im just trying to be explain myself. im not native english speaker
i fallow this philosophy and trying to use them, they are very hard to understand but they are exists.
you are repeating what this or that book have said like they should be treated biblically
yes i use 6-7 book as a bible.
you are right
Serterano, DDD is certainly quite used in the industry, enterprise, but I do think if you preach about its cons and values, perhaps its worth teaching us, those that you want to inspire, about DDDs cons such as its prerequisite of a well understanding in regards to the business domain and the business requirements. Though that’s just my thoughts on it, take it-… inspirationally
they are guidelines
for me DDD is the max level that OOP dev can learn atm.
im not expert on this, nobody is
because every domain has its DDD best practices
there are hundreds of domains
I mean DDD and OOP are linearly independent to a great degree
oop is a paradigma, ddd is a design decision
DDD becomes a religion if you try hard enough
yes im not telling its silver spoon
i said
both of the domain models purpose are different -> rich and anemic
worked for companies that did, hard to join
understandable, my condolences
yea- i mean 100% i don’t think any1 is disagreeing with that
you can use whatever fits to your needs
precisely
even DDD books tells this at preface (hands-on books(onion, hexagonal, clean archs), theoric books)
im still against rich domain models, mainly because they work awfully bad without an session based ORM
if you're working in memory sure, but when it comes down to persistence from/to database it sucks
you still need to have anemic services for actions to orchestrate persistence between domain models and persistence apis, if you do rich domain entities from database, you end up with inefficient sql queries between the server and your application, unless you implement aggressive caching, batching etc which might clutter your codebase and make it harder to maintain than just maintaining a transaction script/service in one place and be done with it
my dogma is that less code = better, if its maintainable
DDD is all about writing less & maintainable code.
writing anemic will spread business logic into services.
"in larger systems"
you are talking about tactical side of ddd but its not should handled by this.
wait i wil lshow you some repo
ddd is basically you dont give a fck about technologies but you can implement all of it.
for spigot its totally waste of time because there is a spigot-api
you dont have to write infra code again
every time i look in here its you and that other guy arguing about anemic that triple-d that
i wont type triple-d again i swear
hey
Vector direction = player.getLocation().getDirection();
for (float i = 0; i < distance; i += 0.2F) {
player.sendMessage("dirX " + direction.getX() + "; dirY " + direction.getY() + "; dirZ " + direction.getZ() + "; yaw " + player.getLocation().getYaw());
Location loc = player.getEyeLocation().subtract(0d, 0.2d, 0d).clone().add(direction.multiply(i));
player.getWorld().spawnParticle(Particle.CRIT, loc, 0);
}
im trying to code bullet particles for a gun, by spawning a particle every 0.2 blocks.
When I use the code above, for some reason the direction-{x,y,z} values are 0, yaw works though
its called in PlayerInteractEvent
oh and the negativity of the direction vector is correct too, so its either 0 or -0
you should do the following changes
Location eyeLocation = player.getEyeLocation();
Vector direction = eyeLocation.getDirection().multiply(0.2);
for (float i = 0; i < distance; i += 0.2F) {
eyeLocation.add(direction);
player.getWorld().spawnParticle(Particle.CRIT, eyeLocation, 0);
}
try this out
@robust helm
on it
wait
shouldnt it behave the same?
one small think
Vector direction = player.getLocation().getDirection(); this line should work
but the others i'm not sure
you're constantly changing the vector
when instead you should update the location each step by a little
it works!!
i see
also
but why didnt mine work?
i figured it out why yours won't work
you multiply by 0 at first
so everything becomes 0
all 3 coords
yeah that'd do it
ooooh
of the vector
im stupid
well thanks a lot
but my way is the better way
bleh
it's the minimal way to not stress the gc
stressing the GC is my #1 priority
the jit is surprisingly effective at getting rid of trivial allocations like these with escape analysis
but that of course requires the code to run pretty hot and get c2'd and is sensitive to unrolling/inlining limits
even then you'd be surprised by how many aabb/blockpos allocations the jit eliminates from the server tick loop
if you do a heapdump and look it up you don't see that many blockpos yeah
it's mostly long[] which I always assume is lighting data and NOT some sort of networking leak
long array sounds like it could be block data as well since the palette container for chunk sections is backed by one of those
could be yeah
I wonder if they do that smart shit where it only uses as many bits as it needs
or if they just store palette ids as longs because fuck you
it uses only the bits it needs, more or less
more or less as in the nibbles can't be split between two longs, so if 64 isn't divisible evenly by the bit count, there'll be some padding
new Object() tanking my tps
me when i new object
Interface Segregation Principle is Unhelpful but Inoffensive (SOLID is not solid)
i guess you're right
its a balance between coupling and cohesion
if you decoupled into one method interfaces you will essentially have low cohesion, low coupling system, which is harder to maintain
just use Haskell at that point
if you use meaningful interfaces you would make codebase which consists of high cohesion, medium-low coupling classes which is easier to maintain overall but a introduces some unnecessary coupling, which is ok since you can just refactor that interface whenever needs fit, its just not worth it to split it until you need it, since you usually expose interfaces and not the implementation classes to the client code
i should really buy that ebook
it only 6$ but seems like there's good tips there for good api design
When I try to compile my java code It opens "Config.java" which was, as I believe, auto generated due to the minecraft development plugin and the compiling wont work. Can anyone help me compile the code?(I am still new to minecraft plugin development😅 )
Uhhh
When you created this during the setup phase for the Minecraft Plugin, did you select forge lol
Config.java is strictly forge (As well as all those classes being used)
That could be😅
And a second question: where do I find the compiled file?
dark kde plasma?
where did you got this color scheme
i dont like its blueish dark native theme
from what im seeing you're building a forge mod
not a spigot plugin 😄
that's not the same
already changed it😅
Hi
Would I get help here with Custom Model Data?
not even sure what Config.java does in this case
i think you can just delete it?
its used for forge mod configuration not for spigot
spigot bukkit api has its own configuration file api's
looks like this now... I have compiled it but dont know where to find the compiled file😅
show me your pom.xml file
im not too familiar with Maven as i just use Gradle, but you should execute package maven task to produce jar file inside target directory
iirc you can enable package task in Maven by appending <packaging>jar</packaging> inside pom.xml file
well im blind its already there lol
just click on package task inside maven sidebar list
and it should generate plugin .jar inside target directory
It has made 2 .jar 😅
probably one is shaded and another not, but not too sure as i've last used maven like back in 2018
one normal and one with "original-" infront
probably that's because shading maven plugin, which appends your project libraries to the .jar file, essentially makes a .jar file which contains all the classes your project needs
try using non prefixed one in spigot server
and see if that works
ok
note that if you only want to produce .jar files you only need to invoke package task as it will invoke compile task automatically. Maven essentially has hierarchy of tasks, it usually chains them, you can also make your custom ones (99% use cases do not need that), its just a glorified interface for javac command line tool with an ability to download dependencies from the internet automatically 😄
It worked🙂 Thanks alot for your help🤗
just carry it over across the next long?
this is how it used to work, but they changed it somewhat recently so they don't carry over
it did make the logic a bit simpler and maybe faster, since there's no longer a need for an edge case where you splice two longs together
i do wonder whether the new memory segments api would allow for a split nibble to be read from two longs by just fiddling with the offsets, but based on how addressing works in hardware i suspect that'd have to be done in software anyway and might not end up being any faster
hear me out
instead of storing data in long arrays
what if we do a blockstate
and just compute all possible scenarios
IllegalArgumentException - if the access operation is incompatible with the alignment constraint in the provided layout
you can't use the method intended to get it as a long (or any of the provided varhandles to trick around that, it's all the same api), you could however do a copy into a single long-lengthed segment and get that as a single long
something like
try (var arena = Arena.ofConfined()) {
var longs = arena.allocateFrom(ValueLayout.JAVA_LONG, -1L, 0L);
var copy = arena.allocate(ValueLayout.JAVA_LONG);
copy.copyFrom(longs.asSlice(4L, 8L));
long l = copy.get(ValueLayout.JAVA_LONG, 0L);
assert (l == 0x00000000ffffffffL);
}
(or well it would be 0xffffffff00000000L if your platform is big endian, but lmao)
hm actually
the alignment is provided in the layout
scratch that
try (var arena = Arena.ofConfined()) {
var longs = arena.allocateFrom(ValueLayout.JAVA_LONG, -1L, 0L);
long l = copy.get(ValueLayout.JAVA_LONG.withByteAlignment(1L), 4L);
assert (l == 0x00000000ffffffffL);
}
it'd be interesting to try this out, but not really tenable since the longs are sent to the client as-is, and the client will explode if they don't have the padding it expects
we could convert them before we send them but that'd make sending chunks quite a bit more expensive than it is right now
stop laughing at my powerpc!!!
not sure if it's worth the tradeoff
probably not lol
and even then i sort of suspect the reads not aligned with a word boundary are handled in software behind that value layout abstraction, so there might not even be an improvement
could be interesting to benchmark still i suppose
never really know with these things without trying
thinking about using jmh: 👼 😊
setting up and running jmh: 😴 😠
I don't remember it being all that bad
I believe using it is harder considering you have to consider which knobs to adjust to get a meaningful benchmark
well, that's probably just me not being bothered to properly look at JMH's documentation in order to understand that
yeahhh
there are a lot of things to set up and configure and it all depends on what you want to benchmark
benchmarking bias something something
idk
it's like trying to test a random number generator
you can easily get numbers out of it but being confident in that they mean anything takes time and fiddling with the parameters
i love this ebook
I have a problem: i just started create a plugin to add some items and blocks to my server. I create a Tomato and i want a texture with a RessourcePack but idk why, this dont work. If u have any idea, ping me or send me a MP. Thanks
if you want to set the item model, use ItemMeta#setItemModel
nevermind that, I read it wrong
where ? sorry i never did some new version plugins and ressources pack
I still get confused with the new and old format
oh okay
are you developing for 1.21.4?
yeah
if i want to display an image on a map, what should be the res of the image?
Where do you guys learn about the jit compiler?
I don't remember where I started learning about it but I skimped this blogpost and seems like as good of a place as any: https://eme64.github.io/blog/2024/12/24/Intro-to-C2-Part01.html
I assume that you have already looked at Part 0, and that you have already cloned and built the JDK.
if you want keywords to look for, I recommend just searching up java's tiered compilation pipeline and something will pop up
understanding the lifecycle of a method goes pretty far
-# from: https://mostlynerdless.de/blog/2023/05/18/mastering-the-art-of-controlling-the-jit-unlocking-reproducible-profiler-tests/
why is blue more purple when putting an image on a map
did you convert the colors properly
heh, Portal colors
then again, as far I remember it is an 8-bit color depth palette so you're probably just seeing what the lossy conversion looks like
the left is a normal 24-bit depth color palette and the right is what it ends up looking like in a map
how do i convert it properly
don't bother reading the rest of the blogpost unless you want to implement their approach, the color conversion part is the important bit
k
even less
It's more like 100 colors, I forgot
The one they use in the forum is euclidean distance, which won't look that great if you want to display it
if you want better results, you should use error diffusion dithering
Maps have a bunch of fixed colours
There’s 60 base colours which can each be in one of 4 different shades
- transparent
That’s the full colour palette
so 241 colors if we count transparency as a color
Mhm
Technically transparency also has 4 shades
But they’re all still just fully transparent
#youmightwannaseeadoctor
yeah that's pretty much what I did
They are using a weighted color conversion algorithm which can produce different results
it emphasizes the yellows more
the one thing I did, which they didn't is the whole idea of centering and overlapping frames
Their entire system revolves around having a single block for a single frame, while mine uses transparency to allow for the overlap of frames and for them to be offset to be in any position
also their raycasting algo looks off
I need a custom worldborder so that Bedrock players can see it and I can also have a horizontal worldborder in general. My first thought would be to make it like the server MMCIsland with particles. But my minigame starts with a border radius of 1000 blocks, which would significantly affect performance, does anyone have any ideas or things I'm overlooking?
I remember working on this when I last did minigame work
In short it's really easy to make a fancy particle border that looks good
But you'd need some kind of algorithm to decide what parts of it should render
For example, you can say that you can render a border in a 48x48 radius around each player
I wrote this a while ago, might help
You can then abstract it
https://sourceb.in/xL4fPPIwV1
https://sourceb.in/lOuZaWPdOq
https://sourceb.in/bdtRMwTohY
don't ask what any of this means I don't remember
it's been like a solid year or two
Guys 2 questions:
Is it okay to host my minecraft server using docker compose or k8s
And should i have one database for each plugin/gamemode (e.g. 5 mongodb instances) or should it all be in one database (e.g. 1 mongodb instance with 5 sub DBs)
1 database should be fine to start
Mongo moment
And yes you can host it with whatever you like
Ah nice
Mongo is webscale 😉
Thank you mr spigot developer ❤️
So i should NOT use mongo and use something like postgresql?
So like mysql has the most compatibility?
It's the most widely used
Ideally relational data should use relational databases
However I do understand the convenience of just shoving everything into mongo
Usually i would use mongoose to structure the data im throwing at mongodb but i dont think i have that convenience when i use Java
You can store POJOs directly in MongoDB
Whats that
thanks^^
Plain old java objects
Basically a class that doesn’t extend or implement anything and has basic data types in it
Primitives, strings, lists, maps, etc
And then you can serialize&deserialize them?
Yes
Thats cool
It’s similar to gson
So heres what im gon do:
Mysql: 1 instance for basically everything: authme, luckperms, friends&party, lobby gadgets
Mongodb: one instance per custom game mode: skymines, roleplay, blahblahblah
It would be cool to store inventory data and player data in mongodb too and make the server state fully ephemeral but i wouldn't want to go through the hassle
rare correct spelling of luckperms moment
luckyperms
wait it's luckperms and not lucky perms?
yes
lmao
Hey, one question. I started build my own minecraft server from zero. Can i build one big plugin with all features ? (more simple for me)
Hey one question i stated using linux from zero. Can i make all the packages i use myself in one big package ? (More simple for me)
??
You can but if you wanna implement everything from scratch its gonna be very hard.
Like i get it if you are making an smp and make the features yourself
But if youre making a network and wanna manage perms, economy, admin tools yourself its gonna be hard
i dont think so, because i put all deferent think in separate class
i will use luckperms for perms
economy i already create a full system
and admin tools i will create also
but my question was for server stability, idk if it's better 50plugins or 1plugin but big
You gotta leave the hard stuff to the ones who know it
If you got the time and resources then you can
wdm by that ?
Some things are too hard to make by yourself so its best to use a plugin someone else made
Like you cant simpky make an anticheat urself
ofc i can
with some logic, and by using existing open source project
idk you
you're on ur own ayatollah
Bruh
:D
The question wasn't about coding skills at all. It was simply a performance question.
To answer that: Yes you can make a big monolith
Leave that to the owner of the server. Maybe they don't need or want an anticheat, maybe they want a challenge, maybe it's more than one developer.
The question was if they can put THEIR OWN code all in one plugin instead of multiple, to which the answer is yes.
They can still throw thirdparty plugins in where they need them
Technically they can even copy a full open-source plugin into their own with some adaptations.
Although that would just make maintenance a lot harder
Thank u ;)
U dont know
package pl.benycz.core.Commands;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
public class PlayerMessage implements CommandExecutor {
@Override
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, @NotNull String @NotNull [] strings) {
return false;
}
}
how i can change the argument names like commandSender to sender? like when im importing it, i dont need to do it manually
the only other way is if you use import the sources i think
it'll use the names on the parameters instead of infering them from the type
Import the sources
ah right sources*
honestly whenever @crude zephyr asks anything it just blows my mind
lucky perms
25 paragraphs to explain a lookup table
mid article ngl
That is why I just told them to not bother with it lol, it is kinda funny honestly
Hi, can someone tell me why it's marking the event.getJoinMessage message wrong and help me fix it?
You have to set the join message, not get it
oh oops😅 Thanks tho
i remember fiddling with the color conversions back before paper built in that 16mb lookup table
iirc i used range encoding to compress it down to 2mb, lossless and from my benchmarking it wasn't any slower than the 16mb lookup table; memory locality helps with caching
i also vaguely remember trying some lossy compression methods
let me see if i can find my numbers
got it down to 500kb with ~3% of input colors mapping to the wrong of the two adjacent palette colors
looks like i also tried an approach that wasn't o(1), requiring in the worst case searching through 13 possible colors to match to, but that was lossless and 77kb
i originally used it for my own map image thing but since paper bundled in that 16mb cache i figured i might as well use it since it's sitting in my heap anyway
i also vectorized the color matching so those 13 color comparisons were done with one or two vector register ops
an absolute waste of time
I am surprised you still have these projects around to take a look
I either have forgotten my pet projects in some cold storage that’s never going to see light again or just delete them when I am done
Nah you gotta keep em all
You never know when you’ll need that thing you found out how to do 5 years ago
pretty much
having somewhat descriptive project names helps, although even then i usually end up just brute force searching for strings recursively in my projects directory
it does turn out to be useful surprisingly often to have old things lying around
i wish i never deleted my early projects lol
not that the code itself would be useful to me anymore, but the ideas would be fruitful
Thank god for easy Java decompilation, m I right?
guys is this genius or dumb asf?
So it generates a docker compose file? Why can't it be manually created?
its a bit cleaner and modular and it has autocomplete which is the best part
tutorial for how to make a plugin ?
?learnjava
For Beginners:
Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/
For Intermediate to Advanced Learners:
Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/
Practice and Hands-on Learning:
Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/
Free Resources and Documentation:
Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/
Community and Support:
Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/
Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉
im looking for more like a youtube tutorial because im looking to make a simple mod unless you guys dont have a command for that
yes
So guys I wanted to create an loan system in aternos where people can loan virtual currency for 1 day and if they didn't pay on time they are /jailed
Is it possible?
Point but I need help
I wasted my 2-3 hours
Creating loan system
And it's still not working
In my mc server
Is it your plugin
Ok
and don't post in every channel..
Ok
Im trying to make a client sided glow effect but cant figure it out. Im using protocal lib currently but everything I do just disconnects me and says im sending invalid or incomplete metadata. so can anyone help me figure out packets and how to make entities glow
im on 1.21.5 and protocal lib is on 5.4.0 (a dev build that supports 1.21.5)
Guys is this internal plugin okay and just needs some minor changes to come out of its shitty state or i need a full rewrite?
https://github.com/amirparsadd/iransky-skymine-core
I know ask me
random tag xD
And dont mention pls
the md-5 paste wasn't working so heres a pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
So yea see I have essential x economy in my server how can I make shopkeeper trade for virtual currency
Instead of some physical item
Yes
If you are then making the shopkeepers trade some form of physical currency would work
Yes its diamonds currently
Like make a bank and use essentialsx signs to convert balance to diamonds
Like the [buy] and [sell] signs
Ye we have /shop which sells diamond for some rupees
Ye we have done it
with q custom plugin you can do a lot of things
Aternos doesn't support tht type of shit
Hes running aternks
Otherwise I would have done lot of things
well thats an L
And if you wanna do serious stuff you gitta get away frim aternos
lol
Which host is free except from aternos?
you get what you pay for
Skript 2.11.2 supports Spigot or Paper servers on versions 1.19.4 to 1.21.4, with tentative support for 1.21.5.
your pc
your pc probably, but its not gonna be on 24/7
Wdym
Oracle free tier
the server is a computer program
Good luck getting one though
put it into your computer and make it run
Sure
yeah
Well he doesnt pay
what do you think the server runs on
Just make sure no one has it out for you
It's free?
Well you have to pay for electricity
That's another part
And data assuming you don’t have an unlimited internet plan (Do those get offered much anymore?)
I have unlimited data plan and electricity is not the problem
But can it allow tlauncher user my friends are tlauncher user
I'm the only one with original mc
it can
And what abt plugins?
it can do that too
it can run any plugin you get your hands on
?bt
which one of you is going to show him how to port forward
ig the one downside if you want it to be on 24/7 that means your pc needs to be on 24/7
chatgpt can teach him how to port forward
one can hope
Well 2 hours after he goes crazy after his friends are like i cant join the servetr
Railways are for trains and not minecraft servers sadly
I mean I suppose you can put it on a train
Bro railway platform
Might make the ping a bit inconsistent
don't do that, it'll get run over by a train
I connected my discord bot to it which used to run on my pc
And it's 24/7
Till now
It's abt to be month
I think you dont notice that its not 24/7 cuz when u turn off ut pc u cant see that its offline
LMAO
So we can't even connect to it some server or shit to keep it 24/6
24/7*
u can
what r u guys even on baout
just go host it somewhere
go pebblehost it has cheap bot hosting
So the server goes on break fior the weekend?
Aternos free hosting with potato server and 30 mins waiting
aternos is not online 24/7
what
I think it’s finally time to ask wtf railway is
its time to ask
I assume you aren’t talking about a train
what this guy actually wants lmao
Check google
Even though I like trains
No it's a platform like uptime
he wants a loan plugin on his 1.21.5 server
i don't quite know how we got here from there
"check google what railway is"
Wait man
Please note that this guy wants a production ready setup cuz he said he sells in game money for da indian dolla dolla
lol
W
why
This is tht platform
i think ur focusing on the wrong things here
it's some python discord bot hosting thing i'm guessing
how about make a working bot first
Yeah idk how well that’ll handle a minecraft server
with a good insfracture
DUDE RAILWAY KEEPS MY BOT 24/7 RAILWAY.APP
nah looks pretty good tbh
lol
good for u
1GB of ram is rough for a server
Ikr
come ill host ur bot if u ask nicely
Probably the same as what aternos gives tbf
Well just buy a freaking server for minecraft and a PaaS instance for the bot from here
iirc you can sorta barely run a paper server on 1gb but you definitely have to pregenerate chunks
They give 2gb
Ooh aren’t we fancy
They give 500 ram boosts
They used to give like 0.5
Bro
i dont think ur very familiar w ur vocab
it's aternoid vocabulary
500 mb per boost
Jishuana please dont come to iran and if you come and they ask for your name just say its john or something
500 mb per boost
Just dont say ur namr is jishuana
So like 2.5 gb for 5 boost
I mean that’s not even my name
😭 I need loan system for aternos which I can't do using my commands plugin too
well
eyeballing your situation i'm not sure if there's a way to get what you want without forking over some money to someone
it will let you write a loan system, but it will most likely be you learning skript and writing it yourself
you could try browsing spigot for a premade loan skript and see if any match your requirements
It literally means "shit's piss"
Ok thx
like 80% of the resources on spigot are skript apparently
and explosive
Well it is Turing complete
Brainfuck is also turing complete
one of these days aternos is going to put a limit on the number of skripts you can load and the entire skript ecosystem will collapse overnight
Granted if you’re going to learn skript I don’t see why you wouldn’t just learn java
Don’t worry, there’s still minehut
🤡
Minehut doesn't suppot offline mide but if theyy. Start doing. That eventually they will get a shit tonna new users
They only give you like 4 hours a day for free
But you can use custom plugins so there’s that
minehut used to be free
How do I stop players from picking up arrows?
My Attempt:
public void vanishPickupItem(PlayerPickupItemEvent event) {
User user = Server.getUser(event.getPlayer());
if (user.isVanished())
event.setCancelled(true);
}```
use PlayerPickupArrowEvent instead of pickup item
When was that added?
Good evening,
maybe someone has found workarounds?
Bitmap font glyphs used for chest GUI background render before items in 1.21.6 when using "negative space"
https://report.bugs.mojang.com/servicedesk/customer/portal/2/MC-299025
You could also listen to the ProjectileLaunchEvent/EntityShootBowEvent and use the AbstractArrow#setPickupStatus method with PickupStatus.DISALLOWED so that nobody can pick it up
I just dont want players in creative picking them up
The pickup event works for gm 0 cancelling but not in gm 1
Then set the pickup status
NEED MY PLUGIN TAKEN DOWN I WAS TRYING TO POST IT FOR $ AND NOW I CANT EDIT OR DELETE IT PLEASE DM ME STAFF
i believe you need to turn on 2FA to update plugins on spigotmc
lmao
Thanks for the download gng
hi , what is this? (write-behind queue) ?
and how i can use it for saving data into database?
write-behind is basically after an object is modified in cache, it is later updated on the db after an interval
looking for a good developer can make towny hes own plugins we have pre made server + list
?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/
mfer is paying 800USD apparently. get rid of that message, dm him and secure that deal!!!
whats the most efficient way to destroy a block a few seconds after it was placed? I don't think a Scheduler for each placed block is a good idea
Hellooo does someone know how to add unicodes without shadow in the 1.21, obviously with a resurce pack
You could use a single scheduler and timestamps/instants
doesn't make a practical difference at such a low volume of tasks
the bukkit scheduler is kind of shit, especially for one-off tasks, but even then you'll need hundreds or thousands of one-off tasks per tick to make a dent in timings from scheduler overhead
then wait until users find out
so if 15 players spam blocks
that'll be at most 15 tasks per tick
you mean it wont affect my performance?
the impact is negligible
and cooking up your own scheduler will probably just perform even worse than the bukkit scheduler
go with the save solution, not the lazy one. having a central space where your tasks are handled is better anyways maintenance wise
what jishuna told you is your way to go
yeah it works just fine for me
the bukkit scheduler api is fine for things like these, there's no point to creating your own scheduler for it
anyone knows how to generate javadoc for spigot server jars? i mean for remapped internal stuff NMS & OBC
you'll just have to maintain and benchmark your own scheduler rather than gain any benefit from it
im using decompilers atm but need javadoc, ( i dont want spigot-api javadoc )
There is no javadoc for nms
im observing jd-cli but dont know how to use it.
there is way to generate javadoc from jars
Do you just want a list of methods
i want to see that which class implement which
?mappings
Compare different mappings with this website: https://mappings.dev/
^ should show inheritance of classes
Hi how to use dialogs on a plugin, is there any documentation? And is it possible to use dialogs dynamically? Basically, I want to be able to create buttons as I want from Java code.
iirc the api isnt done yet
dialogs api?
i guess
oh wait it looks like it may be done actually
the dialog is defined in bungee
oh thats cool
player.showDialog
if you make a new Dialog everything to use showDialog you can make it dynamic ig
depending on how dynamic we are talking
yes, finally we no longer need an anvil for simple user input
Any idea if changing the damage in EntityDamageByEntityEvent can affect ItemDamageEvent
because ts aint firing when someone takes damage
Anyone knows which classes should i look when i learning how nms network (a.k.a packets) works
it depends, sending packets or intercepting incoming/outgoing packets?
I removed my listener entirely and items don't take damage when I fuck with the damage event
hm, I wonder if there are resources in the spigot forums for that
both
i want to learn both.
I've heard good things about PacketEvents library, but I've never used it myself
today i observed Packet, PacketListener, PacketFlow, ConnectionProtocol etc
do you mean ProtocolLib
packetevents is goated
you can totally deal with internals yourself but many people seem to like PacketEvents
these days i've sort of started to lean towards just injecting into the netty pipeline myself and using nms to mess with the packets
apparently my issue has to do with the damagemodifier api
calling setDamage fucks with ALL the modifiers

and that affects how much item durability the damage does
typical broken api
ever since paper's mojmapped server builds i completely abandoned using protocollib or any sort of wrappers for the packet classes themselves, and only used protocollib to intercept them
yeah only reason I haven't used PE is because paper is just mojang mapped + channel init listener hook so it's dead easy to work with that
but if I had to work for spigot, well, I'd refuse lmao
otherwise I'd go for PE
I’ll spigot your paper
💀
bro fuck this damagemodifier api can't even set the damage without affecting durability
got me fucked up
api older than half of us
Isn’t that api deprecated
i always had a gut feeling something like this would be the case and avoided the api from afar
i'm willing to bet you're almost better of calculating and applying all damage yourself with your own damage modifier system
I do that
but it just calls event.setDamage
which fucks with item durability
with fucks with something else
I don't need this crooked system but I also don't want it fucking with my item durabilities
in this case I make the damage zero because some ability mitigates it
shouldn't make the armor unbreakable
im wondering if there's any implications splitting your fat interfaces into slim ones and then using type parameter to specify the narrowed type for the client class to depend on, like this:
@NullMarked
public class CachedPasswordRepository<T extends PasswordWriter & PasswordReader & PasswordChecker> implements PasswordWriter, PasswordReader, PasswordChecker {
private final T repository;
private final LoadingCache<UUID, Optional<String>> cache;
private CachedPasswordRepository(final T repository, final LoadingCache<UUID, Optional<String>> cache) {
this.repository = repository;
this.cache = cache;
}
// now you can access only read, write and check methods for password store
...
}
what do you guys think of this kind of go-ish approach where the class doesnt care what implementation or interface it is as long as it implements atomic interfaces it accepts it
you can future proof your code in a way you dont hardcode fat interfaces and only provide interface type which is really needed for implementation
kind also works with ISP principle of SOLID
its the best of both worlds, you can keep your API contract future proof by not tying it into bigger than needed interfaces and also encapsulate it for internal implementations if specific implementation relates operations between each other (for example caching reusing the same cache object, or database operations by relying on the same datasource reference/connection)
also you dont need to come up with weird names for such implementation specific interfaces
i think this looks more complicated than it has to be
its like in go, where you declare what you need in the implementation side:
type Reader interface {
Read(p []byte) (n int, err error)
}
type Writer interface {
Write(p []byte) (n int, err error)
}
func process(rw interface {
Reader
Writer
}) {
// You can call both Read and Write on rw here
}
that way you declare what you only need in the code unit, sure this looks complicated, but then you have the ability to not tie in the implementation specifics into higher level class since you declare the contract in the client class not outside of the class
you can also design narrow mocks for specific use cases without implementing whole fat interface, you can also implement one fat interface mock and reuse it since it accepts any interface which has corresponding functional interfaces extended
within constraints this is actually a pretty elegant approach.
this looks very flexible, imagine if new collections api would be made of atomic functional interfaces like Addable, Iterable, Deletable, Clearable, Readable, Writable etc, then you declare what you want on the class. for example you can make immutable collection which you can only read via static factory methods like this:
var collection = Collections.builder(Foo.class)
.add()
.contains()
.build();
and then use specific collection like this:
public <T extends Addable<Foo> & Containable<Foo>> add(T collection, Foo foo) {
if (!collection.contains(foo)) {
collection.add(foo);
}
collection.remove(foo) // compile time error since type parameter doesnt infer Deletable functional interface
}
the implementation of collection could be JRE vendor specific it can either downcast from AIO collection or implement specific one using some kind of chaining
i wonder if there's a lib like this yet
hmm
that just looks annoying to use for client code ngl
I see you getting forced back to using combining interfaces
why, it just that type infers of IDE's would probably struggle, but its future proofing your code dependencies to the narrowest types possible
you cannot polymorphically store or pass around collections like this
you can supply more fatter collection interface and it will still accept
why not?
you can just provide default fatter impl factory methods ,like Collection.set() which would build fat one
You're forced to propagate the generic type parameter everywhere tho
is that bad tho
if java allowed for type aliasing and declaring union types on 3rd party types, maybe, but otherwise, what shaikko said
like i said, annoying to use in client code
highly annoying
having to write the same thing over and over again
maybe java spec could introduce some syntax sugar to this but hell i like this
lets see if i could utilize this properly in my plugin
at that point i'd rather just use another language that allows for this more nicely
like scala
^
this is not the kind of design that would be easily taken in java
and that's fine
it fits in other languages so i'd rather just use them in that case
this got me thinking about witness pattern/phantom types
Slick does this I believe, think it would be enormously overkill for this.
Hey dumb question, but what event fires when a player clicks a bounding box
is it PlayerInteractEntityEvent
Yes
except for armour stands where it calls PlayerInteractAtEntityEvent
whats a good way to get an area that is in the edge of my set of areas
AAAA
AAAB
AAAA
like in here I want ot get B
each area has a BoundingBox
what do you mean, like find the boundaries?
if ur working with a Set of Areas, maybe u could calculate the center of their combined area, and then distance check to see what ones are the furthest from the center?
that wont work
oh :(
my example was not exactly great
there is a scenraio that it will look like this
AAA
AAAB
AAAAAAAAAAAA
A
A
Wonderful depiction
there isn't exactly a central area
well it can be random
my goal is to get all the areas in the edhe
Would that not be every area in the example
is this example yes
this is just an example
AAAAAAAAAA
AAAAB
AAAAAAAAA
AAAAAAA
well if I can get B I can get every edge
For each box, check if it is surrounded on each side by another box
If it isn’t, it’s on an edge
(Or corner)
check north, south, east, west neighbors
if any direction has no neighbor:
A is an edge area```
well thats the easy part
how do I check the neighbors
I use R-tree spatial indexes in my plugin
thats probably highly overkill for what it sounds like you are trying to do. If you provide more context I can point you in the right direction
There are many ways to do what you are asking, not all are good for each use case
I would suggest maybe doing some research into how you could implement this for yourself, and if you have specific questions, ask them here. this is not really an area where we can just give you code solutions to the problem with minimal context.
I just want to be directed to the right direction, I don’t need the code
Well thanks for the help
I will do some research
so you are talking about pathfinding?
aha, 4 am realization. right direction to research, not anything ingame
we're dumb @icy imp, i spotted you
I would look up boundry detection, spatial adjeceny queries, etc
pathfinding is not this
yeah figured, but tired it sounded like it lol
I'm pretty new to development but love trying out new things. I had a couple of questions about dialogues and their availability on Spigot.
Why are dialog only on Bungeecord? Will they be added to the Spigot API? How do I use them? These might be silly questions, but I'm still learning!
The bungee chat api is part of spigot
oh ok
Only the chat api
ok
?jd bcc
If I wanted to disable another plugin's EventHandlers for a specifc event for a specific condition, how would I go about doing that? I need to override McMMO's EntityDamageByEntity EventHandlers to not modify the damage in specific scenarios
I already tried unregistering the RegisteredListeners of the event, however that does it permanently and makes it so that their EventHandlers don't listen for any subsequent EntityDamageByEntity event, which isn't what I want
I thought about passing the event manually to their EventHandlers, but they're not static, so I can't do that
There's not a built-in way to interfere with other plugins event listening.
Can't you keep it when you unregister it? Not sure what you mean by not static
Ah, I meant that the EventHandlers aren't static methods, so I can't just call them directly. I did find a possible solution though. McMMO offers constructors for their listeners, so I did it this way:
...
for(RegisteredListener listener : EntityDamageByEntityEvent.getHandlerList().getRegisteredListeners()){
if(listener.getPlugin().getName().equals("mcMMO")){
EntityDamageByEntityEvent.getHandlerList().unregister(listener);
}
}
mcMMO instance = (mcMMO) Bukkit.getPluginManager().getPlugin("mcMMO");
EntityListener listener = new EntityListener(instance);
mcmmo_entity_listener = listener;
}
public static void passEventMcMMO(EntityDamageByEntityEvent event){
mcmmo_entity_listener.onEntityDamageMonitor(event);
mcmmo_entity_listener.onEntityDamageByEntity(event);
}
Why not
Wdym by that?
Also I'm unsure if this is a good idea or not
https://github.com/JanTuck/EventDebugger/blob/master/src/main/kotlin/me/jantuck/eventdebugger/EventRemapper.kt i did so ages ago
Why can't you just keep and call the listener you got from the loop
Oh yeah that's very true. I don't know how I missed that, thanks
I'll check this out
Basically just overwrote an executor.
So u could take out mcmmos executor, and package it up in a nice package of ur own with some conditional check of whatever u want and simply only invoke the mcmmo one if the check passes/fails
guys SPI or reflection ?
SPI all the way, it is the clean and intended way of, well, finding and choosing a service provider
it might use reflection under the hood (it does, but that's not the point lol)
i wanna make a dropkick ability. but i cant decide if i should use animations (idk how they work) or go back to sketchy ahh armorstands and #setPose thingies
What animations
What's the right way to detect the java version a server is running?
Runtime.version()
Isn't that like java 9+?
:p you asked "what's the right way to detect the java version", and, well, that's the right way
in that case System.getProperty("java.version") probably, but idk the format of that in java 8
i mean if the Runtime class exists then it's definitely java 9+ so there isn't much to test if it doesn't exist, it's just java 8
err, the method Runtime.version(), not the class
what is the proper way to configure SPI in DIST Project?
i mean we have to add meta-inf stuff but how to configure it in shade plugin?
ItemFlags have been expanded quite a bit.
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/ItemFlag.html
You probably want ItemFlag#HIDE_ENCHANTS or ItemFlag#HIDE_ENCHANTMENTS
meta-inf should be in each sub-module right ? Because all nms sub modules have my api as dependency
finest use of OOP design pattern
Ah you used it as a submodule; Sorry, didn't see that
It's for 1.21.6 right? i'm currently on .4, and on the .4 doc they haven't reworked the flags. that's why i'm confused 😕
Ah, looks like all those new flags were added in 1.21.5
You could try using ItemFlag#HIDE_POTION_EFFECTS
Enchanted books are weird. IIRC, mojang didn't categorize enchants properly on enchanted books and is instead displayed as potion data.
I'll try that, thanks 😊
Is there a way, that I can kill a player if he does something specific? If yes, what is the code to do so?
Does what?
It should just kill the player that does a specific thing
Either set the player hp to 0 or deal damage to them
Try using player.setHealth(0.0)
ok, thanks
This doesn't even exist, no idea where you found that ngl 😅
hide_additional_tooltip should work fine
what's your current code like?
also output of /version
Are you using paper?
no? this is the spigot discord, not paper.
EnchantmentStorageMeta meta = (EnchantmentStorageMeta) book.getItemMeta();
...
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS, ItemFlag.HIDE_ADDITIONAL_TOOLTIP, ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_UNBREAKABLE);
...
book.setItemMeta(meta);
return book;
and i'm running paper latest 1.21.4, but coding on the actual spigot api, not the paper one.
also feel free to ping me if you reply, otherwise i won't see your messages 😅
running on paper is what could be the issue 
Since when? i've worked like that since the 1.8 days, so everyone can use my plugins even if they're on spigot or paper
paper hardforked from spigot in version 1.21.4
read their blog post on it
tl;dr for this support discord tho, replicate stuff on spigot not on paper even if you are using the spigot plugin API
yeah well i can't work like that, it's already hard maintaining a multi-version plugin without breaking anything on ONE api, and now i need to actually compile and maintain my stuff agains't another api who's gonna change everything
ffs i hate changes
drop old versions ez
petition to make a fromHex method on bukkit's color class
fucking java awt color always assume the alpha as 255 when I call Color.decode
Who even uses old versions I pretty sure people use mostly 1.8 or latest

i would if mojang didn't drop a new version every weeks lol
and bukkit's color just shits itself instead of ignoring it
so I have to write this ugly code
ew
ew
lol easy for you to say i guess?? i just found out i have double the work
bukkit my day1 op
it isn't easy to say, those are your options
you only do double the work if you want to support both
(not that the paper and spigot API have diverged a lot since the hardfork, the things diverging is new API added to spigot and paper respectively)
yeah that's also why i don't understand my code not working, it should be the first version from the hardfork (and the itemflags didn't change since like 1.13 iirc)
i don't think paper changed much with their first version hardforked, but i could be wrong ofc
i HAVE to support both if i want to publish on spigot.com, THAT'S the problem
for enchantment bookes specifically, HIDE_STORED_ENCHANTS is the thing you'd want to add
spigot.com? 💀
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/ItemFlag.html#HIDE_STORED_ENCHANTMENTS
declaration: package: org.bukkit.inventory, enum: ItemFlag
this one
spigotmc.org sorry, always forgot they got this url
Well no, to publish there you only need to support spigot
yeah but this is for .6, i'm on .4 specifically
uh
and they didn't change the itemflags on .4, it's still the old system
probably a thing in that version too?
https://jd.papermc.io/paper/1.21.4/org/bukkit/inventory/ItemFlag.html#HIDE_STORED_ENCHANTS at least paper had that flag in .4
declaration: package: org.bukkit.inventory, enum: ItemFlag
idk how to get spigot javadocs for older versions
package index
ffs paper changed it on their first hardfork
yeah but everyone is on paper, that's the problem. spigot website is the most popular plugins website, but you can only publish IF you support the actual spigotapi, meanwhile everyone is on a paper server.
it's a difficult issue
anyway guess i'm dead for that issue, i can't rewrite an entire plugin for a new api and re-check thousand of lines for next week
you don't need to check thousands of lines
I mean, at least for 1.21.4 the solution should be easy enough still
it's not like the paper api has changed in its entirety since hard fork
yeah but i need to support both 1.8 and 1.21.4
check if you are running paper, ItemFlag.valueOf("HIDE_STORED_ENCHANTMENTS"), otherwise HIDE_ADDITIONAL
okay?
that still doesn't mean you need to check thousands of lines lol
anyone versed in the cloud command framework? I'm trying to make an greedy list of strings that come from a specific collection
it dies after the first input
and I think it's something to do with suggestions
i mean i like to be thorough, i wanna be sure of everything.
anyway it's fine, it's just a small thing, but now i'm worried about other things
as time goes on, the APIs will be more and more divergent since they will differ on new API features
existing things won't really change for quite a while
|| ItemFlags seem to disagree
||
Such depth
yeah they said that but look, itemflags changed on the first version of the hardfork.
well that system diverged even further in 1.21.5
idk spigots item flag stuff now is a giant list of all data components types
i'm also using damagemodifier 💀
cooked
yeah i saw that, seems i really picked the wrong version for my plugin lol
How to handle items resulting from the Shift click event, I want to get the distribution of items in an inventory after the Shift click and modify them
i just split the paper specific functionality (under 50% of the plugin, but all the nice things) into classes that never get loaded on spigot
until i eventually forgot to add an if check somewhere that made the plugin explode on spigot, and after not checking the resource page for a few weeks I found it was deleted with seemingly no option for recovering it
it was something of a shame, but that particular plugin was at the end of its lifetime anyway, since fucking billy stole the entire feature into purpur, so i didn't bother making a fuss about it