#help-development

1 messages ยท Page 634 of 1

daring schooner
#

Thanks for the help guys, i'll try some stuff here

quaint mantle
#

Hey, I am using Geyser and trying to connect to my server. It is a proxy and have al the via plugins installed yet i can not join on bedrock as it says I am on an outdated client. Please someone help.

lost matrix
#

You should never have the serverPlayer field in the first place.
Never hold hard references to game objects like players, entities or worlds

lost matrix
#

Why is this method static? You wont be able to properly have more than one npc like this...

spark lynx
#

i am debugging some basic functions

vapid anvil
#

What's the current way to send a player a message

#

the methods I used to do are all deprecated apparently

#

and not much help online

wet breach
vapid anvil
#

yeah what do I actually give that lol

#

strings are deprecated, components are deprecated

wet breach
#

deprecated doesn't mean unusable

#

if you want to use a string, then use a string

#

its perfectly fine

vapid anvil
#

but are there any non-deprecated methods

wet breach
#

well I am not aware of it being deprecated unless you are using paper

vapid anvil
#

I am using paper yes

onyx fjord
#

strings arent deprecated lol

#

@vapid anvil use spigot api

vapid anvil
#

I'll just go ask in the paper discord

wet breach
#

that may be wise if you want to use their API ๐Ÿ™‚

#

otherwise in the spigot api they are not deprecated lol

vapid anvil
#

I wasn't aware they'd deprecated strings lol

wet breach
#

they deprecated a lot of stuff

#

which is fine its their api

native gale
vapid anvil
#

ah that was popping up in the IDE

#

didn't know what it was

onyx fjord
#

its a mess

#

you dont event need components most of the time

#

and spigot has its own components

native gale
#

It's alright but using strings also should be alright

#

They didn't have to deprecate them for that

vapid anvil
#

yeah I don't think they'll ever remove using strings

onyx fjord
#

you never know

native gale
onyx fjord
#

why do you even use paper api anyway

#

is there a reason

vapid anvil
#

more extensive than spigot

#

have needed it multiple times

onyx fjord
#

for example what spigot lacks

vapid anvil
#

a lot of stuff to do with events

onyx fjord
#

also you cant post paper plugins on spigot are you aware of that

vapid anvil
#

and it's faster

onyx fjord
#

the api is not faster

#

lol

vapid anvil
native gale
wet breach
#

since strings are easiest to work with and messages are well strings really

vapid anvil
onyx fjord
#

arent strings also faster

native gale
#

Since their selling point is spigot, but faster

onyx fjord
#

so you can still take advantage of that

vapid anvil
#

you can also run paper plugins on paper

onyx fjord
#

but you cant run them on spigot

vapid anvil
#

so what does that say about spigot

wet breach
native gale
vapid anvil
onyx fjord
#

?whereami

vapid anvil
#

lmao @ you guys start asking me to justify using paper

onyx fjord
#

if you wanna use paper api fine use it but ask about it on their discord

vapid anvil
#

I am

#

I was not aware my problem was with their API

wet breach
#

but, this is spigot discord

native gale
#

I use paper on my server, but make plugins with spigot api for compatibility

#

I also like the community here more

wet breach
#

anyways, I am not currently a fan of paper

#

but Spigot though is basically craftbukkit at this point and its stable and a good starting point for many things

#

its like Debian and Ubuntu

#

Spigot would be Debian where it works but nothing too fancy, and Ubuntu is built on top of debian and provides you with all kinds of flashy stuff

#

and that would be paper

abstract sorrel
eternal night
#

Did you register it

abstract sorrel
#

In the main class?

eternal night
#

Yea

abstract sorrel
#

Yes i did:

static {
        ConfigurationSerialization.registerClass(PlayerData.class, "PlayerData");
        ConfigurationSerialization.registerClass(EntityData.class, "EntityData");
        ConfigurationSerialization.registerClass(RngDrop.class, "RngDrop");
        ConfigurationSerialization.registerClass(Rank.class, "Rank");
    }
eternal night
abstract sorrel
#

did i mess something up?

eternal night
#

Generally looks fine I think ? ๐Ÿ˜… lemme see where that error is thrown

#

Where are you registering this? Top of your main class ?

abstract sorrel
#

Yes

wet breach
eternal night
#

true, that could also do it

abstract sorrel
eternal night
#

your pom.xml or build.gradle.kts

wet breach
#

well what are you currently using?

#

I suspect maybe you are using maven and quite possibly a shading mishap or rellocation ?

abstract sorrel
eternal oxide
#

I'd remove the annotation and try

abstract sorrel
eternal oxide
#

yes

abstract sorrel
#

wait brb i got to do something

wet breach
#

no problems we will still be here

eternal night
#

I mean, the annotation does nothing given they use the alias taking reg method

wet breach
#

never know sometimes lol

#

I have seen annotations cause weird things

rotund ravine
#

@abstract sorrel where do you deseriliaze it?

wet breach
#

got to wait for them to return ๐Ÿ™‚

eternal oxide
#

his error says it can't find "Rank" not it can't find "io.github.runtellobama.arcturusrpg.utils.Rank" so It's just a guess its the annotation and his static block

eternal night
#

They are using the alias taking method and "Rank"

#

the FQN is registered only when just passing the type

wet breach
#

not a no class def exception

#

so you may be right ElgarL

near mason
silent steeple
near mason
#

thx

#

whats the difference between origina-plugin and plugin?

onyx fjord
#

original isnt shaded

silent steeple
#

why is Sign#getLines() and setLine() DEPRECATED

eternal oxide
#

getMeta first

silent steeple
#

getMetadata?

eternal oxide
#

oh sorry, sign

silent steeple
#

what

eternal oxide
#

for some reason I read getLore

silent steeple
#

oh

#

how am i meant to getLine if its deprecated

eternal oxide
#

get a side first

#

signs now have multiple sides

silent steeple
#

