#help-development

1 messages · Page 962 of 1

potent ocean
#

Or something weird, not important to me though.

#

Kinda like how those pet plugins use some crazy stuff with armor stands to make cool looking pets.

thin delta
#

What's the best way to do cooldowns on commands/playerInteractEvents

remote swallow
#

?cooldown

#

?cooldowns

undone axleBOT
remote swallow
#

opt 3

thin delta
#

Thanks!

worthy yarrow
#

Is it possible to detect a chunks biome given the biome is "custom" and from a data pack?

#

ie: biomes from the terralith datapack

young knoll
#

Not via the api

#

You’ll just get Biome.CUSTOM

worthy yarrow
#

Can I define a list of biomes that relate to all the ones terralith offers?

young knoll
#

?

worthy yarrow
#
            OCEAN_MONUMENT, OCEAN_RUIN, RUINED_PORTAL, NETHER_FOSSIL, JIGSAW, IGLOO, BURIED_TREASURE, JUNGLE_TEMPLE, WOODLAND_MANSION,
            DESERT_PYRAMID, END_CITY, FORTRESS, MINESHAFT, SHIPWRECK, STRONGHOLD, SWAMP_HUT);``` as an example
young knoll
#

Those aren’t biomes

worthy yarrow
#

But in the case of the custom biomes offered through terralith? The point is that I need to find a specifc biome within terralith

worthy yarrow
young knoll
#

Yeah you can’t do that with the api

#

Like I said, it’ll all be Biome.CUSTOM

worthy yarrow
#

I don't need a list for the vanilla biomes as I can just do biome.values

#

hmm

young knoll
#

Biome still has yet to be freed from the enum world

worthy yarrow
#

But custom doesnt return a specific biome within terralith is the issue

young knoll
#

Correct

worldly ingot
#

Yeah, unfortunately as it stands currently, Biome is an enum and the registry in our Registry class is an enum wrapper "registry"

worthy yarrow
#

erm

worldly ingot
#

There are PRs to make it so biomes are registry backed, but they're not merged yet

#

Until then you're sort of stuck with "CUSTOM"

young knoll
#

Insert snarky comment about how custom biomes have been around since 1.16

worthy yarrow
#

So I'm kinda just shit outa luck? The point of the project is basically an addon to vanilla /locate, but in terms of searching for a specific biome (terralith biome)

young knoll
#

Vanilla can already do that

#

/locate biome terralith:whatever

worthy yarrow
#

It's for someone and their locate command uh broke somehow? idk they just basically wanted me to remake /locate

young knoll
#

🤔

#

Sounds like they have a dumb plugin overriding it or something

worthy yarrow
#

I was looking and I couldn't find anything

#

this was pre impl of the custom /locate

#

Oh and another issue, putting send-command-feedback in server.properties was being removed every time on startup

young knoll
#

Oh so it’s a silly legacy version

#

Boo

worthy yarrow
#

iirc they're running 1.20.4

young knoll
#

Then they 100% have the modern locate

#

And can do /locate biome terralith:whatever

worthy yarrow
#

Yk I shoulda tested the vanilla usage before even starting this lol

#

I was just going off their input; vanilla /locate broken, make a new /locate command

young knoll
#

Seems like a them issue

#

Can always try /minecraft:locate

worthy yarrow
thin delta
#

is getTargetBlock not supposed to work for blocks within a small radius?

young knoll
#

Then they must have done something silly to that world that messed up the world generator

worthy yarrow
#

hmm

minor garnet
#

Is it possible to get the location every tick of where the location of a falling block is?

worthy yarrow
#

my custom command works for all vanilla structures/biomes so idk wth happened

young knoll
#

How does your command search for them though

minor garnet
young knoll
#

Just get the entities position?

thin delta
#

I can't seem to get it to work with blocks within a 5 block radius of the player? Are you using getTargetBlock?

worthy yarrow
#

?paste

undone axleBOT
worthy yarrow
#

only 3 nested for loops :p

young knoll
#

Yeah yours doesn’t check unloaded chunks

#

Also it doesn’t check vertically

worthy yarrow
#

yk

#

I may have forgotten there are underground biomes now

#

smh caves update

young knoll
#

Only checking loaded chunks isn’t super useful

#

Unless you have really high view distance I guess

brazen wharf
#

Like they can’t get to a certain height

worthy yarrow
#

Yeah especially for a survival server

drowsy helm
worthy yarrow
#

To be fair it is supposed to be within a radius so I mean the range is up to the sys op, but still might need to check unloaded chunks

minor garnet
young knoll
#

That was a statement

worthy yarrow
young knoll
#

Just call getLocation on the entity

young knoll
worthy yarrow
#

Is it possible for me to do this as well?

young knoll
#

Not if their vanilla command is broken

worthy yarrow
#

So all in all better to fix the vanilla bug...

young knoll
#

I mean, you can try World#locateNearestBiome

worthy yarrow
#

That returns nearest biome of (in my case) string input? or just nearest biome relative to current posistion

young knoll
#

I think it takes in a location

#

Check the javadocs

worthy yarrow
#

Ok I think I can use this, just have to turn the string into a biome object is all

#

easy enough

#

Thank you coll

young knoll
#

I doubt it’s going to be any different than the locate command

#

But who knows

worthy yarrow
young knoll
#

I’m going to guess they changed the worldgen on an existing world

worthy yarrow
#

most likely

#

Is it possible that the datapack changed the worldgen? Isn't that kind of the point?

young knoll
#

Yes

#

If they added it after the world was already created that could bork things

worthy yarrow
#

erm thats bad

#

it's a survival server so...

worthy yarrow
young knoll
#

¯_(ツ)_/¯

#

I’ve definitely used the command fine with custom biomes before

worthy yarrow
#

hmmm

young knoll
#

I suppose a plugin could Bork things too, so the first step would be to test without plugins

#

Actually the first step would be to make a fresh server, install terralith, and then delete everything in the world folder except the datapack folder

#

Then test the command

twilit wharf
#

I am so confused right now. What I want is client side entities, something that the server doesnt know exists but the player sees them. I saw this on some other code but I cant seem to get it to work. What exactly does this code do?

this.textDisplayEntity = new Display.TextDisplay(EntityType.TEXT_DISPLAY, ((CraftEntity) followingEntity).getHandle().level());

this.textDisplayEntity.getEntityData().set(net.minecraft.world.entity.Display.TextDisplay.DATA_BACKGROUND_COLOR_ID, Color.fromARGB(0, 0, 0, 0).asARGB());
this.setDefaultBackground(false);
this.textDisplayEntity.setBillboardConstraints(Display.BillboardConstraints.CENTER);

List<Entity> passengers = new ArrayList<>(((CraftEntity) followingEntity).getHandle().getPassengers());
passengers.add(this.textDisplayEntity);

((CraftEntity) followingEntity).getHandle().passengers = ImmutableList.copyOf(passengers);

ClientboundAddEntityPacket packet1 = new ClientboundAddEntityPacket(this.textDisplayEntity);
((CraftPlayer) player).getHandle().connection.send(packet1);

ClientboundSetPassengersPacket packet = new ClientboundSetPassengersPacket(((CraftEntity) this.textEntity.followingEntity).getHandle());
((CraftPlayer) player).getHandle().connection.send(packet);

Currently, there are no errors, but no entity client side.

#

(I know you can do it directly through packets but I thought this would be easier)

young knoll
#

I don’t see an addEntity packet for the text display anywhere

tranquil badger
#

does followingEntity exist or

#

seems like you are trying to make the textdisplay a passenger to an entity but that text display hasn't been sent yet

#

as coll said ^

twilit wharf
tranquil badger
#

Is this a mod or plugin

#

oh wait that is just NMS name mb

#

uh what about the textDisplayEntity though

young knoll
#

I still don’t see an addEntity for this.textDisplayEntity

twilit wharf
tranquil badger
#

It isn't sent though

#

the entity doesn't exist

#

its just an object

twilit wharf
#

that is what the ClientboundAddEntityPacket is for

tranquil badger
#

you need to spawn that entity, then make it a passenger

twilit wharf
#

but I dont want it serverside

tranquil badger
#

yeah

#

you need to send the AddEntityPacket for the textDisplayEntity

#

because it doesn't exist

#

clientside

#

it is just an object

twilit wharf
#

I copied the thing wrong lmao

#

I fixed the original code sent above, the add entity packet is for the text display entity

#

I pasted the wrong line

tranquil badger
#

does followingEntity exist

#

as well

twilit wharf
#

yes

#

I know it does

#

(this worked before when it wasnt only client side)

tranquil badger
#

another issue is that you don't send the metadata

#

of the textdisplay

young knoll
#

Ah true

tranquil badger
#

So it might be riding, but it has no content

young knoll
#

So it’s invisible because it has no text

#

You need a SetEntityMetadata packet

tranquil badger
#

packDirty -> send that packet ^

twilit wharf
#

All I am seeing is ClientboundSetEntityDataPacket(FriendlyByteBuf var0), that right?

tranquil badger
#

should also be able to take a list of SynchedDataObjects

#

as well as the entity ID

tranquil badger
#

idk if you defined the ID for your textDisplay but

twilit wharf
#

I did not, does -1 work?

#

actually no

young knoll
#

It should have an Id

#

Entity#getId

tranquil badger
#

if you are assigning it yourself should be accessible but not the same int

young knoll
#

It’s automatically assigned

twilit wharf
#

Appears it is null

#

var0 is the entity id in the packet constructor

#

I am running Entity#getId and that is returning null. Maybe thats cause it isnt technically spawned yet on the server?

young knoll
#

It can’t be null

#

It’s an int iirc

twilit wharf
#

one sec

#

ok yeah so it has an id

#

but somehow the constructor is recieving null

young knoll
#

Probably the packDirty

twilit wharf
young knoll
#

packDirty returns null if there is nothing dirty

#

Try getNonDefaultValues or whatever it is

twilit wharf
#

getNonDefaultValues would only return null if there are no non default values, and I obviously have a bunch of those.

young knoll
#

Weird

#

It’s complaining about something to do with components

#

Did you set any text on the text display

twilit wharf
#

yes

#

I added that a bit ago

#

just a test text

young knoll
#

Hmm

#

Not too sure then

twilit wharf
#

I think it is how I am setting the text

#

I am doing CraftChatMessage.fromStringOrNull. Previously I could just set it to be "" which would make it empty. However, when I put that inot the Craft chat message, it returns null cause it is empty

#

So I just need to find out how to get an empty craft chat message

young knoll
#

Iirc the NMS method would be Component.empty()

twilit wharf
#

IT WORKS

#

thanks man, I appreciate it

ornate patio
#

how would i go about implementing custom enchants through spigot?

#

as in, allow player to apply enchants through the enchanting table, custom enchanted books

#

combining them with anvils, etc

#

would i have to add all this manually or is there some api to help with this?

thin delta
#

I wrote a plugin (with lots of help) that uses getTargetBlock to make a glowing block whenever the player right clicks while shifting and holding a pickaxe

#

However, everything breaks down whenever I hold a shield as well

#

But the weird part is it still passes my checks to see if I am sneaking and right clicking air with a pickaxe

#

?paste

undone axleBOT
thin delta
#

?cooldown

thin delta
#

For whatever reason, if I rightclicked with a shield and pickaxe (probably any tool could work), PlayerInteractEvent with an event of RIGHT_CLICK_AIR would fire twice. My code had a feature where if I clicked the same block, it would undo my glow effect on it. Obviously I didn't intend for it to be two events instantly back to back

#

So I just made a little 1 second cooldown check which fixed it

twin venture
#

hello iam trying to give mongodb a try

#

how i can finish the load method?

#

never used it before

#

will this work? never used it before

chrome beacon
#

MongoDB does have decent docs

#

Also

#

?tas

undone axleBOT
slender elbow
#

tool assisted speedrun

grim hound
#

does someone know what I could use instead of Object#finalize?

sullen marlin
#

to do what?

grim hound
#

but netty's leak detector throws error on reloads

sullen marlin
#

you need to free them

grim hound
#

and I have no comfortable way of releasing them since they're in a Future

sullen marlin
#

what are you doing

grim hound
#

captcha 3d

#

with particles

#

and I create the ByteBufs as minecraft packets using PacketEvents

#

since they need to be translated to ByteBufs anyway

sullen marlin
#

why do you need packets

grim hound
#

speed

#

and I can modify or spoof stuff

sullen marlin
#

wrong answer, next

grim hound
#

what

#

no\

#

amigo

#

why you

#

noo

#

also md

grim hound
#

like you input a whole location

#

it changes the world and coordinates

#

but not the rotation

sullen marlin
#

code suggests otherwise, but maybe it's a bug. Open a bug report

grim hound
#

the name, I mean

sullen marlin
#

// Spigot start - spawn location event
Player spawnPlayer = entityplayer.getBukkitEntity();
org.spigotmc.event.player.PlayerSpawnLocationEvent ev = new org.spigotmc.event.player.PlayerSpawnLocationEvent(spawnPlayer, spawnPlayer.getLocation());
cserver.getPluginManager().callEvent(ev);

    Location loc = ev.getSpawnLocation();
    worldserver1 = ((CraftWorld) loc.getWorld()).getHandle();

    entityplayer.spawnIn(worldserver1);
    entityplayer.gameMode.setLevel((WorldServer) entityplayer.level());
    entityplayer.absMoveTo(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch());
    // Spigot end
#

last line has yaw and pitch - PlayerList.java

grim hound
#

is sick

#

I'm making an antibot

#

so could I intercept this method and only invoke it if the player proves himself to not be a bot?

inner mulch
#

can this be made smoother, currently it changes on the playermoveevent sadly its not as smooth as i would have imagined it?

grim hound
#

with the Proxy class

valid burrow
grim hound
#

I'll intercept the method that calls that event

valid burrow
#

i think the player wont connect if u dont let him spawn d

grim hound
#

since PE is great in that

valid burrow
#

mhm

#

fair

grim hound
#

still, amma need to see if this won't cause any major issues

tacit drift
inner mulch
#

it seems like it moves smoother when i move my body and when only moving the head its less responsive

#

is it possible that i need to use packets and listen to the head movement?

tacit drift
#

There is a config option for how often to update head rotation or something i think

tacit drift
#

yeah i looked for it too, seems like i was wrong

inner mulch
#

ok :/

tacit drift
#

Try listening for packets

inner mulch
#

ok

valid burrow
#

i wish we would be able to do more client sided stuff

twin venture
#

does this mean the host is wrong?

#

or database is wrong?

sullen marlin
#

could be either

twin venture
#

is there a free website i can use to host the mongodb just for testing?

ivory sleet
#

You can use docker perhaps

#

And just deploy a mongodb container

inner mulch
#

is the playermoveevent calling on every head move as well?

#

i feel like its much less smoother?

ivory sleet
#

Yes

#

Well its limited to the 20 ticks

ivory sleet
#

Unsure

#

I mean looks like it could be optimized somewhat

inner mulch
#

i feel like its so laggy because i reuse the entity

#

there is a delay in teleportation

dire marsh
#

well that's just latency

#

client has to send movement update to server then server sends the updated entity back

inner mulch
#

i can show you the difference between moving and head rotations idk why head rotations are so bad

#

let me record

#

i cannot record cuz nvidia thinks my server is a game

#

and it doesnt record minecrafr

#

:(

gleaming grove
inner mulch
#

why is the playerinteractevent not called when right clicking air?

lost matrix
#

Because the client doesnt send anything to the server in that case

inner mulch
#

okay, in this case, why do it even exist right click air even exist?

echo basalt
#

Right click air is only sent if you're holding an item

#

If you're not holding anything the client doesn't send a packet

#

go figure

inner mulch
#

oh

#

illusion do you know if listening to head move packets is smoother than the playermoveevent in terms of headmovement?

ivory sleet
#

You probably could try to predict movement

#

but like, that’s a big IF

inner mulch
#

does this mean ai?

ivory sleet
#

No

#

I mean I guess you could machine learnify it or whatever u call it

#

Quite overkill tho

inner mulch
#

so which index is entity id? 1, right cuz feet/eyes is also an int?

slender elbow
#

protocollib indices ≠ protocol order

#

look in the actual packet object structure

slender elbow
#

'?'?

#

wiki.vg shows you the network protocol on the wire, the byte stream

#

protocollib works with the classes by accessing their fields, which does not necessarily reflect that

inner mulch
#

i dont really know how to work with protocollib

rigid shoal
#

hello

inner mulch
#

i just want to listen to head movement

rigid shoal
#

you guys know how to make a file or folder?

slender elbow
#

the client telling the server its rotation? or the server telling a client of some entity's rotation?

inner mulch
#

PacketType.Play.Client.LOOK im using this one

#

unsure tho where i get the player from

#

or if this one is correct

slender elbow
# inner mulch the client

well, the client is the one that sent the packet, you can get the player from the pipeline

what are you using to listen to packets anyway? protocollib and (maybe) packetevents give you ways to obtain it

inner mulch
#
            @Override
            public void onPacketReceiving(PacketEvent event) {
                PacketContainer packetContainer = event.getPacket();
                int id = packetContainer.getIntegers().read(1);
                System.out.println(id);
                ProtocolLibrary.getProtocolManager().getEntityFromID(event.getPlayer().getWorld(), id).sendMessage(Component.text("asdad"));
            }
        });```
