#help-development

1 messages ยท Page 2280 of 1

jagged thicket
#

true

#

i forgor didn't code for a while

sterile token
#

You shoulnd use deprecated methods, altogught they work

#

But you shouldnt use them

#

Becaue they are deprecated for a reason

frozen cedar
#

ok thx

glossy venture
#

its probably deprecated because of paper adventure shit

summer scroll
sterile token
#

๐Ÿ˜‚

#

Spigot support is bitten paper supprt

#

They server is dead lmao

glossy venture
#

gradle paper user api thing is easiest way to get remapped nms + full api

#

so thats why

#

but it is fucking annoying

#

that they deprecate

#

so much shit

summer scroll
#

the adventure is shit

glossy venture
#

regarding chatcolors and "legacy" strings

glossy venture
summer scroll
#

chat components

glossy venture
#

sure you can include it

#

but dont shove it down peoples throats ffs

frozen cedar
#

and now how to replace the resulting water bottle (Material.POTION) with another item?

glossy venture
frozen cedar
glossy venture
#

ooh

#

cancel the event and add the item to the inventory

#

pretty sure minecraft just adds the water bottle

#

to the first slot

frozen cedar
glossy venture
#

?

frozen cedar
#

but may be slower in some cases

sterile token
#

any good text component api neither spigot/bungeecord nor shity adventure api?

glossy venture
#

idk how you would make a good one, its always more annoying to use than ChatColor.RED + "hello"

#

its useful and nice sometimes

frozen cedar
glossy venture
#

so cancelling doesnt work?

#

it should

frozen cedar
#

no

glossy venture
#

bruh

frozen cedar
glossy venture
#

if it throws an error it wont work

#

i forgot to check for null

#

also make sure to use the one with FluidCollisionMode (org.bukkit.entity.Player.getTargetBlockExact(int, FluidCollisionMode))

frozen cedar
#

FluidCollisionMode.ALWAYS?

glossy venture
#

you can only fill bottles with source blocks

#

but you could

#

id use FluidCollisionMode.SOURCE_ONLY

glossy venture
#

oh yeah you gotta decrease the amount of items in the main hand

#

and add your own item

frozen cedar
#
if (event.getAction() == Action.RIGHT_CLICK_BLOCK && player.getTargetBlockExact(4, FluidCollisionMode.SOURCE_ONLY).getType() == Material.WATER) {
            ItemStack item = event.getItem();
            System.out.println(item.getType());
            if (item == null || item.getType() != Material.GLASS_BOTTLE) {
                return;
            }

            event.setCancelled(true);

            for (ItemStack i : player.getInventory().getContents()) {
                if (i == null) {
                    continue;
                }

                if (i.getType() == Material.POTION) {
                    i.setItemMeta(meta);
                    i.setType(Material.DRAGON_BREATH);
                    break;
                }
            }
        }```
glossy venture
#
if (event.getAction() == Action.RIGHT_CLICK_BLOCK && player.getTargetBlockExact(4, FluidCollisionMode.SOURCE_ONLY).getType() == Material.WATER) {
            ItemStack item = event.getItem();
            System.out.println(item.getType());
            if (item == null || item.getType() != Material.GLASS_BOTTLE) {
                return;
            }

            event.setCancelled(true);

            item.setAmount(item.getAmount() - 1);

            for (ItemStack i : player.getInventory().getContents()) {
                if (i == null) {
                    continue;
                }

                if (i.getType() == Material.POTION) {
                    i.setItemMeta(meta);
                    i.setType(Material.DRAGON_BREATH);
                    break;
                }
            }
        }
frozen cedar
#
if (event.getAction() == Action.RIGHT_CLICK_BLOCK && player.getTargetBlockExact(4, FluidCollisionMode.SOURCE_ONLY).getType() == Material.WATER) {
            ItemStack item = event.getItem();
            System.out.println(item.getType());
            if (item == null || item.getType() != Material.GLASS_BOTTLE) {
                return;
            }

            event.setCancelled(true);

            item.setAmount(item.getAmount() - 1);

            player.getInventory().addItem(myItem);
        }```
glossy venture
#

yeah

frozen cedar
#

Yea

#

ChatColor.of("#hex")

zenith gate
#

world generation is server sided right? if that is the case can't I change world generation to add my ores to be mined instead of crafted?

frozen cedar
#

?

frozen cedar
#

Yes, yes

#

but it still lights up yellow, like Deprecated

#

Work

#

Item names are using ยง as color tag. They aren't formatted as JSON. (taken from the forum)

summer scroll
#

ChatColor#stripColor

dusk flicker
#

no; well if they worded it weird then yes

summer scroll
#

are you trying to remove the color?

frozen cedar
dusk flicker
#

if they mean extract as in remove (making the text white) its stripColor,
but I assume you are trying to actually get the color value

summer scroll
#

oh

dusk flicker
#

there is an actual method for that?

#

smh

opal juniper
#

@eternal night Ok i have re-written it to use 2 wide blocks. This dramatically decreases the amount of node objects cause i am now just reusing them each time by caching them after i create each one.
https://paste.ollieee.xyz/alewifihup.csharp
The add to tree looks a bit shit and messy though - not sure about re-writing it...

#

its gonna look less like a tree now, its gonna look just like a really messy graph

#

Only 256 + the root node objects are made this way

eternal night
opal juniper
#

i am just re-writing the logic that loads it from file to load it straight to the tree, one sec

#

hopefully amazingly KEKW

hybrid spoke
#

obv. because it returns a string

eternal night
#

watch it be worse

opal juniper
#

dont say that

#

i just tore my hair out 3 times over

#

shit

#

its broken

#

i dont get the correct value out xD

tacit drift
#

http://192.168.1.6:9000/request=message&message=This%Is%A%Test

#

gives me a

#

Cause it's hosted on my java webserver i guess that it's an exception from java

quiet ice
#

