#help-development

1 messages ยท Page 1391 of 1

ivory sleet
#

wow

eternal night
#

it has a haskell plugin iirc

ivory sleet
#

oh fr?

eternal night
#

ye, I think my brother used it for uni

#

lol

ivory sleet
#

lmao lme check that out then

lunar schooner
#

Nope not quite, but the compiler helps a long way

#

the rust compiler is the best compiler of them all, cant change my mind

eternal night
#

I mean, the second it supports full macro expansion of the written code for autocompletion

#

I am up for it

lunar schooner
#

oh yeah

eternal night
#

like.

lunar schooner
#

I am so annoyed by that, so often

#

Like the mysql crate params! macro

eternal night
#

I mean if you wanna make a quick 315 dollars

#

go implement it xD

lunar schooner
#

I really need to find some kind of common theme for the editors ๐Ÿค”

eternal night
#

has a bounty

mortal hare
#

if only mojang would add forced resource packs...

lunar schooner
#

so lynx, I assume you know your way with rust too?

eternal night
#

I have tangoed with the beast a little yes xD

lunar schooner
#

awesome

#

Because I've got a thing I've been thinking on for the past couple of days

#

Usually when you need shared state is you create it and reference it in your main or something

#

but how the hell would I do that for JNI ๐Ÿค”

#

Ive been doing this for now:

lazy_static! {
    pub static ref LOG_BUFFER: Arc<HashMap<u32, LogEntry>> = Arc::new(flurry::HashMap::new());
    pub static ref DATABASE: Arc<Mutex<Cell<Option<Database>>>> = Arc::new(Mutex::new(Cell::new(None)));
    pub static ref CONFIG: Arc<Mutex<Cell<Option<Config>>>> = Arc::new(Mutex::new(Cell::new(None)));
}

#

but it isnt too optimal

eternal night
#

You don't xD I mean to be very honest, JNI was never really intended to host application logic

lunar schooner
#

err, no fair xd

eternal night
#

I mean, you are supposed to implement low level functional methods using it

#

that would perform horribly when interpreted by jvm

lunar schooner
#

Yeah good point

#

then there's me writing 30% of a plugin with it ๐Ÿ˜‚

eternal night
#

tho I mean, maybe there is some merit in moving database stuff to it

quiet ice
#

Good thing Java 16-18+ is looking in improving it via project panama

eternal night
#

concerning how fast IO can be

lunar schooner
#

Yeah

#

I primarily went rust because Spring boot is just ugh

#

Compared to Actix

eternal night
#

understandable xD

lunar schooner
#

and its looking like the webserver would be receiving around 40 requests per second

#

Not sure if java would like that with the underlying logic applied on that

eternal night
#

springboot can handle that

#

no doubts

lunar schooner
#

Yeah probably, but database IO etc too?

eternal night
#

actually, let me grab my benchmarks xD

lunar schooner
#

Without hogging a crapton of memory**

eternal night
#

I am writing my bachelor thesis about basically this

#

๐Ÿ˜‚

lunar schooner
#

O.o

#

I mean, would it be interesting to include benchmarks about JNI?

#

like the difference between doing it in Java, vs Rust, with the JNI overhead

eternal night
#

Springboot handles 4000 requests (from 250 clients) totalling to 1million requests in ~58.8 seconds

#

the call performs a single CRUD postgres db query

lunar schooner
#

damn

eternal night
#

in this case a straight forward SELECT

lunar schooner
#

thats not bad

eternal night
#

yeah no, definitely not xD

lunar schooner
#

Have you tested Actix too?

eternal night
#

no xD I am comparing mainly VMs

#

so like HotSpot vs OpenJ9 vs GraalVM and GraalVM native

lunar schooner
#

ah check

#

definitely let me know the results!

eternal night
#

But like, expecting 40 req a second you could really just use spring boot

lunar schooner
#

We run quite a bit of Java stuff internally, because I wrote them all before my dive into Rust, all on openjdk

lunar schooner
#

I dont like it too much, compared to Actix

eternal night
#

Till now, openjdk and hotspot respectively provide highest throughput

#

๐Ÿ˜‚

#

Yeah the syntax is meh

lunar schooner
#

Beans left and right

eternal night
#

Yus, tho if you are most interested in a non-bean way, you could give helidon a try

#

handles the prior workload in ~45.3 seconds

#

on hotspot vm

lunar schooner
#

oh no I am sold on actix now

#

I am never again writing web apis in java ๐Ÿ˜‚

#

also, memory usage difference, its great!

eternal night
#

Oh

#

definitely

#

yes

lunar schooner
#

Running everything on Kubernetes

#

and that itself already eats memory

eternal night
#

Ye, the rust scratch docker image also has its advantages

lunar schooner
#

Oh definitely

eternal night
#

thank god for musl target

lunar schooner
#

only thing my docker images include (usually) is Alpine, the binary and libssl

eternal night
#

why even alpine o.O

lunar schooner
#

I mean, 40MB difference with Ubuntu ::"D

eternal night
#

no like, why an OS at all

#

lol

lunar schooner
#

well uh

#

I was reading about writing an OS in rust yesterday actually

eternal night
#

just statically link your rust libraries during compile

#

and you can straight up use docker scratch image and only copy the binary

lunar schooner
#

yeah fair

#

Might be a better idea

#

but eh, the images are already tiny ๐Ÿ˜‚

#

Compared to java, where you also need the JRE

eternal night
#

True ๐Ÿ˜‚ Yeah I guess the added benefit of a shell might be a valid argument for alpine

lunar schooner
#

Yeah, its definitely nice for debugging

#

sometimes when you think everything should work, it still doesnt

eternal night
#

agreed xD Only mess I personally dislike about rust (right now) is the dependency hell you are vibing in

sharp badge
eternal night
#

like, why do all tools package their own http client

lunar schooner
#

yeah fair

#

At least the async stuff is getting normalized ๐Ÿ˜‚

eternal night
#

and half of them are using outdated so you get to compile both versions

#

slowly*

lunar schooner
#

very slowly, but surely

eternal night
#

and till all the libraries are updated you get to still compile two different executors and three futures libraries xD

lunar schooner
sharp badge
#

Can you guys move the rust talk out of the spigot development channel please

lunar schooner
#

He did a couple streams on implementing ConcurrentHashMap from java to Rust, Loved it, learned so much!

eternal night
#

puching is client side

#

you won't be able to prevent that

sharp badge
#

hmm, need to find a hacky fix then ๐Ÿ˜ฆ

eternal night
#

a lot of luck for that

#

If you magically find out how to prevent client logic from server side, please let all of us know xD

sharp badge
#

Nah, im tlaking server side lol

#

maybe I could just delay the opening of that menu by a couple ticks

cold field
#

What are the benefit of rust over java?

eternal night
#

Welp for plugin development really none xD

#

unless you want headaches

cold field
#

ahahhaha

lunar schooner
#

Well uh ๐Ÿ‘€

#

Or if you want to use Actix instead of Spring BOot in your plugin ๐Ÿ˜‡

#

Downside, you need a lib for every OS

#

So I'm only supporting x86_64 Windows and Linux, I want to do mac too but I havent found an easy way to cross compile

eternal night
#

even if you do that, probably just maintain a redis cache and have your rust service separate

lunar schooner
#

yeah could do that too, but I wanted a plug-n-play solution

