#help-development

1 messages Ā· Page 877 of 1

tender shard
#

🚰

upper hazel
#

what is the name of that site for creating lines for publishing a maven repository on the Internet

tender shard
#

for creating lines?

upper hazel
#

expressed himself figuratively

#

associated with github and releases

tender shard
#

do you mean jitpack?

upper hazel
#

yes

fallow gyro
#

Hi there! Just wondering, is there a way to check if an inventoryCloseEvent was triggered by a player or my plugin itself?

For example, check whether the player pressed "e" or escape to close the inventory, or whether I did player.closeInventory()?

Thanks!

chrome beacon
#

Why do you need to check that?

fallow gyro
fallow gyro
# chrome beacon Why do you need to check that?

I'm working on a gui plugin, and I'd like to be able to clear a hashmap containing the player's open guis when the inventory closes, but only if it was triggered by a player. I need to open and close the inventory with my plugin in order to refresh the display name for the gui.

chrome beacon
#

You don't need to call closeInventory if you want to update the title

#

Just can just open the new inventory directly or if you're on a modern version you can set the title of the inventory

raw epoch
#

hello everyone !

Doses anyone know a way to avoid collisiond between entity and player ? Here is a footage of my problem : https://imgur.com/a/00kKHm2, i teleport a mini slime every tick on a player but collisions anoy player movement :/

Setcollision# isn't working with me (1.20.4) :/

fallow gyro
chrome beacon
#

ah yeah read the javadoc comment

#

It tells you what to do with player collisions

slate tinsel
#

Hi, does anyone know why all my yml files from my resources folder disappear when I add this code.

The icon for my plugin.yml is no longer a spigot icon anymore

        <resources>
            <!-- Include all resources -->
            <resource>
                <directory>resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>*.yml</include>
                    <include>*.txt</include>
                    <include>*.json</include>
                </includes>
            </resource>

            <resource>
                <directory>resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>*.nbt</include>
                </includes>
            </resource>
        </resources>
#

normal icon:

eternal oxide
#

probably a different location of yoru resources folder

#

? you mean the plugin.yml is there but a different icon or what?

slate tinsel
#

When I add the code and reload maven, the spigot icon disappears and becomes a normal yml icon

slate tinsel
#

Thanks šŸ™‚

tender shard
fervent robin
#

Why do all my commits show under someone elses name?

eternal oxide
#

You no longer exist. You are a figment of OKTESTA imagination

fervent robin
#

nah but fr tho idk who tf OKTESTA is but all my commits from intellij show up like they did it

river oracle
tender shard
golden turret
#

shouldnt it return true?

tender shard
#

so I guess it's Orientable

golden turret
#

but it looks like both are CraftRotatable

tender shard
#

where do you see that?

#

ah found it

golden turret
#

nice naming

tender shard
#

yeah and then there's also this kek

#

this is kinda confusing

golden turret
#

yea

restive mango
#

What is the collision points for a falling block?

#

Like where is collision checked?

#

The middle points of the six faces?

#

The corners?

#

Where could I find that information?

chrome beacon
#

It has a hitbox

#

just like any other entity

restive mango
#

Yeah but

#

What is the hit box lol

#

Is there a way to get its vertices?

#

@chrome beacon

chrome beacon
restive mango
#

Thanks

agile hollow
#

how can i gave a suffix / prefix to an user?

eternal oxide
#

Teams, or a permission plugin + Vault and a chat manager

agile hollow
inner mulch
#

Scoreboard teams

#

Thats the vanilla way

#

No other plugins needed

#

Jsut spigot

agile hollow
#

thx

wintry lynx
#

Anyone here good with datapacks?

rotund ravine
#

Prolly not

wintry lynx
#

Im trying to detect when a player is in a structure, and that structure is below the world surface.

wintry lynx
#

Id be nice to be able to check the structure part a player is in as that would solve it easy but NMS is a pain and doesnt really like to work

fervent robin
#

I feel like there is but i just dont know it

sullen marlin
#

what in the

hazy parrot
#

That is really wrong way

fervent robin
#

Yeah i can imagine

#

Whats the best way to do it?

hazy parrot
#

Why are u opening sign gui asynchronously?

#

In the first place

fervent robin
#

All im trying to do is wait for something to be written on the sign and then returning that value

young knoll
#

Sounds like pain

fervent robin
tender shard
#

what is that for D;

gleaming grove
#

I have this issue that some of my itemdisplays, armorstands are not removed when server is closing. So I wounder if it is possible to force Bukkit to create Entity but not save its data to world file?

hazy parrot
#

Why are u using countdown latch in first place

young knoll
#

yes

hazy parrot
#

Using it with value 1 seems like misusing in any scenario

#

Isn't there any sign event that u can listen to when open sign?

fervent robin
#

nvm i thought of a better way

gleaming grove
young knoll
#

yes

gleaming grove
#

ok thx

fervent robin
slate tinsel
#

If I'm going to take an nbt file and spawn in all the blocks as display blocks, is there an easy way to do it or do I have to get every value from the file for example coords, block type, direction, water logged etc.?

chrome beacon
#

You'll probably have to parse it yourself

fallow gyro
#

Hi, does anyone know if there is a way to not run the inventoryCloseEvent when my plugin runs inventory open while already having another inventory open?

hushed scaffold
fallow gyro
# hushed scaffold ik this doesnt help much but whats the point of doing that ? you cant have 2 in...

Sorry should have clarified.

My plugin allows the use of inventories for Guis.

I've set it up so that you can use "linkers", which are items within the gui which when clicked, take you to another gui. When one of these items is clicked, the current gui the player is on gets stored into a stack, and then the player is able to click a "back" button, which accesses the top gui on the stack to display to the player and removes it.

I'm also utilising the InventoryCloseEvent so that, when the player presses "e" or escape from within the gui, the stack containing their current open gui and all of their previous guis is removed from the HashMap where it is contained to free memory and allow for a new gui to be opened down the line.

With this, though, when the player clicked on a "linker" item, I'm building a new gui object, and then opening that gui to display to the player. When this method is called, it not only closes the player's currently opened gui before opening the new one, but also calls the InventoryCloseEvent, which removes both their new gui and their previous guis from the HashMap.

I need a way to differentiate between the player manually closing the gui, vs the player clicking on a linker or other item.

worthy girder
#

Heya, How can you make a staff chat sync with all your bungee servers?

If there is a specific plugin for it then link it here please and thank you

halcyon hemlock
fallow gyro
# halcyon hemlock why do you reset the hashmap on closing of inventory?

Well, thinking about it its probably possible to just leave the hashmap populated and instead clear it when the player tries to open a new gui, but this feels sort of.. Gross I guess? It would mean the hashmap containing the player's guis would stay populated even when the player is not using any of the plugin's features. I was hoping there might be a way to cancel firing the InventoryCloseEvent listener, but if this isn't possible then I guess that will be the only other thing which would make sense. I don't fancy messing with any boolean values to check whether the player clicked a linker or not as that would make adding any new button link types more messy in future.

halcyon hemlock
#

A dirty fix could be to reset the hashmap after a tick, after a tick check if a new inventory opened perhaps?