Not sure if %I is something that is valid

#

It should be %20 or something like that iirc

tacit drift
#

ok

#

will check

#

I am using % to split words in a message

#

seems like javascript was formatting the url accordingly

quiet ice
#

% is an escape char for URLs

tacit drift
#

http://xxx.xxx.xxx.xxx:9000/request=message&message=Acesta%este%20un%20test!

#

and still returns me a 400

quiet ice
tacit drift
#

yep it works

#

wierd

quiet ice
#

I really recommend using a proper browser

tacit drift
#

will look into how i make my url

quiet ice
#

Firefox refuses your URL outright

#

Ah no, that was my webserver

tacit drift
#

i will see if making a json and putting that in the url would help

#

or see how tf I can make a valid url with some content in it

quiet ice
#

You should familiarise yourself with the GET scheme

sterile token
#

Yeah

#

Agree with geol

#

Also i need some help with cloudflare and sub domains

crude loom
#

How do I reload the config?

sterile token
#

?plugin.yml

#

?pdf

#

?description-file

#

shity command

#

๐Ÿ˜‚

small trail
#

hello i want to make a way for people to get the discord and youtube playerhead and when they place and right click on the head they get a message in chat. how can i do this in spigot

sterile token
#

?plugin-description-file

sterile token
quaint mantle
#

is there a way to use regex to filter results from a query in SQLite?

sterile token
#

Like you want to filter or sanitisalize the sql request before sending to the db?

#

I dont know how to write it the name of proccess is but a process where they scape all characters for being used in sql request

quaint mantle
#

I need to filter a column, like

SELECT name from playerdata
```but instead of just grabbing all the results and then filtering them, I'm wondering if it's possible to just filter within the query
vocal cloud
#

I feel like you could google this question

sterile token
#

And there you are filtering all the names and only return the one that match that uuid

#

Is that what you mean?

quaint mantle
vocal cloud
#

Have you tried it?

sterile token
#

๐Ÿค”

#

Eplain me mike

#

I dont understand what he means by filter

#

Because for filtering results you can use diff SQL combinations

#

๐Ÿค”

quaint mantle
sterile token
#

WHY?

#

No need lmao

#

๐Ÿ˜‚

#

You are reinveinting the wheel when it already exists

#

Dont lost your time

quaint mantle
#

I don't think you understand

sterile token
#

Yeah and a plus im not english native speaker

vocal cloud
#

Okay ignoring the guy who doesn't understand regex try using the regexp function

sterile token
#

I dont dont know what he want s to do

vocal cloud
quaint mantle
sterile token
#

And lot of things more

quaint mantle
sterile token
eternal night
#

@opal juniper how many hashes does your dataset have ?

#

just to know for testing

sterile token
#

Let start from there

small trail
#

ok

sterile token
#

Because its really diff to use an api without knowwing the basics form the language you are coding

#

And also you wont understand what we explain to you

opal juniper
#

text file

#

i also just fixed my thing :)

#

lemme test it now

sterile token
#

where the heck is pdf tutorial

eternal night
#

oh nice

sterile token
vocal cloud
eternal night
#

tho that doesn't tell me how many hashes are in that file xD

opal juniper
#

yeah well lemme iterpolate

sterile token
eternal night
#

wat

sterile token
#

Or is not possible

quaint mantle
#

thanks

sterile token
#

?pdf

opal juniper
sterile token
#

WHich is the command

eternal night
#

okay ๐Ÿ‘

sterile token
#

?plugin-description-file

eternal night
#

I'll do 800 million hashes

#

should be fair

sterile token
#

?di

undone axleBOT
sterile token
#

Hmn looks weird

#

The bot is active but the command doesnt work

opal juniper
#

for 2 million

eternal night
#

oh shit

#

nice

#

oh are you just trying 2 million ?

opal juniper
#

lul

delicate lynx
#

?pluginyml

eternal night
#

was the 5GB number for 2 million too ?

opal juniper
#

yea

eternal night
#

aahh

opal juniper
#

lul

#

its err

#

the file read time

#

makes it painful

#

well, 6.5s for that

#

it was faster to read it all and then add it all tho weirdly

#

but more mem

#

ill do a 10m run

#

it doesn't see, to be hitting my disk like at all aPES_Think

quaint mantle
#

Use Rust

opal juniper
#

3.2GB for 10 million entries

vocal cloud
#

Sort the entries and then you can binary search them

quaint mantle
quaint mantle
vocal cloud
#

Deleted.png

opal juniper
#

Whats the most efficient input method

small current
#

finger

vocal cloud
#

Input as in input stream?

opal juniper
#

or scanner.. etc

ivory sleet
#

What are you inputting:0

vocal cloud
#

Probably a buffered reader

opal juniper
#

seems buffered reader

#

yeah lol

waxen plinth
#

InputStream#readAllBytes is quick

tardy delta
#

ah

opal juniper
#

hmm its not on this bench mark

marble copper
#

What's the difference between waterfall and bungee cord?

ivory sleet
#

Waterfall is a fork of bungeecord and

#

iirc is entirely dropped

#

(In favor to velocity)

crude loom
#

Do I have to save the instance of a Listener if I want to unregister it later?

ivory sleet
#

Depends

marble copper
#

And what's the difference between paper and spigot

opal juniper
#

speed and API features

marble copper
#

Does it also stop server crashes caused by hackers using hack clients? Cuz I heard it does

opal juniper
#

fuck it - im gonna use the big file

ivory sleet
#

Paper is a fork of spigot and afaik they are much more into adding stuff that makes the api more accurately representing the notchian impl and yes ofc speed if possible

vocal cloud
#

I mean if hackers are crashing your server you've got other issues.

marble copper
#

Will paper stop it?

hybrid spoke
opal juniper
#

they fix more bugs than spigot does

hybrid spoke
#

challenge the "hackers"

crimson terrace
#

an anticheat might

ivory sleet
marble copper
#

I'm not using any anti cheat

vocal cloud
#

Paper also introduces bugs by fixing issues so paper could cause problems as well

ivory sleet
tardy delta
#

bruh why cant i catch an sql exception which isnt included in the throws thing..

#

lets catch Exception then

ivory sleet
#

Well

marble copper
#

Guys can anyone recommend a good anti cheat which prevents hackers crashing the server

crimson terrace
marble copper
#

People use wurst clients "nocomcrash" to crash the server

ivory sleet
#

Oof

marble copper
crimson terrace
marble copper
#

1.16.5

vocal cloud
#

Limit packets sent from clients

crimson terrace
#

Im on their wiki and they are themselves saying that its patched in 1.18.2

marble copper
hybrid spoke
tardy delta
#

disabling offline mode is a good thing too ๐Ÿคก

vocal cloud
#

Using a plugin that does that

marble copper
vocal cloud
#

Google probably does

crimson terrace
#

does it matter?

marble copper
#

What did who patch?

crimson terrace
#

ok, google "nocom crash wiki"

tardy delta
#
if (Bukkit.isOfflineMode())
System.out.println("aha get rekt");
System.exit(0);```
crimson terrace
#