#

Id do that if it were an internal only thing

eternal night
#

wait, you are planning on providing a public plugin

#

that uses JNI

#

my man lost his mind

lunar schooner
#

Yep

#

๐Ÿ˜‚

eternal night
#

half the server admins cannot even setup essentials x config

#

what in the world makes you think they can handle JNI xD

cold field
#

ahhahahahahahha

lunar schooner
#

Thats why this works out of the box

#

This is the language shares right now ๐Ÿ˜‡

cold field
#

Omg

vague mason
#

The worst thing you can give to server owners is json format XD

#

most of the server owners can't even edit it

#

and still some developers use it

quiet ice
#

TOML is worse

#

It should be obvious, but it isn't obvious at all if you get in the details

lunar schooner
#

My plugin's main config is yaml, which then gets written to multiple configs, all json, for the individual components to use

#

But everything is in the yaml, so users dont have to touch the jsons

vague mason
#

yeah that is good

quiet ice
#

Also, why makefiles?

cold field
#

I would like to know what your plugin allows you to do. Is it already open source?

quiet ice
#

It likely is

#

Unless it is a random private repo on github

lunar schooner
cold field
#

Thanks

vague mason
#

Wait discord has cool banner now XD

lunar schooner
# quiet ice Also, why makefiles?

Because I have to compile multiple things, I have to compile the SCSS and TS to JS, Rust to their respective dynamic libraries (.dll on Windows, .so on Linux) and then Java itself also

quiet ice
#

ah, interesting

quaint mantle
#

how would I register a command if it's in the main class?
getCommand("example").setExecutor(new this);?

lunar schooner
#

remove new

#

just this

quaint mantle
#

ok ty

lunar schooner
#

Let me actually commit the new code in a sec, been doing quite a bit today :"D

cold field
#

How can I make pop up something like this in my own plugins (Not auto-completion just suggestion)?

vague mason
#

Madman with 61 repositories

lunar schooner
#

heh, yeah ๐Ÿ˜‚

#

Most of my recent works is in external organizations, for organization

#

so its probably like 90 by now

vague mason
#

ufff

#

Your website looks kinda lonely

lunar schooner
#

yeah, it needs some work ๐Ÿ˜‚

#

very desperately needs some work

vague mason
#

hahaha yeah XD

#

A little bit more css

lunar schooner
#

I just need to rewrite the thing

mortal hare
cold field
#

Guys, computer engineering or computer science?

main dew
#

how I can aply patch to spigot with open source?

compact haven
#

why are u editing java, rust?, typescript, and C# at the same time

lunar schooner
compact haven
#

thats

lunar schooner
#

well, all 5 or something, lost count

compact haven
#

ridiculous

lunar schooner
#

Nah

compact haven
#

whats the header file for then, not C#?

#

one of the C's

lunar schooner
#

Yeah its a C header

compact haven
#

ah

#

the C family confuses me

lunar schooner
#

I need that to get the method names for JNI, since they're...odd

compact haven
#

wots ur plugin about

lunar schooner
compact haven
#

oh

#

yeah I just saw that xd

#

oh thats a tad annoying

#

but not really since I wouldve never finished it

lunar schooner
#

On the contrary, I like the challenge JNI brings

compact haven
#

I was making a telnet in kotlin and tornadofx that used minecraft packets so u didnt need an additional port

#

but I had like 20 challenges that I didnt want to bore myself with so

lunar schooner
#

It allows me to combine my knowledge of multiple languages ๐Ÿ˜„

#

And I really want it, since accessing consoles on my Kubernetes cluster is a bit annoying rn

vague mason
#

Also your readme files are amazing

lunar schooner
#

Thanks :"D

compact haven
#

whats the rust for?

lunar schooner
#

The http protocol doc isnt fully up to date anymore, since I changed bits but, ill update them soon enoug

compact haven
#

dont know what JNI is so im misisng something

vague mason
#

Like I always just put some text and a picture and that is it XD

lunar schooner
#

Rust handles the webserver bits, and all database communication

lunar schooner
# compact haven dont know what JNI is so im misisng something

