#help-development

1 messages · Page 1136 of 1

pseudo hazel
#

nice

#

sounds like something I want

#

but I cba to set it up

sly topaz
#

I just did a powershell script lol, couldn't be bothered to do something proper

pseudo hazel
#

still way better than restarting the server every time

#

and copying the files

blazing ocean
sly topaz
#

yeah, having to restart every time is annoying, though I often mistakenly make code unreachable with hostwapping considering it doesn't re-run the necessary logic lmao

pseudo hazel
#

can anyone explain how JavaPlugin.saveResource works? the docs just say saves the resource at the filepath, but like, how does it get the data to save

sly topaz
#

I have been meaning to make a hotswap agent plugin to do that, but cba to do it yet

blazing ocean
#

i wish you could just do arbitrary code execution with a debugger

sly topaz
#

if you set a breakpoint, it allows you to execute expressions on the go

blazing ocean
#

doesn't do the thing for me

#

well yea

#

but outside of a breakpoint

sly topaz
#

I mean, if you have hotswapping setup, ideally that'd be the case with the debugger

sly topaz
#

though the name is misleading

#

transferResource would've been more clear

pseudo hazel
#

so what does it do then

#

how do I get an output stream into that location

sly topaz
#

it transfers a file from inside the jar to the plugin's data folder

pseudo hazel
#

oh

#

its to load like templates from the jar into the plugin folder

#

for like defaults

sly topaz
#

for whatever you want really, but essentially yeah

pseudo hazel
#

well thats the only usecase I can think of

eternal night
#

Checking in a .idea folder should be punished by a court

pseudo hazel
#

lmao

sly topaz
#

.idea contains code style and whatnot tho

#

you want to keep it, just not all of it

pseudo hazel
#

okay so anyways, how would I save a resource properly

eternal night
#

.editorconfig can do the same

pseudo hazel
#

like I have this data that needs to go in this place

#

which is some folder inside the plugin folder

#

whats the standard way to do that

sly topaz
#

editorconfig can lick dn

eternal night
#

"last_opened_file_path": "/home/radsteve/IdeaProjects/inventoryjam/code-red",

sly topaz
#

I hate it

eternal night
eternal night
#

skill gapped

slender elbow
#

editorconfig is unbelievably based

opaque cove
#

How can I interrupt commands that comes from the console?

sly topaz
sly topaz
#

you can use JavaPlugin#getDataFolder to get your plugin's data folder path

#

shame that there is no method that returns a Path

opaque cove
pseudo hazel
pseudo hazel
#

I was expecting some like plugin.saveFile() or whatever

#

but that would be too easy

eternal night
pseudo hazel
#

oh

#

yeah lemme sneak in and yoink that

eternal night
#

I mean, it just does getDataFolder().toPath() xD

#

nothing to sneak

sly topaz
#

there's no need for such methods on the API when Java's one is perfectly fine for that use-case

pseudo hazel
#

yeah fair

#

I guess im just complaining for little reason'

sly topaz
#

it might be convenient to have a method to save directly to the data folder, but then people would complain about other methods not existing

pseudo hazel
#

anyways, thanks both for helping a fellow out

blazing ocean
#

i have a project (pushed to gh btw) where ij just didn't add run to the gitignore so i pushed my server as well

#

have not been assed enough to remove it yet

#

i have no clue why that often isn't in the default gitignore

opaque cove
#

This code doesnt stop the server to execute commands ._. what can i do