slender elbow
#

the movement packet does not include the entity id

#

since it's the player itself

inner mulch
#

oh

#

thanks

lost matrix
#

This is what the client sends. The "On Ground" field is the cause of quite a few problems.

slender elbow
#

what about it? 🤔

inner mulch
#

probably clients spoofing?

slender elbow
#

yeah but the convo was about rotation lol

lost matrix
#

That was just a random side note

inner mulch
#

i hope that the move packet is faster than the moveevent, cuz i feel like headmovements arent properly represented there

slender elbow
#

the event does have some filtering, it requires a certain delta before it's called

#

otherwise it would be atrocious

inner mulch
#

im using it with packets now and i feel like its better but super laggy

#

because its called so often

lost matrix
#

Hm

#

I literally would never constantly track ItemStacks...

slender elbow
#

just subclass it :kappa:

lost matrix
slender elbow
#

I'm sure it's fun... slimefun

lost matrix
#

If i where to write something like this, then i wouldnt use fields.
For me it would be something more in the lines of Map<Integer, CustomItem> where the key is the slot id of the item.
Then my CustomItem would implement an interface like this:

public interface EventReactor {
  <T extends Event> canReactOn(T event);
  <T extends Event> reactOn(T event);
}

And my listeners would simply be:

@EventHandler
public void onBlockBreak(BlockBreakEvent event) {
  ItemHolder holder = this.itemManager.getHolder(event.getPlayer().getUID());
  for(CustomItem item : holder) {
    if(item.canReactOn(event) {
      item.reactOn(event);
    }
  }
}

Something in the line of that. Would need more fletching out, but the general idea would always build on delegating
the events to the CustomItems.

echo basalt
#

smile and his generics

lost matrix
#

Myeah you could just reactOn(Event event); and have the same functionality...

inner mulch
#

it will be somewhere in memory

#

without this he cant call methods on it

lost matrix
#

I would listen for events which change the slots of a players inventory, and if you acquire or lose an ItemStack, then i would update my
CustomItems accordingly.

#

Oh no

#

Dropping items
Picking up items
Changing slots internally with InventoryClickEvent
Putting something in containers with InventoryClickEvent
Death
Items breaking because of durability loss
Items vanishing because of interactions (feeding cows, placing Blocks etc)

#

Probably missed something

#

Or if you use the fork, then you can use the PlayerInventorySlotChangeEvent

inner mulch
#

"the fork" = paper

#

smile is there a limit to how many packets i can read per tick?

lost matrix
#

Only physical limits

inner mulch
#

hmm it seems like when using protocollib it stutters after a few listens

#

it basically just stops listening

#

if it was too much

#

@lost matrix do you have a few seconds for me to show you something, i would like your thoughts on this?

lost matrix
#

Sure

inner mulch
#

im in the verified vc

#

to stream

twin venture
#

Hello i need help 🙂 with mongodb

tardy delta
#

document is null?

twin venture
#

wrong?

tardy delta
#

document isnt present then

#

dunno if you need the toString on the uuid

twin venture
#

i think i need ..

gleaming grove
inner mulch
#

no this is a slime size 2

gleaming grove
#

ok

warm mica
twin venture
#

is this possible in mongodb 😮 ?

echo basalt
#

As long as you make a codec for it

twin venture
#

codec?

echo basalt
#

That's the cool thing of mongo

twin venture
#

i didn't get you what do you mean by codec?

echo basalt
#

You can have collections of your own dedicated type but you need to make a codec

#

Which is a class that's basically responsible for encoding and decoding your data

twin venture
#

i dont have that

#

,-,

echo basalt
#

Codec<Whatever>

twin venture
#

and where i should use that?

inner mulch
#

can you create teams which are not listed to the team command

echo basalt
#

You need to register your codecs in a codec registry

#

And when you get your database you pass the codec

twin venture
#

so something like this?

echo basalt
#

Underlying impl looks like this

upper hazel
#

how can placeholderAPI load Jar files into a project and still be able to use them?

#

shouldn't the jar file be inside the plugins folder?

echo basalt
#

Well not really

#

Spigot at the end of the day is a java application

twin venture
#

so something like this ?

echo basalt
#

I'd recommend doing the switch thing

echo basalt
#

What stops placeholderAPI from doing the same?

shadow night
echo basalt
#

You just need to specify a class loader

#

And then know your entry point

#

In short what spigot does is go over every .jar in the plugins folder, open it up, find its plugin.yml and locate the main class

#

If everything checks out it creates a class loader for that plugin and loads the main class

twin venture
#

is getCodecs a list?

echo basalt
#

In my case yeah

#

It's the getCodecs on the hacky thing

#

You can just pass fromCodecs(new MyCodec())

twin venture
#

can i have it like this or do i need to use the variable for it else where?

echo basalt
#

Did you not read what I sent or

#

The codec needs to be registered in the database where you get your collection from

#

When you get your collection

fallow crag
#

I think I encounter XY problem. I want to set Entity glowing different color then White, so I came up with idea to add entity to Team then I can team's color as Red or Green. However I don't see any option to add entity other then player to team, is it possible?

warm mica
lost matrix
#

^

fallow crag
lost matrix
#

addEntry

#

Scoreboards and teams are scuffed

fallow crag
#

ok thanks

inner mulch
#

or is that simply not possible cuz minecraft

lost matrix
#

Not possible unless its a display entity

inner mulch
#

display entities dont tick right?

slender elbow
#

"they do", but there is basically nothing in it

#

something about passengers and stop riding or whatever, it's nothing

inner mulch
#

emily how do i properly make use of itemdisplays? currently i dont know how to set the size

#

i want it to be block size

lost matrix
#

It should be on default

inner mulch
#

alr i will try

#

okay it works!

#

nice thanks

gleaming grove
lost matrix
#

I would probably first change the entity metadata of the displayed entity. Transformation can can complicated real quick

twin venture
lost matrix
#

Just create one MonogClient for your entire application

twin venture
#

oky

stiff sonnet
#

if I open a file from within a spigot plugin - which directory is the home directory? /plugins? just the server root?

twin venture
#

interesting

#

it works .

tardy delta
#

theres a method to get the plugins folder

vital sandal
#

is there anyway to dealing true damage (damage that ignoring armor)

orchid trout
#

set the health

blazing ocean
#

(CWD = current working directory)

hot dune
#

Hello! How can I check if the damage was taken with a sweep attack? I know about ENTITY_SWEEP_ATTACK damage cause, but it works only with nearby entities. Is there any method like .isSweepAttack() or something like that?

stiff sonnet
icy beacon
upper hazel
#

how can I write text next to hp somewhere below

#

this scoreboard type?

quaint mantle
#

?paste

undone axleBOT
quaint mantle
#

How can I make "puedemandar" change to true after a certain time? (In the event PlayerJoinEvent)

Here is my code

icy beacon
#

e.g. with .damage you can set the source

#

with setHealth you just reduce the health

#

and iirc you can't just set last damage source

orchid trout
#

make a player wrapper and set the damage source there

orchid trout
#

bukkitrunnable

#

instead of if(puedemandar = false) do !puedemandar

quaint mantle
orchid trout
#

probably

rigid shoal
#

can anyone help me?
i am making a plugin that using files but i cant even create one

File yml = new File(this.getDataFolder() + File.separator + "test.yml");
    try {
      boolean file = yml.createNewFile();
      String SUCC = "[GDP] Successfully made file: 'test.yml'";
      System.out.println(SUCC);
    } catch (IOException e) {
      String ERR = String.format("[GDP] Cant make file: 'test.yml', Error: " + "%s", e);
      System.out.println(ERR);
    }
echo basalt
#

Yeah uh

tall dragon
#

do you get an error?

echo basalt
#

What's the issue?

rigid shoal
tall dragon
#

your parent directory doesn't exist.

#

ensure 'this.getDataFolder()' is created first.

rigid shoal
tall dragon
#

check if the directory exists

#

if not, create it.

worldly ingot
#

It's not even that. You're just stringifying getDataFolder() :p

young knoll
#

Oh yeah

worldly ingot
#

new File(getDataFolder(), "test.yml") is a better way to construct that

rigid shoal
tall dragon
#

ah ncvm yea

#

i c

rigid shoal
worldly ingot
#

Not in this constructor, no

#

And even in your existing constructor, / is automatically converted to File.separator

rigid shoal
tall dragon
#

no

worldly ingot
#

Two arguments, not a concatenation

#

You really should do a mkdir() though just to be certain, so

this.getDataFolder().mkdirs();
File testYml = new File(getDataFolder(), "test.yml");
// then do your createNewFile() stuff
rigid shoal
#

yay it works

#

but how i make the yml inside the GDP folder?

echo basalt
#

A folder inside the data folder?

#
File folder = new File(this.getDataFolder(), "UserData");
folder.mkdirs();

File testYml = new File(folder, "test.yml");
icy beacon
#

btw since we're on the topic of files i've got this question that i've had for a while

File file = new File("file.name");
if (!file.exists()) file.createNewFile();

do I need to refresh the file variable after calling createNewFile() or is it fine to continue using the old one? (reassign it to new File("file.name") again)

young knoll
#

You can reuse the old one

icy beacon
#

tyy

lost matrix
#

@echo basalt I think i like how it came out. Obvsly should use concrete classes instead of lambdas for actual skills but it works nicely.

#

Maybe should rename addPredicate to addCondition

echo basalt
#

One thing I'd add is a onAction(ActionType, Consumer<Caster>)

#

So instead of addAcquireAction it's onAction(AQCUIRE

worldly ingot
#

Yeah that definitely needs concrete classes lol

#

No reason at all for you to be passing like 5 lambdas

echo basalt
#

Which allows, for example, to play a sound when you both gain and lose a skill

young knoll
#

What if

#

It was all lambda

lost matrix
worldly ingot
#

Not to mention Skill<T, U, V> being a really disgusting type

lost matrix
#

This resulted from using strict composition...

#

I could create a BukkitSkill<V> class, if Skill wasnt final.

worldly ingot
#

Well, sure, I just mean that if you had a concrete class, you would have no generics at all

#

public final class MySkill extends Skill<LivingEntityKey, LivingEntityCaster, BlockContext>
MySkill skill = new MySkill();

#

The lambda option is probably fine for on the fly skill creation, but anything that's hard defined should really, really be a class. If you're passing multiple lambdas then you're running into design hell

lost matrix
worldly ingot
#

Yeah I don't think Skill should be final

lost matrix
#

Close your eyes

worldly ingot
#

Usually no reason to fix it. Just means you have some overlapping dependencies

#

And often you can't really fix that lol

worldly ingot
#

e.g. you use library A and library B, but both of those libraries use Gson. You now have 2 Gson versions on the classpath that overlap

lost matrix
#

I mean you could attempt to write hate emails to the maintainers of your dependencies so that they relocate everything they shade.
Then there wont be any conflicts.

worldly ingot
#

tbh I don't think relocation is a good solution ;p

lost matrix
#

Ah yes, depend on paper api and spigot server impl.

trim lake
#

It possible to change max health of mob type ex. zombies with command or do I need to code it?

young knoll
#

I mean

worldly ingot
#

You can do it with the /attribute command, but if you're writing a plugin, add an attribute modifier

young knoll
#

You could do it with a repeating command

#

But ick

trim lake
#

I need to affect every spawned mod of type so code it would be better lol

young knoll
#

yeah

worldly ingot
#

Then yes, use the max health attribute

trim lake
#

EntitySpawnEvent and edit max heal attribute and we good

#

thanks

worldly ingot
#

Correct

#

CreatureSpawnEvent though

young knoll
#

Don't forget to setHealth too

#

Unless you want the base health to stay the same

grim hound
#

does anyone know what this is caused by?

#

I intercept chat packets, store it's message and send it later as a new system packet

#

and this pops up

#

but only for some messages I do it for

young knoll
#

Probably signing shenanigans

grim hound
young knoll
#

Does it work if you disable "Only Show Secure Chat" in your client chat settings

trim lake
grim hound
young knoll
#

Also show what the server logs say

grim hound
#

absolutely nothing

grim hound
young knoll
#

kek

#

client logs maybe?

formal egret
#

Hi all please excuse the messy code but just wondering how I remove the white player name from the nametag? Thanks all for the help! Iv'e been looking at this for an hour or so and I am so lost. Knowing my luck its a simple line of code that I need 🙂

vast ledge
#

dont put the %player_name% placeholder there

formal egret
#

I have already given that ago but it then removes the wrong name 🤔. Is there a way to hide the name?

rotund ravine
#

Set ur displayname or smth

formal egret
#

yep that seems to have resolved it

#

thanks for the help 🙂

tender shard
#

use a <filter> section in maven-shade-plugin's configuration to exclude META-INF/** from all artifacts

#

or ignore it, it doesnt matter

stiff sonnet
#

does spigot have an entity move event? I'd ideally like to check an entity's position every time it moves, and add some velocity to it once in a while

stiff sonnet
#

well I do have paper installed, but paper plugins are apparently unsupported right now

blazing ocean
#

?fork

undone axleBOT
#

SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.

blazing ocean
#

wdym unsupported

stiff sonnet
tender shard
#

or better, use UUID as key

#

do you really care about EVERY entity movement? or only certain entities?

stiff sonnet
#

or better, I just don't manually compare positions at all and just check if the entity has a non-zero velocity

blazing ocean
#

iirc there's an entity velocity event

stiff sonnet
#

wow oddly specific if that is the case

#

nope doesn't exist

stiff sonnet
blazing ocean
stiff sonnet
#

I don't care about entity movement, really just about the fact that they exist

young knoll
#

What is your goal

stiff sonnet
#

iterate over some entities and apply a velocity

#

I guess I'll just use a tick event and do it that way

tender shard
#

it's an ?xy i guess

#

because what the heck are "some entities"

young knoll
#

You can keep a collection of the entities you care about and iterate it each tick

stiff sonnet
#

wait huh?? there is no tick event?

tender shard
young knoll
#

If the entity is invalid, remove it, else apply velocity

stiff sonnet
blazing ocean
#

huh

tender shard
#

?scheduling

undone axleBOT
young knoll
#

?scheduling

undone axleBOT
blazing ocean
#

thought that was a thing

#

ah

stiff sonnet
#

scheduling works

tender shard
tender shard
#

in exchange i'll give you my social security number

stiff sonnet
#

well thanks to all of you!

tender shard
#

damn I thought I was bad, but ItemsAdder even "obfuscates" (shortenes) package names

stiff sonnet
young knoll
#

Entity spawn event -> check if tnt -> add to collection
every tick -> iterate collection -> if entity is valid -> apply velocity -> else remove from collection

tender shard
#

wouldn't it be enough to simply change every TNT's velocity every tick? Why keep a collection?

rotund ravine
#

just tick it 3 times more

young knoll
#

Could do that

#

But then you have to loop over all entities to find which ones are tnt

tender shard
#

that is true ofc

eternal oxide
#

You can getEntitiesByClass to simplify it

tender shard
#

so yeah there's your answers, you'll either

  1. loop over all entities each tick (and ignore non tnt entities)
    or
  2. keep track of all spawned TNT entities and only loop over them, removing invalid entities once you encounter them
eternal oxide
#

if he wants to do ALL TNT

tender shard
young knoll
eternal oxide
#

actually just watching for spawned would be best

#

as you know they are short lived

rotund ravine
#

cute chatgpt is trying too

import org.bukkit.Bukkit;
import org.bukkit.entity.Entity;
import org.bukkit.entity.TNTPrimed;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;

import java.util.Collection;
import java.util.Random;

public class MyPlugin extends JavaPlugin {

    @Override
    public void onEnable() {
        // Schedule the task to run every few ticks
        new BukkitRunnable() {
            @Override
            public void run() {
                // Get all entities in the world
                Collection<Entity> entities = Bukkit.getWorld("world").getEntities();
                
                // Iterate over each entity
                for (Entity entity : entities) {
                    // Check if the entity is a TNT entity
                    if (entity instanceof TNTPrimed) {
                        // Cast to TNTPrimed to access TNT-specific methods
                        TNTPrimed tnt = (TNTPrimed) entity;
                        
                        // Check if TNT is in the air
                        if (!tnt.isOnGround()) {
                            // Double the velocity of TNT
                            tnt.setVelocity(tnt.getVelocity().multiply(2));
                        }
                    }
                }
            }
        }.runTaskTimer(this, 0, 20); // Run every second (20 ticks)
    }
}

young knoll
#

Are we doing spoonfeed now?

rotund ravine
eternal oxide
#

you only need to track them for the duration of their fuse, once spawned

rotund ravine
#

Well mostly not

young knoll
#

I would just use an iterator to remove or yeet them

#

Other things may mess with the fuse after they spawn

eternal oxide
#

I'd just drop them once dead or their fuse runs out

rotund ravine
#

WeakReference, then don't care about it

young knoll
#

True

#

But is there a weak collection

rotund ravine
#

WeakHashMap sure, maybe some weak set

eternal oxide
#

weak ref would result in still tryign to act on some that have not yet been cleaned

rotund ravine
#

meh

#

trust in the garbage collector god

eternal oxide
#

lol

stiff sonnet
#

I've decided for just checking the entity type each time I iterate over all entities. I'll need to do some more stuff in the tick loop anyway, so that just works fine

young knoll
rotund ravine
#

LSIT

#

I am dissapointed in you

young knoll
#

Is a set faster when you are just doing add and remove?

#

Idk i'm not a smart

rotund ravine
#

Idk

#

Sets are cool though

young knoll
#

Valid

tardy delta
#

depends on the size, set insert and remove is O(1) but that doesnt mean a list cant be faster on relatively small sizes

rotund ravine
#

Complexity is not the same as speed

tardy delta
#

i know, if that was a comment to me

rotund ravine
#

Yeah it was big O

slender elbow
#

erm ackts hually it depends on the implementation 🤓

rotund ravine
slender elbow
#

me neither

#

I'm a dropout

rotund ravine
#

dang, so we are the stupid ones

#

I am pursuing smth else, though i did dropout from a few other things first haha

slender elbow
#

nodders

rotund ravine
#

udders

tardy delta
#

nerds

rotund ravine
tardy delta
#

dunno what that is

young knoll
#

Worldedit plz

rotund ravine
#

I see u fucked upo

young knoll
#

Worldedit does not like /reload

rotund ravine
#

reload shouldn't be run 🤷🏾‍♂️

young knoll
#

I am lazy and don't want to restart when developing

rotund ravine
#

rip

#

well just allocate more ram

young knoll
#

😩

molten hearth
#

does anyone know why the maven javafx plugin is obsessed with java 8

rotund ravine
#

last java it was packaged in the jdk

#

jre

#

or whatever

molten hearth
#

odd

#
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>me.paradise.minirepro</groupId>
    <artifactId>minirepro</artifactId>
    <version>1.0-SNAPSHOT</version>
    <name>minirepro</name>

    <properties>
        <maven.compiler.source>20</maven.compiler.source>
        <maven.compiler.target>20</maven.compiler.target>
        <javafx.version>20</javafx.version>
    </properties>

    <dependencies>
        <!-- JUnit 5 -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>5.10.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>12.0.2</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>

            <!-- Maven Compiler Plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>

            <!-- JavaFX Maven Plugin -->
            <plugin>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>0.0.8</version>
                <configuration>
                    <mainClass>me.paradise.minirepro.Main</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
#

it seems to want to use java 8 for me

rotund ravine
#

ask @tender shard

#

I am no maven guy

molten hearth
#

running javafx:run with java 20 throws me/paradise/minirepro/Main has been compiled by a more recent version of the Java Runtime (class file version 64.0), this version of the Java Runtime only recognizes class file versions up to 52.0

lilac dagger
#

and above to 20

molten hearth
lilac dagger
#

one overtakes the other for sure

#

ah nvm

#

it's the maven compiler path

molten hearth
#

i mean its set to this?

lilac dagger
#

super weird

#

weird answer, how are you compiling?

molten hearth
#

also set to this

lilac dagger
#

i had someone here a week ago who was using artifacts/build

molten hearth
rotund ravine
#

guess it's soem setting in that plugin then

lilac dagger
#

might be something to do with this ^

#

yeah

molten hearth
#

i can package it just fine just this goofy ahh plugin sucks

#

they claim to support java 11+

#

(fake news)

quiet ice
#

Is J8 your system JRE?

lilac dagger
#

not familiar with javafx

quiet ice
#

this is an issue on the side of the jfx maven plugin

molten hearth
quiet ice
#

that being said I highly advise against using JFX, it's seriously flawed

lilac dagger
#

i haven't even heard of it so

rotund ravine
molten hearth
#

Update: this plugin seems to try to set a value for some internal property javafx.platform, and it fails to set it for Windows

#

🔥 🔥

#

what a bussin plugin

quiet ice
# molten hearth yeah

then that is likely the issue: it likely uses the JRE defined by JAVA_HOME and thus will not use the correct JRE

lilac dagger
#

a java program that's not platform agnostic? what in the

molten hearth
#

oh thats true

#

This is because the plugin defaults executable to JAVA_HOME instead of JDK used by Maven.

quiet ice
#

Yeah, JFX somehow super fucked up after they split from the JRE

quiet ice
molten hearth
#

most enjoyable maven experience

quiet ice
#

I mean even if you got the maven plugin working - it's a bit of a pain to get it running beyond that

#

Like, most JDKs don't support it out of the box anymore (except Azul, perhaps a few more too) so you'll need to inject it - but because JFX's natives collide with each other you have to do some tricks to get it working in the first place

slender elbow
#

huh

rotund ravine
lost matrix
quiet ice
#

Unless you wish to have one jar per plattform that is

slender elbow
#

we use it at work and it's fine?

rotund ravine
#

u shading it, or smth?

slender elbow
#

jlink

quiet ice
#

Yeah then it is fine as it comes with the JRE (probably, I'd be surprised if not)

rotund ravine
quiet ice
#

And thus you'll have one executable per platform anyways

#

Thus you'll not have to be bothered by the fact that the file names of the natives of JFX are the same regardless of the architecture

remote swallow
rotund ravine
#

eclose enough

lost matrix
#

Java should add a retainIf() method as a counterpart to removeIf().
Would be activeTnt.retainIf(TNTPrimed::isValid) instead of activeTnt.removeIf(Predicate.not(TNTPrimed::isValid))

rotund ravine
#

it's called

#

well nvm i was gonna say filter, but yeah new collection

young knoll
#

But that's slower!!!!!1111

rotund ravine
#

Kotlin just has all the quality of life features that java devs are looking for

icy beacon
#

^^

rotund ravine
#

It even had them before java added them

lost matrix
#

If only this wasnt accompanied by a bootleg scripting language

blazing ocean
#

kotlin goat

worthy yarrow
molten hearth
tender shard
rotund ravine
#

don't tag me

tender shard
#

oh wait, that was me, a year ago?

rotund ravine
#

oh nvm

#

Yeah it was

tender shard
#

oh wait, people can change their minds?!

rotund ravine
#

We just need to shove kotlin down ur throats

tender shard
#

exactly

#

just for the record, I was making fun out of myself, not of you

rotund ravine
#

I realised

#

I was like, i didn't complain in here i think

tender shard
#

you suck anyway, everyone knows that

worthy yarrow
#

I didn’t know that

tender shard
#

people on grindr are already calling you names

echo basalt
rotund ravine
#

I did download grindr once for fun, got too many matches and didn't actually want to meet or chat with them lol

tender shard
#

where's PR???

rotund ravine
#

gay people are desperate here

#

Well

tender shard
#

everyone's drooling for PRs

rotund ravine
#

It's in progress

icy beacon
#

someone pr something into basics

tardy delta
#

i will add a russian roulette that clears the plugins dir when lost

blazing ocean
tardy delta
#

could simply write getTimeMillis in kotlin

blazing ocean
#

oop

#

what if we change the cd cmd in bash to clear dir 🤔

tardy delta
#

wouldnt been java to add convenience methods

tardy delta
#

i for example didnt :|

blazing ocean
rotund ravine
tardy delta
#

always used a plain server without any management nonsense, just ssh

fringe yew
#

anyone know how to setup permissions? like you need to have a specific permission to do an action

rotund ravine
#

what action

worthy yarrow
#

I mean

#

simplest way is p.hasPermission?

fringe yew
#

yeah

rotund ravine
fringe yew
#

let me try that lol

worthy yarrow
#

if (player.hasPermission("xpermission)){
}

rotund ravine
#

""

fringe yew
#

would i do pluginname.permission or just permission

worthy yarrow
#

preference

#

most times its plugin name. permission

#

or follows order of your setup ig

icy beacon
rotund ravine
#

whatever the perm is u WANT The perm plugin to giber

icy beacon
#

in hasPermission you put the exact permission

worthy yarrow
#

for example: a permission node within a command would be like "plugin.folderContainsCommand.command.use

fringe yew
#

it's just that in plugins like lp the permissions are typically pluginname.permission

rotund ravine
#

sure

icy beacon
#

yes that is to avoid conflicts id assume

rotund ravine
#

cause the plu´gin chose it

icy beacon
#

^

#

to avoid conflicts and ambiguity

tall dragon
icy beacon
#

yes

tall dragon
#

e.g plugin.*

rotund ravine
#

bigf ass

worthy yarrow
#

Essentially, its down to preference but technically the node can be wtv you want it to be

fringe yew
#

so i assume if i just do #hasPermission("example") plugins like lp would change it to plugin.example

tall dragon
#

u assume wrong

icy beacon
#

in hasPermission you put the EXACT name of the permission

fringe yew
#

including the plugin name

icy beacon
#

if you declare your permission as pluginname.perm you check for it

worthy yarrow
#

the permission node within the code is what will relate the node at any other time

fringe yew
#

okay cool

icy beacon
#

if you declare your permission as shit.piss you check for shit.piss

rotund ravine
#

big bois

#

imagine declaring perms

worthy yarrow
#

ikr

tall dragon
#

i never do

icy beacon
#

idrk if you need to do that

tall dragon
#

luckperms figures it out anyway

icy beacon
#

i just do just in case

worthy yarrow
#

I just enable free access throughout my plugin

rotund ravine
#

op everyone

worthy yarrow
#

^

#

Thats a better way to fix perm issues

icy beacon
#

also compare your inventories by title boys

#

not relevant but a good idea

worthy yarrow
#

Didn't vulcan like find an exploit for that

rotund ravine
#

vulcan yeah

icy beacon
#

no no

#

it's all good

rotund ravine
#

saw the yt vid it was funny

tall dragon
worthy yarrow
#

it was very funny lol

icy beacon
#

not sure what you're on about

tall dragon
#

idk how they even managed that

icy beacon
#

comparing invs by titles is totally safe

tall dragon
#

rename title and the entire gui just spawns??

icy beacon
#

and will not cause issues down the road

rotund ravine
#

they probably went to an hoder system

#

ew

icy beacon
rotund ravine
#

holder

tall dragon
#

seems like they listen to inventory open event to check if their inv get opened

#

like why??

icy beacon
worthy yarrow
#

Just uuid.random for the title... no constant guis, every time they need access the uuid changes

icy beacon
#

because if they would then they wou;dn't need title comparison

tall dragon
#

i dont understand how the chest got populated

rotund ravine
#

well they fixed it

#

not sure if they still do it

tall dragon
#

cuz like u populate it when you open the menu... with a command

rotund ravine
#

app not

icy beacon
tall dragon
#

very odd system on their end

worthy yarrow
icy beacon
#

what's your favorite gui of that one plugin?

worthy yarrow
#

Ahaha

icy beacon
#

mine is 2347862786892757

#

189103607661378 is also good

rotund ravine
#

@tall dragon they prolly clicjed on slot x which opened menu x which gets populated

worthy yarrow
#

tbf mine is 0987652178394

icy beacon
#

i'll go put in like 30 minutes of coding and go play video games

#

have fun boys cya

worthy yarrow
#

take care

tall dragon
worthy yarrow
#

So now we're all using holder systems for gui management right?

rotund ravine
#

no

worthy yarrow
#

I was just kidding 😦

rotund ravine
#

inventory refernce 🧑🏾‍🚀

tardy delta
#

yess

worthy yarrow
#

Imagine having constant guis

rotund ravine
#

no constans needed

worthy yarrow
#

breh

#

link me to this source

rotund ravine
#

100$

worthy yarrow
#

Now that's just rude

#

Maybe I'll get brush to sell me for 50$

rotund ravine
#

we'll i can't recall one and would need to make one

fringe yew
#

pay up

rotund ravine
#

my current completion time is 5 months

#

jusdt ask @tender shard

worthy yarrow
#

How about access to my yt which currently has: robbin hood men in tights, enders game, ace venture (first one), beetlejuice, and the benchwarmers

#

Oh oh and lets not forget the mask

rotund ravine
#

the mask is goat

worthy yarrow
#

jim carey is a funny actor

rotund ravine
#

true

worthy yarrow
#

I never knew he had two r's in his name either

rotund ravine
#

he does*?

worthy yarrow
#

Yes lmao

rotund ravine
#

close enuf

charred blaze
#

how do i set path in config like this?

  1:```
#

without value

#

and anything

orchid trout
#

you cant

#

only "1"

charred blaze
#

uhh

orchid trout
#

the key cannot be a number

tardy delta
#

it cant?

orchid trout
#

pretty sure

charred blaze
#
  1:
    pos1: loc object
    pos2: loc object```
i have this structure for arenas. when admin creates arena with the command i need to somehow set it in the config
#

thats why im trying to do it

rotund ravine
#

just set it to some dummy location

charred blaze
#

yeah i know

#

but when he sets the pos2

#

the code thinks

#

arena is complete

#

how do i prevent that

rotund ravine
#

then check if pos 1 is a dummy

charred blaze
#

:D

rotund ravine
#

or whatever is needed

charred blaze
#

any other good way?

#

is it really only way to set it to -2,564,135 12313 +3,213,123?

#

xd

young knoll
#

Can't you just have them be null (not set) by default

#

And then check against that

rotund ravine
#

for some reason he wants it saved

lime narwhal
rotund ravine
#

shade it

lost matrix
#

You need to shade your jdbc driver into the plugin. Otherwise its not on the server during runtime.

lime narwhal
#

what does that mean ?

rotund ravine
#

?shading

#

smile

#

there should be a link ther

lost matrix
#

No

eternal oxide
#

Spigot already bundles mysql

rotund ravine
lost matrix
#

@young knoll There should be a link

eternal oxide
#

if it's older spigot he needs to init it

lime narwhal
#

1.20.4

#

just built it with buildtools

eternal oxide
#

just use mysql that is bundled with spigot

young knoll
#

You ever finish a plugin and then sit there and think
"Okay how much did I overlook, how many bugs does this have"

slender elbow
#

no

lime narwhal
slender elbow
#

my code is perfect at the time that I write it

rotund ravine
#

imagine redoing anything

rotund ravine
#

only updates from the server software providers would result in anything being rewritten

lime narwhal
#

Well, what does "shade driver" mean ?

rotund ravine
#

@eternal oxide he is asking you

eternal oxide
#

No clue

#

Why do you want to use teh apache driver when one is already provided?

rotund ravine
#

looks like it pools like hikari

lime narwhal
rotund ravine
#

that doesn't make much sense

eternal oxide
#

You are calling yours a connection pool but it's just a standard DataSource

#

ah I see

#

you use teh connection pool apache commans wraps

#

If you stick with Apache then you need to package it with yoru jar

#

Using maven, just remove the <scope> line on the apache dependency

rotund ravine
#

Ur welcome

#

manually*

#

?pdc

rotund ravine
#

can help a bit with storing enchants

quiet ice
#

And don't try to extend the Enchantment class for basic actions

#

That is usually the rookie mistake I see

ornate patio
#

damn

#

well rip my free time

quiet ice
#

It's not too bad honestly

#

(I'd use the PDC getters over the lore ones for plenty of reasons)

ornate patio
#

yeah ofc PDC

#

how would one mess with enchantment tables though

#

like having random enchants appear in the table, with random levels

#

and making sure that if you put the same item in multiple times itll always show the same enchants until you re-roll by picking one

#

just sounds like a lot of work to reimplement manually

#

also i haven't been keeping up with the vanilla updates too much recently but ik they added a lot of useful stuff for mapmakers/developers

#

is it possible to set the reach of a weapon now?

#

and how would you do that?

lost matrix
worthy yarrow
#

Ooo thats gonna be fun

ornate patio
#

nice

oblique kettle
#

is there a way to change server view/draw distance using the spigot API?

rotund ravine
#

a dumb idea

oblique kettle
#

why so

rotund ravine
#

a plugin shouldn't be changing it

lost matrix
#

downstream has methods for per-world view distance

#

even per-player iirc

#

But not sure if you should change it on a plugin level tbh

rotund ravine
#

I mean might make sense if the view distance was all there was to lag, so you could increase it and decrease it based on player amount etc.

#

but yeah not really needed

young knoll
#

Interesting

rotund ravine
#

do JanTuck

#

Might be Jan_Tuck

#

or is that just ur server noob stuff

young knoll
#

I'm looking to make a plugin that can auto-host resource packs via a socket

#

Looking into ways to identify the request is from a client (Well of course you can spoof it but blah)

#

I mean I guess I could just not

rotund ravine
#

yes

#

be lazy