wtf is a side

silent steeple
#

this is dumb

eternal oxide
#

two sides = two different set of lines

silent steeple
#

wait thats a thing

#

you can write on both sides

eternal oxide
#

you can now

silent steeple
#

why tho..

eternal oxide
#

I guess someone thought it was a good idea at Mojang

silent steeple
#

L mojang

abstract sorrel
#

Im back

buoyant viper
#

im fairly certain you cant have a constructor in plugin entrypoint class

chrome beacon
#

You can have one that takes no params

#

I think

kind hatch
#

No, you can't have one at all.

chrome beacon
#

ah

kind hatch
#

Just move the stuff in your constructor to the #onEnable() method.

buoyant viper
#

sigh

young knoll
#

Say the line!

buoyant viper
#
  1. the constructor is
public TutorialBot() {
  shardManager = jda.getShardManager();
}```

2)
#

?learnjava!

undone axleBOT
young knoll
kind hatch
#

I- i

buoyant viper
kind hatch
#

Wtf

buoyant viper
#

you would only keep shardManager = jda.getShardManager(); for your onEnable

#

not the public TutorialBot() { }

grim oak
#

Hi, If the mob spawn cap is reached and i summon a mob with spigot will the mob not spawn?

onyx fjord
#

it will spawn

grim oak
#

I have plugin and i need to spawn a mob and it works fine in my testing server but in the server with about 100 players it wont spawn

#

It works fine when spawning an iron golem but not mobs like a spider

kind hatch
#

I feel like it needs to be said again.

buoyant viper
#

just remove final from the field then @timid hedge

hazy parrot
buoyant viper
#

?paste the entirety of the class, somethings gotta be missing from what youre sending us i feel @timid hedge

undone axleBOT
buoyant viper
#

and make sure that you undo any changes you made/tried since the error u sent

#

thats not the whole class, it has no imports or package declaration at the top

echo basalt
#

Man needs to learn about splitting stuff into classes

buoyant viper
glad prawn
#

How many ?learnjava! commands have been sent to him

crystal palm
#

hiya. quick question - is spigot's broadcastMessage thread safe?

echo basalt
#

Should be

crystal palm
#

time to try it and see i guess. shouldn't really fuck up tho.

echo basalt
#

It's just looping through players and sending a packet so

buoyant viper
#

how does that manage to still not line up... your erroneous line is a blank one according to that past

hazy parrot
#

She means that error doesn't match that code

glad prawn
#

Maybe your shardManager is null?.

buoyant viper
buoyant viper
#

according to JDA, it is possible the ShardManager from JDA#getShardManager can be null

#

so maybe thats it

#

?jd-s for self

undone axleBOT
tawdry echo
#

how can i do when a player enters a region between two locations a bossbar will be displayed and his progress will be the distance from the center of the region?

chrome beacon
#

You can use the scheduler to run a check every few ticks

tawdry echo
#

what do u think about using moveevent?

hybrid spoke
quaint mantle
#

how does delay work? like uhh

delay: 3600000```
#

is that 3600000 in minutes or?

shadow night
#

Its the delay in ticks

echo basalt
#

3600000 ticks

#

Divide by 20 and that's seconds

quaint mantle
#

alrighty

#

thanks

buoyant viper
#

๐Ÿ’€

#

long ass delay (2 days)

shadow night
#

Can anybody suggest a good use for delay in timers? Like, when you startTimeTask or whatever it was, you provide your plugin, the delay and the interval in between executions. What practical use does the delay have there?

buoyant viper
#

waiting X ticks to send a message

#

or waiting X ticks to do any actions really

shadow night
#

Waiting X ticks to send a message every X ticks?

sacred prairie
#

i only delaied it once because i had some kind of death animation which should be run 1 second later

buoyant viper
#

say someone dies and u want to laugh at them, 20 ticks later

#

u would use the delay

shadow night
#

well, thats not a timer tho

sacred prairie
#

you can delay the start of a timer

#

ticking timer

#

thing

buoyant viper
#

oh u wanted to know for like repeating tasks not just in general

shadow night
#

Thats what I am talking about ๐Ÿคฆโ€โ™‚๏ธ I explained that in my intial message

buoyant viper
#

ehhh im tired

#

but the same logic still applies, waiting X ticks before u start performing ur task

#

all just comes down to use-case, if u dont need it, dont worry about it :P

sacred prairie
#

does any1 know how to fix this, this appears on join, idk what triggers this and where in the code this is. It also appears when i join the server and after joining i reload the plugin

sacred prairie
#

but then there should be a stacktrace

warm mica
#

Only result of google. The message exactly matches, but Spigot doesn't use Spring

sacred prairie
#

yep this is what i found too :/ also i use my own reflection utils

shadow night
#

It does look like something packet related maybe?

sacred prairie
#

ye probably sadly idk where this happens

warm mica
#

Ya, that usually happens in the protocol level. E.g. when listening to packets or something

sacred prairie
#

hmm ok

warm mica
#

You could try/catch your code and properly print it

sacred prairie
#

imma have a look at my packet reader

#

ok thanks now i have a stacktrace <3

echo basalt
sacred prairie
#

ye ok was am issue with reflections thanks for the idea with the try catch <3

flint coyote
shadow night
#

Hmm

#

Good idea ig

charred blaze
#

hey

#

how do i check if string is written in valid english? (some people on my server tries to bypass only-english with typing their language with english letters)

hybrid spoke
#

you would need a dictionary

#

or some ai to see if its a valid sentence

charred blaze
#

uhh

#

but i see some chat plugins do it

#

without ai

ancient plank
#

Google translate api kek

hybrid spoke
#

they probably only check for symbols

slender elbow
#

honestly outsourcing it to some 3rd party service might be the sanest solution than loading the entirety of the English dictionary + slangs (!!)

charred blaze
#

hm

#

so

#

is there any real way to do this?

slender elbow
#

