#help-development

1 messages ยท Page 66 of 1

echo basalt
#

attributemodifier

crude charm
#

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

glass mauve
echo basalt
#

you can apply it to an itemstack ye

echo basalt
echo basalt
crude charm
glass mauve
#

ok so integer indexing:

0 -> c
1 -> i
2 -> j
3 -> k
4 -> o
echo basalt
#

yeah it's obfuscated

glass mauve
#

c = entityID?
and the others

echo basalt
#

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

quaint mantle
#

How do I allow many versions with one plugin?

glass mauve
echo basalt
#

there's a write method

glass mauve
echo basalt
#

no

#

within the nms class itself

glass mauve
echo basalt
#

yeah that

glass mauve
#

xD

lost matrix
quaint mantle
#

How do I allow many versions with one plugin???

#

i need 1.8 ~ 1.19.2 support

lost matrix
lost matrix
#

Are you using any nms?

quaint mantle
#

No

#

I'm just thinking of using ProtocolLib.

fiery prairie
#

then if you set 1.8 then it should work with up to 1.19.2

lost matrix
quaint mantle
#

NOT ~ 1.16 or 1.17

echo basalt
glass mauve
buoyant viper
#

as long as u stick to just bukkit 1.8.8 api u should be fine idk

lost matrix
fiery prairie
echo basalt
#

With big projects: start on the latest version, and support anything newer

quaint mantle
#

This is because the latest version and version 1.8.8 must be supported. Many users for that plugin want version 1.8.8.

crude charm
glass mauve
# echo basalt

oh ok if I understand, the write method got the same indexing as wiki

echo basalt
echo basalt
#

it might not follow the exact order of the field indexes which is why I say cross-reference

lost matrix
glass mauve
#

but for protocollib I need to look into the nms obfus stuff and then top to bottom

echo basalt
#

yeah

glass mauve
echo basalt
#

L, M, N yeah

crude charm
glass mauve
#

do I need HEad Yaw? didn't use it before with wrapper

echo basalt
echo basalt
#

I've had issues when I forgot to set yaws

echo basalt
#

then tried doing auto-rotation and wondered why

buoyant viper
#

and latest mc

echo basalt
#

just support whatever the hell you want, and suffer the consequences of outdated apis

#

Stupid arguments have stupid outcomes

buoyant viper
#

just offer more features the newer the server version is ๐Ÿ˜Ž

crude charm
#

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)
quaint mantle
glass mauve
#

can I just cast to byte?

buoyant viper
#

make them want to upgrade

echo basalt
echo basalt
#

you surely don't want to lose those 2 customers

tender shard
buoyant viper
echo basalt
#

1.9 servers are a bit uncommon

quaint mantle
#

i dont want

echo basalt
#

but 1.12 is understandable

#

then do whatever the fuck you want

buoyant viper
#

so u can drop support for 1.9 and 1.12 too ๐Ÿ˜Ž

echo basalt
#

I'm not your dad

quaint mantle
#

I want to support 1.12

echo basalt
#

then support 1.12

tender shard
#

I always only do 1.16+ and everyone who uses older versions is probably 90 years old already anyway

quaint mantle
echo basalt
#

1.8 servers are for kids younger than the version itself, change my mind

buoyant viper
#

i do whatever version my server is running

glass mauve
buoyant viper
#

i dont write public plugins duke

tender shard
echo basalt
quaint mantle
glass mauve
#

yay I understand :D thank you soo muchg

crude charm
tender shard
# quaint mantle how to

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

echo basalt
#

he pays wannabe devs with parents money

glass mauve
#

this should work right?

crude charm
#

I swear more 8 year olds barely know grammar

echo basalt
#

what stops you from writing your plugin in 1.7.10

tender shard
echo basalt
#

other than the 5kg of white makeup in your face

crude charm
#

No #getOfflinePlayers

#

or OnlinePlayers

glass mauve
#

and this also looks fine for me, right?

echo basalt
#

Datawatcher grr

#

I have a util class for that

quaint mantle
# tender shard have to what?

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.

echo basalt
#

but you should be fine in that class

glass mauve
#

