#help-development

1 messages · Page 689 of 1

tender shard
#

for spigot I use MockBukkit

subtle folio
#

¯_(ツ)_/¯

#

i’d follow Mock pattern then

#

bc XMaterial is already smt

#

so people might get confused

young knoll
#

MaterialX

#

Big brain

sterile token
#

What does MaterialX?

subtle folio
#

legacy spigot

sterile token
#

oh ok

opal juniper
#

XMaterial is for cross version materials

#

there is a whole suite

tender shard
subtle folio
#

ohhhh

tender shard
subtle folio
#

okay then that works lol

#

why no interface ?

lost matrix
quaint mantle
#

wait, can i use different mappings in spigot?

subtle folio
remote swallow
#

you can use mojmaps

tender shard
#

if it'd be an interface I'd have to rewrite this whole logic for all things that can have permissions (e.g. groups can ahve permissions too)

young knoll
#

Wtf is lightpermsX

remote swallow
#

pex and luckperms

subtle folio
#

seems legit

remote swallow
#

luckpex

subtle folio
#

i wonder if there is a project that makes this stuff testable already

#

if not ik what i’m gonna do today

tender shard
subtle folio
#

MockServer when(?)

remote swallow
#

mock bukkit

tender shard
subtle folio
sterile token
#

MockBukkit best shit fucking ever

lost matrix
#

Oh Verano is back 😄
Im ready for some wisdom this evening

sterile token
#

I mean it in the good sense, its prety amazing using it for debugging and testing

echo basalt
#

uhh

#

life wisdom

young knoll
#

How can mirrors be real if our eyes aren’t real

echo basalt
#

good ol' verano

tender shard
young knoll
#

No wait that was Jayden smith

subtle folio
echo basalt
#

known for being a drunk kid and stealing my 5 year old utilities and ignoring the new code

quaint mantle
#

idk

lost matrix
#

Looked like some SortedSet impl to me. Maybe TreeSet?

subtle folio
echo basalt
#

LinkedHashSet

tender shard
sterile token
echo basalt
sterile token
subtle folio
#

LinkedHashPregnantSortableBallLickingSet

#

Might be what you want

tender shard
#

hm why does Collections.unmodifiableList not allow me to pass a TreeSet

#

that's sadge

subtle folio
#

bc it’s not a list??

echo basalt
#

Only a fool cries over a torn pocket

floral drum
#

gotta love it when sendBlockChange or sending the packet manually for PacketPlayOutBlockChange doesn't appear sometimes randomly... 💀

sterile token
# echo basalt I am

haha i was kidding i mean i already known you were talking about me haha. Just wanna provee it

lost matrix
tender shard
echo basalt
sterile token
#

Why do you make laught of me?

echo basalt
#

It's like the most unreliable part

tender shard
echo basalt
#

fake blocks take some effort to get right

sterile token
tender shard
#

I'll just return an UnmodifiableTreeSet

onyx fjord
#

does anyone know the inspection name?

lost matrix
sterile token
echo basalt
onyx fjord
#

yeah i wanna disable it

sterile token
floral drum
onyx fjord
sterile token
#

oh thanks lmaoo

onyx fjord
#

no results

sterile token
#

I didnt even know how it called thats

echo basalt
sterile token
echo basalt
#

Got no clue what you're trying to do

onyx fjord
#

oh

echo basalt
#

Also if you flood the client with packets it makes a cool effect

onyx fjord
#

works with spaces

sterile token
onyx fjord
#

epic

echo basalt
floral drum
#

I've put debugs, I've tried sending it through the channel directly, (writeAndFlush)

tender shard
#

ugh fuck TreeSets

floral drum
#

shits confusing tf out of me

echo basalt
#

delay by a tick

tender shard
#

they are not remotely similar to my SortedUniqueList

sterile token
tender shard
subtle folio
lost matrix
sterile token
tender shard
#

this > stupid TreeSets

lost matrix
sterile token
#

I have disabled like 30% of asshole warnings in IntellIJ

floral drum
lost matrix
#
Preconditions.checkState(folder.mkdirs(), "Could not create folder " + folder);
sterile token
#

Now i see mfalex code, is there a difference between super.add() or add() directly?

tender shard
#

if you override add, then sure

young knoll
#

Did someone say recursion
Did someone say recursion

onyx fjord
echo basalt
lost matrix
echo basalt
#

gotta throw specific exceptions n such but I can't bother

upper hazel
#

I wanted to know if you can write different values ​​​​in the same placeholders if, for example, they are in different itmeStacks in lore

#

in placeholder api

onyx fjord
lost matrix
echo basalt
#

yis

lost matrix
#

😄

lost matrix
floral drum
#

fuck packetplayoutblockchange

echo basalt
#

all my homies hate PacketPlayOutBlockChange

upper hazel
# echo basalt

by the way, that plug-in for checking code style in intelji that you advised sometimes contradicts itself, for example, with brackets

floral drum
echo basalt
#

I'd like to see it trip over brackets

echo basalt
tender shard
#

Nah fr does anyone know sth like a List that is always sorted (not just ordered)

#

TreeSet doesn’t allow get(0)

upper hazel
floral drum
sterile token
#

Do you remeber my file handler i didnt some years ago? I finally re write it, what do you think about the v2?

public class FileHandler extends YamlConfiguration {

    private final Plugin plugin;
    private final String name;
    private File file;

    public FileHandler(Plugin plugin, String name) {
        this.plugin = plugin;
        this.name = name;
        this.reload();
    }

    public void reload() {
        try {
            this.file = new File(plugin.getDataFolder(), this.name);
            if (!file.exists()) this.createFile();
            this.load(this.file);
        } catch (IOException | InvalidConfigurationException ex) {
            plugin.getLogger().severe("[FileHandler] File " + file.getName() + " couldn't be reloaded. Reason " + ex.getMessage());
        }
    }

    public void save() {
        try {
            this.save(this.file);
        } catch (IOException ex) {
            plugin.getLogger().severe("[FileHandler] File " + file.getName() + " couldn't be saved. Reason " + ex.getMessage());
        }
    }

