#help-development

1 messages · Page 710 of 1

stuck imp
#

EpicEbic Please help me

remote swallow
#

i dont know the answer to your issue

stuck imp
#

You saw it ?

remote swallow
#

yeah

tender shard
#

what even is your issue

#

do it one tick later

kindred sentinel
#

Oh yeah, it's working, thanks!

stuck imp
#

I have a issue with create a fake player in tab

tender shard
#

or that lol. It won't be set then though if the event gets cancelled

stuck imp
#

I use Mojang Maping, ProtocolLib and both method not work or have compatibility problem

tender shard
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

tender shard
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

tall dragon
#

.

tender shard
#

I'd just use mojang maps and send the packets normally

stuck imp
#

It's compatible with spigot 1.20.1 ?

#

Because it's seems the method for make it, disapear at 1.19.4

tall dragon
#

ur probably writing the packet in an invalid way

tender shard
#

?switchmappings

tender shard
#

if you're talking about the method to get the ServerGamePacketListenerImpl, you don't need it

#

you can just do ServerPlayer#connection#send(...)

stuck imp
#

Ok i work on it, wait 5 minutes

tender shard
#

nah my favorite quiz show starts in 5 minutes

#

well it starts in 20 minutes but I must not be late

stuck imp
#

These 2 imports :

import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo;
import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;

Cauz problem, because only availble at 1.19.2

#

?code

#

?paste

undone axleBOT
stuck imp
eternal oxide
#

name changed

#

somethign close but they have update in them now

stuck imp
#

What is the name please ?

remote swallow
stuck imp
#

Im beginner on method Mojang Mapping, can you tell me what import i must put for replace :

import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo;
import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;

And how do you find these information

remote swallow
#

?mappings

undone axleBOT
remote swallow
#

packet play out player info doesnt exist

#

its 2 seperate packets now

stuck imp
#

I will bookmark this website, very usefull

#

Ohh

#

If you need to access NMS classes from inside your Spigot plugin, it is a very good idea to use the so called Mojang mappings. Disclaimer: This post is obviously written for 1.18.2. If you use another version, you of course have to replace every occurance of “1.18.2” with the version you actually use. What...

#

Do i do this on IntelijIdea ?

ow to use Mojang mappings

First of all, you have to run BuildTools and tell it to get yourself a nice, fresh compiled spigot version with the Mojang mappings:
java -jar BuildTools.jar --rev 1.18.2 --remapped

It does not matter in which folder you run BuildTools as long as it’s on the same computer that you use to code your plugin. BuildTools will install all dependencies to your local maven repository. You can now adjust your pom.xml to use the Mojang mapped .jar, and to reobfuscate all needed method/class calls at compile time:

#

Or with Git on empty folder ?

native bramble
#

Have this func:

public void startTimer(){
        long delayToNextRestart = 21600L;
        new CustomTask().runTaskLater(this, delayToNextRestart*20);
    }```
But this task runs not after 6 hours, how i need (6x60x60 = 21600) but earlier - after a hour
north nova
#

what

native bramble
#

what?

north nova
#

what you said makes no sense

eternal oxide
#

Don't use ticks to count a delay time for long duration tasks

native bramble
#

delay - the ticks to wait before running the task

#

but then what?

north nova
#

lol

eternal oxide
#

ticks != a unit or measurment of time

glossy venture
#

yeah it depends on the tps

lilac dagger
#

ticks can get delayed by the server performance

glossy venture
#

might want to make a real time scheduler or smth i dont know if theres something better

north nova
#

or use epoch

lilac dagger
#

best to use system.currenttimemilis

glossy venture
#

but you can schedule a real time task list to be updated every 5 ticks or smth

eternal oxide
#

your calculated 3 hours on 20 ticks per second could end up being 10 hours due to lag

#

use a ScheduledExecutor for accurate timing

#

eg, every monday at midnight```java
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
public void schedule() {

    LocalDate nextDate = LocalDate.now().with(TemporalAdjusters.next(DayOfWeek.MONDAY));
    long midnight = LocalDateTime.now().until(nextDate.atStartOfDay(), ChronoUnit.MINUTES);
    scheduler.scheduleAtFixedRate(()-> { /* Code here */ }, midnight, TimeUnit.DAYS.toMinutes(7), TimeUnit.MINUTES);
}```
north nova
#

Long midnight

#

?????????????????????

glossy venture
#

cant run on the main thread tho

glossy venture
#

but ig thats not a problem for this

eternal oxide
north nova
#

why not primitive the fuck

eternal oxide
#

Its just sample code so not intended to be used as is. ie, the thread pool in the method shoudl not be there

north nova
#

lol

eternal oxide
#

the pool shoudl be a Field, the Long shoudl be a long, but as I said, its just a sample

native bramble
eternal oxide
#

why? but yes

native bramble
#

ahh plushours()

civic apex
#

is there a way to change the knockback of a tnt (not just setting the player's velocity)

#

without mixins or cancel+reimplement

tall dragon
#

im so confused i got this code to set my language level in grade

var targetJavaVersion = 17
java {
    val javaVersion = JavaVersion.toVersion(targetJavaVersion)
    sourceCompatibility = javaVersion
    targetCompatibility = javaVersion
    if (JavaVersion.current() < javaVersion) {
        toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion))
    }

    withSourcesJar()
}

yet compilation still fails with (use -source 16 or higher to enable pattern matching in instanceof) any1 know why?

opal juniper
#

are you compiling with intellij

tall dragon
#

yh

#

when i reload my gradle model is also sets it to 8 in my ide... for some reason

opal juniper
#

you need to set the different thing in the project don’t you? try compiling directly with gradle or using the gradle sidebar

remote swallow
#

you need to compile with gradle, right side of ur screen gradle, tasks, build, build

tall dragon
#

im always just running gradlew clean build

#

shoulnt that be fine?

remote swallow
#

that should be fine

#

?paste ur full build.gradle

undone axleBOT
tall dragon
#

parent too?

remote swallow
#

oh is this modules

tall dragon
#

yeaa

remote swallow
#

ah, use java toolchains

#

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

tall dragon
#

that aint valid

#

using kotlin dsl btw

remote swallow
#

idk what kotlin syntax for that is

tall dragon
#

welp still same problem

remote swallow
#

one sec ill go ask the ai

tall dragon
#

its happening in task javadoc btw

remote swallow
#

the ai just says to use #set instead of =

tall dragon
#

yh thats what i did

#

but alas

onyx fjord
#

how do i get the friendly name of the material

#

like Diamond Sword

tall dragon
#

you dont

onyx fjord
#

or itemstack

tall dragon
#

gotta parse it urself as far as i know

#

which is not too bad

worldly ingot
#

Translatable components if you’re using chat, but if not, you can use BungeeChat’s TranslationRegistry which has all en_us localizations

#

Working on support for components in all areas of spigot

valid burrow
#

anyone got a code sniped that can do math in a string? ive been trying for like 2 hours to find something

civic apex
#

whats the string, a number, an expression, ...?

valid burrow
#

i have a string like " I want 20+4 apples" and i want it to return " I want 24 apples"

civic apex
#

you sure this is not some sort of XY problem?

valid burrow
#

yes but only simple math nothing too complicated

civic apex
#

?xy

undone axleBOT
valid burrow
#

i just wanted to ask if anyone has a code sniped for it

#

cause every one i tried doesnt work

civic apex
#

may i know what you needthis for?

valid burrow
#

a plugin

civic apex
#

like what are you using it for?

#

yeah but why do you need this exact functionality

valid burrow
#

i just want it for the chat

#

like

#

a person says

#

can you give me 2*64 wood

#

and it says can you give me 128 wood

#

bold example but you get the idea

civic apex
#

you gotta implement some sort of language model if you wanna translate "can you give me wood" to the server actually giving wood

#

not a simple thing

#

and about the math thing

#

hmm

valid burrow
#

i dont want anything to happen

#

i just want the msg to be replaced

#

i dont want the server to give you wood

civic apex
#

okay

civic apex
#

im thinking

valid burrow
#

The main prpblem is anything i find only works for strings that only include numbers without any words etc

civic apex
#

there are some edge cases

civic apex
#

in this you gotta somehow extract the expressions from any kind of string

valid burrow
#

yh and i cant figure out a way how to x)

civic apex
#

regex maybe

#

also what if someone types

#

-1+2

#

would the server interpret the first - as a neg sign or as a hyphen

valid burrow
#

neg sign

civic apex
#

also

#

someone's name may only be a number

#

people saying their ign in chat could get messed up

valid burrow
#

i mean

#

there would still need to be an operator

civic apex
valid burrow
#

but i get what you mean

civic apex
#

also what ab

valid burrow
#

i thought of it only to be a small feature but its so complicated the more i think about it

civic apex
#

names like "0xAda" ||👋 if you read this btw|| would those be interpreted as numbers

civic apex
valid burrow
#

hi

civic apex
civic apex
civic apex
valid burrow
#

yh i dont want to do complicated math just the basic operators + - * :

civic apex
valid burrow
#

ill try my best

#

ill update you once i got something

eternal oxide
#

So long as you have no spaces in your math section it's simple to use regex for it

civic apex
#

remove spaces from the whole string

eternal oxide
civic apex
#

the problem is figuring out the regex

eternal oxide
#

validate on each element of the array

#

its on that page I linked

#

return text.matches("((?:(?:^|[-+_*/])(?:\\s*-?\\d+(\\.\\d+)?(?:[eE][+-]?\\d+)?\\s*))+$)");

#

if thats true you can just get teh value

civic apex
#

you could uh

#

wait does that match stuff like 1+1?

#

or 1 + 1 only

eternal oxide
#

yes

#

using String.split you want no spaces in teh formula

civic apex
#

to use the second regex afterwards

valid burrow
#

at this point i might just code an ai to do the math

valid burrow
#

cause my brain aint braining no more

#

train an ai

#

sorry

civic apex
#

o

#

i gotta train my regexes

valid burrow
#

i lost all hope

magic glacier
civic apex
#

might give it a try

tall dragon
#

u tryna parse math?

daring dock
#

Any tips for auto exporting + reloading with Maven? It seems Spigot keeps a lock on the file so I have to shutdown first before Maven can replace the plugin. I don't recall having to do this before.

valid burrow
#

click the reload button

#

i would send you a screenshot but i aint verified no more

tall dragon
#

?paste

undone axleBOT
daring dock
valid burrow
#

wait what

tall dragon
valid burrow
#

oh

#

ohhhhh

tall dragon
#

made a whileee ago so no guarentee

valid burrow
#

you cant delete a file while spigot has it loaded

#

i mean you can force it

#

technically

#

if you have administrator perms

#

try opening your IDE with administrator maybe

valid burrow
#

or well

#

java has it loaded

#

same thing

civic apex
#

no but like

#

why would you delete it

valid burrow
#

if you replace a file thats just deleting and putting in a new one

civic apex
#

i can replace while spigot runs

#

wont take effect tho

#

but like i restart

daring dock
civic apex
#

uh

#

there's plugman but that thing stopped working for me recently

#

and idk i dont experience paper locking my plugins

daring dock
#

I'm on Windows. I'd send a screenshot but can't. I get the The action can't be completed because the file is open in Java(TM) Platform SE binary. Or Maven: The process cannot access the file because it is being used by another process.

#

Manually shutting down each time is getting old, fast.

remote swallow
#

?paste urpom

undone axleBOT
remote swallow
#

you should be able to override it

civic apex
#

just made a regex (after relearning a bit) that might be good enough

#

for detecting basic expression

#

@valid burrow

valid burrow
#

add it to the code if you want

#

cant be worse then nothing

#

ive never tried regex before

#

so

#

i cant really tell if it works or not xd

echo basalt
#

then you have no right to comment on this :)

#

Well you can but it's not a good idea

valid burrow
echo basalt
#

Generally avoid trying to help with stuff you got no idea about

valid burrow
#

he is trying to help ME

#

x)

echo basalt
#

ah

#

Yeah I'm blind

valid burrow
#

nw

civic apex
#

@valid burrow mind if i just implement left to right evaluation

#

instead of following actual math rules

#

like doing 2 + 6 / 2 = 4

valid burrow
#

sure go ahead

remote swallow
#

use 14 brushes math parser

valid burrow
#

link?

remote swallow
#

b

#

i can coppy

#

trust me

valid burrow
#

ill look into it

#

thx

civic apex
remote swallow
#

it does the math for you

#

in the correct order

#

from a string

wet breach
remote swallow
#

i havent seen fourteen in a while

#

he doesnt have an updated name, did he stop using discord or something

wet breach
#

idk

civic apex
remote swallow
#

he comitted to math ex parser 4 days ago so he isnt dead

wet breach
#

as far as we know

#

it could all be automated 😛

remote swallow
#

lol

slender elbow
#

crunch on top uwu

civic apex
#

@valid burrow i got it

#

also you should maybe make a gitignore

waxen plinth
slender elbow
#

God said so

waxen plinth
#

ok

#

hi emi

#

ly

slender elbow
#

ly2

civic apex
#

you can do 0-1!

waxen plinth
#

what's the regex meant for anyways

civic apex
#

math expressions

#

like 1+1

waxen plinth
#

1+(1)

civic apex
#

no

#

no parenthesis

#

thats too complex

waxen plinth
#

:(

#

yeah regex can't do that anyways

civic apex
#

it prob can

waxen plinth
#

maybe with (?R) but that's uhhhhh

#

even if it can it would certainly be pushing it

#

yeah arithmetic expressions are context free, not regular

valid burrow
#

the way i do it rn is rather

#

well

#

uh

#

unprofessional

valid burrow
#

actually i might as well do it rn

civic apex
#

ill submit a pr

#

if git lets me login

valid burrow
#

sure

civic apex
#

has my token expired?

#

fun

remote swallow
#

my token expired yesterday too

#

kek

civic apex
#

eyyy

remote swallow
#

they shouldve emailed you about it

civic apex
valid burrow
#

i think someone had the same issue a while back and came to the conclusion no

#

i would just add data to the tnt and change the velocity of the player once it blows up

civic apex
#

yeah no my problem is what do i set the velocity to

#

oh wait

#

im dumb

#

the event is fired before the velocity gets added

#

so i can just add the custom velocity

valid burrow
civic apex
#

i thought for some reason it would get added later (and as such merged with already existing velocity)

civic apex
#

not class version 9

#

source version

valid burrow
#

oh oke

civic apex
#

java 9 source

#

whatever its called

#

for some regex function

remote swallow
#

java 9 language level

civic apex
#

that, thanks

valid burrow
#

is there a way i can leave that one out when merging

#

or what ever its called

civic apex
#

if you compile with java 8

#

for java 8

valid burrow
#

oh already then we upgrade to java 0

#

9

civic apex
#

you can upg to java like 17

#

bc

#

its required to run mc server at 1.20 anyway

#

so

#

¯_(ツ)_/¯

valid burrow
#

yh i though i already did that but apperently its on 8

civic apex
#

this is what needs language level 9

valid burrow
#

alr

#

merged

#

thx for helping

#

i appreciate it

remote swallow
#

what happened to ur drvoss discord

valid burrow
#

i got termed

remote swallow
#

oh damn

valid burrow
#

apperently i commited credit card fraud

#

i dont know how

#

but

#

well

#

it gone

#

and support kept ghosting me so i gave up

remote swallow
#

lol

valid burrow
#

yh i was mad at the beginning but not much i can do about it now so

#

i just accepted it

remote swallow
#

getting my acc banned is the 1 reason i dont like owning big servers

valid burrow
#

yh from now on i have 1 account for server rights and 1 account that i actually use

#

i looked into it and it seems to be allowed

#

so thats just the way i do it now

remote swallow
#

yeah id do that

#

1 acc that owns it that literally just sits there, while my main is just visual owner

valid burrow
#

mhm

#

just gotta remember to log into it once in a while so that they dont deactivate it xd

#

well ill go to sleep have a good night yall

remote swallow
#

they deactivate accounts?

civic apex
#

gn

valid burrow
#

i really gotta sleep now

#

gn

smoky oak
#

How do i query the dimension (type) a player is in? The only method i can find is deprecated, and i refuse to believe it's impossible to query the skybox a player's staring at

#

I mean i have some truly terrible ideas

boolean overworld = player.getWorld().getFullTime() == Bukkit.getWorlds().get(0).getFullTime();
boolean end = player.getWorld().getEnderDragonBattle() != null;
``` but there ought to be a simpler/less janky solution
#