I did that some months ago, idk what I did here

tender shard
#

just don't use NMS lol

crude charm
#

What is in the 1.2 update or do we not know?

drowsy helm
#

is sendMessage on a runnable or something

quaint mantle
crude charm
drowsy helm
#
    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
glass mauve
buoyant viper
echo basalt
#

yeah run buildtools or something

chrome beacon
echo basalt
#

Actually no

#

you don't need buildtools as you can already see the stuff

#

what's the error

quaint mantle
#

.

#

ok

crude charm
fiery prairie
#

its on 1.8

crude charm
fiery prairie
#

thats even worse

echo basalt
tender shard
glass mauve
#

๐Ÿ‘€

#

whats wrong with this xD

echo basalt
tender shard
tender shard
echo basalt
#

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

tender shard
#

autocrafting thing?

echo basalt
#

craft book

#

thing

tender shard
#

the recipe book?

tender shard
#

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 ๐Ÿ˜›

echo basalt
#

I mean technically you can fuck around with nms

#

iirc

#

maybe

tender shard
chrome beacon
#

You can install a mod to patch issues with the recipe book

echo basalt
#

oh ok

#

mojang ๐Ÿคก

glass mauve
opal juniper
#

make a plugin to require a client to have mods :))

tender shard
#

I was also angry about this but couldnt find any solution

echo basalt
#

then ask them

chrome beacon
#

almost

#

Time for you to show both implementations

#

?paste

undone axleBOT
fiery prairie
#

if i made a hasmap like this