oof

#

do people actually use that?

tardy delta
#

method doesnt exist sadly :(

hybrid spoke
#

dont you write servercrasher?

vocal cloud
#

Just check the config

crimson terrace
#

37,4% of the servers one of my plugins runs on are in offline mode

hybrid spoke
#

probably bungeecord server

vocal cloud
#

Could be behind a proxy

tardy delta
#

37,4 do you have 1000 servers maybe

crimson terrace
#

500

tardy delta
#

tf

vocal cloud
#

It's when the proxy is in offline mode that the issue starts

ivory sleet
#

Dam

hybrid spoke
#

i have 63.6% in offline mode

crimson terrace
#

oh damn

tardy delta
#

i have 0 in offline mode ||cuz i have 0||

crimson terrace
#

F

hybrid spoke
#

but well, its a plugin for minigames

crimson terrace
#

mine is one for boss mobs

hybrid spoke
#

whats your highest core count

crimson terrace
#

56 if I'm not missing any

hybrid spoke
#

ha, 64

opal juniper
#

@eternal night when i get to 66 million it just stops going any further and grinds to a halt

eternal night
#

๐Ÿ™

#

the best possible outcome

crimson terrace
ivory sleet
#

Some quite big numbers tho

opal juniper
#

idk what you are doing but i think thats the limit for me

marble copper
#

Yes nocomcrash doesn't work in 1.18.2 but it also says some anti cheats disable it so does anyone know an anti cheat which can disable nocomcrash I'm on 1.16.5

crimson terrace
#

we wouldnt be doing anything else to answer your question

golden turret
#

how can i edit the text when i hover this?

crimson terrace
ivory sleet
#

Or maybe that doesnโ€™t do it

hybrid spoke
#

own server doesnt count

quaint mantle
#

Can a Mod help me?

#

I have found a stupid MF on spigot that thinks he is funny pls just ban him and delete his Rates he write every time the same it doesn't even make sense

https://www.spigotmc.org/threads/spigot-webserver-for-minecraft.554053/#post-4403041

https://www.spigotmc.org/resources/โ™ป๏ธ-โœ•-advanced-wings.103308/

https://www.spigotmc.org/resources/server-maintenance-server-wartung.101708/

User Name : ScaredDev

His Profil
https://www.spigotmc.org/members/scareddev.720099/

I Reportet him 3 Times

vocal cloud
#

This really isn't the place to ask for help lmfao

quaint mantle
#

Yes, but otherwise I don't get any feedback :/

#

because it looks like spigot support doesn't care a bit

marble copper
#

Would Vulcan anticheat disable wursts nocomcrash?

ivory sleet
#

Iโ€™d have looked into it if I were a mod on forums, though I think as mike pointed out you came to the wrong place, maybe start a convo with one of the forums mods

crimson terrace
#

knowing german does help with that tho

quaint mantle
#

the funniest thing i know this guy because i was on his discord just banned me and now probably thinks he can take revenge with something like that

crimson terrace
#

yeah, sad thing is that it works

#

people will see that one bad review over the multiple perfect ones and not download

ivory sleet
#

I mean one thing you can do is to just reply and state the truth behind x review

crimson terrace
#

they did

#

which is a very good start

ivory sleet
#

Yes, that should repair it sufficiently enough

quaint mantle
#

yes :( I had worked extra on the wing plugin for 3 days it has its own resource pack with custom item id with custom mobs and custom drops

quaint mantle
ivory sleet
#

I mean I would

crimson terrace
#

I usually do tbh

ivory sleet
#

And Iโ€™m a very pedantic customer

crimson terrace
#

every sensible person would, and if they dont its probably one of those guys who comment badly without testing properly

vocal cloud
#

Lol they have a discord link in their bio.

eternal night
#

@opal juniper how fast is the loading into your data structure ? xD

#

I am dyingggg

opal juniper
#

10 million was about 30 secs

eternal night
#

speed

crimson terrace
#

@quaint mantle may I pm you?

eternal night
#

Yea the binary search isn't doing too well with insertion

#

tho tbf that is expected

quaint mantle
eternal night
#

what is your read/contains time ?

quaint mantle
#

Yes sure why not?

ivory sleet
opal juniper
eternal night
#

Well obvs

#

how many

quaint mantle
#

Yes ... that's right, it's just another thing that's useless and annoys me

opal juniper
#

oh sorry lemme check

ivory sleet
#

Understandable, it sucks but hopefully someone angelic with permission can yeet those reviews

tardy delta
#

@quaint mantle the plugin list on ya profile is more empty than the 'girls that like me list'

quaint mantle
tardy delta
#

thats what she said yes

crimson terrace
#

my plugin list has 3 plugins in it, one with a peak of over 500 servers, quality is everything tbh. the third plugin will also take off, i can feel it ๐Ÿ˜›

tardy delta
#

i should publish a plugin

#

im always working on code but i never publish anything

quaint mantle
#

My plugin for the web server has 350 downloads

ivory sleet
opal juniper
eternal night
#

ah

#

okay lemme see how my shit holds up in terms of read/writes

#

and memory

opal juniper
#

it did take 60s to load that time tho

eternal night
#

for 10 mil ?

opal juniper
#

yea

#

i am playing a game tho but my cpu isnt that high

eternal night
#

Yea lol my binary tree shit is gonna be horrible xD

#

in terms of writes that is

#

it flies around 100ms for inserting 10k elements lol

vast zenith
#

I have an issue

#

so

opal juniper
#

oooh yeah

ivory sleet
vast zenith
#
        this.config = new FileHandler(this, "config.yml", true);
        this.task = new ClearPokemon(this).runTaskTimer(this, 0L, config.getLong("Time"));
        getCommand("pcreload").setExecutor(new ReloadCommand(this));
        this.getLogger().info("Has been enabled");
    }

    @Override
    public void onDisable() {
        this.task.cancel(); // once plugin is disabled, stop the task by calling it
        this.getLogger().info("Has been disabled");
    }

    @Override
    public FileHandler getConfig() { return this.config; }
}```
opal juniper
#

i have an issue but its not programming :)

frozen cedar
ivory sleet
#

(:

tardy delta
#

ollie has issues with girls

vast zenith
#

but

#

it's not reloading the time path within the config

#

it just reloads the message

ivory sleet
#

Yes thatโ€™s because youโ€™re saving the old value of the time path

#

getLong("blah") wonโ€™t magically update

#

Itโ€™s like youโ€™re setting it to a variable only once

#

No automatic updates

vast zenith
#

how would I make it to be able to change when i do the reload

ivory sleet
#

Cancel task upon reload

#

And re launch it

sterile token
#

?pdf doesnt work

#

๐Ÿคญ

#

?pdf

#

Look conclure

ivory sleet
#

?pdc

sterile token
#

pdf

#

Plugin description file

#

๐Ÿ˜‚

ivory sleet
#

Oh

sterile token
#

Sorry for tag =><=

ivory sleet
#

Or sth

noble lantern
#

hai guys

tardy delta
#

thats cool

noble lantern
#

whatchyall up to

tardy delta
#

i wanna drink but theres nothin to drink :'(

quaint mantle
#

Bear grylls

sterile token
#

Or in confused

ivory sleet
#

Trolling again?

sterile token
#

No no

#

Really

#

Im not native speaker

#

Remember...

#

Oh shit

#

That means another thing

#

MY bad conclure

ivory sleet
paper viper
#

Type in one message

#

Rather than 20

tardy delta
#

smh

sterile token
#

I can send it to dm if you want it

#

its done

tardy delta
#

wanna see

ivory sleet
#

And your library to send messages over servers without relying on any connections at all?

#

:0

sterile token
noble lantern
sterile token
#

And them i realized that protocol changes between versions

sterile token
ivory sleet
noble lantern
#

nah its glass

sterile token
#

That why

#

Glass explode on lower tmpres

tardy delta
noble lantern
#

damn docker

tardy delta
#

hup wheres code i wanna see code

sterile token
#

And is like inifnite

#

Until they close the website

tardy delta
#

fun

sterile token
#

๐Ÿ˜ฌ

#

Yeah in railway lmao

#

I just create random projects and just them a redis database service

#

And thats all

#

Conclure

#

Im helping a friend and we are trying to figure how to start the runnable with the timer value updated

#

Sorry for thi dumb quetion but im in dought

#

๐Ÿ˜‚

noble lantern
#

you can stop it

#

and start it again

#

i think

sterile token
#

Yeah i already told him

ivory sleet
#

Is this the same as the guy above????

tardy delta
#

i mean you cant change the value on the run

#

while running

sterile token
noble lantern
#

i would keep a referance to the BukkitRunnable itself not the BukkitTask

sterile token
#

I already told him to stop it

tardy delta
#

i would do it internally and take a LongSupplier

#

but gn

noble lantern
#

you can cancel the Task and re-init it with new value

sterile token
sterile token
#

But the problem is that he has a reload command

#

And a getter for the task in main class

buoyant viper
noble lantern
#

Basically only store ClearPokemon

sterile token
#

Thanks you all

noble lantern
#

and call runTaskThingy and store that as non-final

#

other one make it final

#

you can cancel task and re-init it that way

Idk if bukkit has a better way to do it

#

but its just what came to mind

ivory sleet
#

Thatโ€™s the best choice

noble lantern
#

buurrrrn

ivory sleet
#

Ugly as hell of a design

#

But suffices

noble lantern
#

yeah defo ugly

sterile token
ivory sleet
#

?ban

undone axleBOT
#
CafeBabe Help Menu
Syntax: ?ban <user> [days] [reason]
Ban a user from this server and optionally delete days of messages.

days is the amount of days of messages to cleanup on ban.

Examples:

  • ?ban 428675506947227648 7 Continued to spam after told to stop.
    This will ban the user with ID 428675506947227648 and it will delete 7 days worth of messages.
  • ?ban @Twentysix 7 Continued to spam after told to stop.
    This will ban Twentysix and it will delete 7 days worth of messages.

A user ID should be provided if the user is not a member of this server.
If days is not a number, it's treated as the first word of the reason.
Minimum 0 days, maximum 7. If not specified, the defaultdays setting will be used instead.

noble lantern
#

i dont rly use bukkit schedular no more so i forgot how it works slightly

ivory sleet
noble lantern
#

same with bukkits command bullshit

sterile token
#

Yeah i dont use them as much

noble lantern
#

i dont even think i remember how to write a normal spigot command anymore

sterile token
#

Bukkit shchedules runs a runnable right?

noble lantern
#

yeah

sterile token
#

If i can know

#

Because im creating a lib and i need ideas

sterile token
#

Oh

#

never realized

ivory sleet
#

Verano make an api api

#

An api to make other apis

sterile token
#

Skidding time ๐Ÿคญ

noble lantern
#

make an api wrapper for my api

ivory sleet
noble lantern
#

that is an api for another rest api

#

and that rest server links to another rest api that from there executes the api methods you need

sterile token
#

Lmao i really love doing an api over an api over an api

#

๐Ÿ˜‚

noble lantern
#

thats basically what every spigot plugin library is

sterile token
#

Imagine that i will make a storage api for working over the mongo api

#

that will be another api

noble lantern
#

cause your doing it on top of

all the libs of mojang
then the libs of minecraft
then the libs of bukkit
then spigot
<other bullshit forks here>
and finally your lib

#

welcome to java hierarchy where the stack size is big but our ram usage is bigger

sterile token
#

yeah

noble lantern
#

oh and then theres even more before mojang

#

like netty

ivory sleet
#

Mojang

  • Their abstractions
    • Their delegations
      • Their wrappers
        • Netty
          • Packet spam
            • Byte encoding/decoding
noble lantern
#

dont forget the 20 events called in between each step

ivory sleet
noble lantern
#

i wonder how many sys calls a mc server does a second

#

has to be fucking crazy

#

maybe like 3k?

buoyant viper
#

dont worry about it

noble lantern
#

idk now im kinda curious

#

but idk how to figure that out so your right dont worry about it

ivory sleet
#

Verano

sterile token
#

Wrong channel

noble lantern
#

why does building docker images suck

sterile token
#

My bad

vocal cloud
#

Could always run it in a profiler to get some idea

noble lantern
#

oh shoot true

sterile token
#

I always forget what i have copy on the thing

noble lantern
#

i bet intellij would even say it too ngl

ivory sleet
#

Donโ€™t want to be that guy but here x)

buoyant viper
sterile token
#

๐Ÿ˜ก

ivory sleet
#

Lol

sterile token
#

I accidentally press enter

ionic cipher
#

im trying to use armor stands to place text above a player by having the stand ride the player, but when the stand rides the player the players nameplate disappears, any advice?

noble lantern
sterile token
#

Sorry for ignorance but arent used teams for setting up player things on top of his head?

ionic cipher
#

when i tried that it had like a 0 stuck under the name

#

and it renders only like 10 blocks away

sterile token
ionic cipher
#

if i could just force the player nameplate to render

#

would be good

sterile token
#

Isnt a specific packet for render the name tag?

ionic cipher
#

๐Ÿคทโ€โ™‚๏ธ ive been working in skript only so far for this thing

sterile token
#

On skript

ivory sleet
#

Skript or Spigot API (Java) ?

sterile token
#

Yeah skript and spigot api are diff things

#

Skript is an interpreter which has is own pseudocode

ionic cipher
#

if i can do a plugin to enable the nametag

#

ill do that

#

i just need to get the function

sterile token
#

I straightly recommend plugins over using skript

#

Also something strange but console has operator permisions right?

#

Im asking that because when i do a permissions check the console bypass it

ivory sleet
#

It has all permissions

sterile token
ivory sleet
#

iirc it just returns true regardless when you use hasPermission

sterile token
#

Oh ok

#

Thanks

spiral cape
#

hey! I have my own parkour plugin which has a time counter, but there is an issue with it when it comes to people purposely using a lag switch, which basically allows these players to teleport on the server side. They would for example switch their laptop to airplane mode and turn it back off. what would be the best way to catch players doing this?

sterile token
#

@noble lantern Into:

public static List<String> convert(List<String> messages) {
  return messages.stream().map(BurchAPI::convert).collect(Collectors.toList());
}```
quaint mantle
spiral cape
#

