#development

1 messages · Page 80 of 1

worn jasper
#

you can't really properly use sveltekit without svelte lol

worn jasper
#

yesno

minor summit
#

same

dark garnet
#

I tried using an http and websocket library but I forgot what it was called

#

It was something popular/big I think

dark garnet
stuck hearth
#

Me

worn jasper
#

rich harris

stuck hearth
#

I'm rich and harry

worn jasper
#

svelte was bought by vercel

#

and is funded/maintained by them

#

aka, svelte is not going anywhere

dark garnet
worn jasper
#

package name?

dark garnet
worn jasper
#

me go sleep

#

adios

dark garnet
worn jasper
#

lol

#

svelte is a modern framework

#

def. recommend it though

#

has been my go to framework for fullstack

dark garnet
#

For java?

worn jasper
#

no

#

it's not java

#

it's javascript

dark garnet
#

Yeah was gonna say I was reading js stuff on site

worn jasper
#

don't think there is that many alternatives to spring

#

in terms of java frameworks

dark garnet
dusky harness
#

🤨

dark garnet
pulsar ferry
#

Not that much progress it seems 😔

worn jasper
#

fr

#

was about to say that

#

imagine also not using BetterJDocs for the javadocs

#

pfff

dusky harness
worn jasper
#

amateur

#

(totally not a shameless plug)

dark garnet
#

Ohhhh in README

#

What’s wrong with jitpack?!

dark garnet
dusky harness
#

🥲

pulsar ferry
#

Firstly (not sure if this is still a thing) jitpack is horrible at handling transitive dependencies
And it has caused many other issues to me in the past when using libraries from it

#

Just post it to maven central, it's free

dark garnet
#

But can it do individual commits

pulsar ferry
#

Why do you need individual commits? I mean just set a github action to publish on commit, but that sounds overkill and dangerous

dusky harness
#

there are snapshots :)

dense drift
dark garnet
dusky harness
dark garnet
#

Pls

stuck hearth
#

Yea

dusky harness
# dark garnet Explain

setting up spigot api dependency but replace the spigotmc repo with sonatype/maven central repo

#

idk
what really are the downsides of jitpack tho

stuck hearth
#

Sucks to configure

#

It's also not multimodule friendly in the way that's convenient

dark garnet
#

I’ll probs stick with it for now ¯_(ツ)_/¯

dusky harness
# pulsar ferry No idea