private HashMap<UUID, Long> antylogout = new HashMap<>();```

what exactly does System.currentTimeMillis() do?
glass mauve
#

btw are there still people that uses restart instead of stop and restarting that way?

echo basalt
chrome beacon
#

That will just make it not appear in the crafting book at all

fiery prairie
chrome beacon
#

Time since 1970

#

Forgot the exact date

#

Probably

#

Google it

#

"Old stuff"?

spare prism
#

?paste

undone axleBOT
narrow pine
#

how do i got about disabling heart particles using protocollib on my sevrer

fiery prairie
#

so again what does that mean?

spare prism
chrome beacon
#

Time since 1970

#

in milliseconds

fiery prairie
#

1ย 956ย 528ย 000ย 000

chrome beacon
#

That's a bit much though

narrow pine
fiery prairie
narrow pine
#

god damn very different opinions

chrome beacon
#

Current time is 1660642894

chrome beacon
#

Wait no

fiery prairie
#

1956529412000
i think thats the answer

chrome beacon
#

That's seconds my bad

glass mauve
#

ImIllusion, how should I generate the entityID properly?
I now have an AtomicInteger with initialValue 40000 + gets incremented each id

fiery prairie
#

for real though system.currenttimemillis returns the time in milliseconds of what

chrome beacon
#

Again it's the time since 1970

#

Literally

fiery prairie
#

it should say 1956529412000 at the end then ๐Ÿค”

chrome beacon
#

???

fiery prairie
#

forgot the screenshot

chrome beacon
#

1956529412000 is way too large

fiery prairie
fiery prairie
chrome beacon
#

1956529412000 is 2032

fiery prairie
#

shit yeah

#

makes sense

#

but still thats not the answer is it

chrome beacon
#

You don't display the current time since 1970 to the player

#

You want the combat time

buoyant viper
#

dam

fiery prairie
#

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

chrome beacon
#

If you have no idea on how to work with time maybe turn down the commission?

#

And recommend an existing plugin

dim bronze
spare prism
dim bronze
#

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?

spare prism
# dim bronze 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);
        }
    }
rough drift
#

How could I fetch an offline player's PDC

dim bronze
rough drift
#

A PDC is stored on the player's file

dim bronze
#

oh wait

#

๐Ÿคฆโ€โ™€๏ธ

rough drift
#

it is technically stored on the server, so I could either use NBT editing or load the player

dim bronze
#

i read pdc as player connection for some reason

drowsy helm
#

player.sendMessage("\n") sends two packets, interesting

rough drift
#

yes

dim bronze
rough drift
#

I believe it splits by \n and sends all messages

#

so in this case it sends an empty one, then sends another empty ones

tender shard
drowsy helm
#

yeah

tender shard
#

e.g. like this

dim bronze
#

what happens if you send \r\n? 2 messages again?

tender shard
#
List<Material> list = JeffLib.getPlugin().getConfig().getStringList("materials").stream().map(Material::valueOf).collect(Collectors.toList());
rough basin
#

?paste

undone axleBOT
dim bronze
spare prism
rough drift
#

eh I'll just use a cache

#

don't wanna touch nms

dim bronze
#

yes, probably easier ahah

rough basin
chrome beacon
#

Try setting the item meta again

red sedge
#

would it be a good idea to add my own ECS on top of spigots api

narrow pine
tender shard
#

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

drifting halo
#

Mojank moment

red sedge
narrow pine
#

And that i could document it for other ppl cuz im speaking for at least 20 ppl rn

red sedge
#

do you need someone to guide you thru or do you just need someone to give you the code?

tender shard
red sedge
#

choose one

narrow pine
#

What can i do with the code

tender shard
narrow pine
#

How do i put it in the game

red sedge
#
        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

drifting halo
#

If you don't even know that... Messing with packets is gonna be futile

narrow pine
#

Yeah yeah im not using 1.19 where even chatting kicks you randomly

drifting halo
#

๐Ÿคฃ

red sedge
#

i am so confused

narrow pine
red sedge
#

oh god

narrow pine
#

Yeahโ€ฆ

#

Redirect me to some resources at least

#

I can read

red sedge
drifting halo
#

Do you know java at least?

narrow pine
#

However

tender shard
narrow pine
#

I have a few friends

#

That do

#

But they busy

red sedge
#

.__.

narrow pine
drifting halo
#

Good luck

tender shard
#

you must learn basic java

narrow pine
#

Well i got the code now i gotta go kms

tender shard
#

?learnjava

undone axleBOT
narrow pine
#

I know c++ ๐Ÿ’€

red sedge
tender shard
#

i know a bit of turkish

red sedge
#

but you cant use c++ w spigot

narrow pine
#

Ik

red sedge
#

if like disabling that particle is your only goal

narrow pine
#

However

#

I use purpur

drifting halo
#

Well... You can use JNI xD

tender shard
red sedge
#

you could probably use a plugin that does it

narrow pine
#

Ive searched

#

For so long

#

Theres just none

#

And yes its my only goal

red sedge
#

what version are you using?

narrow pine
#

1.18.2 purpur

red sedge
#

i see i see

#

okay

#

uh

#

just use smth like

#

idk the same

drowsy helm
#

is it possible to get the colour of a specific character in a string

red sedge
#

i think its skript?

drowsy helm
#

or the colour of an index

narrow pine
narrow pine
#

Its like skript right?

red sedge
#

idk

red sedge
narrow pine
#

Well i can get skript

drowsy helm
#

yeah i'd probably have to index it myself

red sedge
#

Ya

drowsy helm
#

wait im dumb

red sedge
#

cuz text colours in minecraft arent letter based i dont think

drowsy helm
#

i can do what im trying muc heasier

red sedge
#

what are you trying?

drowsy helm
#

trying to grayscale a string

tender shard
#

muc heasier, sounds like a weird indie band

drowsy helm
#

i can just swap out the specific colour codes

#

muc heasier

red sedge
drowsy helm
#

entity component system?

red sedge
red sedge
drowsy helm
#

if done well, no

#

i do it myself

drowsy helm
#

should be easy

red sedge
#

ye just look for colour codes andthen replace them

narrow pine
#

So uh what do i do with skript and the example code

red sedge
#

Idk

#

I dont use skript

narrow pine
#

๐Ÿ’€

red sedge
#

i'd say go ask someone who knows skript

narrow pine
#

Hm

red sedge
#

or like

narrow pine
#

Dont know anyone that does

red sedge
#

they probably have a discord server

tender shard
red sedge
#

they dont know java

narrow pine
tender shard
#

if you got this running then you basically only have to paste the sent code into onEnable() lol

red sedge
#

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

chrome beacon
tender shard
narrow pine
#

So much effort for smth that so small

#

But its a must

tender shard
#

?services

undone axleBOT
tender shard
#

probaly everyone here could do it in 10 minutes

narrow pine
tender shard
#

as said:

#

?learnjava

undone axleBOT
narrow pine
#

Alright time to enslave my dev again eventhough he has a lot of work anyway

red sedge
#

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

red sedge
#

My main concern was if the spigot api would cause issues

sturdy frigate
#

Are chats from different worlds connected? If not, how can I connect them?

tender shard
#

yes, they are

sturdy frigate
#

Oh okay, how do i disconnect them?

tender shard
#

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

sturdy frigate
tender shard
sturdy frigate
#

okay sure thing ๐Ÿ˜„ thanks

drowsy helm
tender shard
#

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)"

chrome beacon
#

PacketWrapper exists

tender shard
#

isn't it outdated since 100 years?

chrome beacon
#

Shouldn't be too hard to update

tender shard
#

that's also still on 1.15.2

chrome beacon
#

Again shouldn't be too hard to update

tender shard
#

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

chrome beacon
#

wiki vg uses old names

#

from before mojmaps

tender shard
#

nah

#

Jigsaw Generate

#

that is definitely not a proper class name

chrome beacon
#

Yeah true

#

Looks like the name is based on what the packet does?

tender shard
#

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

opal juniper
#

it makes it really easy for version abstraction

#

thats why

tender shard
#

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

opal juniper
#

myeah, but no recompilation is required is what i mean. if a field name changes its still fine

onyx fjord
#

which packet is responsible for view distance?

tender shard
#

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);
}
tender shard
#

it's hardcoded bullshit

opal juniper
onyx fjord
#

i mean like the fog and shit

#

its server controlled now

opal juniper
#

it is? ๐Ÿค”

onyx fjord
#

yes

#

and its annoying af

red sedge
#

but like

#

they really dont

drowsy helm
#

just means its easier for them to update each version

#

which would be fine if they had some good documentation

opal juniper
drowsy helm
#

which they dont

red sedge
#

how hard would it be to just make an enum instead of bullshit integers

tender shard
onyx fjord
tender shard
onyx fjord
#

its play login

red sedge
drowsy helm
#

well they had protocol lib Wrapper classes

red sedge
#

its like the bare minumum

drowsy helm
#

but whoever was working on that gave up on it

#

lol

opal juniper
tender shard
drowsy helm
#

I just want a simple way to make a packet listener

#

without protocol lib

opal juniper
#

but the client info gets resent when it changes

onyx fjord
tender shard
onyx fjord
#

since 1.18 server controls it

opal juniper
#

yes but the client sends it with the info packet as well

#

is what i mean

#

the render distance

drowsy helm
#

someone needs to make a packet listener which works with mojang mappings

#

would be suepr nice

onyx fjord
#

๐Ÿ˜ด

#

packetevents is W

drowsy helm
#

retroopers one?

tender shard
onyx fjord
#

yes it is W

tender shard
#

is W?

#

i wish nexus had a javadoc browser

onyx fjord
#

good

#

L = bad

tender shard
#

why is L bad

#

why is it not B lol

grizzled pollen
#

Q - Logic

onyx fjord
#

W = winner

#

thats why

tender shard
#

would be nice if packetevents would use the actual packet names

onyx fjord
#

0x49

grim ice
tender shard
#

no, like ClientboundAddEntityPacket instead of PacketPlayOutAddEntity

grim ice
#

when people trade online they often use W/F/L

tender shard
#

weird

grim ice
#

to ask for other people inquires about if the trade is a win, a fair trade or a loss

tender shard
#

i'll trade my soul for a cold ice tea

grim ice
#

W

drowsy helm
#

i thought it was from fortnite

tender shard
#

oh god

#

I remember this game

#

so extremely boring

#

the first 20 minutes, literally nothing happens

#

except people chopping down trees lol

drowsy helm
#

yeah its eh

#

im not a fan

tender shard
#

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

drowsy helm
#

tbh it just sounds like you're bad

#

lol

tender shard
#

this ^

#

since when can signs have dye colors

drowsy helm
#

since like 2 updates ago

#

wait

tender shard
drowsy helm
#

thougth it meant wood type

#

is that text colour?

#

orr

tender shard
#

i have no idea, lemme see

#

its not wood color

#

but it cant be text color either because signs can have multiple colored texts

#

i am confused now

drowsy helm
#

is it colour

#

text colour

#

you can dye signs in vanilla now apparently

tender shard
#

can you just right click the sign with a dye?

drowsy helm
#

if it's a known bug then theres not much you can do

drowsy helm
tender shard
#

nice

#

no

#

it's a client thing

onyx fjord
#

wait can i send a packet asking client for their view distance?

drowsy helm
#

client bugs cant be fixed

tender shard
#

you can do nothing except to complain at mojang

drowsy helm
#

by you*

#

mojang takes years to fix bugs

onyx fjord
#

or slaps wontfix card

tender shard
digital rain
#

best nms tutorial where? :)

tender shard
tardy delta
#

nms tutorial ๐Ÿค”

drowsy helm
digital rain
#

ok but like

#

you know what i mean

drowsy helm
#

just google what you need done

tender shard
#

not really

onyx fjord
drowsy helm
#

20% chance someone has done it

tender shard
#

why would you want to send a packet for this

onyx fjord
#

is mixing packets and api in packet listener healthy?

tender shard
#

just do Player#getViewDistance() or however its called

quaint mantle
tender shard
tender shard
#

I think the glow thing was added in 1.18

quaint mantle
#

1.17 together with all the items

tender shard
#

oh ok

drowsy helm
#

oh yo kacper

#

you got the src for that big project open?

onyx fjord
#

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

tender shard
#

btw kacper if you really wanna use packets to get the view distance: it's the ServerboundClientInformationPacket

onyx fjord
#

na im good ๐Ÿ‘

opal juniper
#

I Fucking told you

#

its the info packet

azure hawk
#

do you guys know how to disable Crops Trampling

onyx fjord
#

what

tardy delta
#

some event

onyx fjord
#

@opal juniper ?

tender shard
tardy delta
#

ah

onyx fjord
#

PlayerInteractEvent

tender shard
#

lol

tardy delta
#

playerinteract is for everything lol

tender shard
#

let me check replant's source

onyx fjord
#

physical action

#

LMAO

#

ASS PRESSURE

tender shard
#

yeah its the interact event

#

but blockphysicsevent gets called too IIRC, e.g. if another entity tramples the crops

drowsy helm
#

tf is ass pressure

azure hawk
onyx fjord
#

@azure hawk final answer its PlayerInteractEvent

drowsy helm
#

i cbf searching up the jdocs so im gonna believe you

tardy delta
onyx fjord
#

Does PlayServerUpdateViewDistance trigger on join aswell?

tardy delta
#

why ur doing packets lol

tender shard
tardy delta
#

uh

onyx fjord
#

๐Ÿ˜ด

tardy delta
#

:/

#

lets see if my block trampling code works

opal juniper
onyx fjord
azure hawk
#

how is the Material.? called for cancelling crops trampeling

tardy delta
#

maybe smth like this

onyx fjord
#

does spigot use onDisable() for restart or something else?

tender shard
#

yes

#

when you do /reload, all plugins get disabled, then enabled again

#

or what do you mean with restart?

onyx fjord
#

then something is off

tender shard
#

are you talking about restart or reload?

onyx fjord
#

restart when user does /restart and start.sh exists

tender shard
#

that is also just shutdown + start again, so yeah ofc that would also call your onDisable()

onyx fjord
#

bruh

tender shard
#

paper's javadocs are broken

#

double annotations

onyx fjord
#

alex

#

my gradle build takes 800 miliseconds

dim bronze
onyx fjord
#

maven slow ๐Ÿ˜‚

dim bronze
#

AHH

#

IM SORRY

onyx fjord
#

HAHA

split lake
#

does anyone know how to only trigger something when clicking in the players inventory part of a gui

onyx fjord
#

slot number?

#

perhaps

tender shard
split lake
#

ooh like that

#

ty

#

imma try it

tender shard
onyx fjord
#

skill issue

tender shard
#

yeah, skill issue to just wait

onyx fjord
#

it means

tender shard
#

I meant gradle itself takes 15 minutes

onyx fjord
#

u have a skill issue

tender shard
#

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

azure hawk
onyx fjord
tender shard
#

if you clone a repo that uses gradle, then the 15 minute waiting time begins

#

unless it's a tiny plugin

rough drift
#

there was a method to do t hat

tardy delta
split lake
dim bronze
dense pine
#
    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?
tardy delta
#

sheesh

visual tide
tender shard
#

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

narrow pine
boreal sparrow
#

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?)

tender shard
#

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

tender shard
azure hawk
#

will that work

#

for not traimling crops

#

bc soil is not the farmland

#

but "Material.FARMLANG" doesnt exist

onyx fjord
#

?tryandsee

undone axleBOT
tender shard
#

are you on 1.8 or what

#

its been FARMLAND since at least 4 years

tender shard
#

as said, unless you're on 1.8

tardy delta
#

Material.JEFF

onyx fjord
#

event.getEntity() instanceof Jeff

tender shard
azure hawk
azure hawk
chrome beacon
grim ice
#

it took 50 minutes for me once

golden turret
#

bruh

kind hatch
golden turret
#

are you running gradle on a potato?

grim ice
#

it wasnt pure forge tho

#

it had a lot of other libraries

#

loom

#

mixins

#

other shit

golden turret
#

i used gradle on my phone

tender shard
golden turret
#

never took more than 10s after the first build

grim ice
#

lmao

#

๐Ÿ’€

tender shard
golden turret
tender shard
grim ice
#

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

tender shard
#

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

grim ice
#

yeah

golden turret
#

with me it is the inverse

grim ice
#

maven is a lot simpler than gradle too

tender shard
#

and it can even shade classes without needing plugins from random github persons

hushed pawn
#

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 ){ `
grim ice
#

