Hello people, sorry for interrupting if there is any question going on - I am planning of making a lot of plugins in bulk and I am tired of setting up subcommand classes, message handler, translation handler etc. -> I'd like to make an API for all of this, with the best case scenario not having to also put the API on the server, but just bundle it into a plugin. Where should I start?
#help-development
1 messages · Page 753 of 1
you can make a normal project, but instead of having a plugin.yml and a JavaPlugin class you just code your library in there, and then import it as a library without scope
or use an existing lib
is there anything easier than java
JavaScript mayhaps lol
For commands: Use one of the many command frameworks
Other than that, just create a project with maven and add spigot as a dependency.
Just dont add a plugin.yml or JavaPlugin class.
Make sure to compile using install so your other maven projects can find your library
Depends on easy
That's the point which I don't want to cross - using third party libraries. I just like to have control over everything and not having to worry or depend on other developers. I don't mind the extra work
Thanks to both of you, will try
is there a way to save custom nms entities with the world, or a library that simplifies this?
But you mean that I should test "PI" and "PI/2" with "transformation.getLeftRotation().x"?
I’d say that depends
but python is easier to get away with, without using that many hard or intricate concepts
for instance print vs System.out.println or whatever
I dont use those methods. Ive only learned how to calculate transformations using the transform matrix...
not really it just consists of such weird and unnecessary sounding ideas
They aren't unnecessary when you learn why they are there
Yes that’s one philosophy actually, many of the ideas in different languages may in reality be more of the problems rather than the solutions
It ain't unnecessary, it just provides you more freedom and control above your code - perhaps even makes your life easier..
Do you mean for Block Display by "transform matrix...", or should I use something other than "transformation.getLeftRotation().x" to rotate?
Iirc there are methods to rotate joml vectors and matrix’s around an axis
Which is easier to comprehend
On the other side there are dynamically typed languages like python and javascript where nothing matters, no standards, no constraints,
nothing is really safe and everything is an illusion.
yes
There isn’t really a mathematical way of proving that a given structure such as an abstract factory belongs to the solution set of what we’re trying to solve, but one thing is sure, we arrived and concluded all these tools we use because it helps in one or another way @storm crystal
Whatever makes more sense to you. But in my experience the transformation matrix gives you more freedom.
is Skript still a thing
Sadly
It is
I remember working with it and it wasnt as bad tbh, is it still being updated and such?
I'm aware of that
Yes
Yes but its limited and if you just learn skript you might as well learn java
^
So you usually use transformation matrix with block display or?
how limited is it
Try to get how things work, not why we should use them in the start @storm crystal you’re putting too much effort into doubt and whether something will be useful
maybe its enough for my needs
get the skin pixels of the face and send the adequatte color symbols to their brightness
I mean you ask “what are types useful for”, yet you don’t know how those work, or any of that, explaining why its useful is certainly hard if you don’t grasp the concept to begin with
^
Example. Every tick call:
Matrix4f transformationMatrix = new Matrix4f();
transformationMatrix.set(new float[]{
1f, 0f, 0f, 0f,
0f, 1f, 0f, 0f,
0f, 0f, 1f, 0f,
0f, 0f, 0f, 1f
});
transformationMatrix.translate(new Vector3f(0.5f, 0.5f, 0.5f));
transformationMatrix.rotate(new AxisAngle4f(angle, 0, 1, 0));
transformationMatrix.translate(new Vector3f(-0.5f, -0.5f, -0.5f));
display.setTransformationMatrix(transformationMatrix);
angle += 0.15f;
This confuses me
okay so
whats a class, a method, field and an object
I can understand that. It only made sense to me bc i chose computervision last semester...
What would be the easiest way to show in tab all the other players? Context: Info packets are blocked but I want to show them in the tab back when verification is completed.
I originally wanted to spoof the PacketPlayOutPlayerInfo
but it changes names in each version and I can't really find all of it's constructors
I have seen this exactly chat before i have even thought it was an old chat
Why dont use the packet for it? Even why is blocked
Methods are just functions, fields is where you store data
Do not ask questions.
classes hold methods but apparently cant hold variables cuz u cant use them
methods do stuff
fields idk what they are apparently variables?
object idk but you apparently work with them something about those instances?
thats rude, no need to be rude
not too offset
that’s a decently good understanding (:
Classes holds blueprints for methods and fields
What? I mean we suggest learning Java you will understand everything
What are methods, field, classes, data types. Even the why of them
Yeah verano maybe you can tell them what they are
I was asked a question and I answered it
oh okay, i thought you were asking what were them
yes I was
Why?
because I came to the conclusion that I dont even know what they are despite trying to learn them
oh okay that makes sense now, things have changed now
Verano i would switch down a gear or we gonna dig out your first messages here. Will Dusk make look like a full stack dev.
Do you know how to do it?
Just take it slow. One step at a time. It will make sense eventually. Hard part is not giving up in the beginning.
I used to think this way @storm crystal
consider a water bottle factory
the class WaterBottle is the factory
when we write new WaterBottle() it means we create a water bottle from our water bottle factory
fields are just variables that each new WaterBottle() must have
methods are just things/actions the water bottle can do
This is not a perfect explanation but for the time being it’s probably succinct
how do I set up variables correctly
I mean the fields are basically variables, where you store data based on a type, can be of type int (integer numbers), float or double (decimals), String (text) and many more, those are the most common
They are variables
So let’s say we wanna have named waterbottles
.
help
y'all
does anyone know if this text box on the anvil is 100% client side? Could I send a packet back to update this?
class WaterBottle {
public String name;
}
then
WaterBottle waterBottle1 = new WaterBottle();
waterBottle1.name = "B’le of wate";
WaterBottle waterBottle2 = new WaterBottle();
waterBottle2.name = "Tap Water";
@storm crystal
Both of our waterbottles have the variable name, but with different values
Classes are like skeletons describing any one thing. For example a book, which has properties (fields or variables, as you like) such as title and code. In them the information is stored forming a structure. Do I explain myself more or less?
That’s not too shabby (:
what?
How to get player dimension as "overworld", "nether", and "end"
You should get his world (player world) and the the name of the world if im not wrong
yo should get it via that name. or what do you mean specific?
I mean like what if the server owner named the end dimension folder "end_122123"
or something else than just word_end
okay, well there you should make like a configuration in that case
Where they put their world name and get it thru that config
hm
what does p.getWorld().getEnvironment().name();
do?
does it return the env id as a string?
there im not sure i havent seen that getEnviroment() before, sorry tho
I dont wanna tell something wrong
that works
but name() turns it into just a string as u said ^ those names into strings specifically
replace the item
with a new displayname
maybe that works.
hm wouldn't be ideal in actual API
I'm updating hte Inventory API of bukkit so luckily I have all the NMS i could ever want :P
I supose I wasn't clear enough about what i was doing
granted I think i found out how
gotta give it a try first I guess
ugh I think this is the only way unfortunately
imo
any trickery > nms
as in my library https://www.spigotmc.org/resources/entityserializer.100417/
some trickery to avoid using nms
but but how else is Craftbukkit gonna work without nms??? 🙎♂️
good point though the best solution would be to just rip out the entirety of the inventory api and pretend it doesn't exist
why does it have empty body?
you haven't put any code within the curly braces
also if you're working with strings don't use == instead opt for .equals()
== compares the memory location
so if the two strings are in the same exact position within your RAM it will say its false
even if both characters are =
for example "-" == "-" could be false but "-".equals("-") is always true
because - and - are the same strings
oh my god my API actually fucking works that is insane I didn't expect that to happen
🙏 please nothing go wrong
How can I load an object from config.yml? I'm saving using:
PlayerData playerinfo = new PlayerData(location,dimension);
playerpos.put(p.getName(),playerinfo);
//Save to file
for (Map.Entry<String, PlayerData> entry : playerpos.entrySet()) {
this.getConfig().set("data." + entry.getKey(), entry.getValue());
}
this.saveConfig();
did I get it right?
lmao
...
lemme msg my homies at revivenode to change your pass real quick
LMAO
That isn't the password, lol
try it, it doesn't work
(Using, throws nullpointer)
PlayerData playerinfo = (PlayerData) this.getConfig().get("data" + key);
playerpos.put(key,playerinfo);
you missing a .
?
Figured I have no idea how to create a project with just maven as I always used to just make a project within the Minecraft Development plugin for IntelliJ, any help on that? Specifically, I have no idea what the marked properties do in the screenshot below (sorry if I'm being a nuisance)
ah
shit my bad 💀
can u give me an example of code?
click on the Minecraft generator at the bottom
if you want to use that plugin
that ppl are very mixed on
Just use the plugin and delete the plugin.yml and the JavaPlugin class. Its exactly the same project.
ight, thanks
nah still
Error occurred while enabling revealer v1.0-SNAPSHOT (Is it up to date?)
java.lang.NullPointerException: null
PlayerData playerinfo = (PlayerData) this.getConfig().get("data." + key);
great to know the whole error
Right, now using the spigot docs example:
Objects.requireNonNull(this.getConfig().getConfigurationSection("data")).getKeys(false).forEach(key -> {
PlayerData playerinfo = this.getConfig().getObject("data." + key, PlayerData.class);
playerpos.put(key,playerinfo);
});
java.lang.NullPointerException: null
at java.util.Objects.requireNonNull(Objects.java:233) ~[?:?]
at com.sindn.revealer.revealer.Revealer.onEnable(Revealer.java:67) ~[revealer.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.jar:git-Paper-17]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.jar:git-Paper-17]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:562) ~[paper-1.20.jar:git-Paper-17]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:473) ~[paper-1.20.jar:git-Paper-17]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.20.jar:git-Paper-17]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:435) ~[paper-1.20.jar:git-Paper-17]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.jar:git-Paper-17]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.20.jar:git-Paper-17]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.jar:git-Paper-17]
at java.lang.Thread.run(Thread.java:1589) ~[?:?]
are you sure that's the whole error?
yes
no "Caused by"?
exactly, which is why i am so confused
no line number
no basic explanation etc.
AH WAIT
at com.sindn.revealer.revealer.Revealer.onEnable(Revealer.java:67) ~[revealer.jar:?]
can anyone recommend me A way of using eclipseIDE to code 1.20 plugins since the spoigot forum for it seems outdated and no longer work? or should I not use that for coding anymore?
yea?
do not
.
it's in the onEnable function oc
its outdated im assuming
Use normal maven
there is the line
Ok thanks
OH
in your class
I missed it mb
wait....
so it's actually:
Objects.requireNonNull(this.getConfig().getConfigurationSection("data")).getKeys(false).forEach(key -> {
causing it
(line 67)
It's null
yes, but why would it run then?
the error occurs from Objects.requireNonNull
What even is the point of that? To prevent the ide from complaining?
ah
that getConfigurationSection("data") is null
yea
remove require non null
I also did that
yes
yea but I mean now I get:
Error occurred while enabling revealer v1.0-SNAPSHOT (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.configuration.ConfigurationSection.getKeys(boolean)" because the return value of "org.bukkit.configuration.file.FileConfiguration.getConfigurationSection(String)" is null
[21:59:49 ERROR]: Error occurred while enabling revealer v1.0-SNAPSHOT (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.configuration.ConfigurationSection.getKeys(boolean)" because the return value of "org.bukkit.configuration.file.FileConfiguration.getConfigurationSection(String)" is null
at com.sindn.revealer.revealer.Revealer.onEnable(Revealer.java:67) ~[revealer.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.jar:git-Paper-17]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.jar:git-Paper-17]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:562) ~[paper-1.20.jar:git-Paper-17] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:473) ~[paper-1.20.jar:git-Paper-17]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.20.jar:git-Paper-17]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:435) ~[paper-1.20.jar:git-Paper-17]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.jar:git-Paper-17]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.20.jar:git-Paper-17]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.jar:git-Paper-17]
at java.lang.Thread.run(Thread.java:1589) ~[?:?]
do
you
know how objects work?
cuz
I just told you
getConfigurationSection("data") is null
and you're here
invoking getKeys
on a null object
in eclipse do I use Maven projects or Do i download something seperate for maven to start plugin development?
my god
Ya ik
Bruh now i gotta get that
Ah ok, so I should just do a null check
I am getting multiple mixed answers XD
Now
Does anybody know all the constructors to the PacketPlayOutPlayerInfo and it's names on different versions?
hiya, how can I hide all players from the tablist so you can just see the header and footer?
many ways
loop through Bukkit.getOnlinePlayers()
and Player#hidePlayer
or spoof player removal packets
That'll hide them from the game
or disallow their delivery, like I do
that hides the full visibility
So if you have a server where players interact with each other, quite unideal
ah, ok, I've never used that method
yep
👍
how does that work?
basically
Channel#writeAndFlush or something something sendPacket
to have direct interaction
with the packets
I'm trying to do the opposite of showing all the players in tab right now
yep
Object entityPlayer = ReflectionUtils.getHandle.invoke(p);
Object playerConnection = ReflectionUtils.getPlayerConnection.get(entityPlayer);
Object networkManager = ReflectionUtils.getNetworkManager.get(playerConnection);
return (Channel) ReflectionUtils.getChannel.get(networkManager);
``` is how I do it
Can you save objects to config.yml?
Using
PlayerData playerinfo = new PlayerData(location,dimension);
playerpos.put(p.getName(),playerinfo);
for (Map.Entry<String, PlayerData> entry : playerpos.entrySet()) {
this.getConfig().set("data." + entry.getKey(), entry.getValue());
}
this.saveConfig();
Config is
data:
sindn: !!com.sindn.revealer.revealer.PlayerData {}
what's ReflectionUtils in this case?
it's my custom class
I'll send you the code
one sec
https://paste.md-5.net/udavovutiw.java here's it's full code
remove the parts you don't need
thanks
yes
but it's very much
not ideal
you should rather
create a separate file for that
would something bad happen if I wasnt using constructor at all? or is it necessary on some things?
@grim hound for me PacketPlayerOutPlayerInfo doesn't exist
I mistyped
sry i did aswell
PacketPlayOutPlayerInfo
later it becomes
ClientboundPlayerInfoPacket
and later it becomes
ClientboundPlayerInfoUpdatePacket
or something like that
so depends on the version
it's not necessary
can you cancel a playerquitevent 😭
lol no
no
it just tells you that it happened
Why tf
you will stay on my server FOREVER
random thoughts i have
I also thought that
Same
like 2 years ago
can you cancel playerjoinevents
no
You can disallow or some shit like dat
just kick them in the event
but you can cancel the prelogin event tho
oh
the async pre login
Oh
@young knoll is there any easy way to get the basic registry changes so I can PR master or do I have to copy paste them
Well, ¯_(ツ)_/¯
This might be a dumb question but ever since after 1.15.2 I can no longer do import org.bukkit.plugin.java.JavaPlugin; Is it because of build tools?
Totally stuck what should the last block be?
Wood: 90, 0, 0
Sand: 180, 0, 0
Stone: 90, 0, 270
So it should look like this:
Uh
where do you use that?
?
like in what context
this returns a channel
if ur just using spigot api build tools isnt a factor if ur using spigot maven repo, are you using nms?
you can use it for
Channel#writeAndFlush
I personally use it to inject a channel handler
and for this
?
i mean u only need to flush in the end but yeah
I am not using spoigot API i think I am using buildtools to get a 1.20.2 version and I just started getting itellectJ I think its called sincce aparently EclipseIDE is outdated now
so I am switching
ah
are you using maven or gradle
Just as a side note by the way, JOML matrices default to the identity matrix so your set() is unnecessary
@opal carbon I am using EclipseIDE and im getting IntelliJ since someone told me to for ease of use
when you send singular packets you might as well flush right after
yeah are you using maven or gradle or are you just using neither
Good. Very good.
XD
yeah prob
Well I dont use maven so I assume gradel since I just created a java project
Now i feel dumb
so you dont know
then you're probably using neither
how are you importing the spigot nms
For 1.15.2 Its really easy just drag and drop
the built-in
library
adding
stuuf
f
for 1.20 it isnt
libraries
it should be the same
did you make sure to import the correct thing
the actual full spigot remapped jar
actually wait no not remapped maybe?
not sure how specialsource would interact with not using either
well for 1.15 I a bunch of com.google libraries and for 1.20 I get just org.bukkit.craftbukkit.bootstrap
and nothing else
?bootstrap
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
thank you I am goign to go read this
or use a dependency manager such as Maven or Gradle to handle this automatically. AH
thank you also have a good day
Well that makes things nicer
i would sincerely reccomend using maven or gradle yeah
yw
what about ant or cmake 
you don't 👍
why cant i
why 1.7.10
uhc
spigot does not even have builds out anymore for 1.7
idk where you are getting them from
but they are certainly not official
thats racist tho
o also u 2 
same at 1.8.9?
for some reason BuildTools still builds that
1.8.9 wasn't DMCA'd so it's available on BuildTools, but we don't support it
1.8.9 doesn't exist on the server
Yeah, 1.8.8* :p
1.8.9 is client only
so cant i make a plugin on 1.7 version with maven..
I mean you could if you find a non infected jar somewhere
I mean you can write against 1.8 API if you really want
then you'd maven install the api jar
how
mvn install:install-file
https://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html
where do i have to text this up
mvn install:install-file \
-Dfile=<path-to-file> \
-DgroupId=<group-id> \
-DartifactId=<artifact-id> \
-Dversion=<version> \
-Dpackaging=<packaging> \
-DgeneratePom=true``` full command will look like this
just find the Spigot 1.7.10 jar somewhere and have fun
though check it for malware first ofc <3
how can I check a players permission on LoginEvent with bungeecord
thank you for texting but i dont know where to put this 😅
command line
you type it out by hand
and fill out hte info as needed
you'll have to know all of the following info about the spigot jar for it to be accurate
what do i have to enter to group id artifact id and packaging
spigot's group id and artifact id
if you know how maven works just copy from the pom
mvn install:install-file \ -Dfile=<C:\Users\Secgi\OneDrive\Masaüstü\Server\spigot.jar> \ -DgroupId=<org.example> \ -DartifactId=<UhcUtilize> \ -Dversion=<1.0-SNAPSHOT> \ -Dpackaging=<pom> \ -DgeneratePom=true
whats wrong at here
get rid of the < and >
those only indicate to put stuff inside it
also the group ID is wrong
so is the artifact id
and version
and packaging
Your questions here are not instilling in me any confidence that you should be writing plugins at all, let alone plugins for 1.7
I can't anymore I'm working on inventory PR lol
Do not come back asking for help later because this is nearly a decade old version
Ooh choco on that sass
coll answer my question
There’s a question?
I'm sorry for your loss
Packaging jar
You can run buildtools with --pr flags
Add one with the Bukkit pr id and one with the cb id
how do I make maven run on java 17 since I seem to be getting errors
is there a pr flag to build the basis of the registry PR. I don't want the whole thing juts what you did for your ItemType BlockType PR
I kinda just copy pasted everything thus far lmao
md is so hot 😭
decade
old
Please don't say that
I don't need a reminder that I've been stuck here for what feels like forever
?1.8
Too old! (Click the link to get the exact time)
Hey man... 1.7.10 came out mid-2014
🥵
Not fun times
if new combat wasnt shit
🤓 actually its not been a decade yet
people wouldnt depend on 1.8 servers 😭
That's why I said
nearly a decade old version
I fully believe 1.8 users are just a cult 
Probably
guys I hate to break it to you but mojangs not going back to 1.8 pvp
Its been a couple years
Mojang really fked up letting 1.8 solidify
could have kept log4shell unfixed on 1.8 😉
some servers use custom pvp physics w newer versions which is pretty cool
But too late to ever fix
It’s not hard to get something basically identical to the old PvP
you can't stop them with such a trivial bug
You could re-release 1.8 as 1.21 and people would still say it’s different
pfft, you assume that 1.8 users update to a different server software
But people will still be like “guhhhh it’s not exactly the same”
The reach in 1.8 was 3.5373737 blocks but now it’s 3.5373736
if i bought spigot would u date me
ive switched to 1.19, but when i went back to 1.8 once it was like 1000000000000000000000000x better
how can I check a players permission on LoginEvent with bungeecord
1.12 is the sweet spot
literally just use a plugin to bring back old combat mechanics
curious though what did you do for your ItemType and BlockType PR copy and paste or BuildTools
not just the combat
md_5 confirms spigot maintains 1.12 as the sweetspot for servers
Hot
someone get the tweet ready
spigot drama
Lol deleted
could be a spigot drama post yea lmao 
Choco didn’t like the flirtin
it was a misunderstanding
sureee buddy
its bc choco didnt get the sweetest spot 😔
Added Marvin’s branch as remote and slowly merged stuff
Russian memes only
did he have a branch that was only the registry changes nothing else? e.g. just to Registry, CraftRegistry and CraftServer
Most useful thing to say in a help channel 👍
fuck it I'll figure it out later
Just wait until he learns about cherry picking, soft resets, and interactive addition
i fork plugins (renames the plugin files)
👀
omg 12 am
I'm still trying to figure out whether to deal with InventoryType right now or put it off and pretend it doesn't exist
Go to bed
my bedtime is 3am
🤓
12am is just 12pm if you're tired enough
u cant without me
Sounds healthy
i like to do my homework at 11
i used to cry doing my hw at 4 am 😭
ye but i used english classes for the missed sleep time
and chemistry
fuck chemistry
physics >>>>
almost got banned
litearlly 😢
close call
ill make md fall in love w me then ask him my basic java questions while coding a plugin
Meanwhile md will just be staring at craftbukkit code
Wondering where he went wrong in life
How did you mean it to… you know what don’t tell me
I want to rewrite craftbukkit to use forge classes and methods, but I'm can't do something like that to myself
Kek
i am can not
Simp.
Uh
Hey being gay in Australia is allowed
Whatever helps you sleep better
whatever sleeps you help better
yes, it's punished with death in other countries tho
Indeed
if you could pick your spawn location and ethnicity when you were born, what would you pick?
Meh
Chinese, Ethiopia
Canada and white isn’t bad
woman saudi arabia
Speedrunning are we?
Ah yes, the best ethnicity of them all. Woman.
I almost made a pretty tasteless joke about current events...
Orthodox jew, palestine 
smile r u packet with things to do right now?
That would be a speedrun for sure 
:?
Not really. Was about to write a guide about async IO.
I added deprecated annotation to every method in AnvilInventory and well... Bukkit won't compile now because I'm failing an annotation test
somehow
This development help channel does indeed miss a bit of fruitful and enriching discussion about the israel palestine conflict 
ahhh okki, well, outside spigot as well, cuz I was gonna ask u for a favor
all the output says is this
[ERROR] AnnotationTest.testAll:100 There 9 are missing annotation(s)
[INFO]
[ERROR] Tests run: 1289, Failures: 1, Errors: 0, Skipped: 1
No more spicy pics. Already got enough. 
ahhhg I see thanks
i would talk about the conflict but it israelly divisive so id rather not
Hot take
lol, well what exactly about async io were u gonna write about :o
How to not fk it up
But whats the favor?
🇺🇸
free oil
can I send in DMs? :>
those iranian children wont know what hit em (rockets)