ye it runs ```
./gradlew clean -Pgroup=com.github.srnyx -Pversion=1.0.0 -xtest assemble publishToMavenLocal

minor summit
#

i'm like 99% sure it has downtime like every week lol

#

very reliable service 👍

dark garnet
#

@dark garnet ask josh nginx thing

minor summit
#

i mean it had downtime like 2 days ago

stuck hearth
#

@dark garnet ask Josh nginx thing

minor summit
#

i wouldn't say it's an "old" issue

#

and "never" is... well PepeLaugh

pulsar ferry
minor summit
#

compare to

#

hell, snapshots even

stuck hearth
#

Worst game of Russian roulette ever

fast glade
#

Wouldn’t the mob then just try to retarget the player, and then I’d cancel and it repeat every tick and the mob would never target anyone else

tribal briar
#

am i able to get in a vc with you to help me with some stuff

dark garnet
#

just ask here?

tribal briar
#

well so im trying to make a minecraft server like BerrySMP or somthing its a eco server with kits ranks cratesquest jobs and more but idk what plugins to add

#

theres also shop sell pw tpa fly claims crop hoppers chest shops

neat pierBOT
#
Deluxemenus - Version List
Spigot:

1.8.8
1.12.2
1.13.2
1.16.5
1.20.2

Version:

v1.10.5
v1.13.7
v1.14.0 - Latest
v1.14.0 - Latest
v1.14.0 - Latest

wheat fog
#

how do I remove a player from tablist, without removing his skin/entity?

#

In 1.8.9 a simple REMOVE_PLAYER packet worked

#

now in 1.20 REMOVE_PLAYER also removes him from the world

#

and makes it like he isn't even on the server

fleet abyss
#

How can I use PAPI to translate placeholders? Like in my plugin I want to use %player% somehow

spark skiff
#

Why use papi for that?

#

You can just do player.getName()

unique folio
#

Best velocity/proxy-wide mini-games or event plugin?

pulsar ferry
unique folio
torn heart
#

:ohthemisery:

stuck hearth
#

You know what they say about Missouri

haughty wing
#

Yo guys, im excited to be here, looking forward to making cool shit

stuck hearth
#

Thank you Havoc Goober

haughty wing
#

Yessirski

#

Any first plugin recommendation

stuck hearth
#

Exploding bees

haughty wing
#

I have a programming background but ive never made one before

#

Yuhhh

dark garnet
stuck hearth
#

wot for

dark garnet
#

and i wanna compare 1.20.4 vs 1.20.5+

stuck hearth
#

Oh

dark garnet
#

how do i get enchantments by name/key now?

#

like i have users define enchantment in config, but idk how to convert that to an Enchantment with the new registry system or whatnot

#

nvm i figured it out lol

#

NamespacedKey#minecraft(String) :))

#

h2.jdbc.JdbcSQLSyntaxErrorException: (Message 42S22 not found); SQL statement: SELECT "ll_lives" FROM "entities" WHERE "target" = ? [42122-220]
what the heck is wrong with the SQL statement
happening when i use Connection#prepareStatement(String)

#

ping if reply pls

torpid raft
#

maybe share your pertinent code

#

@dark garnet

dense drift
#

Double quotes are for strings, try backticks for columns/tables

#

SELECT `ll_lives` FROM `entities`

lyric prairie
#

For DeluxeMenus, I want to make sort of a queue system

#

Where you can join different rooms

#

However, I'm having trouble since I don't know how to display the players (in the lore) who are in the room

dense drift
#

Wrong chat

worn jasper
dense drift
#

Yes

dark garnet
dense drift
#

To be what case sensitive?

dark garnet
dense drift
#

Why would you want them to be case sensitive?

#

Anyways, check the docs of your sql impl

worn jasper
#

fr

stuck hearth
dark garnet
dense drift
#

How can I use the paper api, which requires java 17, and still compile using java 8? I swear I did this before but I can't remember how 😐

dusty frost
#

why are you targeting 8?

#

if you're targeting paper, you might as well just do 17 lol

#

and in 1.20.5+ it's 21

dense drift
#

it is for papi expansions, I only need a method or two from paper

#

if I can't get this working I will just use reflections shrug

robust flower
#

Does InventoryHolder#getInventory returns the combined inventory (when it's a chest), or only the block inventory?

tight junco
#

good question

#

i think its the block inventory but i would do getView().getTopInventory() just to be sure.....

minor summit
#

DoubleChestInventory#getHolder() returns a DoubleChest
DoubleChest#getInventory() returns the exact same inventory you called getHolder() on

stuck hearth
#

Prove it

minor summit
#

let i be dn

stuck hearth
#

Of course

lyric gyro
#

Hello so ive recent started coding in 1.20.6 but when dealing with potion in 1.17 there use to be org.bukkit.potion.Potion but in 1.20.6 can see what the replacement is

#

does anyone have any idea

lyric gyro
# dusty frost

im using normal spigot 1.20.6 and its removed so should i use paper insteadd ?

#

ignore me

dusty frost
lyric prairie
#

Hello, does anyone have resources or tutorials of how to make an API design for a minigame plugin?

#

This will be my first time developing a Spigot plugin and want to make sure I'm using good design techniques

rustic quest
frank violet
#

Hello, I am trying to build a plugin from source code but I get the following error, how can it be solved?

A problem occurred configuring project ':v1_20_R4'.
> Failed to create service 'paperweight-userdev:setupService:a77b6b7fc970a2fc1fc285d4820d0a5fcdd3f00801c4a47eda3632746be3d0cc'.
   > Could not create an instance of type io.papermc.paperweight.userdev.internal.setup.UserdevSetup.
      > The paperweight development bundle you are attempting to use is of data version '5', but the currently running version of paperweight only supports data version
s '{2=class io.papermc.paperweight.userdev.internal.setup.v2.DevBundleV2$Config, 3=class io.papermc.paperweight.tasks.GenerateDevBundle$DevBundleConfig, 4=class io.papermc.paperweight.tasks.GenerateDevBundle$DevBundleConfig}'.
minor summit
#

update paperweight userdev

worn jasper
hoary scarab
#

Just love mojangs obfuscation consistency lol

river solstice
#

at least class names arent obfuscated lol

sterile hinge
#

Yeah for some reason spigot uses an absolutely wild mix of obfuscation, their of mappings and Mojang names

hoary scarab
#

🤷 I was trying to use F() but it doesn't exist lol

minor summit
#

what class is that lol

torn heart
#

do people ever use Yarn mappings for plugin dev?

minor summit
#

no

#

spigot is a disaster, and while paperweight does in theory support it (paperweight reads tiny mappings), we prefer mojang mappings

hoary scarab
#

Its the pose methods

fleet shale
#

can someone be of any assistance here i have a class to clone the hand items of an entity bellow a shulkerbox named {handitems} and for the most part the logic works but the issue is if the entity already had an item in hand before going bellow the box the item gets cleared completely but i can still alter the item in hands via the box with no issues im at a loss here

public class CheckShulkerBoxesTask extends BukkitRunnable implements Listener {

        @Override
        public void run() {
            // Periodic check on all entities below Shulker Boxes
            for (var world : Bukkit.getWorlds()) {
                for (var entity : world.getEntitiesByClass(LivingEntity.class)) {
                    if (entity.getType() == EntityType.PLAYER) continue;
                    checkShulkerBoxAbove(entity);
                }
            }
        }

        @EventHandler
        public void onEntityPickupItem(EntityPickupItemEvent event) {
            if (event.getEntity().getType() == EntityType.PLAYER) return;
            LivingEntity entity = event.getEntity();
            Location aboveLocation = entity.getLocation().add(0, 2, 0);
            Block blockAbove = aboveLocation.getBlock();

            if (blockAbove.getType() == Material.SHULKER_BOX) {
                ShulkerBox shulkerBox = (ShulkerBox) blockAbove.getState();
                if ("{handitems}".equals(shulkerBox.getCustomName())) {
                    updateShulkerBoxFromEntity(entity, shulkerBox);
                }
            }
        }

        private void checkShulkerBoxAbove(LivingEntity entity) {
            Location aboveLocation = entity.getLocation().add(0, 2, 0);
            Block blockAbove = aboveLocation.getBlock();

            if (blockAbove.getType() == Material.SHULKER_BOX) {
                ShulkerBox shulkerBox = (ShulkerBox) blockAbove.getState();
                if ("{handitems}".equals(shulkerBox.getCustomName())) {
                    updateEntityFromShulkerBox(entity, shulkerBox);
                }
            }
        }

        private void updateShulkerBoxFromEntity(LivingEntity entity, ShulkerBox shulkerBox) {
            Inventory shulkerInventory = shulkerBox.getInventory();
            ItemStack mainHandItem = entity.getEquipment().getItemInMainHand();
            ItemStack offHandItem = entity.getEquipment().getItemInOffHand();

            if (!isEmpty(mainHandItem) && isDifferent(mainHandItem, shulkerInventory.getItem(0))) {
                shulkerInventory.setItem(0, mainHandItem.clone());
            }

            if (!isEmpty(offHandItem) && isDifferent(offHandItem, shulkerInventory.getItem(1))) {
                shulkerInventory.setItem(1, offHandItem.clone());
            }
        }

        private void updateEntityFromShulkerBox(LivingEntity entity, ShulkerBox shulkerBox) {
            Inventory shulkerInventory = shulkerBox.getInventory();
            ItemStack shulkerMainHandItem = shulkerInventory.getItem(0);
            ItemStack shulkerOffHandItem = shulkerInventory.getItem(1);

            if (isDifferent(shulkerMainHandItem, entity.getEquipment().getItemInMainHand())) {
                entity.getEquipment().setItemInMainHand(isEmpty(shulkerMainHandItem) ? new ItemStack(Material.AIR) : shulkerMainHandItem);
            }

            if (isDifferent(shulkerOffHandItem, entity.getEquipment().getItemInOffHand())) {
                entity.getEquipment().setItemInOffHand(isEmpty(shulkerOffHandItem) ? new ItemStack(Material.AIR) : shulkerOffHandItem);
            }
        }

        private boolean isDifferent(ItemStack item1, ItemStack item2) {
            if (item1 == null && item2 == null) return false;
            if (item1 == null || item2 == null) return true;
            return !item1.isSimilar(item2);
        }

        private boolean isEmpty(ItemStack item) {
            return item == null || item.getType() == Material.AIR;
        }
    }
atomic trail
#

Anyone know how lpUser.setPrimaryGroup() works? Because a user can have multiple primary groups?

fading stag
#

try and see

dusky harness
#

or ask LP discord 🙃

atomic trail
#

Ah yeah found out that it basically does nothing lol

broken elbow
#

Well, it does. Kind of.

#

Actually. Nvm. Idk where it is used

#

or if it even is used at all. Would have to check the code

atomic trail
#

LP mod told me that vault uses it, but most plugins shouldn't

broken elbow
#

Oh. Ok then

atomic trail
#

I'm just adding a group.whatever node, didnt think that would work but yeah

#

It's apparently how groups are added, which is what my goal was

broken elbow
#

yeah

#

they are just permissions

atomic trail
#

How would you recommend "reviving" all players, even offline players, by setting their gamemode to spectator and changing a group

#

It's essentially a revive command which is working, but it should also revive offline players. No idea if this makes any sense lol

#
    public void revive(Player player) {
        player.setGameMode(GameMode.SURVIVAL);
        removeRank(player, Rank.SPECTATOR);
        setRank(player, Rank.GREEN);
    }
broken elbow
atomic trail
#

Yeah exactly, setting up a database just for this just seems a bit overkill but it's probably needed

broken elbow
#

file might work as well

#

even a simple yaml file and use spigot's yaml implementation

#

no need to handle the reading, writing and parsing yourself

atomic trail
#

This doesnt seem good tho lol

broken elbow
#

well, it says in the description it can be pretty bad :))

dense drift
#

I think paper has something like getOfflinePlayerCached or something that is better than what bukkit has

broken elbow
#

I belive so yeah

dense drift
#

It would be better to do it on join

atomic trail
#

I need to add all offline players when the revive command is ran tho

#

Can it run async?

#

This I mean

    public void reviveOnJoin(UUID ... players) { //TODO Async?
        List<String> current = config.getStringList("players");
        for (UUID uuid : players) {
            current.add(uuid.toString());
        }
        config.set("players", current);
    }
#

From here
playerManager.reviveOnJoin(Arrays.stream(Bukkit.getServer().getOfflinePlayers()).map(OfflinePlayer::getUniqueId).toArray(UUID[]::new));

dense drift
#

I don't understand, what are you trying to do?

atomic trail
#

Basically this command runs and revives all players, then adds all offline players as well because they should revive when they join.

Command: ```java
public void onReviveAll(CommandSender sender) {
Bukkit.getServer().getOnlinePlayers().forEach(playerManager::revive);
playerManager.reviveOnJoin(Arrays.stream(Bukkit.getServer().getOfflinePlayers()).map(OfflinePlayer::getUniqueId).toArray(UUID[]::new));
}

#

When the server starts or reloads, this is called

    public void reload() {
        reviving.clear();
        reviving.addAll(config.getStringList("players").stream().map(UUID::fromString).collect(Collectors.toSet()));
    }

So when players join, this is called

    @EventHandler
    public void onJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        UUID uuid = player.getUniqueId();
        if(playerManager.shouldRevive(uuid)) playerManager.revive(player);
    }
    public boolean shouldRevive(UUID uuid) {
        return reviving.contains(uuid);
    }
#

The revive method is just this

    public void revive(Player player) {
        player.setGameMode(GameMode.SURVIVAL);
        removeRank(player, SPECTATOR);
        setRank(player, GREEN);
    }
dusky harness
atomic trail
#

wdym?

dusky harness
#

like can that method open files

#

since you never wanna do that on the main thread

#

and I always did it on the main thread 💀

atomic trail
#

Yeah that's why I'm asking if it can run async hahah

dusky harness
#

it can run async yeah

atomic trail
#

Can't remember if ACF can have async commands actually

dusky harness
#

oh it doesn't read files

#

but it gets the file list

dense drift
atomic trail
dense drift
atomic trail
dusky harness
#