i was literally paid for fixing people's build.gradle

tender shard
#

lol

grim ice
#

thats just how bad gradle is

azure hawk
tender shard
#

why dont you show us the proper stacktrace instead of saying "im getting null from this"

tender shard
azure hawk
#

bruh

golden turret
#

die 1.19-

tender shard
#

I am already kind of weird by still supporting 1.16.1

grim ice
#

throws NPE, probably

#

u should use Objects.equals

golden turret
#

i support 1.17.1 for wlib because of nfts

grim ice
#

that will not throw an npe if one of the two parameters are null

#

and thats some pretty messy code

tender shard
#

https://hypixel.net/threads/packet-listener-using-netty-tutorial.332569/ does someone know a similar guide to this that's not outdated?

#

i just want a custom netty listener :3

#

but cant find anything on google that's not using 7 year old mappings

opal juniper
#

habe ypu tried looking at viaversion

tender shard
#

also Via uses ProtocolLib

opal juniper
#

do they? huh

tender shard
#

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

opal juniper
#

well, yuh

#

kenny maintains it

tender shard
#

i dont know any kennys

#

but it seems like he hates me

opal juniper
#

kenny is epic

tender shard
#

does anyone have any other idea for netty listeners? There is literally NOTHING on the internet except this weird reflection thing for 1.8