fallow gyro
halcyon hemlock
#

there shouldn't be a need to clear the hashmap. if you need to, you could put a max linked items limit to 10 and pop from behind

fallow gyro
valid burrow
#

Is there a way to check if a players arms are slim

young knoll
valid burrow
#

thx

tender shard
#

Players with slim arms shouldn’t be able to carry anvils

#

Should be a vanilla feature

remote swallow
#

alex

#

how do i make this kotlin from groovy

jar {
    manifest {
        attributes 'Main-Class': 'sh.miles.restapi.Main'
    }
}
#

i did it

quaint mantle
#

hi guys

river oracle
#

I'm banning you

remote swallow
#

its pineapple related

quaint mantle
#
public final class CompatibilityArmorApi {

    public static void initialize(@NotNull Plugin plugin) {
        Preconditions.checkArgument(plugin != null, "Parameter plugin can not be null.");

        Bukkit.getPluginManager().registerEvents(new CompatibilityArmorListener(), plugin);
    }

    private CompatibilityArmorApi() {
        throw new UnsupportedOperationException("Class CompatibilityArmorApi can not be instantiated.");
    }

}

Is this good or bad, it's just a simple armor event provider for 1.8 but i want a nice way to register all the needed classes

#

in the initialize method there's prob gonna be more

#

stuff

echo basalt
#

think3d having a weird issue with mongo right now

#

I have 2 classes, they're pretty much 1:1 except they store different data, each with their own codec

#

One saves and loads data fine

#

The other "saves" but can't find any data when loading

river oracle
#

just do a tutorial on how to register the event

quaint mantle
#

nah more is gonna happen

#

idek why I did that lmfao

#

ima make the actual api before i provide it

river oracle
#

then I don't like your approach

#

initialize is way too long to type

#

it should be init

#

I don't have all day

river oracle
echo basalt
#

sumn like this

quaint mantle
#

oh alr

remote swallow
quaint mantle
#

im not writting out that class name btw

river oracle
quaint mantle
#

and I don't rly like that package

remote swallow
river oracle
#

PineappleNMS is lurking in chat and it is overjoyed you agreed

quaint mantle
#

id prob just make it final and private constructor all that

echo basalt
#

why is my mongo code not working

river oracle
echo basalt
#

it's literally just a copypaste with a different codec

river oracle
echo basalt
#

AcknowledgedUpdateResult{matchedCount=0, modifiedCount=0, upsertedId=BsonObjectId{value=65b8328b41dde8ecd227c25a}}

#

modifiedCount=0

#

o_o

river oracle
#

that modifiedCount=0 hit hard

#

I'm so sorry for your loss

echo basalt
#

might be because the data is 1:1

#

as I'm like

#

running the same commands

river oracle
#

oh fair slay

echo basalt
#

nope still 0

river oracle
#

okay not slay

#

time to dig in the database queries

quaint mantle
#

is it bad ive never learned how to use sql

#

or any db other than local files

echo basalt
#

oh im idiot

river oracle
echo basalt
#

I think I know why

river oracle
echo basalt
#

I need to actually encode my id instead of just expecting it to work as a key

river oracle
#

I don't think I touched DBs until like a year or so into java

echo basalt
#

unless..

quaint mantle
river oracle
#

sometimes though you gotta go raw on the SQL so you gotta know how to write some SQL

echo basalt
#

mm that was not the solution

#

it's still not working

#

wt

young knoll
#

Wow does raven only support nosql

#

booo

river oracle
young knoll
#

smh

river oracle
# young knoll smh

It's Json schema so its gonna def lend well to BSON vs Relational Tables

echo basalt
#

I think I found the problem

#

my "solution" was pretty dumb and would only set the correct ID if it could fetch data..

#

which never happened because there was never a correct ID

#

yipee that worked

quaint mantle
#

bruh

#

is it just 1.8 or are creative mode inventories messed up

hazy parrot
#

creative inventories are messed up

wintry lynx
#

How does one lookup a structure by name

#

i used this as a test but now i need to insert a custom structure

worldly ingot
#

Registry.STRUCTURE

#

You can get values by key there

#

No guarantee that custom structures will work (assuming you mean via a data pack), but they should be okay? I think? lol

young knoll
#

As long as they are spawned properly it should work fine

river oracle
#

once your items get put in who knows where the fuck they go lol

slender elbow
#

the client :^) and that's where it ends lmao

river oracle
#

they might end up there

slender elbow
#

I mean, the client does have full control over the inventory when in creative

#

or, make that 99%

#

it's not uncommon for "creative" servers that are just survival + flight enabled + invulnerability + infinite items and some sort of "pick items from here" kinda menu, but that's still controlled by the server

#

actually idfk if it's uncommon or not, I just made that part up

#

but I've seen at least 2

wintry lynx
#

Like minecraft:dungeon

worldly ingot
#

Yeah, it accepts a NamespacedKey so you'll need to pass the id of that structure

#

NamespacedKey.minecraft("dungeon") will do that for you cleanly

wintry lynx
#

ok thanks a ton. ill see if it works

fervent robin
#

Whats the best way for a player to input multiple commands to my plugin? (ex Opening up a sign gui for them to write, in chat (cancel the chat msg), etc)

wintry lynx
young knoll
#

NamespacedKey.fromString(ā€œpeepee:dungeonā€)

wintry lynx
#

oh

worldly ingot
#

You can also use the constructor NamespacedKey(String, String), which should really be undeprecated

wintry lynx
#

I did it lol

young knoll
#

Do it

wintry lynx
#

Do'd it

young knoll
#

Actually iirc it’s internal not deprecated

worldly ingot
#

It's deprecated

#

Unless that was changed recently

young knoll
#

Not on the javadocs

#

@Internal
public NamespacedKey(@NotNull
String namespace,
@NotNull
String key)
Create a key in a specific namespace.
Parameters:
namespace - namespace
key - key
API Note:
should never be used by plugins, for internal use only!!

worldly ingot
#

It was deprecated though

young knoll
#

Now drop the internal and api note

#

:p

#

I’ve been hacking it with fromString for a while, sue me

worldly ingot
#

@Deprecated -> @ApiStatus.Internal for NamespacedKey(String, String)

late sonnet
quaint mantle
#

guys

#

Thoughts on Microsoft edge?

#

it looks rly clean to me and I've been using chrome my whole life

ornate heart
#

the only thing it’s good for is playing edge surf

worthy yarrow
#

Hey there, anyone have some experience with towny/siegewar/squaremap api? I've got an issue I'm working on currently related to map icon additions when it comes to town sieges and what not

short pilot
#

Can anyone help me implement this

You enter faction claimed territory -> title on your screen pops up saying entering (name)
On exit it'll say "wilderness"
I am not sure which events to use, and how to not trigger this every time you walk in territory

worthy yarrow
#

onPlayerMoveEvent and check their location, although could add a task timer to make it so it doesn't spam the broadcast to the player @short pilot

river oracle
# quaint mantle Thoughts on Microsoft edge?

