#help-development

1 messages ยท Page 613 of 1

wet breach
#

?

quaint mantle
#

I never knew minimessage had this

wet breach
#

I have no idea about addons. Generally what i know to be a addon means it needs something else to work. If its it own plugin it should work otherwise idk. I dont pay attention to plugins more so from other sites

smoky anchor
#

I was always confused by this, vanilla /tp command teleports passengers as well
So this must be a bukkit/spigot quirk, right ?

echo basalt
#

It does the dismount trick

smoky anchor
#

Really ?
I feel like there would then be some visual disconnect between the entities in that case.

floral drum
#

Just a general question - if you guys were to autoscale minecraft instances, how would you go about doing it? Certain % of the maximum playercount? Have an extra instance free? etc.

vapid verge
#

How would you guys negate PlayerItemDamageEvent? I want to negate the damage being taken from a pick when it mines a specific block. I would just negate it within BlockBreakEvent, but I want it to account for Unbreaking. If Unbreaking procs, I don't believe PlayerItemDamageEvent triggers, so I'm thinking I need to handle that event, and somehow check if a condition is met before I cancel the event (since I'm only cancelling the event if a specific requirement is met).

Specifically, how can I tell the PlayerItemDamageEvent the context of BlockBreakEvent, such as what block was broken?

smoky anchor
vapid verge
# smoky anchor What do you mean by "negate" ? Cancel ? Or change the durability damage value.

When BlockBreakEvent triggers, under certain conditions, 100 points of damage is added to the pick. When this triggers, I need to cancel the PlayerItemDamageEvent when it triggers next, since I already added the damage I wanted. This will negate the unbreaking effect, since regardless of if it triggers or not, my damage is still added (and I won't have other damage offsetting my 100 points of damage from the PlayerItemDamageEvent)

#

So, I want to cancel the event.

smoky anchor
#

Assuming the order of the events fired is always the same, you could just give the player a flag and check if the player has that flag in the next PlayerItemDamageEvent.
Not the most elegant solution, but it is one that should work.
If I understood your request correctly.

torn shuttle
#

yawning so hard you get a muscle cramp

#

it's one of those days

floral drum
#

I hate thatttt

vapid verge
#

If unbreaking doesn't trigger the PlayerItemDamageEvent, I can't gurantee that the next PlayerItemDamageEvent will be from mining the specific block right?

#

Is there an easy way to time out the flag? That would be janky, but should work.

floral drum
#

@vivid cave you gotta be abusing the discord api and sending the api post requests for "typing"

#

right??

#

like holyyy

remote swallow
#

it reminds me of soemone in general

smoky anchor
floral drum
#

god

remote swallow
#

they were typing for like 8 hours

floral drum
#

yeah

vivid cave
#

Haha thanks for your extended answer.
To be fair I was mostly kidding/venting.
I know what an API is for and totally understand its motivation.

However I don't always agree with the convenience part.
It seems not to bother people to add a whole dependency sometimes just for a couple of lines of code, because they couldn't bother to head into more technical stuff than what they are used to.
In my experience, the more dependencies you have the less maintainable your project is. Because you have to wait for their update cycles, if you have a bug well sometimes all you will be able to do is "post an issue on their repo", and last but not least many libraries are ruthless to their users: deprecating / removing features how well they want uhm uhm paper, refactoring core features because "it wasn't modern / standard practise enough blablabla".
In reality I consider a dependency as a loss of control over your software. As the name suggests, you depend on third parties. Sometimes it's for the best, but I feel that nowadays people will just consider the small time gain over everything else. And imo it's the very reason why browsing the internet has become a hellish place. From shopping websites to qol apps, I feel we've never been more exposed to bugs, inconsistencies and overall poor user experience.

floral drum
#

holy shit

#

it took you that long to write that...

vivid cave
#

Yes

torn shuttle
#

I think the world is conspiring to only sell me decaf

#

the coffee, it does nothing

floral drum
#

oh real

vapid verge
#

What attribute do players have to set flags? Other than scoreboard tags, I'm not seeing a way in the api to do this, unless I'm misunderstanding.

smoky anchor
#

?pdc

smoky anchor
#

but maybe meta might be enough, but I don't really know what it is meant to be used for

vapid verge
#

Thanks, I'll give a read

vapid verge
#

Any way to get the current tick of the server? Reading around and getting mixed answers that don't seem to work well.

smoky anchor
#

I guess you can use the current world time instead of server tick.
Should be effectively the same.

pseudo hazel
vapid verge
#

FullTime should work yeah?

smoky anchor
vapid verge
#

Ok cool

wet breach
#

So wouldnt surprise me if the vanilla tp command worked similarly to the portals in regards to entities

#

Hence you dont notice the disconnect

cobalt thorn
#

is it possible to get the hardness value?

wet breach
#

Yes

cobalt thorn
#

and how?

wet breach
cobalt thorn
#

Thanks

wet breach
#

Which will take a long time because if i am not mistaken the server tick is backed by a long

smoky anchor
#

Yes, but for they are trying to do, the number itself does not matter, what matters is that it is a "tick" number.
Also the World#fullTime is long as well.

wet breach
#

I meant the time for the world loops around

smoky anchor
#

Oh ye that time
That should not be fullTime tho

wet breach
#

Well not sure what they need, but one of the times does not progress past a certain point and just resets back to 0 lol

#

If it doesnt matter for them then i guess just go with the time as that is more efficient

ivory sleet
storm granite
#

PlainTextComponentSerializer.plainText().serialize(yourComponentHere) will I lose color codes

ivory sleet
#

Think yes

#

since its just plain text

storm granite
#

rat bags

ivory sleet
#

Lol

#

Im not sure tho

eternal night
#

eyes_zoom colour codes ?

karmic mural
#

Hey, in BlockPlaceEvent what does the bool "canBuild" track? I couldn't find anything more descriptive than it being a bool

eternal night
#

components don't have colour codes

storm granite
#

hwex code

eternal night
#

if you are including ยงa or the likes in your components, you are doing something wrong

#

ah

#

Well, yea

#

conclure was correct

storm granite
#

is there a way to keep that

eternal night
#

conclube wtf

#

no

smoky anchor
#

serialize to json instead ?

eternal night
#

yea

#

you'd have to pick some format that is capable of representing a component

#

be that legacy text, json, mini message

storm granite
#

or even better, is there a way to set the tablist name of a player to something with color codes in

wet breach
#

Probably better off using minimessage if they using paper

eternal night
#

i mean, idek what they end goal is here

#

why do you not want this in a component

storm granite
#

i do want it.

#

i want the tablist to be colored

eternal night
#

player.playerListName(yourComponentHere); ?

rose trail
#

can Bukkit.getPlayer(String name) get the player from the unique id?

eternal night
#

no

eternal oxide
#

no, there is another method for that

eternal oxide
#

^ with UUID.fromString(String)

rose trail
#

thanks, will have to redo it

quaint mantle
#

Does anyone have any idea on how would I play a "trace" particle for an arrow?
I currently have this

scheduler.runTaskTimer((task) -> {
    if (fastArrow.isDead()) {
        task.cancel();
        return;
    }

    if (fastArrow.isConstantVelocity()) {
        fastArrow.setVelocity(fastArrow.getConstantVelocity());
    }

    minecraftEntity.tick();
    if (fastArrow.showParticles()) {
        if (isVisible.get()) isVisible.set(false); //Set to false if still true

        World bukkitWorld = fastArrow.getWorld();
        Location bukkitLocation = fastArrow.getLocation();

        bukkitWorld.spawnParticle(Particle.CRIT, bukkitLocation, 10, 0.15, 0.15, 0.15, 0);
        bukkitWorld.spawnParticle(Particle.EGG_CRACK, bukkitLocation, 2, 0, 0, 0, 0);
    }
}, 0, 1);

The problem is when the arrow is too fast, for example a velocity multiplied by 30, the particle gets displayed each 15-10 blocks aproximately, not "constantly". Is there any workaround I could do?

eternal night
#

you'd have to do what the client does: interpolate the position of the arrow yourself

quaint mantle
#

How would I do that?

eternal night
#

โœจ math โœจ

quaint mantle
#

Oh no

#

Oh no no no

#

*cries in mathematical problem

icy bone
#

What is the best way to keep fallingblocks into fallingblocks state? I dont want my falling blocks to turn into solid blocks when close to the ground. (I know I can keep it away from the ground but I want to walk around like a block). I tried to cancel EntityChangeBlockEvent but this makes the block disapear because it doesnt create the solid block but does remove the falling block. Does someone know a good way to help me out?

smoky anchor
#

What version are you on ?

icy bone
#

1.20.1

smoky anchor
#

If you can, use display entities

icy bone
#

Talk me a little through that one please?

#

Does this only show the entitie to me? or also everybody else?

smoky anchor
#

open google, and type in "Minecraft Block Display Entity"

#

It is an entity that can show block state models

icy bone
#

Ohh, thats good to know. Im going to try some with that. Thank you!

smoky anchor
#

I love converting ppl from armorstands or falling sand to the superior display entities.

icy bone
#

Didnt know this existed. This also feels like a better solution instead of the fallingsand armorstand solution

smoky anchor
#

Yeah, it is much more performant as the model shows only the front face (unlike falling sand that shows the backside as well for some reason)
You have only one entity that barely ticks server side
Was added in like 1.19.3

icy bone
#

I dont see any way to set its velocity, is it only possible to keep teleporting the display block or is there a way to make it more smoothly?

smoky anchor
#

Oh for movement tho...
It has one tick interpolation so teleporting it will look janky
The solution for that usually is: make it ride a different entity (armor stand) if you want to move it smoothly
But you might want to check the interpolation feature the display entities have.

icy bone
#

Ahhh, ill take some time to look into this. Is it possible to make it ride an armor stand because if i check the javadocs, i dont see armor stand as vehicle

#

And the addpassengers function tells me that if it cant ride the object, it will just return false and do nothign

smoky anchor
#

yes, you can make any entity ride any entity (except marker entities, those are a bit special)
the Vehicle interface is used only for minecarts iirc (maybe boats) vanilla intended rideable entities
the API for that was never really finished as well XD

icy bone
#

Ahhhh, i see

#

Do you still use the API to make an entity ride an armor stand or do you create your own way (asking so I know I need to check out how to do this later)

eternal oxide
#

setPassenger

smoky anchor
#

the addPassengers should work

eternal oxide
#

add ๐Ÿ™‚

icy bone
#

Ah thanks!

#

Ill let you know later in a ffew days if it worked or got stuck haha

smoky anchor
#

feel free to tag me in that case
GL

icy bone
#

Thank you for the help!

silver robin
#

Hope it's okay to ask math related questions here
I'm trying to make a circle of particles that appears in front of player, and it should rotate (so the circle is in a plane whose normal vector is player look direction)
Managed to make circle follow player's yaw and pitch, but I have no idea how to "combine" these two rotations, this is the code ```java
Location origin = event.getPlayer().getEyeLocation().clone();
for (int degree = 0; degree < 360; degree+=6) {
double radians = Math.toRadians(degree);
double x = Math.cos(radians) * R; // radius
double z = Math.sin(radians) * R;

Vector v1 = new Vector(0, 0, 6);
Vector v2 = new Vector(x, -z, 0);
Vector v3 = v1.clone().add(v2);
rotateAroundAxisY(v3, Math.toRadians(-yaw));
// for pitch, v1, v2, v3 are same, and:
// rotateAroundAxisX(V3, Math.toRadians(pitch));
spawnParticle(origin.clone().add(v3))//this is just a wrapper```
sullen marlin
#

By rotate you just mean the colour changes?

smoky anchor
smoky anchor
sullen marlin
#

I'm just confused what that means

placid moss
#

like rotate just one circle in both yaw and pitch

sullen marlin
#

Because a rotated circle is just a circle

placid moss
#

rotate in other axes

smoky anchor
placid moss
#

like the circle all ways faces the player

silver robin
#

I understand the code is terrible right now ๐Ÿ˜„, but optimizations are for later
Imagine a vector that is coming from the player's eye direction
Then, imagine a plane that vector is perpendicular to (i.e. it's piercing that plane)
That plane is "facing" the player and the circle is on that plane
that's what I meant by rotating
It can be any other shape really

sullen marlin
#

Looks like it always faced the player in the gif lol

smoky anchor
#

yes, but the circles are rotating on separate axis
They don't know how to rotate on both axis at the same time

placid moss
#

there were two circles he wants only one

silver robin
#

Correct

#

also I apologize if this isn't really the best place to ask - asking in the math community and mentioning Minecraft would imo be even weirder

smoky anchor
#

I've seen someone here flexing their ability to shutdown PC with new "jni"
You're fine lol

silver robin
#

Eh, I'm trying to be nice

native bramble
#

How can i spawn ItemFrame with custom name?

#

Or change spawned ItemFrame name?

smoky anchor
#

entity.setDisplayName("name")
entity.setDisplayNameVisible(true)

native bramble
#

there is no setDisplayName for entity

#

only for player

smoky anchor
#

Custom*

#

I think

placid moss
worthy moat
#

Hey guys I want to build something like a little Cache. I need to store vars and Lists as long as the Server is online..If the server gets restarted they should be wiped...I had a static class which I always tried to read of...But this isnt a good use case. Any sugesstions?

umbral ridge
#

What api do I have to use to get org.bukkit.craftbukkit import?

placid moss
#

use spigot

umbral ridge
#

I'm using it

placid moss
#

just spigot in the dependency name

#

not spigot-api

silver robin
# placid moss can you not just use Vector#rotateAroundX, Vector#rotateAroundY and Vector#rotat...

you see, rotating around Y is easy (it's just yaw), however after that, it's not aligned with X and Z axes, and if I applied only X rotation then it works just in one 3d quadrant (if that doesn't make sense: it works only for some of all the possible yaw/pitch combinations)
do you mean I should apply rotations both around X and around Z axes?
(the vectors I'd be rotating are from player's eyes towards the points on a circle)

placid moss
#

you also need builtools run

umbral ridge
#

1.20.1

placid moss
#

yes

umbral ridge
#

Ok thanks, so when it's finished building I just add the craftbukkit in a build path?

placid moss
#

what

chrome beacon
#

oh no you're using artifacts aren't you

#

๐Ÿ’€

placid moss
#

wait

chrome beacon
#

?bootstrap

undone axleBOT
#

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

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

placid moss
#

๐Ÿ’€

umbral ridge
#

This is already in maven reposity

worthy moat
#

How can I spawn a Villager without Collision and not moving?

umbral ridge
#

I could download it I guess

#

nvm xd

chrome beacon
grizzled oasis
#

how can i throw random fireball to a location?

worthy moat
chrome beacon
#

setAI(false)

worthy moat
chrome beacon
#

๐Ÿ’€

#

No idea

worthy moat
#

nope SetAI does not exist

placid moss
#

rip 1.8.8

worthy moat
#

need that for a pvp gamemode

orchid trout
#

?howoldis1.8today

worthy moat
#

cant use newer versions ig

#

Or can I code my plugin with newer versions and still use 1.8 pvp?

hazy parrot
#

?1.8

undone axleBOT
grizzled oasis
placid moss
#

there might me plugins for that i think

grizzled oasis
placid moss
#

oh yea ok

worthy moat
chrome beacon
#

Don't try to be Hypixel

#

They have a massive code base and full time developers

dire marsh
#

hypixel has their own server software they've developed over time to support new features

icy beacon
#

hypixel runs a 1.7 (i think?) modified core and then they support versions up to 1.20

#

or 1.8 but even so it's modified

#

custom yeah

worthy moat
#

I just want to write a minigame plugin for my 1.8 server but everytime I want to build something everybody hates it because its 1.8 Spigot

dire marsh
#

hypixel kb is also not 1.8 kb lol

chrome beacon
icy beacon
#

i'm currently doing a 1.8 commission and there's a reason why i'm charging 1.5x more than my normal price no im not

#

1.8's api is horrendous and very hard to work with

smoky anchor
#

smart XD

worthy moat
#

So you guys suggest I upgrade to 1.120 and then run ViaVersions and this OldCombat Plugin?

icy beacon
#

basically no documentation

#

etc

icy beacon
#

for pdc and other cool stuff

worthy moat
#

pdc?

chrome beacon
#

?pdc

icy beacon
#

?pdc

icy beacon
#

lol

smoky anchor
#

1.19.3 and higher for cool display entities :)

icy beacon
#

good point

chrome beacon
#

1.20.1 for Spigot updates and support

dire marsh
#

i wouldn't even bother supporting 1.8 clients on a 1.20 server, vice versa, it's bad

icy beacon
#

well yeah the newer the version, the easier to work with

icy beacon
#

compare docs in 1.8 and 1.20

#

spoiler, there are basically no docs in 1.8 lol

#

you can still code in 1.8

#

but it's masochism

worthy moat
#

hmm ok

#

So upgrade to 1.20 and use this plugin instead?

icy beacon
#

preferably

#

yes

worthy moat
#

But there is one issue with the newer versions...They all eat so many resources

flint coyote
icy beacon
#

aren't newer versions better optimised too

worthy moat
flint coyote
icy beacon
#

they eat more yeah but if optimisation hadn't improved since 1.8, they'd probably eat twice as much

#

true

#

EmbedBuilder is jda?

#

or what is it

worthy moat
placid moss
#

DiscordSRV

worthy moat
#

Uh what do you guys think about Folia?

placid moss
#

its cool

flint coyote
icy beacon
dire marsh
#

it doesn't improve performance itself

icy beacon
dire marsh
#

it just makes things more multithreaded

icy beacon
worthy moat
placid moss
#

its faster though

#

not necessarily

worthy moat
icy beacon
#

i mean exactly that

placid moss
#

like you have to make sure of stuff

eternal night
#

the server already can use a good amount of threads

placid moss
worthy moat
#

which would be the best performance server software I should code with?

placid moss
#

i mean

dire marsh
#

paper probably

eternal night
#

if your CPU is missing the cores to properly use folia, you will at best achive paper performanec

#

at worst, you'll slow yourself down due to context switching

worthy moat
#

So just use paper?

eternal night
#

yes

placid moss
#

spigot discord server recommending paper

flint coyote
#

isn't minestom usually used if you just wanna code and run a minigame?

grizzled oasis
#
final Random rand = new Random();

        Location location = commandSender.getLocation();

        final double angle = rand.nextDouble() * 360.0;
        final double xDrop = location.getX() + 1 * 40 * Math.cos(Math.toRadians(angle));
        final double zDrop = location.getZ() + 1 * 40 * Math.sin(Math.toRadians(angle));
        final double yDrop = location.getY() + ThreadLocalRandom.current().nextDouble(2.0, 4.0);
        final Location particle = new Location(location.getWorld(), xDrop, yDrop, zDrop);
        Fireball fireball = commandSender.getWorld().spawn(particle, Fireball.class);
        fireball.setShooter(commandSender);

im trying to make a random fireball shoots like a meteor but the fireball shoots and continues how can i make it drop on the ground like a meteor (im not that good in math lol)

eternal night
#

if

flint coyote
#

well he said he wants to code a minigame

eternal night
#

minestom is a different tool for a very different job

#

well

#

depends on what the mini game is about honestly

worthy moat
#

There is a paper 1.20 but not protocollib...Its for 1.19 max

flint coyote
#

that's true

dire marsh
#

use dev builds

eternal night
#

^ PL has dev builds out for 1.20

worthy moat
#

but there are plugins like multiverse too

eternal night
#

I mean, if you need plugins minestom is definitely the wrong pick

#

Minestom works if you have a one server one minigame instance setup

worthy moat
#

then 1.19

eternal night
#

most plugins should be available for 1.20

worthy moat
eternal night
brisk estuary
#

hey, does anybody know if there's an event for Block.setType(Material)?

eternal night
#

I mean you can always rewrite then

#

there is not

#

API calls rarely trigger events

#

unless specified by the javadocs

placid moss
paper cosmos
#

Why could the information about methods and functions when mousing over them disappear? Recently I had them

placid moss
#

what ide do you use

paper cosmos
#

IJ

placid moss
#

have you tried restarting

paper cosmos
#

yes

placid moss
#

Color.LIME

#

is a thing

vivid skiff
#

What packet should i use to show a fake helmet to other players?

placid moss
#

what color class?

#

org.bukkit.Color?

placid moss
eternal oxide
#

what spigot version?

brisk estuary
#

i guess it's time for a pr

eternal night
#

no

eternal oxide
#

Sorry I don;t do support for 1.9

#

use the full package then

eternal night
#

a PR exposing an event when a plugin modifies a block sounds not fun

eternal oxide
#

org.bukkit.Color.LIME

eternal night
#

ask the plugin that is, for some reason, modifying the block you seem to care about to expose an event

eternal oxide
#

yes it does

#

you are doing it wrong

#

you can't use it as an import

placid moss
#

in the code

#

write org.bukkit.Color.LIME instead of Color.LIME

#

full qualifying name

worthy moat
#

Hey guys I want to build something like a little Cache. I need to store vars and Lists as long as the Application is online..If the application gets restarted they should be wiped...I had a static class which I always tried to read of those vars..But this isnt a good use case. Any sugesstions how I should build my Cache? My use case is a Minecraft Minigame and I store things like a Var which tells me they are in the waiting lobby phase and not ingame for example

placid moss
#

why do you need java.awt.Color though

eternal oxide
#

an embed?

vivid skiff
# placid moss theres an equipment packet

I tried using it but it isn't working, it equips and shows the armor only to the player not to who is looking to the player. I need to show the fake armor only to who is looking at the player not the player

eternal oxide
#

so not Spigot?

silent steeple
#

LIGHT_GREEN

placid moss
#

send the packet to the player you want to be able to see the armor

eternal oxide
#

show some code

graceful aspen
#

which the best minestorm or spigot and what the difference ?

placid moss
placid moss
upper hazel
#

hey how get entity in world in another server?

eternal oxide
#

awt.Color and bukkit.Color are not interchangeable, You must use the correct one for your application.

upper hazel
#

multi-server plugin

placid moss
#

spigot is better if you are just starting but minestom can be used if you need a specialized server

vivid skiff
silent steeple
#

just translate alternate color codes

placid moss
vivid skiff
# placid moss send some code

        CraftPlayer craftPlayer = (CraftPlayer) player;
        CraftPlayer craftViewer = (CraftPlayer) viewer;

        net.minecraft.server.v1_8_R3.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(helmet);
        PacketPlayOutEntityEquipment equipmentPacket = new PacketPlayOutEntityEquipment(craftPlayer.getEntityId(), 3, nmsItemStack);

        craftViewer.getHandle().playerConnection.sendPacket(equipmentPacket);
    }```
wet breach
# grizzled oasis someone?

If no one has helped you by the time i get home i will take a look at it. For as much time you have spent here you should look into getting verified and joining the blue name army uwu

#

!verify

undone axleBOT
#

Usage: !verify <forums username>

grizzled oasis
#

but i know i can verify myself

eternal night
eternal oxide
silent steeple
#

ye

timid hedge
#

I am getting a error tho

silent steeple
#

??

#

what is it

grizzled oasis
placid moss
#

or am i tripping

eternal oxide
#

then set teh pitch of the Location

umbral ridge
#

One too much: ")" ?

eternal oxide
#

to -90

grizzled oasis
vivid skiff
eternal oxide
#

yaw doesn;t matter

smoky anchor
#

fireballs work with motion, that ignores pitch and yaw

eternal oxide
#

is default 0

timid hedge
grizzled oasis
#

let me test it

silent steeple
placid moss
timid hedge
eternal oxide
#

then apply a velocity

silent steeple
eternal oxide
#

setVelocity(new Vector(0,-1,0))

wet breach
#

You need to set the velocity with the appropriate vector

eternal oxide
#

err -1

smoky anchor
wet breach
#

Elgarl knows listen to them lol

worthy moat
#

ChatColor.translateAlternateColorCodes is deprecated

upper hazel
#

I have a question is bungee api capable of requesting to get all the entities of a certain world in a certain server

worthy moat
#

what is the new thing?

umbral ridge
upper hazel
#

demm

wet breach
#

Not unless you have a plugin on both to feed such info using plugin message channel

grizzled oasis
#

something to ask is a vanilla bug or the fireball goes in a curve?

eternal oxide
#

depends on its velocity

smoky anchor
#

send the whole sendVagtkillEmbed pls ?
too many ppl here now, don't know who to respond to xd
Threads would be better

grizzled oasis
worthy moat
wet breach
umbral ridge
eternal oxide
#

it can;t "curve" with a -1 y vector

grizzled oasis
eternal oxide
#

so long as x and z are zero

umbral ridge
grizzled oasis
smoky anchor
upper hazel
#

best this 1.16.5

eternal oxide
undone axleBOT
eternal oxide
#

you can remove setting the pitch as you are using velocity, but the rest of the code looks fine

umbral ridge
# worthy moat 1.20.1
String coloredString = org.bukkit.ChatColor.translateAlternateColorCodes('&', "&a123");```
that is deprecated?
silent steeple
#

Color color is wrong

#

it should just be String

silent steeple
#

if ur trying to send the ChatColor thing

worthy moat
#

whats the new one?

umbral ridge
smoky anchor
#

don't pass the bukkit color to the method

umbral ridge
#

?whereami

umbral ridge
#

xd

grizzled oasis
eternal night
#

^ yea best to head to paper discord for those questions

umbral ridge
#

XD

eternal oxide
quiet ice
#

Use MiniMessage on paper instead @umbral ridge

#

Adventure should have a serializer there

grizzled oasis
umbral ridge
quiet ice
#

Ah didn't scroll far enough. Sorry!

worthy moat
#

This looks nice

eternal oxide
vivid skiff
smoky anchor
#

What color does the embed builder method take ?

eternal oxide
#

arc only happens when its fired horizontally (effect of gravity and drag)

grizzled oasis
#

i can't even record it because lunar is not recognized

grizzled oasis
eternal oxide
#

use the spawn method which accepts a consumer, so you can alter the fireball before it spawns

smoky anchor
#

Ok so:
get the bukkit colors rgb, there is a method for it somewhere
create new awt.Color from that rgb and pass that
I think that is what you're trying to do

eternal oxide
#
Fireball fireball = commandSender.getWorld().spawn(particle, Fireball.class, ball -> {
        ball.setShooter(commandSender);
        ball.setDirection(new Vector(0,-1,0));
        ball.setIsIncendiary(false); } );```
eternal oxide
#

sounds impossible

smoky anchor
#

are you doing anything else to the fireball, any other events that could interfere ?

grizzled oasis
eternal oxide
#

the location?

smoky anchor
#

wait
on fireball

eternal oxide
#

ah

#

yes set direction not velocity

grizzled oasis
#

its fast as fuck

smoky anchor
#

who tf
I bet this came out of Mojank's decision but still...

eternal oxide
#

I'll fix code above

#

reduce the -1

grizzled oasis
#

but its heading to the ground not like \ but like |

eternal oxide
#

so -0.5

smoky anchor
#

so change the vector a bit

eternal oxide
#

add a TINY amount to x and z of vector to alter it's angle

grizzled oasis
#

trying changing it but same result

vivid skiff
#

Is possible to stop the server from sending some packets to online players?

eternal oxide
#

new Vector(0.01, -0.5, 0)

young knoll
vivid skiff
young knoll
#

Well you can make your own netty injector technically

grizzled oasis
eternal oxide
#

you are changing the vector in setDirection ?

smoky anchor
#

spigot (bukkit) Color has asRGB()
awt color is just new Color(rgb)

grizzled oasis
eternal oxide
#

bigger offset then

#

(0.5, -0.5, 0)

#

thats definitely not straight down

grizzled oasis
#

Works

icy beacon
#

Configurate (configurate-gson) adds signed files (.RSA, .SF, etc) to my jar, and I have to remove them every time manually, is there a way to make it not add those files?

grizzled oasis
#

heading like this \

eternal oxide
#

if you want it always the same direction thats fine

grizzled oasis
#

now something to ask? to make at impact detect them and give the block to the players inventory?

eternal oxide
#

if you want it random then use + or - 0.5 in x and z

grizzled oasis
eternal oxide
#

random in a list?

sullen marlin
#

Also interesting font

smoky anchor
#

ok..
can you send the whole class with the method and then the whole class where you want to call the method ?
(omit any sensitive data)

quaint mantle
#

this is cool

quaint mantle
#

new intellij ui

grizzled oasis
sullen marlin
#

Ctrl+f rsa

icy beacon
undone axleBOT
icy beacon
icy beacon
sullen marlin
#

What errors does 3.4 give

smoky anchor
#

also, once again explain what you want to do

sullen marlin
#

Share errors and pom

icy beacon
#

One sec, compiling

#

now it compiled lol

#

let me see if it works now

smoky anchor
onyx fjord
#

cool but this is spigot

icy beacon
#

Now it works fine, ty md_5

smoky anchor
#

we know
we already went thru this

icy beacon
smoky anchor
#

Not again guys

icy beacon
#

it's very cool that paper is new and great and new

#

but this is spigot

#

very sorry

onyx fjord
#

at least the api

icy beacon
#

i coded against both, not that much of a difference except that components are everywhere

onyx fjord
#

yeah

#

and you dont need them most of the time

smoky anchor
#

I would not call "fixing bugs mojang has NOT fixed for community reasons and refusing to give an option to disable the fix" great

icy beacon
#

ok then it's not great

onyx fjord
#

real

icy beacon
#

so why are we talking about it

onyx fjord
#

tradition

young knoll
#

If I had a nickel for every time someone asked about a paper deprecation

#

Iโ€™d have a lot of nickels

smoky anchor
onyx fjord
#

im alergic to nickel @young knoll

smoky anchor
onyx fjord
#

i know hex

#

its ez

umbral ridge
#

Is there a way to shorten this?

onyx fjord
#

otherwise no

umbral ridge
#

That sucks

onyx fjord
#

you can make some wrapper for it but pointless

quaint mantle
#

how do i register 2 classes to the same command but different args so like /gen list is 1 class and /gen give is another class but they are the same command

umbral ridge
#

Is it the same for events?

#

I can't shorten this?

onyx fjord
#

yes

onyx fjord
#

to register a whole package

smoky anchor
#

probably should have explained a bit more lol
replace the RRGGBB with the HEX the site gives you
so it becomes 0x2E8B57

twilit creek
#

Hey, small question. Anyone knows:

((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet);

in 1.20.1?

umbral ridge
#

Then it's best to put it in a method in main JavaPlugin class to keep onEnable() shorter? I guess

quaint mantle
#

how do i register 2 classes to the same command but different args so like /gen list is 1 class and /gen give is another class but they are the same command

onyx fjord
smoky anchor
eternal oxide
silent steeple
twilit creek
eternal oxide
#

same answer

#

you only register the root command gen

silent steeple
eternal oxide
silent steeple
silent steeple
#

how do you register it then

smoky anchor
#

that is up to them how they want to implement the args
if they want to use different classes for them then they can

eternal oxide
quaint mantle
eternal oxide
#

you only register teh BASE command, args are upto you how you want to handle them

#

be it a switch or an if/else

twilit creek
eternal oxide
#

follow the link, you are not using mojang mappings

grizzled oasis
smoky anchor
#

what list ?
I don't recall you having any list

eternal oxide
grizzled oasis
young knoll
#

It can if you subtract

grizzled oasis
#

so how?

#

like new Random(0,1) - 0.5?

eternal oxide
#

random == true ? 0.5: -0.5

smoky anchor
#

random.nextDouble(upperBound) - number

eternal oxide
#

using random as a boolean

#

so you keep the same angle

#

it will probably look odd if you use an actual variable value between -0.5 and +0.5

smoky anchor
#

I mean.. meteors fall from all kinds of angles, not only 45ยฐ
probably.. never seen one

eternal oxide
#

they do, but they are also in a swarm all flying the same direction and angle

grizzled oasis
#

probably shouldn't be better to take a random position near the player to aim the ground?

eternal oxide
#

it all depends what exactly you are trying to do

grizzled oasis
eternal oxide
#

so you are targeting a specific place when you do this?

grizzled oasis
#

just randomly so the player can have the impression of a meteor shower

eternal oxide
#

if you are launching multiple at the same time then use the same angle for each one

grizzled oasis
eternal oxide
#

ProjectileHitEvent

grizzled oasis
smoky anchor
eternal oxide
#

fireball is a projectile, bnut either coudl work

#

if she wants all teh blocks when it explodes

#

then explode

#

if she only wants when it hits, then Hit

tender shard
#

dude

#

?learnjava

undone axleBOT
tender shard
#

you got the almost same line 7 times

#
Color color = getCorrectColor(victim);
sendEmbed(victim, deathMessage, ..., color);
private Color getCorrectColor(Victim victim) {
  // ...
}
warm mica
#

๐Ÿ˜” ๐Ÿšฌ

#

You shoulf try to avoid all these if else statements

hazy parrot
#

alex literally gave you code

tender shard
#

you seem to lack basic knowledge about OOP

#

hence ?learnjava

#

?

#

this is 100% the same code, 7 times! o0

#

it should return the correct color for whichever highest rank victim has

#

i thought that was obvious

#

if you ever see the same line twice, you're probably doing something very bad

hazy parrot
#

you have redundant argument in method

#

you never use Player player

#

and also its always "victim" when you call that method

#

Same as alex, i would highly suggest you to learn fundamentals first

chrome beacon
#

We've been telling them that for weeks now

slate mortar
#

God i love just reading this channel

river oracle
#

so its not just me

#

lol

undone axleBOT
drowsy helm
#

Itโ€™s the parameter

#

You have a method inside a method

paper cosmos
#

What setLocalizedName is used for?

#

in itemstack meta

drowsy helm
umbral ridge
#

If PermissionsEx still work, should I consider using LuckPerms or any other permissions plugin? If so, why

glad prawn
umbral ridge
#

So it's still ok to use it in 1.20.1?

chrome beacon
#

LuckPerms is great

#

Is has good API, web interface and is still maintained

eternal oxide
#

use Vault

#

then you are not locked into one permission plugin

chrome beacon
#

^ for code yeah

umbral ridge
#

I'm using it yeah I was just thinking if I should switch to LuckPerms, to put it on the server

#

It seems rather complicated though, I'm used to permissionsEx, i've been using it like.. always

eternal oxide
#

use whatever backend permission plugin you prefer

umbral ridge
#

Is there much difference in config files?

eternal oxide
#

quite a bit

chrome beacon
#

You don't really touch the config in LuckPerms

#

You do everything via command or web interface

drowsy helm
umbral ridge
#

I see, thanks

umbral ridge
drowsy helm
#

Other than the api, lp wins everywhere

umbral ridge
#

Or did I read wrong

drowsy helm
#

Nametags?

#

As in overhead

umbral ridge
#

player nametags

#

yeah

eternal oxide
#

it shouldn't. Not the job of a permission plugin

drowsy helm
#

Nah you can use NametagEdit though

#

Pretty sure itโ€™s plug n play

umbral ridge
#

Ok thanks

remote swallow
#

because you only use 1 else if

#

a) that should be a method b) use else if, if youa rent gonna make a method

#

only the top if will only send 1 of them

#

the rest are all seperate ifs so dont care what the result of prior is

#

yeah

#

but you should learn java and make it a method

#

?learnjava

undone axleBOT
eternal oxide
#

if you want every embed for every permission they have they shoudl ALL be if statements and no returns

#

no else

drowsy helm
#

Use a map

#

Damn

vivid skiff
#

Is possible to get a player from his entityId?

eternal oxide
#

if online yes

vivid skiff
young knoll
#

Should be possible via nms

#

Spigot api doesnโ€™t expose the internal id

vivid skiff
#

Im using protocollib

young knoll
#

I think they might have an api for it

#

EntityUtilties.getInstance().getEntityFromID

icy beacon
#

i'm trying to make a potion with effects (to display in a gui) and this code seems to not add the effects successfully:

val allEffects = ItemStack(Material.POTION)
val potionMeta = allEffects.itemMeta as PotionMeta

for (effect in kit.getPotionEffects()) {
      println(effect)
      potionMeta.addCustomEffect(effect, true)
}

println(potionMeta.customEffects)
allEffects.itemMeta = potionMeta

console output:

[19:34:38 INFO]: JUMP:(107374182t-x1)
[19:34:38 INFO]: [JUMP:(107374182t-x1)]

so it seems like the effects were indeed added but they are not on the item

tender shard
#

you know nothing about java's syntax but you refuse to check out ?learnjava, well then I cannot help you

worldly ingot
#

Kotlin syntax annoys me lol

tender shard
worldly ingot
#

Anyways, the reason it's not working is because you're adding a custom effect. You'll probably want to add a base effect

tender shard
#

if the field is accessible, then it sets the field. i not, it calls setItemMeta

worldly ingot
#

idk how it knows which one is the setter

tender shard
#

it tries out set<FieldName>

#

it basically just guesses which is the correct setter

icy beacon
worldly ingot
#

You can do that with custom effects but you just need at least one base effect

icy beacon
worldly ingot
#

set

remote swallow
#

its potion data iirc

worldly ingot
#

Correct

icy beacon
#

it only takes PotionEffectType though

#

what if i want to specify the duration & amplifier?

worldly ingot
#

setBasePotionData()

remote swallow
#

use potion data

worldly ingot
#

afaik it only shows the available effects if there's a base

icy beacon
#

it appears there's no potiondata in 1.8?

worldly ingot
#

Oh dear. PotionMeta has changed a lot between 1.8 and 1.20

#

I don't even remember how to go about it

remote swallow
#

you do it by updatin

icy beacon
#

~~ i'm torturing myself but i don't have the balls to say that i am voluntarily coding this particular plugin for 1.8 so i make excuses like "commissions"~~

worldly ingot
#

Right, there's a Potion class

#

It's a pseudo-MaterialData (kinda sorta not really)

icy beacon
#

it doesn't seem that useful ๐Ÿ˜ฆ i cannot specify the duration/amplifier, and i am limited to PotionType

flint coyote
#

Not sure if 50% would be enough solatium

icy beacon
#

haha

#

fine by me

remote swallow
#

level displays the duration and amp

#

you set the effect and set its level

worldly ingot
#

Yeah, level 2 is amplified, extended is duration

#

Though there are methods for these

#
new Potion(PotionType.SPEED, 2).extend().apply(itemStack);
ItemMeta itemMeta = itemStack.getItemMeta();
itemMeta.addCustomEffect(...);
itemStack.setItemMeta(itemMeta);```
#

I think that should work

#

But this is 1.8, I honestly don't fucking know lol

#

Better yet you can create an ItemStack directly from that if you want

#
ItemStack itemStack = new Potion(PotionType.SPEED, 2).extend().toItemStack(1);
ItemMeta itemMeta = itemStack.getItemMeta();
itemMeta.addCustomEffect(...);
itemStack.setItemMeta(itemMeta);```
icy beacon
#

indeed level 2 is amplified, but what if I want level 100 with duration 7 hours? adding a PotionEffect with PotionMeta#addCustomEffect allows to do that, but creating a Potion does not
but if I understand correctly, the first effect must be a legal base effect and everything else is up to my imagination and can be added with PotionMeta?

worldly ingot
#

Right

icy beacon
#

well that's painful

#

lol

#

maybe there's a way to hide the duration of the potion effects?

#

or even better, is there a way to find the translation keys for those effects and use them for lore?

wraith bane
#

I created an api and integrated it into my plugin by adding:

<dependency>
            <groupId>me.kyren223</groupId>
            <artifactId>Kapi</artifactId>
            <version>1.1</version>
            <scope>provided</scope>
        </dependency>

My issue is when I put in the server the jar file I get an error of some class files fro the kapi api missing
What settings do I change so the .jar api will be included in the plugin jar (so I don't have to add another jar as dependency)

remote swallow
#

you need to shade it

#

remove the scope provided

wraith bane
#

Oh alright thanks, I added that scope tag because it didn't work (but accidentally copied the original lol)

remote swallow
#

the provided scope is only for something that is either provided by something another maven dep or a server software

icy beacon
gleaming grove
#

Both regenerateChunk and refreshChunk are Deprecated so what is correct way to regenerate chunk?

worldly ingot
#

You kind of can't

gleaming grove
#

just overrite chunk data with custom world generator?

worldly ingot
#

refreshChunk() is more for client synchronization but it's iffy, so not relevant here. But the reason it's deprecated is because the world generation has changed so much that it's in a state where you can't really reliably regenerate a chunk and expect it to match 1:1 to what it was before

#

You might get structures or cave carvers in your chunk that weren't there before

#

You can use it. It will work. It just cannot guarantee 1:1 from world gen

#

Terrain will probably be mostly fine

gleaming grove
#

I just want to play and learn custom world generation so I need some method to
regenerate all chunks in selected region

worldly ingot
#

Oh, then yeah that's probably fine

#

You can ignore the deprecation warning there then

gleaming grove
#

ok

worldly ingot
#

Don't worry about refreshChunk() though. That's probably not what you want

brisk estuary
#

hey, does anybody know how to remove the music disc - 5 line?

#

I tried with hide attributes but it doesn't seem to work

gleaming grove
brisk estuary
#

oh

vivid skiff
#

How can i overwrite an already sent packet using protocollib?

glacial sphinx
#

Is there a way to send a player to a minecraft server (not bungee and no proxy) only by the IP and Port of the server?

eternal oxide
#

not without a proxy

#

if you are on a server behind a proxy and you want to send to an external IP it's possible

#

you'd need to write a bungee plugin to register a server

quaint mantle
#

whats bunge . rs

remote swallow
#

?paste ur full pom

undone axleBOT
icy bone
#

Im a little confused, for the function void setInterpolationDuration(int duration) it says "Sets the interpolation duration of this display." but what does this mean? is just the duration the Display will be seen by players or?

young knoll
#

How long it will take for the display entity to interpolate from its current transformation to the new one

icy bone
#

Ohh like that, but i assume if i have no transformation i do not have to set this function?

young knoll
#

correct

icy bone
#

Ah thanks for the information!

quaint tapir
#

I just pulled from github and my intelliJ isn't working correctly
none of my spigot shit works and it said there were problems with an SDK but idk what to do, any help would be great

chrome beacon
#

Open project settings and set your SDK

tender shard
#

the actual error message would be very helpful

chrome beacon
#

That too

opaque scarab
#

If Iโ€™m creating a player NPC and I want it to react when I click it, should I create an NPC class and check for a custom event inside the class? Does this seem like a good structure?

atomic swift
#

hmmm org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.2

tender shard
#

api-version: "1.20"

atomic swift
chrome beacon
tender shard
#

"1.20"

atomic swift
#

its just like that

tender shard
#

use "1.20" and not 1.20

young knoll
#

Alternative option

#

Update spigot

#

:p

chrome beacon
#

oh did they fix that?

opaque scarab
eternal night
young knoll
#

Only for plugin.yml

#

Which doesn't have any floats anyway

quaint tapir
eternal night
#

could have just enforced people properly writing yaml ๐Ÿ˜ญ

quaint tapir
tender shard
young knoll
#

Yes but we got tired of them coming here

#

:p

eternal night
#

?quoteyaml stonks

atomic swift
#

the 1.20 update broke a lot of stuff

tender shard
#

from my experience, it broke nothing

atomic swift
#

getting a ton of java.lang.NullPointerException

eternal night
#

lmao

atomic swift
#

wheras in 1.19 i got none

chrome beacon
#

I've had no issues either

atomic swift
#

and i havent change any code

eternal oxide
#

npe = bad error handling on your part

chrome beacon
#

^

atomic swift
eternal oxide
#

fix it ๐Ÿ˜‰

#

we need a whip emote

tender shard
#

higgs boson

eternal oxide
#

favorited ๐Ÿ™‚

atomic swift
#

also is that a whip or a worm ๐Ÿชฑ

remote swallow
#

a hwhip

opaque scarab
remote swallow
#

alpacas are great

atomic swift
#

i love when my pom.xml has a stroke and shows an error about a dependency that isnt there

tender shard
eternal oxide
#

I got a stupid block Added to Favourites on my screen now ๐Ÿ˜ฆ

#

nice discord

tender shard
#

higgs boson

icy bone
#

Is there a way to make Armorstand not collid with the grond? I have an armor stand that is moving with the player to create like a block following the player. But now the block is floating 1.5 blocks above ground because im using an armorstand to make the block move smooth. But now the armor stand cant drop lower than the ground.

#

If tried to use armorStand.setCollidable(false); but that didnt work

steep plaza
#

guys i created a gui but i want the items that go into it when i close it are saved

tender shard
#

and what is the issue?

icy bone
#

To me or Lilpatch?

steep plaza
tender shard
#

they don't have any collisions

#

and they don't tick, so less lag

icy bone
#

I am using BlockDisplay but im also using an armorstand to cleanly move the blockdisplay around

#

Or is it possible to move around blockdisplay with #.setVector()?

icy bone
chrome beacon
#

They do a lot less calculations every tick

#

Meaning they cause less lag

alpine urchin
#

hi

icy bone
#

Ahh like that, Yeah im already using those but I want to move the BlockDisplay around very smoothly and thats where i am using armorstands for. Or is using armorstands over complicated and can I set the velocity of BlockDisplay instead? (keep in mind I dont want to use #.teleport() because it will make it look very laggy)

chrome beacon
#

Display entities can lerp

#

Which gives them smooth movement

chrome beacon
icy bone
#

Do they also have #.setVelocity()?

steep plaza
chrome beacon
#

?

#

That doesn't explain anything

chrome beacon
icy bone
#

I see it has teh function, ill just try it now and see if it happens

icy bone
flint coyote
icy bone
#

Does not throw an Exception

#

Is there no way to stop a collision on an armorstand?

young knoll
#

You can move it smoothly via transformations and interpolation

icy bone
#

But isnt that only to change the look of the block or can you also use this to move it to the players location?

young knoll
#

You can move it with the translation option

#

But I think it can only go so far

icy bone
#

I just want it to constantly stay on the player, like the player is the block

#

So it smoothly follows the player and keeps going to the players feet (Trying to change a player into a block)

young knoll
#

Stack it on the player

#

And then use the translation to put it at their feet

icy bone
#

What do you mean with Stack it on the player?

#

Right now im thinking about setting displayblocks Translation to players location

#

Do you also mean that?

#

Or is there a way to make it stick on the player like #.addPassenger()?

young knoll
#

Yes

#

add it as a passenger

icy bone
#

And i see that translation requires some advanced math, do you know how to just put it at the feet?

young knoll
#

It's just a vector

#

You probably need around 0, -2, 0

icy bone
#

Wait a vector? I see someone do this transformation.getLeftRotation() .set(new AxisAngle4f(angle, (float) axis.getX(), (float) axis.getY(), (float) axis.getZ()));

eternal oxide
#

This is Spigot so it will be a Bukkit Vector

young knoll
#

Rotation is not translation

night badge
#

hey, im trying to send a messagfe to the player that allows them to click on it and be refferred to a link. I know this is doable in vanilla, so i assumed there would be a way of doing it with a plugin, and ive been trying around quite a bit with the Components api, and also tried to find some articles about it but for example https://www.spigotmc.org/wiki/the-chat-component-api/ provides me with deprecated classes or just code that isnt functional anymore because some classes have become abstract

icy bone
#

Wait could you help me out with a small code example on changing its Translation()? i already got the transformation with entity.gettranslation() but now im not sure what to do to change it?

#

I know, im sorry for asking raw code instead of figuring out but im a little lost with this one

young knoll
#
Transformation transform = entity.getTransformation()
transform.setTranslation(new Vector(0, -2, 0))
entity.setTransformation(transform)
#

Somethin like that

icy bone
#

Yea there is no settranslation

eternal oxide
#

its probably mutable

icy bone
#

I can do transform.getTranslation().set()

#

Let me try that

#

It requires a Vector3fc

#
        transformation.getTranslation().set(new Vector3f(0, -2, 0));```
I tried this but doesn't move it down sadly
eternal oxide
#

probably due to quaterions. Its easier to use joml vec3f than bukkits Vector

icy bone
#

Oh wait

#

forgot something

#

forgot to set it

#

Ah yes, this works perfectly! Thank you so much guys

#

Now i dont need to keep running an Task that will keep it moving every tick and everthing

#

@smoky anchor With your help and @eternal oxide and @young knoll , I manage to make a block move very smoothly beneat the player and makes it looks like the player is changed into a block. Thank you so much guys!

solid cargo
#

Is there any other note block lib other than noteblockapi? I guess not?

chrome beacon
#

What's wrong with NoteBlockAPI?

solid cargo
sullen canyon
night badge
ocean hollow
#

how can i make an event. If a row was added to the mysql table, then execute the method.

eternal oxide
#

no simple way, best to poll the db

ocean hollow
#

I think it will load the server, if done through the scheduler and constantly check

remote swallow
#

are you a surgeon

tender shard
#

i know a surgeon

quiet ice
#

I am a code surgeon

orchid trout
#

nerd comedy

ocean hollow
orchid trout
#

:pool:

#

:swimmingarea:

#

:water:

#

๐ŸŒŠ

#

:waterbox:

#

:lake:

#

:snof

#

lake:

tender shard
#

:baclofen:

orchid trout
#

what is milf hunter

quaint mantle
#

guys

#

i need help

upper hazel
#

I did not quite understand. Ie it turns out that when my plugin creates plaseholders using the placeholder api, then it is automatically sent to the wiki?

remote swallow
undone axleBOT
#

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

remote swallow
upper hazel
#

ehh?

quaint mantle
#

basically, i created a plugin and i called the commands in the file and i also called it in the plugin.yml file, but when i try it in game it doesnt work

quaint mantle
remote swallow
#

show the code

remote swallow
upper hazel
remote swallow
#

it doesnt go to the wiki

quaint mantle
remote swallow
remote swallow
#

and any errors

upper hazel
#

i'm studying placeholder api and i don't understand how contact with another is created from my plugin

quaint mantle
#

i didnt make multiple classes

upper hazel
quaint mantle
#

also no errors

remote swallow
#

smh

#

main class and plugin.yml then

quaint mantle
#

what

quaint mantle
#

i cant send any message it just says error try again later and a file pops up

remote swallow
#

no

#

smh is shake my head

quaint mantle
remote swallow
#

?paste it

undone axleBOT
remote swallow
#

you dont tell the plugint o do commands

#

call getCommand("name").setExecutor(this)

dawn ledge
#

Hi,
I'm trying to modify a display block entity. but I don't know how to do it have you some example ?

chrome beacon
#

Modify what and when

quaint mantle
#

so

quaint mantle
remote swallow
#

if your command is called commandname yes

quaint mantle
#

can you give me an example im following a youtube tutorial

#

it doesnt show this

#

its 10 years old

chrome beacon
#

Shouldn't have changed

remote swallow
quaint mantle
remote swallow
#

literally that code

quaint mantle
#

so i just call it?

#

nothing else?

remote swallow
#

getCommand("test").setExecutor(this)

quaint mantle
#

got it

tender shard
#

setting the executor to "this" is pointless

#

it's by default set to the plugin's instance

upper hazel
dawn ledge
#

I'm trying to modify a display block entity to display a half of a block I spawn it with that : spawnEntity(pointer, EntityType.BLOCK_DISPLAY);
but it just spawn the entity and I don't know how to set the block to be displayed

remote swallow
#

they dont auto add to the wiki

#

nothing is automatically added there, you have to add it

chrome beacon
upper hazel
#

Does that mean he has to be there?

remote swallow
#

read

dawn ledge
quaint mantle
#

@remote swallow like this?

public void onEnable() {
    getServer().getPluginManager().registerEvents(this, this);
    
    getCommand("timer").setExecutor(this);
    getCommand("ItemTimer").setExecutor(this);
    getCommand("createhole").setExecutor(this);
}
remote swallow
#

sure, but you should handle each command in a seperate class

umbral ridge
#

How do you check if player went in a 2D location or is in it? (Location pos1, Location pos2) on PlayerMoveEvent - I guess that's the only way to check quickly - figured it out

chrome beacon
quaint mantle
#

so this will make my commands run right

#

lets test it

tender shard
#

oh 2d location? well just some tiny math

quaint mantle
#

@remote swallow im getting an error

#

[19:33:28 ERROR]: Error occurred while enabling VoidTimerPlugin v1.0 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "org.thehole.voidtimerplugin.VoidTimerPlugin.getCommand(String)" is null
at org.thehole.voidtimerplugin.VoidTimerPlugin.onEnable(VoidTimerPlugin.java:35) ~[VoidTimerPlugin.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.1.jar:git-Paper-68]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.1.jar:git-Paper-68]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:639) ~[paper-1.20.1.jar:git-Paper-68]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:550) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:435) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-68]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

tender shard
remote swallow
#

the commands arent in pluign.yml

umbral ridge
ocean hollow
#

why it gives me sql exeption? if i load it on another server db is connecting correctly

quaint mantle
# tender shard you didnt register your command in plugin.yml

name: VoidTimerPlugin
version: '${project.version}'
main: org.thehole.voidtimerplugin.VoidTimerPlugin
api-version: '1.20'
commands:
timer:
description: abc123
usage: /timer {seconds}

ItemTimer:
description: nbc123
usage: /itemtimer [material] [seconds]

createhole:
description: abc123
usage: /createhole

#

i did

tender shard
remote swallow
#

they should all be lowercase

#

in plugin.yml and ur code

umbral ridge
tender shard
#

and then you can keep an instance of your region, and later just do ```java
if(myRegion.isInside(0,100)) { ...

umbral ridge
#

yea

quaint mantle
umbral ridge
#

thanks!

remote swallow
tender shard