"real"? if you mean with String.contains only then no, you're gonna have a bad time with that

near mason
#

Yo just found about commandMap

slender elbow
#

but any solution is real

ancient plank
#

Using a 3rd party translate api is prolly the most efficient method if you don't wanna train your own translation model or load a whole ass dictionary + slang

charred blaze
#

why not loading whole dictionary

#

how many words are there in english

hybrid spoke
charred blaze
hybrid spoke
#

you just gotta pay a few cents per month

charred blaze
#

response from gpt will take like 1-3 seconds.

near mason
#

ฤฐ tried chat gpt with chat filter

charred blaze
#

so players have to wait 1-3 seconds to chat?

near mason
#

But it has rate limit

charred blaze
#

ok

#

how do i block other language characters then?

hybrid spoke
#

regex

charred blaze
hybrid spoke
#

?bing

undone axleBOT
hybrid spoke
#

no please no help

charred blaze
#

ah ok. please show me

ancient plank
#

It's really easy regex

#

Like actually probably the most simple regex

charred blaze
#

i know

#

but i want to allow emojies

hybrid spoke
#

?bing

undone axleBOT
hybrid spoke
#

?gpt

charred blaze
#

if you are not going to help me just stop spamming commands

ancient plank
#

The shorthand for letmegooglethatforyou looks kinda like an LGBT shorthand if you don't look closely at it

hybrid spoke
#

?spoon then

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.

charred blaze
#

LGBT shorthand? wdym

charred blaze
river oracle
cinder abyss
#

Hello, how can I create a custom entity with a custom model ?

pseudo hazel
#

this can be done with a dictionary database on a single word, but like, sentences will be almost impossible without ai

hybrid spoke
quiet ice
#

you could employ the same techniques that were used to crack the german ciphers in WW2

pseudo hazel
quiet ice
#

i.e. word frequency analysis

river oracle
hybrid spoke
#

you could also check for the essentials of a sentence

#

verbs, subjects

#

adjectives

cinder abyss
pseudo hazel
#

yes but "detecting if a string is valid english" is a fool's errand

river oracle
#

Unless ypu got an AI

pseudo hazel
#

esepcially considering things like slang, abbreviations etc

quiet ice
#

But you can estimate whether a series of string is likely to have been written in english

hybrid spoke
#

what if someone mispells

pseudo hazel
#

which i am more likely to use over "valid" english in chats anyways

quiet ice
#

By checking for common words such as (by, for, such, as, the, etc.)

hybrid spoke
#

bullying people with dyslexia

pseudo hazel
#

yes you can

#

whoch would then automatically fall under ai

river oracle
#

Me saying taco in chat with no context to kill the translator

quiet ice
#

Hence word frequency

charred blaze
# hybrid spoke ?bing

i tried this but it fails. unclosed string literal.
Pattern pattern = Pattern.compile("[a-zA-Z0-9_\u200d\u200c\u2600-\u27ff\u0009\u0020\u000A\u000D]+");

slender elbow
#

what if I just say taco

#

checkmate

neon elk
#

is there any repo that uses a db for getting nms? because i cant build bt

quiet ice
#

Maven-repos hosting NMS are usually shortlived

neon elk
remote swallow
#

I just fell asleep typing

#

Oops

quiet ice
#

Oops indeed

slender elbow
#

eepy

hybrid spoke
#

more like oopssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

quiet ice
#

let's not char spam

hybrid spoke
#

ooooooooooooooookkkkkkkkkkkkkaaaaaaaaaaaaaayyyyyyyyyyyyyyyy

quiet ice
#

Anyways, could you do my homework? \s

mortal hare
#

'a'.repeat(99999);

quiet ice
#

error: char cannot be dereferenced

river oracle
#

all you're checking for is roman characters its inherently flawed considering a lot of languages use roman characters

slender elbow
river oracle
#

oh I see I thought they wanted to tell the difference between languages for translation purposes

#

which is why I reccomended AI earlier

slender elbow
#

why one would want to stop someone from speaking their language is beyond me, yay for accessibility

river oracle
#

how do i check if string is written in valid english

river oracle
#

it makes sense if you can't moderate it, but that's the only case

slender elbow
#

could develop better moderation tools

river oracle
#

how do i check if string is written in valid english? (some people on my server tries to bypass only-english with typing their language with english letters)

This was the original post I saw maybe there was stuff earlier

#

I think OP also fails to recognize roman alphabet is very common in Europe and the Americas

river oracle
#

I mean you can look stuff up but that only goes so far as far as language goes

slender elbow
#

which is why you, hear me out, develop better moderation tools

river oracle
#

hiring someone for languages is out of the question for a lot of servers because of budget especially if they're smaller

quaint mantle
#

Hey, I am using Geyser and trying to connect to my server. It is a proxy and I have al the via plugins installed yet I can not join on bedrock as it says I am on an outdated client. Please someone help.

river oracle
#

is more appropiate for this question. you also might wanna ask in geyser discord

quaint mantle
#

ok

slender elbow
#

I mean if you wanna go full balls to the wall there are dozens upon dozens of translation services, analysis tools, etc, but it could be as simple as, provide your moderators with a "click to translate" and query deepl and/or google

river oracle
slender elbow
#

which is why there are other services

river oracle
#

I mean if you think about something like Chinese or Japanese to English it gets fucky really quickly

slender elbow
#

google translate doesn't work very well for Japanese but there are specialized services

river oracle
# slender elbow which is why there are other services

I don't really think this is a realistic solution for smaller servers. Stuff like that costs money a lot of times. Sure if you're a bigger server it makes no sense not to offer translations etc. But most people on here asking for solutions don't have that kind of money to throw around on their side project they're likely doing for fun or just as a hobby

slender elbow
#

ok

wet breach
#

if you only want to check if its english words, then just use something like websters dictionary and compare the words

river oracle
wet breach
#

then you compare with percentages, if the percentage of the string matches words in the dictionary, its safe to say its english