Java native interface. Allows me to call Rust methods from java and vice versa. Like I have the method java protected native static void startWebServer(String configFilePath, String databaseFilePath, String staticFilePath); in Java, which will call ```rs
pub extern "system" fn Java_nl_thedutchmc_rconsole_webserver_Native_startWebServer(env: JNIEnv, _class: JClass, config_file_path_jstring: JString, database_file_path_jstring: JString, static_files_path_jstring: JString) {

quaint mantle
#

In the config.yml how can i translate the ยง to & for color coding? Ive always used & in configs but i'm not sure how to translate it.

compact haven
#

why dont you just use java to handle the webserver lmaoo

lunar schooner
vague mason
#

ChatColor.translateAlternateColorCodes('&', "Message with &aGreen &rcolors");

lunar schooner
quaint mantle
compact haven
#

ktor ๐Ÿ‘€

twin cape
#

if you want to call a function in a different class asynchronously, can you just call it async from the main class or do you have to write the whole function async?

vague mason
#
    public static String chat(String s){
        return ChatColor.translateAlternateColorCodes('&', s);
    }
#

I made a simple method

#

that will color text

lunar schooner
#

and the application is quite multithreaded, and Rust can guarantee race conditions cannot ever happen

compact haven
#

honestly im quite limited in programming views here, only know java and kotlin, my javascript is searching w3s and applying java knowledge to it >.>

lunar schooner
#

Considering moving the TCP socket server to rust too ๐Ÿ˜…

#

Thats where I started too :"D

cold pawn
#

Hey I know I already asked this question but dose anyone know what I need to do to a pex group to make this return true?
public boolean Right(String aname) { byte b; int i; PermissionGroup[] arrayOfPermissionGroup; for (i = (arrayOfPermissionGroup = Main.get().getPex().getPermissionsManager().getGroups()).length, b = 0; b < i; ) { PermissionGroup group = arrayOfPermissionGroup[b]; if (group.getOption("land", null, "").equalsIgnoreCase(aname)) return true; b++; } return false; }

compact haven
#

I could work my way around any high-level language I think if I just took a bit to try and learn the syntax, things like C though are a bit over my head since I am shit at comp sci

quaint mantle
#

Also @vague mason what does the s mean?

vague mason
#

string

quaint mantle
#

ah ok thx

vague mason
#

like you can put anything inside it

quaint mantle
#

yea

lunar schooner
#

The compiler is extremely helpful

#

If you got an error, 8/10 times it will tell you how to solve it too

vague mason
lunar schooner
#

oh absolutely

#

thats why I never got further with C++

#

9/10 times I was fighting with the linker or the compiler

vague mason
#

hahaha

#

I never tried rust...

lunar schooner
#

Whereas with Rust, I actually can write my code! :"D

compact haven
#

right now im trying to make a personal "cdn" out of a static site using javascript to call the kotlin backend, remembering how bad I am at it though

quaint mantle
quiet ice
#

C++ is nice, but it takes a real high amount of care to not get anything in your way

lunar schooner
#

Yeah exactly.

quaint mantle
#

I prefer python over all languages B)

vague mason
#

just copy the whole method

lunar schooner
#

Rust doesnt have that, because it will tell you when you;re wrong. Its super strict on borrowing etc too, So no double frees, dangling pointers etc

quiet ice
#

Compiler/Linker was never much of a thing to worry about for me since I always wrote monoliths

vague mason
#

in Utils class or somewhere

quaint mantle
#

k

glass sparrow
#

python fun but stoopid

vague mason
#

and then just call it with Utils.chat("Message with &aColors!");

quaint mantle
quiet ice
#

Well, the main pain I had in C++ was zlib not working as intended and I could not use any other library because I was not able to know the length of the message

vague mason
#

did you put method into method?

vague mason
lunar schooner
vague mason
#

Python is like slower then human calculating with their hands ๐Ÿ˜‚

twin cape
#

if you want to call a function in a different class asynchronously, can you just call it async from the main class or do you have to write the whole function async?

lunar schooner
#

I had so many issues with that

quiet ice
#

I just compiled zlib from source, compiling from source usually does the job

glass sparrow
glossy barn
#

python devs: OMG PYTHON GO ZOOM
everyone else: python go zoom after taking 10 minutes to compile into C and then run

lunar schooner
#

I mean, my rust project also takes 10 minutes to compile

vague mason
lunar schooner
#

but at runtime, compared to python, its so much faster

vague mason
#

And also C

glass sparrow
vague mason
#

Only because Google made it

glossy barn
lunar schooner
#

Google didnt :"D

#

Google made Go and Dart

glass sparrow
#

you can make anything with python

vague mason
#

Aren't google bought Python?

glass sparrow
#

like it might not be the fastest

#

but it is very versatile

lunar schooner
#

nope, its under the Python Foundation

glossy barn
vague mason
#

Google made like 90% of Python

lunar schooner
#

That is true, yeah

glossy barn
#

Google supports and endorses it, yes. But that does not mean that they own it

vague mason
#

another spyware

#

pffuuu python

lunar schooner
#

Just like how Google really really needs the Linux kernel, but doesnt own it :"D

vague mason
#

hahaha yeah as Windows / Mac are to slow and not stable enough for servers.

lunar schooner
#

Mac is a disaster for servers

#

Windows is...okay

glossy barn
#

MacOS is essentially FreeBSD with an Apple logo shoved on top of it

#

change my mind

lunar schooner
#

but I'd avoid it

#

Running Ubuntu for everything myself ๐Ÿ˜„

glass sparrow
#

me too ubuntu on top

vague mason
#

I run ubuntu server on every server XD

lunar schooner
#

Running all my services in kubernetes, so it doesnt really matter what the base OS is though

vague mason
#

on my main computer I use POP OS which is based on Ubuntu with smoother animations and already installed latest drivers

#

just to reduce my work

lunar schooner
#

My main desktop is the last windows thing

#

Not all games support linux as nicely yet

#

(ahem, ubisoft)

vague mason
#

Never tried kubernetes ๐Ÿค”

#

I use docker containers

#

Games does support it. But anticheat doesn't XD

lunar schooner
#

If you dont need it, dont use it

#

Its tricky to set up

#

but once you got it ๐Ÿ˜ Entire network is fully HA

glass sparrow
#

so are we concluding from this convo that python is #1?

glossy barn
#

no LOL

lunar schooner
#

No. It depends

glass sparrow
#

glad we all agree

lunar schooner
#

Python is very much not #1 for e.g Kernel development ๐Ÿ˜„

lunar schooner
#

(because where are you going to run python in)

glossy barn
#

if I had an option between python and asm, i would take asm

glass sparrow
lunar schooner
#

Every language has its purpose ๐Ÿ˜„

quiet ice
vague mason
#

Python destroyed my friends

lunar schooner
#

Assembly, Im guessing

glossy barn
vague mason
#

As like 90% of programming languages are based on C

#

and Python is XYZ

#

I even wouldn't say that Python is the programming language.

quiet ice
#

Like the actual old assembly language cannot be really be used in much unless you really want real big performance

glass sparrow
#

i created my crypto trading bot in python and its helping me a lot

quiet ice
#

It simply takes too long of a time to write much in it

lunar schooner
vague mason
#

with assembly you can write like few pages of code and it won't do anything XD

lunar schooner
#

...and less mentally degrading too

vague mason
#

C is much better choice

lunar schooner
#

Usually yeah

glossy barn
#

if you want anything sophisticated with assembly, good luck

quiet ice
#

C supports assembly intrinsic stuff, so why not have both?

vague mason
#

if you are doing crypto trading bot ? XD

#

website server ? XD

lunar schooner
#

webserver C absolutely

#

See Apache

#

and NGINX too

vague mason
#

Real mans uses Nginx

lunar schooner
#

Obviously ^_^

#

Nginx ingress controller :"D

vague mason
#

๐Ÿ˜‚

#

I really need to finish password manager

lunar schooner
#

This is the best :"D

vague mason
#

what is the difference between kubernates and containers?

lunar schooner
#

So Kubernetes is a container orchestrator

vague mason
#

it seems the same to me.. does the same job XD

main dew
#

Why spigot download with website have other size how build with buildtools or build with open source?

lunar schooner
#

Say you've got a cluster of 15 servers, and you want to deploy an application (i.e container)

vague mason
#

docker containers*

lunar schooner
#

Kubernetes will make sure your container gets running on that node, gets storage set up as needed, can communicate with other Pods, etc

#

and when a node dies due to a hardware failure e.g, itll reschedule nodes

quaint mantle
#

does hypixel use kubernetes?

vague mason
#

so it will be a little bigger

lunar schooner
quaint mantle
#

are kubernetes linked using redis?

lunar schooner
#

You can use Redis for your container yep

#

but you'd need to support that in your application

quaint mantle
#

tbh i never got how docker works

lunar schooner
#

Kubernetes is just the platform ๐Ÿ˜„

lunar schooner
#

I love it

#

But as I mentioned, its not easy to get working. My kubernetes repo is around 5k lines now lol (installation scripts, manifests (like your docker compose file))

quaint mantle
quiet ice
vague mason
quaint mantle
quiet ice
#

Ah, you're talking about API jars?

lunar schooner
#

API jars you can get from Spigot's maven repos

#
            maven{ url "https://hub.spigotmc.org/nexus/content/repositories/snapshots" }
            maven{ url "https://oss.sonatype.org/content/repositories/snapshots" }
``` these two
vague mason
quaint mantle
#

imagine not having ssl

lunar schooner
#

๐Ÿค”

#

Where's you find that one

vague mason
#

Imagine not using https XD

lunar schooner
quiet ice
#

Not entirely sure why they would differ, I guess the difference in compression is the difference

vague mason
#

doesn't your browser automatically redirect you to https XD

#

bad browser XD

lunar schooner
#

Chrome doesnt :"D

quaint mantle
#

chrome doesnt

lunar schooner
#

(Domain dependent though)

vague mason
#

hahaha yeah I don't use it XD

glass sparrow
#

use brave

cold field
#

Who use brave?

#

wow

quaint mantle
#

ew no

lunar schooner
#

I use Edge :"D love it

vague mason
#

I stick with opera

quaint mantle
#

i use internet explorer 6 for mac

glass sparrow
#

i have earned $121 using brave

vague mason
#

just because of rich features

quiet ice
#

I prefer Firefox and it's forks

quaint mantle
#

good ol ie 6 for mac doesn't have any fancy features

vague mason
#

don't require any hard work

glass sparrow
#

but how much do you earn googling stuff?

cold field
#