public class ServerCommandListener implements Listener {
@EventHandler
public void onServerCommand(ServerCommandEvent event) {
if(event.getCommand().startsWith("/summon"))
event.setCancelled(true);

sly topaz
#

I don't think there is a slash in the server command event

opaque cove
#

xD im so dumb thanks

sly topaz
#

well tbf the inconsistency with these two events is kinda the API's fault

quaint mantle
#

a

sly topaz
#

why would I care about a slash in the preprocess event

torn shuttle
#

how do I get intellij to figure out which version of my core library to use correctly, I have a project that uses my core library AND implements another plugin that uses the same library but if there's a version mismatch the IDE just can't figure out that I am not using an older version of the core library despite using relocations for the shadowjar on the other plugin (guessing maven doesn't care about relocations)

#

this sucks

opaque cove
#

How can i change the color of the messages that players can send? like the name of the people who send these messages. like i want to change the color from their names to yellow and their message to dark purple

echo basalt
#

do the maven equiv

torn shuttle
#

so I'd exclude the shaded library?

echo basalt
#

ye

torn shuttle
#

hrm

#

oh shit look at the time

#

I have to go to the gym

#

or else I'll end up like illusion

blazing ocean
#

don't be like illusion, kids

glossy laurel
#

Is there an event called for shield disable

torn shuttle
#

you're putting the thought in their heads

opaque cove
#

Hi can anyone help me here? I want the first in yellow and the aftercoming message in darkpurple

#

public class ChatListener implements Listener {
@EventHandler
public void onChat(PlayerChatEvent event) {
String message = event.getMessage();
event.setMessage(ChatColor.YELLOW + event.getPlayer().getDisplayName() + " : " + ChatColor.DARK_PURPLE + message);
}
}

#

the sender name remains white in my case: <Stauder_Blaubaer> Stauder_Blaubaer (yellow) : Test(darkpurple)

echo basalt
#

dawg asks for help and still finds a way to diss me

young knoll
#

The players display name likely already contains colour

#

You should probably strip it

#

Or use event.setFormat

opaque cove
#

what do u mean?

#

do u have any examples?

#

I got it 😄

opaque cove
#

Hi another question. and i cant find it in the spigot bib. how can i get the death location from a player who died? my code by far:

public class OnDeathListener implements Listener {
@EventHandler
public void onDeath(PlayerDeathEvent e) {}
}

worldly ingot
#

e.getPlayer().getLocation() should suffice

#

Unless you need it elsewhere, in which case there's a Player#getLastDeathLocation() I believe?

#

Yes there is, it's used for compasses. But if you need it in that event, just get the player's current location. That will be the death location

opaque cove
#

Theres a little problem i think. i want to tell the player who died the coordinates of his death location cause hes doesnt use F3

#

public class OnDeathListener implements Listener {
@EventHandler
public void onDeath(PlayerDeathEvent e) {
e.getPlayer().getLocation();
}
}

#

and i cant do smt like e.getPlayer().getLocation().sendMessage() or smth else

young knoll
#

sendMessage(getLocation().toString ())

#

Tho the toString format might not be what you want

torn shuttle
#

leg day check

#

have you done your leg day this week

river oracle
#

Does anyone know if
World#getBlockEntity chunk loads if given a position that is outside a currently loaded chunk? (NMS btw)

echo basalt
#

Just look at the impl

river oracle
#

yeah ik I didn't want to open up my project

echo basalt
#

Wondering why tf this entity won't move even though I'm sending packets

river oracle
#

but I'm just doing that now 🤷‍♂️

torn shuttle
echo basalt
#

(I know the deltas are 0 goofy ass)

sly topaz
echo basalt
#

annotations + comments?

sly topaz
#

hidden semantics bother me a lot

sly topaz
torn shuttle
sly topaz
#

but an annotation could do, too

torn shuttle
#

pitch/yaw?

echo basalt
torn shuttle
#

well yeah

echo basalt
#

second screenshot proves the method is called and a packet is sent

#

I cba timing my printscr button but it's not rendering at x934

torn shuttle
#

am I missing something here

#

aren't you always moving it to 0 0 0

echo basalt
#

Not always, just in this scr

torn shuttle
#

are you actually moving it or rotating it

#

cuz rotating is annoying

echo basalt
#

just moving

#

no rotation

#

Here's full method

torn shuttle
#

imagine not using a vector library

#

does the teleport work?

echo basalt
#

neither

#

I made sure to check: No passenger packets are sent either

#

I'm also fetching the entity id directly from the nms entity

sly topaz
#

why do packets at all

#

just spawn the entity and hide it for everyone except the player that is supposed to see it

echo basalt
#

serialization n shit

sly topaz
#

you can use entity snapshot for serialization

torn shuttle
#

sometimes you just want abstract entities

echo basalt
#

Trust me there's a good reason

torn shuttle
echo basalt
#

pretty basic

#

This worked before Idk what broke

#

we did update 1.20.6 -> 1.21.1 and java21 -> java 22

#

that's the only diff

torn shuttle
#

it's hilarious because I have the same code for my thing and it works since I stole your homework I came upon it after a long meditation session with the universe and pulled it from the ether

echo basalt
#

watch it be my java vendor again

#

and using graalvm or something cursed to make it work again

torn shuttle
#

like lmao

echo basalt
#

I wonder where I've seen that

torn shuttle
#

do you believe in coincidences

echo basalt
#

no

torn shuttle
#

well you best start believing in coincidences mr illusion, because you're in one

echo basalt
#

totally

torn shuttle
#

though there's one big difference between my code and yours

#

mine works

#

so it must be better

young knoll
#

Nice git user

echo basalt
#

well yeah but I've had half the server break because we ran zulu instead of temurin

#

I mean

#

there's

#

an alternative 🤔

sly topaz
#

why calculate the distance squared manually when you could do oldPos.substract(newPos).lengthSquared() > 16 * 16

torn shuttle
#

don't know either you're feeding it garbage or there's something really rotten in there

#

or both

#

both is good

echo basalt
#

I have a packet listener

echo basalt
#

that if check might be fucked

chrome beacon
#

commiting as BuildTools 🗿

echo basalt
#

you also get to reuse deltaX

torn shuttle
#

like I give a shit who I commit as, it's a solo project

echo basalt
#

nvm found the issue

torn shuttle
#

trash data?

echo basalt
#

no just a cursed packet handler

torn shuttle
#

cursed setup

young knoll
#

It’s 8 blocks

#

Well, 8 on the negative axis

echo basalt
young knoll
#

7.9999 whatever when going positive l

torn shuttle
#

the fuck am I even reading there

echo basalt
#

getting entity async to update the position of the holograms that are rendering its name

sly topaz
#

I thought the entity was spawned by packets

echo basalt
#

yeah but it follows a real entity

torn shuttle
#

it's entities all the way down

young knoll
#

Imagine not using text displays with transformations

echo basalt
#

and I was returning before writing the original packet if the move packet was sent for a fake entity

echo basalt
torn shuttle
#

dude's probably on bedrock

#

yeah there it is

young knoll
#

Ew

#

Kill it

sly topaz
#

I'm even more confused now

#

but I won't question it

torn shuttle
#

that's fine, you understanding it is not a requirement

young knoll
#

Also that component system

echo basalt
sly topaz
#

people tend to do crazy stuff like we are still in 1.8.8 to do holograms when text displays make it so easy

echo basalt
#

unfortunately I'm building this network for bedrock

young knoll
#

Man is making a minecraft server with unity

echo basalt
#

it's just that spigot is more stable than whatever is out there

echo basalt
torn shuttle
#

unity doesn't use components for health

#

what kind of tweaker would do that

echo basalt
#

cool there's still a delay

#

but does it appear to other ppl

sly topaz
young knoll
#

People would absolutely do that

sly topaz
#

opportunity for a rust fork

torn shuttle
young knoll
#

Have one component for a health bar and another for the entity itself

echo basalt
#

at a network level

young knoll
#

Does bedrock have the bundle packet

echo basalt
#

that's why I'm doing it at a network level

sly topaz
young knoll
#

Because we like the bundle packet

echo basalt
#

oh cool there's still a desync

#

even though I'm sending packets on the same tick

#

unless there's something fucky going on

young knoll
torn shuttle
#

like I didn't try something like that smh

echo basalt
#

prob not

young knoll
#

Lul

echo basalt
#

I managed to get it to work kinda stable by making the armorstand ride the player

torn shuttle
#

hey can you even modify the default interpolation of whatever that is

echo basalt
#

but that causes a bunch of issues and I cba

torn shuttle
#

I don't think you can

echo basalt
#

fuck it time to rewrite half this shit

torn shuttle
#

interpolation is lag

#

if it's hardcoded into the client there's no solution other than modifying the client

#

as it even gets applied to teleports

echo basalt
#

I've only clocked in like 3 hours of "trying to synchronize holograms"

#

totally not a waste of time

torn shuttle
#

I gave up after like 10

#

but then again I didn't really care either

young knoll
#

See on java it’s easy

torn shuttle
#

only as of us having text entities

#

because we can change the interpolation on those

echo basalt
#

scoreboards go brr

lost matrix
#

What are we trying to synchronize holograms with?

torn shuttle
#

entities

echo basalt
torn shuttle
#

ez

echo basalt
#

I just deleted the whole class dw about it

#

rewriting it all

torn shuttle
#

just program a forward projection of player movement loser

lost matrix
#

So... just mount a text display entity?

echo basalt
#

yeah but bedrock

torn shuttle
#

predictive movemnet AI

echo basalt
#

no display entities

sly topaz
#

they're doing bedrock

torn shuttle
#

get good

echo basalt
#

gotta mount some armorstand

sly topaz
#

but doesn't bedrock do server-side player movement?

young knoll
echo basalt
#

uh great question

#

I cba

sly topaz
#

how can it even get desync

#

well, ig the bridge fucks that up

echo basalt
#

I think I'll just use a real entity and just not bother

torn shuttle
#

either that or I only started doing it when those displays came out

echo basalt
#

production servers get deleted after runtime anyways

torn shuttle
#

wait what kind of cursed setup is this actually

echo basalt
#

It's quite cursed

torn shuttle
#

it's moving with player movement so the underlying entitiy is a player

echo basalt
#

When I move the hologram moves with me

torn shuttle
#

but it can be fixed by using a real entity?

#

how does that fix it?

echo basalt
#

I'll mount the entity

torn shuttle
#

ah

echo basalt
#

I just cba writing mounting logic for uh

torn shuttle
#

that might do it

echo basalt
#

packet entities

#

I did it

#

had all sorts of floating holograms n shit

torn shuttle
#

we all love invisible entities running all game logic

#

I heard my team has been programming invisible rabbits to do proximity checks based on aggro before I implemented zone entering and exiting in my scripting

#

after I made fun of WoW for doing that

#

so at least they're paying attention to what I say I guess

young knoll
#

Hey if you already have a system that does something similar

#

Why remake it

echo basalt
#

cool now that I implemented it using real entities and stuff

#

I can't teleport because teleports with passengers is big nono

buoyant viper
#

hmm @jagged quail

quaint mantle
#

yo

#

does someone know

#

how to make the player take damage

#

with player.setAllowFlight(true)?

remote herald
#

I am inquiring about someone who knows the plugin Magic Spells

sullen marlin
quaint mantle
#

omg md_5

young knoll
#

Might disable fall damage?

quaint mantle
#

No i mean fall damage

young knoll
#

I think that’s only when they start flying tho

quaint mantle
#

Because with that, player doesn't take fall damage

river oracle
#

As expected MerchantMenu is a pain in the ass 😭

worthy yarrow
#

You can still mess with the health attribute even if their flying is allowed couldn't you?

river oracle
#

you can mess with any attribute while the player is doing anything besides logged out ig

worthy yarrow
#

Well yeah I just said it in a non aggresive way ig kek

river oracle
#

oh I thought you were asking a question lmao

worthy yarrow
torn shuttle
worthy yarrow
torn shuttle
#

I'm starting to regret shading this library in

worthy yarrow
#

Every time I use minimessage by shading all of adventure kek

river oracle
#

I wish MerchantMenu didn't exist

torn shuttle
#

damned thing

#

it's stuck on a previous version

#

I can't tell if it's a cache or a resolution bug

#

hm

#

yeah I can't tell

river oracle
#

I'm so braindead

#

Legit forgot to reasign my IMMUTABLE builders

#

I made them immutable how tf did I forget

quaint mantle
#

If i remember there was a way to get the player by uuid, what was it?

#

Oh, forget abt it, already found

quaint mantle
#

Bukkit.getPlayer(UUID);

quaint mantle
river oracle
#

lord our savior forgive me for my sins

    public static void openMerchantMenu(EntityHuman player, ContainerMerchant merchant) {
        final IMerchant minecraftMerchant = ((CraftMerchant) merchant.getBukkitView().getMerchant()).getMerchant();
        int level = 1;
        if (minecraftMerchant instanceof EntityVillager villager) {
            level = villager.getVillagerData().getLevel();
        }
        minecraftMerchant.setTradingPlayer(player);

        // Copy IMerchant#openTradingScreen
        OptionalInt optionalint = player.openMenu(new TileInventory((unusedSyncId, unusedPlayer, unusedHuman) -> merchant, null));

        if (optionalint.isPresent()) {
            MerchantRecipeList merchantrecipelist = minecraftMerchant.getOffers();

            if (!merchantrecipelist.isEmpty()) {
                player.sendMerchantOffers(merchant.containerId, merchantrecipelist, level, minecraftMerchant.getVillagerXp(), minecraftMerchant.showProgressBar(), minecraftMerchant.canRestock());
            }
        }
        // End Copy IMerchant#openTradingScreen
    }```
#

this is so fucking scuffed

#

time to make it even more scuffed by ripping out openMenu nad replacing it with different code 🙂

honest swan
#

I have a loop that sends admin all the key and values of an entry in the database

#

for example item.5 have price, min, max, type it should iterate through those and print it out to player

#

but it didnt print anything at all

quaint mantle
#

Yaml?

honest swan
#
item:
  "5":
    type: cobblestone
    max: 7.5
    min: 3.75
    price: 5.625
    category: BLOCKS
    sold: 12
#

yep

quaint mantle
#

Get the configuration section named "item" then do getKeys(false)

#

You can iterate to display the data

honest swan
#
  ConfigurationSection itemSection = database.createSection("item."+args[1]);
  sender.sendMessage(ChatColor.GREEN+"Data of ID "+args[1]);
  // Assuming 'database' is your FileConfiguration instance
  // and 'player' is the player you want to send the data to
  for (String k : itemSection.getKeys(false)) {
    String v = itemSection.getString(k);
    sender.sendMessage(ChatColor.GOLD + k + ": " + ChatColor.GRAY + v);
}
#

this is the current code

river oracle
#

yaml never fails to be cursed

quaint mantle
#

The values have different types

honest swan
#

My laptop too poor to run IntelliJ IDEA and Minecraft at the same time 😭

quaint mantle
#

OS?

honest swan
#

Vanilla OS 2 Orchid

#

Based on Debian Sid

quaint mantle
#

Good

honest swan
#

oh v

#

yea it's still blank

quaint mantle
#

Did you just use file configuration to get the keys?

honest swan
#

:/

#
  ConfigurationSection itemSection = database.createSection("item."+args[1]);
  sender.sendMessage(ChatColor.GREEN+"Data of ID "+args[1]);
  // Assuming 'database' is your FileConfiguration instance
  // and 'player' is the player you want to send the data to
  for (String k : itemSection.getKeys(false)) {
    Object v = itemSection.get(k);
    sender.sendMessage(ChatColor.GOLD + k + ": " + ChatColor.GRAY + v);
}
quaint mantle
#

use getConfigurationSection not create

honest swan
#
> dynshop info 5
[11:32:11 INFO]: Data of ID 5
#

wha-

#

bruh

quaint mantle
#

Did it print out?

honest swan
#

one moment

#

it's still blank??

quaint mantle
#

Hmm. Check the config file in plugins folder

honest swan
#
item:
  "5":
    type: cobblestone
    max: 7.5
    min: 3.75
    price: 5.625
    category: BLOCKS
    sold: 12
#

the full file is 26kb

#

real

quaint mantle
honest swan
#

other functions works correctly

#

uhm

#

I refreshed the editor

#

and 5 became {}

quaint mantle
#

Ofc because create override existing data to empty

honest swan
#

😮 now I see

#

fixed it

#

thank you!

#

now my tab completer wont corrupt my database randomly xd

barren fulcrum
#

hiiii, i have a question: How do I get number from the config? I'm new to java T-T

Inventory gui = Bukkit.createInventory(null, 18, "Test");

How do i replace the number eighteen with the number in my config.yml?

gui:
  gui_size: 9
#

instead of 18, i want to replace it with the number set in the gui_size: config.

quaint mantle
#

getConfig() from your plugin then pass it down to whatever method you calling that piece of code then config.getInt("gui.gui_size")

barren fulcrum
quaint mantle
#

Well I'm using my phone rn

barren fulcrum
#

Ah sorry my bad!

quaint mantle
#
@Override
void onEnable() {
  saveDefaultConfig();
  Inventory i = Bukkit.createInventory(null, getConfig().getInt("gui.gui_size"), "Test");
}
barren fulcrum
#

hmm

#

it doesnt seem to be working properly

#

Ty for the help!

viscid carbon
#

Hello, need a bit of help.. Does this not work? just displays nothing java i.getItemMeta().getItemName()

quaint mantle
#

If item isn't renamed, the getItemName returns null

glad prawn
#

it's marked NotNull in api

river oracle
#

there are to many names etc etc so annoying

#

you looking for getDisplayName or getTranslationKey which you can wrap in a translatable component

quaint mantle
#

Is there a way to detect packets?

#

like certain type of packets without protocol lib

river oracle
quaint mantle
#

are they a part of spigot?

river oracle
quaint mantle
#

noo I dont wanna use a lib

river oracle
#

otherwise you have to use NMS and inject into netty yourself

#

have fun good luck lol

quaint mantle
#

yes that

#

I did manage to make it work but I forgot how

river oracle
#

you are on your own for that then lol

#

the libraries exist for a reason

#

and the ones out there are great

#

sometimes reinventing the wheel is just dumb

quaint mantle
#

cmon its fun

river oracle
#

If you want to toy around with it just don't come here for help :P The point of toying around is self exploration and pushing your boundaries

#

atleast look at what you know works

quaint mantle
#

alr thanks

glossy laurel
#

Guys, I have a hashmap that contains all online players' data, and it works by mapping player's uuid to their data. Is there any other way to stire and get data from a Player

remote swallow
#

pdc

glossy laurel
#

Okay idk how tf I didnt think about that

#

But lets say

#

I need to be able to load a player any time and save data in files

remote swallow
#

a database

glossy laurel
#

Yeah I get it but like whats a good way of linking a player and their data

remote swallow
#

their uuid

glossy laurel
remote swallow
#

pretty much

glossy laurel
#

Big hashmap from uuid to data?

humble tulip
#

No

glossy laurel
#

Well not rly big

#

Only for online players

humble tulip
#

Big database with data

glossy laurel
humble tulip
#

Hashmap stores stuff temporarily

glossy laurel
#

Yeah thats what I do

#

Rn

humble tulip
#

Like when a player joins or someone runs a command for an offline players data

glossy laurel
#

Yeah ik

half fable
#

how do i check if a player is riding an entity or not before they quit and take actions necessary?. I want to unmount players if they are riding an entity before quiting server

robust jolt
#

Hi, using InventoryClickEvent, can I get the clicked item?

warm mica
sullen rock
#

is there a way to get the dropped items of a block in a break event?

eternal oxide
#

no

#

it has its own event for drops

sullen rock
#

how would i get the drops

eternal oxide
#

in the block drop items event

sullen rock
#

is it possible to do it if the break event is cancelled?

eternal oxide
#

no

sly topaz
#

you can get the drops, but it won't be the exact same drops

#

rather than getDrops it should be called calculateDrops tbh

bold coyote
#

how do i make my plugin compatible from 1.8.8 to the latest version?

#

or is it not possible?

#

thank you

eternal oxide
#

a lot of hard work

#

only use the 1.8 api

bold coyote
bold coyote
#

because i want it cross compatible, like a core plugin

quaint mantle
#

Viaversion

#

Check their compat list

bold coyote
#

and i want to use the same thing on different versions

#

without any hassle

quaint mantle
#

You mean like nms?

bold coyote
quaint mantle
quaint mantle
#

Make a interfaces like ActionBarNms then create modules for each version you willing to support. Then in these modules you implement the interfaces like ActionBarImpl. When loading you check the version and select the correct implementation.

wet breach
sullen rock
#

what's the event for right clicking on a blast furance?

chrome beacon
#

PlayerInteractEvent

sullen rock
#
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEvent;
import java.util.EventListener;

public class smelting implements EventListener, Listener {

    @EventHandler
    public void onInteract(PlayerInteractEvent e){

        Bukkit.broadcastMessage("triggered");

        }

    }

}``` 
it doesn't trigger for some reason
quaint mantle
#

Remove EventListener use bukkit's listener

#

Smelting instead of smelting

#

Make sure that you registered the listener in onEnable method

cunning bane
#

Hello I Coded a gui but how Can i change the texture of the gui. I know I’m wrong here but Idk where to ask

chrome beacon
#

Use a resourcepack and a custom font

sullen rock
#

yeah

sullen marlin
#

Make sure youre holding an item

sullen rock
#

what's the event if their not holding an item?

young knoll
#

There is no event for right clicking air without holding an item

#

All other actions when not holding an item will trigger PlayerInteractEvent

echo basalt
#

Packets are simply not sent

sly topaz
#

just put an interaction entity on the player's pov if you want to detect that

sullen rock
remote herald
#

anyone know magic spells

hazy parrot
#

Avada Kedavra

static quiver
#

Guys, Gradle does not find the WolfyUtils dependency and classes at all

I tried to talk with the plugin owner and no success, and i tried to ask in his discord server and again, no success

is there any trick that i can do to solve this?

chrome beacon
#

Well what did you try

halcyon hemlock
#

abracadabra

#

shoo

#

🪄

remote herald
#

haha

static quiver
blazing ocean
#

thats not gradle

chrome beacon
#

^^

halcyon hemlock
#

the fuck

pseudo hazel
#

looks like js

pseudo hazel
#

imagine using a byte array

#

what even is that

#

i dont wanna see the implementation of that method 💀

sly topaz
eternal oxide
#

its just a matrix mask used for shifting

sly topaz
#

Burst is a C# compiler to native for Unity, kinda like Graal Native Image

warm musk
#

Utils.java
https://sourceb.in/QxF0lNWH9f

config.yml

prefix: "Creusa > "

reloaded: "%prefix%&aPlugin başarıyla yeniden yüklendi!"
vote:
  - "&a----------------"
  - "Vote  Linki: <link:https://creusanw.com/vote:&#FF0000Tıkla>"
  - "&b----------------"
  - "&x&F&C&9&9&0&0ʜ&x&F&C&9&9&0&0ᴜ&x&F&C&9&9&0&0ʏ&x&F&C&A&3&1&Aꜱ&x&F&D&A&D&3&3ᴜ&x&F&D&B&8&4&Dᴢ &x&F&E&C&C&8&0ʙ&x&F&E&D&6&9&9ᴏ&x&F&E&E&0&B&3ᴛ&x&F&E&E&B&C&Cʟ&x&F&F&F&5&E&6ᴀ&x&F&F&F&F&F&Fʀ&x&F&F&F&F&F&Fɪ"

site:
  - "----------------"
  - "Site  Linki: https://creusanw.com"
  - "----------------"

https://i.hizliresim.com/85qxny9.png

how can i solve this?

sly topaz
#

besides I don't know what is supposed to be solved there

warm musk
sly topaz
#

If so, you'd have to parse the colors yourself wherever you parse that link placeholder

warm musk
pseudo hazel
#

what kinda format is that even using

#

<link:

#

is that minimessage?

sly topaz
#

they probably have their own parsing

#

because that isn't minimessage

pseudo hazel
#

okay

sly topaz
pseudo hazel
#

since &#FF0000 isnt standard syntax for colors either

sly topaz
#

that is way better than the monstrosity below

warm musk
pseudo hazel
#

no

#

the code

warm musk
#
public static TextComponent parseClickableMessage(String message) {
        // <link:URL:Mesaj> formatına uyan regex
        Pattern pattern = Pattern.compile("<link:(https?://\\S+):(.*?)>");
        Matcher matcher = pattern.matcher(message);

        if (matcher.find()) {
            String url = matcher.group(1);   // Link kısmı
            String clickableText = matcher.group(2);  // Tıklanabilir metin

            // Renk kodlarını çevirmek için translateColorCodes fonksiyonunu kullan
            clickableText = translateColorCodes(clickableText);

            // Tıklanabilir TextComponent oluştur
            TextComponent clickableMessage = new TextComponent(clickableText);
            clickableMessage.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, url));

            // Mesajı tıklanabilir hale getir
            String[] parts = message.split("<link:.+?>");  // Link harici kısımları ayır
            TextComponent finalMessage = new TextComponent();  // Boş bir TextComponent başlat

            // Hex kodlarını ve renk kodlarını düzgün işlemek için önceki kısmı işle
            if (parts.length > 0) {
                finalMessage.addExtra(new TextComponent(translateColorCodes(parts[0])));
            }

            // Tıklanabilir mesajı ekle
            finalMessage.addExtra(clickableMessage);

            // Eğer link sonrası başka metin varsa ekle
            if (parts.length > 1) {
                finalMessage.addExtra(new TextComponent(translateColorCodes(parts[1])));
            }

            return finalMessage;
        }

        // Eğer eşleşme yoksa sadece renk kodlarını çevir ve mesajı döndür
        return new TextComponent(translateColorCodes(message));
    }
pseudo hazel
#

can you print what clickable text is after translating the color codes

sly topaz
#

it is so well formatted that it looks AI-generated

warm musk
#

im new at java

#

i started yesterday

pseudo hazel
#

what does translatecolor codes even do

warm musk
pseudo hazel
#

no

#

the code

sly topaz
#

well, I'm out of this one, good luck Steaf

pseudo hazel
#

when I ask for what someing does im usually referring to the code that does the thing, instead of the result

warm musk
# pseudo hazel the code
 public static String translateColorCodes(String text){


        String[] texts = text.split(String.format(WITH_DELIMITER, "&"));

        StringBuilder finalText = new StringBuilder();

        for (int i = 0; i < texts.length; i++){
            if (texts[i].equalsIgnoreCase("&")){
                //get the next string
                i++;
                if (texts[i].charAt(0) == '#'){
                    finalText.append(net.md_5.bungee.api.ChatColor.of(texts[i].substring(0, 7)) + texts[i].substring(7));
                }else{
                    finalText.append(ChatColor.translateAlternateColorCodes('&', "&" + texts[i]));
                }
            }else{
                finalText.append(texts[i]);
            }
        }

        return finalText.toString();
    }
pseudo hazel
#

you need to print the finalText and see were the color went

#

also if you dont understand what code you write/paste in your plugin then it will really hard to get anything done properly

pseudo hazel
#

I would atleast take the time to thoroughly ask gpt why he spat out what he did

#

to help understand where it could be going wrong

#

because its pretty hard for anyone to judge if ai generated code even works because the bugs are usually very subtle

warm musk
#

yes

slender elbow
#

ai generated code only works for code tailored models

#

not chatgpt

#

chatgpt is a conversational machine

#

it's a bullshit spewer

#

speaks yappanese

#

professional rambler

inland patrol
#

Hi, is there anyone who could help me with MySQL.

warm musk
#

how can i use hex color code in plugin config.yml

&x&r&r&g&g&b&b
&#RRGGBB

inland patrol
#

§

pseudo hazel
#

the top one is the native one

slender elbow
#

the first one will work fine you just need to pass it through ChatColor.translateAlternate....

#

make sure to use net.md5.bungee or whatever ChatColor and not org.bukkit.ChatColor

slender elbow
inland patrol
#

Y'as t'il un fr qui s'y connais en MySQL ?

pseudo hazel
#

this server is english only sorry

slender elbow
#

excuse me

eternal night
#

you are excused

slender elbow
#

preach

inland patrol
#

🙂

halcyon hemlock
#

for SIMD operations

#

that specifically is for switching from big endian to small endian

#

well a snippet of it

pseudo hazel
#

hmm right

#

magic

glossy laurel
#

Okay so my plugin started throwing NPEs and cant pass events and everything broke

#

But

#

Seems like noone replaced jar in runtime

#

Could it be because it threw 1 exception befire or smth like that

#

Cuz it throws exception when data for 1 player isnt loaded

halcyon hemlock
#

YO WHAT THE FUCK

#

+100% performance is crazy

sly topaz
#

do a bunch of samples and graph it

halcyon hemlock
#

thats with 150k samples

#

this is the other guys nbt

sly topaz
#

doesn't seem to be all that different in performance?

halcyon hemlock
#

yeah but simdnbt is the best

#

out of all

sly topaz
#

I mean, that's a ~0.5% advantage in performance that ferrum has on it, but that's only if the benchmark isn't flawed

halcyon hemlock
#

yeah but I made it myself

#

wanna see comparison with other libraries?

sly topaz
#

sure

halcyon hemlock
sly topaz
#

the fact that ferrum and simdnbt implementations are so fast they have to be measured in us at that point 💀

#

wonder if anyone ported their impls to Java yet

halcyon hemlock
#

yeah but java doesn't allow low level control over pointers as much as rust so it'd be hard I suppose

sly topaz
#

that doesn't matter, the key part of the logic is the vectorization

#

at least for simdnbt, don't know what ferrum does

#

with the incubating vector API, I'm sure one could do it. I have an old processor so I wouldn't be able to test it effectively

remote swallow
#

Maybe you should see what sweattypalms activity rn is

echo basalt
sly topaz
halcyon hemlock
halcyon hemlock
sly topaz
#

nice, cool project you got going on

halcyon hemlock
#

I mean I got some people helping me right now

#

And I'm not giving up anytime soon

#

Right now we're rewriting everything

#

Mainly because this was supposed to be a project to help me learn rust. But it turned to something bigger than I expected.

sly topaz
#

is your priority being fast more than it is feature parity

halcyon hemlock
#

I mean like 2:1 ratio

#

I just want to learn cool stuff

#

I was thinking of stuff like implementing actual machine learning models into the AI

#

Although don't know how that'd go

sly topaz
#

my ultimate tip is just to not get lost on the benchmarks

#

it is hard to get the whole picture when testing individual systems, because when they are being used all together, they might shit the bed in unexpected ways

hybrid spoke
#

preoptimization is the root of all evil

halcyon hemlock
#

But then again, some is better than none I guess

#

Because otherwise you need to redesign complete systems

sly topaz
#

issue is the individuality that comes with performance

hybrid spoke
#

make them modular enough

#

dont think of it as „it needs to be good to run“ but as „once it runs bad, i can easily switch this out“

halcyon hemlock
#

I'll keep that in mind

halcyon hemlock
#

Decoupling is always nice, future changes are way easier

hybrid spoke
tender shard
lost matrix
#

ConcurrentModificationExceptions

#

smh

sly topaz
#

the exception says concurrent so that means I must use a concurrent map EmojiNerd

echo basalt
#

I feel like I'm being called out lmao

tender shard
#

tbf in 99% of cases it's a valid fix

tender shard
echo basalt
#

I also saw like a 50% performance improvement by converting a bunch of locations to vectors and performing distance checks

#

as it no longer needs to do world checks

pseudo hazel
#

i blame the world

echo basalt
#

or create references when creating location objects

tender shard
pseudo hazel
#

location is the bane of my deserialization

echo basalt
sly topaz
#

why, it is just three doubles and two longs

pseudo hazel
#

and a world

sly topaz
#

two longs for the world UUID

echo basalt
#

every point in the surface is in the same world so the world checks are wasteful

sly topaz
#

nobody cares about pitch and yaw

pseudo hazel
#

yes

#

but that world is what breaks just readin the file if the world doesnt exist

#

atleast ot used to for file configurations

sly topaz
#

I mean, that's why you use the UUID, so you can check whether the world exists on deserialization

pseudo hazel
#

yesh but

#

i didnt implement that

echo basalt
#

who's out there renaming worlds tho

pseudo hazel
#

im jjst using the api

echo basalt
#

I still feel like world uuids are slightly stupid compared to just world names

sly topaz
#

uuid/name, it doesn't really matter, as long as it is something that can be serialized

tender shard
echo basalt
#

and I also hate the getUID method naming

echo basalt
#

too late to change

tender shard
pseudo hazel
#

oh yeah it does

#

funky

sly topaz
echo basalt
sly topaz
#

since the uuid + doubles combo is predictable, you could probably compress it better

tender shard
echo basalt
tender shard
pseudo hazel
#

yeah if you save location to nbt bytes its better with uuid compared to name obv

echo basalt
#

4 ints

slender elbow
echo basalt
#

take it or leave it

sly topaz
echo basalt
slender elbow
#

t

echo basalt
#

_ _

slender elbow
#

😌

pseudo hazel
#

4 ints is nice until you need to make the uuid out of it again

tender shard
tender shard
inland patrol
#

Who could help me to synchronize my faction plugin in MySQL. Because I have a problem when I'm on the first server, everything works fine with MySQL, but when I go to the other server, nothing is taken into account. I have to restart the second server each time.

pseudo hazel
#

string is better if its a short name

echo basalt
#

5 bucks says he's loading every faction's data on startup

tender shard
#

"yo I got this 48 gb big world. I wonder whether storing the reference to it as UUID instead of string will save me 4 bytes"

echo basalt
#

half of it being empty chunks anyways

narrow quest
#

When setting gamerules do they save on server restart, and is there a way to not have them save?

echo basalt
#

let's have a meeting to discuss about it

#

make sure to bring a slide deck

pseudo hazel
#

well you have to care at some point

chrome beacon
echo basalt
#

after the meeting we'll have a meeting to discuss our decision

pseudo hazel
#

you dont know how many locations are being used in that world file

echo basalt
#

and another meeting to see if it's financially viable

tender shard
echo basalt
#

can't be velocity

inland patrol
echo basalt
inland patrol
#

I'm on bungeecord

echo basalt
#

That doesn't really affect it

chrome beacon
#

Could send data over redis or smth

#

It really depends on what you're trying to sync

#

and how it's being used

fluid river
#

i need helb

#

free regex lessons

#

i have a cringe task

ivory sleet
#

we love regex

nocturne mauve
#

can someone help me? does anyone know how to use Citizens 2 Mod? im trying to build a concert stadium with NPC'S, so does anyone know how i could like MASS spawn them instead of just one by one placing like 5000 npcs?

nocturne mauve
#

i still need to make them look at the stadium tho

#

am i even on the right channel rn lmao

fluid river
#

it's for plugin development

nocturne mauve
#

shit

fluid river
#

not sure about mods(there might be modders too)

nocturne mauve
#

im just here asking for help for plugins not really on their development but uhh

pseudo hazel
fluid river
nocturne mauve
#

oh ok thanks guys

fluid river
#

there is a line with numbers, splitted by random characters like this:
1\n1.1 12345/1e10]-1e-2
so basically they are 1 -1.1 12345 1e10 -1e-2
i need to read all those numbers from string with regex
so all possible variants are NUM [+-]NUM NUM.NUM2 [+-]NUM.NUM2 NUMeNUM2 [+-]NUMe[+-]NUM2
then convert all of them to float and add to final sum
i'm not allowed to use .split or .trim, but i can use regex