tardy delta
#

for some reason my plugin is always loading invalid data from the database lol

#

even if its ipresent in the db

#

fun

opal juniper
#

define invalid

drowsy helm
#

outdated data?

#

or just outright wrong

tardy delta
#

i'm loading skills and instead of the right level it always returns 0

#

might be the impl returning a default obj instead

onyx fjord
drowsy helm
#

sounds like it

tardy delta
tender shard
tardy delta
opal juniper
#

are you saving the data?

#

lol

drowsy helm
#

uuh is your getInt function wrong or something

tardy delta
#

data is saved

#

i guess something small is broken lol

drowsy helm
#

probably the getInt method then

#

is that your own lib?

tardy delta
#

yes

#

well what part actually

#

wrote all code myself

#

its just ResultSet#getInt

drowsy helm
#

why dont use use some sort of ORM system

hushed pawn
tardy delta
#

uhh never used it and i thought it would be to difficult to implement rn

drowsy helm
#

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

shy rock
#

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

tardy delta
#

early returns lmao

#

public void playerInteraction(PlayerInteractEntityEvent interactEntityEvent Event)

#

๐Ÿค”

#

thats not how java works

shy rock
#

I know i was just testing

#

these are the errors if it helps

undone axleBOT
obsidian drift
#

Very questionable formatting