might do some quick testing later to see how much time it takes

dense drift
#

I mean to save a boolean somewhere on a file, once

icy sonnet
#

Hi kids

broken elbow
#

cozy 😮

#

👋

icy sonnet
#

Hello

atomic trail
#

Ok that probably makes no sense

#

But it does in my head lol

#

If I just save a boolean, it can activate multiple times for a player

#

ig there could be a weekly reset or whatever

hoary scarab
#

Why does clicking an armorstand with a nametag send PacketPlayInUseEntity 3 times?
The actions are INTERACT_AT -> INTERACT -> INTERACT_AT

minor summit
#

mojank

torpid raft
#

mojack

grave sky
#

mojack

broken elbow
#

I have a web page where users can post files. I want to display previews of these files in the web page. I am looking for a JavaScript library that has built in previews for the more generic file types. I have an endpoint that returns the files and also the MIME type in the Content-Type header.

I just don't want to build this from scratch and it feels like this is something that someone else would've probably made already. I am not using React or any other framework in the front end.

dusty frost
#

what kinds of files

#

like, images?

broken elbow
#

Not just images. Users can upload almost any file type. So I'd want something that would render videos, audio, images, and maybe a text box for a bunch of text file types such as txt, json, etc.

worn jasper
#

actually a tad bit tricky to do

broken elbow
#

I just found a library called box-content-preview. Going to try it, but if someone else has other recommendations, I am willing to try them.

worn jasper
#

well that one seems to render a whole pdf for instance

#

unsure if that's a good idea with large pdfs and several files

broken elbow
#

I mean, I would probably make this work one file at a time. Just have a styled div with the file name and when clicked open the file view

dense drift
#

JavaScript library for rendering files stored on Box
Are they though?

broken elbow
#

nah. you can self host but I just ended up making my own stuff.

#

just images, videos and audio

worn jasper
#

couldnt you in theory get a lib that turns pdf to text and then just use a small portion of that text as display?

river solstice
#

pdfs a bit more complicated than that I think (thought I haven't used anything for them, so can't say for sure, maybe just yappin)

stuck hearth
#

OCR moment

warm steppe
#

Stfu comment

grizzled arch
#

Where can I get help?

minor summit
#

it depends

grizzled arch
#

thanks!

errant turtle
#

Hi guys i got some "weird problem" i'm trying to shadowJar a dependency called AnvilGUI by WesJD when i shadowJar'd my plugin it does not contain any of the Wrapper classes which made my plugin unusable i've already tried everything from using AI to reading whole shadow documentation. Can anyone help?

AnvilGUI version: 1.6.1
Gradle version 8.0.2
Java version 11
shadow version 8.1.1

(can't send images so i can't show output jar files)

neat pierBOT
haughty oar
#

send your build file?

brazen pumice
#

When will 1.20.6 support be added?

errant turtle
#

oh sorry for ping

haughty oar
#

what kind of files are the wrapper classes? just a wrapper you built around anvilgui or one provided by the plugin?

errant turtle
#

by the plugin

#

none ot them shows up in builded jar

haughty oar
#

try without the minimize, maybe that is throwing something away?

errant turtle
#

already tried that, without minimize only thing that is showing in jar is meta files

errant turtle
haughty oar
#

ah thats good!

dusk spruce
#

@silent karma doesnt mojang ban lootboxes....?

#

either way, still scumy

silent karma
dusk spruce
#

sorry bad man 😱

silent karma
#

Like you get them as rank lootbox

#

so its like a kit but with chances on good rewards

dusk spruce
#

good rewards as in pay to win rewards which are so low chanced to win the user is forced to spend huge amounts

#

gotcha

silent karma
#

the keys in rank lootboxes have 7.5 % chance

#

:)

dusk spruce
#

thats nice but that doesnt exactly answer my point tho cause i didnt talk about keys

#

silly goose

#

stop trynna scam kids

silent karma
#

You get x1 lootbox daily

#

As part of your rank

dusk spruce
#

p2w 🤢

sturdy ridge
silent karma
#

does it

sturdy ridge
#

what tracker

silent karma
#

Eh at this point its harassment

sturdy ridge
#

whats harassment dawg

silent karma
silent karma
dusk spruce
sturdy ridge
silent karma
#

So you dont happen to know anything about the owners united bot which alerts certain members of what server im in?

sturdy ridge
#

aint a thing

dusk spruce
#

😭

sturdy ridge
dusk spruce
#

scam kids probably

sturdy ridge
dusk spruce
#

oh god he is a nonce is he

#

nonce is british for edp445

#

if u get what i mean

sturdy ridge
#

I don't

dusk spruce
#

he is a "minecraft youtuber"

#

"stays in touch with the younger generation"

#

they censor the word on this server

#

but p3d0

sturdy ridge
#

ah

sturdy ridge
#

PYROO

uncut mural
#

HI

dusk spruce
#

is this cracka fucking hunted or something tf he do

#

ik for sure its something scummy

#

considering hes openly p2w and scamming kids

silent karma
#

that thinks they own discord

dusk spruce
#

they do

silent karma
#

na bru

dusk spruce
#

they do own discord

silent karma
#

💀

dusk spruce
#

discord is theys sorry mate

silent karma
#

i sent .gg/discord

sturdy ridge
#

I wanna show what he did but i cant send images

neat pierBOT
uncut mural
#

@silent karma No invite links.

dusk spruce
#

LMAO

sturdy ridge
#

ah

silent karma
#

💀

sturdy ridge
#

imgur!!

uncut mural
#

@dusk spruce Too many caps.

silent karma
#

omfg

dusk spruce
silent karma
#

JK > time to dd0s imgur JK <

#

jk^

uncut mural
#

@silent karma why am i banned from ogrival

sturdy ridge
#

Duping, Doxxing, DDosing, Botting channels, Threatening to send a pipe bomb to someone's house Stealing content, False copyright striking, Doxxing (again), Attempting to falsely terminate a YouTube channel, Lying about age, Lying about someone doxxing someone else.

uncut mural
#

ayo

uncut mural
#

@silent karma 1v1 fn?

sturdy ridge
uncut mural
#

im plat

sturdy ridge
silent karma
#

in a match

silent karma
silent karma
uncut mural
silent karma
forest jay
#

Is there any better way to turn a string into a NMS component besides CraftChatMessage? It is using a ton of resources on my server I am not running it that often.

hoary scarab
#

Build the text component yourself.

forest jay
#

I dont know how

pulsar ferry
#

Wdym by string into component? Json string?

forest jay
#

I am setting the text of a NMS text display which requires an NMS Component arguement

#

and I have a string

pulsar ferry
#

Use adventure then convert from adventure component to minecraft component

grave socket
#

I use IChatBaseComponent.ChatSerializer.a(string). But I have no idea if it's any better.

forest jay
#

I have a feeling Adventure would consume the same amount of resources

#

I can just test it

royal hedge
#

an adventure component would only need to be copied to a minecraft component which is def cheaper than regex

minor summit
#

depending on what and how you do it, it might even a) do that conversion lazily, or b) not at all!

noble hemlock
#

Anyone knows how to translate messages for PlaceHolderAPI

#

or how to translate time messages

#

?

torn heart
#

you might get an answer here, but for future reference if your problem isn't programming related, #1007620980627230730 is the right channel for plugin support

haughty wing
#

What JDK to install

torpid raft
#

whichever one your server version needs (probably java 21 if you are on latest)

haughty wing
#

bet, thank u

untold fulcrum
#

Right, I am currently developing a Hypixel Pit Remake server and need another dev, if anyone here would be interested in participating as an owner and helping develop this crazy server with huge potential DM me.

I already have had offers from Mineplex to buy the idea and for us to develop for them. This will include alot of money lol so just hmu.

torn heart
#

oh god

untold fulcrum
torn heart
#

yes

#

hypixel pit remakes are usually garbage

#

i wasted 400 hours of my life on that game

pulsar ferry
#

Lot's of Hypixel copies end up being pretty bad

torn heart
#

yes, and advertising yourself as a remake of what has become a horrible game isn't a very appealing description

untold fulcrum
pulsar ferry
#

I'm not saying yours specifically, just in general

untold fulcrum
#

every remake is shit

forest jay
#

Why is this NMS packet constructor private on 1.20.6 but not any version prior? (the other constructor takes an entity). Normally packets have two public constructors, one with a arguement that grabs all the data from something like and entity, and one with a bytebuff, but for some reason this one is different.