I earn 0 ๐Ÿ˜ฆ

vague mason
#

I block every ad.

glass sparrow
#

lol

cold field
glass sparrow
#

i love ads

vague mason
#

pi hole XD

glass sparrow
#

i buy so much shit from ads

vague mason
glass sparrow
#

oop

quiet ice
#

Should've used HTTPS

glass sparrow
#

wait brave ISNT coded in python

#

i need to uninstall

dusty herald
#

HTTPS? http is where it is

vague mason
lost matrix
#

Not gonna pay hundreds of dollars for this SSL nonsense. Who needs safety anyways. You get the raw IP. Get it or leave it.

young knoll
#

Anyone happen to know what part of EntitySpider controls the wall climbing?

vague mason
glass sparrow
#

huge brain

vague mason
#

I made dark theme for Whoogle

glass sparrow
#

but i like inbuilt tor

vague mason
#

Whoogle has inbuild tor

glass sparrow
#

finna uninstall

vague mason
lunar schooner
vague mason
#

Just use CloudFlare

lunar schooner
#

I use certbot for it as frontend, with the dns-cloudflare plugin, everything is automagic

dusty herald
#

why not use letsencrypt or cloudflare?

vague mason
#

it has better certs then letsencrypt

dusty herald
#

I can run one command and hook it with nginx to generate a cert in less than a min

vague mason
#

Portainer xD

cold field
#

what it is?

vague mason
#

Web UI for docker containers

cold field
#

uh

dusty herald
#

I like using Ubuntu images for my docker containers

glass sparrow
#

EmPoo

cold field
#

....

vague mason
#

Upload kinda low

glass sparrow
#

i am sorry empee

lunar schooner
#

Commandline FTW :"D

lost matrix
glass sparrow
#

take a token of apology

vague mason
lost matrix
#

Alpine is as small as it gets regarding linux base images

vague mason
#

that's why I use it for node js applications

dusty herald
#

I just like doing it DogKek

lunar schooner
#

I dont mind the size of Ubuntu tbh. 50 MB vs 10 MB, thats nothing

lost matrix
#

nodejs... ew. Javascript backend

eternal night
#

๐Ÿ™

#

the only way to write a backend tbh

vague mason
#

just don't use node js for web back end and you are good XD

eternal night
#

nice express.js stack

dusty herald
#

and it's a barebones image so nothing is installed before hand do I can only use what I need

lunar schooner
dusty herald
#

I'm gonna develop all my backends in Java

lunar schooner
#

JS is nice, ish for frontend, But I wouldnt ever use it for backend

vague mason
#

node js is great for server -> client communication

#

discord bots

lunar schooner
vague mason
#

but don't use it for web back end XD

dusty herald
#

though I wanna learn rust

vague mason
#

My boy XD

lost matrix
#

If you want really fast startup time and native performance for your micro services then use native executable Quarkus images.

eternal night
#

I mean, JS just has this A+ tier level of JSON support for nosql databases tho

dusty herald
#

what're you gonna do when a project you want to use utilizes php for everything?

cold field
#

Why isn't php just dead?

vague mason
dusty herald
#

because it's everything supports it

vague mason
#

which is more secure

vague mason
#

but it has some problems with scalability.

dusty herald
#

thank u

eternal night
#

there is a lot of reasons as to why one would use nosql o.O

lost matrix
eternal night
#

just the fact that SQL does not scale horizontally too well

dusty herald
#

I was using Flask at some point but decided to stop using it

lunar schooner
vague mason
sage swift
#

is it possible to access/change the amount of experience a furnace has stored? the block.data.Furnace interface doesn't seem to have it

vague mason
#

multiple mysql servers*

eternal night
#

that defeats half the purpose of sql

lunar schooner
#

Its the best

lost matrix
lunar schooner
#

Ive got a 5 node cluster running atm :"D

eternal night
vague mason
dusty herald
#

I had the cursed idea of using mysql to store large amounts of json that's user specific

eternal night
#

half of graalvm native images run slower than hotspot at this point

lost matrix
eternal night
#

I know

vague mason
dusty herald
#

why no rack

vague mason
#

I still didn't build it XD

#

On the left side I have storage server and on the right side performance servers

lunar schooner
#

Only two running, but plenty spare :D

vague mason
#

Ubiquity my man

lunar schooner
#

Oh I'm ditching it๐Ÿ˜‚

vague mason
#

lol

lunar schooner
#

I dislike the USG quite a bit, swapping it out for a vyos box

vague mason
lost matrix
#

We had a point where we got a startup improvement from 1.5s to 100ms when we switched a service from spring boot to quarkus.

eternal night
#

obviously tho, startup of native graalvm is just insane

vague mason
#

it's like amazing

lunar schooner
vague mason
#

Even the topology

lost matrix
vague mason
lunar schooner
#

Oh man topology is useless

lunar schooner
eternal night
vague mason
eternal night
#

basically the future of serveless java applications

#

gonna just be native graalvm

vague mason
#

With hundreds of cables connected to everywhere

lunar schooner
sage dock
lost matrix
vague mason
lunar schooner
vague mason
#

And how can you resist the build in security system

lunar schooner
#

I run my own security system based on Pi 0s with motionEye :"D

paper viper
#

lmfao all those cameras for 1 server

#

wait actually its only a couple

#

still tho 4 is a lot xD

lost matrix
#

My security system is a dog thats afraid of its own farts...

lunar schooner
#

I run only two, scaling up to 3 soon. (Physical servers)

paper viper
#

and also who would want to use 4k cameras for security

#

at that point id be buying professional cameras (for pictures)

#

lol

vague mason
#

I don't leave a house

#

that's why I can at least watch it from cameras

mortal hare
#

amateurs

#

i havent left a house for 2 years

#

introverts rise up

paper viper
#

lol

vague mason
#

hahaha

dusty herald
#

you still want cameras tho

mortal hare
#

true introverts have a fear when someone's calling or when doorbell hits.

paper viper
#

true introverts have a fear when someone enters their room

vague mason
#

I'm also really close to have 900 movies installed on a server

dusty herald
#

I only feel dread bc it means I have to get up

paper viper
#

900?

#

what quality

vague mason
#

Full HD

paper viper
#

damn

mortal hare
#

i can't fix fucking syncing issue for 2 days

vague mason
#

4K would be to much XD

paper viper
#

lol

mortal hare
#

i know how to fix it "hacky way"

#

but the minecraft client just refuses

#

to give any info

vague mason
#

4k is like 5GB per movie or more

mortal hare
#

and says fuck you by not sending anything

#

but still setting item slots

paper viper
#

5GB only?

#

4K for a movie is like

#

it can be tens of gigabytes

vague mason
#

most of the movies are compressed XD

paper viper
#

lol

#

Hm yeah

#

ig

lost matrix
paper viper
#

Player#setOp(true) works too

vague mason
#

I have watched almost 23 days movies XD

severe wing
#

First this is just to troll a friend not on a public server, Can someone code a minecraft plugin with one-player-sleep and some sort of backdoor in it, I dont know alot about how those stuff work so if it doesnt make sense or is impossible please tell me :D

vague mason
#

308 already watched movies XD

dusty herald
#

did you watch 300 yet

vague mason
#

Another 64.6% of movies to watch

vague mason
dusty herald
#

did u like

vague mason
#

Yes

#

It was amazing

dusty herald
#