slender elbow
#

almost every one of us suggested to use a 3rd party service and they went "nah bro" shrugs

wet breach
river oracle
wet breach
#

the type of cache I would use, is memory mapped file

#

this way its not memory allocated to the server being used

#

rather to the file

river oracle
#

hmmm seems like a valid solution

river oracle
#

but either way you're working with outside services

#

unless you do what frostalf mentioned

wet breach
#

yeah that is really the only way and I wouldn't be detecting for correctness in words or misspellings, just count those as not part of the dictionary

#

most of the string should match the dictionary words

#

if they do its safe to say its english ๐Ÿ˜›

#

if the percentage falls below like 75% or even 50% you could flag it for moderation

slender elbow
#

then you get to slangs and abbreviations and all the creativity of profanities that barely exist, language is fun

wet breach
#

obviously not all slang, but a good portion

#

and since they want english only, this really is the only feasible way to do it

#

can't use google translate for this as their API costs money now

#

unless you want to try and get around their checks

slender elbow
wet breach
#

the next thing I would do is check character points

#

just check that the string uses character points of the english alphabet

#

this nabs the mandarin and cyrilic characters

brisk estuary
#

Hey, if I put the version 1.19 as the api-version on my config.yml will my plugin work on servers that support multi versions?

river oracle
#

unless its made for specific purposes

#

those large language models kinda suck at most things

grim ice
#

but people should stop learning asian languages like chinese or japanese

#

theyre extremely difficult and just sort of redundant at this point, and by learning it youre extending its life time

#

there are more efficient languages

river oracle
wet breach
river oracle
#

Language has roots in culture and the development of its people taking away a language is like taking away part of a countries culture

grim ice
#

eventually they will stop using i t

#

and if they dont, they can live isolated

river oracle
#

English is such a shitty language if we're talking about efficency

grim ice
#

and chinese is better?

#

dude

#

i speak fucking arabic

#

english is so much easier

#

and arabic is often considered to be as hard as chinese

#

but chinese is a bit more difficult

#

still

#

from my experience, english is easier than all of german, arabic, and french

river oracle
#

what's you're native language arabic?

grim ice
#

yes

grim ice
#

just saying

river oracle
#

Honestly surprised to hear you say english is easier considering its so different generally it takes longer the further related your languages are

grim ice
#

i learnt english at 8 years old

#

so idk

river oracle
#

granted the internet is almost all english speakers so it makes sense that you become profficent quickly if you absorb yourself in it

grim ice
#

i also learnt french alone

#

and im learning german currently

#

and i can gurantee english is the easiest language ive seen

#

its rules are so simple

#

sentences are easy to structure

river oracle
#

I mean it is probably the lingua franca for a reason

#

but that's not to say that makes other languages bad

chilly hearth
#

!learnjava

#

?learnjava!

undone axleBOT
wet breach
#

problem with arabic isn't necessarily learning it

#

its the fact there is a lot of different dialects

quiet ice
#

Why would we be?

river oracle
#

prob got banned from forge or something xD

undone axleBOT
torpid idol
#

i need some help

#

i have this code

#

package me.shadow.banplugin.commands;

import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

public class BanCommand implements CommandExecutor {

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

    Player target = Bukkit.getPlayer(args[0]);

    Bukkit.getBanList(org.bukkit.BanList.Type.NAME).addBan(target.getName(), "You have been baned by: ", null, sender.getName());
    target.kickPlayer("You have been banned from the server.");
    sender.sendMessage(target.getName() + " has been banned.");
    return true;
}

}

vast ledge
#

use paste

#

?paste

undone axleBOT
torpid idol
#

but how can i make tht when a player that is baned want to join to not let him and give him an error that say a custom message

#

?

vast ledge
#

Yea

#

and have a list

#

of whos banned

#
  • reason
torpid idol
#

i still cant solve it

vast ledge
#

@torpid idol Do you know how to use events?

torpid idol
#

kinda

grim ice
#

not really

#

I, as an algerian

#

can understand every dialect

#

pretty easily

#

not sure about other nations though

wet breach
echo basalt
#

ngl I thought you were russian

grim ice
grave kayak
#

im trying to add a long string of hex color codes mixed with codes like &l for bold. i want to add them as the lore line for an itemstack. im using the bungee chatcolor.translatealternatecolorcodes('&', [text]) but the output i am getting is just what I am putting into the code with the #'s &'s and color codes. this is what im trying to have translated
&#c93cfb&l๊œฐ&#c53bfb&lส€&#c139fb&lแดœ&#be38fb&lษช&#ba36fb&lแด› &#b635fc&lแด›&#b233fc&lแด&#ae32fc&lแด‹&#ab30fc&lแด‡&#a72ffc&lษด &#a32dfc&l- &#9f2cfc&lแด‡&#9c2afc&lx&#9829fc&lแด„&#9427fc&lสŸ&#9026fd&lแดœ&#8c24fd&l๊œฑ&#8923fd&lษช&#8521fd&lแด &#8120fd&lแด‡

wet breach
grim ice
#

syrian, egyptian, saudian, tunisian, morrocan etc

#

all

#

of them

#

lol

grim ice
wet breach
#

no I know for a fact it isn't

grim ice
#

wait i guess idk sudanese

#

or chad or juba

wet breach
#

you can't bs me with the arabic because there is villages so remote in the middle east that have their own dialects that even our translators had a hard time understanding them

grim ice
#

no one speaks these tho

kind hatch
wet breach
#

I will agree you heard the most common ones

#

or the more frequently spoken ones

grim ice
#

main ones are morrocan, saudian, egyptian, syrian

#

most of the others are very similar to these 4

#

e.g algerian is similar to morrocan

grave kayak
grim ice
#

u can just speak the main dialect

#

which is just arabic

#

unlike english

#

arabic works differently

#

theres 1 main way to speak arabic

#