Ah

#

environment

smoky oak
#

How do i pass a boolean as a reference? AtomicReference?

smoky oak
#

yea i realized lol

worldly ingot
smoky oak
#

?paste

undone axleBOT
smoky oak
#

which i probably will end up going with

smoky oak
hazy parrot
#

This looks like those java 11 errors

worldly ingot
#

tbh probably nothing important

smoky oak
#

that doesnt help me in not causing it again lol

#

wouldnt matter if it wouldnt BSOD crash me too from time to time

#

something something IRQL_DRIVER_NO_LESS_OR_EQUAL

#

tbh i have no idea how java can cause a core error in windows but ok

sullen marlin
#

Sounds like your PC hardware might be failing

#

Run a memtest or something

smoky oak
#

did

#

came back clean

#

like a week or so ago

summer scroll
#

How can I create a sql column if it not exists? I figure that if you use SQLite, you don't need to do that check, you can ignore the exception but what about mysql server?

smoky oak
#

pretty sure you either risk a lot of DB errors or create it with the table

#

look into the ALTER keyword

summer scroll
#

I'm trying to make an update for my public plugin and there are some database changes so I want to ensure the user of my plugin doesn't have to do anything to update my plugin.

hazy parrot
#

There should be create if not exist

#

Oh column

summer scroll
#