yay

lunar schooner
vague mason
#

Emby ๐Ÿ˜‹

sage swift
#

#general

lost matrix
#

Recently watched it and i must admit that it was cooler when i was younger.

vague mason
#

If anyone know any good movie let me know

#

Like I already beat Netflix in number of movies XD

#

But they have so much series

#

So I'm still behind in that part.

dusty herald
#

you should watch both kingsman movies

vague mason
#

Already did that.

#

One of my favorite movies

#

I watched those 2 yesterday.

#

They are also amazing

#

They aren't predicted that's why I like it

cerulean harbor
#

e public void onPlayerInteract(PlayerInteractEvent.getHand()) {

#

am i not allowed to do the .getHand()?

#

how else do i detect which hand is firing?

lunar schooner
#

Youre doing it a bit wrong,

#
public void onPlayerInteract(PlayerInteractEvent event) {
  ...event.getHand();
}
cerulean harbor
#

ur so smart

#

thanks

#
getHand
@Nullable
public EquipmentSlot getHand()
The hand used to perform this interaction. May be null in the case of Action.PHYSICAL.
Returns:
the hand used to interact. May be null.

is this returning a string?

#

EquipmentSlot object?

ivory sleet
#

That is not a String, itโ€™s an enum constant

#

Or it returns one

cerulean harbor
#

can i still == "right"? or do i have to .toString first?

ivory sleet
#

why not compare the constant in its enum form

#

if (getHand() == EquipmentSlot.BLAH)

cerulean harbor
#

i didnt know i could do that lol tysm this is why i come here

#

im not familliar with enums

ivory sleet
#

:]

#

any class that is declared with the enum keyword instead of the class keyword is an enum

#

some are:
EntityType
Material
EquipmentSlot
EventPriority

cerulean harbor
#

dope

#

good to know, since im about to check for material type

#

if (GatesConfig.get().getStringList("Gates UUID").equals(player.getUniqueId().toString()));
I have this implemented, but anytime the event is triggered by any player the code still runs? does anyone know why

ivory sleet
#

lol it should in principle never work

sage swift
ivory sleet
#

bruh I didnt see the semi colon

#

lol

cerulean harbor
sage swift
#

it has a semicolon

cerulean harbor
#

and it sends a message to the console for every playerinteract event

#

OH

#

THATS WHAT YOU MEANT

#

bro i stg this discord is a life saver

sharp bough
#

could someone tell me why if i add those two lines i get null instead of the item name?

#

tiers:
1:
chance: 1
items:
'1':
type: MINECRAFT:DIAMOND_BLOCK
name: 'test'
lore:
- 'testlore1'
- 'testlore2'
'2':
type: MINECRAFT:GOLD_BLOCK
name: 'test1'
lore:
- 'testlore3'
- 'testlore4'

#

current yml file

#

without those lines

#

with the lines

#

the inv is a chest

dusky lynx
#

?paste

queen dragonBOT
ornate heart
#

How would I make a map that is completely filled out?

cerulean harbor
#

how do i delay code from being run?

quaint mantle
#

runnable

#

with runTaskLater

cerulean harbor
#

will runTaskLater pause my listeners? @quaint mantle

quaint mantle
#

no

cerulean harbor
#

alright thanks

sharp bough
#

how can i change the name of mat:

                        String material = ChestDragonDrop.get().getConfig().getString("tiers." + j + ".items." + k + ".type");
                        Material mat;
                        try{
                            mat = Material.valueOf(material.toUpperCase().replace(" ", "_"));
                        }catch(Exception ignored){
                            continue;
                        }
                        //Bukkit.getLogger().info(String.valueOf(mat));
                        inv.addItem(new ItemStack(mat));
                    }```
cold pawn
#

Hey I was wondering if anyone knows what I have to do to a pex permission group to make this work?
public boolean Right(String aname) { byte b; int i; PermissionGroup[] arrayOfPermissionGroup; for (i = (arrayOfPermissionGroup = Main.get().getPex().getPermissionsManager().getGroups()).length, b = 0; b < i; ) { PermissionGroup group = arrayOfPermissionGroup[b]; if (group.getOption("land", null, "").equalsIgnoreCase(aname)) return true; b++; } return false; }

ivory sleet
#

Pro tip use luckperms

cerulean harbor
#
new java.util.Timer().schedule( 
        new java.util.TimerTask() {
            @Override
            public void run() {
                // your code here
            }
        }, 
        5000 
);

if i ran timer.cancel would it properly clean up the threads?

hollow river
#

hey guys what would be the best way to achieve things like the spigot api has (Material.IRON_SWORD) so i could make something like Mobs.CUSTOM_FARMER_ZOMBIE? that should return a custom class i made but how would i properly tackle it?

hollow river
#

i've tried but haven't gottan far with it yet, i saw that Materials. was an enum but would like to know how i can recreate that (basically have a custom class with info about custom mobs which i would like to return when calling MobsLibrary.CUSTOM_ZOMBIE)

stone sinew
ivory sleet
#

that thing is like deprecated?

#

executor api is preferred I think

hollow river
#

i don't know if i sound dumb sorry i just started yesterday, but i want to figure out how to make MobsLibrary.CUSTOM_ZOMBIE, if i explained it right

ivory sleet
#

u want a custom entity type?

hollow river
#

yeah basically, so i can store and easily call custom mobs ill be making

ivory sleet
#

well I mean :

public enum Blah {
  X
}

Blah.X then

hollow river
#

i had a system where i could just call the MobsLibrary.method which returns a class containing info about the custom mob so i can use that to spawn it later

#

yes but when i'd call blah.x from somewhere i'd want it to return a class i made if that's possible, so like x would reference a method i think?

#

just for more clarity if needed

#
public class MobLibrary {

    // Library of spawnable custom mobs based on MobEntity Class
    public static MobEntity farmerZombie() {
        ItemStack helmet = new ItemStack(Material.LEATHER_HELMET);
        ItemMeta helmetMeta = helmet.getItemMeta();
        ((LeatherArmorMeta) helmetMeta).setColor(Color.BLUE);
        helmet.setItemMeta(helmetMeta);
        ItemStack chestplate = new ItemStack(Material.LEATHER_CHESTPLATE);
        chestplate.addEnchantment(Enchantment.THORNS, 2);
        chestplate.addEnchantment(Enchantment.DURABILITY, 3);
        ItemStack leggings = new ItemStack(Material.CHAINMAIL_LEGGINGS);
        leggings.addEnchantment(Enchantment.DURABILITY, 3);
        return new MobEntity.Create(
                EntityType.ZOMBIE,
                "Custom farmer zombie")
                .helmet(helmet)
                .chestplate(chestplate)
                .leggings(leggings)
                .isAdult(false)
                .create();
    }

    public static MobEntity drunkSheep() {
        return new MobEntity.Create(
                EntityType.VILLAGER,
                "Drunk sheep")
                .create();
    }
}
#

the MobEntity class has variables and builder methods to construct the info

#
public class MobEntity {
    private EntityType entityType;
    private String displayName;
    private boolean isAdult;
    private ItemStack helmet;
    private ItemStack chestplate;
    private ItemStack leggings;
    private ItemStack boots;
#
public class SpawnLibraryMob {
    private HordeGame plugin = HordeGame.getPlugin(HordeGame.class);

    public SpawnLibraryMob(Location location, MobEntity mobEntity) {
        Entity entity = location.getWorld().spawnEntity(location, mobEntity.getEntityType());
        entity.setCustomName(mobEntity.getDisplayName());
        if(entity instanceof LivingEntity) {
            if(mobEntity.getHelmet() != null) ((LivingEntity) entity).getEquipment().setHelmet(mobEntity.getHelmet());
            if(mobEntity.getChestplate() != null) ((LivingEntity) entity).getEquipment().setChestplate(mobEntity.getChestplate());
            if(mobEntity.getLeggings() != null) ((LivingEntity) entity).getEquipment().setLeggings(mobEntity.getLeggings());
            if(mobEntity.getBoots() != null) ((LivingEntity) entity).getEquipment().setBoots(mobEntity.getBoots());
        }
        if(entity instanceof Ageable) {
            if(mobEntity.isAdult()) {
                ((Ageable) entity).setAdult();
            }
            else {
                ((Ageable) entity).setBaby();
            }
        }

        plugin.entityManager.put(
                entity.getUniqueId(),
                new EntityManager((LivingEntity) entity)
        );
    }
}
waxen plinth
#

?paste

queen dragonBOT
hollow river
#

and that's how i use the MobEntity info to spawn the mob

#

oh sorry yeah i haven't used that much

#

so now i do ```java
new SpawnLibraryMob(location, MobLibrary.drunkSheep());