I don't like it it's not a very privacy focused browser (obviously it's owned by microsoft) the AI integration in everything now is annoying. I prefer my classic browsing experience I just use librewolf which is a Firefox settings pack basically

worthy yarrow
#

Hey there @river oracle! How are you doing?

river oracle
#

good

worthy yarrow
#

Good to hear, got a minute to help with some squaremap/towny/siegewar api issues?

river oracle
#

no

#

there is a reason I didn't answer

quaint mantle
#

Lol

worthy yarrow
#

Haha no worries, that's why I thought I'd ask

quaint mantle
#

I also wanted to know your opinions on the @Contract annotation

river oracle
#

e.g. if my method returns an object and is annotated with @desert birchable or returns an Optional the contract is pretty clear

#

generally I wouldn't bother with it.

quaint mantle
#

Honestly idk why it's not just specified in the docs

river oracle
#

the javadocs don't do this

#

I'll give an example

quaint mantle
#

are you talking about like

#

Warnings

#

I've used like

@Contract("null -> false")

Or smthing

#

And if I don't follow the contract it gives me a warning

river oracle
#
@Contract("null -> false")
public boolean someMethod(@Nullable Object object) {
  if (object == null) {
    return false;
  }

  // run logiuc
  return true;
}
river oracle
#

my IDE would warn me saying hey this method will always return false if I do something like this

#
if (someObject.someMethod(null)) {
  // some logic
}
quaint mantle
#

Oh I see

river oracle
#

Here is a helpful stack overflow post to explain it

#

generally though you don't need this annotation

short pilot
quaint mantle
#

Well

#

use the event methods

#

there's a before and after location

#

if the before faction is not the after faction, you walked into a new territory

wet breach
#

Assuming you like annotations or allow your ide to interpret them.

river oracle
#

I generally don't like them

wet breach
#

I dont either. In fact annotations causes my stuff to run slower when my ide is processing a project lol

river oracle
#

I do use @NotNull and @Nullable, but that's just for lazy documentation usually

river oracle
quaint mantle
#

Have you see how command api does it

wet breach
#

I typically dont design my stuff around null as much as possible

river oracle
wet breach
#

There is barely any reason to return null

quaint mantle
#

what do you returb

#

Optional?

#

cause I can't always find a reason to return an object

wet breach
#

No i hate optionals

quaint mantle
#

The basically represents a null state

river oracle
#

just don't make the situation where a null can occur possible its called thoughtful design

#

its difficult but very helpful

#

and ofc null can't always be avoided its somewhat of an inevitability in some places

wet breach
#

^

river oracle
#

When it comes to minecraft Items in my API's while Bukkit returns null for empty slots I tend to just return an Air ItemStack as you can always edit it to change its type etc

wet breach
#

If you are making an api you are in control of what can or cant be returned. An empty object is still better then null

slender elbow
#

null is useful when the language's type system allows it to be useful

#

java is not such case

#

:')

river oracle
#

I wouldn't mind if java had Optionals with actual depth tbh they can be useful when dealing with database calls etc

#

we just have the Null wrapper implementation

wet breach
#

I think queries is probably the only place i found optionals to be useful

river oracle
#

in my registries though I always provide getOrNull

#

I should probably change to just getOrFail tbh

worldly ingot
#

emily = null

wet breach
#

Lol

slender elbow
#

w0w

#

Optional<Choco> = EMPTY

#

HUH

worldly ingot
#

mfw that won't compile

#

weirdo

slender elbow
#

yeah you don't

worldly ingot
#

touchƩ

worthy yarrow
#

So you just gotta check for who owns the before / after location

#

if null -> its wilderness

dry forum
#

does anyone know if its possible to simulate a firework in a program?

drowsy helm
dry forum
#

yeah

drowsy helm
#

afaik theres nothing out there for that, but its definitely possible if you want to make it

dry forum
#

im just not 100% sure where to start

drowsy helm
#

why cant you just use minecraft itself to preview it

dry forum
#

because im trying to make the preview in an application

drowsy helm
#

you'd have to reverse engineer the minecraft one, thats a pretty broad question

dry forum
#

ah alright then

wet breach
#

Its really not that hard if you know what all the material stuff makes etc

#

There is only handful of options

#

And then fuse time length

#

You can even make your own graphics for it. Doesnt have to exactly look like mc as people know what a firework is lol

orchid brook
#

Hi if i want to make a gui where my player will be able to put items only in 3 row, Do I have to fill the other slots of the last 3 lines or is there a way to keep the last 3 lines empty and cancel interaction if they put item / drag item

eternal oxide
#

Lots of monitoring in teh InventoryClickEvent anf Drag event

orchid brook
#

yeah so it's better to just fills with item and them with itemadder put a transparent texture

wintry lynx
#

`CraftChunk chunk = (CraftChunk) w.getChunkAt(loc);
Map<Structure, StructureStart> structures = chunk.getHandle(ChunkStatus.l).g();

Map<Structure, LongSet> f = chunk.getHandle(ChunkStatus.f).h();
Map.Entry<Structure, LongSet> entryF = f.entrySet().iterator().next();
Structure struct = entryF.getKey();`

Anyone know how to fetch a custom structure from this list. Its known as a 'Jigsaw Structure' but Im not sure how to snatch that from the list or if I use a namespace... Or really anything

eternal oxide
#

Why are you not using teh StructureManager?

wintry lynx
#

uhhh...

#

The what?

eternal oxide
#

ah you are looking for already placed structures

wintry lynx
#

Yea. Im trying to find its place of origin

#

more accurately the center since that is where it generates from

tender shard
#

if a CompletableFuture has already completed, and then I call whenComplete { _, _ -> doSomething() }, does doSomething() still run? Or do I have to "register" my whenComplete before it completes?

tender shard
#

seems like it also works for already completed futures

subtle tapir
#

Interesting concept.

#

Looking at the JDK source code this is exactly what should have happend. Cool!

tender shard
echo basalt
#

I'd argue for thenRun in your case but whenComplete also fires in an exceptional state

peak depot
#

Hey, how would I go about making a replay system like would I need to store every action the player took and then apply to an npc or what is the basic concept for that system

echo basalt
#

Pretty sure hypixel as a dev blog on that

#

Basically you need to record all sorts of data every tick

#

And then recreate that data

#

So for example you store the starting "map" and the starting state of every entity

#

And then when a player places a block, you log what tick that was, what player and what block

#

If an entity state changes (they catch on fire or something), you have to log the previous state and the new state, along with the entity ID

#

You also need to log certain packets

quaint mantle
#

How much storage is a bw game

echo basalt
#

Like 100kb

tall dragon
#

a bw game is not a known unit of measurement

minor junco
ivory sleet
#

lol

echo basalt
#

Yo conc

ivory sleet
#

hlw

echo basalt
#

I updated the basics post

ivory sleet
#

Nice

echo basalt
#

The good habits

#

Has examples for SOLID now

ivory sleet
echo basalt
ivory sleet
minor junco
echo basalt
#

Writing the internals for it is hell though

#

I have a dead replay system project

minor junco
#

Understandable... Why it's dead cause it's a lot of just work you have to do

echo basalt
#

I have other things to do

#

my current job is writing a tycoon game

#

and my side projects are this massive skyblock core and this minigame instancing thing

#

?cba

undone axleBOT
#

illusion_dev definitely regrets to for the most part inform you that unfortunately, they essentially are unable to definitely assist with definitely your enquiry, which essentially is fairly significant. Please simply really ask again later or possibly kind of ask someone else about this enquiry, demonstrating that the person that ran this command generally regrets to kind of inform you that unfortunately, they for the most part are unable to generally assist with actually your enquiry in a subtle way. Thank you very sort of much for kind of your time and the person that ran this command specifically wishes you a really good day, so the person that ran this command really regrets to actually inform you that unfortunately, they literally are unable to definitely assist with very your enquiry, or so they particularly thought.

proper cosmos
#

How can I send TextComponent to player?

#
player.spigot().sendMessage(text);
#

like this?

chrome beacon
#

yes

valid burrow
#

yes

tender shard
#

really?

obsidian drift
#

Can you send plugin messages to bungee asynchronously?

chrome beacon
#

Probably

#

Try it and see

eternal oxide
#

yes

#

not really a lot of point though

quaint mantle
#

hi elgarl

eternal oxide
#

hi

quaint mantle
#

i have a question for u

#

im getting online player names and set my arraylist and i set this arraylist to playercustomtabcomplater

#

will there be a problem if i do this for all players on a server with 200 to 300 people?

eternal oxide
#

yes

quaint mantle
#

what do u prefer ?

#

1m i will send my code

#
    List<String> arrayList = new ArrayList<>();

    @EventHandler
    public void test(PlayerJoinEvent e) {
        arrayList.add("@" + e.getPlayer().getDisplayName());
        for (Player player : Bukkit.getServer().getOnlinePlayers()) {
            player.setCustomChatCompletions(arrayList);
        }
    }

    @EventHandler
    public void test1(PlayerQuitEvent e) {
        arrayList.remove("@" + e.getPlayer().getDisplayName());
        for (Player player : Bukkit.getServer().getOnlinePlayers()) {
            player.setCustomChatCompletions(arrayList);
        }
    }
    @EventHandler
    public void test2(AsyncPlayerChatEvent e) {
        String message = e.getMessage();

        for (String players : arrayList) {
            if (message.contains(players)) {
                String playerName = players.substring(1);
                Player player = Bukkit.getPlayer(playerName);

                if (player != null) {
                    if (player == e.getPlayer()) return;
                    player.playSound(player.getLocation(), Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1,1);
                }

                break;
            }
        }
    }```
eternal oxide
#

why are you doing all that?

#

to play a noise for the player who is mentioned?

quaint mantle
#

i wanna do this on my server

#

but

#

wait

#

If they type @ and press tab, I want their names to appear.

eternal oxide
#

thats not what your code does

quaint mantle
#

why

#

i mean wdym

eternal oxide
#

your code is wrong in a couple of ways. First you use teh Display name which will not always be the players name

#

um

#

are you tryign to offer an auto completion in typed chat?

quaint mantle
#

yes

eternal oxide
#

the PlayerChatTabCompleteEvent no longer exists

#

well, no longer fires

quaint mantle
#

yes there is a method instead

#

player.setCustomChatCompletions

eternal oxide
#

I see

#

it looks like your code should work then

#

except for if other players join

quaint mantle
#

yes my code work good

#

just what i'm wondering

eternal oxide
#

if other players join your code doesn;t update players who are already online

#

it should push to all Bukkit.getOnlinePlayers()

quaint mantle
#

Does using the setCustomChatCompletions method for 200 to 300 player at the same time cause any problems?

eternal oxide
#

oh you do. My reading is so bad today

#

no, only where you loop over it in every chat message

#

sending that size to the client will not be an issue

#

Nah, it probably won;t be an issue looping for every message.

#

200 is not a lot, and chat is not often that crazy

quaint mantle
#

But when any player comes from the server or quit
200 player's setCustomChatCompletions will change

eternal oxide
#

yes

quaint mantle
#

That is, if 10 to 20 people enter and leave the server every minute.

#

It's okay though, I get it.

#

ty

rare rover
#

does anyone know why this is skipping the first index? I've literally been stuck on this for a day.

#
        @Suppress("UNCHECKED_CAST")
        fun <T : Data> deserializeWithoutData(clazz: KClass<*>, statement: PreparedStatement): T {
            val resultSet = statement.executeQuery()
            val instance = clazz.createInstance() as T

            val properties =
                clazz.declaredMemberProperties.sortedBy {
                    it.findAnnotation<PropertyOrder>()?.order ?: Int.MAX_VALUE
                }

            for ((index, property) in properties.withIndex()) {
                val type = property.returnType

                val mutableProperty = (property as? KMutableProperty<*>) ?: continue
                val setValue: (Any) -> Unit = {
                    mutableProperty.setter.call(instance, it)
                    println("${mutableProperty.name} // $it // ${index}")
                }

                when (type.classifier) {
                    String::class -> setValue(resultSet.getString(index + 1))
                    Int::class -> setValue(resultSet.getInt(index + 1))
                    Long::class -> setValue(resultSet.getLong(index + 1))
                    Double::class -> setValue(resultSet.getDouble(index + 1))
                    Float::class -> setValue(resultSet.getFloat(index + 1))
                    else -> {
                        val value: String = resultSet.getString(index + 1)
                        val clazz: Class<*> = type.classifier!!::class.java

                        val deserialized = Serializers.deserialize(clazz, value)

                        mutableProperty.setter.call(instance, deserialized)
                    }
                }
            }

            return instance
        }```
#

i've tried debugging, changing the index, ect

#

the value of gold should be balance, ect

#

i've also tried to sort them using an annotation as in the code above

quaint mantle
#

Yo I had a few questions, could I open a thread about it?

river oracle
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

quaint mantle
#

Right

#

Into the thread we go

#

hi fifteen brush

tardy delta
rare rover
#

yes cuz JDBC starts at the index of 1 which index is 0 at the start so i gotta do + 1

tardy delta
#

i know but i dont get the problem

rare rover
#

but like if i dont add the plus one it errors and i have literally no clue why its skipping the first one

rare rover
#

i've tried literally everything

#

its skipping the first value aka balance

tardy delta
#

you mean that balance is 0

rare rover
#

then setting the next value aka gold to the value that balance should be

#

so its incrementing all the values by 1 as in the screen shot multiplier is 0 which it should be 1 but now is in the pmineName

#

its confusing ik 😭

#

idk how else to describe the issue

#

here

#

its right in the database but as you see balance is 29K not gold

#

i've literally been stuck on this for a day trying to figure out why tf its doing this but i cant 😭

tardy delta
#

print properties

rare rover
#

alr one sec

#

[07:26:24 INFO]: [balance, gold, blocksBroken, prestige, multiplier, pmineName, tag, cellId]

#

😭

hybrid spoke
#

whats the issue

#

tldr please

rare rover
#

and i honestly have no clue why

#

i have to add + 1 since JDBC

tardy delta
#

as youre assuming a certain columns order

rare rover
#

im not too familar with kotlin reflections

#

ah ty

hybrid spoke
rare rover
hybrid spoke
#

ohhh

tardy delta
#

only the next resultSet.getX() call seems to return the value for the prev

rare rover
#

getX doesn't seem to be a method?

hybrid spoke
#

x is a wildcard

rare rover
#

O

#

šŸ’€

#

mb

#

let me try that rq

hybrid spoke
#

you also never call resultSet.next, could that be the issue?

rare rover
#

oop

#

maybe

tardy delta
#

should be a contract to let the caller do that

azure harbor
#

Hello everyone, I am a developer and owner of a small server. I have a question for you; I am trying to implement a plugin that, with a command, displays an image fullscreen to the player. I am attempting to replicate what they do in OriginRealms with the "tutorial." In their case, there are four images that you can scroll through using the left mouse button, and you can remove the image with the E key or the crouch key. The image is not a GUI because it has a resolution greater than 256x256. Does anyone have any ideas?

azure harbor
hybrid spoke
#

2048x2048 i believe

quaint mantle
#

Dino man

chrome beacon
#

You can combine multiple maps for higher resolution

azure harbor
#

In their plugin, if you press F5, the perspective changes below, but the image doesn't change, as if the image is above like an overlay.

chrome beacon
#

Yeah you'll need a resource pack containing a shader that moves the map position

#

Time to learn glsl uwu

azure harbor
#

it's not a RP

#

it's a Image from the server

chrome beacon
#

OriginRealms do use resource packs?

#

The image doesn't have to be in the resource pack, you just need a shader to get the map to stick to the screen

shadow night
azure harbor
chrome beacon
#

They're a bit more limited but they can do a lot of cool stuff

#

I recommend you join the shaderLabs discord

azure harbor
#

thanks Olivo

quaint mantle
shadow night
#

If not Olivo my mod wouldn't be possible (somebody should count how many times I said that)

dapper harness
#

because I don't think there is a single food in the game that gives instant regen

#

it says "When a player regains health from eating consumables"

#

and I also don't see any regen reason about an entity being fed, like dog being given meat or horse sugar

hybrid spoke
#

heal potion šŸ¤”

dapper harness
#

no because there is another regainreason for potions

hybrid spoke
#

maybe it is after eating food when you are not full

dapper harness
hybrid spoke
#

you could just debug it

#

and check which reason comes for with action

dapper harness
#

yea I will try doing that, I don't have a server set up so I was wondering if maybe someone knew but yea that's probably better to test myself sorry šŸ˜…

obsidian drift
#

I'm trying to set mob spawn settings for a custom biome, everything works but pigs do not spawn, do I need to do something else for mobSpawnSettings?

        val nmsBiome = BiomeBuilder()
            .temperatureAdjustment(TemperatureModifier.NONE)
            .downfall(0F)
            .specialEffects(specialEffectsBuilder.build())
            .temperature(biomeInfo.temperature)
            .mobSpawnSettings(MobSpawnSettings.Builder().addSpawn(
                MobCategory.CREATURE, MobSpawnSettings.SpawnerData(
                EntityType.PIG, 100, 4, 4)).build())
            .generationSettings(BiomeGenerationSettings.EMPTY)
            .build()
jaunty warren
#

guys

#

l want some help

#

about bungeecord

#

l have that error

orchid trout
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

dapper harness
glad prawn
#

Is there a way to send an animation the player consuming food?

obsidian drift
#

nothing is spawning so the cap isn't reached

warm light
#

is it possible to register custom items?
like I can get my custom items with /give command
so the command will be like this: /give @p PLUGIN:ITEM

jaunty warren
#

l have that error

#

please help someone

obsidian drift
#

You're in the wrong channel

jaunty warren
#

in bungeecord

jaunty warren
obsidian drift
#

This is for plugin development not server issues

dapper harness
dapper harness
#

so it seems that there is no way to distinguish the mechanics of hunger and saturation healing, both use the RegainReason SATIATED...

slender elbow
#

but also, in 1.20.5 you'll be able to unload spawn chunks or configure the loaded radius in server.properties

slender elbow
#

regardless of the hunger bar level

dapper harness
slender elbow
#

oh, i thought it was the message above šŸ—æ

dapper harness
#

Saturation healing

If the player's hunger bar is completely filled and they have left over saturation, this saturation gets drained, healing at a rate of 2♄ every second. Just as with the hunger-based regeneration, every 1♄ regenerated deducts 1.5 saturation. With the maximum amount of 20 saturation, the player can rapidly regenerate up to 13♄ Ɨ 6.5.

#

there is hunger healing and saturation healing

#

hunger healing is basicaly 1.8 behaviour

#

saturation healing got added on top of it but hunger healing still exists and can happen even without saturation

slender elbow
#

oh yeah i forgot it uses like 2 extra levels

#

true that

#

well, the top two if available

dapper harness
#

I would like to remove only saturation healing and keep hunger healing

slender elbow
#

check the saturation level? 🤷

#

or the hunger level, w/e fits best

dapper harness
#

no because it can also happen if saturation is full, not only when it's low, I think the only way would be adding a cooldown to normal saturation healing to simulate the behaviour or to disable everything and add the hunger regen with a runable every 4 seconds

#

not hard but annoying I expected them to have separate reasons but oh well

slender elbow
#

why can't you just check both? if (hunger level == 20) {do the thing}

dapper harness
#

The thing I wanted to report is that RegainReason.EATING says "When a player regains health from eating consumables" but is actualy never called on players, it's a reason that triggers when you feed your dog

obsidian drift
#

chunk generator*

dapper harness
#

oh yea mob spawning at chunk generation bypasses the mobcap

#

I didn't understand the issue well

slender elbow
dapper harness
#

they just typed players instead of entities on accident

slender elbow
#

maybe it made sense when hunger was not a thing lol, but who knows what events did and did not exist then

#

?jira is this a thing?

undone axleBOT
slender elbow
#

let's go

dapper harness
#

I wouldn't know exactly but you'd have to use packets

agile hollow
#

what is the material of the enchanted golden apple in the ItemStack?

slender elbow
#

ENCHANTED_GOLDEN_APPLE ?

agile hollow
quaint mantle
#

golden_apple

#

or something

slender elbow
#

probably regular golden apple + some damage modifier

#

but, lol

quaint mantle
#

yeah 1.8 didnt have enchanted_golden_apple

#

it was just golden_apple

#

(258) or something is the ID

slender elbow
#

but the enchanted variant did exist, so it was probably 1 for the data/damage value

quaint mantle
#

wait youre right

astral scroll
#

Hello

dapper ether
#

is there a way to run an command while being in a gui?

astral scroll
#

my gson is throwing adapter errors for DataTypes i didnt even use

#

Like Optional, AtomicReference and Logger

#

When i have this

#

I tried now with 3 ItemStack adapters and everythings the same

#

what can i do?

#
public class ItemStackSerializer implements JsonSerializer<ItemStack>, JsonDeserializer<ItemStack> {

    @Override
    public JsonElement serialize(ItemStack src, Type typeOfSrc, JsonSerializationContext context) {
        return new JsonPrimitive(Base64.getEncoder().encodeToString(src.serializeAsBytes()));
    }

    @Override
    public ItemStack deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context) throws JsonParseException {
        return ItemStack.deserializeBytes(Base64.getDecoder().decode(jsonElement.getAsString()));
    }
}