I could technically check for ping if it's constant, and if out of nowhere goes too high, i could stop the timer for them

quaint mantle
#

Lag = kick

ivory sleet
#

If theyโ€™re idling in a similar enough position for a long time enough, isnโ€™t allowed to fly and isnโ€™t on ground

#

Or sth

#

Might have to do some other checks besides that

quaint mantle
#

.map(convert)

worldly ingot
#

You need to include the class name

quaint mantle
#

Fr?

worldly ingot
#

If it were an instance method you could use this::, but yeah, you need a type

#

Otherwise it's a variable

#

This isn't a scripting language, Imajin. lol

sterile token
#

I think classname because its a satic method

quaint mantle
#

Java's so fucking shit

#

Rust allows it

sterile token
#

Agree

worldly ingot
#

BECAUSE RUST IS BASICALLY A SCRIPTING LANGUAGE KEKW

noble lantern
quaint mantle
noble lantern
#

i just copy paste that method over and over for years now

sterile token
#

Yeah can i pull reuqest that?

#

Hahaha

ionic cipher
#

@sterile token so could i do something like a server jar mod to make the nametag show?

noble lantern
#

why does building docker images fucking suck

worldly ingot
#

C++ runs faster than Java but you're also going to fuck up a hell of a lot more and shoot yourself in the foot. It ain't about speed aPES_Laugh