and every arabic person knows it

#

no matter their dialect

#

its called fusha

wet breach
#

but its like trying to say southern english isn't english anymore just because you can't understand it

grim ice
#

southern english is spoken by so many people

#

one village speaking different doesnt make it their dialect

languid urchin
#

When using <FileConfiguration>.getInt() for instance, is the value read by opening the config file, or are all config options loaded into memory on server start?

wet breach
lilac dagger
wet breach
#

just because there is a lot of people speaking it, doesn't mean its another dialect and that just because fewer people speak makes it another language

languid urchin
grim ice
wet breach
#

except you are saying then all the remote villages in the middle east have their own language

#

when this isn't even true

grim ice
#

if you cant understand them with the fusha arabic

#

it means it isnt arabic anymore

languid urchin
#

Is this conversation not more suited for #general or #verified ?

grim ice
#

we have all sorts of offtopic discussions here

#

it doesnt hurt anyone but if its annoying u ig we can move

languid urchin
#

It doesn't bother me, I just thought I would point it out since it might clog the channel

wet breach
languid urchin
#

but if it's allowed, carry on

grim ice
wet breach
#

or we halt the conversation to help out and then go back to it later ๐Ÿ˜›

#

but technically you are correct though

wet breach
eternal oxide
#

with getConfig()

wet breach
#

that might be true

eternal oxide
#

which is why you can register classes in onEnable before yoru first access

hazy parrot
#

You are inserting into players table but reading from player_deaths

quaint mantle
#

someone get my ip adress if they join my server ?

vast ledge
#

yes

#

they have to have ur ip to join

hazy parrot
#

Why do you even use shard manager

livid dove
#

Anyone got experience with the javadocs tool in intelij?

Using it to shortcut my library's javadocs but have a few issues with it.

timid hedge
hazy parrot
livid dove
hazy parrot
#

He is being told inf amount of times that you first have to learn fundamentals, yet still refuses to do it

magic glacier
#

how to get Player face ?

hazy parrot
#

And don't use ShardManager if you don't know what it is

livid dove
hazy parrot
livid dove
#

Lmao we really need like a /noob bot

hazy parrot
#

I mean yeah, I agree that was more rude that I intented it to be, but fr

livid dove
#

Yeah nw mate

#

Big man to admit it so mad respect

pseudo warren
#

i want to allow all player in my server to use trade how?

livid dove
vast ledge
#

I dont understand, can people not tell the difference between a server and a development question?

tender shard
#

i dont get the question lol

vast ledge
tender shard
#

why do people always do this

vast ledge
#

I dont know

#

if the anwser inst quck enough

#

maybe

livid dove
#

We are a server of developers. Someone make a dang bot that can tell ๐Ÿ˜…

kind hatch
#

I still believe in timing out or temp banning people who copy paste their question into every single chat.

sterile breach
#

Hello, if when creating an inventory, I set owner (first arg) to null and I do player.open blabla, the owner will become player?

tender shard
#

no

sterile breach
#

so if I don't specify the owner, I never can get the one who opened the inventory?

livid dove
#

Someone link the inventory menu moder approach thread. I'm on phone haha

tender shard
#

your inventory can ony be opened by yourself so you should be able to know whom you opened it to?

livid dove
#

*modern approach

tender shard
#

i don't understand the issue

#

I mean if you do player1.openInventory you do know it's player1, don't you?

livid dove
#

Neither do I, but his question suggests even looking at that thread might solve most his issues haha

cinder abyss
#

Hello, how can I make a fake player (join message, leave message, movements..) that I can control ? (with nms)

sterile breach
#

yes after I can store it at the time of instantiation but I looked if there was not simpler

livid dove
#

Not really unfortunately. The whole inventory system in spigot is a bit... interesting haha

young knoll
#

This is why I use views :p

sterile breach
#

so it's better to pass it when I instance my inventory rather than at the time of the bukkit.createinventory?

charred blaze
#

why do you need to pass it

livid dove
#

I mean the ideal way to do it imo is a map of inventories to player uuids

#

Have an inventory check the map, get the owner

#

Easy

cinder abyss
#

Hello, how can I make a fake player (join message, leave message, movements..) that I can control ? (with nms) (bump)

vital sandal
#

any solution for the removal of prefix on pet name?
(cannot do modify Owner UUID as it gonna break the sitting)

sterile breach
#

but I think I'll just pass it at instantiation time

charred blaze
#

why not get inventory which player has open and then modify it

sterile breach
#

ah with a

inventoryView.getPlayer();?

solid cargo
cinder abyss
young knoll
#

Control panel does not tell you your java version

eternal oxide
#

check your java path

solid cargo
#

what mc version?

#

try to increase Xms by 1

#

you never know

young knoll
#

Yeah thatโ€™s not how it works

solid cargo
#

Invalid maximum heap size: -Xmx9000M

kind hatch
#

Well, you are also using M instead of G. soooo

young knoll
#

Yeah so you have 32 bit java

#

Go reinstall java and make sure you use the 64bit installer

fast merlin
#

i dont remember installing that

tender shard
#

I found that running on Windows 7 Enterprise 64-bit, my 32-bit HotSpot JVM can allocate up to 1577MiB

#

so yeah just install a 64 bit java

solid cargo
#

how are MiB pronounced?

#

mebabits?

sterile breach
#

and conretemeemnt, specifying an owner at the creation of the inventory what does it bring more?

tender shard
kind hatch
solid cargo
#

computer terminology try not to be confusing challenge (IMPOSSIBLE)

tender shard
#

1 MiB = 1024 x 1024 bytes
1 MB = 1000 x 1000 bytes

remote swallow
#

i would have 100% said mibibytes

orchid trout
#

now tell me the diference between mb/ps and mbps

tender shard
#

/ps ?

remote swallow
#

megabit v megabyte

#

per second

solid cargo
#

i just apply the formula mb/s = mbps / 10

remote swallow
#

