#help-development
1 messages Β· Page 380 of 1
Doesnt matter. EproCommon is also not a plugin.
so which one is the main thingy
What are you trying to do?
`--> Master (Parent)
--> Master-API
- src
- pom.xml
--> Master-Core
- src
- pom.xml
- pom.xml`
there you have a more clarify example
im trying to make nms in each module aka 1 class that contains all the version nms that is implemented into the main module
If you see the parent, doesnt contain any src folder
So there you need 3 modules
yes
and then each module per nms implementaiton
yep
take i ncare what i sent on top
here
Care that parent module, doesnt contain any src folder nor any code
Bit outdated but the core concept is the same
okay i'll check that out
but like im still a bit confused, since like will they all act the same with each one having an onEnable function that all run at the same time or is there a main one that only runs?
Remember when I said Maven modules are basically just subprojects?
yep
One project is nothing but utilities, classes, interfaces, etc., the other is an actual Bukkit plugin that extends JavaPlugin and whatnot
Or however you want to structure it
Its a pretty advanced topic. You basically need to define a bunch of Interfaces in your main project and
every module needs to provide an implementation. Like CraftBukkit provides an implementation for Spigot interfaces.
okay but if the main src is removed which one would be the main one? That's all
Both subprojects get built
They each get their own .jar
The parent project is empty. It's kind of like a dummy project that you can target build commands with to build all of its child projects
Well you would shade one project into another, then the one that was shaded contains both
It's like when you shade in some other dependency from Maven central, only that dependency is the other module instead
ahh
so i found this: https://github.com/DRE2N/ItemStackLib
which has multi maven projects
ohh i see now
the first pom is just a dummy for all the modules
Yes
but this is all it has?
That one's a bit of a bad example because it's a library, not actually a plugin lol
which none of the classes extends JavaPlugin
ahhh
In theory, if it were a plugin, that core module would probably have a JavaPlugin class in it
This uses Gradle but it's a similar concept
so technically, the first pom has every module which gets run? And then which ever one has the paper / spigot dependency and the JavaPlugin class will be the main?
Well, "main", yeah
You'll notice this "dist" module depends on all of the modules in that project, https://github.com/DRE2N/ItemStackLib/blob/master/dist/pom.xml
Then just shades them
wait so instead of my making a paper project i make a "New Project?" and then add the paper on later?
Your parent project is just a regular ole Maven project, yeah
You could include the Bukkit/Spigot/Paper/Whatever dependency in your parent pom.xml though because I'm sure your API and plugin will both use it
okay so like this?
Yep, and that Core would be your JavaPlugin class
Then you could create another module called API, and have your Core module's pom.xml depend on your API module. Then add Maven Shade
?
!paste
oop
okay so
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.
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.
The <parent> part is wrong if I'm not mistaken
<parent>
<groupId>me.outspending</groupId>
<artifactId>core</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>```
Shouldn't this be
<groupId>org.example</groupId>
<artifactId>PaperTesting</artifactId>
<version>1.0-SNAPSHOT</version>```