sterile token
#

They are made with diff apis, so they need diff execution enviroment

sterile token
#

I dont really know because i dont code mods

ionic cipher
#

ill take a looksie

glossy scroll
sterile token
quaint mantle
sterile token
ivory sleet
#

iirc you could statically import the class

noble lantern
#

wow that 300kb library took 2 minutes to install

ivory sleet
#

And then skip that

ionic cipher
#

if i edit the open src and compile why would it not run

buoyant viper
sterile token
#

Normal spigot doesnt support mods, if you want to use mods you have to implement it yourself

ivory sleet
#

Pyth-โ€ฆ

noble lantern
sterile token
#

There are some shity implementions for mods and plugins around

cunning canopy
#

any way to save a schematic or something for my solo spawn cage so that way I can just plop it around at multiple places?

buoyant viper
ivory sleet
#

Lol

noble lantern
#

besides him

ivory sleet
#

Def imajin

ionic cipher
#

im hack it into the server jar ๐Ÿ™‹ good luck me

sterile token
#

Also this channel is for plugin questions

cunning canopy
cunning canopy
#

its related to plugins

#

I want to do it with a plugin

#

like

noble lantern
#

bro i just wanna build a docker image why does it need so much shit

cunning canopy
#

have a saved build

sterile token
#

Oh you wanna use world edit api