    void createFile() throws IOException {
        if (file.getParentFile().exists()) file.getParentFile().mkdirs();
        if (plugin.getResource(this.name) != null) plugin.saveResource(this.name, false);
        file.createNewFile();
    }

}
echo basalt
upper hazel
lost matrix
#

Why dont you get the field directly by id??

lost matrix
#

Internally a JsonNode is just a Map<String, Object>

echo basalt
onyx fjord
# echo basalt

Hi Imillision, how are you? I'm Greg, ten time MVP award winner, let's work together to get this fixed.

did you try turning off and on again?

echo basalt
young knoll
#

Fun fact

floral drum
#

Time to queue them and send them one tick after one another

onyx fjord
floral drum
#

If that shit doesn't work

lost matrix
#

Yes

young knoll
#

Everything is actually a Map<String, Object>

floral drum
#

then I will be so FUCKING confused

onyx fjord
#

and not independent advisors

sterile token
lost matrix
#

Infinitely better.

onyx fjord
#

tho money is the key

#

hmm

#

deep

lost matrix
#

Doesnt matter if your node is 1MB or 20 GB.
It will always be the same performance.

upper hazel
#

how to bind these placeholders not to the player but to the itemStack and its model

#

i don't want to fill everything through a for loop

lost matrix
#

This also looks like you are abusing the jackson lib for some shenanigans.

onyx fjord
#

.replace("{item_category}", someMethodThatReturnsStringOrSomething) @upper hazel

#

easiest way

upper hazel
onyx fjord
#

?

floral drum
#

if this shit aint work me confuzzled

onyx fjord
#

wdy loop

lost matrix
upper hazel
#

not with itemStack

upper hazel
upper hazel
onyx fjord
#

or a stream

lost matrix
#

Regex or Tree skip search

upper hazel
#

nevermindthis is not optimized if there are 54 of these items

#

or more

onyx fjord
#

depends how often it runs

upper hazel
#

very

#

this is an auction

onyx fjord
#

you could do either what 7smile7 suggested or cache lore

upper hazel
#

and players will often open it

onyx fjord
#

but then it wont update instantly

#

so not that great

lilac dagger
upper hazel
#

Of course, when selling an item, you can change Lore for it, but it will be too difficult to update its sale time

lilac dagger
#

a single loop and checks that go deeper if it keeps matching

floral drum
lilac dagger
#

and my placeholders are compiled as well

#

so this only happens once

#

then i have a tree and a context

#

because i also made ternary placeholders

terse ore
#

Can uploaded plugins to spigot have license?

lilac dagger
#

as long as they work offline yes

young knoll
#

I mean, can you enforce it?

#

“You cannot decompile my plugin or peepeepoopoo”

terse ore
#

Wdym

onyx fjord
#

?

#

wdym

opal carbon
#

do you mean drm where you need a key?

#

if so no

lost matrix
# upper hazel nevermindthis is not optimized if there are 54 of these items

Ive written the general idea for you. This doesnt use regex but a simple char iteration.
You still need to write a ton of logic but this is a very fast implementation.
Basically copy the input, char by char to the builder and replace and placeholders.

public class PlaceholderParser {

  private static final char PLACEHOLDER_PREFIX = '{';
  private static final char PLACEHOLDER_SUFFIX = '}';

  private final Map<String, Placeholder> placeholderMap;

  public PlaceholderParser() {
    this.placeholderMap = new HashMap<>();
  }

  public String parse(String input, OfflinePlayer player) {
    StringBuilder builder = new StringBuilder();
    StringBuilder currentTokenBuilder = new StringBuilder();
    boolean inPlaceholder = false;
    for (char c : input.toCharArray()) {
      if (c == PLACEHOLDER_PREFIX && !inPlaceholder) {
        inPlaceholder = true;
      } else if (c == PLACEHOLDER_SUFFIX && inPlaceholder) {
        inPlaceholder = false;
        String token = currentTokenBuilder.toString();
        currentTokenBuilder = new StringBuilder();
        Placeholder placeholder = placeholderMap.get(token);
        if (placeholder != null) {
          builder.append(placeholder.getReplacement(player));
        }
      } else {
        builder.append(c);
      }
    }
    return builder.toString();
  }

}

One important thing you really want is parameters. Those can be implemented in a similar manner with a
separator character like _ or #

opal carbon
#

if you mean license as in making it open source or not with a specific license ofc thats allowed

lost matrix
terse ore
#

Thanks guys

tender shard
opal carbon
#

it also cant require additional action from the user

#

plugins need to be plug and play

tender shard
#

that also only applies to paid plugins

lost matrix
#

You usually never tinker with json nodes.
The intended purpose is to create an ObjectMapper instance and then
register Serializer or Deseriaizer on it.

#

Then your code will be simplyfied to something like;

String json = ...;
ObjectMapper mapper = ...;
SomeComplexPlayerData data = mapper.readValue(json, SomeComplexPlayerData.class);
#

Yeah, this is a good example of how not to use jackson. 👍

#

By registering dedicated serializers for every type you want to serialize.

#

I personally prefer Gson because it uses a ReflectiveTypeAdapter on default.
Which is a bit hacky but lets me serialize literally anything without having to write
serializers for it.

upper hazel
dry hazel
#

you can even configure the default behavior on the class with its annotations

lost matrix
#

Serializing interfaces and abstract classes where you have to retain the runtime class
was an actual issue for me when i used jackson back in the days.

quaint mantle
#

abuse mojang dfu instead

slender elbow
#

discriminated unions?

#

Jackson can do those

quaint mantle
#

dfu best FP

lost matrix
#

Yes i know. Jackson is an industry standard. I just learned how
to do anything with Gson and now im polarized towards it.

upper hazel
opal carbon
young knoll
#

No

opal carbon
#

does it only apply to drm

young knoll
#

You’re allowed to download dependencies on the first run

opal carbon
#

hm

quaint mantle
#