viscid carbon
#

Im just trying to display it to what the player sees Iron Sword instead of IRON_SWORD

#

i.getType().name().replace("_", " ").toLowerCase()) seems like too much to do this

river oracle
#

because the only proper way to do that is a translatable component

#

otherwise you can't really tell what a player sees

viscid carbon
river oracle
#

you can't serialize translatable components to strings

#

they're only rendered client side

sly topaz
#

what is ComponentSerializer, is that a Spigot thing

river oracle
#

must be

#

idk

heavy mural
#

Is there a way to deny players from being affected (having the effect applied to them) by strength and weakness?

tall dragon
cedar flume
#

Hey,
I take it Particle.REDSTONE changed recently(ish?)

Just came back to update a few of my plugins from 1.18-1.20 to 1.21+
but seems Particle.REDSTONE no longer exists.

does anyone have a snippet to show how I may use that same particle in 1.21?
my previous code was as follows:

    public static void mark(Block b, Color c){
        b.getWorld().spawnParticle(
                Particle.REDSTONE,
                b.getLocation().add(new Vector(0.5,1,0.5)),
                1,
                new Particle.DustOptions(c, 2)
        );
    }
smoky anchor
cedar flume
#

Any idea how I can achieve what Particle.SMOKE_LARGE used to be?
is that now CAMPFIRE_SIGNAL_SMOKE?

