#help-development

1 messages · Page 1318 of 1

dark moth
#

here

eternal oxide
#

um what repos do you have in your pom?

dark moth
#

spigotmc-repo

eternal oxide
#

also target is 25?

dark moth
#

can it be bc of the source and target is 25 ?

#

it is

#

:D

#

ig 21 or 17 should work

eternal oxide
#

yes

dark moth
#

alrighty, thanks!

buoyant viper
#

true

#

still dont remember wtf i was typing tho

kindred sentinel
#

How to get sha1 hash sum of the resource pack file? I mean.. Before it was automatically using setResourcePack, but by addResourcePack you have to put it by yourself

slender elbow
#

@Nullable

kindred sentinel
slender elbow
#

setResourcePack did not do it automatically either btw

#

it would need to download the resource pack itself first to do that

kindred sentinel
#

Well, yeah, but you didn't have to get hash manually

slender elbow
#

well, you still don't :p

kindred sentinel
#

Now I know that I still don't xd

chrome beacon
#

I do recommend you give it though

kindred sentinel
chrome beacon
kindred sentinel
chrome beacon
#

Where is it downloading from?

kindred sentinel
#

Like one player posts it using /rp setup <link> and another one downloads it using /rp add <nick>

chrome beacon
#

So it could be any link

kindred sentinel
#

yep

chrome beacon
#

and you're not the one hosting the pack

kindred sentinel
#

yeah

#

like it can be hosted by google disk or any other file sharing service

chrome beacon
#

sounds like an odd concept but sure ig

#

You'd need to download the pack to the server once to get a hash of it

thorn isle
#

as long as the data never goes on your disk or through your network and it's opt-in it's prooobably fine

#

typically doesn't happen with minecraft servers but CP bombing isn't anything new

chrome beacon
#

yeah I was also thinking about that

kindred sentinel
#

So it will cause CPU load?

chrome beacon
#

hashing a file isn't that intensive and you can offload it to its own thread

kindred sentinel
chrome beacon
#

Yeah just skip the hash

#

if users start sharing stuff you do not want that on your system

kindred sentinel
#

So it's not the thing that will happen for every player that joins server, so it's not really that bad

chrome beacon
kindred sentinel
#

Or I didn't understand you right, what you wanted to say

chrome beacon
#

and you trust them not to put illegal stuff on your server

kindred sentinel
rotund ravine
wild mulch
#

how do i cancel a minecraft:brand plugin message

#

and not have the server think of it

rotund ravine
#

Hmm?

wild mulch
#

?

sly topaz
#

you could maybe manipulate the packet before the server processes it though I have no idea what use that would have

violet blade
dark moth
#

is there any ways to make people transparent but like not invisibility potion effect ?

#

specifically 75% to %92.25

thorn isle
#

probably not without a core shader

dark moth
#