tardy delta
#

๐Ÿค”

grim ice
#

Stranger things if it was britisih:

quiet ice
tender shard
grim ice
#

a bit odd innit?

shy rock
grim ice
#

@shy rock

quiet ice
#

Using an undefined var and having an illegal method head

grim ice
#

?learnjava

undone axleBOT
shy rock
#

oof

tender shard
tardy delta
#

lets start writing plugins in js

grim ice
#

LOL U REMINDED ME

quiet ice
grim ice
#

there is an api

#

for making forge mods

#

with js

#

๐Ÿ’€

quiet ice
#

coremods?

grim ice
#

no

quiet ice
#

pretty sure coremods are written in js ... for whatever reason

grim ice
#

coremods arent written in js?

#

theyre written in java

#

like any other mod

quiet ice
#

At least that is what I have heard

grim ice
#

except they use mixins

#

lol

#

what idiot told you that

quiet ice
#

a lot of people actually

grim ice
#

well that's wrong anyways

quiet ice
#

I always found it very odd

grim ice
#

i make core mods myself, and you never use js in the process

tender shard
grim ice
#

mixins are coded in java, and used in java

worldly ingot
#

Coremods are in JavaScript

grim ice
#

what??

#

choco what?

worldly ingot
azure hawk
#

Anyone knows how i can cancell Crops Trampling in 1.8?