to spawn a mob, but would like for it to turn into ```java
new SpawnLibraryMob(location, MobLibrary.DRUNK_SHEEP);
ivory sleet
#

I mean then youโ€™d probably do smtng like:
MobLibrary.DRUNK_SHEEP.spawn(location) assuming your enum constants can construct mob instances

hollow river
#

i'll probably do that then, but how or what would bukkit's api return when using Entity.ZOMBIE etc.? kinda curious about that

ivory sleet
#

Oh wait youโ€™re using Bukkit api only

#

Thought you used nms

hollow river
#

org.bukkit

#

what's nms?

ivory sleet
#

The server implementation

hollow river
#

i'll take a look after figuring this out

#

i dont care if i have to restructure my code btw, always up to improve and learn new things ^^

ivory sleet
#

Anyways then do smtng like this I guess:

enum LibraryMobType {
SOME_MOB(location -> {
return location.getWorld().spawnEntity(EntityType.ZOMBIE);
);

private final Function<Location,Entity> factory;

LibraryMobType(Function<Location,Entity> factory) {
this.factory = factory;
}

public Entity spawn(Location location) {
return this.factory.apply(location);
}
}

#

Yeah

#

Then in the -> { ... } would be where you define the logic of how exactly the mob is spawned

hollow river
#

i'll take a look and play around with it thanks! ^^

ivory sleet
#

No worries

vital ridge
#

Hey

#

Can anyone help me out with permanent particles?

#

Im trying to leave a trail behind

#

but I just cant figure out

#

how can i make a particle permanent

#

aka respawn it

#

Everytime it disappears

#

or just use a runnable

dusky lynx
#

Im trying to leave a trail behind
@vital ridge use the PlayerMoveEvent and spawn the particle that way

vital ridge
#

Yes ik but I need a permanent particle

#

a trail behind a player

#

I need some kind of final location of evey particle

#

and then keep respawning them

#

but I cant figure out how to do it

deft sedge
#

Hello, I'm trying to make a shaped crafting recipe but it requires multiple items in specific slots. I'm trying to think about how to do this. I tried doing it with the Recipe perpared event, but that was finickey and annoying. I was wondering if anyone had any ideas on how I could do this

dusky lynx
#

Just make a ShapedRecipe

stone sinew
vital ridge
#

I literally have an empty event and a runnable method

#
public void particleSpawner(Particle particle, Player player) {
        
        final Location loc = player.getLocation().add(0, -1, 0);
        
        new BukkitRunnable() {
            @Override
            public void run() {
                
                player.getWorld().spawnParticle(particle, player.getLocation().add(0, -1, 0), 1);
                
                
                
            }
            
            
        }.runTaskTimer(main, 0, 10);
        
        
    }
    
    @EventHandler
    public void onMove(PlayerMoveEvent e) {
        
        Particle redStoneParticle = Particle.REDSTONE;
        
    }
deft sedge
vital ridge
#

the final location is problaly wrong, its meant to be every particles location

dusky lynx
#

I did, but to my knowledge there's no way to make it so it requires more then one item per slot
@deft sedge can you not make the ItemStack your looking for bigger than 1?

vital ridge
#

The problem is, I need somehow to get every particles location and keep respawning it

#

to create a trail

deft sedge
stone sinew
deft sedge
#

@dusky lynx this is how you make shaped recipes

stone sinew
vital ridge
#

I cant figure out how to get every particle location

#

And respawn every single one of them

stone sinew
vital ridge
#

Emm

#

The location is the block player stands on

#

Tbh, i dont logically fully understand what variable i created

#

i just thought that kind of saves every blocks final location the player steps on

#

aka the trail

stone sinew
vital ridge
#

yes

#

Everytime a player moves a redstone particle gets created

#

and it never disappears

#

thats my goal

stone sinew
#
List<Location> trails = new ArrayList<>();
new BukkitRunnable() {
    public void run() {
        trails.forEach(loc -> {/* particle code */})
    }
}

public void move(PlayerMoveEvent e) {
    // Check if x y z moved
    trails.add(e.getTo());
}
```Psuedo code adjust accordingly. This can cause lag and even a memory leak so make sure to take care of memory.
deft sedge
#

Hello, I'm trying to make a shaped crafting recipe but it requires multiple items in specific slots. I'm trying to think about how to do this. I tried doing it with the Recipe perpared event, but that was finickey and annoying. I was wondering if anyone had any ideas on how I could do this

stone sinew
deft sedge
# stone sinew `PrepareItemCraftEvent`??? and check the items

yea that's the thing tho, it's really touchy like if I make the thing and instantly don't have 3 of the item in there, it won't work until i take the stuff back out then put it back in again. I just wondered if there was an alternitive, or a way to make it so that this event keeps scanning so that even if i don't put the stuff in correctly at first it will keep looking.

stone sinew
deft sedge
stone sinew
deft sedge
stone sinew
#
if(event.getAction() == InventoryAction.HOTBAR_MOVE_AND_READD || event.getAction() == InventoryAction.HOTBAR_SWAP || event.getAction() == InventoryAction.MOVE_TO_OTHER_INVENTORY) {
    event.setCancelled(true); p.updateInventory();
}
deft sedge
#

ok

#

I'll try that thanks!

stone sinew
#

๐Ÿ‘

cerulean harbor
#

can you have more than one listener per class?

stone sinew
cerulean harbor
#

yes

stone sinew
#

yes you can

cerulean harbor
#

how?

stone sinew
#

same way you listen to the other event. Add a method

cerulean harbor
#

intellij warns me that the method is never used

#

when i do that

#

but when i put it in another class with its own event handler, it works