tranquil edge
#

Anyone know what class is for add more lines on player hologram? That was is upside the player head
That contains usually "{Rank} - {Name}"

dark garnet
#

is it possible to support a countdown for a player that can be configured to countdown while they're offline or not using only 1 saved value
so like if counting offline, id save a timestamp, then do now - timestamp and compare to countdown duration
if not counting offline, idrk what id do tbh, maybe save now - timestamp when they leave then update timestamp when they rejoin to now + timestamp (issue with this is that if server changes to count offline while player is offline, itd break when they rejoin)
but i just wanna know if there is an easier way to do it ig
ping if reply

torpid raft
#

then whenever you need to know the current countdown state, it is always end - now

#

unless you mean you want it to stop counting down when the player is offline?

dark garnet
stuck hearth
#

Save passed time on leave, get on Join.
Regularity ensues

torpid raft
#

i think you will always have to save more than one value unless you are okay with constantly updating it while the player is online

dark garnet
dark garnet
#

i accidentally mixed up 2 methods in my og msg

torpid raft
#

actually yeah i guess if you change the format between being offline and online ig you can save just one value

#

idk its late i dont want to think about this im gonna go watch shorts

dark garnet
torpid raft
#

no at that point you would just re-change the format to be as if the players logged back in

#

basically your toggle will fake all players being online all the time

#

it also depends on what exactly your limitations are on storing stuff if the server goes down

dark garnet
torpid raft
#

are you asking how the plugin would be notified of the toggle change?

dark garnet
#

this is for a grace period thing btw, so just getting how long the player has been on the server (either online time or time since first join)

torpid raft
dark garnet
torpid raft
#

don't you have to detect the toggle change regardless though?

#

or am i missing something

dark garnet
#

hmmm

#

yeah ig

#

the only way i can think of actually is storing a value that says whether the other value represents offline or online time format

#

ill just come back to this tmr 💀

torpid raft
#

good idea

dark garnet
#

grace period time value saving discussion
keyword msg so i can easily search back to this :)

stuck hearth
#

I'm going to ruin your day and @dark garnet to bookmark it instead

torpid raft
#

i will generate you a 32 byte bookmark uid

#

0f7cf3bbb413ca5d8a8a8d3129bc687f6524a0abcaade7f8aab84c83bf4bc387

dark garnet
#

ty ill put in my todo comment in intellij

#

pls dont edit or ill cry

stuck hearth
#

amazing

minor summit
#

and they'll keep doing it

#

until the whole game is just one big json state machine

torn heart
#

data driven items when?

wary dust
#

If I wanted to get into web development what’s the best way to do it, aren’t there all these like libraries like react etc?

#

I don’t really understand what that all is

hoary scarab
#

Simplest... Start with HTML, CSS and javascript.

wary dust
#

I mean I’ve done quite a bit of that already, but I want to build more complex websites

river solstice
#

build a complex website with base html/css/js first

#

maybe some jQuery

#

php?

untold fulcrum
#

Anyone familiar with 1.8 spigot / bukkit API?

pulsar ferry
#

Lots of people are, it's better if you ask your question

worn jasper
#

Question is not if people are familiar but if they actually hate it.

#

But yeah, what is the question

dark garnet
#

@torpid raft i think imma store user first join timestamp & duration left in cooldown (update every time they leave/join)

torpid raft
#

ok

dark garnet
# torpid raft ok

that didnt work 😭
imma just do the long way: time played online, time played offline, last join timestamp, last quit timestamp

#

then combine time played online and time played offline in different ways depending on toggle

#

nope that doesnt work either

#

im just removing toggle 💀

torpid raft
#

😌

mortal tendon
#

I'm getting the already known issue "Cannot invoke "me.clip.placeholderapi.PlaceholderAPIPlugin.getLocalExpansionManager()". As others have already said, that means that I'm shading the Plugin. But I already have set the scope to "provided" in Maven... I'm still pretty new to Java / Kotlin Minecraft development, so I don't know what to do now...

hoary citrus
#

Hey folks, I am trying to create a simple UHC plugin, and I want to create a map with a limited size. While I understand I can simply add a world border in a world, I want to skip the extra chunks being generated and hence have a world thats only a set amount of chunks in size, e.g 500x500 blocks

I have a worldGenerator class which generates this for me

const val MAX_RADIUS = 500

        fun generateWorld(id: String) {
            val creator = WorldCreator("game-$id")
            creator.generator(GameChunkGenerator())
            val world = creator.createWorld()

            if (world != null) {
               generateChunks(world, MAX_RADIUS)
            }
        }

        private fun generateChunks(world: World, radius: Int) {
            val chunkRadius = radius / 16

            object : BukkitRunnable() {
                var x = -chunkRadius
                var z = -chunkRadius

                override fun run() {
                    val batchSize = 5
                    var count = 0

                    while (x <= chunkRadius && count < batchSize) {
                        while (z <= chunkRadius && count < batchSize) {
                            world.getChunkAt(x, z).load(true)
                            z++
                            count++
                        }
                        z = -chunkRadius
                        x++
                    }

                    if (x > chunkRadius) {
                        cancel()
                    }
                }
            }.runTaskTimer(CustomUHC.INSTANCE, 0L, 1L)
        }```
#

and my custom chunk generator


class GameChunkGenerator : ChunkGenerator() {
    override fun generateChunkData(world: World, random: Random, x: Int, z: Int, biome: BiomeGrid): ChunkData {
        val chunkData = createVanillaChunkData(world, x, z)

        // Check if the chunk is within the desired radius
        if (Math.abs(x) > MAX_RADIUS / 16 || Math.abs(z) > MAX_RADIUS / 16) {
            println("yup")
            return chunkData // Return empty chunk data for outside the radius
        }
        // Delegate to the default generator for normal terrain
        val defaultGenerator = Bukkit.getWorld(world.name)?.generator
        println((defaultGenerator == this).toString())
        if (defaultGenerator != null && defaultGenerator != this) {
            println("yup 2")
            return defaultGenerator.createVanillaChunkData(world, x, z)
        }

        return chunkData
    }

}```
#

But the world is completely empty

#

does anyone know why?

#

the chunk generator is tweaked by chatgpt a bit

#

but ive already tried everything i could think of

#

I just want a completely normal world, but chunks are only loaded within a certain radius

dusky harness
#

and you're creating the jar with mvn package right? (or something similar)

mortal tendon
#

One second

#

I was eating just now

#

(I removed Placeholder API to see if that would fix it, that's why it's not in the screenshot)

minor summit
#

enjoy your meal

mortal tendon
#

oh i already finished 🙂 thx tho

dusky harness
#

basically
maven and intellij artifacts are both build tools
they are used to manage your project dependencies (such as PAPI) and then build the jar using those dependencies and configurations

#

so you can't use two at the same time

#

I would recommend not using intellij artifacts

#

to build the jar using maven, double click ctrl and type mvn clean package and the jar should appear in the target folder

mortal tendon
#

ok yeah strange that worked. is there a way to run a script after pressing the "Build Project" button?

#

nevermind... found the "rerun automatically" button 🙂

#

But my placeholders still don't work although it's even showing me this: "[PlaceholderAPI] Successfully registered internal expansion: WoolWars [1.0-SNAPSHOT]"

#

am I doing something wrong?

package com.recomplexed.woolwars.expansion

import com.recomplexed.woolwars.WoolWars.Game.countdown
import com.recomplexed.woolwars.WoolWars.Game.map
import com.recomplexed.woolwars.WoolWars.Plugin
import me.clip.placeholderapi.expansion.PlaceholderExpansion
import org.bukkit.OfflinePlayer
import java.lang.String.join


class Placeholders : PlaceholderExpansion() {

    override fun getAuthor(): String {
        return join(", ", Plugin.plugin.description.authors) //
    }


    override fun getIdentifier(): String {
        return "WoolWars"
    }

    override fun getVersion(): String {
        return Plugin.plugin.description.version
    }

    override fun persist(): Boolean {
        return true
    }

    override fun onRequest(player: OfflinePlayer?, params: String): String? {
        if (params.equals("woolwars_map", ignoreCase = true)) {
            return map
        }

        if (params.equals("woolwars_status", ignoreCase = true)) {
            return countdown
        }
        return null //
    }
}
#