megabyte/persecond megabitpersecond

remote swallow
#

1 byte is 8 bits

young knoll
#

Nah itโ€™s 10 now

#

Inflation

remote swallow
#

why

young knoll
#

:(

remote swallow
#

oh

#

make sense

#

gotta pay more rent

solid cargo
#

the difference is too small when i apply it

tender shard
#

mebinflation

solid cargo
#

so idc

soft hound
#

Okay so I have 2 of these buttons, 1 for accept and 1 for decline.
But for some reason I cannot send them in a message.

Whenever I try to do player.sendMessage(acceptMessage);
It just sends it as a raw bukkit code, and not as a clickable message, how do I send 2 of them in the same line?

// Clickable Message Components
ComponentBuilder acceptMessage = new ComponentBuilder(net.md_5.bungee.api.ChatColor.of("#08fc20") + "[ACCEPT]");
acceptMessage.event(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "tpaccept")).create();
solid cargo
#

its the same as converting polish Zloty to eur,
(1 zloty = 22 cents last time i checked)
we divide it by 4. the difference isnt too big

undone axleBOT
sterile breach
#

Hello, specify an owner when creating the inventory what more does it bring?

young knoll
#

It means getHolder will return the player

soft hound
young knoll
#

But generally you want to avoid using getHolder anyway

solid cargo
#

these days people advise you to avoid everything

young knoll
soft hound
young knoll
#

Append your two components together?

cinder abyss
#

Hello, what is the EnumProtocolDirection.CLIENTBOUND's equivalent in nms 1.17.1 ?

#
ep.b = new PlayerConnection(ep.c, new NetworkManager(EnumProtocolDirection.CLIENTBOUND), ep);```
soft hound
#
target.spigot().sendMessage(acceptMessage.append(denyMessage + " ").getCurrentComponent());```Like this you mean?
remote swallow
#

is this bot going in multiple servers, (over a few hundred)

young knoll
#

Something like that

sterile breach
young knoll
#

Yes

#

I generally just define them at inventory creation

remote swallow
#

why are you also creating a new thread just to run a runnable, as well

#

once again

#

?learnjava!

undone axleBOT
soft hound
#

As a message, and not a text button thingy.

young knoll
#

You should just be able to do ComponentA.append(ComponentB)

cinder abyss
#

Hello, what is the EnumProtocolDirection.CLIENTBOUND's equivalent in nms 1.17.1 ?js ep.b = new PlayerConnection(ep.c, new NetworkManager(EnumProtocolDirection.CLIENTBOUND), ep); (bump)

remote swallow
#

yeah

undone axleBOT
cinder abyss
#

thanks

soft hound
young knoll
#

No

lilac dagger
young knoll
#

Append B to A and then you can just send A

#

I donโ€™t remember if append returns Component or void

cinder abyss
lilac dagger
#

no?.

#

i mean the sourse of 1.17.1

#

i don't know it by hand

kind hatch
#

Through your JDA instance?

remote swallow
#

^

echo basalt
#

jfc just ask in the jda discord server

timid hedge
#

There is nothing jda.activity or something like that

remote swallow
#

jda.setActivity

#

or look at javadocs if it doesnt exist

echo basalt
#

jda.getPresence().setActivity(Activity.playing("message2"));

remote swallow
#

what even is this

#

there isnt a need for the scheduled server executor or the thread

cinder abyss
remote swallow
#

learn java

tender shard
remote swallow
#

oh i am

#

@lost matrix smh

#

?scheduling

undone axleBOT
remote swallow
#

use bukkit scheduler or ask for help with the errors

sterile breach
remote swallow
#

yeah i found it

#

you should add items when you create the inventory

sterile breach
#

yes, on the tutorial he does it when he opens it is that right?

remote swallow
#

depends, in most cases id say add items after you create it

sterile breach
#

you mean after opening it?

remote swallow
#
public InventoryClass() {
      this.inv = ...;
      
      populateItems();
}

// method to add items
sterile breach
#

yes, so add them at the same time as you create them?

remote swallow
#

yeah

sterile breach
#

but doing it after opening the inventory is by no means a good idea is it?

remote swallow
#

it might save on some storage because the inventory definately opens

#

but most of the time you shouldnt need to worry

sterile breach
#

okay,

#

and when creating the inventory, better to leave owner on null? or specify?

remote swallow
#

owner as null

serene sigil
#

hey guys, im getting this error when starting the server with my plugin.

#

idk how to fix it

#

its all it provides

#

the plugin wont load

kind hatch
#

?whereami

serene sigil
#

its a spigot plugin tho

#

???

mortal hare
#

is it perfectly reasonable to create getInstance() singleton methods for the factory method classes?

eternal oxide
#

thats using configurate on paper, its not Spigot

mortal hare
#

that way i can switch the implementation of factory method class inside unit tests

#

but retain the ease of use

#

from the code side just by calling getInstance()

serene sigil
eternal oxide
#

nope

serene sigil
#

its just that the api is different

mortal hare
#

paper is phasing away bukkit api support

#

by little

#

it recently introduced custom system for loading plugins

eternal oxide
#

Spigot plugins run on everything. Other forks do not run on Spigot

serene sigil
eternal oxide
#

yes

#

Spigot runs on everything

mortal hare
#

that way you can load plugins with custom bootstrappers

#

and loaders

kind hatch
serene sigil
#

so what do i do to fix this?

mortal hare
#

what are your guys relationships with static methods

#

i kinda hate them and love them

#

you cant test them really

#

by mocking

eternal oxide
#

Code on Spigot to work on all forks

serene sigil
#

but i do

#

it is spigot

eternal oxide
#

no you don;t

serene sigil
#

yes it is

#

the server.jar is paper

eternal oxide
#

look at your stacktrace

serene sigil
#

im using this

#

nothing else

#

and i always have

mortal hare
#

but you're running it on paper

serene sigil
eternal oxide
#