stone sinew
#
public <className> implements Listener {
    @EventHandler
    public void onEvent(Event event) {

    }
}
```Just copy that and change `Event` to the event names. You can have as many of those methods per class as you want
ivory sleet
#

@SurppressWarnings("unused")

cerulean harbor
#

thanks

quaint mantle
cerulean harbor
#

where do i add @supresswarnings?

stone sinew
quaint mantle
#
@SuppressWarnings("unused")
void example() {

}
ivory sleet
#

Like the @brave glenHandler and @Override thing

#

Oops

cerulean harbor
#

raw

#

thanks

woeful crescent
#

Is there any way to make abstract methods with a default body in non-interface classes?

#

If not, why can you only use the default keyword in interfaces and not for astract methods in other places?

ivory sleet
#

Because in normal classes youโ€™d only define the method like any other method?

#

And the default keyword has like 3 usages

#

Itโ€™s tbf java being weird but thereโ€™s probably a sane reason behind it

#

From what I know default in interfaces were primarily made for functional interfaces

woeful crescent
#

To override a method, it has to be abstract, right? And an abstract method can't have a body. How do I make an overridable method in a regular class (or enum) that can has a default value?

#

Unless an overridable method doesn't have to be abstract?

ivory sleet
#

enum X {
Y() {
x() {
//should work?
}
};

void x() {}
}

woeful crescent
#

ok, I'll try it

#

gimmie a minute or 2

ivory sleet
#

Ye

cerulean harbor
#
public class pop implements Listener {
    @EventHandler


    public void onPlayerInteract(PlayerInteractEvent e) {
        Player player = e.getPlayer();
        if (e.getHand() == EquipmentSlot.HAND && e.getMaterial() == Material.RED_DYE && GatesConfig.get().getStringList("Gates UUID").contains(player.getUniqueId().toString())) {
            System.out.println(player.getPlayerListName() + " popped a gate");

        }
    }

    public void onPlayerEntityInteract(PlayerInteractEntityEvent e2){
        Player player = e2.getPlayer();
        if (e2.getHand() == EquipmentSlot.HAND && GatesConfig.get().getStringList("Gates UUID").contains(player.getUniqueId().toString())) {
            System.out.println(e2.getRightClicked().toString() + " was clicked");
            if (e2.getRightClicked().toString().equals("CraftPlayer{name=rocklee}") ) {
                System.out.println("reset");
            }
        }
    }

@stone sinew sorry to bother you, but i put the second method in the same class and now it isnt working

#

only the first method is

cerulean harbor
#

oh

#

do i put one above

#

every method?

stone sinew
cerulean harbor
#

BRUH

#

thanks

#

sm

stone sinew
#

np

cerulean harbor
#
addPotionEffect
boolean addPotionEffectโ€‹(@NotNull
PotionEffect effect)
Adds the given PotionEffect to the living entity.
Parameters:
effect - PotionEffect to be added
Returns:
whether the effect could be added

how do i vary intensity and duration with this?

#

i got it

#

player.setHealth(player.getHealth() + player.GENERIC_MAX_HEALTH * 1.3);
GENERIC_MAX_HEALTH isnt working, does anyone know why?

quaint mantle
#

because it doesnt exist

cerulean harbor
#

how can i get the player's max health then?

quaint mantle
velvet ember
#

the default is 20 btw if thats what you wanted

quaint mantle
#

max health

cerulean harbor
quaint mantle
#

is it?

cerulean harbor
#

i think so

quaint mantle
#

check

cerulean harbor
#

it says use GENERIC_MAX_HEALTH

velvet ember
#

thats an attribute

cerulean harbor
#

but im not sure how to do so

velvet ember
#

not a constant

quaint mantle
#

player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue();

cerulean harbor
#

ah

#

thank you

acoustic nymph
#

does anyone know the best approach for coding a parkour course timer? is a bukkit repeating task a good way? or can some server lag mess with the accuracy of the timer? I've done it in the past by logging the player's starting point using unix time and then logging the finish time and comparing them to get the amount of time spent in the parkour arena but the downside is that unix time is seconds and therefore the timer accuracy can't track milliseconds, something which I assume I could do with a repeating task but I don't know if that's the best way, just trying to figure out what the usual approach other devs go with for these kinds of timers

eternal night
#

there is epoch millis that you can use instead of unix time

sullen marlin
#

unix time is milliseconds not seconds

eternal night
#

doubt

#

"Unix time (also known as Epoch time, POSIX time,[1] seconds since the Epoch,[2] or UNIX Epoch time[3]) is a system for describing a point in time. It is the number of seconds that have elapsed since the Unix epoch,"

#

unix time is seconds since epoch

#

but no idea why you are using unix time in the first place

eternal night
#

that isn't unix time tho

#

but yeah, just use that

sullen marlin
#

' the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.'

#

you're being pedantic, it's unix time

eternal night
#

sure m8

acoustic nymph
#

ah I see, thanks guys, I'll use that and go with my old approach

eternal night
#

good luck ๐Ÿ‘

acoustic nymph
#

ty

cerulean harbor
#

is it possible to give a player poison with no flinch?

lost matrix
open vapor
#

how do i teleport a player without changing their look direction?
If I just set their direction to what it was before, it still head snaps because the client can move their head while the direction is being set

novel hornet
dusky lynx
open vapor
#

not sure how

#

setX doesn't seem to do anything

lost matrix
open vapor
#

is there any way to combat this?

jade perch
#

Smoothest way is just to set the yaw/pitch of the teleport location to this player's current yaw/pitch

open vapor
#

I'm making a teleport wand thing

jade perch
#

there are better ways, but much harder

lost matrix
open vapor
#

i'm already doing that

jade perch
#

What's the issue then

open vapor
#

the issue is that if the client moves their head during the process of setting the new position, it gets overwritten

#

for normal use, this isn't a problem

#

but for a teleport wand

#

where you are tping every second or so

#

it gets annoying

jade perch
#

The issue is, you don't have access to the player's latest yaw/pitch cause it's not sent yet

open vapor
#

yeah

#

there might be a solution using packets, but it's not that big of a deal so i'll just go with what i have now

jade perch
#

That's the better, but much more difficult way

#

imo it's not worth though

open vapor
#

yeah

novel hornet
#

How would I make collision detection system

open vapor
#

doesn't spigot already have things for that?

lost matrix
open vapor
#

are there already bbox commands or am i just confusing it with mods

lost matrix
novel hornet
open vapor
#

you can just use a fireball and then test for projectilehitevent

lost matrix
open vapor
#

oh yeah, i have an issue with raycasts lagging

#

block raycast

#

not entities

lost matrix
#

Ray casts shouldnt be that expensive if they are short. Ill write an example.

open vapor
#

what about >200 blocks

#

it's for a grapple hook thing

lost matrix
open vapor
#

oh ok

novel hornet
lost matrix
open vapor
#

you summon a fireball, give it a direction, and that makes it a projectile. when it hits an entity, it fires that event

latent depot
#

Hi so i have featherboard and was looking to add a "Time Played" part where it displays how many hours a player has played. Is there a certain plugin i need, or just something i need to add into the board.yml if so what?

open vapor
#

no, you would need to use a raycast

#

i think

heavy sapphire
#

Hey, so is there a way to do a custom hex color for chat or am I just limited to the 16 that are included in ChatColor?

quaint mantle
#

google it

#

"spigot custom hex codes"

heavy sapphire
open vapor
#

wait you're supposed to use world.raytrace?

#

i was doing blockiterator

lost matrix
#

You dont have any entity you can ray trace from... so thats the only option

woeful moon
#

What's the best way to test if your plugin is compatible with all versions?

#

Just make like 8 localhost servers?

stone sinew
lost matrix
#

There is not much you can do other than starting several servers and check if it runs on them.
But as a rule you can assume that plugins have a pretty good upwards compatability.

woeful moon
#

oh lol

alpine urchin
#

md_5 but better

#

thick md5

patent ice
severe zenith
#

How to register Listener in BungeeCord?

sullen dome
#

if you're lazy:

  getProxy().getPluginManager().registerListener(this, new Events());```