quaint mantle
#

How can i make players take fall damage with player.setAllowFlight(true)

quaint mantle
#

☠️

river oracle
#

look up the fall damage formula and calculate in PlayerMoveEvent

quaint mantle
#

ok

river oracle
#

Idk why you'd ever want to do that

quaint mantle
#

me neither

river oracle
#

I'd never use fly on your server if it was that shit

quaint mantle
#

i js want players double jump

#

not for flying

cosmic elk
#

currently working on a system for an item that when the user drops, dies, or leaves the server the PDC on the item are removed and reset, how would i check if the item is moved between the containers of the players inventory and a chest, barrel, etc.

river oracle
quaint mantle
#

k

#

thx

#

but

#

how can they double jump again

river oracle
quaint mantle
#

how can ido it

#

my mind is explodin rn lol

cosmic elk
#

why not use 'InventoryMoveItemEvent'?

sly topaz
#

I'm aware that it makes handling the passing of data easier since you don't have to manage it; if metadata didn't have those leak issues I would recommend that but it isn't an option so you'd have to manage it yourself

cosmic elk
#

also leak issues?

heavy mural
young knoll
cosmic elk
#

ohh i see

#

i thought it could be used for player inventories as well

acoustic veldt
#

hey, i want to support every message format but my class is not working. I used Adventure api (minimessage):

        if (message == null) return Component.empty();
        String parsedMessage = fixHexColors(parsePlaceholders(player, message));
        Component miniMessageComponent = miniMessage.deserialize(parsedMessage);
        Component legacyComponent = legacySerializer.deserialize(legacySerializer.serialize(miniMessageComponent));

        return legacyComponent.style(style -> style.decoration(TextDecoration.ITALIC, false));
    }```
can someone teach me or notice what exactly im doing wrong?
#

then I use in some other methods

        if (message == null) return;
        Component parsedComponent = parse(message, player);
        adventure.player(player).sendMessage(parsedComponent);
    }```