give a stacktrace from a Spigot server and we can help

serene sigil
#

but the plugin is spigot

mortal hare
#

where can i find the stacktrace?

viscid egret
#

how do i place double chests?

kind hatch
viscid egret
mortal hare
#

1.20?

serene sigil
#

yes

#

1.20.1

viscid egret
eternal oxide
#

your api-version says 1.14

mortal hare
#

use api-version: 1.20 instead

serene sigil
serene sigil
eternal oxide
#

your stacktrace says its 1.14

serene sigil
eternal oxide
#

did you add a paper-plugin.yml by mistake?

mortal hare
#

api-version: field should not be lower than 1.13

slender elbow
#

that is specifically a paper issue, you are using paper-plugin.yml

#

well, "issue"

serene sigil
#

plugin.yml

eternal oxide
#

open your jar and take a look

mortal hare
#

show me your plugin.yml

viscid egret
#

You might want to take it up with some JDA support server, because this is a Spigot exclusive server

eternal oxide
#

pretty sure you also have a paper-plugin.yml

#

open jar with any archive tool (zip)

mortal hare
serene sigil
#

i only have a plugin and a config.yml

eternal oxide
#

check your jar not your project

mortal hare
#

can you open the compiled jar

#

inside like 7zip

#

or winrar

serene sigil
#

alright

mortal hare
#

and open plugin.yml from there

#

maybe your build system does some magic behind

serene sigil
#

what the fuck

kind hatch
#

Jfc, what's with people and not following instructions lately? It's not like we are asking you to build a rocket.

eternal oxide
#

run mvn clean

serene sigil
#

i dont have a paper-plugin.yml inside intellij tho

serene sigil
mortal hare
#

it could be you're using an extension

#

of some sorts

#

inside intellij for example

#

or you have maven or gradle plugin

#

to autogenerate the .yml files

serene sigil
#

now its good

mortal hare
#

try it

serene sigil
#

kk

serene sigil
#

it helps u create mc mods/plugins

mortal hare
#

it could be that extension tampers with your project

serene sigil
#

but i dont use it

mortal hare
#

idk

#

thats my guess

serene sigil
#

yea

#

ill try running it now

eternal oxide
#

it is created by the Minecraft plugin, you have to mvn clean to get rid of all teh junk

serene sigil
#

i was really surprised a spigot plugin didnt run on a paper server lmao

slender elbow
#

yeah cuz it wasn't a spigot plugin :^)

serene sigil
#

yea lol

remote swallow
#

do you queue it

serene sigil
#

also, does anyone know why it takes so long for the server to load when im using aikar's flags?

#

alright, it now works :DDDD

#

lol

cinder abyss
#

Hello, my class who extends EntityPlayer give me this error:java 'x()' in 'net.minecraft.server.level.EntityPlayer' clashes with 'x()' in 'net.minecraft.world.entity.EntityLiving'; attempting to use incompatible return type(nms 1.18.2)
how can I resolve it ?

serene sigil
#

thanks guys

chrome beacon
#

?nms

lilac dagger
#

or ignore it

#

maven will work

#

i had the same issue some multiple times

#

but when compiling when maven it went through fine

soft hound
#

Is there a way to make it so instead of the default essentials /tpa command, the server uses my own tpa command?
Like, loads my own tpa command before Essential's

lilac dagger
viscid egret
#

ill dm it bc idk if im allowed to send here

lilac dagger
#

or you can make essentials your dependency

eternal oxide
soft hound
#

Wdym?

eternal oxide
#

What do you not understand about my response?

soft hound
#

Where do I need to register it ?

#

If you mean in the plugin.yml, then I've already done that.

eternal oxide
#

all commands need to be registered

#