cunning canopy
#

and plop it around

noble lantern
#

Like???

cunning canopy
#

I dont really want to use external plugins

noble lantern
#

why you need a java websocket to build a docker image

buoyant viper
#

because

ivory sleet
#

Nested dependencies >:)

buoyant viper
#

uh

#

uhm

glossy scroll
buoyant viper
#

dont worry about it

noble lantern
buoyant viper
#

thats why

noble lantern
#

FROM ubuntu

cunning canopy
#

should I just use setblock in a function or is there a more effective way?

buoyant viper
#

nms blocks uwu

#

jk

ivory sleet
#

Hebe guess itโ€™s pretty bloated as well

sterile token
#

"Dont reinvent the wheel when already exists"

ivory sleet
#

Happens all the time tho

sterile token
#

@cunning canopy

buoyant viper
#

but reinventing is more fun

#

i say

noble lantern
#

sometimes for schematics you do need to reinvent

buoyant viper
#

Re-invent the wheel, but with more squares!

cunning canopy
noble lantern
#

theres only so much speed you can squeeze out of fawe api

#

thats what literally every plugin developer is

#

is a backend developer

#

you do 0 front end

cunning canopy
#

well true

#

maybe you'd count scoreboards as frontend

buoyant viper
sterile token
#

Programming is looking like javascript, they get tired of reinventing new frontend and backends frameworks. Now they are with javascript enviroment execuction

#

๐Ÿ˜‚

noble lantern
#

oh im gonna find some bugs alright

buoyant viper
#

loool

cunning canopy
#

is C++ alot faster then java?

noble lantern
#

im prolly just gonna sue docker for making me wait so long ngl

#

yes and no

#

If the right person does it

#

yes

#

if not, no

#

java can be fast even if you throw it down a mountain and lock it in a dark room for 2 years

cunning canopy
#

basically the question I am asking is: is java really optimal for game dev?

quaint mantle
#

No

noble lantern
#

yes

#

not front end

quaint mantle
#

Ok yes

cunning canopy
#

haha

noble lantern
#

back end is viable

cunning canopy
#

argument time

quaint mantle
noble lantern
#

front end tho do something else

quaint mantle
#

Front end is a pain in the ass

eternal oxide
#

Java is good for game dev depending on teh game

cunning canopy
#

like c++?

upper vale
#

coding an AAA title with java swing guys

buoyant viper
#

minecraft

noble lantern
cunning canopy
#

like c++ is the goto language?

buoyant viper
cunning canopy
#

for games

noble lantern
#

funny because thats what notch did lmao

noble lantern
#

c# for a LOT of stuff

buoyant viper
noble lantern
#

(unreal engine/unity)

#

if your making your own engine tho

buoyant viper
#

thought unreal was cpp

noble lantern
#

your gonna be in c++

#

rockstar likely does c++

eternal oxide
#

Unity is likely getting trojans and adware ๐Ÿ˜›

cunning canopy
#

which is harded. C# or C

noble lantern
#

yeah i dont like unity

quaint mantle
noble lantern
#

C

cunning canopy
#

*harder

buoyant viper
#

C

noble lantern
#

C# is just microsoft java

quaint mantle
#

but slower

#

and uglier

noble lantern
#

ehh

buoyant viper
#

and has less features

noble lantern
#

uglier yah

cunning canopy
#

I tried making an operating system in C once

quaint mantle
#

C is literally just assembly with brackets

cunning canopy
#

I got to the file system and gave up

noble lantern
#

oh my god this image finally built

quaint mantle
#

most operations are 1:1

noble lantern
#

C is the closest langauge to the CPU so its gonna be the fastest

#

high level wise*

#

unless you find something even closer to it than C

buoyant viper
#

HolyC

quaint mantle
#

Impossible

tacit drift
quaint mantle
cunning canopy
#

I write in assembly ๐Ÿ™‚

tacit drift
quaint mantle
#

stickers still exist

cunning canopy
#

okay

#

but

buoyant viper
#

tried writing assembly years ago

#

worst mistake of my life

#

i was 12

cunning canopy
#

how do I build blocks

#

via spigot

#

fast and easy

quaint mantle
#

FAWE

tacit drift
#

WorldEdit API*

cunning canopy
#

there has to be a way without it?

tacit drift
#

World#setBlock

cunning canopy
#

thanks

upper vale
#

that does not sound fast nor easy

#

depends on what ur building ig

buoyant viper
#

build it all with packets never interact with world 10000% speed

cunning canopy
#

when you type Class#blabala is that to indicate blablabla is a method of the class?

buoyant viper
#

yes

noble lantern
#

just send fake blocks to the server and client on place

buoyant viper
#

its smart if you hate yourself

noble lantern
#

and only save the blocks to the file on stop or ever like 5 mins or smthn

#

and bam async chunk operations

#

ezzz

quaint mantle
noble lantern
#

holy cow my docker image worked

buoyant viper
noble lantern
buoyant viper
#

just recreate the entirety of minecraft in minecraft

hybrid spoke
#

imagine making a client canceling all those packets

noble lantern
#

im so proud of myself for this ngl

hybrid spoke
#

you would just see a bunch of players do nothing

ancient basin
#