river oracle
#

don't mix components and legacy

#

it just doesn't work nor will it ever do what you want it to

#

use MiniMessage and make people adopt a sensible standard

#

all plugins should use mini message or a similar format legacy needs to just go away

acoustic veldt
#

I think it

#

but some of my customers want legacy

#

i dont know what should I do

river oracle
#

tell them to learn minimessage

#

its a far superior format and its very simple

acoustic veldt
#

and how to set components in display names, lore, signs, etc using spigotapi?

river oracle
#

if they can't understand minimessage they probably shouldn't be making a server 🤷‍♂️ just my thought

acoustic veldt
#

then if i want to make a plugin 1.16+ i will need to do code per version 😢

river oracle
#

yes

#

drop legacy support have you ever looked at the pie chart of server verison distribution

#

might change your lense on supporting legacy

#

by dropping 1.16 you lose around 7% market share negligable

#

if you only support 1.20 up you capture around 70% of the market share

acoustic veldt
#

aggg i dont want to use nms 😢

#

is there any other way to support minimessage to string?

river oracle
#

legacy parser, but it sucks

#

you should really just use components with NMS

#

adding component support with NMS is pretty much little to no work

acoustic veldt
#

can u show examples? i dont know anything about nms

acoustic veldt
#

thank u

grim hound
#