onyx fjord
tardy delta
grim ice
#

lol thats not how to make core mods

tardy delta
azure hawk
#

it doesnt work though

grim ice
#

and its coded in java eitherway

#

so idk whats ur point choco

azure hawk
#

bc Action.physical doesnt exist

grim ice
#

js is only 10%

#

90% is jvm

worldly ingot
#

The repository enables core mods to work

tardy delta
#

1.8 moment, ofc it doesnt exist

worldly ingot
#

But the Forge team wants you to write core mods in JavaScript

azure hawk
#

yeah

worldly ingot
#

These are examples

azure hawk
#

i said 1.8

grim ice
#

oh well

#

nobody does that

onyx fjord
#

Andrew dude

grim ice
#

any mention of coremods in the forge community

worldly ingot
#

Oh they'll crucify you

grim ice
#

instantly means the usage of mixins

azure hawk
#

i have this code

#

but it doesnt work

grim ice
#

at least not in the nerdy 1.19.2 ONLY community

#

that bans anyone who uses 1.19.1

tardy delta
#

bruh did you even looked at what i sent

#

youre not interacting with the crops, but with the farmland

onyx fjord
worldly ingot
#

I mean if you're on 1.19.1, you have zero reason to use .1

#

Literally none whatsoever

grim ice
#

u get the point

worldly ingot
#

.2 fixed a couple critical issues lol

onyx fjord
#

2

#

of them

azure hawk
grim ice
tardy delta
#

Material.SOIL?

grim ice
#

this mode

#

is a huge coremod

#

it has no mention of javascript

tardy delta
#

it exists

grim ice
#

like i kid you not, anyone who uses forge 1.8.9, uses this

tardy delta
grim ice
#

and that has no relationship to 1.8.9

onyx fjord
#

oh shit

#

wrong chat

worldly ingot
#

Yeah but... nobody likes nor supports 1.8.9

grim ice
#

the same developer is involved with another huge coremod

#

called Essentials

azure hawk
grim ice
#

and it doent use js

quiet ice
#

The newer coremod system in 1.14+ (FML2) I believe

onyx fjord
#

me when people tell me they use 1.8.9 SERVER: ๐Ÿ’€

worldly ingot
#

Forge didn't natively integrate mixins in 1.8.9 either

#

I think that was a 1.14 addition

quiet ice
#