severe zenith
#

I'm actuall not, but in the Wiki isn't said how to register Listener, but how to call Events. Thanks ๐Ÿ™‚

sullen dome
#

Listeners are Events :)

severe zenith
#

โ“

#

no

stone sinew
severe zenith
#

listen

stone sinew
#

Then its the same way you would in the spigot api except you would use the bungee cord api lol and use what RealRivex wrote above.

quaint mantle
#
Bukkit.getPluginManager().registerEvents(/* Listener */, /* Plugin */);
severe zenith
#

ok, thanks

severe zenith
#

I dont recieve the Spigot Plugin Message on my BungeeCord. Can the incoming channel be equal to the outgoing channel?

this.getServer().getMessenger().registerIncomingPluginChannel(this,"my:channel",   this);
this.getServer().getMessenger().registerOutgoingPluginChannel(this,"my:channel");
eternal oxide
#

is there a player logged in to yoru spigot server?

severe zenith
#

yes

eternal oxide
#

are you using the player object to send the message or the server?>

severe zenith
#

player object

eternal oxide
#

ok good

severe zenith
#

mh

severe zenith
#

Any other idea why it isn't working?

sullen marlin
#

did you register it on bungee too

severe zenith
#

yes

#
    @Override
    public void onEnable() {
        ProxyServer.getInstance().registerChannel("bungeecord:spigot");
        ProxyServer.getInstance().registerChannel("spigot:bungeecord");
        registerCommands();
        listenerRegistration();
    }
sullen marlin
#

no idea then, when are you sending the info

severe zenith
#

on an inventory click event

narrow berry
#

Does anyone know how i can get rid of this message by accessing my bungeecord server: has connected
17:58:07 [INFO] [nick player] disconnected with: DecoderException : java.lang.IndexOutOfBoundsException: readerIndex(0) + length(1) exceeds writerIndex(0): UnpooledSlicedByteBuf(ridx: 0, widx: 0, cap: 0/0, unwrapped: PooledUnsafeDirectByteBuf(ridx: 2769, widx: 4028, cap: 8192)) @ io.netty.handler.codec.MessageToMessageDecoder:98

lost matrix
#

Also what version are you on?

narrow berry
#

Stack trace? , I am in a version compatible with the server version 1.16.4

lost matrix
#

Is there more than just this line?

#

In the console

narrow berry
#

No

#

There is only this

lost matrix
#

Try deleting the player data file.

narrow berry
#

On bungeecord or on the main server?, I have a network of server

#

I have exactly 6 server plus bungeecord for combining 7 servers

severe zenith
#
public class SettingsCommand extends Command {

    private final HashMap<String, Setting> settings;

    public SettingsCommand(String name, HashMap<String, Setting> settings) {
        super(name);
        this.settings = settings;
    }

    @SuppressWarnings("deprecation")
    @Override
    public void execute(CommandSender sender, String[] args) {
        if (!(sender instanceof ProxiedPlayer)) {
            sender.sendMessage("Dieser Befehl kann nur von Spielern ausgefรผhrt werden.");
            return;
        }
        ProxiedPlayer player = (ProxiedPlayer) sender;
        Setting setting = settings.get(player.getName());
        if (setting == null) {
            settings.put(player.getName(), new Setting());
            setting = settings.get(player.getName());
        }

        player.getServer().getInfo().sendData("bungeecord:spigot", setting.getArrayOutput("Settings"));
    }
}

All is working so far, but when I enter the settings command and an other player is online, the message is send with the player that was online first. Anything wrong in my code?

prime nimbus
#

how do i set the tab complete to false if a player dosent have a permission? i looked though the docs but it seems like due to some recent changes with the client the event is not fired

severe zenith
#

just implement TabCompletor and return an ArrayList with arguments

eternal oxide
#

command tab complete is sent when the player joins.

#

for args tabComplete you control that

prime nimbus
severe zenith
#
public class ExampleCommand implements CommandExecutor, TabComletor {
    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        return false;
    }

    @Override
    public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
        if (!sender.hasPermission("example.permission")
            return new ArrayList<String>; //return an empty List
        return null;
    }  
}

this should work. if the sender does not have the permission, he wont get completes.

prime nimbus
#

oh well i wanted to learn it but i guess this works too๐Ÿ˜…

#

thanks

severe zenith
#

^^

severe zenith
eternal oxide
severe zenith
#

HashMap.get doesn't changes the player.

#

Or am I wrong?

eternal oxide
#

I'd probably make your settings field private static

#

The CommandSender will always be the issuer of the command.

#

So look elsewhere for the problem

#

eg. debug the senders name

eternal oxide
prime nimbus
#
    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        return false;
    }

    @Override
    public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
        if (!sender.hasPermission("example.permission")) {
            sender.sendMessage("no");
            return new ArrayList<>();
        }
        sender.sendMessage("yes");
        return null;
    }

it dosent sent "yes" or "no" when using tab complete

ivory sleet
#

you should return

#

not send message

#

return Collections.singletonList("yes");

#

etc

prime nimbus
#

oh

severe zenith
eternal oxide
#

Also as I said earlier TabComplete does not trigger on the command, only args of that command

ivory sleet
#

Assume you're implementing both TabCompleter and CommandExecutor, then in principle just implement TabExecutor @severe zenith

#

it extends both TabCompleter and CommandExecutor

#

sadly PluginCommand#setTabExecutor isnt a thing yet

prime nimbus
ivory sleet
#

do you have the permission ?

prime nimbus
#

nope

ivory sleet
#

and you still return that empty arraylist ?

#

do you set the completer?

eternal oxide
#

Do you have teh permissions for the command itself?

prime nimbus
#

yes

eternal oxide
#

does the command come up in the tab complete?

#

silly autobot

#

?paste your command class so we can see what you are doing

queen dragonBOT
prime nimbus
#

thats the entire code

ivory sleet
#
class Main extends JavaPlugin {
  public void onEnable() {
    getCommand("somecommand").setCompleter((sender,cmd,label,args) -> {
      if (!sender.hasPermission("x.x")) {
        return Collections.singletonList("no");
      }
      return Collections.singletonList("yes");
    });
  }
}```
this should work fine
eternal oxide
#

ok your issue is you are using a generic onCommand

prime nimbus
#

i dont understand

eternal oxide
#

um, still it shoudl work

ivory sleet
#

Seems like you need to learn the fundamentals of java frankly.

#

And stuff like naming conventions.

eternal oxide
#

In yoru main class you don;t need to specify CommandExecutor, TabCompleter as they are already implemented in JavaPlugin

prime nimbus
#

okay, i removed them

eternal oxide
#

You are returning false in the onCommand so its never going to execute your tab completer

prime nimbus
#

i removed that too

eternal oxide
#

return true not false

quaint mantle
ivory sleet
#

probably no need to, gc is good

prime nimbus
prime nimbus
eternal oxide
#

So long as your command is correct in your plugin.yml it should now work.