#help-development

1 messages · Page 1153 of 1

chrome beacon
#

Doesn't matter

#

If it works on Spigot and not on Paper

#

That's a paper issue

hardy anchor
#

My last plugin worked perfectly

chrome beacon
hardy anchor
#

This worked thanks.

deep herald
kindred valley
#

?paste

undone axleBOT
kindred valley
#

Whats the problem

kindred valley
#

Which line returns null

deep herald
#

the teleport i think

#

the location is null

#

location

fair rock
#

Which line.

kindred valley
#

Whats survival location

fair rock
#

Read the log

deep herald
kindred valley
#

But what is it

deep herald
#

wdym what is it

kindred valley
#

What you put inside of it

deep herald
#

the location of the player

kindred valley
#

Is it static or a changing value

deep herald
kindred valley
#

Put the log here

deep herald
#

buddy the location is null

#

i have a null check and it returns

#

in my movement listener

#

below the cmd

fair rock
#

Just send the damn error

deep herald
#

lemme make it error then hold on

slender elbow
#

where and how are you registering the listeners and command?

deep herald
slender elbow
#

how

deep herald
slender elbow
#

yep

#

you are creating two separate instances

deep herald
#
java.lang.IllegalArgumentException: Cannot measure distance to a null location
    at org.bukkit.Location.distanceSquared(Location.java:506) ~[patched_1.14.4.jar:git-Paper-245]
    at net.hyperiongames.sciutils.command.GameModeCommand.onMove(GameModeCommand.java:58) ~[?:?]
    at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor3.execute(Unknown Source) ~[?:?]
    at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.14.4.jar:git-Paper-245]
    at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.14.4.jar:git-Paper-245]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.14.4.jar:git-Paper-245]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:545) ~[patched_1.14.4.jar:git-Paper-245]
    at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1103) ~[patched_1.14.4.jar:git-Paper-245]
    at net.minecraft.server.v1_14_R1.PacketPlayInFlying.a(SourceFile:126) ~[patched_1.14.4.jar:git-Paper-245]
    at net.minecraft.server.v1_14_R1.PacketPlayInFlying$PacketPlayInPositionLook.a(SourceFile:18) ~[patched_1.14.4.jar:git-Paper-245]
    at net.minecraft.server.v1_14_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23) ~[patched_1.14.4.jar:git-Paper-245]
    at net.minecraft.server.v1_14_R1.TickTask.run(SourceFile:18) ~[patched_1.14.4.jar:git-Paper-245]
    at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.14.4.jar:git-Paper-245]
    at net.minecraft.server.v1_14_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.14.4.jar:git-Paper-245]
    at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.14.4.jar:git-Paper-245]
    at net.minecraft.server.v1_14_R1.MinecraftServer.aX(MinecraftServer.java:1029) ~[patched_1.14.4.jar:git-Paper-245]
    at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:1022) ~[patched_1.14.4.jar:git-Paper-245]
    at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.14.4.jar:git-Paper-245]
    at net.minecraft.server.v1_14_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1006) ~[patched_1.14.4.jar:git-Paper-245]
    at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:929) ~[patched_1.14.4.jar:git-Paper-245]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]```
formal spear
#

is there any plugin that enables such colors on the tab in chat and other plugins?

deep herald
#

ah alr

slender elbow
#

so they are two separate maps, the instance that is registered as a listener never sees the map of the instance that is registered as a command

deep herald
#

how do i fix?

slender elbow
#

create the GameModeCommand once

#

or, arguably, the correct design choice is to split out the command from the listeners from the map

deep herald
#

true

#

hold on

slender elbow
#

and DI the map around

wraith delta
eternal skiff
#

is there any API to generate random nicks?

half bluff
#

hey y'all, I'm looking into updating a plugin from minecraft version 1.12.2 to version 1.22-- what will I need to look into? I've got a fairly good understanding of java, but have never worked on a minecraft plugin before

half bluff
low field
#

i could port it

ornate remnant
chrome beacon
half bluff
#

I wont say no, but I'm happy to do it myself-- is there documentation anywhere on what needs changing?

chrome beacon
#

The problem is most likely going to be WorldGuard

low field
half bluff
#

as in what it's using from WorldGuard?

low field
#

and adapt the logic to the newest ver

low field
half bluff
#

nms?

chrome beacon
#

Zupa at least take a look at the link they said before trying to answer

low field
#

i did

#

i'd start by trying to just change the spigot version in the build file

#

and see if it works

chrome beacon
#

Then you would know it doesn't contain any nms

low field
#

i now see

ornate remnant
#

my question is though

#

isnt there a newer plugin made for claiming land

low field
half bluff
#

I'm sure

ornate remnant
#

is there any specific reason you need to use this

chrome beacon
half bluff
#

yeah

#

that'll need to be updated

#

or at least the reference to it will be

ornate remnant
#

Start by changing spigot & wg version in the pom

#

see what breaks

low field
#

Olivo can you help me with adding a newly registered enchantment to /enchant tab completion?

#

update tags packet in reconfiguration doesnt seem to work

chrome beacon
#

What version are you on

low field
#

1.20.4

half bluff
ornate remnant
#

probably wont work

half bluff
#

k

ornate remnant
#

if it does

#

try it on the actual server and see what breaks

#

if it doesnt youll have to rewrite the shit thats deprecated

#

im sure a lot has changed since 2013

#

or whenever it was updated

#

2017

chrome beacon
low field
#

but i want the vanilla one

ornate remnant
#

recreate vanilla one then

low field
#

also for the enchant to display on the client

#

so it can pull the name and add it to the lore

chrome beacon
#

Is that registry synced in 1.20.4?

#

I thought it wasn't

ornate remnant
#

you have to handle that urself

chrome beacon
#

You need to put the lore in yourself

low field
#

:/

chrome beacon
#

as far as I'm aware

ornate remnant
#

yup

low field
#

why

ornate remnant
#

client doesnt recognize custom ones

young knoll
#

I think that was a 1.21 thing

chrome beacon
#

Yeah

low field
#

well it does receive the tag

ornate remnant
#

and as it uses a translatable compontent

low field
#

so it should display it right

ornate remnant
#

it wont show anything

#

no

#

because the client doesnt have anything to show

chrome beacon
#

You'd have to provide a resourcepack with the name

#

but that's doable

low field
#

sucks

chrome beacon
#

Registry syncing problem is the biggest issue

low field
#

whats registry syncing

chrome beacon
#

You should update to 1.21

#

Or just handle the lore yourself

young knoll
#

Resource packs didn’t work

chrome beacon
#

hm? They don't?

young knoll
#

Enchantments were sent via numeric ID

chrome beacon
#

I was talking for 1.21

young knoll
#

Ah

#

Then yeah

#

You don’t even need to use a translatable component

#

Iirc it can be any component

ornate remnant
#

ig

low field
#

which packet is enchant info sent with

ornate remnant
#

doesnt matter

chrome beacon
#

It's synced with the registry

ornate remnant
#

client doesnt recognize anyways

chrome beacon
#

which doesn't happen on 1.20.4

low field
#

can i do it manually

#

somehow

ornate remnant
#

just add the lore yourself

chrome beacon
#

Yes you can manually add lore

low field
#

and tab completion?

chrome beacon
#

Make your own command

low field
#

bruh

ornate remnant
#

its like 10 lines of code

young knoll
#

Does the tab complete event not fire for vanilla commands

#

Idk

chrome beacon
#

It probably does

low field
#

idk

chrome beacon
#

but it's not worth the effort of injecting and messing around with the vanilla commands

low field
#

but seems like brigadier takes the tab completion from the registries

ornate remnant
young knoll
eternal oxide
#

tab complete doesn't fire for commands at all, only args

chrome beacon
#

which will just end up being more code than registering your own command

low field
#

running the command works

#

just not tab completion

chrome beacon
#

so you've already injected your enchantments

low field
#

i registered them

ornate remnant
#

i dont even get the point of using the vanilla enchantment system

#

just create your own

low field
#

smh

ornate remnant
#

so much easier

low field
#

im not trying to make my own

#

im trying to add to the vanilla one

#

its the whole point

chrome beacon
#

which is a mess to do

ornate remnant
#

^

chrome beacon
#

You're better off updating

low field
#

did they remove registry freezing in 1.21

young knoll
#

Then update to a version where vanilla allows that

#

No

low field
#

i dont think its a mess

ornate remnant
#

what about the problems youre experiencing?

chrome beacon
#

You will need to rewrite the thing when you update anyways

low field
#

why

ornate remnant
#

making your own framework for everything >>

low field
#

ill just add code to check field names

chrome beacon
#

You're messing with internals that are changing

ornate remnant
#

?

#

ive worked with vanilla enchantments myself

#

theres a reason why ive made my own

chrome beacon
#

Been down that path too

#

but I went the nms route

#

There's no point in doing so

ornate remnant
#

had another reason to create my own as well

#

but

#

yeah

low field
#

okay last question

#

would it be theoretically in any way possible to make the automatic lore and tab completion work

#

with the original command

chrome beacon
#

yes

#

but it's not worth the effort

low field
#

how then

ornate remnant
#

create the command urself

chrome beacon
#

Coll already told you what you needed to do

#

if you really want to keep the vanilla command

low field
#

update?

chrome beacon
#

tab complete event

slender elbow
#

tab complete event doesn't fire for pretty much any vanilla command

#

the client has no reason to ask the server for something it already knows about

young knoll
#

Yeah I had a feeling

slender elbow
#

like available enchantments

chrome beacon
#

oh well then you have to make your own command

young knoll
#

The docs don’t say that tho

chrome beacon
#

like I said ealier

young knoll
#

And I’m too lazy right now

ornate remnant
#

weve all pr'd untested code

#

you can pr unknown information to the docs!

hard socket
#

anyone knows something about the twitch API?

half bluff
#

What can y'all suggest to replace squirrelid, seeing as it has a few old vulnerabilities

chrome beacon
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!

hard socket
#

?paste

undone axleBOT
hard socket
chrome beacon
half bluff
#

uuid library

young knoll
#

A uuid library that does what?

chrome beacon
#

That's a bad practice

hard socket
#

yeah ik, just messing with code not trying to make something big

pseudo hazel
hard socket
#

I just want to know if it's possible

#

the docs are shit

half bluff
#

looks like it manages player profiles, but haven't seen much o fit yet

chrome beacon
pseudo hazel
#

then why do you want it if you dont know why you need it

hard socket
#

all are firing

chrome beacon
#

With questionable code

hard socket
#

the code works perfectly but the twitch chat recieves nothing

pseudo hazel
#

hmm

half bluff
#

what @chrome beacon said

pseudo hazel
#

wacky

#

just write those parts yourself

#

you can probably simplify it

chrome beacon
half bluff
#

fair

pulsar pier
#

What would be the best way of marking specfic blocks with extra data? My casino plugin needs to make some blocks in the world (like 5-10 blocks in total) be designated as crates where people can right click with a key to open it and get rewards.

Basically I need some way of saving the ID of a crate (all the settings for each crate is defined in config) in each block, so that the server knows which crate the player has just clicked on. At first I was thinking of having an array with block coordinates, but maybe there's a more performant way to embed data directly into the blocks, so I don't have to loop an array each time a player right clicks on any block.

young knoll
#

?blockpdc

undone axleBOT
pulsar pier
#

dw I found out

half bluff
#

so, what's the difference between bukkit.worldguardplugin and bukkit.worldguard?

#

Like obviously they're different classes

#

but

#

in terms of their function

ivory sleet
#

i think one is the javaplugin derivative

#

and one is just the entrypoint/bootstrap of the system

#

for example if u wanted to move to another platform, it wouldnt be the plugin derivative calling the entrypoint, it'd be some other platform specific class

#

just guessing

half bluff
#

I think I get it

worldly ingot
#

WorldGuard is the core class which is platform agnostic. WorldGuardPlugin is a Bukkit JavaPlugin

#

If you looked at the source for the WorldGuard class, you'd find zero references to Bukkit types

quaint mantle
#

Is PersistentDataContainer#get() a safe operation?

echo basalt
quaint mantle
#

Will it give an error?

echo basalt
#

if?

quaint mantle
#

not has the key

echo basalt
#

Check what it's annotated by

#

If it's @NotNull it will

#

If it's @Nullable it won't

quaint mantle
#

@Nullable

#

So it will give errors?

echo basalt
#

go figure it returns null

quaint mantle
#

Btw, how does this kind of clases do smth ?

#

where's all the logic?

echo basalt
#

They're an interface

#

The whole point of Dependency Inversion (check pins, click and scroll down) is to hide logic

quaint mantle
#

how do i make that golden plate that boost me inwards and works basically like tnt explosion

echo basalt
#

An interface is a sort of "template class" that defines the methods / basic structure of a class without defining an implementation

quaint mantle
echo basalt
#

Each class that inherits the interface then implements the methods

#

In this case you're seeing the interface, not the implementation of it

echo basalt
#

Dependency Inversion is the pattern of making your public API a bunch of interfaces and making its implementation elsewhere

#

Effectively hiding any implementation details

quaint mantle
#

Ohhhhh

#

Okay okay thank you

undone axleBOT
#

Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.

echo basalt
#

Let's break it down real quick

#

In short, what you want is to apply some sort of "force" or movement when a player steps on a given block

#

When player steps on block -> See if it's the right block -> Apply the given movement/force (aka a velocity)

quaint mantle
#

bro's cooking

echo basalt
#

I cba spoon feeding

quaint mantle
#

Lol

echo basalt
#

There are 2 ways to see if you're stepping on a block

#

You can, for example, have a task that runs every tick

#

Or you can make a listener to see when the player moves

#

Seeing if it's the right block is fairly trivial

#

And launching the player towards a location might involve some basic math depending on how you want to do this

#

You can, for example, launch the player in the direction they're looking

#

Or in a hardcoded direction (let's say exclusively up or exclusively to the north)

slate siren
#

Something I'm wondering about

echo basalt
#

??

quaint mantle
#

??

sonic goblet
#

??

quaint mantle
#

??

slate siren
#

😂

#

??

quaint mantle
#

💀

slate siren
#

Pretend I didn't ask

sonic goblet
#

Like lag/delay?

slate siren
echo basalt
#

Do you want me to explain how the tick cycle works or what?

slate siren
#

Actually, what I'm wondering is this:

quaint mantle
#

Does Player#isOnGround update everytick?

echo basalt
#

When the client moves they send a boolean in their movement packet indicating whether they're on ground or not

slate siren
# sonic goblet Like lag/delay?

So it includes many systems after a while, for example, when someone dies, death is added, after a while there is a slowdown etc.

quaint mantle
echo basalt
#

Alright my boy wants the explanation to the server tick loop

quaint mantle
#

-# 💀

slate siren
#

💀

echo basalt
quaint mantle
#

can i anyway send a packet AS a player?

slate siren
#

Let's explain it to him

#

By the way, I couldn't establish an API connection between my 2 plugins

#

Do you have any suggestions for this?

#

Or I can do it using placeholderapi

quaint mantle
# slate siren Or I can do it using placeholderapi

💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀

slate siren
#

Plugin1 ==>placeholderapi ==plugin2

quaint mantle
#

-# 💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀

sonic goblet
slate siren
#

Okay, no need to exaggerate that much, after all we are in the learning phase.

#

xd

slate siren
#

I have a plugin 13mb

#

WHY 🙄

quaint mantle
#

what kind of plugin do you have

slate siren
quaint mantle
#

is bro shading every api?

#

💀

#

jk

echo basalt
# slate siren So it includes many systems after a while, for example, when someone dies, death...

In short when you're playing multiplayer (or even singleplayer, as it just runs an internal server) you have 2 "sides":

  • Client
  • Server

The client connects to the server, they shake hands and then the server tells the client what block's what through packets. Packets are sent through the network and the network has a delay, which is called latency.

The server and client work under a fixed tick loop. This is separate from the client's FPS / Rendering loop, as the rendering loop is usually uncapped (it'll render frames and push them as they're ready), while the fixed tick loop is capped (usually to 20 ticks per second), meaning the server will wait the remaining time once a tick has finished execution to maintain the 20TPS.

For example, if there are 20 ticks in a second, each tick has at most 50ms to execute in order to maintain the target TPS. (1000 / 20tps = 50mspt). If the tick only takes 13ms to execute the server will wait the remaining 37ms before iterating the next tick.

A tick processes every packet received by the target at once, and between ticks packets are accumulated. This processing consists of ticking every entity, running damage calculations etc. If you die in this tick, it'll be accounted for and add a tiny little processing time. It only becomes a problem if your total processing time goes beyond the MSPT target (50ms).

slate siren
#

Because the plugin kit system includes all the pvp systems and worldrdit like systems.

echo basalt
quaint mantle
#

hey is there any way i can send packets as a player?

echo basalt
#

you can kinda pretend the player sent them

slate siren
echo basalt
slate siren
#

I read

echo basalt
#

I'm explaining with the goal of covering all existing bases and removing any existing assumptions

quaint mantle
sonic goblet
slate siren
#

@echo basalt Could you give me a brief summary of how to integrate the two plugins

sonic goblet
#

You started off with “In short”

#

xd

echo basalt
#

read all of it

#

enjoy

slate siren
#

I have a plugin, I want to get the kills amount in the data.db from my other plugin to use it.

quaint mantle
# sonic goblet You started off with “In short”

-# 💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀

echo basalt
#

that's the long explanation

echo basalt
#

Let's start by splitting data into a 2 states: In memory and In storage

slate siren
echo basalt
#

Data has a lifecycle and it should only be fetched from storage when it's "cold", like when the player is just logging in or they're offline

#

or the server's starting up or whatever

#

In short to integrate "2 plugins" you need to start thinking of what plugin relies on the other

#

A depending on B is fine
B depending on A is fine

A and B depending on each other can be problematic

slate siren
#

I understand, I understand, to summarize.

echo basalt
#

add the target plugin to your project and expose some sort of API that you use yourself

#

MyTargetPlugin.getInstance().getKillTracker().getKills(myPlayer)

#

type deal

#

^ don't do this btw it's ugly ass code

worthy yarrow
#

Hey illusion I know you don't like me but would you mind sending some knowledge my way on managing minigame lifecycles?

slate siren
#

I'm confused about this.

echo basalt
#

You have my minigame guide on my github

worthy yarrow
#

Ah forgot you even had that

echo basalt
#

Deciding when to create a game instance is very much similar to deciding on how to scale your cloud or whatever

#

You can create a game when a matchmaking request is sent but that introduces latency

#

You can have buffers but you need to scale them based on demand

#

If you have too many you're wasting resources, if you have too little you're prone to latency during spikes

worthy yarrow
#

Hmm

echo basalt
#

It's like that but you're hooking with your own

rich marsh
#

i need a plugin that has 5 legendary weapons that can only be crafted once

echo basalt
#

?services or make it yourself

undone axleBOT
remote swallow
#

im guessing youve used placeholder api then

latent rampart
#

hi everyone

#

im trying to make a simple plugin to add like custom crafting recipes to my server

#

im not too experienced in Java but like i know enough to write code in it

#

i cannot for the life of me find any resources that provide a simple plugin template

#

and i really dont want to rely on intellij/eclipse for their weird gimmicky plugins to create a template for you

slate siren
latent rampart
#

oh i cant send images

young knoll
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

latent rampart
#

i have a directory in plugins called Recipes/, and then Recipes/plugin/

#

from looking around i gathered i can probably name these folders whatever i want?

#

unless theres some need to do like

#

Recipes/net/lunarsnow/lunarsnow/

young knoll
#

No

#

What are in these files

latent rampart
#

one plugin.java file

#

at Recipes/plugin/

remote swallow
#

most people do have a package yes

latent rampart
#

yeah

young knoll
#

You can’t just have files in a folder to make a plugin

#

You need to compile it

latent rampart
#

oh right

#

jar file

#

wait is that real?

#

do i have to compile it every time i make changes

remote swallow
#

that you have to compile something to make it a plugin?

#

yes

latent rampart
#

well yeah i just thought it could be interpreted since jar is literally a zip file with compiled java code lol

quaint mantle
#

?paste

undone axleBOT
violet blade
latent rampart
young knoll
#

.java isn’t compiled, that’s the raw source code

latent rampart
#

thank you ill look at that

young knoll
#

Compiled code is in .class files

latent rampart
#

yeah

quaint mantle
latent rampart
#

it just tells me i can create a plugin using these extensions to intellij

latent rampart
#

theres no "heres how a plugin is structured and how to make one"

#

i have to use the tools they want me to use

young knoll
#

Get the players location, subtract a tiny bit on the Y axis, get the block at that location, get its collision shape, and then check if your location is within that bounding box

latent rampart
# violet blade

is there a blank project i can look at for reference that uses these

#

i really just want to write code and thats it lol

remote swallow
#

most people use an ide which aides in the process of creating the projects

quaint mantle
#

how do i actually get the code of an interface?

remote swallow
quaint mantle
remote swallow
#

it depends on the project

latent rampart
quaint mantle
#

I did LivingEntity#isOnGround() and it takes me to Entity.class interface

remote swallow
remote swallow
young knoll
#

The implementation is inside CraftBukkit

remote swallow
#

?stash]

#

?stash

undone axleBOT
latent rampart
quaint mantle
#

Yeah, in CraftPlayer

remote swallow
#

create the project and use javac to compile as needed then

quaint mantle
#

is CraftPlayer#isOnGround Exploitable?

young knoll
#

Yes

latent rampart
young knoll
#

The client controls the onGround Boolean

quaint mantle
#

LivingEntity#isOnGround

young knoll
#

For some reason

remote swallow
violet blade
quaint mantle
#

So there's no non-exploitable bukkit function to get if its on ground?

young knoll
#

No

young knoll
#

Alternatively rayTrace down from the players location a tiny bit

quaint mantle
#

this should work

quaint mantle
latent rampart
#

0.00001 to 0.4 units ig

young knoll
#

0.01 should do fine

quaint mantle
#

okay

#

bro

#

if i do player location -0.1 and do !isAir()

#

its the same

#

😂

violet blade
young knoll
quaint mantle
young knoll
#

The player could be hovering slightly above a slab but still be in the same block as the slab

#

isAir would be false but the player is not on the ground

violet blade
latent rampart
#

does api-version in the plugin.yml relate to the minecraft version?

latent rampart
#

where it would like give a warning

#

alright

young knoll
#

The plugin just won’t load on an older version

latent rampart
#

thats a little dumb

quaint mantle
remote swallow
#

the point is to specify the minimum api version it supports

latent rampart
#

is there like an option to ignore the version

remote swallow
#

if you want it to work on an older version you use an older api version and tell it thats the minimum

violet blade
#

what (and why?)

half bluff
#

so, I got updates-- how do I test my plugin?

latent rampart
# quaint mantle why

well if i am a server administrator and i use a plugin thats the wrong version, it may or may not work but i get no feedback if its the wrong version this way

remote swallow
#

most plugin pages say what version they support

quaint mantle
#

that's not how it works

remote swallow
#

and you get an error if its an unknown/newer version

latent rampart
#

im not sure, but its fine it doesnt affect me

latent rampart
remote swallow
#

spigot is forward compatabile, all older api versions will work on a new server version

latent rampart
#

thats lovely

river oracle
#

All I'm going to say is please target API verison to the lowest miencraft version you plan to target or you'll continue to get more and more errors over time :>

violet blade
slate siren
#

Luckily 1.8.8 is the best 😃

latent rampart
#

its server specific so i only have to account for the version of the server

quaint mantle
#

why does ppl still use 1.8.8?

#

whats the point?

latent rampart
#

i use 1.8.8

paper viper
quaint mantle
#

just for the pvp?

slate siren
latent rampart
#

its more like consistency

paper viper
#

Good luck developing 💀

quaint mantle
#

bruh

latent rampart
#

my friends like building more than

#

...whatever new minecraft has to offer

quaint mantle
#

why lol

#

it has less blocks

latent rampart
#

i have my public server on 1.8.8 and use viaversion so everyone can play together

river oracle
#

okay that's wild as fuck because building on newer versions is just objectively better

quaint mantle
#

they can build the same on every version up to latest

violet blade
#

you can always just not use the new blocks and still continue on newer version

quaint mantle
latent rampart
#

or create new instances

river oracle
#

I feel like there is this illusion its a majority

#

when in reality its not even close

slate siren
# quaint mantle it's just older

There is no harm in it being old, it is still a very preferred thing for pvp, think about it this way, if you ask pubg mobile players, they all wish the old pubg came, this is the logic, people got used to the old version, it is great for pvp

quaint mantle
river oracle
#

you have to do a full rewrite to restore 1.8 combat

violet blade
#

with all of the public exploits out there unless you are dealing with a totally custom server software, staying on older versions is just asking for trouble

quaint mantle
latent rampart
slate siren
#

I feel like an old turtle when I enter pvp in new versions

quaint mantle
river oracle
young knoll
#

I wish it were that easy

latent rampart
#

but its not even about the pvp lol

river oracle
#

so is regen etc its a lot more than cooldown

paper viper
#

I’m sorry but 1.8 is just nothing when you compare it to the 1.21 features when it comes to just features alone

quaint mantle
river oracle
#

using 1.8.8 for any reason outside of PVP is legit insanity

latent rampart
#

new regen is absolutely absurd

#

pvp wise

#

and gameplay wise

quaint mantle
#

💀

slate siren
#

lol

latent rampart
#

anyway its just my personal choice for my personal server

quaint mantle
#

i'll admit i like both pvps, but ppl are losing so much by never updating

paper viper
#

why isn’t there a ?1.8 yet

latent rampart
#

for which i will be writing custom code for

young knoll
#

?1.8

undone axleBOT
remote swallow
#

1.8 is just so lacking in features its a pain to actually make stuff in

young knoll
#

There is

paper viper
#

Oh lmao

slate siren
quaint mantle
#

💀

river oracle
#

wo 1.8 is almost 10 xD

latent rampart
remote swallow
#

almost as old as neon

quaint mantle
#

DID YOU SEE HYPIXEL IS GOING TO PORT TO 1.21?

river oracle
#

I wonder how many 1.8 servers don't patch all the exploits

#

I feel like you could just go around on a hacked client and crash so many servers

latent rampart
quaint mantle
slate siren
buoyant viper
#

spigoteers be like i use 1.8 becos its more performant like Yeah no duh its got like 99% less features than the latest version of MC

quaint mantle
#

have had

violet blade
paper viper
slate siren
latent rampart
#

yes LOL

quaint mantle
quaint mantle
remote swallow
river oracle
#

they rewrote that shit and its pretty solid now

quaint mantle
#

whats the next? ppl not updating to +1.20.5 cuz of the NBT? 💀

violet blade
#

octree going brrr

quaint mantle
#

or not updating 1.13+

river oracle
#

its just a sad place, but whatever you just reject support and move on

quaint mantle
slate siren
river oracle
quaint mantle
#

mojang can control everything

latent rampart
#

i wont ever play over 1.19 because of chat reporting, but im not sure yet if thats been resolved or if they dont care anymore

remote swallow
#

people pick random versions and dont like updating

young knoll
#

No they can’t

quaint mantle
river oracle
#

Idk what power you think mojang has, but no matter how hard they try they could never kill 1.8 they could never kill modding etc etc

paper viper
young knoll
#

Even if Mojang removes 1.8 from the launcher and disables it from authentication

remote swallow
#

1.8.8 for pvp or whatever, 1.17 because of the chunk gen then 1.18 because chat reporting

latent rampart
#

i havent heard anything about it in a while but i also dont want to associate with that stuff

young knoll
#

People will just get it elsewhere and make offline servers

river oracle
quaint mantle
young knoll
#

What

quaint mantle
#

but theyll change the programming

river oracle
river oracle
#

ezgif.com-gif-maker.gif

latent rampart
violet blade
quaint mantle
#

theres a server called McPY (abandoned)

violet blade
#

eaglecraft

young knoll
remote swallow
#

eaglercraft is funny

quaint mantle
#

That is minecraft server ported to Python

latent rampart
#

oh my god

river oracle
latent rampart
#

why lmao

river oracle
#

oh wait now its just minecraft in C

violet blade
#

assemblycraft when

latent rampart
#

i could get behind minecraft server in C

violet blade
#

someone already did a mc server software in bash

remote swallow
#

minecraft in rust

slate siren
#

I developed the animal kingdom war game, I think it turned out great
(1.8.8) better

young knoll
#

Congratulations your server now runs a bit faster

remote swallow
young knoll
#

Unfortunately it takes forever to update, isn’t even fully feature complete, and plugins don’t work

river oracle
#

congratulations your server nolonger has a billion dollar company maintaining it!

latent rampart
#

congratulations you spent a year working on something that will be outdated next year when they update the game again

violet blade
latent rampart
#

oh my god i spent like 10 million years talking and not actually doing the plugin

river oracle
#

Honestly I wouldn't wanna work on a plugin if it targeted the 1.8.8 API either

#

I'd probably just alt f4 out of my IDE and never code again

remote swallow
river oracle
latent rampart
#

im working on a plugin to add exp waypoints

#

with a database and such

river oracle
#

I wouldn't do many 1.8 plugins for less than a thousand

#

not having my library is devistating

violet blade
young knoll
#

And probably still contains some of my code

#

:D

remote swallow
#

uhhhhhhhhhhhhhhhhhhhhhh

#

no

#

infact yes

#

and you're credited

young knoll
#

You legally owe me a cut of the profits now

remote swallow
#

unfortunately for you ur library is mit

river oracle
slate siren
remote swallow
#

we are both the pineapple and weve both contributed to pineapple

river oracle
# remote swallow we are both the pineapple and weve both contributed to pineapple
Added lines: 28253, Removed lines: 14212, Total lines: 14041
[miles@aurora Pineapple]$ git log --author='The-Epic' --pretty=tformat: --numstat -- "*.java" | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "Added lines: %s, Removed lines: %s, Total lines: %s\n", add, subs, loc }'
Added lines: 1940, Removed lines: 128, Total lines: 1812
remote swallow
#

nerd

#

wait you could fuck me if you go and squash merge dev

river oracle
#

unfortunately I can't squash dev though

#

it has merges from forks

#

can't squash past that i don't think

remote swallow
#

squash it anyway

latent rampart
#

for main: fr.maxlego08.template.Template cant i just set this to something like Plugin and just put a Plugin.java at the root of the project?

river oracle
#

sorry we don't support 1.8 here 😂

remote swallow
#

sure, but its still recommended to have a package

latent rampart
#

im not into Java much, whats a package?

#

ive seen it at the header alot lol

remote swallow
#

fr.maxlego08.template

latent rampart
#

what does it do though

remote swallow
#

identify your code

violet blade
#

you can replace the entire thing to me.<whatever>.<pluginnameorwhatever>.Whatever

latent rampart
#

its already identified, its in my directory i have named "Recipes_plugin_leahmc"

#

lol

latent rampart
#

its not that much work i just wanna know why i have to do that lol

violet blade
#

well its the standard naming convention but honestly you can do whatever as long it compiles into an usable thing

remote swallow
#

?namingconventions

#

?conventions

latent rampart
#

i think ill add a src/

#

but thats it

#

thanks

#

wait no but

#

does that make since since its just being compiled as is

#

it doesn tmatter lol

violet blade
#

if you don't intend for anyone else to see your code you can do whatever you like

latent rampart
#

yeah okay

violet blade
#

most code structuring is for everyone to read and understand

ancient ibex
#

How to get this to work
/tp @p XYZ /title @p title name

#

In the one command block

latent rampart
#

how should i compile this?

remote swallow
#

a build tool is normally used, could use javac

latent rampart
#

and should the root directory be at the root of the compiled plugin or should i do like Recipes/*

ancient ibex
#

I'm using MCBE

latent rampart
#

im getting conflicting stuff on this

#

plus javac just says invalid argument to -cvf lol

violet blade
ancient ibex
#

Oh

violet blade
#

just put two commandblocks connected with redstone

ancient ibex
#

Okay

#

So how would you recommend for the chain block?

#

Basically it should function like this

#

Tp

#

Then print name

remote swallow
latent rampart
#

okie

ancient ibex
#

Any build tools for MCBE XBOX

#

Like it would be nice to have something like land claimes

violet blade
slate siren
#

@latent rampartI found a very good suggestion

latent rampart
#

helloo

ancient ibex
#

Take the signal? Repeater?

#

Couldn't just use a command block joint to another?

#

Also my as it the same way

#

Should do a. Chain them use /execute

#

The the title

#

?

violet blade
ancient ibex
#

Shouldn't it be simpler?

latent rampart
#

😭

ancient ibex
#

Nvm

#

Got it to work

#

How to make a command?

#

Like make a scoreboard list of commands and do /warp

remote swallow
violet blade
violet blade
remote swallow
#

yeah

echo basalt
#

this is cursed

quaint mantle
#

is this okay for listening for send of packets?

package com.frsvn.skyblock.packets;

import com.frsvn.skyblock.customevents.PacketEvent;
import io.netty.channel.ChannelDuplexHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
import org.bukkit.Bukkit;

public class PacketListener extends ChannelDuplexHandler {
    @Override
    public void write(final ChannelHandlerContext ctx, final Object packet, final ChannelPromise promise) {
        Bukkit.getPluginManager().callEvent(new PacketEvent(packet));
    }
}
#

yea right?

#

?1.8

undone axleBOT
cedar saffron
echo basalt
#

also you want to call super.write or it won't like it

quaint mantle
#

Yeah you right

#

how do I cancel it?

echo basalt
#

to not let the packet go through

#

you just don't call super.write

quaint mantle
#

oh okay

#

can I set multiple packet handlers for a player?

echo basalt
#

ye

quaint mantle
#

k

slate siren
#

I got the groups that a player has in Luckperms, I also got the weight value, but why can't I get the prefix?

#

I am coding a chatManager

quaint mantle
#

ask in luckperms discord

slate siren
#

Ur right

#

Where is link

quaint mantle
#

I won't send it, you can search it on google

slate siren
#

?paste

undone axleBOT
torn shuttle
#

guys

#

the ai is starting to get sassy

quiet ice
#

Answer back with fourty-two

torn shuttle
#

our most powerful ai yet

novel frost
#

i wonder if it's trying to get you to solve a captcha for gemini /conspiracyJerk

dawn flower
#

What's the best way to completly blind a player

quiet ice
#

Shaders possibly?

young knoll
#

Pocket sand

torn shuttle
#

a sharp stick

#

man I should just take a break

sly topaz
#

a big display entity right to their face

dawn flower
#

Would text displays be better than block displays for that

lilac dagger
torn shuttle
lilac dagger
#

maybe, but bots aren't good at reading language yet no?

proud badge
torn shuttle
#

...

#

chatgpt can solve its own captcha

#

how is that any kind of valid captcha

lilac dagger
#

i dunno, why else would it do that then?

near void
#

how do i remove atributes of a sword in

private static ItemStack createItemFromConfig(Map<String, Object> itemConfig) {
String materialName = (String) itemConfig.getOrDefault("material", "STONE");
Material material = Material.getMaterial(materialName.toUpperCase());
if (material == null) material = Material.STONE;

    ItemStack item = new ItemStack(material);
    ItemMeta meta = item.getItemMeta();
    if (meta != null) {
        String name = ChatColor.translateAlternateColorCodes('&',
                (String) itemConfig.getOrDefault("name", ""));
        meta.setDisplayName(name);

        List<String> lore = (List<String>) itemConfig.get("lore");
        if (lore != null) {
            for (int i = 0; i < lore.size(); i++) {
                lore.set(i, ChatColor.translateAlternateColorCodes('&', lore.get(i)));
            }
            meta.setLore(lore);
        }

        Boolean showAttributes = (Boolean) itemConfig.get("attributes");
        if (showAttributes == null || showAttributes) {
          
        } else {
           
        }

        item.setItemMeta(meta);
    }
    return item;
}
dawn flower
#

Because it's exactly what I want

near void
#

no its a plugin

dawn flower
#

A plugin might need a resource pack

near void
#

i have seen plugins without resource pack that can hide attributes

dawn flower
#

Hiding attributes is normal

#

I want something else

remote swallow
#

item flags

remote swallow
violet blade
worldly ingot
#

It's not a particularly complicated feature. It's really just a title that has a character which covers the entire screen. That's it 😅

#

You could accomplish the exact same thing with a resource pack and the /title command

slate siren
#

?paste

undone axleBOT
slate siren
worldly ingot
#

You tell us. What's wrong? lol

slate siren
#

The rank plugin appears on the left side of the player's name, after doing this I pulled it in the chat format as {bk_rank} in essentialsx with placeholderapi

#

But the rank did not appear 🤔

worldly ingot
#

Have you registered this expansion? new BlocksinRanksExpansion().register(); in your onEnable()?

remote swallow
#

does essentials support papi placeholders like that

worldly ingot
#

I would assume it does, but I don't know the format for it

remote swallow
#

if you dont know try /papi parse me %bk_rank% and see

#

if it outputs what you expect it to

#

if it does then its an essentials issue

worldly ingot
#

^ Good debug command. If it's showing what you expect, then the issue is your Essentials config

wet copper
#

any1 else having problem with download spigot 1.21 jar ?

remote swallow
#

you cant download a spigot jar

#

you need to use buildtools

wet copper
#

i cant

#

i have tried several times

remote swallow
#

no one can

#

run buildtools

#

?bt

undone axleBOT
wet copper
#

tysm

slate siren
remote swallow
#

so check the result of it, if its correct you know its an essentials issue and to contact them about it

slate siren
#

Got it, I'll test it, thank you

ashen agate
#

Hey all, does anyone perhaps know why closing the chest lid programatically does not actually close the lid? Opening works fine, but closing (including forcefully updating the state after) does not seem to do anything. (1.19+)

hybrid spoke
#

otherwise where do you call the code?

torn bough
#

Hey does anyone know how to remove the first part of a command when typing it? It looks so cluttered
/myhome
Instead of
/homes:myhome

eternal oxide
kindred sentinel
#

How to get advancement namespaced keys for Bukkit.getAdvancement?

#

I dont think that new NamespacedKey(myPlugin, "minecraft:story/root") will work

sly topaz
#

what's a good i18n API that works with MM/components and preferably works both on Paper and Spigot

#

there's no way someone hasn't already made one

quaint mantle
#

how do i get a world by the name?

#

i can't open google chrome lol

hybrid spoke
quaint mantle
#

Thx

hybrid spoke
quaint mantle
#

an AI

#

i added it to my profile

#

look in #bot-commands

#

Cant use it lol

hybrid spoke
#

ahh its an app

quaint mantle
#

yuh

hybrid spoke
#

lol didnt knew discord had that

#

thats cool

quaint mantle
#

Lol

#

Try, the bot name is the bot page

#

U can try adding it

hybrid spoke
#

but it says premium, so i prob have to pay for it no?

quaint mantle
#

it is useful

hybrid spoke
#

and i got jetbrains ai and gpt+

#

so rather redundant

quaint mantle
quaint mantle
hybrid spoke
quaint mantle
hybrid spoke
quaint mantle
#

I think they're saying it's like a premium bot

#

But free

hybrid spoke
#

ohh got it

quaint mantle
#

idk

torn bough
#

Is it just me or are the docs not that good?

quaint mantle
eternal oxide
#

Docs are fine

quaint mantle
#
  • it's
eternal oxide
#

just remove any command that contains a : from the Collection returned by getCommands()

#

The Collection is mutable

torn bough
#

I get that part but I don't get the actual removing part

#

Like what is the function for removeCommand(arg)?

eternal oxide
#

modify the Collection. Delete entries you don;t want

quaint mantle
#

don;t

torn bough
#

Ohhh so it's a write/read

eternal oxide
#

you are not removing the actual command. You are modifying the List of commands the client will be told about

#

Something like getCommands().removeIf(...

quaint mantle
#

what error does Bukkit#getWorld give if world doesn't exists?

eternal oxide
#

null

torn bough
#

Doesn't work, only removes it from the new collection

eternal oxide
#

just getCommands().removeIf(cmd -> cmd.contains(":"));

torn bough
#

Oh I misunderstood what "getCommands" meant. Thank you that worked :)

kindred sentinel
#

how to get advancement by it's name using Bukkit.getAdvancement?

sharp ocean
#

I also have a question that has deluxetags and uses version 1.21+

blazing ocean
#

?ask

undone axleBOT
#

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

glass mauve
#

who is responsible for CraftBukkit and where can I ask internal questions about it?

kindred sentinel
blazing ocean
river oracle
kindred sentinel
# blazing ocean yes

How does work Bukkit.getAdvancement? I mean, I can use whatever plugin for namespaced key that it needs? Will Bukkit.getAdvancement(new NamespacedKey(myPlugin, "minecraft:story/root")) work?

sly topaz
#

that confusion is never going to go away, md should've rebranded the whole thing to spigot back then

blazing ocean
#

craftspigot

blazing ocean
river oracle
#

They still distribute CB

kindred sentinel
river oracle
kindred sentinel
#

Thanks!

kindred sentinel
#

Just for example

blazing ocean
#

yes

kindred sentinel
#

thanks

sly topaz
#

you can do NamespacedKey#minecraft too, or NamespacedKey.fromString("story/root") will assume minecraft namespace as well

river oracle
glass mauve
#

so I came to this because I have problems in intellij lol
I want to run a test server or a spigot server in general and created the run configuration seen in the image.
After using it I noticed that typing into the console, e.g. stop or similar stuff doesnt work, but if I run the
jar in the console using java -jar ... works fine and the input works as well. Then I looked into spigot and
saw that CraftBukkit is responsible for the console input using jline. Then I saw it uses a pretty old version of jline.
Why is that? I could reproduce the issue with this simple example:

public class Main {
    public static void main(String[] args) throws Throwable {
        ConsoleReader reader = new ConsoleReader(System.in, System.out);
        reader.setExpandEvents(false);
        System.out.println(reader.readLine());
    }
}

it is stuck at readLine when using a Jar Run configuration in intellij, but in console it works fine.
At this point I have no idea where the real issue is and thats why I cant tell where this "question" is
appropriate.

kindred sentinel
torn bough
#

What's a good keyword or tutorial to understand how to save player data created with the plugin?

glass mauve
sly topaz
#

that said, you should probably delegate run tasks like those to your build system rather than IDE-specific configurations

kindred sentinel
#

Is it possible to add advancements by plugin (without nms) or world, or it's only datapack possible?

glass mauve
#

like ConsoleReader doesnt even exist in newer versions

kindred sentinel
glass mauve
#

but there is probably a reason it doesnt exist in later versions 🤔

kindred sentinel
#

right?

sly topaz
#

even if Spigot uses an old version of jline, the probability of that being upgraded any time soon is unlikely

glass mauve
#

yeah thats what I thought

sly topaz
#

that said, people have successfully used run configurations for running a spigot server before, so I'm unsure of what the specific issue might be here

#

let me try it myself first to confirm it isn't an issue with your environment

glass mauve
sly topaz
#

It's been a while since I used run configurations at all, don't even know what that option is lol

glass mauve
#

not sure

sly topaz
#

ah, no that is irrelevant

glass mauve
#

yeah so running the server works

#

I just have problems inputting stop or stuff like that

#

I could find a fix actually

#

using the shell run configuration

frosty geyser
#

Hi, I've been looking around and I haven't been able to find a way to allow the player to ride an armorstand and be able to move it around by moving WASD while sitting ontop, is there a way to do it? The version it needs to work on doesn't really matter imo and any help would be great

glass mauve
#

@sly topaz thanks for your help

sly topaz
glass mauve
#

huh

sly topaz
#

this is the run config for reference

glass mauve
#

hm thats weird

#

but you dont even have the run on ... option lol

#

you use ultimate or community edition?

sly topaz
#

community

glass mauve
#

hm I use ultimate, but that shouldnt make a difference 🤔

#

thanks for testing it out

sturdy sand
#

help

#

pls

kind hatch
#

Then reload your pom

sturdy sand
#

creo que asi se dice xd

kind hatch
#

You had it open...

blazing ocean
sturdy sand
sturdy sand
blazing ocean
proud badge
#

hi, how could I get the dropped items during BlockBreakEvent? I dont see any methods that do this

kind hatch
#

You'd want to use the BlockDropItemEvent instead.

torn bough
#

How would I be able to create a sign ui similar to openInventory?

#

I see there is a player.openSign() but I don't know how to create the sign class itself

chrome beacon
glass mauve
river oracle
torn bough
#

Why would this be opening a blank sign?

                    Sign sign = (Sign) player.getWorld().getBlockAt(player.getLocation()).getState();
                    sign.setLine(1, "^^^^^^");
                    sign.setLine(2, "Type new home");
                    sign.setLine(3, "name above.");
                    sign.update();

                    player.openSign(sign);
#

Probably since update is asynchronous so it technically happens after I openSign?

#

But how do I workaround that?

eternal oxide
#

You can't make world changes async

river oracle
#

Nothing with the world can be done asycnhronously :3 so don't do that please

#

There is no work around

golden turret
#

hey there

#

i have 2 plugins: milestones and pickaxe

#

pickaxe uses milestones

#

and im using plugman to reload the plugins

blazing ocean
#

don't reload

river oracle
golden turret
#

this happens

blazing ocean
#

if you ever type /reload this kitty will be sad and attacking you

torn bough
#

Wait, I can't make a fill a sign and open it in gui at the same time?

remote swallow
#

thats why i type /reload confirm