this is my actual serializer

#

and this is the implementation:

verbal sigil
#

Hi! How can I "tag" the JavaPlugin?
(to load the plugin)

tender shard
serene egret
#

When i create an Interaction entity, how can i disable that the customname gets displayed on the screen every time somebody hovers over it? i already set the showCustomNameVisible method to false but it is still showing the name when i hover over it

tender shard
#

Dont give it a name

serene egret
#

but i need to do it

tender shard
#

Why?

serene egret
#

hard to explain

#

but is there a way or not?

tender shard
#

If setCustomNameVisibility doesnt work, no. Why do you need it to have a name? I cant think of any possible reason

tender shard
#

Use PDC or metadata

serene egret
#

mhm okay i will try it

tender shard
# serene egret mhm okay i will try it

or: Why you should NEVER use NBT tags again! Spigot 1.14.1 added the biggest improvement that (in my opinion) ever made it into the Bukkit API: The Persistent Data Container (PDC). It can be used to store custom data on Entities, TileEntities, and ItemStacks. Using a bit of math, it can also be used to...

verbal sigil
tender shard
verbal sigil
verbal sigil
tender shard
#

Read the ā€žWhat is Mavenā€œ section from that post

obsidian drift
#

Is there a way to increase spawn rates at runtime

agile hollow
#