Hello,
I don't understand why the game drop me 1 diamond when I asked in my plugin code to have a certain amount (it's minimum 2)

hybrid spoke
#

hello, we dont either. provide some code

ancient basin
#

By the way, in my console, I tried to debug but I got the right number

noble lantern
#

show code for setting drop amount

ancient basin
#
if (JobsHelper.isOre(block.getType()))
                {
                    if (!event.isDropItems())
                    {
                        event.setDropItems(true);
                    }
                    else
                    {
                        Collection<ItemStack> stacks = block.getDrops();
                        for (ItemStack stack : stacks)
                        {
                            int stackAmount = JobsHelper.getOreAmount(stack.getAmount(), extendedPlayer.getJobLevel());
                            stack.setAmount(stackAmount);
                            System.out.println("[AkadreamPlugin] new stack amount: " + stackAmount);
                        }
                    }

                    int experience = JobsHelper.getExperienceFromOre(block.getType());
                    extendedPlayer.addJobExperience(experience);
                    player.playSound(player, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1.0f, 1.0f);
                    player.sendMessage(ChatColor.GOLD + "+" + experience + "XP mรฉtier");
                }
#

That was in coming

noble lantern
#

setAmount is buggy sometimes

#

what version are you on

ancient basin
#

1.19

noble lantern
#

you should use the EntityItemDropEvent

i forgot its exact name

#

its similar to that

#

older versions dont have this even tho

#

its relatively new (~1.15ish i beileve)

ancient basin
#

Hmm

noble lantern
hybrid spoke
#

well, you print out the stackamount, but not the list nor the item

noble lantern
#

there

#

this one

ancient basin
#

I was using BlockBreakEvent because is better corresponding to what I want the player do

noble lantern
#

in BlockDropItem even just store the blocks in a list/hashmap from BlockBreakEvent

#

and change amount if Block exists i nthat list

#

if not ignore it

#

Doing your event like this also gives support for stacker plugins too

ancient basin
#

It's a bit of a stretch xD

noble lantern
#

which is why i push you to use this event, as its what a lot of ppl reccomend now a days

tacit drift
#

modify drop on BlockBreakEvent

noble lantern
#

You can but its weird sometimes

#

and breaks functionality with other plugins sometimes

#

only use it on older versions that dont have BlockDropItemEvent

ancient basin
#

Ok ok

#

I'll try

noble lantern
#

Either that or you can cancel block drop even for that block and just drop it yourself

#

or

#

setDropItems(false)

then drop an ItemStack at broken blocks location (The list of block drops you have there)

#

that way is prolly easier tbh but just note functionality suffers with other plugins

ancient basin
#

the event.getPlayer of BlockDropItemEvent is the player who broke the block ?

noble lantern
cunning canopy
#

Hack it all the way lol

#

Favourite distro?

noble lantern
#

windows 95

ancient basin
#

Ok thanks

cunning canopy
#

Unix?

vocal cloud
#

TempleOS is my favorite distro

cunning canopy
cunning canopy
noble lantern
#

korean government os

#

ultimate censorship

cunning canopy
#

Coool

#

Is it hard to hack?

noble lantern
#

wha

#

why are you obsessed with hacking lol

#

i know of another distro but i cant link it

cunning canopy
#

I didn't mean hacking as in penetrating

noble lantern
#

Its a distro for racists

#

"Apartheid Linux"

cunning canopy
#

I meant it was a hack solution

#

To the problem of item drops

#

Hacky

noble lantern
#

most solutions are

#

welcome to spigot

cunning canopy
#

Haha

noble lantern
#

where the least hacky way to do something likely breaks functionality for third party plugins

cunning canopy
#

That's why I try to avoid them

#

Only ones I don't have the time nor energy to do is the backwards version compatibility

noble lantern
#

well if your making a public plugin its where the issue arrises at

#

but if its for my server im gonna do some of the most hackiest shit

#

cause ik no one will look at my code

#

i cant beileve how easy it is to write docker images tho wtf

ancient basin
# noble lantern yes

There is a problem with that event. When I check what type of block broke, I alway have Material.AIR

noble lantern
ancient basin
#
@EventHandler
public void onBlockDropItem(BlockDropItemEvent event)
{
    System.out.println("[AkadreamPlayer] block drop event");
    Player player = event.getPlayer();

    ExtendedPlayer extendedPlayer = AkadreamPlugin.getPlayer(player.getName());
    if (extendedPlayer != null)
    {
        System.out.println("[AkadreamPlayer] bloc drop event: extended player not null");
        Jobs playerJob = extendedPlayer.getJob();
        if (playerJob == Jobs.MINER)
        {
            System.out.println("[AkadreamPlayer] bloc drop event: job miner");
            Block block = event.getBlockState().getBlock();
            System.out.println("[AkadreamPlayer] bloc drop event: " + event.getBlock().getType().name());
            if (JobsHelper.isOre(block.getType()))
            {
                System.out.println("[AkadreamPlayer] bloc drop event: block is ore");
                List<Item> items = event.getItems();
                for (Item item : items)
                {
                    int stackAmount = JobsHelper.getOreAmount(item.getItemStack().getAmount(), extendedPlayer.getJobLevel());
                    item.getItemStack().setAmount(stackAmount);
                    System.out.println("[AkadreamPlugin] new stack (" + item.getName() + ") amount: " + stackAmount);
                }

                int experience = JobsHelper.getExperienceFromOre(block.getType());
                extendedPlayer.addJobExperience(experience);
                player.playSound(player, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1.0f, 1.0f);
                player.sendMessage(ChatColor.GOLD + "+" + experience + "XP mรฉtier");
            }
        }
    }
}
noble lantern
noble lantern
#

might work that way

#

cause

#

that is the state of the block BEFORE it broke

#

and that event is after

vast raven
#

I'm having troubles with the using of the WorldGuard's API, like just checking if a Player in PlayerMoveEvent is in a region, IntelliJ says that can't find any classes in the dependency.