I thought they never did that

grim ice
#

a sec

tardy delta
#

uhh 1) dont use 1.8

worldly ingot
#

It was brought in relatively recently

grim ice
#

lemme link u a repo

azure hawk
grim ice
#

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

dire marsh
#

cringe

#

xddd

grim ice
#

yeah sure

#

i wanna see you make something like that

#

๐Ÿ’€

dire marsh
#

having a store like that is horrible

#

i hate things like lunar as well

quiet ice
#

Not too hard, just takes a huge amount of time I do not have

grim ice
#

too bad its being bought like crazy

dire marsh
#

I've never even heard of this mod before

grim ice
#

that means you're not knowledgeable?

dire marsh
#

just another dumb cosmetic "pvp client" kind of mod

grim ice
#

not a pvp mod

#

ah man

dire marsh
#

that's why I wrapped it in quotes

grim ice
#

its not a client

#

or a pvp mod

#

oh god

quiet ice
dire marsh
#

it's not "essential" noone needs it

grim ice
#

lmfao

quiet ice
#

Plus you can cheat the system by litterally using 2D graphics

dire marsh
#

why should I use a mod that adds bedrocks cosmetic store xd

grim ice
#

bro thats literally 1% of the mod

#

lol

#

it's a really useful mod nonetheless

quiet ice
#

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

grim ice
#

and extremely well made

#

perhaps, though you dont have time or motivation to do it

dire marsh
#

not even open source

grim ice
#

meaning you cant really complain about it, since you yourself cant / wont do it

reef lagoon
#

How do I get a slot from event.getSlotType in an inventory

torn shuttle
#

I could conquer the world if only I could be bothered to get out of bed

quiet ice
#

I can do that, I just wont

tall dragon
#

if only i ever had motivation to do anything ๐Ÿ˜„

grim ice
quiet ice
#

Especially because I have better (more challenging) things to do

dire marsh
#

nah

grim ice
dire marsh
#

why would I make something I hate

grim ice
#

which i seriously doubt you can manage in under a year

quiet ice
#

Software gets written in years, not in months

torn shuttle
#

Depends on the software lol

grim ice
#

your way of describing it makes it look like it's cake

quiet ice
#

It is more like a lengthy walk

grim ice
#

which most people would give up midway

#

if they do it alone, like you think you can

torn shuttle
#

Most people are cowards

grim ice
#

code on ur bed

tardy delta
#

coding on bed while watching other things

torn shuttle
#

Degenerates

#

This is what your PC should look like

tardy delta
#

lmfao

#

im on a laptop too

torn shuttle
#

Then you're bad too

tall dragon
#

only missing one screen on top

torn shuttle
#

If your PC setup wouldn't kill you if it fell on you then do you even have a pc

tardy delta
#

Best thing

grim ice
tardy delta
#

2nd screen is like a tv lmao

grim ice
#

facing the opposite of the wall

#

like

#

what if someone sees u

#

watchin porn

torn shuttle
#

I own my property

grim ice
#

ah

torn shuttle
#

If someone sees me I'll shoot them dead

#

Wtf are they doing in my office

grim ice
#

please shoot me alive im innocent

#

i just wondered what type of porn a grown man wants

torn shuttle
#

I'll shoot you with a lower caliber bullet

grim ice
#

thank you

quiet ice
reef lagoon
torn shuttle
#

Relationships are cringe, how are you going to be on the grind 24/7 if you are in one

grim ice
#

lol

grim ice
tall dragon
#

i always say you either get a girlfriend. or a nice car

tardy delta
#

you are the problem

tall dragon
#

cant do both

tardy delta
#

or a mc gf

tall dragon
#

and im going for car

reef lagoon
eternal oxide
#

The problem with an MC girlfriend it may be something other than you expect.

torn shuttle
#

Rise above humanity, acquire the grind set and die of a heart attack at 37

#

WE ARE BREAKING THE CONDITIONING

grim ice
tardy delta
#

im not willing to know what 'something other' means in this context

reef lagoon
#

a turtle

tardy delta
#

those are cute

#

self reaction smh

tall dragon
#

๐Ÿข