Yeah it's for column.

smoky oak
#

Does anyone know how the combination cases for swtich statements are handles? Is it more like an 'a or b' check, or more like a fall-through?

summer scroll
#

Right now I just force the mysql to add the column and ignore the exception.

sullen marlin
#

It will fall though until a break; statement

#

Maybe give an example?

smoky oak
#

ah i meant how something like this is handled by the compiler

switch(second){
  case 1,3,7,9,12: function_a(); break;
  case 2,4,5,6,8,11: function_b(); break;
}

Like, is it turned into something like a if(condition or condition), or more like

...
case 7:
case 9:
case 12: function_a(); break;
#

I'm asking because I am wondering how this would compare to just doing if() else if() with or-conditions

sullen marlin
smoky oak
#

ah so neither

#

thanks i guess lol

quaint mantle
#

is there a slime world manager for player data?

#

like stores player data in mongo too?

smoky oak
#

...isnt this, like... the whole point?

drowsy helm
#

no NetherWartsState is just an enum

smoky oak
drowsy helm
#

NetherwartsState is deprecated isnt it

#

you want to use CropState

smoky oak
#

its not funnily enough

drowsy helm
#

not the enum itself

#

but the MaterialData class which uses it

smoky oak
#

ah

#

also im so done lol

drowsy helm
#

again, not the same thing lol

#

cast it to Crops and getState

smoky oak
#

ah

#

wasnt aware crops was a separate thing

drowsy helm
#

oh hold up that sdeprecated aswell

#

lol

#

guess you just have to use Ageable

smoky oak
#

do i have to set it back? I can never remember whats a ref and whats a copy

eternal valve
#

I will make a special gui, but it looks bad when I put the items, can I throw the items behind the gui, so that the items stay in the background even if I drag them

drowsy helm
#

you dont want items being dragged around?

smoky oak
#

also can i just say i can see the difference between 60 fps and 144 fps and it's impossible to play minecraft in fullscreen mode cuz of that

smoky oak
#

update: Mojang bad, some random guy on github has a programm that enables borderless fullscreen

eternal valve
#

I'm sorry, my battery's dead. 😄

#

items under inventory are like this

smoky oak
#

that looks aggressively like bedrock lol

eternal valve
#

I don't like bedrock, it's pretty bad.

#

😄

drowsy helm
smoky oak
#

I do recall talk about splitting large tasks (for example world edit stuff) into batches. Is there a way to do batches dynamically - speak, given a list of required operations and a delta time left in the current tick to calculate until the current tick's 'time limit' is reached which does not require delta calculations?

tender shard
#

damn, maven-central is slow again today

#

uploaded omething an hour ago and still, nothing

#

it's only available on staging yet

shadow night
smoky oak
#

bah i dont care about that

#

i care about the fact that minecraft feels like it actually runs smoothly in fullscreen

#

'cant see beyone 30 fps' my ass

#

i can SEE the difference between 60 and 144

shadow night
#

You can indeed

#

But I have to clean the dust out of my laptop because it now only gets me 60 unstable fps instead of 120 stable

rigid otter
#

I wonder my two servers about changing gamemode after re-join. One server, after re-join, gamemode doesn't change, but the other one, after re-join it change to survival.

tender shard
#

is this a development question?

rigid otter
#

At first, I thought it was because of my coding in a plugin, but since I apply the same plugin to both servers, so I remove that message and yet still chat here.

smoky oak
#

yea no

#

it right at the beginning is like 'static final time'

#

I'm looking for a dynamic solution

tall dragon
#

its still a good read

shadow night
#

Actually, why doesn't mc use delta time for tps? Is there like a solid reason for that?

smoky oak
#

i know how to split tasks. I'm curious if there's a way to handle em without having to check delta time remaining every time a batch finishes

tall dragon
#

anyway i dont know how to do this in spigot

#

in paper u could use TickEndEvent

smoky oak
#

the problem is that runnables rely on the ticks themselves

#

and that event kind of would too

#

actually

#

does spigot attempt to sync the ticks with seconds?

#

or is there some internal 'tick started at this nano second' value?

tall dragon
#

im not sure doing this dynamically is at all feasable or even worth the trouble

#

you probably woulnt even be able to use bukkit's scheduler

#

sicne you would have no idea if any tasks are being ran after yours

#

so you coulnt even do sync work

smoky oak
#

I figured out that one right at the start. The problem is that while i can easily check time passed, i don't know how to check time available and i really don't want to guess

#

thats also why i asked about if bukkit keeps track of the start time of the tick

#

i could at least guess from that

#

the only way i thought up i could time it is by doing so much that it causes lag, and just check in the runnable the time passed since the last time it was called, and be like 'more than 20 ms, you're causing lag'

#

but that doesn't account for... well, lots of things. Would make actual lag spikes worse, too

hybrid spoke
#

having a scheduler ran simultaneously which updates a timestamp

#

i guess you have some sort of chain for your runnables

#

so you could check between each runnable if you still have time available by comparing the timestamps

smoky oak
#

i mean that way i could restrict which runnables run but i still dont know how much time i have

hybrid spoke
#

what exactly are you trying to do

#

to evaluate how long your chain needs beforehand?

smoky oak
#

figuring out how much processing time i have available

#

i can do the other stuff but not that

hybrid spoke
#

and what do you need that for

smoky oak
#

so that when i do large tasks i can assign close to the amount of unused time

hybrid spoke
#

why dont you just dont give a fuck and run the tasks regardless

smoky oak
#

