#development

1 messages · Page 47 of 1

robust flower
#

is possible to directly read memory in java/kotlin? I'm willing even to read the freaking object from memory as a byte array and save that directly

dusty frost
#

I mean yeah with Java's scope restrictions and encapsulation, it's quite hard to get information about stuff without them exposing it with like annotations and stuff

dusty frost
#

the problem is, it's not trivial to convert a Java object into a serializable representation

#

unlike with JS and JSON, where objects are prototypes etc.

#

you need something like this to make sure it can be converted back into what it was supposed to be, then you just store all the fields in a nice way

spiral prairie
#

ya

#

but why would you need to store an Object?

icy shadow
#

perhaps the more important question is why do the specific types matter?

#

it's a little concerning

#

but worst case scenario make a DTO object and convert to/from that when you serialize. then you can wrap/recreate the specific types manually

dusty frost
#

yeah Java record/kotlin data class is ideal for serialization

dense drift
#

well said Emily

tight junco
#

hello, is there anyone here who has experience updating spawning in armor stands packet based with armor items

tight junco
#

mostly just, how do you spawn an armorstand with ClientboundAddEntityPacket with armor SMILERS

hoary scarab
#
WorldServer ws = ((CraftWorld)location.getWorld()).getHandle();
EntityArmorStand nmsStand = new EntityArmorStand(EntityTypes.ARMOR_STAND, ws);

PlayerConnection pc = ((CraftPlayer)player).getHandle().playerConnection;

nmsStand.setLocation(location.getX(), location.getY()+1, location.getZ(), (float)location.getYaw(), (float)location.getPitch());
nmsStand.setBasePlate(true);
nmsStand.setArms(true);
nmsStand.setSmall(true);

PacketPlayOutSpawnEntityLiving spawnP = new PacketPlayOutSpawnEntityLiving((EntityLiving) nmsStand);
pc.sendPacket(spawnP);

DataWatcher dw = nmsStand.getDataWatcher();