noble lantern
#

so getBlock from state is accesible

#

but type is

ancient basin
#

Ok

#

I understand

#

But I don't understand this choice in the APi

#

Because obviously the block will most of the time be AIR

noble lantern
#

well it does say this in javadocs

coral oyster
#

hi, how can I do something when an entity dismounts from another entity?

ancient basin
#

Ok ok, i should have to read more the javadoc

#

Because intelliJ don't show me the doc

noble lantern
#

thats why you handle anything for your Block needs in BlockBreakEvent

#

and pass your results to drop item event

vast raven
noble lantern
#

might be an even for it

ancient basin
#

Hmm'ok why not

noble lantern
vast raven
# noble lantern How are you importing it?

Since IntelliJ is strange with dependency, after trying using Maven, and the project structure, I'm using the system path in the pom with a lib folder in the pl with worldguard jar into it.

noble lantern
#

you install jar files

#

using mvn install-file

vast zenith
#

how would I cancel and restart a task with the new config

noble lantern
ancient basin
#

Thanks for the help, it's working very well now

noble lantern
#

and then you import it normally without system scope

noble lantern
vast raven
#

Actually, why it wouldn't work with Maven, it doesn't ring me a bell.

noble lantern
#

wym?

#

system scopes are heavily deprecated in maven

#

compiler even warns several times for it

vast raven
# noble lantern wym?

If you give an eye into the docs of WG, there is the Marven import with repository and dependency, but actually it doesn't work, maybe is IntelliJ which gives you a lot of problems with dependency.

noble lantern
#

sec

vast raven
coral oyster
vast raven
noble lantern
#

idk if that first repo link works for it or not

vast raven
#

idk

noble lantern
#

never seen an event created like that before but

#

alright

vast raven
#

Search a class where use the event.

noble lantern
#

if your extending an event that means your calling the event

#

not listening

vast raven
#

Then write @fresh templetHandler, create a public void method like onDismount(here insert the event and event after) and that's it.

noble lantern
#

poor even

vast raven
vast raven
vast raven
#

I'm spamming him to send me that pom.

coral oyster
coral oyster
#

thanks

noble lantern
#

one more thing

#

that class that method holds needs to implement Listener

#

you should rly read the guide i sent

vast raven
vast raven
noble lantern
vast raven
#

See you after 13h so.

coral oyster
#

thanks for the help ill read up o n the guide you sent

vast raven
deft axle
#

So I'm working on a plugin I haven't worked on since 1.17
I've updated it with spigot 1.19 now
And when I export the jar and put it in the plugins folder for a 1.19 server, it doesn't seem to load on the server

crude loom
#

How do I detect player movement that is only done by the player?

ionic cipher
#

what version java should plugin be made in

crude loom
#

You should use the newest version possible, although you might want to support multiple versions if you plan on uploading it

ionic cipher
#

is the process of supporting multiple versions just strictly using in common features

#

or is there an easy way to be sure of compatability

ionic cipher
#

like if i want to support multiple versions

#

how do i proceed with that in mind

crude loom
#

You use the oldest API you want to support, for example: if you want to support 1.16 - 1.19 you use the 1.16 API

ionic cipher
#

gotcha

buoyant viper
vocal cloud
#

If you're not using java 18 then it's illegal obviously

buoyant viper
#

apparently i installed java 18 on my spare pc

#

i dont remember when or why

vocal cloud
#

Intellij doesn't let you dl open-17

buoyant viper
#

wat

vocal cloud
#

Last time I checked it was because it's "unsafe". Like I care about safety

noble lantern
#

How do i change the name of a file built with gradle?

Sounds simple but i cant find anything online, im only able to change the baseName which seems to only change the first part of the projects name

-all i assume comes from my shadowJar task im running

#

i just want it to be named server.jar without versioning and additions

#

oh it wont work doing it globally had to do it inside the shadowJar task

#

weird

eternal night
#

As a side note, might be worth to have a separate copy task that does the renaming

#

While loosing version information might be fine now it may not always be

noble lantern
#

yeah not a bad idea tbh

I just wanted a jar named server.jar so i dont gotta work with versioning for auto deployments server.jar is just simpler

#

By chance how would i copy the task?

eternal night
noble lantern
#

oh fairly easy

eternal night
#

Yea very straight forward

#

You should be able to use the shadowJar tasks output directly to avoid guessing file names

noble lantern
#

Another question:

Is there a way to configure gradles daemon somehow to be faster upon first compilation? Maybe by disabling its caching somehow im able to get a faster compile time?

The daemon is essentially uselss to me since this is just a quick docker task to compile the project from git

noble lantern
#

i could do it in gradle definatly, not sure if its readily possible this way

sterile token
#

How do you get all blocks from a cuboid?

#

Nice token bro

paper viper
#

LMAO

#

caught in 4k

quaint mantle
#

LOL

upper vale
#

bro ๐Ÿ’€

quaint mantle
#

@noble lantern thats why we have environment variables

noble lantern
quaint mantle
#

Also

#

Change your damn token

#

We can see it in the logs

sterile token
#

Yeah

noble lantern
#

revoked that shit so fast

#

yeah

#

its gone

sterile token
#

Now change the token

#

๐Ÿ˜‚

noble lantern
#

it was first thing i did lmao

noble lantern
sterile token
#

Oh atleast you are faster

noble lantern
#

i forgot i had my token in that cause im lazy and dont wanna login with ssh

#

now i gotta make another and change my script smh

sterile token
#

burch

#

whas does thtat script?

#

Oh lmao i need to get blocks from a cuboid

#

I really messed

#

๐Ÿ˜ฎโ€๐Ÿ’จ

hybrid spoke
#

loop through

sterile token
noble lantern
noble lantern
#

instead of a Cuboid

hybrid spoke
noble lantern
#

^