cuz for some of those things a stable 20 TPS is required

#

granted they're unlikely to actually bite into the processing time, but I'd rather not need to worry about that when I'm working on other things

hybrid spoke
#

if the current tps is 18 use 2 more ticks

#

or am i getting something wrong

smoky oak
#

lright you broke me

#

im out

hybrid spoke
smoky oak
#

i need the game to keep running at 20 TPS, AND to get as much of the workload done per tick as possible

#

which means i need to know how much time i can spend on stuff like that

#

one of the ideas i had was to double the workload each tick until its done or causes lag, and keep track of the maximum time passed before lag occured, but they're all jank like that

#

I'm convinced there's got to be a better solution than eyeballing it using system.nanos

hybrid spoke
#

and what is your workload? why cant you go async

smoky oak
#

its block manipulation

#

good luck doing THAT async

quaint mantle
smoky oak
#

hm true

hybrid spoke
#

then dont use the full capacity and rather find a good mid value to have a buffer

#

so it also works on 18 tps

#

and doesnt cause lag spikes

smoky oak
#

yea the problem is some servers are using 20% and some 200% of their time-per-tick

#

so i'd have to do it half-and-half anyways bleh

tall dragon
#

can u even get current tps accurately?

#

pretty sure that gets average tps

jagged thicket
smoky oak
#

Is it possible to create custom recipes that can be not crafted by default, and can be added temporarily? I would rather not have to do checks in the CraftItemEvent

#

Specifically, i would like to avoid having to add every single recipe that cannot be crafted by default to the CraftItemEvent

abstract spindle
#

Is there a way to add a player a Custom view like the creeper sight except via NMS ?

echo basalt
#

Don't think so, that's usually just shaders

abstract spindle
#

okay thanks

smoky oak
sullen marlin
#

Add the recipe then remove when the temporary is over

smoky oak
#

ah i meant, for specific players

sullen marlin
#

No

smoky oak
#

can i at least mask it from the recipe book?

abstract spindle
#

You can add the recipe and add a Permission via the CraftItemEvent and If the player dose not have it set the reuslt to null

smoky oak
#

i know that

#

im not asking that

smoky anchor
abstract spindle
smoky anchor
#

If you do not mind this, you could go to the Minecraft Commands discord server and ask for directions

abstract spindle
smoky anchor
abstract spindle
#

Thanks

livid dove
smoky oak
#

im not going paper

livid dove
#

shrugs

#

My point was that clearly its possible...
Be the change you wanna see

#

Way I figure it is folk who have fundemental issues with spigot either move to paper or legit add the features they wish were in the spigot API via PR

#

E.g there is one mad lad who I got a ping about from my old inventory holder thread.

He has legit made a pr to fix the issue. Mad lad

#

I think sometimes we all focus too much on the cool fun plugins and not enough on cleaning what has now become the equivalent of a hoarders attic

smoky anchor
#

wait, do you mean that guy that was screaming about how inventory holder thing is so slow ?

livid dove
smoky anchor
#

ah

peak depot
livid dove
#

And from what I saw made the inventory system just deadass better

smoky anchor
#

I believe the color string has to start with #
lemme check

#

yep

livid dove
#

I mean it is a hex color so one would assume

smoky anchor
peak depot
#

tried it but still aint working

livid dove
#

Like legit it's the little things like that though.

Kf I was the maker of that code I'd of added custom exceptions sk this poor bugger would know exactly what the issue is

peak depot
smoky anchor
#

now a different issue tho
progress

#

the way you're setting the color for the team is wrong

livid dove
#

@peak depot once you find the problem I'd humbly suggest you make a pr for it adding custom exceptions so the next guy who does what you did, they'll know without the headache

peak depot
#

It needs a chatcolor from Bukkit but I try to to work arround it to use the hex function from bungee api

smoky anchor
#

sadly some ppl (including me) do not create PRs simply due to not wanting to dox themselves (the CLI or whatever)

smoky anchor
livid dove
#

Can't you fork and then pr directly from github?

smoky anchor
#

spigot is not on github

smoky oak
#

just build it

livid dove
#

Oh godnyeah

#

Ew

smoky anchor
#

?stash

undone axleBOT
smoky oak
#

itll put out the whole code in a folder

peak depot
smoky anchor
#

what are you trying to do ?

#

Set the player name to this custom color ?

peak depot
peak depot
#

md thats spigot

sullen marlin
#

~[paper-1.20.1.jar:git-Paper-171]

livid dove
#

No no no wait wait wait

#

Lmao

smoky anchor
peak depot
#

wow

smoky oak
#

actually why cant we just put all the paper patches as spigot prs lol

smoky anchor
#

fuck no

peak depot
#

wait lemme try on spigot

livid dove
smoky anchor
livid dove
#

Md_5 is the mum, strict and stern but mostly sensible.

Paper devs are the cool dad with the ferrari and ice cream for dinner, but without the real life grounding mom has

#

Tell me I'm wrong 👀🤣

smoky oak
#

no i mean shit like this
also apologies for the ping i forgor to disable it

echo basalt
#

they're both broke tho

smoky oak
#

why do i need to remove the item for two ticks before the player stops using it

#

like seriously wtf

livid dove
#

They are both built on bukkit of course they are broke

sullen marlin
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

peak depot
#

still the same code I send earlier but here again: java vip.setPrefix(net.md_5.bungee.api.ChatColor.of("#FC46AA") + "VIP " + ChatColor.DARK_GRAY + "| "); vip.setColor(ChatColor.valueOf(net.md_5.bungee.api.ChatColor.of("#FC46AA").toString()));

sullen marlin
peak depot
#

so no work arround right?

smoky anchor
sullen marlin
#

Prefix will work fine though

smoky anchor
#

would still retain the non-colored player name, no?

livid dove
#

For making some of their features optional

hybrid spoke
#

wild take. boycott paper

livid dove
#

Or hell a library that works like that old soviet american airlock design