List<Pair<EnumItemSlot, net.minecraft.server.v1_16_R3.ItemStack>> equipmentList = new ArrayList<>();
equipmentList.add(new Pair<>(EnumItemSlot.HEAD, CraftItemStack.asNMSCopy(<item>));
equipmentList.add(new Pair<>(EnumItemSlot.CHEST, CraftItemStack.asNMSCopy(<item>);
equipmentList.add(new Pair<>(EnumItemSlot.LEGS, CraftItemStack.asNMSCopy(<item>));
equipmentList.add(new Pair<>(EnumItemSlot.FEET, CraftItemStack.asNMSCopy(<item>));
equipmentList.add(new Pair<>(EnumItemSlot.MAINHAND, CraftItemStack.asNMSCopy(<item>));

PacketPlayOutEntityTeleport teleport = new PacketPlayOutEntityTeleport(nmsStand);
pc.sendPacket(teleport);

PacketPlayOutEntityMetadata metaData = new PacketPlayOutEntityMetadata(nmsStand.getId(), dw, true);
pc.sendPacket(metaData);

PacketPlayOutEntityEquipment entityEquipment = new PacketPlayOutEntityEquipment(nmsStand.getId(), equipmentList);
pc.sendPacket(entityEquipment);
```1.16.3 adjust accordingly for future versions.
tight junco
#

wow thats ugly

#

okay thank you

hoary scarab
#

Np

#

Just shows all the packets needed.

broken elbow
#

Is there a way to detect a row update with Jetbrains/Exposed? I'm trying to have a "updated_at" column that changes whenever any other column in that row is updated.
I'm using the DAO API

dusty frost
#

what database are you using

#

some of em have auto updating columns you can use for that

broken elbow
#

mysql

#

MySQL/MariaDB with latest JDBC driver + Hikari pooling

spiral prairie
#

why mysql

#

thats like the worst thing you could use in this age and time

broken elbow
#

bcz I can?

dusty frost
#

An auto-updated column is automatically updated to the current timestamp when the value of any other column in the row is changed from its current value.

broken elbow
broken elbow
#

Well shit. I thought Exposed had like built in caching and stuff. Turns out that's not how it works. this is going to be a bit more painful than I thought 😭

spiral prairie
#

bruh

minor summit
#

xd

spiral prairie
#

exposed is built to be as native as possible to give you the most possibilites while still using most of kotlin and dsls

#

caching isn't that painful either

fossil moth
#

Hello! I'm trying to check if a target player has a specific permission, but it doesn't work. Any ideas?

    register_command: true
    args:
    - target
    open_requirement:
      requirements:
        target_has_permission:
          type: javascript
          expression: '"{target}" == player.getName() && !(player.hasPermission("example.permission"))'
          deny_commands:
          - '[message]&c[Notificare] &6{target} doesnt have permission!'```
dense drift
#

read the topic of the channel @fossil moth

fossil moth
spiral prairie
#

thats pretty much what yaml is

fossil moth
#

oh okay then sorry about that

spiral prairie
#

no worries .:D

spiral prairie
#

Whats like just a bing sound?

#

in minecraft

dense drift
spiral prairie
#

thx

broken elbow
#

With Guava's caching system, when I set the refreshAfterWrite duration, and the duration is reached, the refresh is not automatic. It waits until a request is made. Is there a way to make sure it actually gets run when the duration is reached or do I have to implement this myself (😭)

mental cypress
#

Looks like you might have to use a ScheduledExecutor or something and set it to a fixed rate every couple of minutes.

broken elbow
#

Yeah. That's what I found as well. it is what it is

mental cypress
minor summit
#

I don't know about Guava, but with Caffeine you set a Scheduler in the builder, Caffeine....scheduler(Scheduler.systemScheduler())..

broken elbow
#

guava doesn't have that. I just used ScheduledExecutorService#scheduleAtFixedRate

#

works like a charm

minor summit
#

well that isn't exactly "refresh after write" tho

#

that's just refresh at a fixed rate regardless of write time

broken elbow
#

yeah that's fine for me in this case.

stuck canopy
#

most (or probably all) of the plugin libraries require relocations in maven and gradle (I use maven). I am confused on why its needed and what are relocations actually used for?

icy shadow
#

because the classpath is shared between plugins

#

if plugin A depends on LibX version 1, and plugin B depends on LibX version 2, there're gonna be multiple versions of the same class on the classpath

#

could very easily cause conflicts & errors

stuck canopy
#

thanks for the explanation

#

I am actually working on a library(my library) for my plugins which I want to compile in my plugins and the library(my library) itself has other libraries as dependencies with compile scope. How would the relocations work there? I am relocating the other libraries in my library, will that work if I use the library in my plugins?

icy shadow
#

as far as i know you shouldnt be bundling dependencies into a library jar

#

just expose the transitive dependencies and let the consumer handle them, whether they want to shade them or library loader them or whatever

stuck canopy
#

alright, thanks for the info

viscid yarrow
#

Is there a way to actually download an ecloud placeholder in a plugin without having to execute /papi ecloud download? (Player, Luckperms).

minor summit
#

yeah, just gotta do the http request and download it into the right folder

stuck canopy
#
  bad class file: /home/jitpack/.m2/repository/io/papermc/paper/paper-api/1.19.3-R0.1-SNAPSHOT/paper-api-1.19.3-R0.1-SNAPSHOT.jar(/org/bukkit/plugin/java/JavaPlugin.class)
    class file has wrong version 61.0, should be 54.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.```
#

how can I fix this error?

river solstice
#

Compiled with wrong java version

stuck canopy
#

oh

#

wait how do I see the java version which its compiled with

river solstice
#

54 is java 10, 61 is java 17

stuck canopy
#

do I need to install java 10 or smth?

river solstice
#

What are you trying to do exactly

stuck canopy
#

trying to upload it on jitpack so I can access my github repository

river solstice
#

Hm I'm not sure, havent dealt with such issue, someone else might know better

stuck hearth
#

I'm a little confused, because you don't upload to jitpack, jitpack uses what's on github?

#

I assume the error is probably from jitpack

stuck hearth
#

There's some documentation on their website about applying settings to the build IIRC so that it uses the correct java version needed.

stuck canopy
#

let me see

stuck hearth
spiral prairie
#

Or just update to 17??

broken elbow
#

or

stuck canopy
#

is it related to the java version installed?

#

coz there was a java update recently

#

and I did update it

broken elbow
#

it's related to the fact that spigot 1.193 requires java 17 or higher and you seem to be building using java 10

stuck canopy
#

oh

spiral prairie
#

Jitpack is building with 10 afaik

dusky harness
stuck canopy
#

how can I fix it?

steel siren
#

Does anyone have any idea why the event doesn't get cancelled?
When I left-click, it stops the pickup, but not the dragging.. So it just gets duplicated
But when I place it in another slot in survival, the duplicate disappears
But in creative it's just as if I pressed middle-mouse button

I'm 100% sure the event.setCancelled(true); line gets reached, since the settings.open(clicker) does work when testen

Here is the code:

    @EventHandler
    public void onInventoryInteract(InventoryClickEvent event) {
        // Get the clicker
        if (!(event.getWhoClicked() instanceof Player)) return;
        Player clicker = (Player) event.getWhoClicked();

        // Get the clicked item
        if (event.getCurrentItem() == null) return;
        ItemStack clickedItem = event.getCurrentItem();
        
        // If clicked on settings item
        if (clickedItem.getType() == m_settingsItem.getType()) {
            event.setCancelled(true);
            //clicker.closeInventory();

            // Open settings menu
            //SettingsGUI settings = new SettingsGUI();
            //settings.open(clicker);
        }
    }

Screenshot of setCancelled not working:
https://prnt.sc/9ydkN1hs3XYX

cloud panther
#

Could i ask for some assistant, im loosing my mind!

cloud panther
#

its for 1.8.8

dusky harness
#

you don't check if the player is flying in removeInvisibility

#

oh im 18 minutes late

#

whoops

#

¯_(ツ)_/¯

worn jasper
#

As said previously:
Learn java before anything else. ONLY after learning the basics of java, do you learn bukkit.

torpid raft
#

i believe it includes stuff to learn plain java as well

worn jasper
#

💀

tired olive
#

if theyre not flying and flying?

signal grove
#

players flight status is not updated until after the event

#

so its checking if they were not currently flying, but they now are

#

although im not sure why the first variable is needed...

tired olive
#

oh the event is the receiver of the second call

signal grove
#

its a flight toggle event, so im guessing the only possibilities are either start or stopping fly, i dont think the player.isFlying() check is needed

dusky harness
dusky harness
#

mb

#

i should've read the rest of the messages lol

signal grove
#

no worry haha

cloud panther
dusky harness
#

i misunderstood

cloud panther
#

Oh BTW I fixed it, I had to delay the onplayeritemconsume

dusky harness
#

interesting

#

alr

steel siren
terse osprey
#

Also you don’t have to close the inventory before reopening a new one, try just opening the new one

river solstice
#

you create a command executor and register it for ex. via your main plugin class by the command name that is defined in plugin.yml

steel siren
#

but the item duplicates, so the fact that the item is picked up is cancelled
but not that the item is on the mouse

proud pebble
#

not the click event

steel siren
#
 @EventHandler
    public void onInventoryInteract(InventoryClickEvent event) {
        // Get the clicker
        if (!(event.getWhoClicked() instanceof Player)) return;
        Player clicker = (Player) event.getWhoClicked();

        // Get the clicked item
        if (event.getCurrentItem() == null) return;
        ItemStack clickedItem = event.getCurrentItem();
        
        // If clicked on settings item
        if (clickedItem.getType() == m_settingsItem.getType()) {
            event.setCancelled(true);
            clicker.closeInventory();

            // Open settings menu
            SettingsGUI settings = new SettingsGUI();
            settings.open(clicker);
        }
    }

    @EventHandler
    public void onInventoryDrag(InventoryDragEvent event) {
        // Get the clicked item
        ItemStack draggedItem = event.getCursor();
        if (draggedItem == null) return;

        // If clicked on settings item
        if (draggedItem.getType() == m_settingsItem.getType()) {
            KamaniRPG.logger.info("Dragging settings item");
            event.setCancelled(true);
        }
    }
#

So now I have this

#

and it still does the same thing

#

So draggedItem is always null for some reason?

#

how should I test on which item you're dragging?

#

(the logger never gets reached)

gloomy sparrow
#

Hello, Im accessing the Menu class in DeluxeMenus plugin Collection<Menu> menu = Menu.getAllMenus(); Is this ok to do. am i breaking any rules by doing this as there is no public api for it

long palm
#

Is there any way to use the @silence feature in a message sent by a bot through discord.js?
[sorry for the ghost ping user Silent, accidentally tagged you]

worn jasper
#

Any ideas why this could be happening?

ItemStack writtenBook = new ItemStack(Material.WRITTEN_BOOK);
BookMeta bookMeta = (BookMeta) writtenBook.getItemMeta();

bookMeta.setTitle("Blank");
bookMeta.setAuthor("Server");

List<String> pages = new ArrayList<>();
pages.add("Refunds for " + target.getName() + ":");

bookMeta.setPages(pages);
writtenBook.setItemMeta(bookMeta);

player.openBook(writtenBook);
proud pebble
#

oh its an inventory item

#

yeah, never test in creative mode

#

if your testing if it works then use survival, cus creative mode has some missing stuff that allows this kinda prevention to work

#

otherwise it just duplicates

#

which i experienced while doing custom inventory items

steel siren
#

I just want the upper-right slot (which always contains the settingsItem) to act like a button

steel siren
#

it just becomes weirder

proud pebble
#

so when you pick it up, when the event is fired its still in the slot

#

so maybe try checking getRawSlots() and see if it contains the slot the settings item is in

steel siren
#
  1. click on the item
  2. pickup gets cancelled, but item is still on my mouse (so there are 2 version)
  3. SettingsGUI opens
  4. press esc (close all gui's)
  5. press e (open inv)
  6. the item is still on my cursor
  7. I press somewhere interactable on the inventory
  8. the item disappears from the cursor (back to 1 item)
proud pebble
#

could be a ghost item

steel siren
proud pebble
#

ig try calling Player#updateInventory()

proud pebble
#

also is this in a hub or is this just everywhere>?

steel siren
proud pebble
steel siren
#

any world, any where, at all times.. a player will have a settings item on the top right of his inv

steel siren
proud pebble
#

getrawslots, loop over the slots, check if the itemstack at that slot is the settings item, cancel if it is or smth like that

steel siren
#

everythings works wonderfully now :D

#

thx

#

In case you're interested in the code:

@EventHandler
    public void onInventoryInteract(InventoryClickEvent event) {
        // Get the clicker
        if (!(event.getWhoClicked() instanceof Player)) return;
        Player clicker = (Player) event.getWhoClicked();

        // Get the clicked item
        if (event.getCurrentItem() == null) return;
        ItemStack clickedItem = event.getCurrentItem();
        
        // If clicked on settings item
        if (clickedItem.getType() == m_settingsItem.getType()) {
            event.setCancelled(true);
            clicker.updateInventory();

            // Open settings menu
            SettingsGUI settings = new SettingsGUI();
            settings.open(clicker);
        }
    }
worn jasper
#

Uhm, any ideas if it's possible to modify the default minecraft settings menu (not main menu, settings) with a forge mod? I know this is possible with a custom client, but is it with just a mod?

river solstice
#

Which screen exactly

minor summit
#

"custom client" is literally just a mod

worn jasper
worn jasper
sonic nebula
#
    public BulletProcessor(Rust plugin) {
        this.plugin = plugin;
        this.threadPool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
    }

    public void bulletCheck(Bullet bullet) {
        Player shooter = Bukkit.getPlayer(bullet.getShooter());
        double bulletSpeed = bullet.getBulletSpeed();
        Vector towards = bullet.getTowards();
        threadPool.submit(() -> {
            int ticksPassed = controlhub.getTickCounter - bullet.getTicks;
            double distanceTraveled = bullet.getDistanceTraveled();
            Location currentPosition = new Location(shooter.getWorld(), bullet.getX(), bullet.getY(), bullet.getZ());
            if (distanceTraveled < bullet.getDistancetoTravel()) {
                ticksPassed++;
                distanceTraveled += bulletSpeed;
                Vector movement = towards.clone().normalize().multiply(bulletSpeed);
                currentPosition.add(movement);
                if (checkCollision(bullet) != null) {
                    //todo
                } else {
                    bullet.setX(currentPosition.getX());
                    bullet.setY(currentPosition.getY());
                    bullet.setZ(currentPosition.getZ());
                    bullet.setDistanceTraveled((int) distanceTraveled);
                    if (ticksPassed >= 5) {
                        //todo update bullet object and re run
                        Bukkit.getScheduler().runTask(plugin, () -> bulletCheck(bullet));
                        break;
                    }
                }
            } else {
               return;
        });
    }
``` is this better then looping thru set?
#

of bullets

#

and doing same checks at the end

proud pebble
#

yeah probably

#

if it performs better then sure

sonic nebula
#

didnt try to perform yet

signal grove
#

is the threadpool just for performance increase? I think these calculations are very light and wont affect anything

cloud panther
#

however i keep getting a org.bukkit.event.EventException: null

signal grove
#

hmm, is this code inside your event listener?

cloud panther
#

yes

signal grove
#

i dont believe you xD

cloud panther
#

bro it should work ^^^^^

signal grove
#

what line is the error on

cloud panther
#

it builds ok, its only when i run it in game

signal grove
#

yes, its a runtime error, can i see the message?

cloud panther
#

its this line, i comment it out and its fine

signal grove
#

ok, ENTITY_EXPERIENCE_ORB_PICKUP isn't a valid enum

#

you're probably running it on a different version than youre compiling on

cloud panther
#

1.8.8

signal grove
#

the server is spigot 1.8.8, is that what your plugin is being compiled on?

cloud panther
#

i believe so

#

let me check

#

nvm i was compiling on 1.12

#

;/

#

this website also lied to me then ;/

#

well umm do you know of a "Ping" noise in 1.8.8

signal grove
#

the same noise is in 1.8, but im not sure what the enum is called

cloud panther
#

OH ITs simply orb pickup

#

ORB_PICKUP it works now

signal grove
#

yeah

cloud panther
#

cheers!

signal grove
#

nice

livid cairn
#

i am getting this error

#

while the plugin has no error

#

java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "lars.devop.testbnr.Bannerboard.getCommand(String)" is null

signal grove
#

add the command to plugin.yml or it wont be registered

signal grove
#

np

rigid kiln
#

im in need of some help with deluxemenus and superior skyblock 2

#

trying to make an upgrade gui that has alot of upgrades but having alot of issues

#

view_requirement:
requirements:
HasUpgrade:
type: string equals
input: '%superior_island_upgrade_upgrade1%'
output: 'has upgrade'

#

tried doing this but the its not working

#

[Craft Scheduler Thread - 242/WARN]: [DeluxeMenus] Plugin DeluxeMenus v1.13.7-Release generated an exception while executing task 318109
java.lang.NullPointerException: upgrade parameter cannot be null.
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:907) ~[guava-31.1-jre.jar:?]
at com.bgsoftware.superiorskyblock.island.SIsland.getUpgradeLevel(SIsland.java:2256) ~[?:?]
at com.bgsoftware.superiorskyblock.service.placeholders.PlaceholdersServiceImpl.parsePlaceholdersForIsland(PlaceholdersServiceImpl.java:317) ~[?:?]
at com.bgsoftware.superiorskyblock.service.placeholders.PlaceholdersServiceImpl.handlePluginPlaceholder(PlaceholdersServiceImpl.java:266) ~[?:?]
at com.bgsoftware.superiorskyblock.external.placeholders.PlaceholdersProvider_PlaceholderAPI$EZPlaceholder.onRequest(PlaceholdersProvider_PlaceholderAPI.java:58) ~[?:?]
at me.clip.placeholderapi.replacer.CharsReplacer.apply(CharsReplacer.java:119) ~[?:?]
at me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(PlaceholderAPI.java:71) ~[?:?]
at com.extendedclip.deluxemenus.menu.MenuHolder.setPlaceholders(MenuHolder.java:95) ~[?:?]
at com.extendedclip.deluxemenus.requirement.InputResultRequirement.evaluate(InputResultRequirement.java:21) ~[?:?]
at com.extendedclip.deluxemenus.requirement.RequirementList.evaluate(RequirementList.java:21) ~[?:?]
at com.extendedclip.deluxemenus.menu.Menu.lambda$openMenu$5(Menu.java:374) ~[?:?]
at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3670-Spigot-454acb7-bd29f41]
at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3670-Spigot-454acb7-bd29f41]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]

rigid kiln
#

fixed the error was a typo but still cant see the item in the gui

#

i think it has somthing to do with the output but not sure

rigid kiln
dusky harness
rigid kiln
#

ok\

sonic nebula
#

calculations are just raytraces... how ever i take in the other hand that app to 10000 bullets can fly at same time

signal grove
#

hmm, why do you raytrace when youre also moving the bullet every iteration

#

you can just check if its colliding with anything at each iteration

dusky harness
#

so execute simply just executes it and handles it with a "default" action

#

more specifically if it throws an error, execute will show, but submit will not

#

🙃

#

wait how's that even compile?
I may be blind but there's nothing to break out of

#

oh I'm responding to a message from yesterday

#

ok ignore me

#

👍

sonic nebula
dusky harness
#

i kinda said it weird

sonic nebula
#

we execute other method if theres a collision else it will re run the method till one of condiitions goes false like travel distance , returns somethng (collision)

dusky harness
#

I mean the thread pool submit method

#

to change to execute instead

#

d;jdk executorservice#execute

uneven lanternBOT
#
void execute(Runnable command)
throws RejectedExecutionException, NullPointerException```
Description:

Executes the given command at some time in the future. The command may execute in a new thread, in a pooled thread, or in the calling thread, at the discretion of the Executor implementation.

Parameters:

command - the runnable task

Throws:

RejectedExecutionException - if this task cannot be accepted for execution
NullPointerException - if command is null

dusky harness
#

there we go

#

this one

#

vs

#

d;jdk executorservice#submit

uneven lanternBOT
#
Future<?> submit(Runnable task)
throws NullPointerException, RejectedExecutionException```
Description:

Submits a Runnable task for execution and returns a Future representing that task. The Future's get method will return null upon successful completion.

Returns:

a Future representing pending completion of the task

Parameters:

task - the task to submit

Throws:

NullPointerException - if the task is null
RejectedExecutionException - if the task cannot be scheduled for execution

signal grove
#

aside from the threads though, i really dont think the whole raytracing distanceToTravel() part is needed

#

it will either hit something "now", or it will move forward and hit it on a later iteration

sonic nebula
#

correct how ever the bullets are different callibers for example 556mm would go 70blocks

#

imagine some monkey shoots the air

#

before it ii used snow balls mc entities as projectiles but bruh performance goes poop

#

they tick since its an entity

#

ill rewrite it rn

signal grove
#

ok so the ray tracing is just meant in case a bullet skips over an entity

#

or block

sonic nebula
#

i mean i use it to check if there an collesion

#

because there no really a bullet like an entity in game

#

like a projectile (bukkit)

#

im confused by ur question tbh

signal grove
#

so each iteration, it traces from its current location to wherever the next location will be?

sonic nebula
#

correct

#

according to bullet speed

signal grove
#

ok, i understand now

sonic nebula
#

eh i cant send pictures how ever

neat pierBOT
sonic nebula
#

Heklo + - to explain the concept

#

why we do check next location

#

letts say num represents a check that executes every 10 ticks

#

now its pretty good for combat as well since aimbot would never work very well because of delay which will make the game more challanging

sonic nebula
#

why is mc API so poor damn

#

anyone can think of efficent way to go to hitboxes?

#

lets forget about bukkit existiance because its dog poop so

#

so far i was thinking to use a hashmap

#

Chunk , entity set

#

so ill loop everythng according to a the chunk but by same time problem is if bullet is crossing 2 diff chunks which will be still not light check

#

actually ill probably check for nearby entites and create a hitbox for the check

#

like check according to their loc .

signal grove
#

hmm this is for a gun right

sonic nebula
#

correct

signal grove
#

10 ticks is a pretty long time isnt it

sonic nebula
#

it was for the example

signal grove
#

ah ok

sonic nebula
#

ill do around 2 ticks checks probably

#

so for example if it fliies 20 blocks per second every cheeck will be 2b A - B

signal grove
#

yeah i think the nearby entities would be best

#

in a radius of 'speed'

cloud panther
#

I want to show a overlay with some text but im not sure how, any library which does that ?

#

in 1.8.8 btw

signal grove
#

An overlay on what

cloud panther
#

"you are invisible to other players" text

#

i was wondering how you do that

signal grove
#

ah, it's called the action bar

cloud panther
signal grove
#

yes, are you working in 1.8?

cloud panther
#

yes

#

1.8.8

signal grove
#

yeah you can use the action bar api then, probably easiest

cloud panther
#

but i still get this

#

package com.connorlinfoot.actionbarapi does not exist
when i try to compile

signal grove
#

shoo emily, 1.8 is needed for lot of gamemodes xD

cloud panther
#

1.8 is still what the original minecraft players play smh

cloud panther
signal grove
#

maybe refresh maven

#

idk

cloud panther
signal grove
#

im bad at dependency issues

cloud panther
#

same

chilly pewter
#

Hi, does anyone know why in the jobs gui that I created I don't see the custom icons and instead I see the vanilla ones?

#

It won't let me send the image of what it looks like.

neat pierBOT
proud pebble
#

you added the dependency to your pom.xml aswell right?

#

you could also just copy and paste the code from actionbarapi and put it in your plugin

sonic nebula
#

just use nms shitt

#

acttionbarapi is poop

#

send packett

chilly pewter
oak vessel
#
                b[i] = '§';
                       ^
error: illegal character: '\u00a7'
                b[i] = '§';
                         ^
error: unclosed character literal
                b[i] = '§';
                          ^```
#

I don't really understand what's going on here.

proud pebble
proud pebble
#

if it doesnt list one then you can use jitpack to allow it

#

or just copy and paste the sendPacket method from the source on github

#

or you could use nms to do it so you can avoid using reflection if the plugin is only made for 1.8

proud pebble
#

cus that error doesnt give alot of context

#

id assume thats a char array, perhaps it doesnt support that unicode character for whatever reason

oak vessel
# proud pebble post the full code rather then just a snippet
    @NotNull
    public String translateAlternateColorCodes(char altColorChar, @NotNull String textToTranslate) {
        char[] b = textToTranslate.toCharArray();
        for (int i = 0; i < b.length - 1; i++) {
            if (b[i] == altColorChar && "0123456789AaBbCcDdEeFfKkLlMmNnOoRrXx".indexOf(b[i + 1]) > -1) {
                b[i] = '§';
                b[i + 1] = Character.toLowerCase(b[i + 1]);
            }
        }
        return new String(b);
    }
#

That's the section of code that's causing the issue

dense drift
#

Why is your ide warning you about spigot code?

proud pebble
#

yeah thats just weird

proud pebble
#

are you trying to compile spigot or something

waxen wyvern
#

Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "papi ecloud download Player");

But it just does [18:44:28] [Server thread/INFO]: Unknown command. Type "/help" for help.

Is the plugin using commands on a brigadier dispatcher?

#

*I've even tried adding a / !

mellow pond
#

Do you have papi installed on the server

waxen wyvern
#

yes

#

papi
[21:30:59] [Server thread/INFO]: PlaceholderAPI (2.11.3)
[21:30:59] [Server thread/INFO]: Author: [HelpChat]
[21:30:59] [Server thread/INFO]: PAPI Commands: /papi help
[21:30:59] [Server thread/INFO]: eC

#

omg it works! I just replaceed bukkit with getserver but it replies with [21:35:10] [Server thread/INFO]: Downloading necessary placeholders!
[21:35:10] [Server thread/INFO]: Failed to find an expansion named: Player
[21:35:10] [Server thread/INFO]: Downloaded!

#

but when I type papi ecloud download Player it works (manually)

#

ughh illj ust have my plugin downlaod it from the web

shell moon
#

would this be bad? (I mean in all sense, performance etc)

#

Basically, that the data expires if not accessed after X time

#

import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
the imports if someone wonder 👆 (Ping me, thanks)

stuck hearth
#

You're caching a cache?

sonic nebula
#

its like an API for coloring Strings lmao

dense drift
#

Why is that? 1.8 doesnt have a public api for actionbars

dense drift
#

Also, you might want expireAfterWrite

spiral prairie
#

I usually just have an expiryTime in there, when doing economy systems because for Vault it's better to have some value and fetch the data async than no data

river solstice
#

Cache of a cache

#

👀

spiral prairie
#

Yeah that seems a lil illegal too

sonic nebula
#
    public static void sendActionBar(Player player, String message) {
        CraftPlayer p = (CraftPlayer) player;
        IChatBaseComponent cbc = IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + message.replace("&","§") + "\"}");
        PacketPlayOutChat ppoc = new PacketPlayOutChat(cbc, (byte) 2);
        p.getHandle().playerConnection.sendPacket(ppoc);
    }
#

does this require an AP

#

API its a joke

sterile hinge
#

imagine living years in the past

river solstice
#

I might puke looking at it

proud pebble
#

but with reflection

#

it just allows people who arent using nms to send acttion bar messages

#

and like ive said before they can just copy and paste the sendactionbar method into their own plugin so they dont have to rely on another plugin

sonic nebula
#

API

#

the guy who asked probably doesnt know to code yet

icy shadow
#

apart from the fact that that will break on any different version

hoary scarab
icy shadow
#

dawg how many times are u gonna post that

#

also i thought you didnt make projects for people to use

#

also if you want people to use it so bad, the least you could do is add a bit of documentation on how to actually use it

#

god forbid, publish it to a maven repo too

hoary scarab
#

Single or Multi-Class reflection library.

Example usage (Multi-Class);

Object playOutSpawnNamed = Class.fromName(<PacketPlayOutNamedEntitySpawn>).newInstance();
ReflectObject reflectSpawnNamed = new ReflectObject(playOutSpawnNamed);

reflectSpawnNamed.setField("a", entityId);
reflectSpawnNamed.setField("b", uuid);
reflectSpawnNamed.setField("c", location.getX())
reflectSpawnNamed.setField("d", location.getY())
reflectSpawnNamed.setField("e", location.getZ())

Example usage (Single-Class);

Object playOutSpawnNamed = Class.fromName(<PacketPlayOutNamedEntitySpawn>).newInstance();

reflect.getField(playOutSpawnNamed.getClass(), "a").set(playOutSpawnNamed, entityId);
icy shadow
#

terrible approach

#

scales awfully

hoary scarab
#

🤷

icy shadow
#

nobody with a modicum of self-respect is doing that

hoary scarab
icy shadow
#

would take 30 seconds

#

¯_(ツ)_/¯

hoary scarab
#

🤷

icy shadow
#

cant have it both ways man

#

you want people to use your stuff, make it not painful to use

hoary scarab
icy shadow
#

that should be a last-resort not the primary approach

hoary scarab
#

Difference of opinions.

icy shadow
#

why should i spend ages cloning and copying every file when every other library lets me add a single line to my gradle config?

hoary scarab
icy shadow
#

what

#

so you've just... copied the same code twice?

hoary scarab
icy shadow
#

not really easier to use if i have to copy 4 separate files

#

and definitely not eaiser to use for you

#

now you have 2 separate things, that do the same thing, to maintain

#

really have to wonder if the anti-convenience evangelicism is worth it

hoary scarab
#

No issue with maintaining them since it was basically a one off. Unless I think of something later down the road.

#

Also for the maven bs... I hate using github I'm not gonna bother trying to do maven repos xD

icy shadow
#

if you're not gonna put in the effort, why should anyone else?

hoary scarab
icy shadow
icy shadow
hoary scarab
#

Difference of opinions.

icy shadow
#

that doesnt mean anything man

#

you could say that about anything

icy shadow
#

name a case when managing dependencies is easier the hard way than with a build tool

#

a single case

hoary scarab
hoary scarab
icy shadow
#

what?

hoary scarab
#

Manage dependencies by self -> only require the dependencies

Manage dependencies with manager -> require dependencies, their repos to be online, a manager

icy shadow
#

requiring the manager isnt usually an issue. both big ones have wrappers that you can commit which dont require installing anything

minor summit
#

yeah if I want to download something from the internet, I need a place to download it from

#

shocking

icy shadow
#

requiring the repos WOULD be a good argument if you actually committed anything other than the source

#

so yeah, anyone wanting the dependencies has to hunt down the jar files rather than just running a single command

icy shadow
hoary scarab
icy shadow
#

?

hoary scarab
#

Take spigot plugins for example...
People post mavens repos for their api, but I also could just download the jar.

icy shadow
#

sure you could

#

but then you have to download a new jar if it updates, and anyone else also has to hunt down the exact jar

#

im not sure you understand the point of a build tool

#

it's not like theyre solving some impossible problem, it's convenience

#

1 click to download
also no lol

hoary scarab
hoary scarab
icy shadow
#

1 command to download every dependency vs multiple clicks through spigot/bukkit/maven repo pages (which are very nested since theyre not meant for humans), then moving the jars to the right folders, then adding the jars to the build path manually

#

thats just not 1 click is it

hoary scarab
#

🤷

hoary scarab
#

I'm talking about the single dependency. You have the link you click once to download.

icy shadow
#

where do i find this link?

#

are you giving it to me in a readme?

hoary scarab
#

If we're talking multiple dependencies of course it's more then one click xD

icy shadow
#

ok

#

even if it's 1, it's still not 1 click lmao

hoary scarab
icy shadow
#

no you dont bruh

#

you, as the developer, put it in the build script and then it stays there forever

#

i, as the end user, can build an entire project without even knowing what dependencies it's using

hoary scarab
#

Most of the time that is the url lol

icy shadow
#

not necessarily, no

#

and thats besides the point anyway

minor summit
#

but you aren't publishing to a maven repo, are you?

hoary scarab
icy shadow
#

it's not a point lmao

#

they are simply not equivalent

hoary scarab
minor summit
#

I've been reading this whole time

icy shadow
#

if i want to add a popular library (say, guava) to my project, all I have to do is copy a single line of code and it just works

if i want to add a library made by you to my project, i have to clone the repo, figure out all of its dependencies, find the jars myself across the internet, download every jar, add each jar to the build path manually, and then copy your library code

#

1 of these 2 things is objectively easier than the other

hoary scarab
#

So for context then...

I'm basically saying if you use maven it's downloading the src by generating a url to the download from the repository using inputs such as the repos url, group, artifact and version.

If you have all that info you can download the source yourself using the same url...

The difference is one is a command and one is a click (to download) but both are essentially 1 motion.

icy shadow
#

you are still being extremely disingenous when you say it's 1 click

#

it's just not, in practice

icy shadow
# icy shadow if i want to add a popular library (say, guava) to my project, all I have to do ...

the same principle applies to you as a developer

adding 1 line to add guava, which also provides infinite future-proofing and reproducibility on the off-chance that you get a new PC, or someone else wants to use your code

vs downloading the jar, getting the right path, adding it to your IDE, and this only works for you! anyone else has to do the exact same time consuming process again

icy shadow
minor summit
#

god forbid

icy shadow
minor summit
#

Frameworks! aahhh!!!

icy shadow
#

this depends on at least 4 other things

#

so (in your mind) that's 5 clicks, rather than 1

#

this is already scaling pretty badly

#

what else hmm

#

guice, that's also pretty popular

#

that has no fewer than 9 transitive dependencies

#

so for a project with acf and guice, we're on 14 clicks at least

#

adventure, that's a very modular project so that's a lot of dependencies too

#

a build tool, on the other hand, is always just 1 command

icy shadow
#

which jar?

#

theres quite a few there

hoary scarab
icy shadow
#

no

#

also building the url, that takes time

#

do i use the shaded or normal jar? what's the difference?

minor summit
#

hear me out, you could also paste 24 characters in a text file and it's done

icy shadow
#

this is confusing man

hoary scarab
icy shadow
#

oh my god man

#

me when i read and process information

#

anyway please answer my question

#

which jar do i use?

#

shaded, or not? what version?

dusky harness
#

There's a released jar?

minor summit
#

the point is that you are making it inconvenient for other users to use your library by not publishing a maven artifact, not about using jars from a maven repo outside of projects with a build tool

icy shadow
#

because a dependency manager could figure this out automatically

#

i, as a simpleton, cannot

#

if the 2 processes are completely equivalent there should be an obvious answer

hoary scarab
icy shadow
#

what does that mean?

dusky harness
hoary scarab
icy shadow
#

where do i find these definitions?

hoary scarab
icy shadow
#

no, you're just missing my point entirely

spiral prairie
#

Scope can be many things really

icy shadow
#

if your argument is that a build tool and downloading the jars manually is entirely equivalent, then i shouldn't have to ask these questions, because gradle doesnt make me ask these questions

icy shadow
#

i genuinely do not know what "depends on scope" means lmao

#

and i shouldnt have to

#

but so far this is a pretty terrible example

hoary scarab
icy shadow
#

?

#

are you missing my point entirely or are you just trolling

hoary scarab
#

The first one is more then likely. I've explained everything I'm not gonna repeat it.

icy shadow
#

you've not explained shit

#

your entire argument is based on hypocrisy

river solstice
spiral prairie
#

Mitten we've gone through this many times already, don't try to explain or change Yappers opinion

#

If he could he would rewrite the JVM because he doesn't like using other peoples stuff

icy shadow
#

"i'm lazy"
"just navigate through the repo manually, figure out exactly what snapshot you need, figure out what shaded means and which you need, download the jar, and move it to the right location and add it to your build path, it's definitely less effort than pasting 1-2 lines of code into a gradle script!"

hoary scarab
#

just navigate through the repo manually,
Navigate what? You already have the input

icy shadow
#

oh sorry, concatenate the url manually

#

that's a lot easier

icy shadow
#

or perhaps you cant

icy shadow
spiral prairie
#

Lmao yeah

#

Without any build fjle

icy shadow
#

"please use my things"
"no, im not going to make it easier for you to use"

dusky harness
#

Or jar file

icy shadow
#

epic super reaction fail

dusky harness
#

Idk where ur finding the jar file

icy shadow
#

oh, you're not supposed to

#

you're supposed to copy paste the code yourself 💀

river solstice
#

can money buy happiness

dusky harness
#

Tbf for a single class that's fine but not for multiple classes

icy shadow
#

if it's a single class legit just make it a gist

#

anything else is insulting

river solstice
#

is it me or jira buggin

icy shadow
#

probably not just you

hoary scarab
#

Why would you have to use \ to multiline in readme 🤦

icy shadow
#

?

minor summit
#

you wouldn't?

icy shadow
#

yeah what

hoary scarab
#

One sec. I clicked back and it erased it all xD

icy shadow
#

github web moment

#

if only there was another option

spiral prairie
#

What

#

Just add another newline

#

Anything between empty lines is going to be on the same line and wrapped

hoary scarab
hoary scarab
icy shadow
#

🥴

#

my guy

#

```
code
```

hoary scarab
icy shadow
#

2 newlines

hoary scarab
hoary scarab
icy shadow
hoary scarab
icy shadow
#

?

hoary scarab
#

I think ## is also a new line

icy shadow
#

no it's not

#

that's for headers

hoary scarab
#

Ah yeap

#

Has to commit 🤦 God I hate that. Just post the file don't change my shit.

icy shadow
#

you are an odd one

hoary scarab
#

I prefer a file host with readability... but they don't normally have nice UI's github is the closest but I hate the commit BS (yes I know thats the functionality of git)

icy shadow
#

god forbid you ever work on a big project and have to actually collaborate / look through history

icy shadow
#

also yeah lol

#

not to beat a dead horse

hoary scarab
tired olive
#

what are youse every arguing about lmao

icy shadow
#

mate

#

dont

#

its not worth it

minor summit
#

I hope you don't plan on getting a job in the software dev field

tired olive
#

from what i read mitten opinion w yapper opinion l

#

repo good no repo bad

spiral prairie
tired olive
#

his coworkers better hope not

hoary scarab
#

I currently don't do client development but will probably be getting back into that in the future.

river solstice
#

HelpChat more like BullyChat

icy shadow
#

as in... minecraft?

hoary scarab
icy shadow
#

hmm

tired olive
#

are you gonna tell your clients to clone ur repo and build the project themselves

icy shadow
#

yeah lmao

tired olive
#

🙃

icy shadow
#

i was gonna say

icy shadow
#

L

#

and that doesnt actually answer the question

tired olive
#

why would you charge extra for source code

hoary scarab
tired olive
#

so if they pay for source code you won't package it for them?

hoary scarab
icy shadow
#

?

hoary scarab
hoary scarab
# tired olive what.

If they bought source, had someone edit it, then ask me to edit it, I won't do that.

#

I only edit my own source.

tired olive
#

so why not charge em extra to make updates if the source has been modified since itll take longer

#

or just refuse to update code thats been modified

tired olive
#

that's cheeky

hoary scarab
tired olive
#

so confused. you just said you would charge extra for the possibility that someone could edit it and you might possibly have to update it later but you charging extra only when they have edited it is different for some reason?

hoary scarab
#

That's why I stuck with public plugins for so long I love working on my own creations and if some people want to purchase it then that's great too.

tired olive
#

you do you

river solstice
#

I do me

tired olive
river solstice
#

😳

hoary scarab
#

Because then it becomes their source code.

icy shadow
hoary scarab
icy shadow
#

🙃

icy shadow
tired olive
icy shadow
#

heheh

hoary scarab
#

I mean technically could just copy the code from the multi into the single, then I won't have to do anything on my end lol.

icy shadow
#

yep that sure is a thing that you could do

#

one of the things of all time

hoary scarab
shell moon
# dense drift What exactly is the concern?

Why expireAfterWrite? I want to cache some values until its not used anymore for x time, the first Cache (with uuid as key) is that they are per player, so only after X time the player not being used at all its removed, would be bad? pepecatcry

icy shadow
#

definitely a development approach

hoary scarab
#

You might cache it and forget and then it becomes a memory leak if you do it enough.

shell moon
#

Doesnt adding an entry count as accessing?

spiral prairie
#

Memory leak big words

#

L for not providing source code always

tired olive
#

whats a single and multi supposed to mean

shell moon
#

But the cache expire in 30 secs if not accesed thonking

spiral prairie
#

Yeah

icy shadow
#

It’ll temporarily stun you

hoary scarab
hoary scarab
tired olive
#

is it just that all the classes in the single package are members of ReflectionBase whereas in multi they're top level classes?

shell moon
shell moon
icy shadow
tired olive
#

the single thingo seems like a job for a utility class that just has a bunch of factory methods

hoary scarab
tired olive
#

dont see a need to provide two completely seperate apis that do the exact same thing in the same project

hoary scarab
#

You can read the example usages to understand what I mean.

tired olive
#

the example isn't even correct

#

it's Class.forName not Class.fromName and it's also deprecated iirc

#

so is Class.newInstance

icy shadow
#

Don’t think forName is deprecated

hoary scarab
icy shadow
#

Have you actually tested this?

#

Have you used it at all?

tired olive
#

the other things still hold

shell moon
#

This eviction strategy is based on the expiration time of the entry and has three types: Expire after access — entry is expired after period is passed since the last read or write occurs. Expire after write — entry is expired after period is passed since the last write occurs.

icy shadow
#

Yeah why would you ever use single

#

They should make a single class version of spring

#

That would go hard

tired olive
#

fr

minor summit
#

because you have to copy it manually

tired olive
icy shadow
#

checkmate, gradlecels

hoary scarab
icy shadow
#

another word flashbang

icy shadow
#

so, since java is an OOP language, as you know, isn't the single class bad design?

tired olive
#

i said that if you want it similar but not as shitty, you could provide a utility class with a bunch of static factory methods

#

i wouldnt even call that similar

hoary scarab
icy shadow
#

why would you want a single class

#

we're going in circles here

hoary scarab
icy shadow
#

?

icy shadow
hoary scarab
icy shadow
#

what?

hoary scarab
#

I really can't explain it to you. If you haven't figured it out by now 🤷

tired olive
#

the idea of a class that constructs the objects for reflection isn't a bad idea. the bad idea is having it the two completely separate.

icy shadow
#

man if we're gonna play the condescending game i have a LOT more criticisms about this library

#

and not just about its lack of a build tool

icy shadow
#

ok

#

issue 1 is that it's entirely pointless

tired olive
icy shadow
#

and in fact it's straight up worse than just using normal reflection

icy shadow
#

javadoc comments should be /** not /*

icy shadow
#

some of the design decisions are also frankly noncensical

hoary scarab
icy shadow
#

clearly

#

that doesnt mean it's not a valid criticism

spiral prairie
#

Probably takes more time to copy the classes and figure out what license to use and how to credit the author, then find out how to use it because there are basically no docs before finding a bug which you then can't easily fix since it's not just a dependency but an actual class, and when you have fixed that you have to somehow clone the project, copy the contents of your edited version, commit and push to another repo, not to mention that you have to create a pull request too just to find out that Yapper hates people and collaborating with them and closes your pr without any reason than just to use reflection

minor summit
#

bro can't type a single *

hoary scarab
spiral prairie
#

I wouldn't care if Yapper was 11 or so xD

tired olive
icy shadow
hoary scarab
icy shadow
# icy shadow some of the design decisions are also frankly noncensical

if i want to get a ReflectMethod from a method int blah(int x), none of the methods in ReflectionBase work because they only work with no-args methods, so my only option is
to get the method manually, then wrap it with a ReflectMethod - then what the hell is the point of the library lmao

tired olive
#

bro what

#

more like 3-4 minutes

hoary scarab
#

I removed alot but some are still there

spiral prairie
#

Why did you remove them?

hoary scarab
tired olive
hoary scarab
icy shadow
#

at all

spiral prairie
icy shadow
#

what is there to explain

#

it's just not gonna work lol

hoary scarab
icy shadow
#

what can i do

spiral prairie
#

If you haven't figured it out, he can't explain 🤷‍♂️

icy shadow
#

TRUE

#

getMethod(Class, String)... okay that doesnt help because you cant specify the parameter types
same goes for getMethodByReturnType

spiral prairie
#

What's so hard about that lmao, read the definition

icy shadow
#

if you have overloads like ```java
int blah();
int blah(int x);

#

so with that, and the terrible error handling this is looking like a straight-downgrade from normal reflection so far

spiral prairie
#

Imagine not using paper-userdev

#

Cringe

hoary scarab
#

I'm really not seeing the issue lol. Mojangs obfuscation require you also have to check return types.

icy shadow
#

the whole design of the ReflectX classes is also bizarre... why are things like getFieldByType not static factory methods?

icy shadow
hoary scarab
icy shadow
#

🙃

icy shadow
spiral prairie
hoary scarab
# icy shadow yes but you also have to check parameters

In some cases yes... Hence why in the multi class I added the option to ignore types and it counts the parameters. Some objects don't return the same class type.
For example the packet used in the example returns Class as the class which can't be used to test in the parameters.

tired olive
#

6-7 years mhm

constructor.getParameterTypes().equals(parameterTypes)
icy shadow
#

(ill give you a clue, you're not)

spiral prairie
#

I know where it is

hoary scarab
spiral prairie
#

In C:\Users\Yapper\Projects\ReflectionNewNew2.0NoGit

tired olive
spiral prairie
#

And what's that check supposed to do? Can you send it? Tryna figure out the context

hoary scarab
icy shadow
#

😵‍💫

tired olive
#

@hoary scarab can you figure out why this test is failing?

class HomosexualityTest 
    @Test
    void test() {
        final var o = new Object();
        assertTrue(new Object[]{o}.equals(new Object[]{o}));
    }
}
icy shadow
#

also theres no way of doing setAccessible

#

so you're fucked if you need to access non-public methods... which is one of the main points of reflection

#

but let's say i copy the code and add that, because im a kind heart

#

now what?

hoary scarab
icy shadow
#

only in the multi

#

not in the single

spiral prairie
icy shadow
#

damn

#

my gift of prophecy is on fire today

#

thank god we've got 2 versions of the same code to maintain

tired olive
#

if ur still stuck, arrays have the same implementation of equals as Object

minor summit
#

your mistake is doing whatever @Test is, we don't do that here

icy shadow
#

@hoary scarab ```java

static class Test {
public int blah() {
return 5;
}
}

System.out.println(ReflectionBase.instance()
.getMethod(Test.class, "blah")
.invoke(new Test()));

spiral prairie
minor summit
#

your mother

spiral prairie
#

Ok sad

icy shadow
#

oh this is nice, i have to pass the same object twice!

#

oh also setAccessible isn't fixed in the multi either lmao

#

it's only fixed in ReflectField*

tired olive
spiral prairie
#

Yeah about the example you sent

spiral prairie
#

Oh bruh

#

Sorry Sparky

#

Yeah completely forgot about arrays ahahha

tired olive
#

lmao

spiral prairie
#

Gotta use Arrays.equals

#

Was on about ArrayLists

#

💀

icy shadow
#

rookie error

spiral prairie
#

Yeah

#

I should just start designing shirts and sell them on etsy

hoary scarab
#

So you can't invoke a method with no paramters? I'll look into that. The lib might be behind from my testing.
Will also add the accessible to the methods that need it.

icy shadow
#

You can’t ever distinguish a specific overload

shell moon
#

you need to call invoke(null) at least right?

icy shadow
#

No

hoary scarab
spiral prairie
icy shadow
#

I provided too many arguments actually

spiral prairie
#

Then provide the correct amount?

icy shadow
#

The point is that getMethod/invokeMethod only ever returns the first overload

#

So you’re fucked if there are multiple

spiral prairie
#

Cool

icy shadow
#

Plus like I said, setAccessible is still non-existent in most of the classes

spiral prairie
#

He'll work on that mitten, haven't you heard him?

icy shadow
#

Legit convinced this hasn’t been tested / used at all

hoary scarab
tired olive
#

be more confident

spiral prairie
#

Then stop sending it everywhere

hoary scarab
spiral prairie
#

If you haven't tested it in 50% of all usages

icy shadow
#

alright man

#

don’t worry bro I’ll be there to make sure people dont use it

#

until it actually works, at least

hoary scarab
#

And the example usage is whats been used (the correct code though untill I rewrite it)

tired olive
icy shadow
#

😭😭😭😭

spiral prairie
#

I hope one day Yapper goes like and says, well, i learned that i have many things ahead of me to become a proficient developer including git and gradle/maven and a proper repository in addition to proper programming patterns and OOP

hoary scarab
icy shadow
#

not with this mindset

spiral prairie
#

ChatGPT could have written a better library

#

Let's try

#

Mitten wanna quickly write a prompt?

icy shadow
#

Unironically yes

#

I’ll let you have the honour

spiral prairie
#

I'm on the phone

#

Please xD

icy shadow
#

Damn same

spiral prairie
#

Oh rip

icy shadow
#

gimme a minute

spiral prairie
#

Maybe Yapper can write one

icy shadow
#

Perhaps

spiral prairie
#

I'll even give the proompter the honor of GPT 4

icy shadow
#

wow

spiral prairie
#

Soy anybody up for the challenge?

torpid raft
#

no soys here

#

this is a based community only

icy shadow
#

Well

icy shadow
spiral prairie
#

Cool

spiral prairie
#

Let's get one together

torpid raft
#

are they on sale

#

i pride myself on being a thrifty shopper

icy shadow
#

thoughts?

dense drift
icy shadow
#

has anyone asked why you have a cache of a cache yet

#

that seems a little quirky

chilly pewter
#

https://imgur.com/a/UlYj6ep
Hello, I am the one who had this problem, I realized that in the itemsadder if I see the objects, but not in this menu, do I have to change the custom model data?

spiral prairie
#

Yes

spiral prairie
dense drift
icy shadow
#

odd

shell moon
shell moon
#

i dont find other solutions to what i needed

dense drift
#

You might need to be logged in Sparky

icy shadow
#

works fine for me

shell moon
#

the other was a class and save expire time as long xd

icy shadow
#

face with spiral eyes

shell moon
spiral prairie
dense drift
#

I wonder if you can use smth like a CacheKey(UUID, String) as key and keep only one cache that expires after 30s

#

So Cache<CacheKey, String> or w/e

spiral prairie
#

@icy shadow

#

Asked it to make use of generics

#

Haven't looked at the code

icy shadow
#

aha

#

now we're getting somewhere

#

thats a lot more useful

#

just a lil bit of almost type-safety

chilly pewter
dense drift
#

Read the topic of the channel

icy shadow
spiral prairie
#

Anything else GPT should add?

icy shadow
#

type safety for methods would be nice, but probably tricky

#

could at least make it safe in the return type

#

probably not the arguments

#

without 255 different subclasses

chilly pewter
tired olive
#

at least it doesn't handle errors by returning this

#

if thats even called error handling

icy shadow
#

😋

#

to be fair this is just as bad

#

wait no it's not

#

the gpt3.5 one was

#

result type could be cute

#

i'd probably just wrap in RuntimeException but that's not much better

spiral prairie
tired olive
#

my shitty version essentially this did the same

icy shadow
#

wow very safe

#

even checking the return type manually

tired olive
#

actually nvm it had its own versions of the exceptions that were unchecked

icy shadow
#

oh

#

interesting

spiral prairie
#

I can't tell if this is a joke or not

icy shadow
#

im not joking

#

it's an interesting approach

#

and overall this is actually not bad

spiral prairie
#

Lol

#

Anything else?

icy shadow
#

maybe caching? the lookups can be pretty slow

spiral prairie
#

Yup

spiral prairie
#

Just pasted your messages

icy shadow
#

excellent

#

maybe AI is going to take our jobs after all

dense drift
#

God I hate this paste

spiral prairie
#

Hm?

dense drift
#

It is not suitable for mobile, it goes in edit mode at the slighest touch

spiral prairie
#

Yeah i agree

#

Might switch

icy shadow
#

shame because it's the nicest looking by far

spiral prairie
spiral prairie
#

Time to release this using gradle and go my repo

carmine crow
#

Hi, im using ProtocolLib, i want to clear nodes in ClientboundCommandsPacket, problem is that there is nothing like getNodes method in PacketContainer, what can i do about that?? is there any work-around??? maybe there is easy way that i dont see. problem is that there is no ProtocolLib's discord server or anything so i cant ask them.

spiral prairie
#

And spam everybody

icy shadow
spiral prairie
#

Hm hm

#

Omg mittwn

icy shadow
#

hai

spiral prairie
#

I jave an idea

#

Ill ask GPT to make me an awesome past service

icy shadow
#

good plan

spiral prairie
#

That should be fairly interesting, shouldn't it?

#

After I published my GPTReflectionUrinal obv

dense drift
spiral prairie
#

ChatGPT can't really do that easily without pasting all classes

#

You can contribute, I like it

dense drift
#

I wish luko just added a way to disable the editing

spiral prairie
#

Not as much as it could but

icy shadow
#

cant gpt4 read webpages? could send it the github

dense drift
#

Lol

spiral prairie
#

Have tried gaslighting it into thinking it can, but even with dan it can't

hoary scarab
spiral prairie
#

That's true

#

You want a PR or should I publish it on my own

river solstice
#

that ting is inzane

spiral prairie
river solstice
#

been using it for a while

spiral prairie
#

How do I get it

river solstice
#

I love how it sees all the context of your project

spiral prairie
#

I have normal Copilot

river solstice
#

waitlist

#

classic

#

I got it pretty fast tbh

#

week or so

spiral prairie
#

Ah cool

#

Lemme apply