Having a compiled .jar, how can I recompile it and add a little prefix to its packages?

#

Basically just add a package prefix to a jar

river oracle
#

because you'd need to remap reflections

grim hound
river oracle
#

Obj asm can be used outside of runtime

grim hound
river oracle
#

just relocate

grim hound
#

How can I do that?

river oracle
#

idk how i don't use maven

#

can help you if you use gradle 🤫

grim hound
#

Gradle

#

I use gradle ofc

grim hound
#

Okay so for example

quaint mantle
#

so i’m looking to put a image for example like a png image onto a lord of a item so when they hover over it they seee the photo i know this is possible but any clue how?

young knoll
#

Resource pack

quaint mantle
#

only way?

young knoll
#

Turn the image into a custom character in a font

#

Or recreate it with a bunch of square characters, but that’s not gonna look too good

quaint mantle
#

i couldn’t put import the png to my dedi server and upload all the images and then put like a url in a sense?

young knoll
#

No

quaint mantle
#

that sucks

cosmic elk
#

im struggling a lot with this, why does it only say 'Moved!' to the player only some of the time, and sometimes it doesnt even send it under the circumstances i set it to be

    public void onInventoryDrag(InventoryDragEvent event) {
        if (event.getWhoClicked() instanceof Player) {
            Player player = (Player) event.getWhoClicked();

            Inventory destination = event.getView().getTopInventory();
            Inventory orgin = event.getView().getBottomInventory();

            if (destination.getType() != InventoryType.PLAYER) {
                if (orgin.getType() == InventoryType.PLAYER) {
                    player.sendMessage("Moved!");
                }
            }
        }
    }```
young knoll
#

That’s only for drag events

#

Add one for click events

cosmic elk
#

well i have one for click events but i assumed id only need one for shift click

#

i wish there was an easier way to detect this i have no idea what im doing :/

#
    public void onInventoryClick(InventoryClickEvent event) {
        if (event.getWhoClicked() instanceof Player) {
            if (event.getClickedInventory() != null && event.getClickedInventory().getType() == InventoryType.PLAYER) {
                if (event.isShiftClick()) {
                    ((Player) event.getWhoClicked()).sendMessage("You moved the item out of your inventory!");
                }
            }
        }
    }``` 