structmap

opal carbon
young knoll
#

I mean

#

Just because you can skirt around the guidelines doesn’t mean MD won’t just say “no”

opal carbon
#

true

hushed spindle
#

am i doing anything wrong here or why is it not finding en-us.json

subtle folio
#

no need for first slash

hushed spindle
#

the reason why its confusing is because im using this sorta stuff multiple times, i've got another folder in my resources and it does find the files in that

#

with the slash on the start

#

ill try without but it seems inconsistent

#

yeah it works but im still confused lmao

frosty tinsel
#

At all

tender shard
#

Does the .jar really include it?

austere cove
#

What are you calling #getResoureAsStream() on?

tender shard
#

If its the class object it needs the /

tall dragon
frosty tinsel
#

Yes

hushed spindle
#

let me show the other one

#

this works lol

#

but /languages/en-us.json doesnt

#

despite the same structure

#

i think thats weird

frosty tinsel
#

I had the same problem many times

#

Still don't know know what is the correct way

onyx fjord
#

is there a tag for helmets in spigot api?

#

because i see tags for tools, not armor

kind hatch
#

Is that what the event actually does?

#

I've never actually used that one before.

smoky anchor
#

Idk, I looked at the patches from spigot or something, that was the usage it seemed.
I didn't look too deep tho.

eternal valve
#

I will write a plugin, but I am confused, I will make a server between 1.17.1 and 1.19, I will make a special plugin for it, but which one of the bukkit api will I use, the lowest or the largest one?

kind hatch
#

If you want to support multiple versions, you have to use the API of the lowest version you support.

shadow pulsar
#

How would one rotate a display entity based on the yaw of a location? I've tried:

new Quaternionf().rotateYXZ((float) Math.toRadians(p.getEyeLocation().getYaw()), 0, 0)```
But it doesn't rotate correctly. Sometimes it's facing the right yaw direction, most of the time, it's not. When I do:
```java
new Quaternionf().rotateYXZ((float) Math.toRadians(p.getEyeLocation().getYaw()*-1), 0, 0)``` It rotates it in the exact opposite direction of the yaw every time.
sterile token
young knoll
#

Why

kind hatch
#

Depends on how far back you plan on supporting and what you are trying to achieve.

young knoll
#

The scoreboard api has been around since like

#

1.8 idk

sterile token
#

since when scoreboards code from 1.8 work on 1.21, without NMS?

subtle folio
#

isn’t there a newer part of it in a later version( 1.13 ?)

sterile token
#

Scoreboard api since 1.13 changed a lot if im not wrong

young knoll
#

Idk when it was added

#

I don’t store memories for versions older than 50% of server owners

#

Kek

sterile token
#

oh haa

#

I just ask because i wanna improvee when needing to code multi version plugins

#

Because the demand now adays is whatever version, not just 1.8 or 1.21. They ask for support for most of the versions they are really dumb btw

kind hatch
#

You know you can say no right?

sterile token
lilac dagger
#

check that

eternal valve
#

Is it difficult to make a plugin with Kotlin and do you need an api, you know, for normal .class, spigot 1.17.1 snapshot api is needed, for example, do you need this in kotlin?

ivory sleet
#

yes

#

you also need the kotlin standard lib in principle

ivory sleet
#

its not difficult tho

sterile token
ivory sleet
#

just a bit more complicated

spring sage
#

Hey guys! Is it possible to show a different block for each player? What I mean is: for example, there is a coal ore, player 1 breaks it, I cancel block break event, the coal drops and I make that block a stone for player 1. All other players still see the coal ore there, anyone can break it, drop the coal, and for each player that block will become a stone.
Hope I was able to explain the idea)

sterile token
ivory sleet
#

idk

#

I mean kotlin is just... kotlin

eternal valve
ivory sleet
#

Id say it isnt

#

hard is very subjective

rare rover
# eternal valve Is it difficult to make a plugin with Kotlin and do you need an api, you know, f...
plugins {
    id 'org.jetbrains.kotlin.jvm' version '1.9.0'
    id 'idea'
    id 'com.github.johnrengelman.shadow' version '7.1.1'
}

group = 'org.outspending'
version = '1.0-SNAPSHOT'

repositories {
    mavenCentral()
    maven {
        name = "spigot-repo"
        url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
    }
}

dependencies {
    testImplementation 'org.jetbrains.kotlin:kotlin-test'
    compileOnly 'org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT'
}

sourceCompatibility = 17
targetCompatibility = 17

compileKotlin {
    kotlinOptions.jvmTarget = "17"
}

compileTestKotlin {
    kotlinOptions.jvmTarget = "17"
}

shadowJar {
    destinationDirectory = file("D:\\MC Server\\plugins")
}``` for kotlin
#

kotlin mid

#

i dislike it

sterile token
ivory sleet
#

uh whaaat

rare rover
#

now rust is epic

ivory sleet
#

no it doesnt look like rust sir

rare rover
#

^

#

very different

eternal valve
sterile token
kind hatch
rare rover
#

this is rust:

impl Client {
    pub fn new(stream: TcpStream, id: u32) -> Client {
        Client { stream, id }
    }

    pub fn handle_connection(&mut self) {
        self.send_message("Hello from the server!".to_string());
        self.receive_message();
    }

    fn send_message(&mut self, message: String) {
        self.stream.write(message.as_bytes()).unwrap();
        self.stream.flush().unwrap();
    }

    fn receive_message(&mut self) {
        let mut buffer = [0; 1024];
        self.stream.read(&mut buffer).unwrap();
        println!("Received: {}", String::from_utf8_lossy(&buffer));
    }
}```
sterile token
eternal valve
rare rover
#

i can see the similarities somewhat

sterile token
rare rover
#

ye

sterile token
#

but i dont care, its the people that just over complicate

#

Do you know about kotlin decompilation? Is it more difficult rather Java? Josh

spring sage
rare rover
#

i've used kotlin like twice

eternal valve
rare rover
#

wacky tho

#
class KotlinTesting : JavaPlugin() {

    companion object {
        lateinit var instance: JavaPlugin;

        fun getPluginInstance(): JavaPlugin {
            return instance;
        }
    }

    init {
        instance = this;
    }

    override fun onEnable() {
        Something();
    }

    override fun onDisable() {
        logger.info("KotlinTesting disabled!")
    }
}```
#