btw the Author and the Version is loaded just fine

dusky harness
#

if so, can you paste the command here

#

if not, try using that command

stable torrent
#

Can anyone teach me plugin development

torpid raft
grave sky
dusky harness
#

ohh

#

oops howd i not notice that

#

nice

mortal tendon
#

yeah that did it thx

#

btw good morning

drifting plaza
#

morning?

#

its still night

mortal tendon
#

it's 10 am in germany

drifting plaza
#

ah

#

yea its 4 am where i live

mortal tendon
#

oh ok

grave sky
torpid tree
#

Why advancedban doesnt appear in lp?

stuck hearth
#

Assuming you're talking about the permission suggestions, and that's because LP only suggests permissions that have been cached

lyric gyro
#

Looking for payed developers, payment paypal: 250€ dm me

cerulean birch
#

this may be silly, but is it possible to create color-able item textures? similar to how potions can take in a custom color, but for custom models added with something like itemsadder? i heard something about this once but can't find anything currently so i'm not sure if this is possible or not

torpid tree
#

I'll take an answer from anyone

pulsar ferry
torpid tree
#

How can I add that you get rewarded aka. Get given an specific item after each kill?

#

would that be skript plugin or different one?

worn jasper
torpid tree
worn jasper
#

no idea if it's good

warm steppe
#

why misinformation (4.)

worn jasper
#

why would I tell someone to go to hell? (which is what recommending Skript is)

warm steppe
#

clearly u havent even used it once but go on

worn jasper
#

I have used it lol

#

who is misinformed now?

warm steppe
#

yeah ur nder smth i swr

torpid tree
#

is the soft death's plugin able to function with custom made items? like renamed items

#

because default item code will just give them regular item

worn jasper
#

I don't even know why I still have it there

#

should've deleted it

torpid tree
#

alright lol, ill have a look 👍

spiral prairie
pulsar ferry
#

Skript is only as bad as their user

spiral prairie
#

^

#

I think it's a great concept and good in execution, it has some quirks as I can observe but otherwise it's quite a good option for people to implement really simple things really quickly without learning Java

#

I haven't used Skript much except for prototyping a quick idea before setting up a new plugin but

pulsar ferry
#

There are things that should and things that shouldn't be done with skript

spiral prairie
#

Yup

worn jasper
#

Agreed

#

problem is 98% of the time people use it for the things they shouldn't.

#

They don't understand limits.

#

The concept of Skript is quite awesome, its community (or well, how people use it) and execution are the bad part.

#

Skript is full of spagetthi code (actual words of the devs)... the project started as a hobby a scaled a ton. If there ever was a Skript rewrite, I would 100% support. Would be awesome. Maybe I do it one day, who knows.

worn jasper
#

lmao

torn heart
dusky harness
#

afonso gonna go bonkers when he sees KotlinScript

#

/s

#

(i hope /s)

stuck hearth
#

They actually accused me of advertising when they saw it

#

Funnily enough

warm steppe
#

Afonso a hater

pulsar ferry
stuck hearth
#

Does that actually work on paper?

#

Oh yeah I see it

pulsar ferry
#

It did it has been a while since I've heard anything about it so not sure how it works on more recent versions

stuck hearth
#

I wasn't sure they passed the classloader in a way that the isolated classloader would work, but I see they do.
Wish I'd seen this project sooner, would've saved me a little time

dusky harness
river solstice
#

as much as I am a kotlin hater (low iq bozo)

#

it does look good

#

tho the syntax irritates me fsr

pulsar ferry
#

What's wrong with the syntax?

river solstice
#

wrong me not being familiar with it

pulsar ferry
#

Understandable

stuck hearth
#

Some projects get a little goofy with the fluent-style syntax, but it's fairly sensible when not used for evil

river solstice
#

is there are simple way to get all the spawn eggs and corresponding entities (.class)?

minor summit
#

MaterialTags.SPAWN_EGGS, iterate through the values, get meta, get entity type, get entity class

river solstice
#

shesh, didnt know about that one

#

thanks

worn jasper
#

I mean, like matt said, I did know Bukkript

#

and tbh, wpuld prefer that over skript probably

worn jasper
cosmic canyon
#

Hello how to reach iut to suport?p´

#

Bcz they havent replied for a month now and it is rly important

#

Pls

pulsar ferry
#

?not-discord

neat pierBOT
#
FAQ Answer:

Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.

dusk spruce
#

programming languages dont make money

#

not sure why kotlin would be out here paying people to promote it

torpid raft
#

jetbrains makes kotlin

#

kotlin gets popular, they get to sell more IDE subscriptions

dusk spruce
#

visual studio code......?

torpid raft
#

what about it

dusk spruce
#

you can..........use it for free?

torpid raft
#

yeah, you can also use notepad for free

torpid raft
#

jetbrains will undeniably make more money the more popular kotlin gets

#

also embed fail

dusk spruce
#

but u can see what i was gonna send

dusk spruce
torpid raft
dusk spruce
#

yeah but its extremely unlikely

torpid raft
#

im not saying there are actually kotlin sleeper agents inside discord servers

#

but jetbrains (an ide company) paying to advertise a programming language they themselves made is totally reasonable

dusk spruce
#

not saying it isnt just saying its unlikely

torpid raft
#

which part is unlikely

dusk spruce
#

dunno what part u think i mean

#

think ive made myself clear on that

torpid raft
#

im confused if you mean them advertising in discords, or advertising in general

dusk spruce
#

no they do advertise in general ive seen their ads on youtube

#

i mean on discord

torpid raft
#

because yes like i said they are not going door to door in discord servers

dusk spruce
#

¯_(ツ)_/¯

stuck hearth
river solstice
#

for asynchronous tasks, is it fine, performance-vise, to use Bukkit schedulers (ex. runTaskTimerAsync), or just use built-in java ones?

dusty frost
#

the Bukkit schedulers just use a thread pool and run based on the game loop

#

if you need your stuff to be scheduled relative to the game loop, then definitely use the Bukkit schedulers

#

if it's a few things and you don't really care, then Bukkit is probably fine

#

if you have a lot of things and want full control of the threading, and your timing requirements aren't tied to the game loop, then do your own thread pool stuff

river solstice
#

yeah well, I don't need it to be tied to the game-loop, I just care about the performance itself

#

I suppose Bukkit schedulers just use java threads under-the-hood, so writing my own impl might not be any better

dusty frost
#

yeah the only thing to worry about is exhausting the pool if you're doing a lot of tasks

#

but you're probably not lol

river solstice
#

yeah, true

hoary scarab
#

VirtualThreads 😉

dusky harness
#

Btw if you're curious it just uses Executors.newCachedThreadPool()

lyric gyro
#

Looking for good developer, i am going to pay them DM me.

lyric gyro
#

I cant

#

Bc

#

I got bloxked of smh

#

Or

dusky harness
#

That's not a very good sign..

dusk spruce
#

fr

atomic trail
#

What's the best way to check if 2 objects are instances of the same class?

#

Might be a stupid question but yeah lol

#

I only have the interface of the class

dense drift
#

a.getClass().isInstance(b)

river solstice
#

a instaceof X && b instaceof X?

atomic trail
dusky harness
#

is equal to obj instanceof Interface

#

not too sure what you mean by

2 objects are instances of the same class?
might need an example if the above doesn't work

pulsar ferry
#

There is also isAssignableFrom if you don't have an instance

dusky harness
#

oh wait right

atomic trail
#

Alright I'll try to explain it. I have a list of objects from this interface public interface DataStructure

It has 3 implementations: UserAttribute, UserConsumable and UserPhysicalCosmetic

Each of these classes have a component / field based on their type, for example UserConsumable has ConsumableData. ConsumableData is an interface which has implementations like this: class NicknameConsumable implements ConsumableData

I need to check if the list contains multiple objects of the NicknameConsumable class or whatever the child class is.

#

This does probably scream bad design but not sure how to restructure it without breaking database, as I tried making it easy to deserialize and serialize into a database, following composition pattern I believe it's called

dusky harness
atomic trail
#

This is what I came up with, not sure if it works yet

                    if(dataStructure instanceof ConsumableData consumableData) {
                        if(predicate instanceof ConsumableData predicateConsumable) {
                            return predicateConsumable.getClass().isInstance(consumableData);
                        }
                    }
#