where i can find all the slot numbers?

south mason
#

How do I open the interface of a book for the player to write in?

agile hollow
#

it's 1.8 too?

tender shard
agile hollow
tender shard
#

I guess it's the same

south mason
verbal sigil
tender shard
undone axleBOT
tender shard
fervent robin
#

Whats the best way for a player to input multiple commands to my plugin? (ex Opening up a sign gui for them to write, in chat (cancel the chat msg), etc)

tender shard
tender shard
# south mason It's so hard

tbh it's weird that openBook requires a written book, it should also work for writable books - no idea why they limited it to written books

south mason
#

xD

tender shard
#

ah that's annoying

#

well if it's client sided, you can't do anything

sinful kiln
#

Hello everyone,
I'm currently trying to create a plugin that provides a BiomeProvider and is supposed to support multiple versions.
However I'm facing the problem that the BiomeProvider doesn't exist on older versions (which makes sense).
My question now is if someone knows if I can somehow still provide a BiomeProvider while supporting versions older than I think it was 1.14 where that class was added.

young knoll
#

Good luck

#

Worldgen changed massively

sinful kiln
#

I know - everything is implemented already, the only thing missing is the main class loading correctly on old versions while still providing the functionality of newer versions

tender shard
#

so you don't really care about providing biomes for old versions? you just don't want it to fail enabling?