java is better imo

sterile token
eternal valve
sterile token
#

Because the lang tools arent realyl improveed

rare rover
#

kotlin isn't difficult just i like java better

#

it does the samething

#

no real improvement

sterile token
#

I mean im talking about code decompiling

rare rover
#

except for like data class but you can just use records lol

rare rover
eternal valve
humble heath
#

how do we do if a player has permission ese.mc they can do the command but if they don they cant but if they have ese.* they can

sterile token
#

I have something related to that an issue

eternal valve
humble heath
#

so if they eather have ese.mc or ese.*

sterile token
#

Its telling that i dont have permission to child command while only having the child permission, but with the base permission allow.What could be happen here?

humble heath
#

or would they need both

sterile token
humble heath
#

example

rare rover
eternal valve
#

Ha oke 😏

rare rover
#

they dont have any performance improvements so why learn a whole new language

humble heath
#

i want to make it that ese.* runs across multiple commands but can give perms seperate to certen people

kind hatch
#

Setup your permissions properly in your plugin.yml.

permissions:
  ese.*:
    ese.mc: true
    ese.whatever: true

Then just check where you need to in your code using Player#hasPermission().

sterile token
rare rover
#

yes but that comes at a cost

humble heath
#

where do i put that

sterile token
eternal valve
sterile token
humble heath
#

thank you

kind hatch
sterile token
rare rover
#

i'm just saying, my personal prefrence is java since why would you learn a new language

sterile token
eternal valve
river oracle
sterile token
river oracle
sterile token
eternal valve
#

Sıkıldım lan 1 tane türk bilr mi yok of

sterile token
#

ohh nice man

#

Can i ask another stupid issue. because i cant figure it

river oracle
sterile token
#

If i try to run it with the base one it allows perfectly

river oracle
eternal valve
#

Can I add a button to the non-inventory main screen in Minecraf, for example a simple button plugin on the top right to teleport to a place

river oracle
#

mods only for that stuff

#

plugins can't add things only modify behavior

sterile token
#

This my mocde @river oracle

eternal valve
#

I have one last question, if I put a mod on my server, people have to install that mod, how can I do it automatically or what can I do?

kind hatch
#

You can't. If you need mods on your server, you have to run a modded server.

#

Which requires people to download your modpack so that they can join.

eternal valve
kind hatch
#

More or less.

sterile token
eternal valve
#

Minecraft is such a difficult environment help

sterile token
eternal valve
river oracle
river oracle
#

plugins is when things get hacky fast asf

kind hatch
#

Now, you could make your own client and make changes within it, but good luck convincing people to use it.

eternal valve
#

Thank you very much for filling the gaps in my mind now

#

I have to use a mod pf

sterile token
# eternal valve Maybe

The issue is the next, plugins goes on server side and mods on client side. Plugins allow for doing server side things, like managing scoreboards, tablists, items, etc. But dont allow to interact with the items texture exactly

sterile token
kind hatch
sterile token
young knoll
#

Resource packs

sterile token
#

a

young knoll
#

Woo

eternal valve
sterile token
#

discord dead?

eternal valve
#

Even if there is no visual texture, you can click on an empty key square or any other

#

So a simple 30x10 clickable button or a plugin that opens a custom gui panel when you press the e key

young knoll
#

In an inventory?

#

Or in the world

eternal valve
#

Sorry, let's make it an x. 😄

young knoll
#

That doesn’t really answer the question

eternal valve
#

I said let's make the E key an X eheh

sterile token
#

No you cant bro

#

You must either do it via plugin and having a texture pack on the client, or doing it directly with a mod

eternal valve
#

For example, I wanted to create such a panel when I press x with plugins

#

I can solve the texture package with itemsadder, but I think the button job is difficult, I think it's a special button.

young knoll
#

Well you can definitely do something similar to the panel with just a plugin

kind hatch
#

You're not gonna get that kind of functionality out of a plugin w/ resourcepack.

young knoll
#

But you can’t detect the player pressing X

eternal valve
kind hatch
#

Your area is too big.

young knoll
#

You can definitely make it appear bigger than a standard inventory

#

But you can only detect clicks within the bounds of the inventory

chrome beacon
#

Well technically they're not inventories at all

kind hatch
#

You could in theory hack something together with a resourcepack, some display entities, and those new interaction entities.

#

Wouldn't be done in an inventory though.

eternal valve
#

Finally someone who fully understands me uwu

chrome beacon
#

You can do that

eternal valve
#

Add a custom button waow are you serious

chrome beacon
#

It requires a resourcepack and a lot of math

young knoll
#

Maff

chrome beacon
#

oh and you need to be on a modern version with shader support

eternal valve
#

Import bukkit.** what should I use or what codes do I know

kind hatch
young knoll
#

Ah shader magic

#

I do like shader magic

sterile token
#

@river oracle are yoo alive bro?

eternal valve
chrome beacon
kind hatch
lost matrix
#

Hm, ive played with the idea of using core shaders for custom interfaces. But
click detection is a problem. As far as i know the client doesnt send any interactions
outside of inventories and the most granular detection you can do are slots.

young knoll
#

I assume you trigger the shader with a title

chrome beacon
#

Basically what you do is you put a shader covering the entire screen

#

and you listen for when a player punches

#

then you get the direction of the player head and calculate where the cursor is

eternal valve
#

In short, can I make a special plugin for button interaction?

young knoll
#

Yeah seems reasonable enough

lost matrix
#

Ooh, right, you could create a virtual cursor and use the clients delta rotation for its movement.

kind hatch
lost matrix
#

Hmm

eternal valve
#

You are so smart😩

young knoll
#

So that cursor is controlled by moving your head