You can write me DMs 💙
damn
dont /s commit to it
such that a beautiful fruitful relationship may blossom from it
@lost matrix Any idea what this means? Did what you said, ran install on maven - everything went alright, just this thing popped up
idk might outdated
I've downloaded intellij just 2 days ago
yeah well, it aint there for no reason
help wanted
There is this guy
up until like 1.17
then there is ClientboundPlayerInfoPacket with the same constructor
and what is after that?
Woo mojmap
Thank you, was just worried I did something wrong
i have a multi module project and when i build it the server cant find plugin.yml, and i dont really know how to go about fixing that
i got a "core" module that has the resources folder and its what the project's pom xml points to, and the other modules are shaded with it
uuuuuuuuhhhhhhhhh
Is it easy to make a command that maps things and save’s easy to make? Or hard
BUILD SUCCESS = Ignore everything and be happy
Trying to get 1
??
Is it easy to make a command that maps things and save’s easy to make? Or hard
I have no idea what you mean by that
Is it easy to make a command that maps names and matches it with players and save’s easy to make? Or hard
Maps names?
not super easy as a beginner i suppose
Explain a little more
Do you want to save a list of online users?
piece of cake if you're a little experienced
Car names?
Worth £70?
What
Let me explains some more
anyone btw?
im trying to get a commands that when a player does /Team Create (name) it msps the team name with that player so the name can not been used 2s. somone told me it was very hard and would have to pay like £100 for him to do it, is that a scam?
Just forloop in your teams configs then check if that name exist if it don't great then if it dose send a message
You probably want something more than just that
What's the point of a team command that does nothing other than save it
how would I find a old api for like 1.18.1 for spoigot?
it sounds like a very very barebones teams plugin and thats very easy
wouold it be 1.18.1-R0?
Probably
the simplest is just a team name with a collection of player uuids
vanilla teams in shambles
saving and retrieving that map is something you can copy paste off of google
heck even chatgpt can probably do that
ill use this for fabricmc support and u guys cant stop me
why do i get this
no errors in console
ill send code
no
are you opped ?
yes
have you checked client logs
Do that
how
Go to the logs folder?
package codes.domino.timedcmds;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.minecraft.server.command.ServerCommandSource;
import net.minecraft.text.Text;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.function.Supplier;
import static net.minecraft.server.command.CommandManager.*;
// getString(ctx, "string")
import static com.mojang.brigadier.arguments.StringArgumentType.getString;
// word()
import static com.mojang.brigadier.arguments.StringArgumentType.word;
// literal("foo")
import static net.minecraft.server.command.CommandManager.literal;
// argument("bar", word())
import static net.minecraft.server.command.CommandManager.argument;
// Import everything in the CommandManager
import static net.minecraft.server.command.CommandManager.*;
public class TimedCmds implements ModInitializer {
public static final Logger LOGGER = LoggerFactory.getLogger("timedcmds");
@Override
public void onInitialize() {
CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> dispatcher.register(literal("timedcmd")
.requires(source -> source.hasPermissionLevel(4))
.executes(ctx -> {
ctx.getSource().sendMessage(Text.literal("You are an operator"));
return 1;
})));
}
}
code
%appdata%/.minecraft/logs
use a launcher like multimc
and you can check logs easily
or just go to logs
either or
ah dang thats what u meant
Ya
If your on multimc tho it can pull up the logs for ya
- Project build error: Non-parseable POM C:\Users\chris\Desktop\Plugins\Originswaper\pom.xml: start tag not allowed in epilog but got d (position: END_TAG seen ...</repositories>\r\n\r\n<d... @9:3) I am getting this error with my pom file anyone know why
<repositories>
<!-- This adds the Spigot Maven repository to the build -->
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<!--This adds the Spigot API artifact to the build -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
bruh
Send the entire thing in a paste
nothing
that is the entire thing for me
nothing in logs
That would explain the error
why
Not talking to you
oh
"[22:49:22] [Render thread/INFO]: [System] [CHAT] An unexpected error occurred trying to execute that command"
@grim ice do you have multimc it flags all server and client side errors when on minecraft
is all it says
No
well thats where my knowledge reaches sadly so from there idk 2hex sorry
also i copied this from the spoigot api forms
for maven repository
You're supposed to add that to your existing pom
also how hard is a plugin that auto creates everyone there own island like a skyblock plugin and where when they do /Is it auto takes them to there island?? 😅
Eh it's not much you're just missing the project tag
Hey, how would I make it so if I do /ignore <target> I won't get any messages from that target?
Well Ima just make new project and yoink that pom files code
And project information
True but lazy way out XD
Can you even do this?
I think you would need a big server
I think also from running a server there would need to be multiple like worlds for each person
Thats all IK about that
Normally you'd just put the islands far away from eachother
Yes ofc
Oh ale
Would it be easy?
Depends on how experienced you are but probably not
What is the ideal replacement for <systemPath> in pom.xml?
what the hell is a local maven repo
im doing this api thing for the first time, sorry
thank
hey olivo Im getting the same error after fixing my pom file
Multiple markers at this line
- Project build error: Non-parseable POM C:\Users\chris\Desktop\Plugins\originswapper\pom.xml: start tag not allowed in epilog but got r (position: END_TAG seen ...</description>\r\n</project>\r\n<r... @8:3)
- The markup in the document following the root element must be well-formed.
is it becausse im using java 8 also?
Could you send your new pom
Ya sure
?paste
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>originswapper</groupId>
<artifactId>originswapper</artifactId>
<version>0.0.1-SNAPSHOT</version>
<description>Swaps your origins</description>
</project>
<repositories>
<!-- This adds the Spigot Maven repository to the build -->
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<!--This adds the Spigot API artifact to the build -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
I feel dumb why are the colors not showing
do I have to save it as a file?
the end project tag should be after the depdencies block
^^
I do not see end project anywhere unless that is </project>
Yes
It's that
so It should be at the bottom because if so the errors seem to not go away
yeah
ya instead this pops up with the last error Multiple markers at this line
- Downloading external resources is disabled.
- cvc-elt.1.a: Cannot find the declaration of element 'project'.
If you're using Intellij you can install the Minecraft Development Plugin and let it create a project for you
it says tho that its a 30 day free trail do you now have to pay for intellij
does this thing do the same?
If you want to depend on TechUtilitesAPI then yes
well, yes, I've ran that and other project says it aint found
dunno if im doing it wrong
above screenshot is from pom.xml of another plugin
Reload maven
oh wait nvm
Could you send the pom of the api project
sure, moment
Dose this make sense to ignore players java if(ignores.containsKey(player.getName())) { event.getRecipients().remove(ignores.get(player.getName())); }
remove the techutilitiesapi from the artifact
I would use uuid, but yes
this should be the dep info
Ah okay thank you
ah, ofc, thanks
now works as intended, thanks to both of ya
Recipients is not guaranteed to be mutable
What other way could I remove the message then?
Why do you have that much inventories?
Why not just create once and use it
You shouldn't remove its reference if its still used lol
Also why is that a map
to me thatinv api seems dumb
you should be able to self contain pages inside an inv, create an inv as needed and delete when finished
no it isnt
Seems like you have a design issue
this is where you learn about caching
each claim has an id, it should know its items you just call a remove method for the id and if it has it, it removes the item
grief prevention should probably have a map or some api to determin when the claim is deleted then
its not hard
as said
they have an id, you should keep track of ids shown, if id is shown remove it and repage the gui
do you not have a cache>
are you directly accessing the db for everything
wtf
you need a cache
[public net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket(java.util.EnumSet,java.util.Collection),
public net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket(net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket$a,
net.minecraft.server.level.EntityPlayer),
public net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket(net.minecraft.network.PacketDataSerializer)]
you shouldnt be doing it that soon
they're not matching
if its sqlite you arent gonna have any changes
lol noway u do that
if someone modifies sqlite at runtime thats a them issue, you dont give support
okay
you dont need to read the table again every 10 seconds
give no support if they touch the sqlite db at runtime, if you do want to give support for it, minimum reload should be 15 min or better 30 min
Given a java.awt.Color, what's the easiest way to send a title to a player with a text in that color?
player.sendTitle(...) only takes strings
And ChatColor.of(hexCode) seems to have been removed?
huge design issue
have a list of all items for the gui, it gets paged on the fly so you just get the next element to replace it or just update the item as needed
Chatcolor.of has not been removed
It’s just only on the bungee ChatColor class
ahh
both are index based
They do
and have order based of that
if size is known and barely has to change internally (that is the backing array in arraylist) then arr list
else linked list has constant add
Or just an array :p
yea or Arrays.asList
Bukkit
well it's not an error
you could try updating the plugins' versions in your build config ¯_(ツ)_/¯
how am I supposed to learn from Kody Simpson's videos? Like do I follow what he is doing or do I watch the whole thing and then try to recreate it?
Also is there any kind of documentation with explanations on spigot syntax?
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
I mean like
You can follow what he does and then try change it yourself
?jd-s
If you want to learn specific features you can check forums for tutorials
javadocs to be specific yeah
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
okay
Do I need to write implements X whenever I add package or can I just import it?
implements is a keyword used for your class if it implements an Interface
extends is a keyword used for your class if it extends another class.
Packages need to be imported but you never need to do anything else with them.
I have a question, when im doing event listener, lets say EXP bottle one, can I make if statement that checks if that bottle has been broken and if it did cancel exp drops?
I'm not sure if it has a speciifc event, but if it did I'd imagine so.
My humble advice would be to pause for a minute and learn a bit more of the basics before continuing.
I.e your implements question shows you are likely very new to java.
As such I think you might be doing yourself dirty.
There are so many basic tricks and practices that'd make coding a lot easier for you in the long term and they might be worth learning first ^_^
who
The minecraft yt code tutorialer
what
I think lol
yeah
oh
oop..
Hehe
Kody Simpson is a great start to spigot side stuff...
But jesus christ Is his videos filled with bad practices
Yea
hes good for new players though
I mean, its one thing to learn spigot api, another to learn java, a third to learn good practices
Definitely
Love him for his commitment and he likely gets most into spigot / paper coding.
But christ on a bike it's a bad idea to watch his stuff in a vaccum
so who should I watch
Kody is good
javadocs
But you need to learn java while watching as well
Wild take I think he should watch that bald geezer first then kody.
Forget his name , the general java guy
DuskTaler is quite green to java and programming fyi :x
learn java first
It’s not static abuse, it’s consensual static BDSM
https://youtu.be/drQK8ciCAjY?si=SP4m4MLVwBpZFAa8
Let this beautiful shiny head man take you on an adventure 🤣
Learn all the essential basics of Java in one video in just 15 minutes. No programming experience required.
Complete Java Course: https://codingwithjohn.thinkific.com/courses/java-for-beginners
Variables, loops, methods, classes, objects, and more!
This is a Java beginner's lesson for the ultimate Java beginner, or just someone curious to know...
so real
CodingWithJohn is the greatest and I will die on that hill
Haha this guys face is so iconic to java tutorials
he’s like an egg
no I meant
for plugin writing
you’re looking at a very limited resource here
You are trying to build a house before you know how to use a hammer
not many cideos
videos
but what you’re doing is writing a spanish essay in an english class
analogy queen 😍
I watched John before I watched Kody, and now I'm the main guy working on MythicEnchants over at mythic craft so 😎
John makes u good java boi yes yes
Yeaa, I mean I used to watch the source code, and now im almost committed towards doing my master at oracle :>
There is only John, the Johnather and the Johny Spirit
religion of johnism
@storm crystal what we were trying to tell you is to learn java before spigot
The spigot starter guide:
- CodingWithJohn
- KodySimpson
- Gang of Four
- Spigot Forums
Jesus no... they still dependency inject their managers over there 🤮
That can be fine tho
Only seldomly.
But we have had this tango before conclube 🤣😎
Effective java actually encourages it if a component depends on external resources for instance
Yeah lol
Aye my general rule of thumb is if its a many to one, then use a singleton.
Clue being in the name. Singleton
Maybe that's why devs don't use em... they don't like being reminded they are lonely 😉
I hate singletons because they absolutely yeet my loose coupleness, they fuck my unit tests and integration tests, my collaborators hate it, the code style hates it and its just not very nice
so I am forced to perform dozens of hours of abstract java programming to then do plugins?
Dependency inject the pain away
girl..
like from the first episode of Kody I already see that there is no main method bullshit that I encountered on actual java program
Rome wasn’t built in a day
I'm a male.
so sigma
Eh they have their place.
It's a rare day leave a single instance class that manages many as a non singleton
yes because you’re building a jar, not executing a sysout
Plus a singleton debug logging class is god tier
your plugin isnt the entry point to start the program, you start spigot so spigot has a main and spigot loads your stuff
the point of avoiding singleton is
- Avoid the singleton logic (that often needs to be tested)
- Define a clearer abstract class hierarchy
- Make it easier to mock in unit tests
- Avoid depending on instances but rather types
News flash, the java plugin instance in ur plugin is the main class of the plugin.
You picked the one dang thing different between vanilla java and the plugin api ... piterally everything else is useful thst he teaches xD
Its really not
You are allowed to be wrong (J O K E)
Like it depends, but that’s just not true
but I like know simple syntax what else is gonna be needed
its just a singleton
Oh come on conclube ur splitting hairs with the lad.
I'd emote but u still have me blocked . Cringe
Lmao
Ma bad
Do you ever go to work on ur plugin then think meh cant be fucked im going to bed
Ur good bro ur still ma homie
server tutorial for me
what will this print:
final int i = 1;
i += 5;
i - 2;
System.out.println(i);
Alr (:
nobody tell him
Nah I've actually been loving working on the mythic stuff
Naaa why u do him like that
Smh
1
I know what final means
ok
||Err…||
Lmao he spanked ur ass Stella
erm. 😭
I dont like the way you described it
Compilation error inc…,
Yeah... 2 am raz needs better vocabilsrry
Can we all appreciate frost messaged me but can't see my reply as he has me blocked 🤣
Mhm stop that chief
How did y get frost to block u
for (int i = 0 | i < 5 | i++) {
int j = 0;
j++;
System.out.println(“j: “ + j + “ i: “ + i);
what about this
He tried to say adhd meds work for autism as he tried em once and it worked.
And I implied "err... they can be comorbid... u considered that u , gosh I dunno, have adhd and that's why they helped? "
@storm crystal
Awww cmon thats mean
I would’ve kicked u if I saw that happening live
so vicious
:>
I mean man was doing his typical frost thing of tripling down.
It wasn't done in a mean way ong u cam go back and check the logs ong.
Dw, ill let the sleeping dogs sleep
this starts to get more interesting when you start using objects instead of primatives
like a final list
its ok to change the stuff inside of the list, but its not ok to change the list object itself
Ah yes classic java mutability and immutability
he started typing 2 times which makes me think he’s gpt-ing it or sticking it into his ide 😔
Lmaoo
Nah it came from a place of love. I was misdiagnosed as a child and it screwed me up bad.
And realising adhd meds work for u and going "adhd meds work for autism" and not coming tk a realsiation that might revolutionise ur life got to me bad 😅
Sneaky copy pasta
Does java allow it?
no this shit is just too vague
Wth
also depending how the class is setup for said list, it may not be ok because multiple things may want it, so then to make everything happy to not have values changing we could then add the static on top of final
i was jk
because there are like 3 ways to interpret it
I always like the niche scenarios of java lmao
somewhere beneath the method i just didnt include it
I didn’t want to say anything about the |