sinful kiln
#

On old versions I have a different generator which sets the biomes using the BiomeGrid provided by the ChunkGenerator class

#

So yeah basically that

tender shard
#

are you just setting your custom biome provider through WorldCreator stuff, or through that yml file - idr how it's called

sinful kiln
#

I'm implementing the getDefaultBiomeProvider method of the JavaPlugin class

tender shard
#

aaah yeah in that case, RIP for older versions I guess

#

maybe... with some black magic... hm but the classloader doesnt even allow loading custom classes starting with org.bukkit... hm... nah I can't think of any way except to have 2 .jars

sinful kiln
#

2 jars would probably be possible

#

As the PluginManager implements a loadPlugin(File) method

tender shard
#

oh yeah you could ofc just have a "bootstrap" plugin that then installs the correct version

sinful kiln
#

But the namespace of the plugin would need to be different just for the biome provider

#

or that yeah

native nexus
#

Why would you want to support older versions anyways. Well modpacks I guess but eh

sinful kiln
#

Because this is a minigame plugin and many minigames servers are still on old versions sadly

tender shard
#

Just silently replace the server jar from within your plugin and make it install ViaMedieval

proper cosmos
#

Is there any way to close player's inventory without calling CloseInventoryEvent?

tender shard
#

if HumanEntity#closeInventory() does call the event, I guess you can only send the packet (ClientboundContainerClosePacket i guess) manually

river oracle
#

Seems like a trashy hack for no reason

#

Also mind you could break other plugins doing this. Seems like a compatability nightmare and a useless hack

proper cosmos
tender shard
#

you want to close the inventory in an inventorycloseevent?

river oracle
#

You don't have to

#

It occurs after the event

proper cosmos
tender shard
#
private boolean ignoreNextEvent = false;

@EventHandler
public void onClose(InventoryCloseEvent event) {
  if(ignoreNextEvent) return;
  // ...
  ignoreNextEvent = true;
  event.getPlayer().closeInventory();
  ignoreNextEvent = false;
}```

This is the usual way on how to avoid loops when the same event is called from inside the listener
river oracle
#

But yeah that works too

tender shard
#

yeah usually this hack shouldnt be needed

#

ah yes, orientable again

#

everybody hates blockdata

river oracle
proper cosmos
candid fractal
#

Hey all, I'm having an issue with Orientable blocks (namely logs): ```java
public void setBlockWithAxis(Material material, Location blockLoc, Axis axis) {
if (blockLoc.getWorld() == null) {
return;
}

    BlockData data = material.createBlockData();
    if (axis != null && data instanceof Orientable orientable) {
        orientable.setAxis(axis);
        blockLoc.getBlock().setBlockData(orientable); // This line seems to not correctly set the axis, block type is correct, axis is ignored (log always faces up)
    } else {
        blockLoc.getBlock().setBlockData(data);
    }
}
tender shard
#

have you checked whether it actually gets called?

candid fractal
#

I have verified this issue in a debugger but I'm scratching my head over this, Directional blocks seem to work, but Orientable does not

proper cosmos
river oracle
#

You have flawed logic though

candid fractal
river oracle
#

Please take a break or something and reexamine better options

tender shard
candid fractal
#

Basically my stack looks like this: onDispense(BlockDispenseEvent event) -> tryStripBlock(Block source, BlockFace face) -> setBlockWithAxis(...)

#

tryStripBlock is my own method, which I have verified actually calls setBlockWithAxis correctly via debugger

tender shard
#

oh maybe I should have clarified, have you checked whether it actually enters your if(axis != null ...) block? Maybe it always goes to the else part for whatever reason?

candid fractal
#

yes

#

it gets down the the place where it sets the block with the axis

#

and then the axis just gets ignored

tender shard
#

can you step into CraftBlock #setBlockData and then into the setTypeAndData method on CraftBlock?

#

that's where it converts the BlockData into an NMS IBlockState

candid fractal
#

yep, lemme restart the server

astral scroll
#

someone remembers the date when minecraft got fucked by log4shell?

candid fractal
#

um, well i step into and then intellj doesn't know what to do

#

i don't have NMS in my deps so maybe that's why i cant step into it

tender shard
#

oh yeah you'll need to get the spigot dependency

#

I hace a feeling that getState() returns the wrong thing here

candid fractal
#

lol do I need to do some dumb NMS inject if that's the case?

#

i might just say screw worrying about orientation if so

tender shard
#

well worst case, just wait a tick and set the orientation then

tender shard
candid fractal
#