chrome beacon
#

The cursor is rendered by a shader

chrome beacon
#

and your click is the punch and head direction

remote swallow
#

Bandicam

lost matrix
young knoll
#

People haven’t heard of OBS

chrome beacon
#

That's not my video nor my idea. Credits to the people over in the Minestom discord uwu

eternal valve
#

@chrome beacon Is this a mod or a plugin?

mortal hare
#

and custom model data

#

for item 2d models

chrome beacon
#

It's a Minestom implementation

young knoll
#

Basically a plugin but more posh

chrome beacon
#

Yeah

kind hatch
#

Wack

eternal valve
chrome beacon
#

The people in the Minestom discord do some really cool stuff

mortal hare
eternal valve
chrome beacon
#

Even if I had the source it wouldn't run on Spigot

young knoll
#

Hmm maybe I need to stalk the minestom discord for ideas then

kind hatch
#

fr

mortal hare
#

if its minestom then yeah it wouldnt run

young knoll
#

That’s why I’m in the fabric discord

eternal valve
#

A okey

mortal hare
#

can you even have proper survival experience in minestom

#

like many things missing

young knoll
#

With enough work you can

mortal hare
#

lets say i dont need vanilla world generator

#

only movement interactions and pvp

young knoll
#

What about mobs

chrome beacon
mortal hare
#

okay mobs

#

i just think world generation is the hardest one

#

to make

#

faithful to vanilla

chrome beacon
young knoll
#

Oh hey I’ve done that

lost matrix
mortal hare
#

is there any way to lock apps that you run in virtual desktops on win 10?

#

or prelaunch them with a shortcut

#

so i dont have to drag and drop to each virtual desktop each time

#

its annoying

chrome beacon
#

Someone did implement beta world gen in to Minestom

mortal hare
#

i would like to have a shortcut that preloads the apps to the each virtual desktop and maximizes it so i can have proper dev environment in a matter of clicks

chrome beacon
#

Modern worldgen would be a lot harder though

lunar wigeon
lost matrix
chrome beacon
#

Maps would probably work too

mortal hare
#

forget display entities

#

how tf did you got multiline action bars lmao

mortal hare
young knoll
#

He’s trying

lost matrix
kind hatch
#

Wait a minute

lost matrix
# mortal hare

Those arent multiple lines in the action bar. Dont believe what anyone else tells you.

young knoll
#

Boss bars?

mortal hare
#

so wtf is this

#

they dont look like actionbars since those dont have text shadow afaik

kind hatch
#

I want to say invisible item, but I doubt that one myself.

mortal hare
#

bossbars seems like plausible thing

#

or invisible scoreboard with some font exploits (im sure its not scoreboards dont have text shadow)

kind hatch
#

Unless it's more shader magic?

mortal hare
lost matrix
#

Text shadows can be deceiving because you can add/remove them using core shaders 🙂

#

Those are actual lines within the actionbar

mortal hare
#

so you've used shader tricks?

young knoll
#

But you said it’s not an action bar

mortal hare
#

i feel like he's keeping this a secret as kfc's recipe

eternal valve
young knoll
#

My other guess is just using font ascent and negative space

mortal hare
#

and serverside plugin

#

you cant do this with plugin alone

#

forget it

lost matrix
#

And this system was developed in order to have custom huds while still allowing messages above them

eternal valve
mortal hare
#

these days things like this dont require a mod

mortal hare
#

only some shader resource pack logic and plugin to handle the displaying the right things

eternal valve
mortal hare
#

this seems like a shader that renders an inventory differently, plugin handles inventory click events to define what gets rendered after the clicking

#

and hey it even says fuck to you

lost matrix
#

Imagine having to deal with each broken bone individually.
This project was too complicated... Never launched sadly.

eternal valve
#

Thx

young knoll
#

Reminds me of that mod that gives you body parts and health

#

Then you get headshot by a skeleton and die instantly

mortal hare
young knoll
#

Man that shows it’s age right away

#

Remember when GTA5 was new

fervent prawn
#

How to execute code during some time every second and so that I can cancel the execution of this code under certain conditions?

lost matrix
left jetty
#

it was me

chrome beacon
#

Oh hello there

#

I didn't know you kept an eye on this discord

fervent prawn
# lost matrix Start a runnable when your server starts that always runs and add a boolean to e...

I meant a little different.

Can I write something like this?