smoky anchor
#

when it was brought up
so I don't think they would accept a PR

livid dove
#

I found from both parties (md 5 included) that folk dismiss shit out of hand as they assume you won't do it

#

Just human natute

#

Nature

#

Sounds like a fun project that could end up being transfered to a library one day if it's rejected as a pr

#

Paper, spigot, and hell technicslly even Bukkit literally exist due to disagreements between devs and the api devs.

If its good enough for them

#

Then again I'm a optimistic lmao

#

But someone needs to make PagePour eventually :L

#

Someone be that grizzled ol' nan who gets mum and dad to stop fighting for 5 mins and think about the kids lmao

#

*I'm all out of analogies 🤣

smoky oak
#

well im out of fucks to give and just do what works

#

ive a policy of writing for spigot so that it works on everything but magma and folia

ivory sleet
#

lol

#

that is until paper hardfork

smoky oak
#

oh not again

eternal night
#

softspooon

livid dove
ivory sleet
#

Not like that has been attempted in the past

smoky oak
#

i mean I've written plugins to re-cause feature-like bugs soooooo..... ive no leg to stand on here

livid dove
# ivory sleet Not like that has been attempted in the past

"This future I do not accept it, as an error only becomes a mistake when we refuse to correct it"

It's failed before it will likely fail a few more times.

But let's do what we do best in both communities.

Fling crap at the wall till it sticks haha

ivory sleet
#

No

eternal night
#

I doubt anyone has the time for that

ivory sleet
#

There are always people you don’t like, or well don’t work well with

#

So for volunteer-based projects people just work with those they like

#

That’s how it plays out usually

livid dove
#

Ah I'm forever the optimist.

#

In my nature 😅

smoky oak
#

im a pessimist

#

the glass is about to be spilled

ivory sleet
#

Let’s just say even I wouldn’t subject myself to work with those who use lombok, already eliminating a good deal of potential collaborators

smoky oak
#

fucks lomboc

eternal night
#

bungeecord moment

livid dove
#

Wtf is wrong with lombok?

rough drift
#

Stopping entity from unloading

livid dove
#

Like ong what's the issue with Lombok?

ivory sleet
#

Im too tired to take this rant rn, maybe another time

hybrid spoke
#

lombok is cool

smoky oak
#

seriously what is lombok

livid dove
#

@Getter
private String conclubeRant;

hybrid spoke
#

framework for useful annotations

smoky oak
#

that @contract stuff?

livid dove
#

I prefer it by its real name.

BoilerPlateBuster

hybrid spoke
livid dove
smoky oak
#

i thought you were making fun of the dog lol

livid dove
#

That's your getter. Your entire getter.

smoky oak
#

ah

livid dove
#

No need for any method

#

Works for setter too

eternal night
#

use a record

#

live a happy life

smoky oak
#

eh id rather do it properly

#

also records are immutable so im not using them

eternal night
livid dove
#

"Properly" what does that even mean?

eternal night
#

mutability by design stonks

smoky oak
#

not use lomboc

echo basalt
#

Lets you do something like this

#

without having to go through hell

livid dove
#

I'm gonna break some grand illusion you have lad.

Even String is a class , just one written for the main jDK.

The entire language is based on idiots like us making new libraries.

Wanna do something properly? Remove all annotations from spigot... hell write spigot from scratch.

Bukkit scheduler? Nah fam java wasn't designed for that. Use thread

echo basalt
#

why are they package-private

#

I can't tell if that message is a pun or targeted at me

livid dove
#

It's targeted at mobs do it properly line

#

There is no "do it properly" in java

#

It's libraries on libraries on libraries

hybrid spoke
#

ah i remember

#

you were that guy with those delusional opinions

echo basalt
#

lmfao

hybrid spoke
#

yea not worth a convo

echo basalt
#

Lombok does its job and the end result isn't bad

livid dove
#

I beg your pardon?

echo basalt
#

But the code you're running is dubious

#

and that's the main argument that everyone says

#

It's hacky

livid dove
#

And spigot isn't? 👀

echo basalt
#

shit let's all switch to minestom and convince all the server owners to run that one jar

livid dove
#

Lmaoo

smoky oak
#

NO

livid dove
#

But jokes aside that's my point.

#

It's all dubious bodge job hacky ways of adding functionality. Hell it's what java is built around 😅

echo basalt
#

I'm fine by using lombok because while I am crazy about code quality

#

I'm only concerned about the quality of my code

#

Run essentialsx all you want

#

your loss

smoky oak
#

at least java is fast now

livid dove
#

LMAO

#

Imo though Lombok is no less hacky than spigot itself

echo basalt
#

some people are simply masochists and we need to be fine living with that

#

spigot does some hacky stuff

#

but not a ton

#

Paper meanwhile uses asm for event listeners

smoky oak
#

i really hope you mean java bytecode and not actual asm

echo basalt
#

because making that 1 class is faster than the combined overhead of invoking the methods via reflections throughout the server's lifespan

#

or some shit

livid dove
#

I stand by what I just said. Everything is hacky.

Lombok is no different and I genuinely don't understand why people hate it

#

If we can accept all the BS in spigot and paper and other libraries

smoky oak
#

eh i wouldnt say i hate or dislike it, just that it looks weird

livid dove
#

It seems idiotic to hate Lombok for the same reason

echo basalt
#

It helps speed up development if you actually know what you're going

livid dove
hybrid spoke
chilly hearth
#

i have created an boss bar how do i assign it to the entity so it shows the health of that mob

echo basalt
#

Like @Getter'ing the entire class rather than each variable individually

livid dove
hybrid spoke
#

@chilly hearth

echo basalt
#

jfc that was answered 2 months ago

#

or am I tripping

chilly hearth
livid dove
#

Also what delusional opinions you even on about? Lmao

echo basalt
#

watch out bros defensive

livid dove
#

I play Raz in defence mode and lay down a card face down. Your move kaiba