heres all of that code if its needed
young knoll
#

You can move an item out of your inventory without shift clicking

#

By just dragging and then placing it into the other inventory

cosmic elk
#

well yeah i know thats what the InventoryDragEvent was for, i wanted the click event to check for shift clicks and the drag checking for drag ones, but again i have no idea what im doing

grim hound
#

does the client ever send it's fov?

young knoll
#

When you just place it directly it’s a click event

torn shuttle
#

I want to find the person who invented the maven/gradle cache and 1v1 them knives only in cs:go except it's not in cs:go

pseudo hazel
#

how do I create a configuration section thats not bound to any single file

#

ConfigurationSection.createSection is not static, presumably becuase it has different implementations

#

but I just want to create a section and then save it later

torn shuttle
#

can't you just fake it by making a map and then converting it when you need it

foggy cave
#

how can i use dependancy injection in ACF (aikar commands)

pseudo hazel
young knoll
#

I believe you need to make a YamlConfiguration

#

Which has ConfigurationSection in its hierarchy

pseudo hazel
#

ah yes, thanks

pure dagger
#

if i need to check if player has a rank (from another plugin - luckPerms) do i need to add api to dependencies? - i have never written a plugin interacting with another plugin

torn shuttle
#

permissions plugins use permissions

#

which can be checked via spigot

