#help-development
1 messages ยท Page 66 of 1
Aight ill look into it, thanks
Is it possible to apply it to an itemstack instead of a player? Or do I have to check if a player is holding an item and then add the attributes
this?
you can apply it to an itemstack ye
ye
ItemMeta#addAttributeModifier(Attribute, AttributeModifier)
How?
Ah thanks
ok so integer indexing:
0 -> c
1 -> i
2 -> j
3 -> k
4 -> o
yeah it's obfuscated
c = entityID?
and the others
in this case you cross-reference it with the write method, and wiki.vg
send a screenshot of the write method
and I'll make a demo in MS-paint
How do I allow many versions with one plugin?
I need yaw, pitch, direction
there's a write method
of packet.getIntegers?
yeah that
xD
Newer versions rule
Ugh
Just write it for the lowest version and hope it has enough upwards compatability
Are you using any nms?
then if you set 1.8 then it should work with up to 1.19.2
My take on it would be:
Write it on 1.16 or 1.17 and tell everyone with a lower version than that to look somewhere else
I need 1.8.8 ~ 1.19 Support
NOT ~ 1.16 or 1.17
wow :D
as long as u stick to just bukkit 1.8.8 api u should be fine idk
Why? >80% of the playerbase is on 1.16+
protocollib has that support, just set it to 1.8, use placeholderapi as a dependency then it should work
With big projects: start on the latest version, and support anything newer
This is because the latest version and version 1.8.8 must be supported. Many users for that plugin want version 1.8.8.
.
Is that a custom lore or the minecraft messages for them?
oh ok if I understand, the write method got the same indexing as wiki
that's a 1.9+ thing, no lore
yeah
it might not follow the exact order of the field indexes which is why I say cross-reference
Then tell those Fortnite playing, left mouse button pressing, 1.8 pvp loving kids to go get lost.
but for protocollib I need to look into the nms obfus stuff and then top to bottom
yeah
so for pitch, yaw its byte l, byte m
L, M, N yeah
If I hide the attributes can I somehow reget them as a string so I can have a custom colour / put it in my own place in the lore?
do I need HEad Yaw? didn't use it before with wrapper
you can add the ItemFlag to hide the attributes and do whatever you want
Sure
it defaults to 0
I've had issues when I forgot to set yaws
NO
then tried doing auto-rotation and wondered why
what the fuck i play Fortnite
and latest mc
then why the hell are you asking
just support whatever the hell you want, and suffer the consequences of outdated apis
Stupid arguments have stupid outcomes
just offer more features the newer the server version is ๐
But can I get them as a string list so it's like
itemBuilder.addLoreLine("Line one")
//does it print all of them on each respective line?
.addLoreLine(CC.RED + item.getArrtibutes)
Because it has to support both 1.19 and 1.8. You can drop support for 1.9, 1.10, 1.11, 1.13, 1.14, 1.15, 1.16, 1.17 if needed.
can I just cast to byte?
make them want to upgrade
yes
what about that 0.001% 1.11 server market
you surely don't want to lose those 2 customers
supporting 1.8 but not 1.16? o0
i think u forgot to say 1.9 and 1.12
1.9 servers are a bit uncommon
i dont want
so u can drop support for 1.9 and 1.12 too ๐
I'm not your dad
I want to support 1.12
then support 1.12
I always only do 1.16+ and everyone who uses older versions is probably 90 years old already anyway
1.8.8, 1.12.2, 1.18, 1.19 should be supported.
1.8 servers are for kids younger than the version itself, change my mind
i do whatever version my server is running
and Data for direction is var o?
i dont write public plugins 
then support it
yessir
how to
yay I understand :D thank you soo muchg
What 8 year old is making a server?
use the oldest spigot version you can get. if it works there, it also works on newer versions unless you do shitty stuff like using bytes for material data
he pays wannabe devs with parents money
this should work right?
do i have to?
I swear more 8 year olds barely know grammar
what stops you from writing your plugin in 1.7.10
have to what?
other than the 5kg of white makeup in your face
and this also looks fine for me, right?
Since the basic base is focused on 1.18, many features are used except for NMS. You should be able to use this for that version (1.8, 1.12, 1.18~) without any errors.
but you should be fine in that class
I did that some months ago, idk what I did here
so what exactly is your question?
just don't use NMS lol
What is in the 1.2 update or do we not know?
is sendMessage on a runnable or something
How do I support versions 1.8, 1.12, 1.18 and 1.19 at the same time?
No? It just sends a message to the player
private static final String clearString = StringUtils.repeat(" \n", 100);
player.sendMessage(OVERRIDE_TAG + clearString);
for(BaseComponent[] components : previousChat.get(uuid)){
for(BaseComponent component : components){
component.setColor(ChatColor.RED);
}
BaseComponent[] sendComponents = Util.concatenateArrays(TextComponent.fromLegacyText(OVERRIDE_TAG), components);
player.spigot().sendMessage(sendComponents);``` the clear string stuff sends after the other stuff
I already told you
^
I now get an error when trying to build, since replacing spigot-api with spigot
When I Was 8 I Typed Like This Lol
yeah run buildtools or something
Write your plugin with 1.8 api and no nms
Actually no
you don't need buildtools as you can already see the stuff
what's the error
xD
hypixel be like
its on 1.8
Nope, It's on 1.7
thats even worse
hypixel can't update because it has a huge codebase in a modified 1.7.10
D:\Dokumente\Programmieren
add https://libraries.minecraft.net/ as a maven repo
nothing lol
yeah or run buildtools
Hypixel would be spending a lot of time rewriting their entire codebase for newer versions for little to no benefit
they already modified their own spigot fork to add new api features
autocrafting thing?
the recipe book?
worked :D
yeah its bugged for exact choices with custom data
i think you cannot do anything
except to wait for 1.20 and see if it's fixed there ๐
its client side though
You can install a mod to patch issues with the recipe book
nms works but my code doesnt, it only shows 1/15 item frames
make a plugin to require a client to have mods :))
I was also angry about this but couldnt find any solution
then ask them
if i made a hasmap like this
private HashMap<UUID, Long> antylogout = new HashMap<>();```
what exactly does System.currentTimeMillis() do?
btw are there still people that uses restart instead of stop and restarting that way?
I use the restart button on pterodactyl a lot
Why not use CombatLogX? And currentTimeMillis gives you the current time in milliseconds
That will just make it not appear in the crafting book at all
about the question, someone "sort of" paid me to make a plugin so im doing it, i kinda wanna ask him the same question
and yes, about the answer to my question, i kinda figured that out, but like the time between WHAT?
?paste
how do i got about disabling heart particles using protocollib on my sevrer
1ย 956ย 528ย 000ย 000 milliseconds
so again what does that mean?
Why does it say that the list doesn't contain DIAMOND, DIAMOND_BLOCK and EMERALD materials?
https://paste.md-5.net/ayucutovaq.css
https://paste.md-5.net/cobosepayu.cs
1ย 956ย 528ย 000ย 000
That's a bit much though
that seems too little
idk
god damn very different opinions
Current time is 1660642894
bump
Wait no
1956529412000
i think thats the answer
That's seconds my bad
ImIllusion, how should I generate the entityID properly?
I now have an AtomicInteger with initialValue 40000 + gets incremented each id
for real though system.currenttimemillis returns the time in milliseconds of what
it should say 1956529412000 at the end then ๐ค
???
forgot the screenshot
1956529412000 is way too large
dude 62 years
1956529412000 is 2032
You don't display the current time since 1970 to the player
You want the combat time
dam
yes i am not exactly displaying system.currenttimemillis
did some "tweaks" to it
which are probably useless and i dont even know what they do
If you have no idea on how to work with time maybe turn down the commission?
And recommend an existing plugin
any ideas? ๐ฆ
@echo basalt sorry
what's the definition of itemCategory / getCategoryItems()
public static List<Material> getCategoryItems(ItemCategory itemCategory) {
return (items.containsKey(itemCategory)) ? items.get(itemCategory) : List.of(Material.values());
}
itemCategory is chosen by the player
the only reason those items wouldn't be inside JEWELRY category is nothing to do with the code shown so far, it's to do with what's being but in the items map
how do you fill the items map?
I think, I found the issue, it seems like the list contains strings instead of the respective materials
public static void initialize() {
for(String entry : Main.getInstance().getConfigManager().getConfig().getConfigurationSection("Categories").getKeys(false)) {
List<Material> materials = new ArrayList<>();
ItemCategory itemCategory = ItemCategory.ALL;
try {
materials = (List<Material>) Main.getInstance().getConfig().get("Categories." + entry, materials);
itemCategory = ItemCategory.matchCategory(entry);
} catch (Exception exception) {
Main.getInstance().getLogger().info("Something went wrong while getting the category '" + entry + "'!");
Main.getInstance().getLogger().severe("Cause: " + exception.getCause() + "; message: " + exception.getMessage() + ".");
}
if(itemCategory == ItemCategory.ALL) {
if(!items.containsKey(itemCategory)) items.put(itemCategory, List.of(Material.values()));
continue;
}
items.put(itemCategory, materials);
}
}
How could I fetch an offline player's PDC
i don't believe you can? they are offline therefore they don't have a connection?
A PDC is stored on the player's file
it is technically stored on the server, so I could either use NBT editing or load the player
i read pdc as player connection for some reason
player.sendMessage("\n") sends two packets, interesting
yes
yes, you're right, you can't just cast your materials list to a List<Material>, you have to get a list of string and then map each string to it's matching material
I believe it splits by \n and sends all messages
so in this case it sends an empty one, then sends another empty ones
just use a stream to map the string to a material
yeah
e.g. like this
what happens if you send \r\n? 2 messages again?
List<Material> list = JeffLib.getPlugin().getConfig().getStringList("materials").stream().map(Material::valueOf).collect(Collectors.toList());
?paste
also, as a slight optimisation, there's no need to store all the material values for the ALL category, as if it isn't in the map your code defaults to getting all the materials anyway
ty, but I need it in a part of code, that's why I add it
it works now, ty
ty
https://www.spigotmc.org/threads/ans-not-really-is-there-any-way-to-get-the-persistent-data-container-of-an-offline-player.492581/
this seems to explain it vaguely
yes, probably easier ahah
https://paste.md-5.net/iraqipisif.cs
I want to change the PersistentData values, but it doesnt work, what should i do?
Try setting the item meta again
would it be a good idea to add my own ECS on top of spigots api
Bump, my life depends on this
there's an existing bug report for this and it's open since years
but I'm not sure what it was called / how to find it again
Mojank moment
Check for the particle packet
check if the partical packet is of type heart
cancel the packet
I dont know how to use protocollib entirely i need someone that can guide me through
And that i could document it for other ppl cuz im speaking for at least 20 ppl rn
do you need someone to guide you thru or do you just need someone to give you the code?
it's "kinda" related to this: https://bugs.mojang.com/browse/MC-123002
recipe book only allows undamaged, "original" items without data
Both
choose one
What can i do with the code
there was another more specific report for items with NBT data ubt I cannot find it rn
How do i put it in the game
ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(this, ListenerPriority.HIGHEST,
PacketType.Play.Server.WORLD_PARTICLES) {
@Override
public void onPacketSending(PacketEvent event) {
PacketContainer packet = event.getPacket();
if ((packet.getNewParticles().read(0)).getParticle() != Particle.DAMAGE_INDICATOR)
return;
event.setCancelled(true);
}
});
replace the particle type with whatever you want
If you don't even know that... Messing with packets is gonna be futile
Yeah yeah im not using 1.19 where even chatting kicks you randomly
๐คฃ
i am so confused
U got the code part but how do i put this i n the server
oh god
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Do you know java at least?
at least? lol you're kinda demanding
.__.
My bad
Good luck
you must learn basic java
Well i got the code now i gotta go kms
?learnjava
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 know c++ ๐
thats cool
i know a bit of turkish
but you cant use c++ w spigot
Ik
if like disabling that particle is your only goal
Well... You can use JNI xD
i can order up to 8 beers in turkish in one sentence, and that is really useful
you could probably use a plugin that does it
how tf
There are none
Ive searched
For so long
Theres just none
And yes its my only goal
what version are you using?
1.18.2 purpur
is it possible to get the colour of a specific character in a string
i think its skript?
or the colour of an index
Oh yea i have denizen
I dont think so
Its like skript right?
idk
you'd need to search thru the entire string and look for colour codes i believe
Well i can get skript
yeah i'd probably have to index it myself
Ya
wait im dumb
cuz text colours in minecraft arent letter based i dont think
i can do what im trying muc heasier
what are you trying?
trying to grayscale a string
muc heasier, sounds like a weird indie band
also how big of a performance hit would this make?
ECS?
entity component system?
you could just strip the colours and then add your own colours
yee ^^
nah i want to turn specific colours darker
should be easy
Ohhhh wait I thought you were going for a gradient or smth
ye just look for colour codes andthen replace them
So uh what do i do with skript and the example code
๐
i'd say go ask someone who knows skript
Hm
or like
Dont know anyone that does
they probably have a discord server
didnt someone already send you working protocollib code?
they dont know java
How do i god damn put it in the game doe
if you got this running then you basically only have to paste the sent code into onEnable() lol
Ngl it would be fun to have a plugin that can run java code at run time
but at that point you'd be better off doing what skript does
You can make that if you want :p
you can easily compile code at runtime using the JavaCompiler class :3
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
probaly everyone here could do it in 10 minutes
How about two words: โno moneyโ
okay so
- you dont have money
- you dont wanna learn java
That's a problem then
as said:
?learnjava
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.
Alright time to enslave my dev again eventhough he has a lot of work anyway
i actually had a plugin that disabled some particles but it only works on 1.16 and i cant be bothered to update the protocollib version
I mean yeah it's so easy to fuck up the performance of an ECS
My main concern was if the spigot api would cause issues
Are chats from different worlds connected? If not, how can I connect them?
yes, they are
Oh okay, how do i disconnect them?
two ways - cancel the "chat packet" going to players in other worlds, or:
listen to AsyncPlayerChatEvent, cancel it, and send the messages yourself (by looping over all plaxers in the same world)
option 2 is easier, option 1 is better
for option 1 you'll need your own netty listener, or use protocollib
Ah okay, do you have a guide on this or know one?
no sorry. but if you find a good one, let me know pls lol
okay sure thing ๐ thanks
nah, theres a workaround to almost everything with packets
I wish protocollib wasn't so shitty
like, why does it not have proper constructors for packets? why is it always "getIntegers().write(1,1)"
PacketWrapper exists
isn't it outdated since 100 years?
https://github.com/aadnk/Wrappit
Here's the script to generate your own
Shouldn't be too hard to update
that's also still on 1.15.2
Again shouldn't be too hard to update
yeah I just wonder why protocollib doesnt have proper packet classes on its own
who tf thought "oh yeah, let's get a list of all integer fields and then set them manually" is a good idea
maybe it's just me but the NMS packet classes are so much easier to use, and self explanatory, you don't even even need to read this weird wiki.vg page that doesn't even have the correct packet names but their own made up system
i just wonder why they make everything so complicated lol
the vanilla constructor is easy to read and easy to use, just pass everything needed. protocollib requires stuff like getDoubles().write(1,x) and stuff and I just wonder why the hell someone thought this is a good idea
well I think the opposite is true
if a new double gets added to an existing packet, then getDoubles().write(1,x) will break
while in the constructor, it won't even compile, you can easily see that the packet has changed
myeah, but no recompilation is required is what i mean. if a field name changes its still fine
which packet is responsible for view distance?
yeah true but isnt it way easier to compile it again then to do stuff like this?
Packet myPacket = new WhateverPacket();
myPacket.getIntegers().write(1,1);
if(McVersion.current().isAtLeast(1,19,2){
myPacket.getDoubles().write(2,x);
} else {
myPacket.getDoubles().write(3,x);
}
because to me, this is the opposite of "version abstraction"
it's hardcoded bullshit
wut? the server just doesnt send as many packets? you mean client side or server?
it is? ๐ค
it feels like theyre trying to give as low as an abstraction as possible
but like
they really dont
just means its easier for them to update each version
which would be fine if they had some good documentation
Client Information probably
which they dont
how hard would it be to just make an enum instead of bullshit integers
yeah of course because it doesnt really do anything
i found it ๐
or just wrap the packets directly
its play login
ya but like enums would just be a drop in replacement
well they had protocol lib Wrapper classes
its like the bare minumum
its in both
and they are always outdated >.<
but the client info gets resent when it changes
?
yeah me too
since 1.18 server controls it
yes but the client sends it with the info packet as well
is what i mean
the render distance
someone needs to make a packet listener which works with mojang mappings
would be suepr nice
retroopers one?
is W?
yes it is W
Q - Logic
would be nice if packetevents would use the actual packet names
0x49
it originated from trading btw
no, like ClientboundAddEntityPacket instead of PacketPlayOutAddEntity
when people trade online they often use W/F/L
weird
to ask for other people inquires about if the trade is a win, a fair trade or a loss
i'll trade my soul for a cold ice tea
W
i thought it was from fortnite
oh god
I remember this game
so extremely boring
the first 20 minutes, literally nothing happens
except people chopping down trees lol
then you finally encounter an enemy and the game is already over
wait wait wait wtf
@Override
public void respawnPlayer(Player player) {
NMS.getServer().getPlayerList().moveToWorld(NMS.toNms(player),true);
}
oh no not that
i was bad at it, I dont refuse to admit this lol
i have no idea, lemme see
no
its not wood color
but it cant be text color either because signs can have multiple colored texts
i am confused now
oh nice
can you just right click the sign with a dye?
if it's a known bug then theres not much you can do
yeah
wait can i send a packet asking client for their view distance?
client bugs cant be fixed
you can do nothing except to complain at mojang
or slaps wontfix card
why would you do that?
best nms tutorial where? :)
there is literally no reason to ever do that
nms tutorial ๐ค
theres no real definite tutorial lol
just google what you need done
not really
i want to kindly ask how far player would like to see
20% chance someone has done it
then use the api for that?
why would you want to send a packet for this
is mixing packets and api in packet listener healthy?
just do Player#getViewDistance() or however its called
also with glow inc sac to make it glow
yes, ofc
yeah I knew that, but i didnt knew about regular dyes
I think the glow thing was added in 1.18
1.17 together with all the items
oh ok
what project
oh
im waiting for my helpers
they are coming back in 2 days
some parts will be OSS
general purpouse plugins and shit
btw kacper if you really wanna use packets to get the view distance: it's the ServerboundClientInformationPacket
na im good ๐
do you guys know how to disable Crops Trampling
what
some event
@opal juniper ?
isn't it the BlockPhysicsEvent?
isnt that a blockbreakevent?
ah
PlayerInteractEvent
lol
playerinteract is for everything lol
let me check replant's source
yeah its the interact event
but blockphysicsevent gets called too IIRC, e.g. if another entity tramples the crops
tf is ass pressure
dunno
easter egg
@azure hawk final answer its PlayerInteractEvent
i cbf searching up the jdocs so im gonna believe you
hmm
Does PlayServerUpdateViewDistance trigger on join aswell?
why ur doing packets lol
and why does he use those weird spigot named packets
uh
im tryna tell the client that server uses the same view distance
๐ด
why does that help?
the fog will be at position its supossed to be
how is the Material.? called for cancelling crops trampeling
maybe smth like this
does spigot use onDisable() for restart or something else?
yes
when you do /reload, all plugins get disabled, then enabled again
or what do you mean with restart?
then something is off
are you talking about restart or reload?
that is also just shutdown + start again, so yeah ofc that would also call your onDisable()
bruh
they;re just making sure their @ NotNull annotation is definitely NotNull
maven slow ๐
HAHA
does anyone know how to only trigger something when clicking in the players inventory part of a gui
gradle is way slower
it always takes like 15 minutes to setup the project
skill issue
yeah, skill issue to just wait
it means
I meant gradle itself takes 15 minutes
u have a skill issue
nah I'm good
gradle is just extremely slow and clutters your hard drive with 150 copies of itself
because one installation isnt enough for gradle
but that just cancels the block break event or am i dumb
you can use global gradle or wrapper
good luck in telling that intellij
if you clone a repo that uses gradle, then the 15 minute waiting time begins
unless it's a tiny plugin
check if it is the top inventory
there was a method to do t hat
seems to work
do u know the method or do u know there is one somewhere
intellij has no problem using a global gradle executable rather than creating a wrapper for each project?
public static boolean hasVoted(String playerName) {
// Check votes.yml if player has voted today
String lastVote = PMCVotifier.getInstance().getVotesConfig().getString(playerName);
String nowDate = dateToString(LocalDate.now());
return Objects.equals(lastVote, nowDate);
}```
I have this function that checks for votes in `votes.yml` where votes are saved after they vote in format `Name: Date`
Do you know why it might falsely say someone voted even though they never played?
Maybe because when it tries to `config.getString(playerName)` the result is a null because there is no such string in config and it somehow glitches, but then how does null date string equals to nowDate?
sheesh
even if its a tiny plugin its still gonna download the whole gradle jar
gradle is such a bad joke. I'm currently recording how long it takes to get oraxen working (just the intellij project) and gradle is working since 8.5 minutes now
it's literally the slowest build system ever
Pov: 2 seconds with worldguard
If you cancel the PlayerChangedWorldEvent, does it just send the player back where it came from?
(Like if I enter a nether portal and cancel the event, do I just end up back in the overworld?)
yeah it's just a bad joke haha
I sometimes wonder whether the gradle devs are just trying to fuck everyone
like, gradle was an april fool's joke but noone noticed it and now people actually use it
and how would one tell it to do so after cloning a repo?
will that work
for not traimling crops
bc soil is not the farmland
but "Material.FARMLANG" doesnt exist
?tryandsee
SOIL?
are you on 1.8 or what
its been FARMLAND since at least 4 years
ofc it does exist
as said, unless you're on 1.8
Material.JEFF
event.getEntity() instanceof Jeff
this is why I claim that gradle sucks and as one can see, it is slow. 8.5 minutes and still no working project https://www.youtube.com/watch?v=MBAt8exmIIQ
yes
im on 1.8.9
8.5 minutes. That's nothing. I easily get 30+ when I setup Fabric or Forge
same
it took 50 minutes for me once
that's even more sad
bruh
Honestly, this is how I feel when I have to download a gradle project. It's so annoying. Not to mention the times when it doesn't work. I've had projects that had dependencies that it couldn't find and didn't tell me until at the very end of a 25+ minute build.
are you running gradle on a potato?
i used gradle on my phone
no
never took more than 10s after the first build
you do realize it depends on how many dependencies you have
lmao
๐
just clone oraxen from github and see how long it takes
unless you are downloading a dependency of 4.5gb, you will not have big problems
i literally just sent a video that shows how slow it is
oh yeah? wanna try
ill give u my build gradle
and see how fast u index and build it
or actually mfnalex
its intellij that slows it too
sometimes i build with console and its 2x faster
I don't care about the reason tbh. All I want is to just clone a repo and that it then works, without having to wait XXX minutes
and maven somehow is capable to do that
gradle isnt
yeah
with me it is the inverse
maven is a lot simpler than gradle too
and it can even shade classes without needing plugins from random github persons
im getting null from this stuf uh oh
` public HashMap<UUID, Integer> kbtimer = new HashMap<>();
public HashMap<UUID, String> gamemod = new HashMap<>();
public HashMap<UUID, Location> botloc = new HashMap<>();
@Override
public void onEnable() {
new BukkitRunnable(){
@Override
public void run(){
for(Player p : Bukkit.getOnlinePlayers()){
UUID uuid = p.getUniqueId();
if(gamemod.get(uuid).equals("rdbot") && botloc.get(uuid).distance(p.getLocation())<= 3&& (int)p.getWorld().getFullTime() - kbtimer.get(uuid) >=10 ){ `
i was literally paid for fixing people's build.gradle
lol
thats just how bad gradle is
that's so extremely useless
how is that called in 1.8
why dont you show us the proper stacktrace instead of saying "im getting null from this"
idk, I wouldnt touch 1.8
bruh
die 1.19-
gamemod.get(uuid)
I am already kind of weird by still supporting 1.16.1
i support 1.17.1 for wlib because of nfts
that will not throw an npe if one of the two parameters are null
and thats some pretty messy code
https://hypixel.net/threads/packet-listener-using-netty-tutorial.332569/ does someone know a similar guide to this that's not outdated?
Atention, this tutorial is for those who are expert in nms and reflection! i will not post any documentation for your own safe!
For a long time i see a lot of servers using Protocollib for a lot of small task, even hypixel use that library and i don't know why use such a complex plugin for...
i just want a custom netty listener :3
but cant find anything on google that's not using 7 year old mappings
habe ypu tried looking at viaversion
I have no idea where exactly to look there
also Via uses ProtocolLib
do they? huh
oh wait
they have some code regarding protocollib but it doesnt seem to be required or used at all to send their own stuff
anyway, via's code is so spread out all over the place, I got no idea where to look
AAAAH FUCKING HELL
I wanted to clone via to check out the source
but ofc it also uses gradle
so, see you guys tomorrow, this is going to take a while
kenny is epic
does anyone have any other idea for netty listeners? There is literally NOTHING on the internet except this weird reflection thing for 1.8
for some reason my plugin is always loading invalid data from the database lol
even if its ipresent in the db
fun
define invalid
i'm loading skills and instead of the right level it always returns 0
might be the impl returning a default obj instead
not only you ๐
sounds like it
weird
who else does he hate then?
uuh is your getInt function wrong or something
why dont use use some sort of ORM system
thank you
idk about sql but i did it for mongo and it wasn't too bad
granted, it's probably not the best way but it's efficient
can someone help me make this work?``` public class villager implements Listener {
static VillagerVault plugin;
public villager (VillagerVault plugin) {
this.plugin = plugin;
}
public static void init() {
}
@EventHandler
public void playerInteraction(PlayerInteractEntityEvent interactEntityEvent Event) {
if (event.getEntityType == EntityType.VILLAGER) {
if (event.getRightClicked().getType() == EntityType.VILLAGER) {
if (event.getEntity() instanceof Villager && event.getEntity().getCustomName().equals((ChatColor.GOLD + "Item Safe"))) {
HumanEntity player = null;
player.openInventory(player.getEnderChest());
} }
}
}
}
when you rightclick on this "vvilager" it opens up your enderchest
early returns lmao
public void playerInteraction(PlayerInteractEntityEvent interactEntityEvent Event)
๐ค
thats not how java works
Java Coding Conventions: https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html
Very questionable formatting
๐ค
Stranger things if it was britisih:
PlayerInteractEntityEvent interactEntityEvent Event okay I am out
I love it when people ask why somethig isn't working without telling us what exactly isnt working
a bit odd innit?
the program isnt working, i showed errors
it's a syntax error
@shy rock
Using an undefined var and having an illegal method head
?learnjava
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.
oof
ah so I asked you what's not working and your answer to that is "it's not working". brilliant. You must learn basic java, oviously that code isn't even valid
lets start writing plugins in js
LOL U REMINDED ME
His compiler error "symbol "event" not found" is the issue
coremods?
no
pretty sure coremods are written in js ... for whatever reason
At least that is what I have heard
a lot of people actually
well that's wrong anyways
I always found it very odd
i make core mods myself, and you never use js in the process
I know, I just wonder why they don't show the proper error that e.g. shows a line number
mixins are coded in java, and used in java
Coremods are in JavaScript
Anyone knows how i can cancell Crops Trampling in 1.8?
me i guess
i gave you the code lmao
lol thats not how to make core mods
it doesnt work though
bc Action.physical doesnt exist
The repository enables core mods to work
1.8 moment, ofc it doesnt exist
But the Forge team wants you to write core mods in JavaScript
yeah
i said 1.8
Andrew dude
any mention of coremods in the forge community
Oh they'll crucify you
instantly means the usage of mixins
bruh did you even looked at what i sent
youre not interacting with the crops, but with the farmland
either use 1.19 or 1.19.2
I mean if you're on 1.19.1, you have zero reason to use .1
Literally none whatsoever
u get the point
.2 fixed a couple critical issues lol
yes but Material.farmland doesnt exist in 1.8
Material.SOIL?
it exists
like i kid you not, anyone who uses forge 1.8.9, uses this
and that has no relationship to 1.8.9
Yeah but... nobody likes nor supports 1.8.9
i tried it before, also doesnt work
and it doent use js
The newer coremod system in 1.14+ (FML2) I believe
me when people tell me they use 1.8.9 SERVER: ๐
Forge didn't natively integrate mixins in 1.8.9 either
I think that was a 1.14 addition
I thought they never did that
a sec
uhh 1) dont use 1.8
It was brought in relatively recently
lemme link u a repo
tell that the server team lmao
this is one of the biggest coremods
that people use
even in newer versions
it has a ui library and other stuff
it doesnt use js
no one uses js to code minecraft mods, never
Not too hard, just takes a huge amount of time I do not have
too bad its being bought like crazy
I've never even heard of this mod before
perhaps hard enough for the majority that hates on it lol
that means you're not knowledgeable?
just another dumb cosmetic "pvp client" kind of mod
that's why I wrapped it in quotes
I mean this is just rendering a bunch of polygons on the screen, not that hard
it's not "essential" noone needs it
thats not the whole mod
lmfao
Plus you can cheat the system by litterally using 2D graphics
why should I use a mod that adds bedrocks cosmetic store xd
I am writing a Maven resolver from scratch, rewriting such a mod should be easily possible for me. Just as I said I do not have the time nor motivation for that
not even open source
meaning you cant really complain about it, since you yourself cant / wont do it
How do I get a slot from event.getSlotType in an inventory
I could conquer the world if only I could be bothered to get out of bed
I can do that, I just wont
if only i ever had motivation to do anything ๐
make it yourself then perhaps complain about opensource
Especially because I have better (more challenging) things to do
nah
it would be impressive if you can do all that just by yourself
why would I make something I hate
which i seriously doubt you can manage in under a year
Software gets written in years, not in months
Depends on the software lol
your way of describing it makes it look like it's cake
It is more like a lengthy walk
yes
which most people would give up midway
if they do it alone, like you think you can
Most people are cowards
jokes on you i use a laptop
code on ur bed
coding on bed while watching other things
Then you're bad too
looks like im close then
only missing one screen on top
If your PC setup wouldn't kill you if it fell on you then do you even have a pc
Best thing
tbh idk why ppl put their pcs
2nd screen is like a tv lmao
I own my property
ah
I'll shoot you with a lower caliber bullet
thank you
none, for he has a wife
then don't
Lol let me know when you see her, been wondering where she's been
Relationships are cringe, how are you going to be on the grind 24/7 if you are in one
lol
i dont see the problem here!
i always say you either get a girlfriend. or a nice car
you are the problem
cant do both
or a mc gf
and im going for car
the self reaction goes hard
The problem with an MC girlfriend it may be something other than you expect.
Rise above humanity, acquire the grind set and die of a heart attack at 37
WE ARE BREAKING THE CONDITIONING
im not willing to know what 'something other' means in this context
a turtle
๐ข