But how would you restructure this?

#

If you would

dusky harness
#

uhh

dusky harness
#

I'm pretty sure

#

if you want to make sure that one's a ConsumableData as well

#

otherwise you don't need either if statement

atomic trail
#

Fixed, this is working but very ugly lol

                    if(dataStructure instanceof UserConsumable consumable) {
                        if(predicate instanceof UserConsumable predicateConsumable) {
                            return predicateConsumable.getConsumable().getClass().isInstance(consumable.getConsumable());
                        }
                    }
pulsar ferry
#

I feel like that kinda breaks the idea of composition if you need to do checks like that

atomic trail
#

I mean yeah in this case, I changed the structure to composition to make database management easier, but yeah

#

Not sure if I can combine inheritance and composition in some way, or what would you recommend doing?

dark garnet
#

does Bukkit.getOfflinePlayers() contain Players if they're online?

dusk spruce
#

i think (im not educated on this) its for cracked accounts?

#

im just guessing as offline mode typically means cracked players are allowed to join

#

so it would only contain online cracked accounts

dark garnet
#

no OfflinePlayer is just an offline player

dusk spruce
#

oh

#

then obviously not its not gonna get players if they are online

dark garnet
#

Player extends OfflinePlayer

#

Gets every player that has ever played on this server.
- Bukkit.getOfflinePlayers()

dusk spruce
#

then it gets every player that has ever played on the server

dark garnet
dark garnet
dark garnet
dusk spruce
#

it gets "every" player that "has played"

dusky harness
#

oh i didn't understand it like that

dusk spruce
#

so its offline and online

dusky harness
#

i can check 1 min

dark garnet
dusk spruce
#

no im not

dark garnet
#

yes...

#

😭

dusk spruce
#

im not tho

#

😭

dark garnet
#

i know it will return all offline/online players

#

but i need to know if the online players will be Players, rather than OfflinePlayers

dusk spruce
#

so what is ur question

dark garnet
#

and the rest OfflinePlayers, yes?

dusk spruce
#

would assume so

#

if they are offline its reasonable to assume it would be that

torpid raft
#

might be overstated in this server but it really is safer to try it and see

dusky harness
#

@dark garnet can confirm

dusky harness
#

it does include Players

dark garnet
torpid raft
#

lmao fair

dusky harness
#

it calls an initial getPlayerExact

dark garnet
dark garnet
torpid raft
#

i've been enjoying dkim's arc into becoming an absolute subject matter expert on spigot ngl

dark garnet
#

ofc u went into the source code 🙄

dusky harness
dark garnet
#

then i'd actually use it

dark garnet
#

is it possible to get uuid from a player's name without having to get their OfflinePlayer or Player FLOOSH

#

and without making requests to mojang servers

dark garnet
# dusky harness what why <:thonking:379541184697204736>