:(

#

sad

#

guess ill stick to invis potions

barren sapphire
#

I remember something like that being possible in vanilla with teams? Maybe you can fake those packets or something

dark moth
#

ill check it out, thanks!

thorn isle
#

being in the same team + the see friendly invisibles team option

#

but i don't remember if that actually makes them transparent or if it just draws a team outline as with the glow effect

dark moth
#

alr now i definetily try this :D

#

thanks

pseudo hazel
#

thats just the glow

#

other than spectator you cant really make players transparent

molten hearth
#

if you mean the server advertising its brand to the client

#

If ur asking how to make the server ignore what the client sends uh I dunno

marble spade
#

Anyone got an api so i can use for using minecraft skins on mobs for 1.20.4?

thorn isle
#

libsdisguises

wild mulch
sly topaz
#

What’s the goal here?

wild mulch
#

idk

#

i just wanna know how

violet wave
# wild mulch i just wanna know how

You need to either use protocollib or directly hook into netty.
Many guides on how to set either of those things up.
After that just drop that packet. For protocol lib just call PacketEvent#setCancelled. For netty simply omit the call to the super.channelRead/Write.

#

There are also many other packet handling libraries out there but i'm most familiar with ProtocolLib or just doing it directly with Netty & NMS

naive loom
#

Does anyone have any insight on this?

violet wave
# naive loom Does anyone have any insight on this?

Chunk packets can be delayed and arrive out of order. It could be that a chunk is sent and then your block change is sent, but the chunk is processed for longer and your block update arrives first.
As the client hasn't received the level chunk yet, it ignores the block update in the unloaded chunk.

To see if this is the reason (this isn't a solution just a debugging hack) delay the block update by ~10 ticks and see if that fixes it.
IIRC there is an chunk acknowledgement packet that the client sends back to the server.

#

Another way would be to modify the chunks currently being sent to the client with the blockstates you want.

naive loom
#

I tried unloading the chunk and resending it but it didn't turn out in my favor when I attempted it.

dark moth
upbeat isle
#

heya! i'd like to make an infinite procedurally generated indoor facility a la lethal company. some soft requirements:

  • rooms may vary in size (larger/smaller than 16x16). would that disqualify a chunk generator? (i'd ideally like to use a chunk generator for performance and ensuring that areas never "pop in" or aren't fully available when a chunk is loaded.)
  • multiple floors (depending on the area) that properly connect with every other floor (no dead zones).
  • a mix of full procgen and prefabs (whether those prefabs be special features or entire rooms).
  • "biomes" (different areas). i'm pretty sure this would be easy w noise.
    is this even possible? thoughts?

the main mc-specific question here is whether chunk generator would be a proper fit. should i leverage something like structure blocks (or their code equivalent)?

#

(also @young knoll someone recommended i ask you particularly since apparently you've had experience with this sorta stuff. i'd really appreciate any advice <3)

sly topaz
#

(I am someone, get to work Jish)

young knoll
#

Structure blocks can handle sizes up to 48x48x48

#

Alternatively just generate a void world and then slap down structures/schematics into it

upbeat isle
#

i'd ideally like to go above 48x48

#

the worry i have with putting structures into a void world is collisions, determinism, and delayed loading

sly topaz
#

you could possibly do that by just making sure the procedural generation is consistent enough and the prefabs being designed in a way that makes them easy to connect to existing parts

upbeat isle
#

but i recognize that generating a 16x16 area in isolation that perfectly aligns with multiple floors, bigger rooms, larger structures, etc, is extremely difficult

sly topaz
#

easier said than done though

#

there was someone else who did a procedurally generated golf track but I don't remember who it was

upbeat isle
sly topaz
#

@worthy yarrow was it you

#

trying to get all the 5 people I know do worldgen here, it is so annoying that barely anyone does lol

upbeat isle
#

<3 much appreciated

sly topaz
#

I would also recommend getting into the Minecraft Commands and/or Minecraft Worldgen discords, while they do more on the datapack side of things, they can probably give you some idea of the feasibility of it, maybe you end up doing something with datapack worldgen for general layout + chunk generators for decorations/prefabs

upbeat isle
#

hm hm, i will look into that, thank you!

sly topaz
#

@young knoll did you ever end up finishing the procedural dungeons generator

#

I vaguely remember you showing a video of it a long time ago, it was pretty cool

thorn isle
#

illusion or the other pinkname i always confuse him with also has a i think wfc based generator

#

but from what i saw it didn't use the world generator api

#

personally i don't really know if the worldgen api is very suited for something like this, either

#

not illusion, magmaman

echo basalt
#

I don't do world gen

#

been fucking with uh

#

backend development

#

still working on rpg

#

still working on uh

#

video production shit

#

@torn shuttle how's that minecraft cup I got you

torn shuttle
#

so a bit rough

#

but I still use it

echo basalt
#

but usable

#

hell yeah

echo basalt
#

I'll get you another next time I'm in town

torn shuttle
#

wfc would not work with traditional world gen

#

it also doesn't scale well

#

you need a bunch of techniques and compromises to get it to scale

echo basalt
#

btw have you figured out a way to get saveable, empty chunks with nms

#

so I don't have to generate and do all the crazy shenanigans

torn shuttle
#

a naive approach by the nature of the system might never have a stable state for chunks, as a future chunk might retroactively change an indefinite amount of chunks that have already been generated

echo basalt
#

half my dungeon loading time is waiting for chunks

torn shuttle
#

I am getting mc to load a premade void world

#

I'm cloning a void world I made but the loading of the world itself into mc is still noticeably slow

#

also I have a queue system

#

but it's not a great solution

echo basalt
#

The world's already loaded but I still gotta wait for chunks that I know will be empty

torn shuttle
#

I mean generating is slower than loading

#

so that's what I did

#

idk if minecraft is creating chunk files in sync or something

#

probably

#

I assume you saw mojang is going to deobfuscate all java code

thorn isle
torn shuttle
#

I've done a numbero f techniques, the conclusion I ended up coming to is that there is no solution that is objectively best, just solutions that are more optimized for different scenarios

#

if you wanted to generate something really large I would recommend an approach that has a bias to go center->out which is not technically how wfc is meant to go, but that guarantees less significant rollbacks

#

then there's a lot of different problematic concepts where you have to look at what you're building to determine the best path

echo basalt
torn shuttle
#

another thing that kinda worked under some circumstances was clearing in a radius instead of rolling back to resolve rollbacks, that can theoretically be faster but if you are doing stuff like mega modules where you are enforcing larger rooms with smaller modules you will get deadlocked

thorn isle
#

mmmyeah sounds familiar

torn shuttle
#

mega modules are a massive pain fyi

#

like

#

I won't admit to how long I spent working on that, only to basically give up

echo basalt
#

I've got this rn but it's a bit buggy

#

blocks don't properly track and some chunks end up empty despite setting and recognizing the blocks there

torn shuttle
#

messing with files at a low level is a massive pain

echo basalt
#

this is not file related pure nms

#

world format is easy enough

torn shuttle
#

I have code that can paste millions of blocks instantly, but then shit gets really weird

#

yeah I mean just low level messing with world gen can get real glitchy real fast

#

honestly I was considering cloning how empty chunks get generated outright

#

at a file level

#

so I'd inject my own empty chunk files and then have mc load it

#

wouldn't really fix the slow loading time of just loading world though

quaint mantle
#

Hi is it all versions are deobfuscated or the version after the announcement

torn shuttle
#

only latest+

#

well next latest I guess

thorn isle
#

deobfuscated alpha when

torn shuttle
#

deobfuscate 1.8

#

I can finally go in and make a good server

#

part of the problem that I was looking at is that even if I clone the files and inject them for mc to load, odds are the file format will change with updates which will just be another headache

dark moth
#

it works

#

thanks vcs2

#

insert a happy one now

#

when i leave the team the player is basically gone but when i join the team its sorta transparent

#

idc if i cant control the alpha it works!!!

analog lantern
smoky anchor
#

Heyo, silly question.
Can IntelliJ somehow change color for a variable of specific type. For example only variables from class Foo will be yellow, but Bar and will have normal default theme color.

smoky anchor
#

Sad

mortal vortex
#

You can make a plugin though.

smoky anchor
#

I don't wanna fuck around with that, I'm too lazy

mortal vortex
#

Tap into the PSI tree and apply a TextAttributesKey

#

It would be a minute job gang

remote swallow
onyx fjord
#

does settype trigger blockbreakevent?

thorn isle
#

no

marble spade
#

hey, i'm using treetype to generate one type of tree, and the mega spruce tree doesnt apear, i'm using version 1.20.4

marble spade
#

nvm, already found it

robust helm
#

[00:32:02 ERROR]: Error occurred while enabling friends v1.0 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.plugin.RegisteredServiceProvider.getProvider()" because the return value of "org.bukkit.plugin.ServicesManager.getRegistration(java.lang.Class)" is null
at friends-1.0-1762385451557.jar/de.kentoj.friends.Friends.onEnable(Friends.java:27) ~[friends-1.0-1762385451557.jar:?]

plugin 1, onEnable:


        val servicesManager = Bukkit.getServicesManager();

        val messagingService = new MessagingService(new RabbitMqPublisher(rabbitCon), new RabbitMqSubscriber(rabbitCon));
        servicesManager.register(MessagingService.class, messagingService, this, ServicePriority.Normal);

        val friendsService = new FriendsService(datastore);
        servicesManager.register(FriendsService.class, friendsService, this, ServicePriority.Normal);

plugin 2, onEnable:

        val friendsService = Bukkit.getServicesManager().getRegistration(FriendsService.class).getProvider();

plugin2 depends on plugin1 and plugin1 fully initializes(i checked by printing a "ready" message at the end of the onEnable method).

thorn isle
#

make sure you're not shading plugin1 into plugin2

#

if you do, that getRegistration is going to pass a shaded copy of the .class, which won't have a service associated with it

robust helm
#

ill try tomorrow, thx :)

mighty wind
#

running into a bug where ill give alocaiton, and sometimes it just randomyl shoots up a couple of Y

#
        addRegion(new KOTHRegion(
                new Location(world, 17006, 103, -46),
                new Location(world, 16994, 98, -58),
                new Location(world, 16994, 103, -46),
                new Location(world, 17006, 103, -46),
                new Location(world, 16994, 103, -58),
                new Location(world, 17006, 103, -58),
                new Location(world, 17005, 98, -57),
                new Location(world, 16995, 98, -47),
                new Location(world, 17000, 98, -52)
        ));
    public Block getBeaconGlass() {
        return this.beaconGlassLoc.getBlock();
    }

new Location(world, 17000, 98, -52)

this isnt touched/modified anywhere except for getting the block, and it will give me 103 instead of 98

sly topaz
#

I did get it to work but at what cost

#

I hadn't played around with IJ platform before so I was pretty lost, managed to get something working though

sullen marlin
sly topaz
#

now that I have a bit of an idea on how IJ plugins work I might try something more complex

wide cipher
#

I've been building a multi-module nms project, but i keep running into this error, and i have no clue how to fix it. So far, this is only happening for version 1_20_R6. cannot access net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket bad class file: C:\Users\~~~~\.m2\repository\org\spigotmc\spigot\1.20.6-R0.1-SNAPSHOT\spigot-1.20.6-R0.1-SNAPSHOT-remapped-mojang.jar(/net/minecraft/network/protocol/game/ClientboundSetEntityDataPacket.class) class file has wrong version 65.0, should be 61.0

hybrid mist
#

ah alright

thorn isle
#

i feel like it's next to impossible to add new gui elements to the ide and having them fit in because most of the classes IJ uses for the existing ones are either package private or undocumented

robust helm
worldly ingot
# sly topaz

I'm considering a third run at IntelliJ after 10 years

#

Eclipse has been pissing me off lately with its updates

#

I just fear that I'm going to feel slow in IJ again. And I still hate that it doesn't have a workspace in 2025 PES3_Smile It has a plugin for it, but it's only for the paid version of IJ

#

And I promise you I will never pay for a text editor

slender elbow
#

I just fear that I'm going to feel slow in IJ again
i mean, you are changing whole development environments, you are going to be slow until you feel comfortable with it for a while

#

such is the life

worldly ingot
#

Well I don't like life! >:(

eternal night
#

I have to use eclipse for a project at work and I am close to jumping

#

I am honestly impressed with you for surviving choco

slender elbow
eternal night
#

Just install eclipse keybinding btw

#

easy af, did that too when I migrated, still run eclipse keybinds xD

worldly ingot
#

I've just been getting frustrated with updates continuing to break. This is like the third time now where I've upgraded Eclipse and I literally just can't open it anymore

#

I updated to 2025-09 last month and I've been using 2025-06 ever since 🙃

#

Not to mention its themeing is continuously dogshit

chrome beacon
#

Join us IJ users 😎

ivory sleet
#

Waiting for the plot twist

chrome beacon
worldly ingot
#

Sick

#

I'm being lied to

#

:(

chrome beacon
#

I have no idea if that's intended or not 🤷‍♂️

#

but it works, just gave it a try

slender elbow
#

oh you're not talking about me

#

nvm then

worldly ingot
#

Suspicious PepeSuspicious

remote swallow
#

last time i heard about workspaces they were linux + mac exclusive

#

guessing they got around to windows versions after ages

chrome beacon
#

huh why would they be platform specific

remote swallow
#

idk im guessing it was ui stuff

broken gorge
#

looking for someone that can make me a plugin

chrome beacon
#

?services

undone axleBOT
sly topaz
#

overall, I like the development workflow, you just run ./gradlew runIde and you can test your plugin very easily, and creating end-to-end tests seems trivial

#

I did spend a hot second fixing the tests it came with since there's a bug which prevents it from running properly on virtual file systems on windows (see IJLP-197868). I also had to go through the annoying process of converting the default template into java and removing the kotlin bits

wheat flume
#

I have a question for the round, namely how can you write to admin if an account has been hacked and what is generally required to prove that the account belongs to me? It's about the SPIGOT website

eternal oxide
#

?support

undone axleBOT
mortal vortex
strong sable
#

Yo it's been 6+7 days since I posted a resource and its still under approval, is that normal?

sullen marlin
#

Yes, read the guidelines

sullen marlin
mortal vortex
#

ermmmm….

#

Fair

wide cipher
chrome beacon
#

Are you using maven or gradle?

wide cipher
#

Maven, compiled using java 21

#

I deleted and reinstalled the remapped spigot, and it didn't change

chrome beacon
#

Could you send your pom

worldly ingot
#

tbh I'm not happy about wanting to switch away from Eclipse

#

I'm doing it because it's kinda forcing my hand at this point

mortal vortex
wet breach
wide cipher
chrome beacon
#

that's fine

wide cipher
#

NVM I didn't push the changes xD

wet breach
#

sometimes a little annoying when people ask for help but not at the computer to receive said help and thus forcing us to wait to see if your problem is resolved. We do like to resolve people's problems sometimes you know >>

thorn isle
#

just tell them to be at their machine and then forget about it until they bring it up again

#

that's what i do

#

i never remember anything

prime badger
#

hi

#

Litebans doesn't work for me, I inserted it into the bungeecord server, I also connected the database, I also set the permissions on luckperms, but it always tells me that I don't have permission to execute the command, I'm going crazy

chrome beacon
#

If Litebans is installed only on the proxy make sure you gave the permission on the proxy

#

and not just on a subserver

smoky anchor
#

Guys help I'm being stupid
How do I get IntelliJ to pass system properties to java

#

this just prints null for the get flare.test

#

omg it's VM Options
raa

thorn isle
#

environment variables are a different thing, those are like your %PATH% on windows and java home and whatever

sullen marlin
slender elbow
#

his name is Choco, not netbeans

violet wave
wide cipher
#

I am on my PC now, so i can respond for new info. I am having an issue compiling an NMS module for v1_20_R4. The pom.xml is attached. I am getting these errors. The NMS version is compiled using java 21.

#
  bad class file: C:\Users\~~~\.m2\repository\org\spigotmc\spigot\1.20.6-R0.1-SNAPSHOT\spigot-1.20.6-R0.1-SNAPSHOT-remapped-mojang.jar(/net/minecraft/network/protocol/game/ClientboundSetEntityDataPacket.class)
    class file has wrong version 65.0, should be 61.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.```
#

most likely has something to do with the java version here when compiling the remapped classes, but idk how to fix. { "name": "4195-b", "description": "Jenkins build 4195-b", "refs": { "BuildData": "32d1baf2f4e0e7cd1ac22c7b2f6eb4c387e8a343", "Bukkit": "376e37db4b23b1fc18f93d3aeccaa40b8bb16ed2", "CraftBukkit": "65247583f8c04171632caab7487c8aabceacd5c8", "Spigot": "f6a48054762b87d7c8568e567127b883241c592b" }, "toolsVersion": 181, "javaVersions": --->[65, 66]<--- }

sullen marlin
#

Sounds like an intellij issue

#

Need to set right project SDK or something

chrome beacon
#

^^ probably not using Java 21

wide cipher
#

Thanks, will try to test this later

wide cipher
#

Thank you! it worked

prime badger
chrome beacon
prime badger
#

I wrote you

bright spire
#

Vscode or intellij? What do you guys use? I go for vscode

violet blade
#

Notepad++

pseudo hazel
#

intellij

slender elbow
#

jilletni

eternal oxide
#

Emily is so good she codes in a mirror

slender elbow
#

yeah because everything i do is backwards 😭

young knoll
#

Paint

smoky anchor
#

I write code in sand and have an AI look at the pictures and directly generate the bytecode

eternal oxide
#

Finger paints as I ate all the crayons

slender elbow
#

just ask chatgpt

frank thistle
#

Can anyone fix this?

#

private static final double CONSUME_PER_MIN = 130.0;
private static final double CONSUME_PER_TICK = CONSUME_PER_MIN / 1200.0;
private static final BlockFace[] FACES = {BlockFace.NORTH, BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, BlockFace.UP, BlockFace.DOWN};
private static final Map<Location, Inventory> inventories = new HashMap<>();
private static final Map<Location, Long> lastProcess = new HashMap<>();

private static final List<Recipe> recipes = new ArrayList<>();

private static final String TEXTURE_VALUE = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYTZjNzQ1OGJhYzQ3Yjc4MTg5NGJiOTFhMWU4NWI3ZTcwNGNmYmM2MzRjNzE5Mjg1YWI1YzhlZmQ5ZjgzZDQ5MCJ9fX0=";
#

anyway for using player head for item

frank thistle
#

Full code

smoky anchor
undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

frank thistle
#

it says cannot found symbole

#

i try anything

#

nothing works

smoky anchor
#

what says that

#

be as specific as you can

#

these vague statements are kinda useless

fallen grove
prime badger
#

Litebans doesn't work for me, I inserted it into the bungeecord server, I also connected the database, I also set the permissions on luckperms, but it always tells me that I don't have permission to execute the command, I'm going crazy

#

can anyone help me?

raw sequoia
#

how do I get player heads itemstack with player skin? I lost the method I once made

raw sequoia
#
public static ItemStack getPlayerHead(String playerName) {
        ItemStack skull = new ItemStack(Material.PLAYER_HEAD);
        SkullMeta meta = (SkullMeta) skull.getItemMeta();
        meta.setOwningPlayer(Bukkit.getOfflinePlayer(playerName));
        meta.setDisplayName("§e" + playerName + "'s Head");
        skull.setItemMeta(meta);
        return skull;
    }

This does not work

umbral ridge
#

😿

#

you need to use a field class and gameprofile

eternal oxide
#

depends on your spigot version

umbral ridge
#

yes that too

#

1.8 the best

#

XD

raw sequoia
#

I'm using compileOnly("io.papermc.paper:paper-api:1.21.8-R0.1-SNAPSHOT")

#

any idea?

raw sequoia
#

oh, there's a massive diff

radiant aspen
#

Hello fellow spigot nerds, does anyone know how to configure the logging levels?

I have the following code but it does not appear to be working

getLogger().setLevel(Level.ALL);
getLogger().fine("Test debug message, yay");
autumn zinc
#

I have a problem, when i trying to CraftPlayer.getHandle():
Caused by: java.lang.NoSuchMethodError: 'net.minecraft.server.level.ServerPlayer org.bukkit.craftbukkit.v1_20_R1.entity.CraftPlayer.getHandle()'

i am using spigot-1.20.1-R0.1-SNAPSHOT-remapped-mojang.jar jar to use nms classes (in build.gradle - compileOnly files("<spigo jar name there>")), all compiled correctly. I created spigot-1.20.1.jar using java -jar BuildTools.jar --rev 1.20.1 -remapped.

chrome beacon
#

also avoid jar dependencies

autumn zinc
chrome beacon
#

No

#

It's the wrong way to do it

autumn zinc
#

so... what's the other way?

chrome beacon
#

Use the plugin I linked

#

or if you're on an old version where mojang mappings don't exist the artifact id is spigot instead of spigot-api

autumn zinc
#
Execution failed for task ':remap'.
> Could not resolve all files for configuration ':detachedConfiguration1'.
   > Could not find org.spigotmc:minecraft-server:1.20.1-R0.1-SNAPSHOT.
     Searched in the following locations:

Where should I import org.spigotmc:minecraft-server ?..

chrome beacon
#

That error usually happen when you haven't run BuildTools

#

or if you don't have mavenLocal() as a repo

autumn zinc
chrome beacon
#

oh and don't forget

tasks.build {
    dependsOn(tasks.remap)
}
autumn zinc
#

Bro,.. you opened my eyes after many years

#

Thank you so much 🔥

stoic junco
#

Hello i wanted to ask u how could i set custom maps? basically my Core plugin is a roleplay with nations and i wanted them to show up on the maps when one its created or deleted

chrome beacon
#

You'd need to make a map renderer that modifies the map

stoic junco
chrome beacon
#

you don't need to auto generate all the maps

#

only the ones actually used

stoic junco
autumn zinc
#

How do I find the connection field in ServerGamePacketListenerImpl?
This code doesn't work

private Channel getChannel(ServerGamePacketListenerImpl listener) {
        try {
            for (Field f : listener.getClass().getFields()) {
                if (f.getType() == Connection.class) {
                    return ((Connection) f.get(listener)).channel;
                }
            }
            throw new RuntimeException();
        } catch (Exception e) {
            throw new RuntimeException();
        }
}
thorn isle
#

try getDeclaredFields

#

if it's private it won't appear in getFields

#

i don't remember whether it is or not but that's a thing to try

chrome beacon
#

Yeah I belive that's how it works

thorn isle
#

public final Connection connection; // Paper

#

i only have paper sources unfortunately

#

looks like they access transformed it to public from private

autumn zinc
#

I don't expect this field to be private

thorn isle
#

did you get it working?

autumn zinc
#

yes, i did

marble spade
#

does anybody know a way to make a custom mob spawning? i made a custom dimension and i disabled vanilla spawning, and i want to populate it with custom mobs

young oar
#

umm, im trying to make a spigot account, and it says im a bot can i get some help?

wet breach
#

if you disable mob spawning at all, you generally can't spawn custom mobs

thorn isle
#

depends kinda sorta

#

if you disabled it, you can't do it with a datapack or whatever the orthodox method of doing it is

#

nothing is stopping you from manually picking random block locations and shoving in mobs, however

#

in which case there is really no "how" beyond just picking a random location, checking whatever conditions you want to check, and calling world::spawn

wet breach
thorn isle
#

unless it was disabled by setting the difficulty to peaceful, manually spawning mobs should always work

#

things like worldguard flags notwithstanding

sullen marlin
#

What if it was disabled by deleting all the code

young oar
#

nvm, i got it to gibe me an account

marble spade
young knoll
#

What about Atlantic mobs

thorn isle
#

💀

wide cipher
#

I am having a minor issue compiling my multi-module project. When compiling, I want the output directory to be in the target/ folder of the parent module, but for some reason, it is appearing in the target/ folder of the v1_19_R1 module. To make it easier to see, the project can be seen here.

#

could have something to do with the module's .iml file being put into the parent module.

#

Sorry, I realised it is being compiled into every module except for the parent module

azure escarp
#

?gui

wet breach
#

I suppose you could change the target directory too

#

but if you are shading best to not do that and let the shade plugin hadle it. Anyways point is, every module typically compiles into their own directory and then its after if you have it defined you would want to move such things. The problem you will encounter is that if you want something to happen in the parent directory the parent module will not make that happen since it compiles first

#

so what most I have seen usually do, is have a module that is compiled last to handle all these file related things and what have you so its cleaner and easier since it is in its own module and not spread out between all the modules

#

also prevents a module from failing because the file didn't move lol

night kestrel
#

Hello ip looking for devs ti help me whith my Minecraft Java setver

chrome beacon
young knoll
#

Hypocrisy!

wide cipher
#

yeah. I do have another problem now (ikr). The plugin can't load (yippee), it gives this error, [10:04:29 ERROR]: [DirectoryProviderSource] Error loading plugin: java.lang.IllegalArgumentException: Directory 'plugins\.paper-remapped\Alkatraz_0.3.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it! java.lang.RuntimeException: java.lang.IllegalArgumentException: Directory 'plugins\.paper-remapped\Alkatraz_0.3.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it! at io.papermc.paper.plugin.provider.source.FileProviderSource.registerProviders(FileProviderSource.java:81) ~[paper-1.20.6.jar:1.20.6-151-a4f0f5c] at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:52) ~[paper-1.20.6.jar:1.20.6-151-a4f0f5c] at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:17) ~[paper-1.20.6.jar:1.20.6-151-a4f0f5c] at io.papermc.paper.plugin.util.EntrypointUtil.registerProvidersFromSource(EntrypointUtil.java:15) ~[paper-1.20.6.jar:1.20.6-151-a4f0f5c] at io.papermc.paper.plugin.PluginInitializerManager.load(PluginInitializerManager.java:109) ~[paper-1.20.6.jar:1.20.6-151-a4f0f5c] at net.minecraft.server.Main.main(Main.java:122) ~[paper-1.20.6.jar:1.20.6-151-a4f0f5c] at org.bukkit.craftbukkit.Main.main(Main.java:328) ~[paper-1.20.6.jar:1.20.6-151-a4f0f5c] at io.papermc.paperclip.Paperclip.lambda$main$0(Paperclip.java:42) ~[app:?] at java.base/java.lang.Thread.run(Thread.java:1474) ~[?:?] Caused by: java.lang.IllegalArgumentException: Directory 'plugins\.paper-remapped\Alkatraz_0.3.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it! ... 9 more and i've got no clue if I'm using the right jar.

#

I'm not sure what it's doing wrong to not include the ymls

thorn isle
#

open the jar with winrar or whatever and see if it has the plugin.yml in it

#

if it doesn't, you're building it wrong

drowsy helm
#

and what build tool

wide cipher
#

Maven

wide cipher
drowsy helm
#

just describe it

#

is your plugin.yml in resources folder?

thorn isle
#

screenshot the directory tree of your project

#

and/or send your pom.xml

wide cipher
jaunty leaf
#

Hi

#

Does anyone speak Spanish so they can answer some questions?

wide cipher
#

I fixed it,

wide cipher
#

How could i copy the jar file directly into my testing server when i compile it?

wide cipher
#

maven, but i worked it out already

#

thanks anyway

wraith dragon
#

Hello! So, long story short, I am tasked to decompile a plugin -> convert into a project -> and implement large amounts of modifications to it. It's because the old author has not maintained it and moved to a different one. My problem rests on the API the original author used to make this specific plugin, and the customer requested to remove the API, and create custom code, for the sake of future feature additions. Do any of you think this is feasible? The whole plugin is surrounded by the use of this API, I've been at it for hours, but I fear that after removing it, compiling the new version of the plugin, and running it, there would be heaps of errors and I would just be wasting time.

sly topaz
wraith dragon
#

even has scripts and stuff

sly topaz
#

in that case, I would try to look into replacing the API the original author use with one that does the same, without modifying methods and what not

#

that way you at least get a baseline to where your efforts will be at instead of trying to patch every place the API used

#

in general, when working with reverse-engineered software, you want to try make the least amount of modifications to the original code as possible. This is mostly because it makes updates easier to handle but also because it allows you to not accidentally modify the behavior

#

would be easier to give pointers if you were more specific about what kind of plugin it is and what the API/library it used you're trying to replace

wraith dragon
sly topaz
wraith dragon
sly topaz
#

I am confused, isn't the source right there

wraith dragon
#

That's the thing

#

thats an old version

sly topaz
#

or did they make some modifications to it with a developer

wraith dragon
#

But I already figured out how to convert the jar into a project using CRF

sly topaz
#

is there a reason they don't just use the dev's new project AdvancedDungeonArena

wraith dragon
#

They'd rather stick to the old one

sly topaz
#

well, the API they used seems to still be maintained, is there any reason to fork it off?

#

seems to maintain mostly the same structure too

wraith dragon
#

The thing is, I'm not supposed to use the API at all

sly topaz
#

what I would do in this situation is just work off the code in github and port over whatever modifications they did in the jar they provided

wraith dragon
sly topaz
#

the project has multiple modules which I am sure were merged at compilation, you'll have to reconstruct the pom.xml and the project structure

wraith dragon
sly topaz
#

if they didn't do much other than updating the NMS classes, it should be trivial

wraith dragon
sly topaz
#

as for the API, I would just fork it off and change the name of the package lol

#

they wouldn't know

#

I honestly don't think it is worth replacing if it is used all over the place

wraith dragon
wraith dragon
#

huge waste of time

wraith dragon
#

Now the only thing I'm worried about is if they decompile the plugin themselves and see the API code

sly topaz
#

if it is a plugin type of library, then you'll just have to call its onEnable/onDisable methods yourself on the AdvancedMobArena plugin

sly topaz
#

I doubt they're going to go that far anyway

#

or just be honest with them and tell them that if they want to replace the whole thing then they'll have to pay more, but if they allow just forking it off then we can work it out

wraith dragon
sly topaz
#

you have the source available after all, you can include any and all changes they may request to it

sly topaz
# wraith dragon And If I already set a price 😬

prices are never constant, you'll just have to talk to them about it being more involved than what you had expected and if they don't want to spend more money and time into creating a replacement for that API (do mention that it would essentially be equivalent to recreating the whole plugin as it is used everywhere), then forking off the existing one is the most sensible solution

#

if they're worried about licensing issues then idk what to say, they'd have to consult a lawyer

wraith dragon
#

So in summary: Fork the old project and update to jar version & Fork the API (Or not depending if there are breaking changes)

#

Is that right?

sly topaz
#

yeah, pretty much

#

you can fork the API and just revert to an older commit if that makes it easier to work with the current source

#

in short, cut corners where you can otherwise you're going to be spending more time and effort than you were paid for lol

wraith dragon
#

Alrighty, will do that. Thanks for taking the time to talk about this btw!

wraith dragon
#

@sly topaz mb for the ping. Just an update: we had agreed on including the API INSIDE of the plugin itself. Reason for this being that he had two other plugins from the same author using newer versions of the API. Plus, the API in the old version included a lot of useless dependencies, so he wants me to remove all of that.

#

I think I'll just bundle it with the API module

sly topaz
#

sounds reasonable, if you were going to shade it you'd have to relocate it anyway

#

you could also just update the old plugin to use the new API, if not much has changed since the version they used and the version it is now

wraith dragon
#

so the API in the version he wanted me to use was "NightCore"

#

but the API the old plugin was using was "NexEngine"

#

so I don't think I can fork the old project

#

😭

sly topaz
#

welp, that's a shame

wraith dragon
#

truly

echo basalt
tight compass
#

Does BlockPlaceEvent get called if BlockMultiPlaceEvent is called?

#

And are there multi break events?

sly topaz
#

did you happen to do the update on that plugin for a client? Would be funny if so

echo basalt
#

fuck yeah

#

I did

sly topaz
#

Imagine they hired someone else to do a different update lol

#

is this plugin that popular

echo basalt
#

I did this update like 4 months ago

#

@wraith dragon can I take it pls 🥹

modest sapphire
#

Can smb teach me how to make a simple weapon Plugins i could teach pvp or smt in return

torn yew
#

If there is a mineshaft in my server, with which plugin can I put levels on the different mines?

wraith dragon
wraith dragon
mortal vortex
#

"put levels"?

#

like more layers to the mineshaft?

umbral ridge
#

More schnitzel

wraith dragon
#

@echo basalt you there?

echo basalt
#

Sup

wraith dragon
#

sooooo

#

what were you saying about advancedmobarena?

#

@echo basalt which version did you update it to btw? If you don't mind me asking

wraith dragon
#

@echo basalt sorry for the pings 👉 👈

echo basalt
#

I updated at least up to 1.21.8

#

I don't recall if I did 1.21.10

wraith dragon
echo basalt
#

Ported most of it to nightcore

wraith dragon
#

thanks!

echo basalt
#

and we did a couple fixes to respawn mobs and stuff

#

nun crazy

wraith dragon
echo basalt
#

Why you ask?

#

I made enough to cover the hours worked

wraith dragon
#

I'm doing something way more complex, removing a bunch of the internal systems, then a custom fork of nightcore as well

#

something new actually

#

I don't usually work with big projects

echo basalt
#

sounds easy enough

wraith dragon
wraith dragon
kindred sentinel
#

Is there a way to drop multiple items using World#dropItemNaturally without spamming it in loop?

eternal oxide
#

no

eternal oxide
#

why is that an issue?

kindred sentinel
eternal oxide
#

ah

frail elbow
#

does anyone know the best way to make a chat awaiter?

#

to await user input?

sullen marlin
#

Conversation API

frail elbow
frail elbow
#

besides the class definitions

chrome beacon
#

?jd-s

undone axleBOT
frail elbow
#

Conversable forWhom what is a Conversable?

chrome beacon
#

Open the javadoc page for Conversable

thorn isle
#

something that is able of conversation

mortal vortex
#

forWhom - using proper english in programming 😭

umbral ridge
#

CompletableFuture <3

#

cursive kite
#

Any idea why invisible players name tags are still showing?

#

Google says I need to put all players into a team and set seeFriendlyInvisible false

#

but seems like that setting would be default, why do i need a team?

drowsy helm
cursive kite
#

Nope it my plugin

#

I removed it - and it worked normally

#

but i have team.setCanSeeFriendlyInvisibles(false);

drowsy helm
#

send your code

cursive kite
#
            TeamTemplate template = rank.getTeamTemplate();

            for(String entry : template.getPlayers()) {
                User target = Server.getUser(entry, "FSB");
                if(target == null) continue;

                Team team = sBoard.registerNewTeam(rank.getOrderID() + (entry.length() > 6 ? entry.substring(0, entry.length() - 6) : entry));

                String relationColor = ChatHandler.getColor(user, FactionManager.getFaction(target));

                team.setPrefix(ChatColor.translateAlternateColorCodes('&', template.getPrefix()) + 
                        ChatColor.translateAlternateColorCodes('&', target.getNameTagPrefix()) + 
                        ChatColor.translateAlternateColorCodes('&', relationColor));

                team.setAllowFriendlyFire(true);
                team.setCanSeeFriendlyInvisibles(false);
                team.addEntry(entry);
            }
        }```
#

It's my old rank sorting method

#

removing this and it works normally

#

(besides needing an overhaul)

#

how can i quick fix this

torn shuttle
#

things are going well today

#

left a negative review on spigot too

#

I'd rate that a 7/10 on the crashout scale

#

this was because I asked for logs btw lol

timid berry
remote swallow
#

use a decompiler to check it got included in your jar

timid berry
#

its because

#

i kept maven jaring instead of mavn package

torn shuttle
#

are there any forum staff lurking

#

I got a minor problem

mortal vortex
#

yeah mate whats up

#

and if you've got a problem with minors id advise staying off the internet

stoic junco
#

is there a way to import a dependency even if there is not an API on maven or gradle?

umbral ridge
#

XD

#

someone said that word many times

#

and didnt get removed

sullen marlin
mortal vortex
#

its dyno flagging it

buoyant viper
#

TIL i guess

onyx fjord
#

for gradle its compileOnly files("path")

thorn isle
#

the copper golem ai is even worse than villagers

torn shuttle
#

I got a guy who keeps deleting his review of my plugin and posting again saying that I asked him to pay for support, and he keeps deleting it every time I call him out on it

#

(because I've never done that)

weak wasp
#

Gooners on the internet

thorn isle
#

send him a backdoored build as the "fix"

quaint mantle
buoyant viper
#

[in matter of taste]

radiant aspen
#

cuz in my experience people expect a lot more from the free plugins

weak wasp
#

I had a guy post on my profile that he was wondering if I could update a plugin to support 1.21.8. I test it on Spigot and Paper, everything works fine. I tell him this, he offers to Discord screen share so I can see the errors. A week later he finally does. There are some errors about calling my teleport function, I ask if there are any errors on startup, he says yes, restarts the server to show me, then magically there are no errors and the plugin works fine. Was conversing with him for a week and all he needed to do was restart the damn server.

#

Supporting plugins sucks...

#

Lucked out too, I haven't had to update that plugin in over 4 years, lost the source code, and like nothing can successfully decompile it.

thorn isle
#

this is why i don't release plugins publicly

#

i only ever released one, and that was deleted off spigot because i accidentally broke compatibility with spigot over paper

#

i probably should've raised a fuss and appealed for it to get restored since it had a lot of positive reviews, but i didn't bother

weak wasp
#

Yeah I wish they were just synonymous with each other.

#

Oh like a mod removed it?

thorn isle
#

god knows what happened precisely, i didn't really keep an eye on it

#

one day when i logged on after weeks of inactivity it was just gone

weak wasp
#

Hmmh

#

What did the plugin do?

thorn isle
#

it was an optimization plugin for villagers

weak wasp
#

Right on

#

Mine is a teleportation plugin. I overhauled it and made version 2, then somebody found out that if you had items floating down a stream in a very specific configuration items wouldn't teleport. I spent a day trying to fix it but nothing worked. I just gave up on it, I figured practically no one is going to do that with the plugin anyway.

#

Just amazes me how much people play around and stress test it.

thorn isle
#

production is the ultimate testing environment

weak wasp
#

For real.

#

I actually know a way to fix it, going back to the old system, but the old one wasn't 100% compatible with multiverse.

#

Had someone cry about it because I told him he also needed Multi-Verse Nether or something like that installed

pure dagger
#

how can i detect player catchingn a fish with a fishing rod, making sure its a new fish and not just a dropped item

pure dagger
#

i dont think that helps..

#

am i missing something?

slender elbow
#

you have access to the fished Item entity

#

and its ItemStack

pure dagger
#

yeah so how to tell apart if its a fish from water or just an itemstack

#

there's a bug in minecraft, you can do the fishing achievement by just fishing the itemstack

slender elbow
#

you can use the event and check the state

#

what you're describing sounds like would trigger caught_entity instead

analog ether
#

Hi, what would be the best way to store the identifier of a sound ?
Currently I'm using Sound.ENTITY_EXPERIENCE_ORB_PICKUP.getKey().getKey() but I'm having some issues with conversion where it seems sounds are now lowercase, where before they were uppercase, which are no longer recognized by NamespacedKey.fromString(); (and then Registry.SOUNDS.get(key))
Maybe I'm using the wrong APIs to serialize/deserialize sounds ?

pure dagger
#

oh

slender elbow
analog ether
pure dagger
#

can i detect if a potion was newly made and not put into brewing stand's bottom slots and taken back?

wet breach
#

in this instance you would only need to worry about the inventory event and whether or not a player moved something from their inventory to the brewing stand

#

however, this wouldn't work if someone else placed something and another comes and gets it I suppose so the better alternative is to record the time when it was brewed and if a player has taken anything

#

then you can easily tell if it has been messed with or not 🙂

pure dagger
#

uhm what

#

idont think that would work

wet breach
#

you can record data into blocks or chunks

pure dagger
#

oh

slender elbow
#

or just in the ItemStack itself tbh, put potion in brewing stand -> add pdc to potion, check pdc when retrieving item

wet breach
#

if pdc doesn't exist then its obviously not the same one

#

yeah that would work better I suppose

#

forget you can add stuff to the itemstacks

fickle spindle
#

how can i fully disable the shifting feature and how can i disable the inventory? because i tried this way but not working properly

    @EventHandler
    public void onPlayerToggleSneak(PlayerToggleSneakEvent event) {
        Player p = event.getPlayer();
        if (event.isSneaking()) {
            p.setSneaking(false);
        }
    }

    @EventHandler
    public void onInventoryOpen(InventoryOpenEvent event) {
        Player p = (Player) event.getPlayer();
            p.closeInventory();
            event.setCancelled(true);
    }```
worldly ingot
#

You kinda can't. Disabling the sneaking state on the server (as you're doing) won't affect anything visually on the client. Client still thinks it's sneaking when it's not, so you might just end up with some unexpected weirdness

#

And you can't stop the player from opening their own inventory either. Client doesn't tell the server about that

#

So congratulations. You've sought out to disable two features you're unable to disable exclusively from the server :p

wet breach
#

hence it no longer sends the open inventory packet

worldly ingot
#

It may just be the default inventory, yeah

umbral ridge
#

hey

#

can you somehow "halt" the AsyncPlayerPreLoginEvent until some stuff finishes?

wet breach
#

yes

#

depends on what stuff that needs to finish though

umbral ridge
#

like pulling the data from the db (async) but I want to:
load the data fully -> proceed with AsyncPlayerPreLoginEvent -> PlayerJoinEvent...

wet breach
#

while you can delay the login process for that, it is generally better to just have them wait in the lobby

#

you can only delay by like 30 seconds at most, and second you will induce players disconnect to reconnect if it takes too long. But you really don't need to halt anything, just let them in to a lobby until your stuff is done 🙂

#

it is a much better experience for the player this way

#

instead of looking at a loading screen

umbral ridge
#

you know, i was thinking of this feature; if a new player joins, ill let them explore the lobby, and there would be a button or something where theres a sign that says.. i've decided, i want to play here. becuase. i dont want bloatware data when player joins, plays for 5 minutes and exits.. or just joins and leaves after 15 seconds

wet breach
#

makes sense

umbral ridge
#

i still have to think this through carefully

wet breach
#

but I have always incorporated in servers I ran a temporary area where it had its own mini-games

#

while players waited

#

it is usually effective since they don't realize most of the time that the server was done loading like minutes ago 😛

#

and it even told them they could leave as well

umbral ridge
#

my servers are local and so is the db. im not worried about the latency, just when theres tons of players, i want to everything perform well and fast. i dont want errors and stuff, this is why i carefully design everything. i want things to work smooth, which is why im considering AsyncPlayerPreLoginEvent, because i dont want to load the data on PlayerJoinEvent, this is where already players have physically joined, i think its not great to do db requests on this event

pure dagger
wet breach
#

and if your DB is local this will all be quick anyways before they can most likely decide to do anything in the lobby

umbral ridge
#

yeah, good point. thanks

#

👌

#

have to think this through

#

just came from work and now i gotta work on this

wet breach
#

always fun

umbral ridge
#

yeah

#

its a personal project.. i dont know what i would do with my life if i didnt know how to code really... i hear people all the time, even my coworkers... i dont know what to do when im at home.. i watch tv.. im bored... and i just dont know what to say back to them

gentle inlet
#

I'm trying to make players not be able to interact with chests, buttons, doors, (just interactable blocks) but that would mean they also wouldn't be able to eat or throw pearls ect in the "claim". The only idea I've had is to just create a long list of the interactable blocks but I don't think thats the most efficient way to do it

young knoll
#

Event#setUseInteractedBlock

#

Only denies interaction with blocks, not items

gentle inlet
torn shuttle
#

I seem to be locked into some kind of duel

#

this guy keeps deleting his review and posting it again

remote swallow
#

prob wanna shoot an email over to

#

?support

undone axleBOT
torn shuttle
#

and reposts deletes it again and posts it again every time I call him out

#

I mean can I even report this?

remote swallow
#

the fact they keep deleting and reposting might be reportable

torn shuttle
#

I don't know that deleting your review every couple of hours to hide the dev's reply is against tos, he's been doing it for a couple of days now

#

keeps accusing me of different things too

remote swallow
#

might count as spam

torn shuttle
#

I did use the report user thing on the forums but no clue how that will pan out

tawny osprey
#

Is it okay to store an instance of the player as an instance variable or no

torn shuttle
#

not ideal

#

you usually want to use uuids

#

usually

tawny osprey
#

Gotcha thanks 🙂

hushed quartz
#

Im looking for a experienced scripter/dev to script me an economy system and probably a little bit more, I am willing to pay.
If you are interested please dm me.

rotund ravine
#

?services

undone axleBOT
patent adder
#

pure dagger
#

what is the difference... ?

if (!(inventory instanceof BrewerInventory brewerInventory)) return;
        if (inventory.getType() != InventoryType.BREWING) return;
        if (!(inventory.getHolder() instanceof BrewingStand brewingStand)) return;
pseudo hazel
#

probably not much

#

but it depends on why you need the brewing stuff

#

do you need the inventory? its easier to use instanceof since then you have a variable of the inventory

#

do you need the stand itself? its easier to use the holder

#

stuff like that

#

the inventory type check seems kinda useless

#

unless its the same thing as an anvil in which case it will never be a BrewingInventory

cerulean cave
#

looking for dev/tester for my smp for free please dm

eternal oxide
#

Looking for dev/tester to pay my rent. Will give exposure.

#

?services

undone axleBOT
alpine solar
#

coconut guy, what's up

alpine solar
jagged thicket
eternal oxide
#

Nope too much work

slender elbow
#

work?

#

no, thank you

pure dagger
#

how can i detect when a player puts something in an inventory

#

handle all of the cases, like dragging shidt clicking etc

slender elbow
#

InventoryClickEvent and InventoryDragEvent is all you need

pure dagger
#

yeah but do i have to compare inventory before and after or like

slender elbow
#

in the click event you have the clicktype and action, you can check that alongside the clicked slot or pressed hotbar number to determine the target inventory etc

pure dagger
#

check every scenerio which is complicated i think

slender elbow
#

in the drag event you'd need to check the inventory corresponding to the target slots in the inventoryview

#

well, there's no simple one-line check the server provides for you

pseudo hazel
#

isnt there also a move evebt

pure dagger
#

but...

pseudo hazel
#

for clicking hotkeys?

#

like swapping with the hotbar

slender elbow
#

that's just the click event

pseudo hazel
#

oh

slender elbow
#

the move event is for hoppers and droppers i think

pure dagger
slender elbow
#

¯_(ツ)_/¯

#

you can't cover every possible scenario without covering every possible scenario

pure dagger
#

cant i compare inventory before and after?

#

because i dont really care about anything else than just getting the contents of the slots

slender elbow
#

the event is called before the inventory is modified; you can get the contents after by waiting a tick, but then you can't cancel the event anymore, you have to cancel it right then and there

pure dagger
#

im not cancelling it

#

so i can do it

pseudo hazel
#

whats the purpose of what you are trying to do

slender elbow
#

i mean sure, if your goal is not to mutate the event, all you'd have to do is save the items in a list in the event, and then get the inventory a tick later to compare the saved items with the new ones; but yeah this feels very sketch idk, what do you need this for if not alter stuff in the event?

pure dagger
#

change the contents?

#

like add a pdc

pseudo hazel
#

change the contents just means change anything about the inventory

pure dagger
#

i dont know if that will solve my problem though

pseudo hazel
#

what is your problem

#

this is an xy problem for us right now so please enlighten us

pure dagger
#

i need to add distinguish player taking out newly brewed potions vs taking out potions they just put there

#

butt

#

this doesnt really solvem my problem i realized

pseudo hazel
#

what is your problem...

#

sounds like its more related to brewing than anything else

chrome beacon
#

xy

pure dagger
#

its for a "brew x potions" quest

#

i cant count the potions that were put there manually

pseudo hazel
#

isnt there like a brew event?

pure dagger
#

uhm

#

😭 wait

chrome beacon
#

There is

#

and a start event

pseudo hazel
#

this is why we have a command for xy problem

#

?xy

undone axleBOT
pseudo hazel
#

because you wanna solve issues that dont need solutions

pure dagger
#

oh there's a term for that

pseudo hazel
#

yeah haha

#

its pretty common dw

#

but now you know what we mean if we say xy problem

pure dagger
#

uhm but how does brewevent help me exacly

#

i can add the pdc

#

but later, should i take it away?

pseudo hazel
#

yeah I dont think the brew even us actually very useful for knowing which player is doing the brewing

pure dagger
#

yeah i dont care which player is brewing, just which one is taking it

pseudo hazel
#

the core issue here is how do you detect if a player has a brewed a potion

pure dagger
#

just not to count it when the potion was put there and not brewed

thorn isle
#

invert your problem and rather than having to detect whether it was put there, you detect whether it was brewn there

pseudo hazel
#

you can put pdc on the result items when the brew event is triggered

thorn isle
#

brewed

#

whatever the time form is

pseudo hazel
#

brewed

pure dagger
#

i could: add pdc "brewed" to potions on brew event, and then just idk try to remove every "brewed" pdc from every players inventory like every 5 seconds or whatever

thorn isle
#

i'd put the pdc data on the brewing stand rather than the items

pure dagger
#

but it wouldnt work because 5 seconds is too much

pseudo hazel
#

just check when the player is moving an item from the result slot

#

check if the item has the brewed tag, sound the alarm, and remove the tag

pure dagger
#

with which event

pseudo hazel
#

that goes back around to what emily was saying

#

drag and click events

#

so your initial questikn was partially right

pure dagger
#

yeah.. i tried to detect these things once. it was so complicated that i didnt do that

weak wasp
#

You could add the pdc on brew event then just remove it when the player removes the item

thorn isle
#

i don't like the prospects of putting the tags on the items themselves, since if you miss something and don't end up removing the tag, you now have funny items in circulation with tags on them that can proc odd behavior

thorn isle
#

i'd rather put the data on the brewing stand, like an int set of slots which have "brewed" potions in them

pseudo hazel
#

puttin it on the stand maybe

#

thats not a bad idea

thorn isle
#

when one of them is taken out, remove the int from the set and increment quest progress

pseudo hazel
#

but youd have to do the same checks anyways to remove the data accordingly

thorn isle
#

well yes but now the data is confined to the brewing stand

#

which won't go into circulation and do funny business

pseudo hazel
#

yeah

#

but its not that hard

#

you just check if the player clicks on a brewed potion

pure dagger
thorn isle
#

i'd probably just store a clone of the potion in a slot -> stack mapping on the brewing stand, and after every inventory interaction, check whether the slot and the mapping still match

#

if they don't, the item was replaced

#

i.e. taken out and something else, possibly air, was put in its place

#

and then use the int set to determine whether to dispense rewards

pure dagger
#

does inventory.getItem or dropping the item make a clone ?

thorn isle
#

inventory getitem is a view iirc

pseudo hazel
#

i dont think so

thorn isle
#

dropitem, dunno

tawny osprey
#

Do you want to usually put your listeners all in one class or no

pseudo hazel
#

depends

#

I have one listener but its all delegating the functions to other parts of the plugin

#

but I think it highly depends on your setup

alpine solar
#

Might as well do it directly in your main class

#

😭

pseudo hazel
#

who said I didnt?

worldly ingot
pure dagger
#

what is

#

a mirror

worldly ingot
#

See parenthesis

pure dagger
#

yeah but what is this phrase

#

to make a mirror

#

is it just assigning place in memory to another variable

worldly ingot
#

e.g.

ItemStack itemStack = inventory.getItem(0);
itemStack.setType(Material.STONE);
inventory.setItem(0, itemStack); // This is not necessary for a mirror
#

The ItemStack is backed directly by the NMS ItemStack

#

I do wish this were more explicitly described somewhere what is and is not returned by which methods, because some return mirrors, some return clones, and some return instances

#

Although my real opinion is that all ItemStacks should be backed by NMS methods and that ItemStack should be an interface, but that's for another day

#

To know which is returned, you have to look at CraftBukkit and see if it returns CraftItemStack.asCraftMirror(), #asCraftCopy() or #asNMSCopy()

pure dagger
#

difference between an instance nad a mirror??

worldly ingot
#

Just not a clone

#
private ItemStack itemStack;

public ItemStack getItemStack() {
    return itemStack;
}
#

It's still mutable. Some events do this (when they really shouldn't lol)

thorn isle
#

returning the instance means that the instance is returned, i.e. you now have a pointer to the same object as what's held in some event's field for example

#

returning a mirror/view means you get a potentially new instance, but it wraps the backing instance, typically a nms stack (as you can't return nms stacks in the api, they need to get wrapped)

#

in practice there usually isn't much difference between them, but there have historically been some inconsistencies in how the CraftItemStack handles some mutating operations

#

e.g. it used to be that setting the amount of a craftstack to 0, or its type to air, would just drop the reference to the wrapped nms stack, rather than modify the backing nms stack; while doing other modifications would be reflected in the nms stack correctly

#

a common source of dupes in plugins, as "deleting" the item through the view didn't delete the backing item

worldly ingot
#

CraftBukkit does all three, is inconsistent about it, and does not document/standardize it in any capacity 🙃 The beauty of a 16 year old codebase

alpine solar
#

wait

#

oh, inventory starts from 0

#

I forgor

echo basalt
#

Mirroring has the same mutability as the instance but as a separate, different instance

#

== will fail but modifying the mirror wrapper will modify the nms instnace

lean pumice
#

there is a page that show all the structure of all the version of the resoucepack?

torn shuttle
#

perfect? no. better than what we had? definitely

thorn isle
#

the only part of that that i like is the quest details window, the rest honestly looks kind of crummy

#

but the quest details window does look good

torn shuttle
#

it's the only one that's been finalized in the native format

thorn isle
#

the rest would probably start looking good too with some custom bitmap font nonsense

torn shuttle
#

everything else was just throw together

#

this is a massive hack of the fact these menus show the same info on books, chest menus and now dialogs

thorn isle
#

we already render gui windows with font nonsense just from the container title, i'm sure we can do the same and better in dialogs

torn shuttle
#

which I will be honest have nothing in common in terms of display capabilities and limitations lol

#

once I can drop support for older versions I'll also be able to make it better

thorn isle
#

mmyeah

#

i'm quite looking forward to dialogs getting enough adoption for me to start messing with "gui" textures for them

torn shuttle
#

I just made a lib to deal with it

#

by which I mean I had ai do 90% and then fixed 60%

#

it's just json at the end of the day

eternal oxide
#

Magma diligently training his replacement

torn shuttle
#

already trained on my github code anyhow

eternal oxide
#

The next step is to turn us all into batteries, or food.

thorn isle
#

the matrix IP originally had the machines using human brains as biological computers/neural networks rather than as "batteries" which actually makes a lot of sense, but it was dumbed down for the movies because they figured it would go over peoples' heads

torn shuttle
#

honestly for a while I assumed the former not the latter about the matrix

#

though the irony that the concept would be too complex for people to grasp when the concept is exploiting's people brain power is not lost on me

strong sable
#

im trying to add bstats

hazy parrot
#

That Metrics class is not available during runtime

young knoll
#

Make sure you’re shading it

desert aspen
#

how could i make a neutral mob always hostile?

young knoll
#

depends on the mob

#

For some you can simply set them to be angry

#

Others are more complicated and need a target

#

Alternatively you just disguise a regular hostile mob as whatever you want

alpine solar
#

ze pathfinding

real iris
#

HELLO I AM QUIN I AM CONSIDERING STARTING A HAZBIN HOTEL THEMED Minecraft server with my friend I am not the owner currently we are looking for a coder to help us add some code to the server unfortunately at the time we can’t pay but would be very grateful if someone could lend a hand

young knoll
#

?services

undone axleBOT
real iris
torn shuttle
#

hey just double checking because I am somehow getting multiple requests for it, but there isn't a way to tag a zone as being a specific, custom structure via the api right

#

using mc data, of course, not wanting to store this in my own structure

drowsy helm
#

I might be wrong tho

torn shuttle
#

it's like an arbitrary amount of blocks would be in a "zone"

drowsy helm
#

They as in chunks

#

I dont think blocks do though

potent plover
#

como enlazo mi discord cuenta a spigot en la pagina?

pseudo hazel
#

english only please

thorn isle
#

what do you need written

oblique timber
#

I have a source code, how can I convert it into a jar?

pseudo hazel
#

usually using an IDE

#

or gradle commands or whatever

slender elbow
#

javac gang rise up

oblique timber
thorn isle
#

do you have a build script also or only the source code

thorn isle
#

look for a pom.xml or some .kts files

pseudo hazel
#

maybe ask gpt to also generate the build scripts

#

but I would recommend using an IDE like Intellij

#

its decently easy to get into

#

and with the mc dev plugin you can just make a plugin project that compiles by pressing a button

oblique timber
#

carbon-api
carbon-server
pm.xml

#

these files exist

thorn isle
#

neither of those is really going to help you hunt down the dependencies for some uber nms project that depends on 25 protection plugins including worldguard and some fucknuggetshieldstones that was taken down off github in 2014

#

it's a maven project, then

#

build it with maven

#

install maven from wherever and then cd into the directory with the pom.xml and run mvn clean package

oblique timber
#

maven or intelijidea?

thorn isle
#

intellij comes with its bundled in maven install iirc

oblique timber
#

ok 1min

#

im downloading maven

#

apache maven?

thorn isle
#

the next step is to pray that the build script actually works and the repositories it references are still up

#

and that there aren't like 50 system scope resources of random nms jars

oblique timber
#

where will i install maven?

thorn isle
#

doesn't matter, as long as you can run it

onyx fjord
#

is PlayerInputEvent backwards compatible?

slender elbow
#

the event is not going to work on server versions it did not exist in

#

i have no clue what you're trying to ask exactly

onyx fjord
#

yeah mb 🤦‍♂️

oblique timber
#

cannot run the current file: the editor is not in focus

thorn isle
#

send the entire error and what you're trying to do

#

by the sounds of it you probably installed intellij and are trying to click some button that runs some file

#

which isn't really what you want to do

#

did you run into some issue with running mvn clean package?

oblique timber
#

I'm using intelijidea for the first time, I dragged the src directly.

#

i downloaded maven.

chrome beacon
#

Intellij already comes with maven so we're not worried about that

#

Could you show us your project structure

#

And also what are you trying to do

oblique timber
chrome beacon
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

thorn isle
#

do we have a way in the api to force a player to reel in their fishing rod

oblique timber
thorn isle
#

don't drag anything anywhere

#

open your command prompt and cd into the directory the pom.xml is in

#

then run mvn clean package

oblique timber
oblique timber
thorn isle
#

alternatively, click that m on the right sidebar

oblique timber
#

mvn : The term 'mvn' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:1

  • mvn clean package
  •   + CategoryInfo          : ObjectNotFound: (mvn:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
thorn isle
#

you didn't install maven

thorn isle
chrome beacon
#

Need to use Intellij to run maven for you ^^

#

Since it's not on the path

#

(Or add it to the path)

oblique timber
thorn isle
#

either add it to the path or run it through the ide

chrome beacon
#

^^

oblique timber
#

will I do it from here

thorn isle
#

yes

#

expand Lifecycle and you will find "package" under it

#

doubleclick package

oblique timber
#

dude, what am I going to do now?

jagged thicket