pure dagger
#

so i dont have to actually

torn shuttle
#

don't know exactly how group implementations work but it's probably using some kind of permission as well if I had to guess

#

or you can just get the permission you're looking for specificaly

pure dagger
#

okayy

pure dagger
#

how can i make in my plugin that command from another plugin invoked

tall dragon
pure dagger
#

no... like execute another command, is it possible even?

tall dragon
#

yea you can execute commands from a plugin

#

using Bukkit.dispatchCommand()

pure dagger
#

so why did you say it doesnt make sense?

tall dragon
#

because whatever you said isnt gramatically correct

#

the order of your words dont make sense

pure dagger
#

lol

#

when i look at that

#

"how did i write this"

tall dragon
#

no clue but ya really did

#

but we got there in the end didnt we

pure dagger
#

"How can i make in my plugin that" i dont know how to say that

young knoll
#

How can I invoke a command from another plugin

#

I guess would be the correct phrasing

torn shuttle
#

how do

#

HOW DO

#

hlp

pure dagger
sly flint
#

Failed to register events for class events.BB because de/netzkronehd/wgregionevents/events/RegionEnterEvent does not exist

#

what is the problem

echo basalt
#

idk it kinda tells you

sly flint
#

this is the code

#

@echo basalt

#

package events;

import de.netzkronehd.wgregionevents.events.RegionEnterEvent;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;

public class BB implements Listener {
@EventHandler
public void onEnter(RegionEnterEvent e) {
if (e.getRegion().getId().equalsIgnoreCase("spawn")) {
Player p = e.getPlayer();
p.sendMessage("hello you're in spawn");
}
}
}

warm musk
river oracle
#

legacy chat has no such capabilities

warm musk
rough ibex
#

note: using minimessage will require you to shade a bukkit platform adapter yourself

#

If you can, look into ComponentSerializer#deserialize

#

if you are OK with using JSON components instead.

warm musk
rough ibex
#

alright

glossy laurel
#

If you try to .get() a CompletableFuture<Void>, does the .get() block or not because the future is void

blazing ocean
#

It will still block

glossy laurel
#

Ic

#

What does async in AsyncPlayerPreLoginEvent mean? Like I don't really get it.

#

Does it mean that prelogin events arent handeled by main thread

#

Or what

shadow night
#

It means that the event is being executed async, so you can run blocking tasks without blocking the main thread

#

So, it is indeed off-thread

glossy laurel
#

So uhm

#

What was the point of me shoving everything inside a completable future

rough ibex
#

everything?

blazing ocean
#

everything.

glossy laurel
#

not really

#

guys what happens when I call a function inside a completable future and an exception gets thrown inside the function

hazy parrot
#

If you don't have correct error handling it might happen that cf just swallow the exception

glossy laurel
hazy parrot
#

exceptionally, whenComplete

#

And handle

glossy laurel
#

Alr thx

hazy parrot
#

I mean you don't use everything

#

Just one that fits your needs

quaint mantle
#

I'm looking for someone good at configuring tcpshield, I pay

hazy parrot
#

Tcpshield have to be configured ?

#

Isn't it like just put their dns as CNAME for your domain and that is it

wet breach
#

either way, it should be relatively straight forward though

blazing ocean
#

not that hard

#

Takes 15min

mellow edge
#

is it allowed to shade JDBC jar into my plugin and distribute it free/payed?

grim hound
#

Does anyone know any tricks that could optimize a player's existence on the server?

#

The player doesn't need to have the ability to do anything

#

For example, using 2 as the render and simulation distance

#

Setting him as non-collidable etc

grim hound
hazy parrot
#

If I'm not wrong

mellow edge
#

ohh yeah nice

vagrant stratus
#

What makes more sense from a usability standpoint:

/teleport <player | here <target> | random>
or each being a separate command, e.g. how basically every other plugin handles it

frail pilot
#

Probably the one with sub commands as you can tab complete them more easily

grim hound
#

Has anyone here ever used OrmLite?

#

Or does anyone have a library that offers a variety of different ways to save and retrieve data for different databases?

drowsy helm
sly topaz
#

just stick to ormlite, it is the most common solution for this kind of environment

hybrid spoke
grim hound
hybrid spoke
chrome beacon
#

It's probably overkill for what you're trying to do

#

Hibernate is quite a massive lib

hybrid spoke
#

and you probably dont want hibernate in your plugin

#

despite it working good and making your plugin enterprise software

chrome beacon
hybrid spoke
#

^

chrome beacon
#

Knowing a bit about hibernate can be quite useful so I'd say it's fine to use just to learn

#

Just don't shade it and load it with the library loader

grim hound
#

Is it a c lib?

#

Or wdym by

chrome beacon
#

libraries section of the plugin yml

#

(works in 1.17+)

chrome beacon
grim hound
#

Also, how should I use it if I don't shade it?

hybrid spoke
chrome beacon
#

Load it on your own separately

grim hound
chrome beacon
#

or use the library loader

hybrid spoke
#

is there a resource for that?

grim hound
hybrid spoke
#

for now im shading hibernate and relocating 😄

grim hound
chrome beacon
#

Download the jar

#

and then load it using a classloader

hybrid spoke
#

ah, i will stay to shading

chrome beacon
grim hound
chrome beacon
hybrid spoke
#

all good tho

chrome beacon
#

Yeah don't shade it

chrome beacon
hybrid spoke
#

what now really_mad

hybrid spoke
#

does spigot has a size limit?

chrome beacon
#

4MB

hybrid spoke
#

sucks

#

then i cant shade it

grim hound
chrome beacon
#
libraries:
- "org.hibernate.orm:hibernate-core:6.6.1.Final"
hybrid spoke
chrome beacon