cause this hurts :(

    @Nullable
    public static OfflinePlayer getOfflinePlayer(@NotNull String name) {
        // Check online players
        final Player online = Bukkit.getPlayerExact(name);
        if (online != null) return online;

        // Check offline players
        final String nameLower = name.toLowerCase();
        for (final OfflinePlayer offline : Bukkit.getOfflinePlayers()) {
            final String offlineName = offline.getName();
            if (offlineName != null && offlineName.toLowerCase().equals(nameLower)) return offline;
        }
        return null;
    }
torpid raft
#

build a lookup table for yourself

#

maintain it on join then easily access it elsewhere for cheap

dusky harness
dark garnet
dark garnet
minor summit
dusky harness
#

thats a good point

#

paper :(

torpid raft
dark garnet
#

so ill just check that myself ig

#

so that it isnt running getPlayer twice

dark garnet
#

only mattered before when i wasnt checking online first

kindred lintel
#

Heya guys, really unique question here.

Currently developing a game where negative flight duration rockets would be useful. With mc commands you can give yourself fireworks with negative flight duration e.g. -1 (which essentially gives a short elytra burst). /give @p firework_rocket{Fireworks:{Flight:-1}} 1

but the built in FireworkMeta#setPower() (https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/meta/FireworkMeta.html#setPower(int)) to create an itemstack throws IllegalArgumentException - if height<0 or height>127

        ItemStack fireworkItem = new ItemStack(Material.FIREWORK_ROCKET, 1);
        FireworkMeta fireworkMeta = (FireworkMeta) fireworkItem.getItemMeta();
        fireworkMeta.setPower(-1);

i was wondering if anyone had any ideas to get a workaround to force a negative flight duration on the itemstack?
Thanks a lot :)

stuck hearth
#

Seems like an oversight, since flight-duration can be -128 - 127

torn heart
#

nms time :panic:

kindred lintel
kindred lintel
torn heart
#

nah nms ain't terrible just annoying when working with multiple versions

kindred lintel
#

yeah fair fair, ive done quite a bit of it before, not looking forward to 1.21 though xD

spiral prairie
#

Maybe ask in the Spigot Discord

atomic trail
#

Is it possible to remove slots entirely from a gui without using packets? like this

#

Anvil inventory in this example

minor summit
#

resource packs ig

atomic trail
#

Ah yeah

#

Can I change the slot for anvil to go to the center instead?

#

It's by default to the left side

#

I don't really want to use the anvil gui rly lol, I just need the text editing thing

spiral prairie
#

you cant move it afaik

torn heart
#

nope, can't change it

#

just hide it

placid sierra
#

Im trying to generate sky islands high up in my world, but the problem is that they cast shadows way below them

Any way of removing those block shadows from specific blocks or any other ideas for preventing this? Any ideas greatly appreciated

spiral prairie
#

You could disable block updates on the shadowed blocks but that's only a temporary solution

fleet shale
#

does anyone here have experience with JFrames?

grim oasis
fleet shale
#

so im going to assume that means yes... i have a jframe jar application im developing but my big issue is i cannot for the life of me get an icon to set no matter how i try ive tried setting it from a url, downloading from aurl and referencing a local file, and lastly and more preferred referencing from a compiled file via inputstream resource, all methods of which with debugs say it should be working but simply just does not, im aware of the fact that it has to be set and init before the jframe is built and visible but no matter where i put it in the program process it just doesnt work and ik it probably should work i just dont understand why it wont, i can provide the full code on a paste bin if needed but this is the moethod that sets the icon, this method is called after the buildgui method gets called on start ```java
private void setApplicationIcon() {
try (InputStream imageStream = getClass().getResourceAsStream("/nscp/server-icon.png")) {
if (imageStream != null) {
BufferedImage img = ImageIO.read(imageStream);
if (img != null) {
setIconImage(img);
revalidate();
repaint();
log("Icon successfully set from static source");
sendToConsoleAlt2("Icon probably unsuccessfully set from static source");
} else {
log("Could not read icon image from stream: " + imageStream);
sendToConsoleAlt("Could not read icon image from stream");
}
} else {
sendToConsoleAlt("Could not find icon resource at /nscp/server-icon.png");
log("Could not find icon resource at /nscp/server-icon.png");
}
} catch (Exception e) {
sendToConsoleAlt("Could not load icon from resource: " + e.getMessage());
log("Could not load icon from resource: " + e.getMessage());
}
}

grim oasis
#

I think it would be worthwhile uploading the class(es) to a paste service for others to look at, yes @fleet shale
and a log might help too

fleet shale
#

ok i'll upload that to a pastebin rq but this is the only log i get out of running the program ```log
java -jar ServerControl-v1.5.2.jar
successfully fetched font ttf, setting fonts to buttons, and console
Icon successfully set from static source
[NSCP] attempting to download server Resource from http://ycs.canvaswrite.com/resources/nscp/worldPoints-v1.6.12-2.jar

Resource downloaded and saved as plugins/Newts-Worldpoints.jar
[NSCP] attempting to download server Resource from http://ycs.canvaswrite.com/resources/nscp/Vault.jar

Resource downloaded and saved as plugins/Vault.jar
[NSCP] attempting to download server Resource from http://ycs.canvaswrite.com/resources/nscp/BetterEconomy-2.15.jar

Resource downloaded and saved as plugins/BetterEco.jar

grim oasis
#

hmm, I'm going based on what you said about needing to set and init before building the jframe

#

right below the config, version, and user init I would load the icon InputStream and BufferedImage there @fleet shale

#

then you can use it later

#

if that doesn't work I'll let somebody with more knowledge answer 😂

fleet shale
#

ok so i place this right bellow the user init at the top but it errors at .read with a garble about unhandled javaIO exception ```java
public InputStream imagestream = getClass().getResourceAsStream("/nscp/server-icon.png");
public BufferedImage img = ImageIO.read(imagestream);

grim oasis
#

define at the top, init them in the constructor

#

below user =

fleet shale
#

ah ok hold on i know hwat you mean

#

so i placed it in the constructor now but still got the io exception issue but fixed it by adding a throws ioexception to the constructor which then made me have to aslo add a try catch to the main[] but got no icon on successfull build still i also updated the paste to what my code currently looks like so you can see if maybe i still misunderstood the assignment lol http://ycs.canvaswrite.com/resources/nscp/fullclass.java

grim oasis
#

you're still loading creating another variable inside the setApplicationIcon method still, and I think you might need to do ImageIO.read in the constructor as well

fleet shale
#

ah youre right the seticon void is now ```java
private void setApplicationIcon() {
if (img != null) {
setIconImage(img);
revalidate();
repaint();
log("Icon successfully set from static source");
sendToConsoleAlt2("Icon probably unsuccessfully set from static source");
} else {
log("Could not read icon image from stream: " + img);
sendToConsoleAlt("Could not read icon image from stream");
}
}

grim oasis
#

ok

#

workin? or nah

fleet shale
#

nah

#

;-;

grim oasis
fleet shale
#

yes i did attempt that

grim oasis
#

maybe it formats the image or something, idrk

#

ah

#

ya, i'll let somebody with more knowledge answer

fleet shale
#

but the setIconImage() takes an image so i still have to convert the iconimage back to an image and same result sadly

placid sierra
#

What’s the easiest way to do that 🤔

torn heart
#

yea light updates are a separate thing that gets calculated serverside

atomic trail
spiral prairie
#

No

hoary scarab
#

... Really?

atomic trail
hoary scarab
#

One sec

#

Yeah looks like its packets only. But definitely possible.

atomic trail
#

Any idea where I can find packets to accomplish it?

hoary scarab
#

Looking right now lol

atomic trail
#

Never really worked much with packets as I always try to avoid them so not sure where to look lol

royal hedge
#

tf?

hoary scarab
#

PacketPlayInWindowClick

#
private static Map<UUID, Inventory> inventory = new HashMap<>();
    
@EventHandler
public void interact(PlayerInteractEvent event) {
    Player player = event.getPlayer();
    UUID id = player.getUniqueId();
    
    if(event.getHand() != EquipmentSlot.HAND)
        return;
    
    ItemStack nametag = new ItemStack(Material.NAME_TAG);
    ItemMeta tag_meta = nametag.getItemMeta();
    tag_meta.setDisplayName("Custom Anvil...");
    nametag.setItemMeta(tag_meta);
    
    Inventory custom = inventory.containsKey(id) ? inventory.get(id) : Bukkit.createInventory(null, InventoryType.ANVIL);
    custom.setItem(0, nametag);
    custom.setItem(2, nametag);
    player.openInventory(custom);
    inventory.put(id, custom);
}

@EventHandler
public void click_result(InventoryClickEvent event) {
    Inventory current = event.getClickedInventory();
    Player player = (Player) event.getWhoClicked();
    UUID id = player.getUniqueId();
    
    if(!inventory.containsKey(id) || inventory.get(id) == current)
        return;
    
    event.setCancelled(true);
    if(event.getSlotType() != SlotType.RESULT)
        return;
    
    player.closeInventory();
    inventory.remove(id);
}

// Injection handler
if(packet instanceof PacketPlayInWindowClick) {
    PacketPlayInWindowClick click = (PacketPlayInWindowClick) packet;
            
    Utility util = Utility.instance();
    ItemStack result = util.asBukkit(click.g());
    ItemMeta result_meta = result.getItemMeta();
    player.sendMessage(result_meta.getDisplayName());
}
```https://i.imgur.com/CaLBowh.mp4
atomic trail
hoary scarab
#

Yeah only an anvil inventory.

#

Ah found your original message. Yeah you can't just manipulate the GUI's like that. You can do some fancy shit with a resource pack and make the players inventory hold the items you want.

spiral prairie
#

Lol how much time did you spend proving the wrong thing now xD?

atomic trail
#

Can't find the source code for Bukkit.createInventory as it just goes to the Server interface

atomic trail
#

Ah yeah, probably a good idea

#

Ty

dusky harness
#

To remove the shadows

#

Idk

hoary scarab
atomic trail
#

Can't find where they actually create the text box in the source, anyone got an idea?

dusky harness
#

Wdym

#

In the client source?

atomic trail
#

I was thinking I'd use something like this to configure the anvil slots, but not sure where I'd get the inventory from

public class TestAnvilMenu extends AnvilMenu {
    public TestAnvilMenu(Inventory inventory) {
        super(-1, inventory);
    }

    @Override
    protected ItemCombinerMenuSlotDefinition createInputSlotDefinitions() {
        return ItemCombinerMenuSlotDefinition.create().withSlot(0, 27, 47, (itemstack) -> {
            return true;
        }).withSlot(1, 76, 47, (itemstack) -> {
            return true;
        }).withResultSlot(2, 134, 47).build();
    }
}
#

AnvilMenu is from net.minecraft.world.inventory

broken elbow
torn heart
#

that's still just the same thing just retextured

dense drift
#

With shaders, as he said

torn heart
#

shaders don't move the interaction boxes

peak epoch
#

someone should make an anti-aimbot mod, so it does exactly the opposite of aimbot and puts your cursor as far away as possible

upper jasper
#

The text input doesn’t need to be clicked to type

torn heart
#

oh really?

#

that's nice

upper jasper
forest jay
#

I am kinda new to the whole multi version NMS stuff, and I am struggling with something due to different Java build versions. 1.20.6 wants Java 21, whereas the other versions want a lower level. I have to compile my main module in 21 or else the 1.20.6 module doesnt resolve. However, I get this error due to it being compiled in a higher java version when running on any version other than 1.20.6, how do I get around this?
Unsupported class file major version 65

dusky harness
#

but other than that, I don't think there's much you can do
hopefully the standard will go to 21

#

like how it went from java 8 to 11 when java 11 was required

hoary scarab
#

So when a piston pushes an entity there is no indication that it was pushed... I can't find any packets or such sent.
That being said upon debugging, the location of the entity hasn't changed either.
The player sees the entity at the pushed location though... Any ideas what else I can check for?

dusky harness
#

because Player#getLocation should be updated - or at least it'd make sense if it was

forest jay
hoary scarab
#

wdym, like which location?
The entity's location.

dusky harness
hoary scarab
#

No. NMS entity.

#

One sec

dusky harness
dusky harness
forest jay
#

yeah...

#

and now I have this, so my server starts up with a 21 java:

openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment Corretto-21.0.3.9.1 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Corretto-21.0.3.9.1 (build 21.0.3+9-LTS, mixed mode, sharing)

Yet it still has the major class version unsupported error

dusky harness
forest jay
#

thats what the thing says

#

it literally says

#
System Info: Java 21 (OpenJDK 64-Bit Server VM 21.0.3+9-LTS) Host: Windows 11 10.0 (amd64)
Loading libraries, please wait...
dusky harness
#

and whats the full error?

forest jay
dusky harness
#

hmmmmmmmmmmmmm

#

all these mysteries

forest jay
#

yeah its confusing

dusty frost
#

latest it supports is 19 i think?

forest jay
#

So then how can a plugin that supports 1.20.6 work on any version less than that?

#

Cause it works on 1.20.6, but any version less than that and it has a heart attack

pulsar ferry
dusty frost
#

idk man, version constraints be wild

forest jay
#

it has to be possible, plently of other plugins do it

#

I just dont know how

hoary scarab
#

I have to compile with java 8 because 1.13 adds a version check and checks bytecode apparently.

#

Apparently paper has an option to ignore java version 🤷

hoary scarab
# hoary scarab One sec
DEBUG >> Stand: Location{world=CraftWorld{name=world},x=-1.5,y=50.0,z=-64.5,pitch=0.0,yaw=-90.0}
DEBUG >> Original: Location{world=CraftWorld{name=world},x=-1.5,y=50.0,z=-64.5,pitch=0.0,yaw=-90.0}
DEBUG >> Place: Location{world=CraftWorld{name=world},x=-1.5,y=50.0,z=-64.5,pitch=0.0,yaw=-90.0}
DEBUG >> Distance: 0.0

DEBUG >> Stand: Location{world=CraftWorld{name=world},x=-1.5,y=50.0,z=-64.5,pitch=0.0,yaw=-90.0}
DEBUG >> Original: Location{world=CraftWorld{name=world},x=-1.5,y=50.0,z=-64.5,pitch=0.0,yaw=-90.0}
DEBUG >> Place: Location{world=CraftWorld{name=world},x=-1.5,y=50.0,z=-64.5,pitch=0.0,yaw=-90.0}
DEBUG >> Distance: 0.0
dark garnet
#

where can i see 1.8.8 bukkit source code?

#

trying to figure out what gson version they were using

#

ping if reply

dark garnet
#

and thx

pulsar ferry
#

Load version on gradle, click on gradle tab, dependencies, spigot api

analog basalt
#

is it possible to cancel a chat event in velocity without getting kicked for "[22:42:08 FATAL]: A plugin tried to cancel a signed chat message. This is no longer possible in 1.19.1 and newer. Disconnecting player"

torn heart
#

turn off signed messages

wheat fog
#

hey

#

i'm trying to make packet nametags

#

and i managed to do it using by modifying gameprofile

#

but It's not good because gameprofile alters with tab completion and quit/join messages

#

I only want to modify the name above the player's head

#

I'm not sure what method to use that's a client-side nametag and isn't with modifying GameProfile#name

analog basalt
hoary scarab
spiral prairie
#

Because the piston pushed it

hoary scarab
minor summit
#

client predictions

hoary scarab
#

Besides spamming teleport/move packets any way to keep it stationary?

#

Cause gravity and marker clearly don't work.

wheat fog
#

solution was deep-cloning intercepted ADD_Player ClientboundPlayerInfoUpdatePacket packets with initalizing new objects so the GameProfile doesn't get overwritten

river solstice
#

cool

leaden sinew
atomic trail
leaden sinew
# hoary scarab

What version are you on? I just tried with a marker armor stand and it worked

cosmic musk
#

Hello, does anyone know about an ectasy hack and how it works? my server is being attacked by a guy who is using this to attack and is managing to access the console in such a way that he is managing to delete everything from the server without exception. I blocked all commands and it still happens, do you know any way to solve it? I'm not accusing any plugin, I'm just looking for a solution.

hoary scarab
crude zenith
#

randomly when logging back onto my server, my custom placeholder no longer registers

#

when using parse and a logger it doesnt even run the onRequest function

#

it was working perfectly fine yesterday so idk

worn jasper
leaden sinew
# hoary scarab 1.8.8 - Latest. Nms or bukkit?

I just tried on 1.8.8 and 1.20.4 single player and it didn't get pushed, it shouldn't matter what server software is used because you said no packets are sent right?
Are you using a client other than vanilla maybe?

cosmic musk
#

just ask what you need answered

hoary scarab
hoary scarab
mint ether
#

hi can anyone can help me pls ?

#

and why i cant send picture here ?

neat pierBOT
mint ether
#

its showing to me that when i am using the command

minor summit
minor summit
hoary scarab
leaden sinew
#

So either you're not on a vanilla client, a packet is being sent, or something funny is going on

hoary scarab
#

Apparently "BlockAction" packet is sent to the player. But this does not include any entity data I can remove.

leaden sinew
hoary scarab
leaden sinew
#

Vanilla Minecraft

#

What client are you on?

hoary scarab
#

Vanilla

leaden sinew
#

Are you sure the armor stand is a marker?

#

Try spawning one in with a command and pushing it with a piston

hoary scarab
#

I'll show code tomorrow.

leaden sinew
#

Why would that matter?

hoary scarab
#

🤦

#

Test with NMS then let me know.

leaden sinew
#

You just said no packet is sent

#

So how would it being an NMS entity change anything?

#

Have you made sure it's a marker armor stand?

leaden sinew
#
class ArmorStand extends net.minecraft.world.entity.decoration.ArmorStand {

    public ArmorStand(EntityType<? extends net.minecraft.world.entity.decoration.ArmorStand> entitytypes, Level world) {
        super(entitytypes, world);
        this.setMarker(true);
    }

    public ArmorStand(Level world, double d0, double d1, double d2) {
        super(world, d0, d1, d2);
    }

    @Override
    public boolean alwaysAccepts() {
        return super.alwaysAccepts();
    }
}
hoary scarab
#

🤷 no fucking clue then.

#

You're spawning it with packets right?

leaden sinew
#

I'm not, I'll try tomorrow if I feel like it

#

But that really should not cause any difference

#

At all

hoary scarab
#

🤷 no fucking clue then.

leaden sinew
#

Also make sure you're sending the entity metadata packet

hoary scarab
#

I do. You can look at the picture. Everything is sent properly.

spiral prairie
#

What version are you testing?

hoary scarab
#

1.8.8 - Latest (1.8.8 doesn't have marker)
Very last test was on 1.20.6

spiral prairie
#

Why in the jesus are you still supporting 1.8.8

spiral prairie
#

What is MiniPlaceholders

hoary scarab
# worn jasper https://discord.com/channels/164280494874165248/164523548390457355/1229457976616...

Abandonned plugin
Developer is afraid of change
Developer "dislikes" the syntax
Developer is a spigot fanboy and wants to stay stuck with spigot (he also refuses to support paper only)
Developer doesn't even try to migrate because of people around him telling him it's bad
Developer is lazy af to update his plugin because he thinks it requires a lot of work.
Very likely one: Developer wants to keep support for his 2% userbase in legacy versions.

Plugins not abandoned.
I use the new API and would use the newest java version if it was supported. (I still use new methods where possible)
Yeah I don't support paper or its forks. Don't need too.
Wrong.
I support backwards and forward compatibility depending on which plugin.
Wrong.

worn jasper
#

if the last one is wrong then you are lying lol

#

cause anyone that supports 1.8.8 nowadays, is 100% to support the 2% userbase that loves pvp or whatever

#

there is no logical explanation to supporting 1.8.8 besides that one, downgrading on purpose?

stuck canopy
worn jasper
#

bstats shouldn't be used for this lol, 80% of 1.8.8 servers are cracked for starters. And bstats fails to show that on 1.20+, over 90% of servers are on paper

stuck canopy
worn jasper
#

that still doesnt show what I just said

#

just shows versions

stuck canopy
#

shows server softwares too

worn jasper
#

not together though

stuck canopy
#

true

worn jasper
#

that is overall software across all versions

#

very bad stat to look at

stuck canopy
#

where do you find your stats from?

violet hedge
#

Umm where do I find help

royal hedge
#

like its still 4%

worn jasper
#

let me get the link, on the phone rn

stuck canopy
royal hedge
#

oh so ur agreeing

hoary scarab
#

🤷 our time to waste

stuck canopy
#

I mean theres nothing wrong with supporting 1.8 but its just not worth the time

worn jasper
torpid burrow
#

uhh is it possible if anyone can use mini messages instead of default color codes

explanation: i tried using minimessages and have read their docs but i didn't got how i implement it in

player.sendMessage("§eTest Message");
torn heart
#

paper is so good that 5.65% are running it twice 😱

hoary scarab
# leaden sinew Have you made sure it's a marker armor stand?

🤦 Was not a marker...
Fixed the method check, and making it a "marker" breaks things lol
Name is at the feet of the armorstand and you can't interact with it.
I can do some raytracing if I need interaction but the name placement is not ok.

#

1.8 still allows interaction, and the name is at the right spot. But can still be pushed by pistons.

leaden sinew
#

You could use a second invisible armor stand above it for the name

hoary scarab
#

Would defeat the purpose of the recode.

leaden sinew
#

Another thing you could do is on the piston push event, set the armor stand to a marker, then once it's done make it not a marker

leaden sinew
hoary scarab
leaden sinew
#

You just have to check armor stands in the blocks in front of the piston push

hoary scarab
leaden sinew
#

How do you store them?

#

Do you not have some type of Map<Position, ArmorStand>?

hoary scarab
#

I cache them in a ConcurrentSet

leaden sinew
#

How are you detecting the player clicking them?

#

Are you using the entity id?

hoary scarab
hoary scarab
leaden sinew