echo basalt
#

GodCipher uses ignore

smoky oak
livid dove
#

EXODIA?!? THATS NOT POSSIBLE!

#

*actually dies

smoky oak
#

see ya

#

lol

livid dove
#

Is the Shadow realm having to do prs on CoreProtect code?

icy beacon
livid dove
#

Lmao

#

Where's the lie tho?

#

I've said to intelli he should host a competition like a plugin jam and give the winner a year's ultimate or something lol

#

"Who can streamline lookups the cleanest"

hybrid spoke
smoky oak
#

dont think so

hybrid spoke
#

ok

livid dove
#

😭

echo basalt
#

mans just wanting to flex his projects

livid dove
#

Truly I have strayed from god

echo basalt
#

yeah bro let's host a plugin jam about who can make a multi-platform skyblock core clown_2

#

as if everyone here has the capacity and knowledge to write one

smoky oak
livid dove
#

I mean I am a member of the spigot discord 😭

livid dove
tawdry pilot
#

is it ok to run a mysql query every tick on the bungeecord side

#

the query is mostly simple just grabbing data

hybrid spoke
smoky oak
#

yea why

tawdry pilot
#

yea i dont care?

#

i mean you do you

livid dove
tawdry pilot
#

sry

hybrid spoke
#

conclusion, its dumb and you should do some proper caching

tawdry pilot
#

🤯

livid dove
near mason
tawdry pilot
#

ono

#

epic embed fail 💀

tawdry pilot
#

😔

livid dove
#

Imagine being a 2nd rate duelist with a 3rd rate deck

humble heath
#

anyone know of any website templates that look like this that are free

drowsy helm
#

Like html?

#

You could make that 30 mins

rough drift
#

How could I convert a location's direction to euler angles? (Trying to set armorstand rotation for the head)

livid dove
rough drift
#

what

livid dove
#

Oh wait yeh lol no if needed

#

180 - direction works

#

If yaw still works as I remember

gleaming grove
#

player.performCommand(command); how can I prevent console from logging this trash after prefoming command?

hasty prawn
#

By doing the command functions through code instead of performing the command

#

Why are you doing it like that

rough drift
#

player.sendTitle btw

gleaming grove
#
  onComment:
    - /say ${event.user.nickName} -> ${event.text}
  onGiftMessage:
    - /title @a title {"text":"${event.sender.userName}","color":"gold"}  
    - /execute as @a run summon minecraft:sheep ~ ~ ~ {CustomName:"{\"text\":\"${event.user.nickName}\"}",CustomNameVisible:1,Color:${event.user.followsHost}}
  onLike:
   - /title @a title {"text":"<3 ${event.sender.nickName} ${event.totalLikes}","color":"green"}```  I'm doing config that reacts on certain events
rough drift
#

ah

#

You can use a wrapped console sender then, which delegates everything BUT the messages to the original sender

#

That should work

gleaming grove
#

Bukkit.dispatchCommand(Bukkit.getServer().getConsoleSender(), command); like this?

rough drift
#

but you got the spirit

#

So what you want to do

#

Is make a new class like NoMessageCommandSender which has a constructor which just takes a CommandSender, and implements CommandSender, then just run every method as the CommandSender you received in the constructor, but leave any sendMessage as empty

#

ignore CustomSender it's just a wrapper

gleaming grove
# rough drift but you got the spirit
Caused by: java.lang.IllegalArgumentException: Cannot make io.github.jwdeveloper.spigot.tiktok.core.FakeSender@621cb59d a vanilla command listener
        at org.bukkit.craftbukkit.v1_19_R3.command.VanillaCommandWrapper.getListener(VanillaCommandWrapper.java:86) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at org.bukkit.craftbukkit.v1_19_R3.command.VanillaCommandWrapper.execute(VanillaCommandWrapper.java:44) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        ... 11 more```
#

?paste

undone axleBOT
gleaming grove
gleaming grove
hasty prawn
#

I don't think you can implement CommandSender directly

#

That's why in Ike's example he has a Builder class that just returns a new CommandSender

quaint mantle
grave plover
#

Is there a way to get the response from Bukkit#dispatchCommand()?

gleaming grove
hasty prawn
#

You're not really going to be able to hide it completely unless you re-make the title yourself.

#

By calling sendTitle

#

Although maybe setting sendCommandFeedback to false might hide it from console too, not sure.

gleaming grove
peak depot
#

anyone know the permission for gamemode switcher (F3+F4)?

shadow night
#

interesting question

eternal oxide
#

it has no permission

peak depot
#

so op only or what?

eternal oxide
#

yes

shadow night
#

weird shit

rough drift
#

The actual changing is still based on the same perms

shadow night
#

it will just say "no permission" when not op

peak depot
#

yes

#

thats my problem

ancient plank
#

Time to make a mod

grave plover
hasty prawn
grave plover
hasty prawn
#

Well same concept though, in code the command isn't telling the caller "hey I sent this message", it just sends it.

grave plover
#

But even messages like player's ** gamemode set to ***?

hasty prawn
#

Yes even those, they're just sent. What are you trying to do?

grave plover
#

I have a discord synchronization plugin that can execute minecraft commands from discord. I want to return the minecraft console response.

hasty prawn
#

Ah, you can just read console directly then.

grave plover
#

And how to do so?

hasty prawn
#

I'm not entirely sure, but you should be able to hook into it. Do some research on Google and see what you can find.

grave plover
#

Wow, I already did and found only half-rare solutions, not really explaining anything

#

That's why I asked here

pseudo hazel
#

I think it comes down to setting up a logger, idk how you can defer the normal console to it though

grave plover
#

rootlogger non existent for me

#

api-version 1.19

#

any other way to add filter?

grave plover
#

oh

#

I hadnt

#

let ssee if it works

hazy parrot
#

But I think problem would be that you can't actually be sure if message is from actual commabd

#