well now how would this work?
still dont understand why its "org.example"
( this is another module )
It needs to be the group and artifactId of your parent project ofc...
ok
Show your 3 poms
this is in the Testing module
alr one sec
Main: https://pastebin.com/2fBg7RQT
Core: https://pastebin.com/rYQ4a8sc
Testing: https://pastebin.com/cfp3LG84
ohh im so dumb
This is inside your Main. Core and Testing need to define this as paren
Your Main pom should look like this
And your children only need to define another artifactId:
huh?
I dont know the purpose of Core and Testing so i dont know where you are having difficulties right now
If you want to achieve a moduled nms setup then your Core never depends on any other module.
then what should i do? Since im adding each nms version in a seperate module
then having a class that implements a interface
from API
( another module )
Ok then Core only depends on API
And every implementation module depends on API
yes
Then you need another module named Distribution which depends on
all modules and throws everything into one jar file
but how would i implement the things from another module to another
*But has no code in it
this is so confusing, how would it throw everything into one jar while without any code? Couldn't i just implement everything into Core then put code in there?
API defines the interfaces. Core uses those interfaces (But it never knows the implementation)
And the implementation modules each just implement all interfaces of API
You will have a gargantuan mess then
okay, but how do i use things from another module ;-;
well, if i need the access the interfaces from API how would i access them in Core?
because the dependency wont work
ohhhhhhhhhhhhhh
couldn't thank you enough, sorry for taking your time
just some more practice and i should be good now i know the template
okay one more thing, how would i exactly put it all into 1 jar?
π
Extra module -> only has a pom which uses the maven shade plugin to throw all other modules into one jar
Click on the dist module
And then the pom
so would that implement all code into that 1 jar?
Yes. It shades everything into it
Not entirely sure why they did that tbh. They could have done exactly that in the core one lol
Yeah
my Core has the paper dependency so that means whenever i run the plugin that would be the main?
i removed the paper dependency from Testing
There's really no concept of "main". They're all separate projects
Well... Then you clutter your classpath in the core with all the implementations
let me reword it, Core has the onEnable method which means that would be ran?
Yeah the built .jar file would contain it
You could put your onEnable wherever you wanted. It depends on what the plugin.yml says.
But yes. Your Core should contain the JavaPlugin class and all the logic for your plugin.
okay
and i got this
i added the dist
which adds everything together
but it broke
it should have been found?
tbqh I'd personally not have a dist module lol. I think it's a bit silly
Unless you really care about this. Though I don't think it matters
You probably just haven't built the dependency first. You would have to depend (and install) the -testing artifact
mvn clean install will install it to your local repo, then you can build the other project that depends on it
Order matters there
ty kind sir
okay so this jar should contain everything?
let me try to run it rq
It should, yes. You could open it up with an archive viewer like 7zip or winrar and see the class files to double check
Or, yeah, just try and run it lol
?npe
The NullPointerException, (commonly referred to as NPE), is thrown in the following cases, but not sealed to: 1. null is passed into a method or constructor which does not allow it; 2. When trying to access a field on an object pointing to null; 3. Casting null to a primitive. See https://stackoverflow.com/a/3988794/17047120 for information on how to debug NPEs.
π Recently learned about this
But i cant understand the why i just want to fix this shit
Inventories can contain null values for empty slots
Yes
anyone here use neovim as their primary ide ?
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:178) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:155) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.loadPlugins(CraftServer.java:423) ~[paper-1.19.2.jar:git-Paper-307]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:278) ~[paper-1.19.2.jar:git-Paper-307]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1100) ~[paper-1.19.2.jar:git-Paper-307]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.2.jar:git-Paper-307]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
... 7 more ```
π€
which plugin.yml
lmao
help
Mysterious
oh wait
What could this stack trace mean?
yeah
^^
Probably nobody... Spigot is mainly Jetbrains teritory.
iβll be the first
Look into your compiled jar and see if the plugin.yml is in there
Also make sure your build section has the resources entry
this is the dist pom
The Core pom
Nop smile
till same issue, items are not getting saved, but now without NPE
Oh i see. You are missing the maven shade plugin
in the main pom?
or all
only the dist
ahhhhh
all poms need the shade plugin correct?
or just the dist
still doesn't have anything in it
I got some stuff to do
damn π¦
but why doesn't the dist jar have anything in it?
this is all i need
π’
What the isuse josh?
How come we have Player#breakBlock(Block) but not Player#interact(Block)
I just had an issue related to the menu items, when i select an item from the menu and drag it, in another slot, the item which i select to get drag still appear on the menu
π€
Dist pom: https://pastebin.com/ek8XVyT7
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.
;-;
it has the plugin.yml from Core but that's it
josh re check everything
You must be forgettting something
Either plugin.yml not gettin inside the jar or the plugin.yml contains an invalid vlaue
Failing to decompile plugin.yml in jar
GG
but wont implement into the dist?
I fixed!!!
?
More than 6 hours coding a fucking editable menu
core and testing has code but dist has nothing
Lol
GG π
mike help
Now your turn josh
I wil ltry helping bro
Send me a picture of all your modules showing the resouces and src of each
everything else does
basically i want to see your proejct structure and also send me the issue
?paste
Did you remember to place plugin.yml in source
yeah paste the issue there
And not in random folder
but i'll send Core and Testing
testing and core work
i think
...
...
im so dumb
nvm still didn't work
must be something with my maven config
would i clean the whole thing?
hmm
okay, but why wont it add the code into the dist jar?
i thought it was something to do with the maven run config
i am
hmnn
can you upload whole project to github?
Its better for me
right, tagg me pelase
Because im doing some things and i can forget
π
@sterile token https://github.com/oShadxw/MavenHurts
this is everything in the dist jar
I built off dist
Using clean package
Only has the plugin.yml from Core? Which is weird
Core = paper plugin (main)
Testing = is just a test aka API
Dist = puts everything together in one jar
Hmn right, i would make the core contai nall
Core and Testing work fine has to do something with dist
wait your strucutre is really confusing
Ik
yes, that's what they told me to do
Explain me your final goal
And i wll make u the struture
so i can run all the other modules into one
i dont recommend using that structure
what would you recommend then?
you will use nms?
yes
so you will have many jars one for each nms?
just 1 per nms
yeah what i said
I would do it like this:
Project-Name (Parent)
Api (
Will only contain interfaces or abstract classes)
1.17 (will require modules, api, same for each different version you wan to support)
Core (will require all different versions, and will put them all together, also this module will be the only one contain the main plugin class)
api will have an interface that will be implemented into the nms too
so i can set the nms version using the interface
ofc
i just want to get dist working right now so i can make a good structure
I cant help with that structure, its a mess
Harcoded?
You can make use of Configuration class for working with yaml files
Hardcoded configs? You mean a data class?
So check if the paths exists, if not getDefault() and add them
If I understand they want to load a config into a specific class
Something like Jackson
no no
He wants to check if config path doesnt exists, then add it
thats what i dunderstand
Is that what you want sleepy?
Hee?
Please send your code
i cant udnerstand what you doing
Because harcoding doesnt mean that ΒΏ'
Final really doesn't mean anything besides a statement of finality
If you do it right then anything can be final in a class
final, means that a field cant be changed
final is used for fields which are not going to be modified
For example constants
If you mean what does final do on java
Then that field, can be modificable
Maybe mike explains better
If it's a private field in a class you can prevent modification by only allowing it to be read
What are you trying to do here? Be as specific as possible
I cant udnerstand what he doing
more descriptive please?
Yes anyone who decompiles can see it
that has nothing to do with decompilation, all java code can be decompiled unless its obfuscated, but there ways to over engeenier it to get the code back
You should use it because you're stating something is final. It should not be an excuse for bad programming though.
I mean final is a Java acess modifier, which has nothing to do with decompilation
Something that is final in nature can be made final without needing the value to be declared as such
okay so i did that
aka
right
So core must depends on Bukkit_1_17_bla
let me find you an exmaple about something like that it will be easier for you
okay so just implement all the modules into Main then get the jar from Main?
π€
you broken my brains
uplaod current code
does spigot have built in path finding
π
Now listen
NMS modules will depend on the paper jar for each version, but with scope provided, because you dont want to get them shaded
It prevents it from changing later on. Non critical if you dont mark stuff as such but more to do with best practices as well as the conpiler and jit occasionally can optimize better when its marked as such
I will open a thread
so we talk easier
Multi modules
let move there
Should have asked me... My code looks like this for a reason π
Given this is a bit older and im not 100% into all this finality anymore
Its mostly a compiler optimization then anything but should be used if you want to conform to so called strict standards lol
So to explain final for more thorough
There are 3 places it can be used
Objects, methods and classes
https://github.com/domisum/CompitumLib
can someone help me install this it has no docs but i want to use it
You use it on objects to make them constants. When used on a method it prevents the method from being overriden and when used on a class it prevents inheritance
@quaint mantle hope that helps better understand its use
clone the repo and build the project using mvn install
Then you can add it to your own pom
<dependency>
<groupId>de.domisum</groupId>
<artifactId>CompitumLib</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>
If ur asking what ppl prefer, I prefer gradle.
both are bad in their own little way
I'm using the destroy entity packet from protocollib but am struggling with inputting a list, they all come back with cast errors:
Cannot cast java.util.ArrayList to it.unimi.dsi.fastutil.ints.IntList at java.lang.Class.cast(Class.java:3889) ~[?:?]
IntList.of(yourId)
i personally prefer gradle and am slowly moving over
where do i run mvn install
In the folder that the pom is in
that doesn't appear in my tab complete, is it something I need to import?
?
I type "IntList" and it is just red and angry aha
Yes ofc you need to import it. But your IDE should do that for you
Give it a try. Ignore people who want to compare in terms of performance. I say this because both can perform quite well. But unless you have something that is super large like compiling firefox for example you wont really see the difference. Also both have different ways they perform. Gradle will use all the resources available from the start and will only use less if you tell it to use less. Maven is the opposite. It will use the least resources and will only use more if you tell it.
Apologise I meant depend on. My IDE is not tab completing it at all
What Plib version are you on?
5.0.0
Then you should have it. Its in Spigot even.
Hmm, not sure what's caused this then
What spigot version?
If on intellij and having issues, invalidate caches and or restart the ide. All others just restart the ide
Yeahh I restarted the IDE
Hm. Looks like spigot-api does not provide it. You need to include spigot in your project
Well sometimes that isnt enough with intellij hence i mention invalidating caches
ahh ok
Would plib not provide it?
it may well do- sounds like a lot of digging haha
I'll swap out spigot-api for spigot then, easiest option
thank you for the help!
anyone got a better way of doing this? Or is this fine?
private static void setNMSVersion() {
String version = Bukkit.getServer().getVersion();
switch (version) {
case "1.17" -> {
NMSVersion = new V1_17_R1();
}
case "1.18", "1.18.1" -> {
NMSVersion = new V1_18_R1();
}
case "1.18.2" -> {
NMSVersion = new V1_18_R2();
}
case "1.19", "1.19.1", "1.19.2" -> {
NMSVersion = new V1_19_R1();
}
case "1.19.3" -> {
NMSVersion = new V1_19_R2();
}
default -> {
Bukkit.getLogger().warning("Your server version is not supported by HologramSK!");
Bukkit.getPluginManager().disablePlugin(plugin);
}
}```
personally i dont think this is fine
and im lazy to use patterns
so like
Could use enums instead
Looks fine to me honestly
You can stuff the new object creation into enum as well otherwise what you have is fine
Its only ran once, so no performance concerns.
Does anyone know how to use mcedit or minecraft region fixer?????
true
Yeah wasnt mentioning using enums for performance reasons. Just if they were just not happy with the look to give them an alternative code layout lol
Yeah but going the extra step of using Enum.valueOf() is kind of whatever
But sure an Enum with a Supplier<NMSVersion> could work
Wouldnt even need to do that either
many people know that
Well it needs to be lazy
If you create an instance of an NMSVersion which is not on the classpath then everything breaks down
Yeah only caveat to be careful with in regards to enum
my nms thingy looks like this lol
/**
* Initializes NMS features. This needs to be called for all methods annotated with {@link NMS}
*
* @throws NMSNotSupportedException when the currently NMS version is not supported by this version of JeffLib
* @nms
*/
@NMS
public static void enableNMS() throws NMSNotSupportedException {
final String packageName = JeffLib.class.getPackage().getName();
final String internalsName;
if (McVersion.current().isAtLeast(1, 19)) {
internalsName = "v" + McVersion.current().getMajor() + "_" + McVersion.current().getMinor() + ((McVersion.current().getPatch() > 0) ? ("_" + McVersion.current().getPatch()) : "") + "_R1";
}
else {
internalsName = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
}
try {
abstractNmsHandler = (AbstractNMSHandler) Class.forName(packageName + ".internal.nms." + internalsName + ".NMSHandler").getDeclaredConstructor().newInstance();
} catch (final ReflectiveOperationException exception) {
final String className = ClassUtils.listAllClasses().stream().filter(name -> name.endsWith(internalsName + ".NMSHandler")).findFirst().orElse(null);
if (className != null) {
try {
abstractNmsHandler = (AbstractNMSHandler) Class.forName(className).getDeclaredConstructor().newInstance();
} catch (final ReflectiveOperationException ignored) {
}
}
}
if (abstractNmsHandler == null) {
throw new NMSNotSupportedException("JeffLib " + version + " does not support NMS for " + McVersion.current().getName() + "(" + internalsName + ")");
}
}
hmm
i mean, how do you even access your NMS stuff? are you not using multiple modules?
I have to use reflection because otherwise the core module would depend on all NMS modules
Which it does in his case
then how would one remap if all NMS stuff is in the same module o0
I told him that his classpath will be cluttered with all the nms versions. Choco told him that its fine.
Usually you would use a 3rd module which contains no code but only a pom with all nms modules and the core module.
It simply shades all nms modules and the core module into one jar
Sup guys
Dont need to remap if you dont deobfuscate
o0
But why would you not?
yeah
I use obfuscated code to increase my brain power and lower my brain cells π
I'm now downloading linux to completely ruin my life as well
imagine extending EntityInsentient, then overriding the x() method lmao
instead of using the proper names
lol
Since obfuscated code isnt anymore difficult for me to use or look at, i would be one of the few who wouldnt bother with the remapping stuff
(EntityPlayer) ((CraftPlayer) player).getHandle().b.a.k is good code
If you dive deep into mojangs registry fkery you will beg for some mappings
true
Suppose that is the advantage of knowing the code since essentially the beginning
Depends
but it doesn't even work properly anymore, you need to use remapped for some things
e.g. to extend Entity
Improper return type
as you can see in my picture, I did not declare any y() method
Wait wtf
it comes from the obfuscation of the super classes
How tf is minecrafts own code clashing
that's why one needs to use remapped for these things
IntelliJ smoking smth again?
no, it also wouldnt compile
What happens if you 'Implement methods'
then it adds this weird "e_" method
Then just use it
Β―_(γ)_/Β―
Also why are you even extending that
You dont need to use remapped. Obviously you setup your stuff to rely on such things so probably not going to be easy to just yank that out
I can't even use remapped at this point, half of my codebase will burn
how else would you create a custom entity
Could you tell me exactly what you're trying to do?
Also you could just extend the entity you're trying to make
show people why using the "non-remapped" spigot .jar isn't always possible
Thats exactly how i imagined alexs setup would look like
Ok, I will extend it
Let me try it
Remapped doesnt change how code works
it might rename both "mySuperClassMethod" and "mySuperSuperClassMethod" to x() though
Could you tell me what you're trying to achieve
still, creating a custom entity
NPC?
It might, but that isnt the same as saying something is or is not possible
Are you trying to create NPC or what?
He is doing holograms. I would honestly do holograms with ProtocolLib
I would wait till the update to do holograms
Works fine for me
what is everyone talking about
Anyways i was just providing a response to why someone might not use remap lol. I just dont use it as i dont need it
josh is doing holograms
I love obfuscated code, best ways to lose brain cells
oh
holograms, just use armorstands
which version is that?
packets and stuff
Not saying people shouldnt use it. Use it if it helps you, its a tool like other many things lol
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.17.1-R0.1-SNAPSHOT</
<scope>provided</scope>
</dependency>
lol 1.17
now try it again in a proper version
1.19.3
on 1.19.3 you WILL see this
1.17.1 is a good version
Don't hurt my poor feelings
I hate the new chat system
One second, It's indexing
Ugh, finally. Multiblock structures with a linked TileState are a logistical nightmare...
this is the reason why "x() clashes with x()". one of the above is EntityInsentient, the other one is LivingEntity (which the first one extends)
First of all, Why are you extending EntityInsentient?
When you can extend a proper Entity
why the fuck does it matter
same thing when you extend the zombie directly
I dont see a single reason to not use moj mappings.
extend EntityZombie
I'll redo it in 1.18.2
just run your BuildTools real quick
Hm does spigot have web hooks?
Im thinking about fetching BuildTools and running
remappings for every version every time there is an update.
On a private repo ofc
?stash
old versions literally never get updates, so what's the point
and normal spigot gets updates like daily
so just run it for 1.19.3 every day and not bother for any old versions lol
Ok
You win
I have no clue why it doesn't work on 1.17.1 +
Minecraft and spigot both are fucked I need to find a better thing to do
because two methods with different return types out of two different super classes got renamed to the same name
I'm not using remapped though, This is default
exactly
if you'd use remapped, you'd see the original names
that don't clash
then you wouldn't see x() and x(), but swapHandItems() and createMobAttributes()
would i have to send an entity packet every time the player changes the world?
Probably
or just teleport
The inconvenience here would be using complete paths in the code
That's better
wdym?
it does work fine in remapped
You can refer to methods snd objects by using their conplete path similar to how you use an import
that's the default intellij theme, how else would it look lol
is this good?
net.minecraft.server.Entity entity``` to give example on using complete paths
what does this have to do with remapped vs obfuscated?
So of there was for some reason two imports for an Entity class that were different you would need to do this so the compiler can distinguish between the two in the code
no, the only class I import is the one I extend
You obviously dont understand
maybe you can try to explain it again
When you get things of differing types named the same thing, you have to use complete paths otherwise compiler doesnt know which you are trying to use
how would I not understand this?
I am not using two different things that are called the same
i only wrote "MyCustomEntity extends EntityZombie" and that's enough for it to complain
Just use 1.17.1 π
i just use remapped, it's no problem at all
- Make it a marker
- You need to keep track of the entities ID or else you will never be able to modify the name or remove it again
are you using 1.19.3 meanwhile?
override the x method
Sure, but jist because you didnt put it in your code doesnt mean the inherited classes dont have things named the same which would still require you to use complete paths to tell the compiler which you want.
it shows the error in 1.18.2 unless you override
Anyways its moot since you use remapped anyways
override y then, nms changes name
so you are not using 1.19.3?
Just override and tell me if it works
super.y() would return the EntityLiving's y() so it should be all good
how would I override that method? I would need to provide two methods of the same name with different return types
Example: Abstraction / Implementation(NMS) / Implementation(ProtocolLib)
just simply add
so what should it return?
@Override
public boolean y() {
return super.y();
}
return super.y() -> this returns the EntityLiving's y() method
but what's the purpose, that would break everything that relies on "calling y()" on any of the super classes
?
yeah imagine someone doing "yourCustomEntity.y()" now, while expecting that they actually wanted to use this:
what even is that boolean y() method
use super methods?
Just override the conflicting method
ah I found it, it's Mob's shouldPassengersInheritMalus method
You use the complete path of the type
Good luck man
I suppose you never done such things in code that required you to do that
writing full path is pain
Sometimes but its valid and sometimes required
just imagine you want to override both. how?
because it surely won't work by declaring y() twice in your own class
Bytecode injection into broken jar file
lmao
what a great and "uncomplicated" way to fix a problem that could so easily be solved by erm... just using the proper mappings
You clearly dont understand the superiority of using unmapped nms. Just ASM that sh*t in
i still remember when I refused to use remapped in 1.17 because I didnt understand this maven stuff lol
Honestly it was quite the hustle at the beginning... And all the problems with the bleached wood fork as well...
Not like that
Override the conflicting method, I was just showing an example
if it is saying void y() is conflicting, override that instead ig
and do super.y()
how can I do runTaskTimerAsynchronously in bungeecord?
BungeeCord.getInstance().getScheduler()
Then look at what you got there.
but there are two y() methods in super classes...
what if I want to override both?
Protocollib
is there anything like ConsoleSender in bungeecord api?
(System.out lol)
can't use color code there
You can
Btw I'm not sure
I'm pretty sure it shows in console
nobody wants to have color in console anyway
you should only print stuff to console if something went wrong imho
___ _ _ _
|_ _| | | _____ _____ | |_| |__ ___ ___ ___ _ __ ___ ___ ___ ___ __ _ __ _ ___ ___
| | | |/ _ \ \ / / _ \ | __| '_ \ / _ \/ __|/ _ \ | '_ ` _ \ / _ \/ __/ __|/ _` |/ _` |/ _ \/ __|
| | | | (_) \ V / __/ | |_| | | | __/\__ \ __/ | | | | | | __/\__ \__ \ (_| | (_| | __/\__ \
|___| |_|\___/ \_/ \___| \__|_| |_|\___||___/\___| |_| |_| |_|\___||___/___/\__,_|\__, |\___||___/
|___/
Those are the best. Why wouldnt i want to scroll twice as long to reach important messages.
oh yeah
everyone wants to know that "ThisPluginThatOnlyAddsSomeTinyStuff" got enabled
it should also have some rainbow color to satisfy my gayness
and to fuck up the logs a bit more
gradle uses ant? o0
wut?
idk, doing "gradlew -version" outputs sth about ant version
How do leashes behave? What are the conditions for a leash to not vanish.
Im trying to think of a way to display an electrical wire and i though i could just
attach two invisible armorstands to each other but the leash refuses to show on the client...
Do i need like a leash knot entity?
it is kinda random lol
they also easily disappear after a few minutes
same like falling blocks
Hm
Well those wont work either. Maybe i need to send more data after the link entity packet...
does it work when using just bukkit api instead of nms?
π€·
try it
But good point ill try that first
if that also doesn't work, it's probably client being a jerk again
damn how old is this plugin haha
i switched to nexus like 2 years ago
Ok so ArmorStand -> ArmorStand doesnt work.
And leashing can only be done for LivingEntities.
not even using API, when the armor stands are NOT invisible?
oh yeah I've seen many people abuse slimes for things haha
but does it still work when both are invisible?
check that using API before you waste your time on packets etc again
It better does...
I'll meanwhile write another shitty blog post and watch some it crowd in the background lol
Noice
Hello? Invisible byte flag?
Oh set the wrong bits...
Ok looks noice. Just some more fine tuning.
But why are they not aligned...
new blog post, might be helpful for some people, maybe not, idc lol: https://blog.jeff-media.com/how-to-make-maven-automatically-put-your-plugins-jar-into-your-test-servers-plugins-folder/
what is that for btw?
maybe this'll help stop people hard-coding their server location and start to use profiles
This is useful. Im gonna use this right away. Im always losing time by copying my jar and restarting my server.
Back then i wrote a batch script for this -.-
Ah im updating my machines plugin. Introducing energy and polishing it a bit so that i can
actually write monetized content for it in good conscience.
Damn how did you do that
have you not read the above chat? o0
he spawned two slimes and leashed them to each other
Im just facing a big problem for when to actually show those lines.
Because if a line crosses a chunk border then i cant send the player both
entity locations, can i. Or can i? Wait the client doesnt throw away packets
for entities which are in unloaded chunks.
Well that makes it easier...
Nope lol, i tried finding it gave up lol
you can use paperweight and run the server directly in your IDE
Yeah but doesnt that only work with gradle?
yeah
paperweight is a huge mess and only made for gradle
oh and obv it's for paper api, not spigot
Just a few days ago i had a multi module maven project and halfway in i realised that i wanted nms.
Problem: I was writing against paper. I discovered that there is actually a maven userdev plugin from some guy
Almost tried hammering in a gradle module in my maven setup. Glad i found the maven plugin tho.,
paper api D:
paper api would actually be nice if they only did additions instead of also removing/deprecating everything
or adding incompatible changes (Advancement api, for example)
also paper contributors should just man up and just sign the CLA lol
i dont get why everyone is so afraid of signing it
What cla?
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
this one ^
when you contribute to spigot, you have to promise that you wrote this code yourself and didnt steal it somewhere
Ah yeah. I think ive signed this one a while back.
paper doesnt have anything like this
they accept pull request from anybody and risk it getting taken down again
Because i really wanted something in the api.
I could never contribute to paper anyway though, they banned me for sending a soundcloud link months ago
and then never answered my ban appeal
lol..
i understand that it was wrong, but I still expected to at least get a reply
Are soundcloud links forbidden?
well the song was called "fucking a fat girl"
XDDDD
it's a song I made myself lol
HΓ€ngst du schon am Haken? Knusprig Paniert und JEFF & Jefferson ergeben zusammen: Le Crochet!
it's about me processing my last hetero relationship
I bet that if I would have sent a song made by snoop dogg that mentions the n word 20 times, I would not have get banned
and that's the only reason why I am upset
obviously that song is shit, but getting banned for this? for lifetime? without even replying to my ban appeal? sounds kinda childish to me
they could have answered "yeah okay that's indeed a shitty song, maybe you deserve a ban for that, but yeah, you apologized and we'll unban you in 6 months", I wouldn't complain then
Why did you go into a relationship with a girl you dont find physically appealing?
because I could not find any girl I find attractive and I got desperate
wazzup fourteen, this is normal #help-development discussion
heya

then I downloaded grindr and I found out, I can have anyone I want if I only just ignore their gender
I think alex got into that relationship to start the "get banned on paper" speedrun
forced love is also love
π
Im actually glad i got no gf at the moment. I got so much more time for my hobbies. And more money ^^
I was there for 2 days or sth, you probably saw it
πΈ
I don't really think that I caused many issues. I did talk about alcohol and sent a soundcloud link, but it's literally the only discord that ever banned me for that
If my ex would only stop trying to get back every other week... Makes it hard to forget
I got neither
most on topic convo in spigot gene-
gotta stay focused kings
spigot doesn't need to protect 7 year olds, it's okay to discuss things here
This is general
mb mb
I would stop venting about paper's community if I'd at least get a reply to my ban appeal
yea we have been looking into improving that
e.g. someone saying "okay but you should have read the rules BEFORE joining, so that's why you are still banned" and then I wouldn't say anything against them anymore
but I can only tell my experience with paper and that's how it is
did you end up fixing your gradle intellij plugin issue btw
unfortunately no
when i appealed some guy just sent me a dm saying "heyo, we received your appeal but we cant unban you because your time hasnt come yet"
π

did the 7.6 and 1.13 version combo not work ?
@tender shard do u remember the docs command that sent you the docs link?
F
gradle 7.4.0 runs no tests, 7.6.0 fails with "NoClassDefFound" for junit, and 8.0 complains about "broken build.gradle" file without telling me what exactly is broken
?jd
on 7.6 you need the runtimeDep
nono
sure, it's right here: https://docs.gradle.org/current/userguide/java_testing.html
1 sec
imma tal kin general mb
https://github.com/mfnalex/SpigotPluginGeneratorPlugin here is the project that refuses to run tests
Contribute to mfnalex/SpigotPluginGeneratorPlugin development by creating an account on GitHub.
does your build.gradle contains this test { useJUnitPlatform() }?
yes
I am waiting for gradle to update to work with java 19
they are missing a dpendency needed due to a regression in 7.5
Ah did you find out which test stopped? Was it a mock bukkit issue?
oh I actually forgot to update the github repo
gradle 7.6 supports java 19
I have tried 8.0 of gradle and it fails saying java 19 not supported

java 19 JEPs are kinda meh. Only incubations.
repo is now updated
I am using java 19 rn o.O
even having ANY empty @Test method stopped it from working
how does cmi does that https://i.imgur.com/crl0Jw6.png
are you sure the repo does not just have an outdated wrapper
that does not support java 19
I am sure
creating a custom advancement. not very complicated, even included in my free open source library
Β―_(γ)_/Β―
google "jefflib github" then check out the ToastMessage class
thanks
But this is why i typically dont use gradle. Something as small as that breaks everything
hmm maybe try use this dependencies for Junit tests testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
I believe you need nms for that
you need the launncher π
https://github.com/JEFF-Media-GbR/JeffLib/blob/master/core/src/main/java/com/jeff_media/jefflib/data/ToastMessage.java here it is, does require NMS though
its ok thanks
Odd that an older version supports 19 but later ones dont unless they just recently updated within the last day lol
still fails
only using the junit version you sent still fails with the exact same error
did you clean after changing versions?
I didnt, lemme try
clean also fails
that is what IntelliJ created itself
1.13.0?
yes
ok lemme try
https://gist.github.com/kloppie74/7f0b7b805328abc5b607d37b85a1f856
When i mine my copper ore
the block despawns and doesnt work well like the others
its gonna take a while, the weird gradle plugin thinks it must download 600mb
yeah but from a server that can only cope 1mb/s
When sending in gist: Add file extensions. In your case .java
seems like a personal issue π
maybe it's an issue with my ISP, because usually I can download with 1.7 gbit
maybe a routing issue, who knows
dutch lol
Guys I need some advice, I need to glow everyone within some radius for one special player, but unglow when entities leave this radius. I know how to make individual glow, but the problem is I don't know how I should trigger unglow, I mean it's easy to glow everyone in range using player.getNearbyEntities(), but I don't know when to unglow them...
This happens if you dont write reusable code. Please show some more code and format it properly.
Polling
What do you mean?
Check periodically
@tender shard ```patch
diff --git a/build.gradle.kts b/build.gradle.kts
index c4fd7c1..0482c8a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,6 +1,6 @@
plugins {
id("java")
- id("org.jetbrains.intellij") version "1.8.0"
- id("org.jetbrains.intellij") version "1.13.0"
id("io.freefair.lombok") version "6.6.2"
}
@@ -13,8 +13,7 @@ repositories {
dependencies {
implementation("org.yaml:snakeyaml:1.33")
- testRuntimeOnly("org.junit.jupiter:junit-jupiter:5.7.1")
- testImplementation("org.junit.jupiter:junit-jupiter:5.7.1")
}
tasks.test {
So I need to check every entity in the world?
there you go
runs like butter
the runtimeOnly thing was for the launcher not the jupiter api
damn thanks, that actually worked. I wonder how did you know that this is the fix when the intelliJ docs say to use the version that the wizard suggests
but if the docs say "do X and Y" then isn't it obvious that I do X and Y instead of Z
if they have a github, maybe leave them an issue to fix it ?
I thought you learned already the docs were severely outdated. So why are you still trying to rely on them?
good idea
^
because I don't have any source of information
No. Keep a Set<UUID> for each player to check which entities are currently glowing for him.
On your next poll: Get nearby entities and create a delta Set. (Which entities are now no longer in range)
and unglow those. Also add glow for every new mob.
besides the official docs
not considering me a source of information is somewhat rude π
Well dont trust the docs when it comes to issues then
Just assume the docs are wrong when you do lol
I do, but I still wonder, how do they (the gradle and/or intellij people) expect anyone else to know how it works
Source code
not everyone is on this totally unrelated discord server
Dont you know
if the docs are outdated, the API is shit

But it is still an api though so i guess that counts lol
So I'm going to store this data in PersistentDataType (DataType.UUID), is it a good idea?
are you using my MorePDCTypes lib?
This is runtime data. You dont need it to be persistent. So not a good idea.
Yes this is such a good library thanks!!!
Cool. Admire it for a bit and then dont use it for your case pls.
I am using File -> New Project -> IDE Plugin. In the IDE I am paying for, and not very little money. Then it shows the following dialog:
then I clicked on these "docs" link
is it too much to ask for these docs to work?
in the intelliJ version I use? that costs like 400β¬ per year?
Actually I'm working on pvp classes and there can be several players with glowing everyone around, where then should I store this temporary data?
xd

In a manager
Thats progress in my books
I always love the self fixing bugs
idk but sometimes I feel like I'm the only person on this planet that manages to write docs that are up to date
if the docs are outdated, they shouldn't be there in the first place
Not everyone has time like you do either
then they shouldnt write any documentation
It takes time to make code and then more time to make docs and update
not really
you usually write the docs like 2 minutes after you changed the source code
Sorry for disturbing, but what is a manager...
Yep totally takes 2 minutes to update and write docs for super large projects
Fixing errors always gives more errors π
if that link is wrong, it shouldnt be there
I have to admit that I haven't seen that
Just wait till you encounter the bugd that magically go away and you still have no idea what the problem was or how it got fixed on its own lol
it seems however still very shitty to me that it's explained in step 7 of some random tutorial, instead of the wizard doing it itself. the docs for "how to create a new project wizard" claim that one can just use a new empty project that was created by the wizard
I mean, ehhh, would not call it very shitty
I hope that my error has been fixed π
I suppose if you have outdated software the wizard isnt going to magically give you up to date info
Console error -> Respawn cant be NULL
public class GlowViewer {
private final UUID ownerId;
private final Set<UUID> targets = new HashSet<>();
public GlowViewer(UUID ownerId) {
this.ownerId = ownerId;
}
public void update() {
Player player = Bukkit.getPlayer(ownerId);
// Check diff here
}
}
public class GlowViewManager {
private final Map<UUID, GlowViewer> viewerMap = new HashMap<>();
// Call on join
public void init(Player player) {
GlowViewer viewer = new GlowViewer(player.getUniqueId());
viewerMap.put(player.getUniqueId(), viewer);
}
// Call on quit
public void terminate(Player player) {
viewerMap.remove(player.getUniqueId());
}
// Call in a scheduled runnable
public void updateView(Player player) {
viewerMap.get(player.getUniqueId()).update();
}
}
tbh I digress, glad its working
probably worth to read the rest of the docs
before doing deeper in
yeah, the yshould have. anyway, thanks for helping me with this, I guess it's working now
I made this plugin from 1.14 to 1.19 for my own use
to avoid more confusion down the line
Thanks!!!
I still think that when I visit this docs: https://plugins.jetbrains.com/docs/intellij/project-structure.html (which are linked in the project wizard), and these docs claim that I should do X and Y, and while I clicked that link in IntelliJ of today (and not IntelliJ as of 5 years ago), then this docs should be correct
especially if I'm paying for IntelliJ Ultimate instead of using the community version
Β―_(γ)_/Β―
yeah but you can probably understand that I'm upset about it
its not idea and certainly not a write as you read guide
and ofc I know it's not your fault, and I appreciate your help in helping me fix this