getCommand("tpa").setExecutor(...

soft hound
#

Oh.

#

Well without it it won't really function xD

tender shard
soft hound
#

I've already registered them then, it still won't work.

tender shard
#

olivo sent you the link above already

eternal oxide
#

then your command is broken

#

remove essentials and test your command again

near mason
#

Why do use getplugincommand. Setexecutor instead of using commandMap

eternal oxide
#

because thats the correct way to use the API

soft hound
#

I mean my command functions as it should, but it wont override essential's command.

eternal oxide
#

it will IF yoru command actually works#

near mason
#

Does using commandMap has side effects?

soft hound
eternal oxide
#

Essentials yields commands to other plugins

#

If you register your command and it works your command will be used

#

the actual command though is tpall Not sure it will check aliases

mellow pebble
#

is there sort of event to listen to when player jumps on farmland block and it turn into dirt to cancel it

eternal oxide
#

register as tpall with an alias of tpa if you want to use tpa

mellow pebble
eternal oxide
#

it shoudl be a physical action in the interact event

cinder abyss
serene sigil
#

does anyone know something about the mojang api?

#

i want to check if someones uuid is a legacy mc uuid

#

not a cracked account

eternal oxide
#

what api?

serene sigil
#

mojang api

eternal oxide
#

What api?

serene sigil
#

idk

chrome beacon
eternal oxide
cinder abyss
serene sigil
#

i just want to know if a minecraft account (the uuid) is form a real minecraft user

#

not a cracked account

cinder abyss
tender shard
simple arch
#

Can someone help me with my bungee configuration?

tender shard
cinder abyss
simple arch
#

Here's my config

mellow pebble
tender shard
mellow pebble
#

did ever someone have problem when using intellij and when pasting something or opening brackets it literally just freezes

#

idk if it is some stupid hotkey

serene sigil
#

mb

#

i just wanted to know the url

eternal oxide
#

by name is new URL("https://api.mojang.com/users/profiles/minecraft/" + name)

serene sigil
#

what does ?unsigned=false

#

mean

eternal oxide
#

you could probably omit it

serene sigil
#

?

tender shard
#

according to wiki.vg, unsigned is only for UUID to skin

autumn cave
#

Does World::getNearbyEntities(...) also gets entities from unloaded chunks?

tender shard
#

no

serene sigil
tender shard
#

then you have to use online mode

#

that's what it's made for

serene sigil
#

?

serene sigil
tender shard
#

in server.properties, set online-mode to true

serene sigil
#

oh

#

nvm

autumn cave
#

how can I keep a chunk loading during an operation of some sort?

serene sigil
#

no, i just want to check in the plugin

tender shard
tender shard
serene sigil
#

i cant?

tender shard
#

nvm it's called addPluginChunkTicket

eternal oxide
#

you can query Mojang to see if it's a known UUID is all

serene sigil
serene sigil
#

thats what i wanna do

tender shard
#

and then?

serene sigil
#

and then so something with the info

tender shard
#

I could connect to your server claiming to be md_5

#

md_5's UUID exists

#

it's just not me

serene sigil
#

no, im not checking the username; im checking the uuid

tender shard
#

yeah I could just get md_5's uuid by username and then use that UUID to connect to your server

#

how are you gonna check whether I'm actually md_5

onyx fjord
#

login plugins prevent that

tender shard
#

except by using online mode

onyx fjord
#

fastlogin can prevent that for example

serene sigil
#

and i wanna know how to do that

#

and i stil dont know ;-;

eternal oxide
#

I gave you a full method to check a UUID and teh link to check by name

tender shard
#

where %s is the trimmed UUID

#

anything else than 200 OK is an invalid UUID

#

a redirect is also an invalid UUID

onyx fjord
eternal oxide
#

pretty sure it always redirects for ddos protection

eternal oxide
#

which is why conn.setInstanceFollowRedirects(true);

tender shard
eternal oxide
#

I don;t remember its been so long since I used it

tender shard
#

i have just checked it using ```sh
wget $url 2>&1 | grep Location:


entering a valid UUID just gives you the json result, if you enter an invalid UUID it redirects to the closest actual UUID
eternal oxide
#

I do remember it redirecting and giving a redirect error at some point is all

serene sigil
#

does anyone of u have a cracked uuid for testing?

tender shard
#

00000000000000000000000000000007

serene sigil
#

alright... lol

tender shard
#

basically any number with 32 chars

serene sigil
#

so ill just check if its 200

#

anything else is prob wrong

tender shard
#

it might also return "Not a valid UUID" if it can't be a UUID at all

wet breach
tender shard
#
{
  "path" : "/session/minecraft/profile/jesus-is-fake",
  "errorMessage" : "Not a valid UUID: jesus-is-fake"
}
onyx fjord
#

yeah because he is real

serene sigil
#

lol

wet sparrow
#

Hello

tender shard
#

hewwo

near mason
#

PacketWrapper throwin error when s the startingerver

wet sparrow
#

Can someone here help me with an arena regeneration system I'm doing. but i'm having a little problem

tender shard
#

?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!

tender shard
near mason
#

does it have any alternatives

tender shard
#

PacketEvents, normal ProtocolLib, NMS

wet sparrow
#

I'm trying to make it so that when a person clicks on a block, they get the drop and it changes according to an enum that I have made. and after a while it will be the original block again.

#

looks like this. this is called onBlockBreak and PlaceEvent.
ItemType type = ItemType.from(block.getType());
if (type != null) {
Collection<ItemStack> drops = e.getBlock().getDrops();
int exp = e.getExpToDrop();

        player.giveExp(exp);
        game.typedBlocks.put(block.getLocation(), block.getState());

        e.setCancelled(true);

        drops.forEach(item -> player.getInventory().addItem(item));

        System.out.println("From: " + block.getState().getType());
        // Set the block to the replacement type
        block.setType(type.getReplacement());

        System.out.println("Change to: " + block.getState().getType());
        PTC.getInstance().runTaskLater(() -> {
            System.out.println("Run Task");
            if (game.typedBlocks.containsKey(block.getLocation())) {
                System.out.println("Change true");
                BlockState originalState = game.typedBlocks.get(block.getLocation());
                System.out.println(originalState.getType());
                block.setType(originalState.getType());
                game.typedBlocks.remove(block.getLocation());
                System.out.println("Change " + block.getState().getType() + " to: " + originalState.getType());
            }
        }, 20 * 5);
    }
umbral ridge
#

hey

undone axleBOT
umbral ridge
#

why is all underlined

tender shard
umbral ridge
#

wtf is a logging call

tender shard
#

you seem to have some weird plugins

#

in IJ

umbral ridge
#

don't have ANY plugins

wet sparrow
#

remove final

remote swallow
#

can i ?main you

umbral ridge
#

it's kind of the same..

tender shard
#

you have enabled these checks

wet sparrow
#

packages?

tender shard
#

reset the checks back to default

wet sparrow
tender shard
near mason
umbral ridge
near mason
#

bruh

umbral ridge
#

I haven't installed any themes

wet sparrow
#

someone help me?

tender shard
chrome beacon
wet sparrow
#

I'm trying to make it so that when a person clicks on a block, they get the drop and it changes according to an enum that I have made. and after a while it will be the original block again.

#

is this

onyx fjord
#

is anyone aware if its possible to change boat's model?

#

i mean i know for sure it is

#

but how

dim adder
#

Hello, How can I make it so that when I become a rod and an entity is in the way that it goes through the entity, or at least the entity is not pulled to the player when pulling in the rod.

chrome beacon
tender shard
#

what items a block actually drops is only determined after the block has already been destroyed

#

all you can do is to catch the "default" drops

dim adder
tender shard
#

fishing hooks are projectiles, you can cancel ProjectileHitEvent

#

that lets it go "through" entities without colliding with them

chrome beacon
#

or at least bounce off

tender shard
#

if that doesn't work you can also cancel PlayerFishEvent if the getCaught entity is a player or whatever

brisk estuary
#

In order to make trails I should use the PlayerMove event right? I mean, is there any more efficient way to do that?