Maybe someone send chat exactly after command is written

#

It's not reliable

grave plover
#

yep thats shitty

#

but if there isnt any event with a response..... what TF should I do

quaint mantle
#

you should do what you should

grave plover
quaint mantle
#

what is rootlogger

#

is it just sl4j?

grave plover
shadow night
#

guys, I'm making a little minigame for my server and I need to have destructable blocks (placed by player) and undestructable blocks (not placed by player), ik stuff about copying over builds to have a lot running in one world instead of making several worlds, but how would I protect the undestructable blocks?

#

I thought of using block pdc, but pdc isn't a thing on this ancient version I decided to use for whatever reason

hasty prawn
#

Why not just have a list of locations of the blocks everyone places and then after the game ends, iterate through and delete them all

#

IMO it's better if you just completely reset the world but if you don't want to mess with that then that way would work too

hushed scaffold
#

Hes asking so that players can place and break their own blocks, but not of the actual premade map

#

Im thinking of like putting a persistantdatacontainer on placed blocks indicating theyre playerplaced, and on block break event check if the block has the cobtainer, let them break, if it doesnt then cancel

This probably isn't very efficient, as im not the best at this, but just like some help or ideas on how u could do it better/ similiarly. Hope this idea could help

shadow night
#

as I said, I can't pdc

hazy parrot
#

I showed u exactly how

hazy parrot
quaint mantle
#

but why not just use sl4j

#

it is already in Minecraft dependences

#

just setup the build shit and done lol

slender elbow
#

slf4j is just an API, it doesn't actually do any of the logging itself

#

log4j is (one of many) implementations, the actual logging framework, config etc

#

and log4j is a Minecraft dependency as well

vagrant girder
#

what event would i use to see if a hopper attempts to push items into an inventory? and can i check if it attempts to move items even if there is no inventory? please @ me with responces

quaint mantle
hazy parrot
#

Log4j is included in spigot

quaint mantle
#

imagine having multiple plugins that bundles every time the same jar

hazy parrot
#

And slf4j is not implementation

#

As already stated

quaint mantle
#

then whats rootlogger

hazy parrot
#

I already told u?

quaint mantle
#

where?

hazy parrot
quaint mantle
#

but then why use it if it is in spigot

hazy parrot
#

Sorry I'm afraid I don't understand

#

I'm using it to intercept every message logged into console with filter

quaint mantle
#

what?

hazy parrot
#

I have same reaction

#

I don't understand what are you trying to say

quaint mantle
#

im saying why use a library that includes log4j if spigot already has it

opal carbon
#

why not

quaint mantle
#

why yes

opal carbon
#

for access to any the extra stuff or changes

opal carbon
#

why not

hazy parrot
#

It's not shaded lol

quaint mantle
#

then whats the point of it

hazy parrot
#

Have you noticed <scope>provided</>

opal carbon
#

its like spigot api its provided

#

so it works but it doesnt bloat size

quaint mantle
#

so whats the point is of rootlogger

echo basalt
#

why include authlib if spigot already has it

#

even though you prob need it for custom heads or whatever

hazy parrot
#

It's basically what name said

#

rootlogger

opal carbon
#

why depend on spigot at all if you dont shade the entire server jar into your plugin

echo basalt
#

pov: minestom

quaint mantle
#

root has nothing to do with filtering

hazy parrot
#

Tf is this dude on

quaint mantle
#

root is user on unix systems with highest privileges

opal carbon
#

...

remote swallow
#

rootlogger is different

hazy parrot
#

Yeah ur right

opal carbon
#

kittech rootlogger is a library

hazy parrot
#

Dude is high af

opal carbon
#

root is also the way a plant attaches itself into the ground

lilac dagger
#

a rootlogger is a keylogger obviously

opal carbon
#

wtf does that have to do with coding

quaint mantle
#

ok rootlogger is library but it says nothing what it does

hazy parrot
remote swallow
#

allows you to add a filter to ALL loggers

hazy parrot
opal carbon
#

just sarching up "rootlogger" first result is "Root logger is the highest logger in the log4j hierarchy similar to Object class in Java."

#

i didnt even have to search up what it was

#

just the word rootlogger

quaint mantle
opal carbon
#

in general though its the base level of something

#

for the plant its the base of the plant

#

in unix its the base admin account

wind moon
#

Can someone help to do a ffa plugin

opal carbon
#

for this its the base of the loggers

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!

wind moon
#

E

hallow jackal
#

what's the oldest spigot version that would support this plugin.yml feature?

unreal quartz
#

I think 1.16?

#

Also that notice might be old now

hallow jackal
#

good enough for me!

#

thanks 👍

gloomy atlas
#

am i able to set persistent data in worlds? in 1.20.1

eternal oxide
#

yes

quaint mantle
#

yes

gloomy atlas
#

tganks

eternal oxide
#

World, Chunk, Entity and ItemStacks have pdc

#

and Blocks which have a TileState

gloomy atlas
#

Bukkit.getWorld(worldName).getPersistentDataContainer().set(new NamespacedKey(plugin.getPlugin(plugin.class), "plotType"), PersistentDataType.STRING,plotType);

So will that work ^

eternal oxide
#

That depends on if your variables are not null

gloomy atlas
#

ok thanks again

upper hazel
#

You can get a location through a player, but vice versa, how can you get a player by location?

#

accuracy is important

shadow night
#

if I want to copy over a certain area, do I loop through all of the possible locations and copy each?

shadow night
#

no

upper hazel
#

ok

shadow night
#

I'm asking my question

upper hazel
#

for copy

shadow night
upper hazel
shadow night
#

and what is that

upper hazel
#

this save structurse in file

shadow night
#

and uhh

upper hazel
#

end you can paste this in another place

shadow night
#

I have two coordinates

#

I don't have this schematic thinga

#

I'm asking how I copy over a whole area

upper hazel
#

oh

shadow night
#

from one to another coordinate