#help-development

1 messages ยท Page 1456 of 1

eternal night
#

usually not no

#

not spigot internally at least

#

obviously the network setup outside might have fun with the server

weak berry
#

Yeah

#

least now i know somethings wrong with my programming and not spigot lol

#

Thanks ๐Ÿ‘

tranquil viper
#

how would I make a timer that resets every second

granite stirrup
#

maybe add 1 to a variable every tick and if its is 20 reset it to 0?

tranquil viper
#

nvm

#

i figured it out

granite stirrup
#

lol

tranquil viper
#

thats a good idea though

#

xd

left swift
#

How can I continue color from prefix to player name using scoreboard teams? I mean team.setPrefix(ChatColor.RED) and i want to make player name in red color (without team.setColor() method)

granite stirrup
#

this might work but i dont know public boolean ping(String ip, int port) { boolean online = false; Socket s = new Socket(); try { // if this does not fail it would mean server is online s.connect(new InetSocketAddress(ip, port), 10); s.close(); online = true; } catch (IOException e) { /* offline */ } return online; }

#

i never done sockets before

#

so dont count me on that one

tranquil viper
#
int j = (arrayOfPlayer1 = Bukkit.getOnlinePlayers()).length;```
#

what should I do

#

I get an error but I need it to be an Array

torn oyster
#

are minigames hard to make

#

cuz it seems i've made a few

#

not the most experienced person

#

but im not too sure what a minigame really needs

eternal night
#
final Player[] players = Bukkit.getOnlinePlayers().toArray(new Player[0]);
#

if you really need an array

tranquil viper
#

ok bet

#

thanks

eternal night
#

why

granite stirrup
#

idk

eternal night
#

neat xD

tranquil viper
#

didnt decompile just trying to learn spigot again cause its been a fat minute

#

working on old projects

#

from like 5 years ago

#

and just trying to update them

granite stirrup
#

lmao

eternal night
#

but yeah, if you wanna have an array list you could go ```java
List<Player> arrayList = new ArrayList<>(Bukkit.getOnlinePlayers());

#

tho like, if you are just iterating both of those conversions are useless

solemn shoal
#

can anyone figure out whats wrong with this config path (spigot.yml)?

eternal night
#

what xD

solemn shoal
#

entity-activation-range.wake-up-inactive.villagers-max-per-tick

eternal night
#

ah

solemn shoal
#

for some reason trying to read that value (using YamlConfiguration) yields in a null

eternal night
#

I mean, the activation range is set on a per world basis

granite stirrup
#

wtf it took 1 min loading 6 recipes

#

XD

solemn shoal
#

ah

#

right

eternal night
#

so the default one would be world-settings.default.entity-activation-range.wake-up-inactive.villagers-max-per-tick

granite stirrup
#

[23:17:19 INFO]: [MyPLugin] SERVER STATUS: ONLINE

welp my plugin detected my server is online

ivory sleet
#

Might wanna use the java ServerSocket or something better with netty

granite stirrup
#

lmao

eternal night
#

I mean, socket can be both really

#

it doesn't specify what end of the TCP communication it is sitting

granite stirrup
#

i tested this and it works XD public boolean ping(String ip, int port) { boolean online = false; Socket s = new Socket(); try { // if this does not fail it would mean server is online s.connect(new InetSocketAddress(ip, port), 10); s.close(); online = true; } catch (IOException e) { /* offline */ } return online; }

eternal night
#

oh, you are being the client

ivory sleet
#

Idk the exact scenario but ServerSocket would arguably more scalable assuming you might want to see check more than just a single server as any amount of connections can sort of be made in to a ServerSocket. Tbf I dont use java net anyways so not really relevant probably.

granite stirrup
#

yes

eternal night
#

for the flex

ivory sleet
granite stirrup
#

i love ? and :

#

cuz u could do someBool == true ? "yes" : "no"

#

really nice feature i like

eternal night
#

or you just do someBool ? "yes" : "no"

granite stirrup
#

oh

eternal night
#

because lets face it, comparing booleans with other booleans basically just means, please look at java tutorials xD

granite stirrup
#

well i knew that u could do if (someBool) i didnt know it applied to the ? :

eternal night
#

Ah xD yeah it just takes a boolean. No matter where that comes from

granite stirrup
#

idk if theres a thing to convert a bool to a string with yes and no

#

they probs is

#

idk tho

eternal night
#

Yes, Boolean.toString

granite stirrup
#

lmao

eternal night
#

your ping method might be problematic tho

granite stirrup
#

probs

#

idc what its called tho

eternal night
#

no like, you close the socket after a potential exception throwing method

granite stirrup
#

oh

#

what?

eternal night
#

like, s.connect might throw an IOException

#

if that happens, s.close() is never called

#

which prevents the socket from closing

granite stirrup
#

oh so do i need to close it?

#

in the catch

eternal night
#

yes, but that is what you have either finally or try-resource blocks for

granite stirrup
#

how do i use try-resource?

eternal night
#
private boolean isResponding(final String host, final int port) {
    try (final Socket socket = new Socket()) {
        socket.connect(new InetSocketAddress(host, port));
        return true;
    } catch (IOException e) {
        return false;
    }
}
dusk flicker
#

Id recommend just using a finally

eternal night
#

why ?

dusk flicker
#

Just my preference

random epoch
#

Try resource auto closes

eternal night
#

ah

granite stirrup
eternal night
#

ye

granite stirrup
#

do u know what i should call it instead of ping cuz idk if its the right word

#

maybe i could call it isOnline idk

eternal night
#

Yeah, isReachable, isResponding

#

all of those are fine

granite stirrup
#

oh k

eternal night
#

I mean isOnline is neat too

ivory sleet
#

wat

quaint mantle
#

or smth

#

or

ivory sleet
#

its alr in twr

quaint mantle
#

ok

#

twr meaning try catch?

#

explain

eternal night
#

twr = try with resources

#

a socket implements autocloseable

quaint mantle
#

ok

eternal night
#

and is automatically closed at the end of the try block

cold tartan
#

What is the replacement for this?

Objective objective = board.registerNewObjective("Stats", "dummy");
eternal night
#

replacement in what way ?

granite stirrup
#

i didnt know that u could have a array of interfaces

#

lmao

cold tartan
#

its depreceated @eternal night

granite stirrup
cold tartan
#

english is the shittiest crappiest language for spelling

eternal night
#

board.registerNewObjective("identifierName", "criteria", "My awesome display name")

granite stirrup
eternal night
#

you can also read javadocs to find out more ๐Ÿ™‚

#

?jd+

#

?jd

eternal night
#

thanks cafebabe

#

tho I must admin, spigot tends to sometimes have some rather interesting deprecation notices

cold tartan
worldly ingot
#

i think most, if not all, deprecations are justified

eternal night
#

I mean, something like a method reference would help here and there

#

tho with how little people actually read those ๐Ÿ˜ฆ

#

maybe not

worldly ingot
#

sometimes there aren't replacements ;p

#

deprecations don't necessarily mean that something is to be removed

eternal night
#

True xD Best message is the map id thing

granite stirrup
#

i mean deprecated things doesnt mean it will break things

eternal night
#

just like deprecated, this is trash API, works anyway but welp you do you please use different things

#

which is absolutely correct just kinda fun

granite stirrup
#

most deprecated things is old tho

eternal night
#

Or super new ๐Ÿ™‚

granite stirrup
#

well yeah but most are old

eternal night
#

true

granite stirrup
#

lmao it took me forever to hook into papi cuz i kept getting null pointer still dont know the problem but i fixed it xD

#

i probs did something wrong in the code

eternal night
#

never worked with papi ๐Ÿ˜ฆ ยฏ_(ใƒ„)_/ยฏ

granite stirrup
#

i just have this giant class that main extends

#

XD

#

very messy

#

does getServer().getIp() return the actual ip of the server

eternal night
#

Well the bound IP

#

which like

granite stirrup
#

ah my bound ip is 0.0.0.0 i think

eternal night
#

yea

granite stirrup
#

which is localhost i think

tranquil viper
#

how do I catch multiple exceptions for one try statement?

eternal night
#

Yeah, I mean tbh half of the day you have a proxy infront anyway

#

just multiple catches

tranquil viper
#

i get an error though

eternal night
#

give it a quick google

tranquil viper
#

thats why im confused xd

granite stirrup
tranquil viper
#

i tried that aswell

#

get an error

granite stirrup
#

shouldnt give u a error

#

what error

tranquil viper
eternal night
#

LOL

#

I mean

#

you cannot catch what isn't thrown

tranquil viper
#

but it just threw it

eternal night
#

where

granite stirrup
tranquil viper
#

heyyyyy

#

you know what

#

its been 5 years

eternal night
#

xD

tranquil viper
#

i thought

#

...

eternal night
#

oh

#

oh no

#

xD

#

yeah

tranquil viper
#

lMFAO

eternal night
#

that exception wraps the null pointer exception

#

when something in your listener fails

#

won't show up inside the listener itself

granite stirrup
#

he probs got a nullpointer in there

tranquil viper
#

wait im confused again now

granite stirrup
#

whats in ur listener

eternal night
#

Yeah you are just getting a nullpointer exception somewhere in your listener

tranquil viper
#

im joking

#

shh

eternal night
#

if your scroll down a bit in the exception there should be a Caused by:

tranquil viper
#

i know what im doing

eternal night
#

ah ๐Ÿ˜‰

tranquil viper
#

xd

eternal night
#

perfect

tranquil viper
#

yea its classcast

#

which i was catching

#

but it happened in a different method

#

and i didnt notice

#

it was in a different one

#

xd

cold tartan
#

for some reason im getting this message

warm galleon
#
GRANT ALL PRIVILEGES ON 'typing_gamedb'.* TO 'typing_game' @'%';

It says im doing something wrong? anything obvious?

eternal night
#

are you registering them on the main scoreboard ?

cold tartan
#

this is how I initialized the test team:

Team test = board.registerNewTeam("Test");
        test.setPrefix(ChatColor.GOLD + "[Test] ");
cold tartan
eternal night
#

like

#

there is a space

#

between username and the @

#

which should not be there

eternal night
cold tartan
#

oh wait

#

i got it

#
Scoreboard board = manager.getMainScoreboard();
#

i made that my board

#

rather than this:

Scoreboard board = manager.getNewScoreboard();
eternal night
#

yea

#

the scoreboard commands operate on the main scoreboard

warm galleon
#

idk why it adds a space

eternal night
#

Hmm, idk if you need the quotes around your db name

warm galleon
#

lmao

eternal night
#

if I had to guess that messed up the regex that is the .*

#

tho, don't quote me on that

granite stirrup
#

i heard that the skript parser is just regex is that true?

eternal night
#

I mean, might be might not be. In the end it could very much just be regex under the hood

#

tho that isn't too much of an issue

#

the parser in skript is not the issue either when it comes to speed lol

granite stirrup
#

skript parser is really slow lol

eternal night
#

But it runs once

#

and then it is good

#

like, they don't do any just in time loading afaik

granite stirrup
#

well doesnt it run it again when u reload scripts and load scripts

eternal night
#

so after the startup they have an IR of the skript anyway

#

Well yes, but like that doesn't affect the runtime

granite stirrup
#

i meant its slow reloading and loading and such

eternal night
#

yea xD Tho in production that shouldn't really happen too much

cold tartan
#

I can't figure out why this prefix doesn't work

Team test = board.registerNewTeam("Test");
test.setPrefix(ChatColor.GOLD + "[Test] ");
#

the team works, just not the prefix

granite stirrup
#

it is regex

#

LMAO

cold tartan
eternal night
#

neat lol

granite stirrup
#

skript

eternal night
#

not your issue. That seems fine tho tbh

granite stirrup
#

the parser

#

is just regex

eternal night
#

I don't see why that shouldn't work

cold tartan
#

i mean it works in the tab menu

granite stirrup
#

and a bunch of checks

cold tartan
#

just not in chat

granite stirrup
#

like 20

#

checks

eternal night
#

are vanilla team prefix send in chat o.O

cold tartan
#

oh wait no

eternal night
#

Then why would that work xD

cold tartan
eternal night
#

idk xD

#

Maybe it is

cold tartan
#

no i got it

granite stirrup
#

the skript parser is like 1886 lines long

#

XD

cold tartan
#

i didn't realize that in vanilla the chat isn't affected by prefix

eternal night
#

is it not

cold tartan
#

im pretty sure

#

cuz i made a team thru the normal way

#

and it didn't do the chat thing

#

so

eternal night
#

did you give it a prefix

#

tho

cold tartan
#

yep

eternal night
#

ah. Well I would personally suggest your own chat handle anyway xD

granite stirrup
#

theres a massive bug in mc that crashes servers from the inside

cold tartan
#

ya, i prob will

granite stirrup
#

did u know that

#

its all caused by one item

#

lmao

eternal night
#

huh ?

granite stirrup
#

map markers

#

;-;

eternal night
#

oh that

granite stirrup
#

they crash the server

#

if u have to many

#

cuz it sends to much packets

eternal night
#

But the client cannot create those in vanilla no ?

granite stirrup
#

someone had ALOT of markers

granite stirrup
eternal night
#

like, the 3d ones with a crazy ton of layers

#

oh

#

that is sad

granite stirrup
#

theres a dupe glitch for markers

#

it was to do with nether portals

#

i believe

#

they crashed the worlds biggest anarchy server

#

with it

eternal night
#

seems like an easy thing to prevent tho

granite stirrup
#

not really

#

someone made a map thats had like 100k markers and it lowered ur fps like to 0

#

and if u hold it

#

it kicks u off the server

#

XD

eternal night
#

Yeah but can't you limit those packets

granite stirrup
#

actually its like a ban

#

i think

#

it keeps kicking u

#

if u hold the map

#

apparently someone developed a mod to disable them so they dont crash

wraith rapids
#

yes you can limit the packets

#

the thing about anarchy servers just is that they don't want to do that because they're dumb like that

#

it's not an issue and it's not a problem

eternal night
#

you can probably also cap the amount of decorations applicable to a map on the server no ?

#

the server needs to process that too

wraith rapids
#

the only way to make it into a problem is by actively not fixing it

eternal night
#

yeah

granite stirrup
#

i thinK

eternal night
#

well yea that is a trash patch

granite stirrup
#

cuz they could just do more markers

wraith rapids
#

worst possible patch

granite stirrup
#

and still crash the server

#

probs

wraith rapids
#

interferes with normal gameplay

#

and doesn't even solve the issue

granite stirrup
#

yeah its a crazy thing in mc tho

#

and it should be fixed really

#

cuz imagine people using this on real servers thats not no rules

wraith rapids
#

nothing new and not the most pressing or blatant issue that has been lying around and causing issues

#

at least they patched the treasure maps crashing servers one in 1.17, allegedly

#

villagers still suck

#

portals still suck

granite stirrup
#

i wouldnt think something like a map so harmless crashing servers XD

wraith rapids
#

the entire game is a dumpster fire

quaint mantle
#

Can I make intellij run a command in the terminal after I've hit package in maven's lifecycle thing

paper viper
#

what command are you running after?

quaint mantle
#

I need to just run a simple batch

granite stirrup
#

wait intelij has a terminal

quaint mantle
#

yup

drowsy helm
#

yes so does every ide

#

lol

granite stirrup
#

ive just been using cmd

#

to build my project

#

XD

drowsy helm
#

if you're using maven theres a maven icon in the top right

#

you can click to build

granite stirrup
#

i like typing the command since u get responses from it

#

that might be helpful

#

XD

drowsy helm
#

you still get a response

#

its literally just a shortcut for maven commands you still ahve to type them

granite stirrup
#

i like doing mvn package since it gives everything

wraith rapids
#

i like maven because i clicked package 5 minutes ago and it's still at "scanning for projects"

granite stirrup
#

?

wraith rapids
#

looks like it just got to resources

#

time to go make some coffee

granite stirrup
#

and u probs have faster pc than me

wraith rapids
#

this machine can't even run pisscord

granite stirrup
#

lmao

#

i thought u would have a good gaming pc

#

what its just bad apple

#

oh wait

#

wrong one

#

wait no

#

its bad apple

#

;-;

paper viper
granite stirrup
#

lol

granite stirrup
#

idk how tho

gentle yacht
granite stirrup
gentle yacht
#

no

paper viper
#

Thats not fake at all lol

#

It's pretty cool too

granite stirrup
#

how do u know

paper viper
#

Because I made it too

granite stirrup
#

it cant be that high quality tho

gentle yacht
#

it can be because its black and white

paper viper
#

^

#

With color, it's a bit slower

#

one of the disadvantages with maps however is that it sends a ton of bandwidth to users

#

and it would lag for latency

wraith rapids
#

why is it so bandwidth heavy anyway

paper viper
paper viper
wraith rapids
#

it's just a few pixels with shitty color depth

paper viper
#

ยฏ_(ใƒ„)_/ยฏ

wraith rapids
#

how can that possibly fucking use so much bandwidth

granite stirrup
#

maybe they coded it shit

paper viper
#

who?

wraith rapids
#

well it's mojang so that's a given

paper viper
#

lol

granite stirrup
gentle yacht
#

video streaming is always really high bandwidth

sullen marlin
#

well back when I did it there was no compression

#

but nowadays there's compression so idk

granite stirrup
#

lmao

paper viper
#

i saw your old video

granite stirrup
#

md_5 why are u here

paper viper
#

cause he made a plugin before iirc

#

very long ago

#

that played videos on a map i think

sullen marlin
#

it was pretty bad, but good for the time

paper viper
#

Yeah

gentle yacht
#

for reference, the bad apple video is on a 7x7 display at around 30fps, 4:3 res

granite stirrup
#

md_5 why are u jumping into the conversation randomly

gentle yacht
#

and it uses around 10 mbps

sullen marlin
#

try decreasing the compression threshold in server.properties

#

might be able to shave a lot of bandwidth off

#

though maybe the plugin is sending whole frames>

paper viper
#

I didn't know that

gentle yacht
#

hmm, i havent touched that before

sullen marlin
#

my plugin only sent changed columns

paper viper
#

That'd be interesting to look at

gentle yacht
#

yes, it is sending entire frames, i thought that would be more efficient instead of a ton of smaller updated rectangles

#

especially for video

paper viper
#

Banana carried me with all that nms coding

#

lol

granite stirrup
#

u could split the video into a cells and then send updated cells

paper viper
#

hard to manage

#

idk if VLC supports that either

granite stirrup
#

whats vlc

paper viper
#

vlc media player

granite stirrup
#

why do u need that lmao

paper viper
#

You can use that in Java

sullen marlin
#

my approach was basically to just only send updates if more than a few pixels in the column changed

paper viper
sullen marlin
#

produced some artifacting, but helped a lot

gentle yacht
#

interesting

granite stirrup
sullen marlin
paper viper
#

bro sotp asking stoopid questions idkid

sullen marlin
#

the only major example of the artifacting is the cats shadow shouldnt be there

granite stirrup
granite stirrup
sullen marlin
#

basically just didnt deal with horizontal lines well

#

I'm sure you can do better these days

granite stirrup
#

it looks streched

gentle yacht
#

do you remember if you updated each column individually with a packet?

granite stirrup
#

and pixelated (but then again its mc lmao)

sullen marlin
#

iirc each frame was a packet, and the packet allowed you to only send select columns

gentle yacht
#

and do you know approximately how much bandwidth you managed to save by updating the columns only?

sullen marlin
#

packet format has changed since I did this

gentle yacht
#

it hasnt changed too much with the update area so far

#

right now it lets you update a rectangle of any size

sullen marlin
#

oh I also rendered all the packets in advance

#

cause it also used a lot of server cpu

granite stirrup
#

why does the pillagers always face me

#

even in creative

ivory sleet
#

@paper viper did u put a gh link in the docs?

#

Else might wanna do that heh

paper viper
#

Oh for mml?

#

Yeah maybe lol

ivory sleet
#

Ye

drowsy helm
paper viper
#

i forgot about that lol

granite stirrup
#

wait can u do everything without nms

paper viper
#

?

granite stirrup
#

i meant can u do things in nms without it

paper viper
#

iirc, youtube actually uses an algorithm which only checks for changes in pixels (pixels are the same if they are the same before)

granite stirrup
#

like is there ways to replicate it

#

but it isnt nms

sullen marlin
#

render a map? sure

paper viper
#

Yeah

granite stirrup
wraith rapids
#

video compression is its whole own branch of science

paper viper
#

cause there are a lot of changes in pixels from the falling snow

sullen marlin
#

worth reading up on how jpeg works

granite stirrup
#

yeah utube can make a 5gb file maybe to like 30kb

sullen marlin
#

though you'll need at least 2 years of university calculus to appreciate it

paper viper
#

it only stores the differences in pixels

drowsy helm
wraith rapids
#

not just differences

drowsy helm
#

isnt jpeg relatively bad now

granite stirrup
#

yeah utubes compression is really good

#

u dont even notice a difference

wraith rapids
#

there are dozens of different ways you can compress a video stream and the best algorithms are mixes of them all

sullen marlin
#

@drowsy helm same principle is used for H.26X, mp3 etc at the core

paper viper
#

Yeah

granite stirrup
#

only really in dark areas

sullen marlin
#

jpeg is just an easy example

granite stirrup
#

jpeg sucks

#

no transparency

sullen marlin
#

this video probably does an ok job

#

havent watched it though

granite stirrup
#

md_5 ignores me lmao :(

eternal night
#

I'd do too

paper viper
#

me too

granite stirrup
#

lmao the old mario where it was limited to like 30kb or something like if u took a screenshot of the game it would be bigger than the game itself XD

drowsy helm
#

i havent seen a computerphile video in years lmao

paper viper
#

i remember watching Computerphile for learning dithering

#

error difussion dithering

#

which is it's own separate topic too

cyan bluff
#

Using PlayerCommandPreprocessEvent, how can I check if the command is valid?

#

(1.16.5)

sullen marlin
#

?xy

queen dragonBOT
paper viper
#

I was wondering

#

Would entity name tags use a lot of bandwidth?

#

Cause entities and using nametags are also another way for playing videos (which will be updated constantly)

drowsy helm
#

i think its a 1 time thing that gets cached

paper viper
#

ic

sinful raptor
wraith rapids
#

asking is forbidden

granite stirrup
#

fuck my discord logged me out on the web

#

hang on

paper viper
#

good

granite stirrup
#

i need to get my 2fa code

wraith rapids
#

and this is why i prefer ripcord

#

no hassle

#

you just click and you're in

#

just like god meant credentials to be

granite stirrup
#

k im logged in

sinful raptor
#

bruh is anyone gonna help me\

granite stirrup
#

ยฏ_(ใƒ„)_/ยฏ

sinful raptor
#

no i cant

#

i tried

#

im stupid

granite stirrup
#

then ur out of luck

opal juniper
#

Donโ€™t come here lmao

granite stirrup
#

m8

wraith rapids
#

then pay someone money to do it for you

#

and do it somewhere else

sinful raptor
#

bruh this is help developenmt

wraith rapids
#

yes

#

we help you develop things

sinful raptor
#

yeah

wraith rapids
#

not we help you by developing things

sinful raptor
#

can u help me

wraith rapids
#

write it

sinful raptor
#

m

#

ok

#

I have idea

wraith rapids
#

if you have a question about writing it, ask it

#

we won't write it for you

granite stirrup
#

we dont write shit for u

#

u have to write the shit

sinful raptor
#

help me set up the thing like whith the packages on the sides

#

thats what i dont get

granite stirrup
#

bruh

wraith rapids
#

package what

granite stirrup
#

learn the ide ur using

sinful raptor
#

look at the vid

wraith rapids
#

i don't have the effort

sinful raptor
#

'D

wraith rapids
#

send an image

sinful raptor
#

oki

granite stirrup
#

@sinful raptor ur making me loose brain cells

sinful raptor
#

cant add image

wraith rapids
#

link the image

sinful raptor
#

uhh how

sinful raptor
#

just go to vid and then go to 1:03

wraith rapids
#

no

sinful raptor
#

PLZ

#

its easy

wraith rapids
#

goodbye

sinful raptor
#

NOOO

ivory sleet
drowsy helm
#

:buoobuoo:

opal juniper
vital tiger
#

gosh darn why is nuvotifier dependency not available :/

sinful raptor
#

the things on the side

drowsy helm
#

have you made a project yet

opal juniper
#

Packages are basically folders

sinful raptor
#

no i haveny

opal juniper
#

Well, make a project

sinful raptor
#

yeah but I want to know hot to set it up

granite stirrup
#

new feature ๐Ÿ‘€

ivory sleet
#

Pog

sinful raptor
#

ill send you a picture of what I have

opal juniper
#

Oh I

#

Ok

granite stirrup
#

my phone charges pretty fast

#

its been like 5 mins and its already 11%

granite stirrup
#

actually maybe it was like 2 mins

#

i didnt keep track of time

#

i like just put it on charge

wraith rapids
#

i'm using youtube mobile on desktop because the new material layout or whatever it's called is super fucking slow

ivory sleet
#

Then mine charges unbelievably slow

granite stirrup
#

its actually faster

ivory sleet
#

Did you know you can turn off pings for replies

granite stirrup
#

because it turns on all time and i dont want to keep turning it off

ivory sleet
#

Uh does it? Weird not for me

granite stirrup
granite stirrup
wraith rapids
#

it did turn off repeatedly at some point

granite stirrup
wraith rapids
#

but it's been quite a while since

#

idk if that's been patched

#

haven't used pisscord for ages

ivory sleet
#

What do you use now? Still rip one?

granite stirrup
#

after i send my message it turns on

wraith rapids
#

yeah

granite stirrup
#

whats pisscord

wraith rapids
#

discord

#

aka shitcord

granite stirrup
#

lmao

#

arent u using discord rn

#

LMAO shitcord is a thing

#

XD

wraith rapids
#

no

#

i'm using ripcord

granite stirrup
#

isnt that discord

wraith rapids
#

no

#

it's a discord client written from scratch in like c or something

granite stirrup
#

ah is there anyway to lower this i added 1 command 1 placeholder and its like 16.4kb

wraith rapids
#

you're probably shading in your mom

granite stirrup
#

im not shading anything in

#

the classes folder is 28kb

#

lmao

#

apparently its 60kb on disk

wraith rapids
#

that means that there are many small individual files

granite stirrup
#

most files arent more than 4kb

#

6kb

#

lmao

wraith rapids
#

usual sector size is 4kb so anything smaller than 4kb is going to use 4kb on disk

#

in flatfile, anyway

granite stirrup
#

well yeah but the real size is no bigger than 6kb

#

of each file

wraith rapids
#

compression is different

granite stirrup
#

i also removed the meta-inf completely

#

since i didnt need it

#

the precious bytes im saving from that

#

is quite alot LOL

#

no but its legit all my classes in the jar

#

no shaded things

#

16kb is pretty small tho

#

im saving 2kb from deleting the meta-inf using a thing in maven

ancient plank
#

I cry when I update a dependency and get an error about manifests

granite stirrup
#

yeah but i dont need the manifest

#

like when do u ever need it

ancient plank
#

I'm gonna be honest my brain is too small to really know what it does kekw

granite stirrup
#

me either

ancient plank
#

I just add one when I get an error or smth

granite stirrup
#

omg

#

my world generation in mc just almost generated a penis in the ocean

#

half of a penis

#

in the ocean

#

LMAO

#

thats natural world generation for u

vagrant stratus
#

Gotta finish it m8

granite stirrup
#

LOL

#

my code for my plugin is dumb

past glen
#

so I stole borrowed this code for launching a projectile but e.damage doesnt work, what do I use instead? ```@EventHandler
public void onPlayerInteract(PlayerInteractEvent e) {
if (!(e.getAction() == Action.RIGHT_CLICK_AIR)) return;

    if (!(e.getItem().getType() == Material.DIAMOND_HOE)) return;

    Fireball f = e.getPlayer().launchProjectile(Fireball.class);
    f.setIsIncendiary(false);
    f.setYield(0);
}

@EventHandler
public void onEntityDamage(EntityDamageByEntityEvent e) {
    if (e.getDamager() instanceof Fireball) {
        Fireball f = (Fireball) e.getDamager();
        if (f.getShooter() instanceof Player) {
            Player shooter = (Player) f.getShooter();
            if (shooter.getItemInHand().getType() == Material.DIAMOND_HOE) {
                e.damage(10.0);
            }
        }
    }
}```
granite stirrup
tranquil viper
#

question:

if ((e.getAction().equals(Action.RIGHT_CLICK_AIR) || e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) && StaffMode.sm.contains(p))
granite stirrup
#

Discord is introducing a brand new channel type which can be used on Discord Servers. It has been in the works for over a year, and is finally being tested on some communities across Discord. This channel is called โ€œThreadsโ€ which act like temporary channels in which people can talk in for a select period of time. These channels have the permiss...

โ–ถ Play video
tranquil viper
#

works when clicking in the air

#

does not when clicking blocks

past glen
tranquil viper
#

its does it twice

granite stirrup
#

i think mc only calls interactevent on blocks and not air

tranquil viper
#

you think its cause of off hand?

granite stirrup
tranquil viper
#

when i right click a block it says "vanish enabled" then "vanish disabled"

#

im 99% sure its cause of off hand

#

how would I check if it is just the main hand

sage swift
#

PlayerInteractEvent#getHand

tranquil viper
#

yea ik that

#

but like

#

how do I check if its the main hand

#

and not the off hand

granite stirrup
#

i think

tranquil viper
#

join general 1 i can ss

sage swift
#

PlayerInteractEvent#getHand

granite stirrup
#

ยฏ_(ใƒ„)_/ยฏ

tranquil viper
#

ahh

sage swift
#

and it gets called for blocks and air

tranquil viper
#

ok thank you

sage swift
#

as well as redstone components such as pressure plates

granite stirrup
#

im dumb

tranquil viper
#

welp it still dont work

#

i have an idea now that I know its EquipmentSlot though

#

thanks

#

@quaint mantle can you join vc

#

real fast

#

so I can show you what it's doing

#

dang ok

wraith rapids
#

as if explaining code on vc was any easier than it is in text

tranquil viper
wraith rapids
#

send an image

tranquil viper
#

imma just download gyzago

#

1s

wraith rapids
#

use == to compare enum constants

tranquil viper
#

k

granite stirrup
#

i use .equals for everything almost lmao

#

.equals compares the object right and == compares the memory ?

#

i forgot

tranquil viper
#

I still have the same issue

sage swift
#

he didnt say it would fix it

tranquil viper
#

where did that go

#

wat

granite stirrup
#

the bot probs deleted it

tranquil viper
#

where

#

am I missing them

granite stirrup
#

ยฏ_(ใƒ„)_/ยฏ

wraith rapids
#

== test identity equality

granite stirrup
#

u dont need {} sometimes

wraith rapids
#

aka reference equality

#

equals tests equality

tranquil viper
#

I understand Im missing them but I dont see where xd

wraith rapids
#

for example, two Integers may be equal, they have the same value

#

but they may still be 2 different objects

tranquil viper
#

ah

#

that actually makes sense

wraith rapids
#

in such a case .equals would return true and == false

granite stirrup
#

k

wraith rapids
#

most notably it's a noob trap with Strings

#

"abc" is equal to "ab" + "c"

#

but not ==

#

because appending c to ab creates a new String object

tranquil viper
#

so anyone know why then xd

granite stirrup
#

so does .equals compare content?

wraith rapids
#

that is one way of describing it

#

equals compares the objects, == compares the references

granite stirrup
#

k

ivory sleet
#

a == b is true iff a is b (from NNY lol)

granite stirrup
#

so will "abc".equals("ab" + "c") be true or false?

ivory sleet
#

true

wraith rapids
#

true, because "abc" is equal to "abc"

granite stirrup
#

is there a ===?

wraith rapids
#

not in java

#

in some languages === stands for == and == for equals

#

or vice versa

granite stirrup
#

ah it should be like .equals in java or something lmao

ivory sleet
#

I wish java had === and == lol

granite stirrup
#

lol

#

same

ivory sleet
#

hmm ye

granite stirrup
#

i think === should be .equals in java signifying that it is more accurate than ==

ivory sleet
#

I think
javas == should be === (strict)
and
javas .equals should be just ==

#

oops

wraith rapids
#

accurate is subjective

granite stirrup
#

than ==

wraith rapids
#

whether what is more accurate than what depends on what you're looking for

granite stirrup
#

i guess

wraith rapids
#

== is perfectly accurate in that it never returns incorrect values

granite stirrup
#

but i still think there should make .equals ===

wraith rapids
#

someone could implement equals improperly and it could return incorrect values for comparisons

#

but it still depends on what you're measuring

#

if you're measuring reference equality, == is accurate

#

if you're measuring object equality, equals is accurate

granite stirrup
#

well i still think === should be .equals

cyan bluff
#

How can I detect if a command in the event PlayerCommandPreprocessEvent is a valid command?

quaint mantle
#

[Irrelevant response] I mean.. does it matter?

ivory sleet
#

Bukkit#getPluginCommand(PlayerCommandPreprocessEvent#getMessage()#split(" ")[0]) != null or smtng

#

lol

quaint mantle
#

testing against null

#

dangerous ๐Ÿ™‚

granite stirrup
#

no it isnt

#

null is kinda everything but nothing at the same time lol

ivory sleet
#

cuz Server#getPluginCommand is nullable obv

granite stirrup
#

if (plugin.getCommand("command") != null) wouldnt this work lmao

ivory sleet
#

ye

#

or I mean

#

that asserts whether ur plugin has a command with the name "command"

granite stirrup
#

cuz u probs gonna give events access to ur main file instance XD

ivory sleet
#

Server#getPluginCommand uses the CommandMap as its lookup

granite stirrup
#

what does the # even do in java

quaint mantle
#

I still stand by my point, who cares if they enter an invalid command? ๐Ÿ˜„

ivory sleet
#

Itโ€™s just javadoc syntax

#

But basically that the methods belongs to that class

#

N137 ye probably xy issue

granite stirrup
#

why not just do Bukkit.getPluginCommand?

ivory sleet
#

I use Server to make it more object oriented but ye Bukkit class works too

granite stirrup
ivory sleet
#

Assuming no idiot set a custom server with Bukkit#setServer

granite stirrup
#

lmao

paper viper
ivory sleet
#

That was basically done in a core plugin which bamboozled like all of their other server plugins then they asked for support

#

Idk

paper viper
#

o

#

lol

granite stirrup
#

it might be there so then the bukkit loader thing can set it?

ivory sleet
#

Yeah

#

I would argue for that a setter shouldnโ€™t be exposed and instead letting Bukkit reflectively set the server instance

#

The api is anyways non extendable in most cases

granite stirrup
#

its sad that nms is not cross version

#

idk if thats a word

ivory sleet
#

๐Ÿฅฒ

granite stirrup
#

XD

wraith rapids
#

it's the way it is intentionally

granite stirrup
#

yeah but it sucks

#

ass

ivory sleet
#

Itโ€™s kinda yucky ye, I mean we have a decent api so thatโ€™s kinda nice

granite stirrup
#

u wanna make a plugin with nms that works everywhere bam most of your dreams are ruined

wraith rapids
#

use a multi module project

#

or reflection

granite stirrup
#

i mean u can bypass that but

#

i mean it isnt easy

ivory sleet
granite stirrup
#

i think nms should be able to be distributed

#

maybe not modified

wraith rapids
#

even if it wasn't relocated into a different package for each nms version, you still couldn't build against multiple versions at once

granite stirrup
#

but atleast make things with it

wraith rapids
#

because you can't depend on multiple versions of the same artifact at once

paper viper
#

^

wraith rapids
#

you'd still need a multi module project or reflection

#

or use the fucking ide to import all of the server jars ever made like one golden fucknugget

granite stirrup
#

i still dont get what reflection does it look for a class for whatever version you have

wraith rapids
#

reflection is the ability of code to look at itself

ivory sleet
#

Technically mojang could have included an api for their server implementation for cross version compatibility although I guess itโ€™s not in their interest.

paper viper
#

dont use reflection for this still lmao

wraith rapids
#

reflection is when code is able to look in a mirror and see what code has been written

paper viper
#

it gets super messy

#

if you use reflection for this

#

like extremely

granite stirrup
#

i dont use nms anyway

#

i try to avoid it really

ivory sleet
#

Found out lambda method factory is fast so thatโ€™s pog

wraith rapids
#

for example I could programmatically look at all of the methods declared in a given class, or on a given object

ivory sleet
#

or if itโ€™s was meta factory idr

granite stirrup
#

its sad that u cant upload anything that has nms in it

wraith rapids
#

you can but you're liable to get craftbukkit'd

#

generally though nobody cares

paper viper
#

nms is very powerful

granite stirrup
#

well i mean everything in bukkit might use nms lol

#

well yeah but i only avoid it cuz its hard to implement it with cross version in mind

wraith rapids
#

cross version is gay anyway

#

there is next to zero reason to be on anything but latest

granite stirrup
#

most servers run 1.8 or 1.12.2

#

lmao

wraith rapids
#

no

granite stirrup
#

thats why u have to support it

wraith rapids
#

less than 8% of servers are on 1.8

#

only like 2 or 3% are on 1.12

granite stirrup
#

no

#

most run 1.12.2

#

hypixel does on some of there minigames

wraith rapids
#

someone pull up the stats

ivory sleet
#

Hypixel runs 1.7 but they have a custom software

granite stirrup
#

no some of there minigames is 1.12.2

paper viper
#

Uh 1.12? what the fuck

wraith rapids
#

1.16.x accounts for like more than 75% of all servers

ivory sleet
#

So their situation is hugely different as opposed to using public available software

paper viper
#

who uses 1.12

wraith rapids
#

literally nobody uses 1.12

paper viper
#

lol

wraith rapids
#

except some mods i guess

granite stirrup
#

everyone uses 1.12

wraith rapids
#

1.12 is even more unpopular than 1.8

#

and that's at 8% already

past glen
#

so I have code to shoot a wither skull from my wither staff item and to shoot a dragon fireball from my dragons fury item, the wither staff works but the dragons fury does not, whats wrong? ```@EventHandler
public void onPlayerInteract(PlayerInteractEvent e) {
if (!(e.getAction() == Action.RIGHT_CLICK_AIR)) {

        if (e.getItem().getItemMeta().getDisplayName().equals(ItemManager.wither_staff.getItemMeta().getDisplayName()))
        {

            WitherSkull f = e.getPlayer().launchProjectile(WitherSkull.class);
            f.setIsIncendiary(false);
            f.setYield(0);
        }

        if (e.getItem().getItemMeta().getDisplayName().equals(ItemManager.dragons_fury.getItemMeta().getDisplayName()))
        {

            DragonFireball d = e.getPlayer().launchProjectile(DragonFireball.class);

            d.setIsIncendiary(false);
            d.setYield(0);
        }
    }
}

@EventHandler
public void onEntityDamage(EntityDamageByEntityEvent e) {
    if (e.getDamager() instanceof WitherSkull) {
        WitherSkull w = (WitherSkull) e.getDamager();
        if (w.getShooter() instanceof Player) {
            Player shooter = (Player) w.getShooter();
            if (shooter.getInventory().getItemInMainHand().getItemMeta().getDisplayName().equals(ItemManager.wither_staff.getItemMeta().getDisplayName())) {
                e.setDamage(10.0) ;
            }
        }
    }
    if (e.getDamager() instanceof DragonFireball) {
        DragonFireball d = (DragonFireball) e.getDamager();
        if (d.getShooter() instanceof Player) {
            Player shooter = (Player) d.getShooter();
            if (shooter.getInventory().getItemInMainHand().getItemMeta().getDisplayName().equals(ItemManager.dragons_fury.getItemMeta().getDisplayName())) {
                e.setDamage(10.0) ;
            }
        }
    }
}

}```

granite stirrup
#

i seen alot of 1.12 servers

ivory sleet
granite stirrup
#

than 1.16

candid galleon
#

@past glen use pastebin please

#

or a paste website

wraith rapids
#

i don't care what you've seen

#

the statistics don't lie

granite stirrup
wraith rapids
#

somebody pull up the stats page so we can bury this stupid debate already

candid galleon
#

what's your source @granite stirrup ? other than "ive seen alot"

wraith rapids
#

"hypickle uses it"

candid galleon
#

good source ๐Ÿ‘

#

link?

ivory sleet
wraith rapids
#

thank you

candid galleon
#

@granite stirrup that "website" just has a picture on it

granite stirrup
#

but i seen like every singLe server on a serverlist site and its all 1.12.2

candid galleon
#

it has no actual data that's presentable

#

this guy's a troll ๐Ÿ‘Œ

granite stirrup
#

idk i seen loads of 1.12.2

wraith rapids
#

at least the 1.8 people have a decent excuse

#

1.12 is literally pointless

ivory sleet
wraith rapids
#

you have like, what, pre-flat materials

granite stirrup
#

1.12 is the best one for performance lmao but still has most of the features u want

wraith rapids
#

not really

#

i want waterlogging

#

building underwater shit without waterloggable stairs and shit is cancer

sage swift
#

no you doooooont

granite stirrup
#

add it then

sage swift
#

why so many on .4

wraith rapids
#

now do paper vs spigot

sage swift
#

lol

granite stirrup
#

anyway my server is 1.14.4

wraith rapids
#

lmao why

granite stirrup
#

i meant 1.14.4

wraith rapids
#

that is even more fucked up

#

1.14 is the worst performing modern version

sage swift
#

yeah

granite stirrup
#

let me tell u why

sage swift
#

you really should be using 1.14.1

granite stirrup
#

let me tell u

ivory sleet
#

Why 1.14 lol

wraith rapids
#

it's possible that 1.14 is the worst version in the history of the game

sage swift
#

1.14.4 has all these unnecessary bugs that are fixed in 1.14.1 ๐Ÿ‘

granite stirrup
#

1.16.5 uses to much memory lmao and it crashes my server

wraith rapids
#

๐Ÿคก

granite stirrup
#

my server pauses

sage swift
#

lol that just means that you have it set up incorrectly

granite stirrup
#

it uses over 1.6gb of ram

#

;-;

#

i only have 1.46gb

sage swift
#

OMG!

wraith rapids
#

you don't know what "uses" means

sage swift
#

1.6 GB!!

#

hwo could mincreajrift do dis!

granite stirrup
#

and the server dies when it goes over

wraith rapids
#

i'm currently running a 1.16.5 server with less than 1gb of memory

#

i have 150+ plugins installed

paper viper
#

idkid how old are you

wraith rapids
#

including multiverse, towny, dynmap and mcmmo

granite stirrup
#

no im not kidding

#

Its using alot of memory

wraith rapids
#

it isn't

granite stirrup
#

it is

wraith rapids
#

you just can't read the values right

granite stirrup
#

no its legit on the panel

wraith rapids
#

you probably don't even know what the difference between the heap and native memory is

#

you are looking at numbers and going omg they are big when you don't even know what they mean

granite stirrup
#

bro i readed the numbers on memory usage on the panel it went over 1gb

wraith rapids
#

yeah the panel doesn't know shit

#

and you don't know shit either

granite stirrup
#

;-;

wraith rapids
#

anyway, 1.14 is literally the worst version

#

it has the worst performance, the most gamebreaking issues and crashes and bugs

#

it doesn't have support

#

it doesn't have any useful features over 1.13

sage swift
#

but muh pillagur

wraith rapids
#

or any advantages compared to 1.15

sage swift
#

und i dont wan beez!

shrewd totem
#

yuh villagers > beeeez

paper viper
#

if you use fucking 1.9, 1.11, 1.14, 1.15 any of those cursed versions

#

you should go die in a hole

sage swift
#

1.10 is great though

wraith rapids
#

like i can somehow vaguely get 1.15

paper viper
sage swift
#

oh youre serious

#

what

ivory sleet
#

Factions hence 1.8 is good cuz tnt is optimized and 1.8 pvp

#

๐Ÿท

paper viper
#

Lol

wraith rapids
#

the nether changes and some underlying world system changes in 1.16 can be a dealbreaker for some people

sage swift
#

one point ate is my favrit vershun

paper viper
#

1.17 new updates are going to help push more people over too

wraith rapids
#

but i don't really think anybody would run 1.15 seriously

#

1.17 is going to break so much shit

granite stirrup
#

maybe its cuz i was using paperspigot 1.16.5

wraith rapids
#

like holy fuck

paper viper
#

from lower versions

wraith rapids
#

paper hasn't been called paperspigot for like 5 years

paper viper
#

yeah that is true its going to break shit lol

wraith rapids
#

and paper works fine

paper viper
#

java 16 right

shrewd totem
#

pvp elitists wont budge

wraith rapids
#

muh tnt cannons

#

muh 25cps

granite stirrup
#

yeah but when i did paperspigot 1.16.5 it went over 1gb of ram and it was like 1.9gb

wraith rapids
#

yeah and that's not an issue

sage swift
#

omg 2 gb of ram

#

how will i survive

wraith rapids
#

if you don't want it to go over 1gb, restrict it to 1gb

granite stirrup
#

i only have 1.5gb of ram

sage swift
#

in 2021