still trying to find the proper nms dep so idk

river oracle
# proper cosmos So If one player still makes his choice, and other just leave inventory,

I have a bit of time before class so I'll give a few tips can't code since I'm on my phone

Basically you want a
RPSGame class (rock paper scissors).

Each game contains your logic for starting stopping etc you can store this class in a manager e.g. RPSGameManager once a game is created you can insert it into your manager or just create a helper method that creates the games for you e.g. RPSGameMamager#newGame(uuid, uuid). Anyways once a player exits in any way. You can unregister the session from the manager and remove references. Then you can run your handleClose logic without fear of loops becuase you'll be checking if they're in a session before yoh close if you unregister and remove references to the session by the "loop" there would be no session the player is in to loop over. This is about all the pointer I can give

tender shard
#

if the IJ debugger requires adding the dependencies manually in project settings -> libraries (idk, never used it for NMS) then you'll need to add these things

river oracle
#

BTGUI tine

tender shard
#

the bundler directory thingy

river oracle
#

You can just connect the ports

tender shard
#

but does it then also see the source code etc for NMS stuff?

river oracle
#

And CB doesn't relocate nms anymore

candid fractal
#

Hmm i added nms through maven but it still doesn't work, I always test with the paper jar for the current version so that might be why

#

let me add my server jar to the project

eternal oxide
#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

tender shard
tender shard
#

i hope you're running the fancy GUI

#

!!

candid fractal
#

fancy gui? never heard of such a thing

#

i use terminal

chrome beacon
#

The GUI was recently merged

#

You can just run the jar by double clicking it now (to open a GUI)

candid fractal
#

ah

#

did it

#

even weirder:

#

but alas

#

the server lies it would seem

#

:/

#

ok so it would seem the rule is, if something doesnt work, do it 1 tick later

#

putting the code in a ```java
Bukkit.getScheduler().scheduleSyncDelayedTask(

#

what a funny game

#

anyway thanks for the help

proper cosmos
#

the problem is that I wanted to implement logic that if player close inventory it just cancels game refund money

#

I ended up doing it by adding "Cancel game" item to inventory and ending game

pine forge
#

how do i pardon a player with the BanListType.PROFILE?

#

im not sure what object to provide to the pardon function

sullen marlin
#

a PlayerProfile created with Server.createPlayerProfile or Player/OfflinePlayer.getPlayerProfile

pine forge
#

hmm i tried that, but it doesnt appear to work

sullen marlin
#

need to cast to PlayerProfileBanList

pine forge
#

cant find that

hushed spindle
#

How accurate is ProjectileHitEvent? like if I call getLocation() on the projectile will it return the exact location where it hit or where the projectile happened to be that game tick

pine forge
#

where do i import that from

hushed spindle
#

as in will it be accurate with very fast projectiles for example

sullen marlin
#

sorry ProfileBanList

pine forge
#

same error...

sullen marlin
#

no you cast the ban list

pine forge
#

ah

#

that makes more sense

#

huh

#

thats pretty complicated though

#

Bukkit.getBannedPlayers.remove doesnt work does it?

#

appears to be a mutable list

#

but ive tried that before too and it didnt seem to pardon me

#
((ProfileBanList) Bukkit.getBanList(BanList.Type.PROFILE)).pardon(player.getPlayerProfile());
``` this is really not that attractive syntax tbh šŸ˜…
#

but sure, ill roll with it if theres no other option

tender shard
#

PR a getProfileBanList() method

#

I agree its currently a bit unintuitive lol

sinful kiln
tender shard
#

Share it (out of curiosity)

sinful kiln
#

In dm or here?

tender shard
#

I guess you could just extend JavaPlugin, then extend it again?

tender shard
peak depot
#

is there a BookCloseEvent?

final wharf
#

i just got a brand new pc and forgot what plugins i should use on intellij

tame wolf
#

Minecraft Development

final wharf
#

yeah, i know about that

tame wolf
#

That's about it 🤷

final wharf
#

ohh

#

yeah

#

sorry

#

i had some other plugins

orchid gazelle
#

the Discord Rich Presence thingy

#

and WakaTime

final wharf
#

i forgot they dont have nothing to do with this

tame wolf
final wharf
#

i hate rich presence tbh

tame wolf
#

Seems snobbish in a "look at me I'm coding" kind of way

final wharf
#

i hate it

#

i sometimes build plugins like playervaultsx wich is open source

orchid trout
#

spending time on your profile is kinda really extremely edgy

final wharf
#

yeah, like who the heck cares about your profile

quiet ice
#

but what about my ego?

fervent robin
tame wolf
#

Like a pimple

lunar mica
#

Quick question abou BungeeAPI. Why is PlayerDisconnectEvent called two times? I tried print string on DIsconnect and it print two times.. exist different event on disconnect or where is problem? Thanks

orchid trout
#

if you actually use it as intended then i think its fine

quiet ice
#

Tbh I have the reputation of being 24/7 within eclipse under my classmates thanks to RCP

quiet ice
#

Whether that is a good thing - I do not know

orchid trout
#

like actually write a bit about yourself

chrome beacon
lunar mica
#

In console I have this two times but idk if this is a problem what called event two times
[MrHarebug] -> UpstreamBridge has disconnected
[MrHarebug] <-> DownstreamBridge <-> [Lobby] has disconnected

tame wolf
lunar mica
chrome beacon
#

Show your code

lunar mica
#

Code:
@EventHandler
public void PlayerDisconnectEvent(PlayerDisconnectEvent e){
System.out.println("test");
}