new BukkitRunnable() {
            int timer = 15;


            @Override
            public void run() {
                if (status.get(victim).equals("agree")) {
                    player.openInventory(VictimInventory.GUI(victim, "Кража"));
                    player.sendMessage(plugin.getConfig().getString("success_of_steal_message"));
                    this.cancel();

                }

                else if (status.get(victim).equals("disagree")) {
                    player.sendMessage(plugin.getConfig().getString("lose_of_steal_message"));
                    this.cancel();
                }

                else if (timer <= 0) {
                    player.sendMessage(plugin.getConfig().getString("waiting_time_expired_message"));
                    this.cancel();
                }

                timer--;
            }
        }.runTaskTimer(plugin, 0, 20L * 5L /*<-- the interval */);```
rose atlas
#
    public class teleportToBlock implements Listener {
        @EventHandler
        public void onRightClick(PlayerInteractEvent event) {
            if (event.getAction() == Action.RIGHT_CLICK_BLOCK){
                Player player = event.getPlayer();
                Location loc = new Location(player.getWorld(), event.getClickedBlock().getX(), event.getClickedBlock().getY(), event.getClickedBlock().getZ(), player.getLocation().getYaw(), player.getLocation().getPitch());
                player.teleport(loc.add(0.5,1,0.5));
            }
        }
    }

I have this but when the player teleports the pitch goes to 0 for some reason?

near junco
#

I've just installed spigot (Im on a MacOS platform), I have dragged my plugin into plugins folder and and stopped and restarted the server multi times and it wont work is there a reason?

rose atlas
#

the yaw works when its literally the smae but the pitch does not

lost matrix
near junco
lost matrix
near junco
#

then ./run.sh

#

the .jar folder is in plugins

lost matrix
#

Look into your log. There is an exception.

rose atlas
near junco
lost matrix
sterile token
#

Hi, how can i add a new remote repo to maven?

remote swallow
#

To publish to?

sterile token
#

to use depends

onyx fjord
#

you wanna host a repo?

sterile token
#

But add it globally

onyx fjord
#

or add a repo to your pom

sterile token
#

I mean add a remote repo but configured already

#

So i dont need to do it on every project the repositry tag

onyx fjord
#

im p sure you have to

lost matrix
#
    <repositories>
        ...
        <repository>
            <id>spigotmc-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
    </repositories>
sterile token
#

Im here but i cant add configure it here

sterile token
lost matrix
sterile token
#

I want to add it because its a work repo

#

And i will code many projects with dependencies from their repo so i will just stablished shit

ivory sleet
#

@lost matrix have u done any1 bytecode manipulation, with/without mixins?

#

i am considering to inject some enum constants but unsure if thats the right approach

lost matrix
ivory sleet
#

well prob compile time

#

if I can

#

just wanted a second opinion

#

in short, minecraft recipe book

lost matrix
#

Yes im currently digging into code generation and modifying existing sources based on annotations.
Pretty much like lombok does it.

ivory sleet
#

ooo how appropriate

sterile token
slender elbow
#

tbh it's far easier to post-process the already compiled classfiles

#

than making a compiler plugin lmao

ivory sleet
#

but well, continuing, im considering to just inject some custom enum constants into the minecraft recipe book category enums

#

since they are enums and not registries for w/e reasons

lost matrix
quaint mantle
#

how to make plugins with c++?

slender elbow
#

i mean, it just depends on what you're doing

lost matrix
#

*on runtime that is

ivory sleet
#

yeaaa

#

hmm

lost matrix
#

And as soon as the classloader touches the enum, all constructors get called.
This will be tricky.

#

I kind of developed the opinion that enums are overused...

ivory sleet
#

well I might as well just pull a classic copy paste and write my own recipe book :|

lost matrix
#

XD

ivory sleet
#

yeah for the open closed principle enums are a troll

lost matrix
quaint mantle
lost matrix
#

You will be much better off writing plugins for a Rust implementation.
If its based on Bevy then you might have a decent time.

quaint mantle
dry hazel
#

there's no official c++ implementation of the mojang server, unless you want bedrock

#

if you want to write plugins for the java server, you can use JNI, but you won't have a good time at all

lost matrix
#

*Up to 1.12.2

#

lol

quaint mantle
#

duckduck go?

#

what is this sorcery

lost matrix
quaint mantle
#
  1. idk java i know c++
lost matrix
#

Dont say performance pls

quaint mantle
#
  1. i forgot
orchid trout
#

ate

ivory sleet
#

(maybe learn java) :>

quaint mantle
lost matrix
#

Cant have enough of those

quaint mantle
#

java is object object object

ivory sleet
#

Yes object orientation sucks but java is multi paradigm you goof

quaint mantle
#

c++ is functionality functionality object functionality

#

what else would i use java for other than plugins for the craft

lost matrix
#

Expand your horizon. Knowing multiple languages is always a plus.
And you will learn to love java and hate C++ in not time.

quaint mantle
#

lol bro

onyx fjord
#

then just use ints, chars, shorts, longs, doubles, booleans, floats

#

no more objects

quaint mantle
#

C++ is my life

#

i have dreams about C++

lost matrix
onyx fjord
#

i have nightmares about managing memory manually

quaint mantle
#

i was on a date with a girl one time and i was just thinking about C++

ivory sleet
quaint mantle
#

the whole ducking time

onyx fjord
#

horrible!

lost matrix
#

Rust is, to put it simply, the superior low-level language.

onyx fjord
#

too high level

quaint mantle
#

garbage collector 🤓

onyx fjord
#

why does internet say rust is low level and c++ is high level

#

strange

lost matrix
flint coyote
onyx fjord
#

some ppl say C is high level

#

all the time

quaint mantle
lost matrix
young knoll
#

C is high level

#

Bet you feel pretty stupid now huh

lost matrix
quaint mantle
lost matrix
onyx fjord
#

only 0's and 1's are low level

lost matrix
# quaint mantle you wish

Well, those are your options.

  • Use a C++ impl from years ago that goes up to 1.12.2 max
  • Learn and use Rust for this very promising Bevy-based impl
  • Leand and use Java for writing Spigot or Paper plugins
quaint mantle
quaint mantle
flint coyote
#

Someone did not get the joke

slender elbow
#

inb4 that DEFCON talk about assembly being too high level

lost matrix
young knoll
#

High level is like

#

Snoop dog

#

And low level is like the binaries

flint coyote
#

are snoop dog binaries open source?

young knoll
quaint mantle
quaint mantle
#

take that with a pinch of salt

lost matrix
#

"Everything that can, will eventually be written in javascript"

young knoll
#

Who cares if it can

#

They’ll do it anyway

quaint mantle
#

so don’t come here talking about one dimensional

#

i know that C is superior in any task

flint coyote
worldly ingot
#

Hot take, whatever language you're most comfortable with is the superior language EmbarrasedAsk

young knoll
#

That’s why I make websites in skript

quaint mantle
worldly ingot
#

If you like Skript, it's great

#

I'd be hesitant to call it a programming language, but yeah

onyx fjord
#

ill make an OS with it then

lost matrix
lost matrix
quaint mantle
#

C is a god complex, C was brought to the world as a celestial object from a different intergalac

worldly ingot
#

Veto this

lost matrix
onyx fjord
#

C is superior

young knoll
#

You could totally make a generic wrapped for C++ plugins

#

But like

#

Why

quaint mantle
quaint mantle
lost matrix
#

C is a really easy and powerful language. The only problem is that you need to invent clay before you can
even think about building a brick house.

onyx fjord
#

coreutils tho

young knoll
#

Do I need to invent water before I invent clay

lost matrix
#

Yes. Start by defining molecules.

quaint mantle
#

people in this day and age are too afraid of technology

young knoll
#

Alright I’m gonna need some hydrogen, some oxygen, and some tape

quaint mantle
#

they are making everything for the simple minded these days

#

like having file extensions off by default on windows

#

which simple minded smooth brained thought that was a good idea

lost matrix
#

That is my very first action when setting up a windows system.

young knoll
#

Never give the average user a jpg

#

They’ll probably think it’s an std

lilac dagger
#

I always have to show my file extension

lost matrix
#

Tinkering with all the braindead folder and file options

lilac dagger
#

It's so annoying

young knoll
#

I heard windows 11 has an option to switch back to command prompt that isn’t buried in the registry

#

That’s nice

quaint mantle
lost matrix
quaint mantle
#

anyone know why dis aint firing?

lost matrix
#

You can probably get a limbo server running with a simple TCP library within a few hours

quaint mantle
#

i rather continue work on my botnet

hazy parrot
#

That sounded like some kind of flex

lost matrix
quaint mantle
#

obv i’m not 57

#

if you were 57 on discord you would need to get a grip big time

young knoll
#

They’re doing a bit

#

But it’s a bad bit

lost matrix
quaint mantle
#

yes

slender elbow
#

proof

#

i don't believe you

quaint mantle
#

i enjoy slamming queer minecraft servers

#

and regular ones of course****

lost matrix
#

Emily coming with the hard words right away...

hazy parrot
#

Ngl

quaint mantle
#

i am the reason you don’t run a server

quaint mantle
slender elbow
#

damn, you got me there

flint coyote
#

that's how the open source mirai botnet (one of the largest botnets) started - they wanted to take down other mc servers so they get more players

quaint mantle
#

i do it for the intent of troll

#

forget advertisement

#

i like to watch stuff burn

flint coyote
#

obviously it wasn't open source back when it started - they open sourced it to prevent getting caught (they still got multiple years of jailtime though)

quaint mantle
#

mine is just a penetration testing tool

#

i’m not going to jail

young knoll
#

Ddos other servers to increase your player count

#

Big brain

lost matrix
# quaint mantle

Recompile, make sure you updated plugin is on the server, and try again.

quaint mantle
#

will do

flint coyote
quaint mantle
#

yeah until the server firewall bans the bots

flint coyote
#

And if you are a server as big as mineplex and you are able to take down hypixel, obviously you'll get a bunch of players

quaint mantle
#

yeah mineplex is SUCH A BIG server rn

flint coyote
#

back then it was

young knoll
#

Man mineplex used to be a serious competitor

#

Rip

flint coyote
lost matrix
quaint mantle
flint coyote
#

mitigating ddos attacks can be expensive

quaint mantle
#

not always

lost matrix
quaint mantle
#

remember the internet is always advancing

quaint mantle
#

actually nvm

hazy parrot
lost matrix
quaint mantle
flint coyote
hazy parrot
#

How can you prevent traffic overload with firewall banning bots

flint coyote
#

unless you just wanna shutdown your server which would cause the ddos to succeed

quaint mantle
#

by banning the bots so the traffic overload stops

flint coyote
#

???

hazy parrot
#

Literally what the fuck

quaint mantle
#

i don’t understand what the fuck ur asking

#

make it clear

#

traffic overload from what

flint coyote
#

How do you think a firewall works?

quaint mantle
#

that just depends on the size of a ddos attack

quaint mantle
hazy parrot
#

I'm asking if you think you can prevent large scale ddos attacks by banning zombies

#

You can't stop network port overloading

flint coyote
#

We were talking about mirai, one of the largest botnets in history

lost matrix
lost matrix
flint coyote
#

I thought about 1.5

quaint mantle
#

no 5 bots wouldn’t do shit

#

even on a good net 1000 bots can still get banned by firewalls these days

lost matrix
flint coyote
#

botnets are more like 400.000

#

and there isn't really an upper limit

quaint mantle
#

yeah the largest net i know of only has 125k bots

#

i might test something

#

someone give me a random minecraft server

quaint mantle
#

go ask in paper

flint coyote
quaint mantle
#

@echo basalt watch out buddy

quaint mantle
worldly ingot
#

ServerConnectEvent is a Bungee event

flint coyote
# young knoll But did it work

I suppose so?
It was even used in order to take down a server that deactivated an encryption virus.
Then google and cloudflare jumped in in order to stop that ddos attack successfully.
Was a really cool story

worldly ingot
#

Unless they said they were using Velocity

quaint mantle
worldly ingot
#

But... they're writing a Bungee plugin...

lost matrix
worldly ingot
#

Oh okay

young knoll
#

Well if I ever want more players I know what to do

lost matrix
#

Which means when i asked if they used the latest version, they lied.
Isnt waterfall discontinued?

quaint mantle
young knoll
#

And they can’t throw me in jail because I’ll ddos the jail

quaint mantle
lost matrix
young knoll
#

Ddos the police comin straight from the underground

quaint mantle
lost matrix
quaint mantle
#

i don’t play minecraft

#

what am i 12

young knoll
#

Probably

lost matrix
#

probably

vagrant stratus
quaint mantle
#

no i remember running a minecraft server like 6 years ago then spigot just came up somewhere so i joined the discord server

#

i’m gonna go chill on irc

lost matrix
vagrant stratus
#

Now that I called you guys nerds, back to figuring out how to re-create an android app's UI kek

lost matrix
#

reee

vagrant stratus
vagrant stratus
lost matrix
#

Oh... isnt that bannable?

lost matrix
vagrant stratus
young knoll
#

The temptation to say figma balls is strong

quaint mantle
#

what forum framework does spigot use

vagrant stratus
#

xenforo

quaint mantle
#

ok

lost matrix
vagrant stratus
#

No CSS needed kek

lost matrix
#

I dont... follow. I would assume that this is backed by css.

vagrant stratus
#

Mayhaps, but I don't do any CSS

lost matrix
#

Understandable

vagrant stratus
#

Dunno what they use for clicky draggy kek

#

for all I know, it could be OpenGL

lost matrix
#

Do you need to deploy for every platform separately?

#

This looks very css'y to me

vagrant stratus
#

It's just to create, share, and test designs for websites, mobile apps, and other digital products and experiences

(totally didn't just steal that off google search)

lost matrix
#

If it works on websites, mobile apps etc then its probably electron

opaque scarab
#

This code should make a team prefix appear next to the player’s username, but it doesn’t seem to affect anything. Yes I did instantiate the listener, and it does work, I checked.

public void onJoin(PlayerJoinEvent event) {
    event.getPlayer().setScoreboard(scoreboard);
}

public void setPrefix(Player player, String prefixText) {
    Team team = scoreboard.registerNewTeam(player.getName());
    team.setEntry(player.getName());
    team.setPrefix(prefixText);
}

What might be the problem?

kind hatch
#

Figma is just a design tool. Its CSS that it displays is kinda superficial as it makes assumptions.

vagrant stratus
#

and a pain to use sometimes kekw

#

Currently trying to figure out how to re-create

return Card(
        margin: const EdgeInsets.fromLTRB(16, 16, 16, 0),
        child: Padding(
          padding: const EdgeInsets.all(12.0),

Using it 🤔

kind hatch
#

wtf is that? lol

vagrant stratus
#

okay so, I was gonna show what it should look like but android studio is being a cuck

#

but that's dart code

opaque scarab
#

I did change the player’s username color through NMS. Could that be causing an issue?

slender elbow
vagrant stratus
lost matrix
opaque scarab
#

Then found out you can change a team’s color

subtle folio
opaque scarab
vagrant stratus
vagrant stratus
kind hatch
#

You want me to do it in figma?

#

Auto layout is OP

vagrant stratus
#

The issue I'm running into is the cards (the white rectangles)

kind hatch
#

What about it specifically?

opaque scarab
# vagrant stratus but

Did you see my message later? I didn’t know you could set a team’s color until days after I added an NMS system to change username color

vagrant stratus
#

?paste

undone axleBOT
opaque scarab
#

Anyways, that was my stupidity

vagrant stratus
#

The text & buttons are fine, the rest is being an uncessary pain lmaoo

smoky oak
#

can the MoveEvent toggle multiple times per tick? If yes, I'd use a 1 tick repeating runnable instead

vagrant stratus
#

The app bar was the easiest part to replicate kekw

kind hatch
vagrant stratus
#

bruh

kind hatch
#

It's what it turns into. :p

#

2 boxes.

#

Surrounded in one container

flint coyote
#

Obviously not. The server does not handle anything more than once per tick

#

Besides Async events ofc

vagrant stratus
rotund ravine
#

Idk if i worded that correctly

rotund ravine
# smoky oak .

It can most likely happen atleast twice if two different players. Not sure if it can happen twice for 1 player.

smoky oak
#

hm

#

its probably better to do a runnable and do some math considering it's only relevant for like 1 / 20 players

rotund ravine
#

Not sure what ur making

lost matrix
#

Yeah what are you doing

smoky oak
#
Location currentLocation = player.getLocation().setDirection(new Vector());
boolean moved = lastLocation.equals(currentLocation);
lastLocation = currentLocation;
if(moved != movedRecently)
  stateChange();
movedRecently = moved;

I'm applying different effects depending if a player is currently standing still or not, ignoring camera rotation

flint coyote
rotund ravine
lost matrix
smoky oak
#

the time since last move isn't important

#

i need basically a ToggleMoveEvent

rotund ravine
#

A task then

vagrant stratus
smoky oak
#

well yea

#

the code above is in a 1/tick runnable

rotund ravine
#

You can probably get away with making that higher

kind hatch
vagrant stratus
#

Correct, figma

smoky oak
#

trust me

rotund ravine
smoky oak
#

you see 50 ms

lost matrix
vagrant stratus
#

I have the code (and therefore the actual app to test), I'm porting that to be able to re-use it for a different project

rotund ravine
smoky oak
#

uh thats not what it translates to

vagrant stratus
lost matrix
vagrant stratus
#

I 100% cannot take it seriously kek

young knoll
#

Wait what does it translate to

kind hatch
vagrant stratus
vagrant stratus
rotund ravine
vagrant stratus
#

^ This is me, I'm that dog

worldly ingot
#

That is a very cute dog

#

He looks like he's having lots of fun

young knoll
#

He may have no idea what he’s doing

#

But he’s vibin

worldly ingot
#

Straight vibin'

vagrant stratus
#

It's likely I'm missing a specific setting or settings kekw

kind hatch
sharp bough
#

is there a way to check if a position is north south etc of another position?

vagrant stratus
sharp bough
#

what is it called?

vagrant stratus
#

So I'm clearly missing something KEK

kind hatch
#

It looks like you're just missing the padding on the outer frame.

vagrant stratus
#

Frame 4?

kind hatch
#

Ye

vagrant stratus
#

no? Weird 🤔

#

I've clearly massively fucked up somewhere along the process LMAO

young knoll
vagrant stratus
#

Yea, discord is 13+

#

KEK

young knoll
#

Did ya make a joke about your age

#

Yeah don’t do that

vagrant stratus
#

You might have to send your example so I can check it side by side, I've definitely screwed up somewhere lmao

young knoll
#

Anyone can just report the message and discord doesn’t want to take chances with the government

smoky oak
#

........

Location currentLocation = player.getLocation();
currentLocation.setDirection(new Vector());
boolean moved = !lastLocation.equals(currentLocation);
lastLocation = currentLocation;
if(moved != movedRecently)
  stateChange();
movedRecently = moved;
``` This triggers when i move the camera, the EXACT thing i wanted to prevent by setting the direction to 0. Anyone an idea why? Do i have to compare the raw x,y,z values?
vagrant stratus
#

well yea, they need proof you're 13 or above

young knoll
#

Just convert both locations to vectors and compare those