Log:
[21:47:24] [Netty Worker IO Thread #1/INFO]: [MrHarebug|] <-> ServerConnector [Lobby] has connected
[21:47:32] [Netty Worker IO Thread #1/INFO]: test
[21:47:32] [Netty Worker IO Thread #1/INFO]: test
[21:47:32] [Netty Worker IO Thread #1/INFO]: [|MrHarebug] -> UpstreamBridge has disconnected
[21:47:32] [Netty Worker IO Thread #1/INFO]: [|MrHarebug] <-> DownstreamBridge <-> [Lobby] has disconnected

#

It look likes disconnect is called two times because disconnect from bungeecord and from whole server (Lobby).. it can be reason probably

orchid gazelle
#

yeah

#

well idk much about netty and proxying but it looks like UpstreamBridge is the Server itself and DownstreamBridge the Proxy(Bungee)

lunar mica
final wharf
#

How do i log something to console using the paper one?

#

havent coded in a while

orchid gazelle
lunar mica
#

Yes

orchid gazelle
#

that was a question xD

lunar mica
#

On Proxy

#

mb

orchid gazelle
#

yeah ig it's just the nature of bungee then

#

probably should be split into two events if it really is like that tho

lunar mica
#

Okay but I have function when player disconnect then saved data and playtime.. but when he disconnect it saves same playtime twice

orchid gazelle
#

PlayerDisconnectEvent and PlayerDisconnectProxyEvent

#

would be the thing I would be doing

#

but yeah, that does not exist

orchid gazelle
lunar mica
wintry lynx
#

Need some help from peoples who are either good with NMS or Structures

young knoll
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

wintry lynx
#

How would one take this code and get the starting location of the structure. Like the origin

wintry lynx
#

I also need to snatch the structure in the map that matches with:

young knoll
#

I believe the origin will be the first piece in the structure start

#

Also you should really used mojmap NMS

wintry lynx
young knoll
#

Yes

#

?nms

young knoll
#

There’s also an api for this waiting on merge :p

wintry lynx
young knoll
#

Yes

#

And then make sure your dependency is correct

wintry lynx
#

dang bro, why isnt that the default

#

Seems incredibly useful especially if buildtools is mostly for NMS

young knoll
#

Because you need to set up remapping and all that

#

Buildtools is for building a spigot jar, most people who run spigot don’t need remapped

#

Actually none of them do, only developers do

wintry lynx
young knoll
#

You need to set up specialsource to reobfuscate your plugin when you build it

wintry lynx
chrome beacon
#

?nms

wintry lynx
#

oh, right

celest notch
#

Is there a way to show the red world border vignette on screen using packets

young knoll
#

You can do it with the api

#

Assuming not 1.8

celest notch
#

Yeah not 1.8

#

Whats the api function

young knoll
#

Use a worldborder with a very large warning distance

obsidian drift
#

Is there a way to spawn an entity with a UUID that I choose?

chrome beacon
#

I don't see why you would need to do that

obsidian drift
#

I'm intercepting an Add Entity packet and I need to know the UUID to match the packet to the entity before it spawns, because the packet sends before the spawning function is done.

chrome beacon
#

??

young knoll
#

You can probably do it with the consumer

chrome beacon
#

You have the uuid in the packet

sullen marlin
#

Wat

chrome beacon
#

or if you're trying to modify the entity before it's spawned use the consumer

young knoll
#

Presumably the uuid will already be set in the consumer so you can add it to a set or whatever

sullen marlin
#

?xy

undone axleBOT
chrome beacon
#

I have no idea what the goal is here

obsidian drift
#

im very bad at explaining

lunar mica
lost matrix
eternal oxide
#

fair to middlin

spare mason
#

Is it possible to no clip an armorStand?

chrome beacon
#

?

spare mason
#

make it able to no clip blocks like the vex

chrome beacon
#

You'll probably just have to move it yourself

#

do set it to marker if you want to remove the hitbox

lost matrix
spare mason
spare mason
chrome beacon
spare mason
echo basalt
#

armorstands are fun

chrome beacon
#

I told you?

#

It removes the hitbox so you can't hit the armor stand

lost matrix
spare mason
#

ohhh

echo basalt
#

setMarker turns the armorstand into a "marker armorstand" which is basically the same except it doesn't have a hitbox

#

partyparrot I'm losing my mind

spare mason
#

so there's no way to stop armorstand from stop block collision

echo basalt
#

Given marker armorstands have no hitbox they don't stop block collision

#

Because there's nothing to collide with?

spare mason
#

nop

#

it doesn't work

chrome beacon
#

setting it to marker would stop it from moving no?

spare mason
#

by the player yes

#

but my goal is to make it just fall

dapper harness
#

Excuse me, what should I type in my pom.xml to have access to the NMS too when I import spigot ? Or is there something to do with build tools and then change the pom I don't really remember šŸ˜… could someone help ?

eternal oxide
#

?nms

dapper harness
#

thanks

final wharf
#

this is kotlin right?

young knoll
#

No that’s java

final wharf
#

well yeah

fervent robin
astral scroll
#

can i get somehelp for gson?

#

it isnt working correctly

chrome beacon
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

astral scroll
#

So

#

i have a class of Int, Strings and ItemStacks

#

Lists of itemstacks

#

no more members

#

But when i serialize it with gson

#

it starts to ask me for weird adapters

tender shard
astral scroll
#

like optional, logger and AtomicReferes (whatever that is)

young knoll
#

Because itemstack

#

Most likely

astral scroll
tender shard
astral scroll
#

ive used 3 diferent itemstacks adapters

#

and none of them work out

chrome beacon
#

Show your code

#

?paste

undone axleBOT
tender shard
#

Then you used it wrong

#

My adapter definitely works

astral scroll
#

LearnSpigot provides a free web-based pastebin service for storing and sharing code snippets with anyone. Powered by hastebin.

LearnSpigot provides a free web-based pastebin service for storing and sharing code snippets with anyone. Powered by hastebin.

LearnSpigot provides a free web-based pastebin service for storing and sharing code snippets with anyone. Powered by hastebin.

tender shard
#

It even has a helper method so you dont need a type adapter

astral scroll
#

and same

#

this: Gson gson = new GsonBuilder().registerTypeHierarchyAdapter(ConfigurationSerializable.class, JsonConfigurationSerialization.TYPE_HIERARCHY_ADAPTER).create()

tender shard
#

``java

astral scroll
#

i got the kotlin code cause i ran out of ideas

tender shard
#

alternatively register the included TypeHierarchyAdapter

Gson gson = new GsonBuilder().registerTypeHierarchyAdapter(ConfigurationSerializable.class, JsonConfigurationSerialization.TYPE_HIERARCHY_ADAPTER).create();
String serialized = gson.toJson(someItemStack);
ItemStack deserialized = gson.fromJson(serialized, ItemStack.class);
astral scroll
#

lemme try that one

tender shard
#

a normal type adapter is wrong because my adapter is for all ConfigurationSerializables, not just itemstacks

astral scroll
#

but yeah

#

lemme try and ill tell you

final wharf
#

does somebody have a example of minimessage in maven

young knoll
#

Pretty sure the site has all the maven dependency info

tender shard
# final wharf does somebody have a example of minimessage in maven
 <dependency>
    <groupId>net.kyori</groupId>
    <artifactId>adventure-platform-bukkit</artifactId>
    <version>4.3.2</version>
 </dependency>
 <dependency>
    <groupId>net.kyori</groupId>
    <artifactId>adventure-api</artifactId>
    <version>4.15.0</version>
 </dependency>
 <dependency>
    <groupId>net.kyori</groupId>
    <artifactId>adventure-text-minimessage</artifactId>
    <version>4.15.0</version>
 </dependency>
#

plus the repo

#

and maven-shade-plugin

tender shard
#

yes ofc it worked :p

astral scroll
#

THANKS

tender shard
#

np

astral scroll
#

I LOVE U BROTHER]

final wharf
tender shard
#

well you mentioned maven lol

final wharf
#

yeah, i just started i dont really know much

tender shard
final wharf
#

i just want one example of minimessage and im good for the rest of my life

final wharf
#

here is the class

tender shard
#

you have to do it normally

young knoll
#

Kek

final wharf
#

im on java 21

tender shard
#
MiniMessage mm = MiniMessage.miniMessage();
final wharf
#

ohh

tender shard
final wharf
#

oh

#

yeah

#

sorry

young knoll
#

Also I’m pretty sure the Bukkit adapter includes adventure api so you don’t need the extra dep

#

:p

tender shard
#

probably

final wharf
young knoll
#

Hey if you libraries feature it like me less deps means less spam on server start

#

:p

final wharf
#

how do i set a player's gamemode?'

tender shard
#

the new IJ wastes so much space 🄲

tender shard