#help-development

1 messages · Page 2284 of 1

noble lantern
#

i guess

inland axle
#

yeah just note that the whole process is encrpyted and the trust is derived from the certificate which the client needs to have ahead of time

noble lantern
noble lantern
#

if someone wants to backdoor at least let them do it securly lmao

flat leaf
#

It's really great when every answer to your question is "you should have known how this API worked" like man I'm asking a question for a reason

inland axle
flat leaf
#

obviously I've already looked into the shit I'm working with before coming here to ask questions

#

I guess tbf it's not always obvious that everyone does that because some don't, but it's just very annoying

#

sorry this turned into a rant I will stop now

noble lantern
# inland axle wdym

idk why i found this funny asf, and now i wanna refactor my error handling system to be called "Tantrums"

wet breach
# inland axle wdym

trust can be derived in other ways other then a certificate. Which can be queried between each other. as long as everything matches up accordingly trust can be obtained

#

you don't necessarily need a cert ahead of time, having the cert just makes it faster on the verification process

noble lantern
#

Well both servers need the HTTPS keys

#

or else connection cant occur

#

but thats obvious

inland axle
noble lantern
#

IIRC for client socket libary im using for https connections i only need the ssl pub key

inland axle
#

probs should use tls btw

wet breach
#

for the initial connection yes pub key works

#

the initial connection, still isn't secure, because you still have no idea on who the client is

#

so, first step is a secure connection, then verification

#

if verification doesn't happen you terminate the connection 🙂

noble lantern
#

How tf do browsers get SSL connections without doing all this

wet breach
#

because browsers are not identifying themselves

noble lantern
#

oh

inland axle
wet breach
#

the connection is secure, and the browser verifies you are connecting to the appropriate server

#

however, the server isn't verifying who is connecting

noble lantern
#

So for wss keypairs would i just share the same keypair with both servers for SSL connections?

wet breach
#

no

#

The server would hold the private key

#

er, the client

#

the server gets the public one

noble lantern
#

host server gets private right

wet breach
#

just like with browsers, you need the public key to verify who the other person is

noble lantern
#

weird cause this code looks like its sending a entire keypair

inland axle
#

yeah over ssl a whole symetric keypair is made through some math bs

wet breach
#

^

#

if I recall, the client comes up with a key and the server comes up with a key and they exchange

inland axle
#

but the trust is derived from the client trusting certificate X and the server having the private key for Certificate X

#

the server still doesn't know who tf the client is untill some other form of auth is done tho

wet breach
#

well that is how the client can verify the server, for the server to verify the client it is the opposite way around 🙂

inland axle
#

yeah

#

the client could have some sort of passcode

wet breach
#

isn't encryption fun 😄

noble lantern
#

for now im just gonna keep running my sockets in ws ill worry about making SSL sockets on deployment

Gonna start on cert system tho not gonna be fun

inland axle
#

yay meth math

noble lantern
#

gonna need some meth for this ngl

#

Setting up a google oauth server was aids enough

wet breach
#

ironically, the best one is weed

inland axle
wet breach
#

meth would get you too hyped up and you wouldn't be able to process stuff

inland axle
#

coding while meth

noble lantern
wet breach
#

weed slows everything down so your brain can process it even if you don't understand it. Brain just like goes AH I know this

noble lantern
#

i work better with hype

#

i listen to hardstyle while coding

#

the zyzz music

#

lmfao

inland axle
noble lantern
#

yeah thats not an option

#

each game server is an actual game instance

wet breach
noble lantern
#

true

wet breach
#

fortunately, you don't necessarily need to understand it yourself, your brain just does

inland axle
noble lantern
#

it took my a lot of careful thinking and thought processing for this auth server and i still dont have the JWT signing done

#

I needed the proxy before i setup jwt signing tho

wet breach
#

not sure if you have had one of them moments where things just click and make sense, but at the same time you really don't know why

serene onyx
noble lantern
#

or bypassing

#

whatever tf they did

#

cracking would take centuries lmao

wet breach
noble lantern
#

unless someone has a quantam pc in theyre basement

inland axle
noble lantern
#

dont call me out like that

#

cause it is lmao

wet breach
#

well from time to time, SSL ends up with weaknesses. You can't really call them bypasses either

#

hence why we have different SSL versions

noble lantern
#

I might not even run my sockets in ssl idk

#

i might just encrypt my payloads

inland axle
#

hence why we use tls

noble lantern
#

easier

#

idk wtf tls is lowkey but ill pretend like i do

wet breach
#

its basically ssl

#

but over unsecure connections

noble lantern
#

Couldnt i just setup a packet processor and encrypt my packets

#

and that be the same thing as ssl

wet breach
#

what do you think https is

inland axle
noble lantern
#

yeah but idk if it did anything special on top of that under the hood

#

cause i already encrypt my actualy json data fields

inland axle
#

https can use either tls or ssl

noble lantern
#

but the entire json data string itself isnt

#

so my servers pass

{ action: "shdjahkda" } like so lmfao

#

also frost

#

x509 isnt native java lib?

wet breach
#

x509 is a standard

noble lantern
#

examples i found online dont import hm

wet breach
#

java should be able to handle it

noble lantern
#

oh i think i accidentally used the bouncycastle cert lib

#

oops

wet breach
#

lmao

noble lantern
#

bruh all example are bouncy castle

#

ah

#

cause they not publicly documented

#

so bouncy castle does it for you lame

#

lmfao java sucks

#

jdk 16 privates x500Name

flat leaf
#

some people are just incredibly elitist for no reason

somber cliff
#

I don't know how to do it

#

I will give you access of the server can you fix it for me my server is bedrock + java edition server on aternos

noble lantern
noble lantern
#

example of what i mean

inland axle
noble lantern
#

not my fault x509 is all fucky in jdk16

#

man i love piccocli

flat leaf
#

I'll take that over condescending remarks in response to every question I ask after a 7 hour shift at work lol

noble lantern
noble lantern
fast path
#

That

noble lantern
#

Can you explain what you mean

fast path
#

I want to place it

noble lantern
#

by letting a place place a block?

fast path
#

uh

noble lantern
#

Cause i mean

fast path
#

I have a item

#

I want it replace to water

#

when place

#

but

#

in nether

noble lantern
#

on interact -> get location -> getBlock().setType()

fast path
#

that will work when I do like set type etc

noble lantern
#

yeah should work

fast path
#

but

#

water in nether should disapeear

noble lantern
#

i dont think it will remove it when setting its type in nether

#

yes for Place events

fast path
#

PlaceEvent will work?

noble lantern
#

well nvm cause

#

it would break if you place a block nearby i beileve

#

youll have to try and see

#

and no

#

Interact

#

its an ItemStack (i assume, ie not a block item)

fast path
#

Water won't update if you place nearby

#

That like only check when place

noble lantern
#

like said try it and see

#

If it doesnt work youl have to setup a handler for canceling the evaporation event

#

not sure if an events called for that

#

one moment

fast path
#

setblock

#

there're some water

#

oh k

#

my spigot restore, so maybe this

solid jungle
noble lantern
# fast path

Checked on another plugins source and it looks like all they do is setType

#

so maybe it wont update

fast path
#

I'm trying playerinteractevent

noble lantern
fast path
#

cancel -> setItem to waterbucket

noble lantern
solid jungle
noble lantern
#

getWhoClicked()

solid jungle
#

oh k

fast path
solid jungle
noble lantern
#

use

#

?javadocs

solid jungle
#

kk

noble lantern
#

?jd-s

undone axleBOT
noble lantern
#

^

noble lantern
#

what does it do?

fast path
#

this is a fake water

fast path
#
        if (e.getAction() != Action.RIGHT_CLICK_BLOCK) return;
        if (ItemUtil.equals(water.get(), e.getItem())) {
            Objects.requireNonNull(e.getItem()).setType(Material.WATER_BUCKET);
        }
#

in playerinteractevent

noble lantern
#

not a block...

#

use BlockPlaceEvent then

fast path
#

uh

noble lantern
#

that water item is a block

#

not an item

fast path
#

will that change it?

noble lantern
#

Should try it and see im not a compiler lol

But blocks fire BlockPlaceEvent last

fast path
#

anyway let me test

#

ok it weird more

#

It just placed the block and my item become water bucket

noble lantern
#

show the entire event

fast path
#
@EventHandler
    public void interact(BlockPlaceEvent e) {
        if (ItemUtil.equals(water.get(), e.getItemInHand())) {
            Objects.requireNonNull(e.getItemInHand()).setType(Material.WATER_BUCKET);
        }
//        if (ItemUtil.equals(lava.get(), e.getItem())) {
//
//        }

    }
noble lantern
#

?paste

undone axleBOT
noble lantern
#

use that pls

fast path
#

It useless because only shortcode

noble lantern
#

your not cancelling the event

#

you need to cancel THEN set type

#

and remove -1 from players inventory of the placed item

fast path
#

It should let water gone in nether

noble lantern
#

You need to handle that water yourself

fast path
#

ok..

#

But I'm finding a way

#

to let player place

#

something

noble lantern
#

If theres water in the nether you need to keep a referance to where that source block is

#

Because its not a natural occuring thing

#

also if you place water

#

you should call a state update and let the water flow (As it will just stay in the one block) unless thats intended effect

And the same when you remove it, call a block update to allow the water to drain as it seems it wont handle itself

Unless spigots doing something to prevent setType = water in the nether

fast path
#

But I don't actually know what method is right click etc.

noble lantern
fast path
#

Uh

#

in my mean

#

I don't want player place it.

#

It shouldn't be gone

noble lantern
#

i know...

#

that repository is a plugin that allows placing of water in the nether

#

you can see in theyre code how they handle it

#

or just yoink theyre code for it

#

this looks like its the right class

fast path
#

same

noble lantern
#

also if your not sure BlockFromToEvent is basically a state change of a block when it changes types

#

careful using it sometimes its ridiculously spammy

#

but for your use its fine

fast path
#

Hey I think

#

There's a better way

#

But

#

I don't know what's method of it

noble lantern
#

well you could just cancel interact/place

#

and set type to water

#

i said that a few times i guess you missed it or something cause code you showed never cancelled those actions

fast path
#

My idea is
listener interact -> cancel -> setItem to water_bucket -> PlayerInteractManager right click to place

noble lantern
fast path
#

something etc

noble lantern
#

ik why this code didnt work

#
  1. im stupid
#

your setting the type of the ItemStack in the players hand

#

not the actual Block

#

You need to get the location of the placed Block and then setType on the Block

#
  • you need to cancel the event
fast path
#

That won't let water gone

noble lantern
#

because you need to handle that water yourself...

fast path
#

Water will handle by minecraft

#

but I think only on place

noble lantern
#

yes

#

it should only be on place

#

hence why you CANCEL the place event

fast path
#

I'm trying simulation a place by player

noble lantern
#

and THEN set the placing locations block type

#

omg

fast path
#

So I look into PlayerInteractManager

buoyant viper
#

my favorite activity is hitting invalidate caches and restart in intellij

noble lantern
# fast path So I look into PlayerInteractManager
@EventHandler
public void onPlace(BlockPlaceEvent e) {
    if (e.getBlock().getLocation().getWorld != World.Environment.NETHER)  return;

    // implement better item checking
    if (e.getItemInHand().getType() != Material.YOUR_MATERIAL) return;

    e.setCancelled(true);
    // remove one from players inventory from item in hand

    e.getPlacedBlock().setType(Material.WATER);
}
#

its the same thing for interact if you use interact you just need to change a few things around

noble lantern
buoyant viper
#

for something so good it fuks up so much

noble lantern
#

Is it really even good then

buoyant viper
#

sadly

noble lantern
#

throw new Tantrum("sigh");

#

i dont make syntax exceptions

#

so idk what you typed

#

)"

zenith gate
#

I just had a thought, can stack sizes be server sided? Such as a chest can I set the max stack size to let’s say 512. Or is this only with mods?

noble lantern
#

You can modify the stack sized past 64, its just they are buggy client sided

#

anything over vanilla stack sizes is rly buggy client sided

#

eg if you have a stack of pickaxes, pick it up in inventory, and place it back it will only place back one

#

leaving the rest of the stack on your cursor

zenith gate
noble lantern
#

it will still do the same in a chest

#

its all around buggy in any gui when over default stack size

river oracle
noble lantern
#

Yeah lore is best way to handle it

zenith gate
#

Okay, so couldn’t there be a method in a chest for when you click on the item it would give you a stack and keep the other 400 items stacked together in there. And then use another for adding item you’d shift click them into the chest and it gets stacked. Would that fix everything being buggy? As you only being allowed to take out a stack at a time.

noble lantern
#

So like inventory has 400, you click it and it gives the player 3 * 64 of that?

river oracle
#

You'd have to add event handling

noble lantern
zenith gate
river oracle
# zenith gate Yeah

I'd like to stress you can't actually have stacks of above 64 you need to add lore or something and handle it

zenith gate
noble lantern
river oracle
#

So no point in doing it that way

noble lantern
#

Yep, but if you have it in a inventory with a event handler and the player isnt draging it around it would be fine

river oracle
#

I guess

noble lantern
#

Just clicking it will be fine if its like a storage system but IMO

#

any number over 100 is messy

#

99*

#

makes guis look blah cause number spacing looks weird

#

especially once you get past 999 oml

#

so gross

zenith gate
#

Oh lol never thought of that haha

noble lantern
#

Like y2k said lores and pdc gonna be your cleanest method more than likely

plus players would like that more more than likely

zenith gate
#

Well instead of that you can just make the item one, keep everything stored in a persistent data container then in the chest only show max of 64 but the item meta would show all the items you actually have.

noble lantern
#

I think it would look nicer if it was only one item

#

and it showed amount in lore

zenith gate
#

So you would see 64 items in the chest but then hover over it and see 2000

#

Wouldn’t that mess up the shift clicking tho?

#

And only take out 1 at a time?

noble lantern
#

well not rly

#

you can be like

#

if right click

#

take 32

#

if left click

#

take one

#

if shift click take 64

#

if shift right click take 9 stacks

river oracle
#

This gives me a plugin idea ima make it tommorow

zenith gate
#

Yeah and just make an event for every action

noble lantern
#

It might already exist if i think of what it is haha

#

Yep pretty much

zenith gate
river oracle
#

I have no free resources yet I need to put some out

#

I want to post premium plugins when I can get around to it

zenith gate
rough drift
#

running setExceptionHandler on the current thread does nothing, why's that? (onEnable function)

errant narwhal
#

can someone help how to get Build Path of bukkit 1.19?

quaint mantle
#

My brain hurts trying to figure this out... i've been on about this for 30 mins now... can someone please tell me why "&" still appears in the hex colored msgs when i use this function and how i can fix it...

public static String hex(String message) {
        Pattern pattern = Pattern.compile("#[a-fA-F0-9]{6}");
        Matcher matcher = pattern.matcher(message);
        while (matcher.find()) {
            String hexCode = message.substring(matcher.start(), matcher.end());
            String replaceSharp = hexCode.replace('#', 'x');

            char[] ch = replaceSharp.toCharArray();
            StringBuilder builder = new StringBuilder("");
            for (char c : ch) {
                builder.append("&" + c);
            }

            message = message.replace(hexCode, builder.toString());
            matcher = pattern.matcher(message);
        }
        return ChatColor.translateAlternateColorCodes('&', message);
    }
lost matrix
peak depot
quaint mantle
#

like just for instance lets say if i have a hex gradient going from blue to orange saying "test"

i want it to show the gradient without having a random "&" sign in the middle of every letter...

#

So it actually just shows that gradient..

#

I would send a picture of what im talking about with my issue

#

but i cant upload photos

buoyant viper
quaint mantle
#

cant not on windows

buoyant viper
#

??

quaint mantle
#

oh wait

#

i thought u meant like downloadi t

#

hold up

buoyant viper
#

i mean i know for a fact that lightshot is on windows and mac last i checked, not sure abt linux

peak depot
#

replace the & with §?

quaint mantle
#

checking 1 sec

#

and it works

#

tysm <3

peak depot
#

np

quaint mantle
#

we are not about to go on about the fact how i literally forgot the replace method existed..

#

even though i've used it like 50 times through out that function..

lost matrix
quaint mantle
#

what is that

iron glade
#

What is the best method to check for a player being afk? Cause when using the PlayerMoveEvent it would trigger when someone hits him and it would say they are not afk anymore

buoyant viper
peak depot
#

never touch a working system

quaint mantle
#

Ohhhhhh that is what u mean'

iron glade
#

Tbh I don't like components too

buoyant viper
#

did the system ever really work in the first place

lost matrix
# buoyant viper

Lol. The messages in Minecraft are natively components.
Using Strings is a dirty hack.

quaint mantle
#

oki i c well that makes a bit more sense now

errant narwhal
#

it no longer have JavaPlugin

iron glade
#

imagine using bukkit

buoyant viper
#

just use spigot-api, its basically bukkit

quaint mantle
#

or purpur

iron glade
#

ikr

#

imagine your server needs 20+ sec to boot

lost matrix
quaint mantle
#

ngl if ur not using purpur or paper u literally have 0 knowledge on how to run a good server

#

and then it will just fail

#

well unless if ur making a 1.8 pvp practice server...

errant narwhal
quaint mantle
#

which is kinda... terrible... but some people make their own server jars none the less.

peak depot
#

just use buildtool there you get the spigot api

lost matrix
errant narwhal
#

ok

iron glade
#

maven on eclipse is just terrible

noble lantern
#

damn 2 shitty softwares in one sentence

#

jkjkjk

#

mavens nice

noble lantern
#

You need to do a combination of things

iron glade
#

yeah that's what I mean with it :d

noble lantern
#
  1. Last timestamp of message sent in chat
  2. Last PlayerMoveEvent
  3. InventoryClicks (Optional)

I think thats all you need maybe

lost matrix
#

Check the incoming packet traffic

noble lantern
#

wont it always be sending traffic tho

lost matrix
#

Yes

iron glade
noble lantern
noble lantern
#

EG

#

I sent chat message at 4:43
But i last moved at 4:42

Its now 4:45 and i havent done anything since my last chat message at 4:43, therefore ive been afk for 2 minutes

iron glade
#

Let's say another player hits you, that would update your last moved

noble lantern
#

my maths prolly fucked

buoyant viper
#

just track everything the player does md_5

lost matrix
iron glade
lost matrix
#

You can do this in a single class

iron glade
#

When it comes to packets I'm just a noob tbh

noble lantern
ivory sleet
#

It’s trivial once you learn what packet does what

iron glade
#

Is there like a nice table where packets are listed together with what they do?

noble lantern
#

Kinda

#

MC Protocol

earnest forum
#

little confusing though

ivory sleet
lost matrix
ivory sleet
#

Altho they might have different names when you code depending on what mappings you use etc

noble lantern
#

Well if you use protocollib they should be named with enums

#

oops

#

I was gonna list out ones to listen for but tbh almost all of those require user input

iron glade
#

hmm

noble lantern
#

minus the KEEP_ALIVE one

#

thats a heartbeat

#

itll always fire

#

maybe PONG too not sure

crisp steeple
#

persistent beef container

lost matrix
#

Just keep in mind that the player continuously sends keep alive and player position & rotation

noble lantern
#

oh he does constantly send position

#

thats odd

noble lantern
#

i wanna make a error handler called Tantrum just for the shits and giggles

lost matrix
#

throw new AutisticScreetchingException("REEEEE!");

noble lantern
#

error message would be like

"Exception in thread 'main' is currently throwing the following tantrum:
    -> com.bullshit.othershit:NullPointerException - NULL CHECK YOUR SHIT REE
noble lantern
#

and just spam it before program exist

#

ngl i should do that with a dedi of mine make it fire the beep sound

#

wonder if thats possible

#

piss the people off in the datacenter lmfao

#

not sure if they have the beeper tho, my hp server at home has a loud beeper doe

ashen quest
#

how can I make all the monstaz go away from some coordinate
i m makin a scare crow
i dont think listenin for Entity move is something good (i m not sure if that event exists in the first place)

lost matrix
ashen quest
#

well

#

ill just ditch the idea then

noble lantern
#

typically that stuff is done with NMS

ashen quest
#

oo

#

no man shall use it is what the legends say

lost matrix
ashen quest
#

oo ty

crude heron
#

Hi, does anyone here know how I can make a custom night that is generated with a command or at least if it is possible?
As an example, /customnight y automatically spawns a boss bar and a night with a duration of 30 minutes and mobs now spawn with speed.

I would really appreciate it very much it very much, I'm still very new!!

lost matrix
iron glade
#

I'm making a custom logger and would be interested what do you guys think which events would be interesing to log?

lost matrix
iron glade
#

Currently I have player join / quit, game mode change, player death, player op and player deop

noble lantern
#

God logging BPE would crash a server no lie

iron glade
#

SignChangeEvent might be interesting I guess

quaint mantle
#

is it possible to create some basic plugins for a bukkit server running beta 1.7.3

onyx fjord
#

💀

iron glade
#

thats when I started playing MC

noble lantern
#

bruh

#

I mean yeah

#

use Bukkit

#

like the Bukkit

#

the OG bukkit

onyx fjord
#

😴

lost matrix
iron glade
#

and some ass hair of jesus christ himself

onyx fjord
#

🤨

noble lantern
#

ayo

iron glade
#

Do I have to check for empty strings on signs or are empty lines just null?

#

If I write smth on line 1 & 3 for example, is line 2 null or just an empty string?

noble lantern
#

uhmm good question

#

i beileve its empty

crude heron
kind maple
#

hello, i am new to making plugins so this might be an easy fix. i get Cannot resolve symbol 'TowerCommandExecutor' when i make a new class for a command in my intellij idea messages

(im a noob at making plugins dont judge me)

ivory sleet
#

Mind sharing some code?

kind maple
#

getServer().getPluginCommand("mark").setExecutor(new TowerCommandExecutor()); if ur looking for the origin of error. i already made class in a separate file

ivory sleet
#

No no no

#

Big no

iron glade
#

Any ideas why java sb.append("| |\\n");
outputs | |

ivory sleet
#

use getCommand("name")

#

Simply

kind maple
#

ohk

iron glade
#

isnt more than one whitespace supported?

#

Discord

ivory sleet
#

Nope

#

They trim it

iron glade
#

wondering whether it's a java thing or discord thing

ivory sleet
#

iirc

iron glade
#

ah rip

tender shard
#

| |

#

works for me

iron glade
#

sending it through a webhook I mean

ivory sleet
#

Hmm then it might be your discord wrapper library

#

Which trims it

tender shard
#

weird that a webhook message gets trimmed, but a normal message isn't lol

iron glade
kind maple
ivory sleet
#

Very much yes

#

Well I assume you added the command in plugin yml?

kind maple
#

still same problem msg

kind maple
ivory sleet
#

Did you import the command executor class?

kind maple
#

hmmmm either yes or no... i use intellij idea so idk lemme check

#

im not very good at java i dont know how to import classes

ivory sleet
#

Else Alt + Enter the red thing

#

And import class if that shows up as an option

kind maple
#

theres no option for that

ivory sleet
#

Actually I’ll link you a guide

kind maple
#

ty

#

im noob at java sorry

ivory sleet
#

First this

#

Ensure you follow it to the letter in principle

#

And then we’ll continue with the command thingy

#

But also it wouldn’t be dumb if you took some java classes online

kind maple
#

alr

#

i assumed that since i already know javascript it would be easier to learn java since the code look alike

noble lantern
#

depends

#

what type of javascript did you do

#

nodejs? Yeah will make it easier for you especially when working with CompletableFuture's and Lmabdas

kind maple
#

html js, p5.js, node.js

noble lantern
#

considering if you followed OOP in NodeJS it wouldnt be terribly hard to learn

#

Its just JS isnt very strict on types

#

while java is

#

youll probably struggle with that the most

kind maple
#

yea i learnt some java through processing

ivory sleet
#

Java is more intricate because it falls back on the fundamentals of OOP much harder

noble lantern
#

yep

ivory sleet
#

But well any advantages you have will surely help

noble lantern
#

I tend to find myself writing java style whenever i touch nodejs lmao

ivory sleet
#

🥲

noble lantern
#

just cause im used to it

#

You should learn about java classes realguystuff

#

i meant

#

javascript***

kind maple
#

i made some js and java classes through p5.js and processing respectively

noble lantern
#

If you can use javascript classes efficiently in proper OOP java will be a breeze

ivory sleet
#

Of course you also need to learn the grammar, the lexical semantic parts of how to write things in Java, but knowing concepts help with that

tender shard
#

also wtf are those green things? they always only go back to the same method o0

noble lantern
#

i would say bare minimum to know is all besides polymorphism and encapsulation

Doubt you would use those first day days of java, but good to learn it

Encapsulation you use a lot for things like user data

noble lantern
tender shard
ivory sleet
#

Indeed

#

it does mfnalex

noble lantern
ivory sleet
#

If you’ve picked the right filters

#

I believe

#

And well if there are any implementations

noble lantern
#

ctrl + click shows all usages and implementations

tender shard
noble lantern
#

oh

#

invalid caches and restart

tender shard
#

probably caches are fucked up again, yeah

noble lantern
#

my ctrl click fucks up a lot too like that

tender shard
#

intelliJ is pissed at me because the PC was shutdown for 2 weeks, I guess

ivory sleet
#

Is it source or compiled?

tender shard
#

source

ivory sleet
#

Odd

noble lantern
#

Kinda like intellij teling me onStart() is called but in fact it gets called through reflection

My constructor is intialized via reflection too

tender shard
#

yeah it's really weird sometimes

noble lantern
#

ctrl + click shows no implementations or usages but blue = its usage in the project

#

unless intellij is mega mind and knows im calling it through reflection

ivory sleet
noble lantern
#

no like that methods not called anywhere directly

#

Its called using Method#invoke

#

cause the class gets loaded in via reflection

ivory sleet
#

Depends, if you’ve hardcoded it even with method handles or reflective invocations it will show up more or less

noble lantern
#

interesting

#

i wonder if my other project does this

ivory sleet
#

But anyway Ctrl + click does show up implementations

#

Compile time ones at least

#

Oh actually

#

It shows up the look ups

#

Not invocations my bad

noble lantern
#

so that explains why reflective methods show used

ivory sleet
#

Ye probably

noble lantern
#

pretty smart ngl i wouldnt expect intellij to do reflective lookups

#

prolly explains why indexing takes 5 years

ivory sleet
#

Lol, well only hard coded ones so a bit limited but yeah, doubtful eclipse does sth like this tho

noble lantern
#

eclipse doesnt do stuff like that cause bloat prolly

ivory sleet
#

🥲

noble lantern
#

The intellij ide for android studio is an older version of intellij

#

with all the old bugs of intellij

#

so annoying

small trail
#

hello i have a made 1.19 plugin but i want to make it for more versions so like 1.19, 1.18, 1.17. 1.16 1.15. 1.14 1.13 1.12 .1 11 1.10 1.9 1.8

#

how can i do that?

noble lantern
#

if you want 1.8 support your plugin api needs to be 1.8

#

and from there

#

1.8 - 1.19 will work

#

If your API is 1.15

then 1.8 - 1.14 wont work, but 1.15 - 1.19 will

#

i reccomend

#

dont support lower than 1.14

eternal oxide
#

If its a new plugins I recommend supporting only 1.16.5+

noble lantern
#

yee

#

only say 1.14 cause thats the lowest version that has PDC kek

eternal oxide
#

yep

#

Bestest API and up

noble lantern
#

facts

small trail
#

weird because i did build it in correto 1.8

#

and it doesnt

noble lantern
#

1.8 z_aCRYYY

#

Do you have an error msg?

eternal oxide
#

To support 1.8 spigot you have to build against teh 1.8 API and use java 8

young knoll
#

There have still been several breaking changes since then

eternal oxide
#

^

young knoll
#

Sound enum, biome enum, etc

eternal oxide
#

You have to extremely careful what you use

noble lantern
#

material name changes too

#

lots of those

young knoll
#

Spigot handles those

#

Somewhat

noble lantern
#

if you get getMaterial(String) yeh

#

but lots of ppl hard code

young knoll
#

Nah

noble lantern
#

Material.IRON_ORE

#

will fail on 1.17

young knoll
#

Spigot has some weird ASM to support legacy materials

noble lantern
#

weird i always got errors when using old Material enums on newer versions

#

unless i got them with string

young knoll
#

¯_(ツ)_/¯

#

Guess that’s why libraries like xMaterial exist

noble lantern
#

Ppl in here said xMaterial bad

#

forgot why

#

i always jsut used the getMaterial was simple enough and returns null on invalid mats for the server version

eternal oxide
#

I've never used it so can't comment

lost matrix
lost matrix
noble lantern
#

i dont get why people jsut dont use getMaterial(String)

ivory sleet
#

XMaterial maps stuff like legacy colors concrete to colored clay or sth like that

#

But else it’s pretty much useless in and out

noble lantern
#

oh does it mixin to Material?

ivory sleet
#

hmm

#

I just think it has a lot of maps of strings to strings

#

or sth

noble lantern
#

ahh

#

hacky asf

ivory sleet
#

Yeah but you’re 101% correct

#

getMaterial/matchMaterial will almost always suffice

noble lantern
#

yeah ive used it for years

ivory sleet
#

Because it will pickup the material constants from the version you’re running on

noble lantern
#

i never use hard referance enums anymore

#

yep

ivory sleet
#

Yee

noble lantern
#

unless you want lapis lazuli on 1.8 💀

young knoll
#

Well, until you need to support legacy stuff and data values

ivory sleet
#

💀💀💀

noble lantern
ivory sleet
#

Does it?

#

Thought they were yeeted

young knoll
#

Yeah it has a Boolean

ivory sleet
#

oof

noble lantern
#

not sure if that one is on 1.8 or not tho

#

might be

#

but who cares about 1.8

#

im convined that if your developing on anything under 1.14 that your new to plugin/java development

ivory sleet
#

That’s probably a fair assumption lol

lofty zephyr
#

Where do you find good Java Devs? like I've tried fiverr (prob not the best plan)

lost matrix
#

?services

undone axleBOT
eternal oxide
#

Theres LOTS of good Devs, just none who are interested in copying the latest fad you have seen on Hypixel, for the hundredth time.

noble lantern
#

all i can say is

#

never do fiverr for devs

young knoll
#

Ah come on my idea is revolutionary

#

Hypixel skyblock, but it’s not in the sky

eternal oxide
#

its 5 blocks lower 🙂

#

innovative!

lost matrix
#

There is actually quite a cool mod pack where you start under ground in a stone cube and nothing else.

#

StoneBlock

#

"This modpack is kinda like SkyBlock, except you don't start with a tree and you're surrounded by stone."

zenith gate
#

how can I allow unsafe enchantments to be used in an anvil? I have given my players the ability to remove enchants off of the items. and some of them are level 10-20, but when they are added into the anvil to be put on something else, they only go to their level cap.

young knoll
#

Mess with the PrepareItemAnvilEvent

lost matrix
zenith gate
#

?jd-s

undone axleBOT
round axle
#

Hy all,
Is there any book to learn spigot API ? The wiki is kind of hard.
Also is there any platform where I can find basic tasks snippets?

marble copper
young knoll
#

Plugin didn’t load

#

Look earlier in the logs

azure hawk
#

how can i set gamerules for generated worlds. I have a plugin wth /world create but there can still spawn mobs and fire tick is on and that kinda stuff

#

How can i disable certian gamerules

azure hawk
#

thx

marble copper
azure hawk
#

it doesnt work

#

it is underlined red

#

i wanna send a screen but i cant in here D:

young knoll
azure hawk
#
WorldCreator w = WorldCreator.name(worldName).type(WorldType.FLAT).generateStructures(false).setGameRule;
#

the last part is unerlined in red

#

but why

young knoll
#

That’s not a world

#

It’s a WorldCreator

azure hawk
#

yes

#

bruh

#

ok

#

wait

young knoll
#

You need to make the world using it first

azure hawk
#

ok thanks

#

im dumb

#

i know it know :D

noble lantern
#

?jd-s

undone axleBOT
noble lantern
#

Your able to fit together what you normally need

#

If you need code examples

#

you can quite literally type

#

"How to do x spigot"

#

in google

#

make sure spigot is at the end

zenith gate
noble lantern
#

youll gets loads of forums results and other websites that show code examples from github proejcts

azure hawk
#
Bukkit.getWorlds().add(Bukkit.getWorld(worldName).setGameRule("doMobSpawning", false);

And why is that not working?

#

Im kinda dumb

#

lol

noble lantern
#

wait

#

lol

#

Bukkit.getWorld(String).setGameRule(String, boolean)

#

idk why your calling add()

#

dont do that

#

Bukkit.getWorld works fine for getting world

young knoll
#

You should already have a world instance when making one with WorldCreator

noble lantern
#

oh is that a custom world he made

#

didnt know

azure hawk
#

yep

noble lantern
#

then yah what Col said ^

azure hawk
#

@noble lantern i sent you the screenshots

noble lantern
#

link discord and send em in here

#

?linking

#

?link

#

@undone axle fuck u

azure hawk
#

xd

noble lantern
#

i forgot the command, its there somewhere

#

i forgot how to do linking

azure hawk
#

?help

undone axleBOT
#
CafeBabe Help Menu
*Red V3*
**__Admin:__**

selfrole Add or remove a selfrole from yourself.

**__Cleanup:__**

cleanup Base command for deleting messages.

**__Core:__**

embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.

**__Downloader:__**

findcog Find which cog a command comes from.

**__Mod:__**

names Show previous names and nicknames of a member.
userinfo Show information about a member.

**__ModLog:__**

listcases List cases for the specified member.
reason Specify a reason for a modlog case.

**__Permissions:__**

permissions Command permission management tools.

azure hawk
#

?links

#

bruh

noble lantern
#

99% its ?link maybe

azure hawk
#

?link

noble lantern
#

but linked users cant use it

#

or not

#

@tender shard how do you link to discord

azure hawk
#

nope

#

xd

#

?mydata

undone axleBOT
#
CafeBabe Help Menu
Syntax: ?mydata 
Commands which interact with the data CafeBabe has about you.

More information can be found in the End User Data Documentation.

**__Subcommands:__**

3rdparty View the End User Data statements of each 3rd-party mo...
forgetme Have CafeBabe forget what it knows about you.
getmydata [Coming Soon] Get what data CafeBabe has about you.
whatdata Find out what type of data CafeBabe stores and why.

azure hawk
#

?mydata discord

undone axleBOT
#
CafeBabe Help Menu
Syntax: ?mydata 
Commands which interact with the data CafeBabe has about you.

More information can be found in the End User Data Documentation.

**__Subcommands:__**

3rdparty View the End User Data statements of each 3rd-party mo...
forgetme Have CafeBabe forget what it knows about you.
getmydata [Coming Soon] Get what data CafeBabe has about you.
whatdata Find out what type of data CafeBabe stores and why.

azure hawk
#

?mydata whatdata

undone axleBOT
#

This bot stores some data about users as necessary to function. This is mostly the ID your user is assigned by Discord, linked to a handful of things depending on what you interact with in the bot. There are a few commands which store it to keep track of who created something. (such as playlists) For full details about this as well as more in depth details of what is stored and why, see https://docs.discord.red/en/stable/red_core_data_statement.html.

Additionally, 3rd party addons loaded by the bot's owner may or may not store additional things. You can use ?mydata 3rdparty to view the statements provided by each 3rd-party addition.

azure hawk
#

xd

tender shard
noble lantern
#

ahhh

#

ty

azure hawk
#

?verify

#

?verify

#

nice

#

HAHAH

young knoll
#

?verify

tender shard
#

did you get a DM?

noble lantern
#

^

azure hawk
#

nope

#

lol

tender shard
#

huh

#

maybe I'm wrong then

#

lol

#

?verify

noble lantern
#

i think you need to set on spigot site then

tender shard
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

foggy bobcat
tender shard
#

it's !verify

noble lantern
#

there it is

noble lantern
#

you use

#

uno momento

#

video should explain the process

#

its also how you do images in inventories

#

on hud

#

etc

azure hawk
#

?ver

#

!verify

undone axleBOT
#

Usage: !verify <forums username>

azure hawk
#

BRUH

#

WTF

noble lantern
#

you quite literally put your forums username there

#

commands right there lol

frail sonnet
#

hi guys, how can i add my own plugin on spigotMC site? pls

zenith gate
#

what did entity drops change to??

I'm trying to set mob custom drops
and keep seeing event.getDrops.clear()
then creating an item stack than spawning the item in, what did the drops change to? or did it get removed since 2017? i cant find anywhere in docs to see this. unless im blind.

azure hawk
noble lantern
azure hawk
#

why do i have to verify me for that

#

lol

noble lantern
#

so you can send images in here

#

its not hard you !verify <spigot username>

young knoll
noble lantern
#

but also note what col said about WorldCreator

young knoll
#

EntityDeathEvent#getDrops still exists

frail sonnet
zenith gate
#

oh im so stupid....

#

i was doing this inside a CreatureSpawnEvent

earnest forum
noble lantern
earnest forum
noble lantern
#

yeah wrong one

noble lantern
marble copper
#

help no plugins load in my server

earnest forum
#

its the same thing

#

i just clicked on your link

marble copper
#

they generate the file

#

only

earnest forum
#

and it still hasnt showed up

#

im pretty sure theres a requirement

#

but idk what itis

noble lantern
marble copper
#

and u can use help for that command

noble lantern
#

Nah no requirment

earnest forum
#

nvm im not logged in

#

nice

marble copper
#

pleasehelp

noble lantern
noble lantern
#

of startup

#

not that plugin is disabled error you sent earlier

azure hawk
#

@noble lantern look dm

#

it still doeant work

#

D:

noble lantern
#

I dont help people in DMs only here

azure hawk
#

tf

azure hawk
noble lantern
#

That way everyone see the solution and can help in case i do something wrong

noble lantern
delicate lynx
#

verify

azure hawk
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

azure hawk
#

why forums

#

i dont have a forum

vocal cloud
#

Time to make one then

azure hawk
#

where

tender shard
delicate lynx
#

the more questions you ask, the longer it takes to get help

#

do you know what discord you're in?

marble copper
#

OH

#

wait

young knoll
marble copper
#

i forgot to add vault plugin to my server

noble lantern
vocal cloud
#

Rusty Spigot, Dirty Water: An Introspective Journey for the Offender - Ebook written by Michael Farlin. Read this book using Google Play Books app on your PC, android, iOS devices. Download for offline reading, highlight, bookmark or take notes while you read Rusty Spigot, Dirty Water: An Introspective Journey for the Offender.

noble lantern
#

ayy i love that book

lost matrix
vocal cloud
azure hawk
#

!verify mrrioes

undone axleBOT
#

A private message has been sent to your SpigotMC.org account for verification!

azure hawk
#

yay

#

finally

#

why is this not working

earnest forum
#

there should be like an enum no?

lost matrix
sharp wigeon
#

I'm writing a proxy which can switch connections between some hub server and a freshly deployed server on AWS, currently running into one issue. To swap the server the client connects to, I create a new connection to server 2 from the proxy, remove the old packet listeners/packet forwarding between the old connections and setup new packet forwarding to the second server. This allows me to be connected to server 2, receive player updates, send chat messages etc. But my client-side collision is still processing as if I were on the first world, even though world updates are processed on the correct server. Has anyone ever run into this issue? Is there some packet I could send my client to update its local interpretation of the world?

lost matrix
azure hawk
noble lantern
#

javadocs has all listed referance names

lost matrix
azure hawk
#

oh ok

#

bruh

noble lantern
azure hawk
#

thanks

#

:)

lost matrix
sharp wigeon
#

interesting, thank you, will look into it

noble lantern
#

Hey smile i remember seeing a plugin a while ago that was for proxies and when the server the player was connected to they still stayed in the world itself even tho the server was down

#

Any idea how that was accomplished?

#

I assume just sending packets from proxy to player as the server world

#

was a really cool plugin i wish i remembered the name

young knoll
#

You would only need to handle keepalive

#

The client will already have the world

noble lantern
#

ahh

#

yeah that makes sense then fair enough

lost matrix
#

You can just send the keepalive and pos/rot packet every second

#

Coll beat me

noble lantern
#

Neat was always curious how that was done it blew my mind when my ex showed me that lmao

#

i sat there for like an hour staying the stopped server 💀

earnest forum
#

anyone got a guide to custom persistent data types

noble lantern
#

should be one of the first google searches iirc

#

not at pc rn

sharp wigeon
noble lantern
lost matrix
noble lantern
#

how tf would you even make a primitive uuid

#

string?

young knoll
#

2 longs

noble lantern
#

oh

#

thanks now i can make a uuid pdt

#

never knew that

earnest forum
#

primitive should be a byte array right

sharp wigeon
noble lantern
noble lantern
#

eg long int float

#

etc

earnest forum
#

alr thanks for help

noble lantern
#

byte array would work tho actually now that i think of it

#

not sure if pdt allows primitive arrays

#

99% sure it does

lost matrix
#

Yes it does

earnest forum
#

this and the other guides ive looked up use a byte array

noble lantern
#

Its just simplest

#

cause you can toString and getBytes

ashen quest
#

How can I make some Fake tnts, they look like they are lit, and are bout to explode but dont really do any block damage

lost matrix
#

byte short int long float double String byte[] short[] int[] long[] float[] double[] (String[] ?)

young knoll
#

2 longs written to a byte array will be smaller

noble lantern
#

and then convert bytes back to string back to the object you want

Thats just basic tho and not the most efficient

#

yee byte arrays are smallest iirc

young knoll
#

The example on the javadocs should be fully working actually, if you want a uuid type

lost matrix
ashen quest
#

and my array aint smallest 🔫

noble lantern
#

How do yall find motivation to open your ide

ashen quest
#

so what you gotta do is

#

try to move your cursor to the ide shortcut

earnest forum
#

does my complex class have to implement serializable?

ashen quest
#

and click the left button, iknow it takes a ton of force

#

but you got this

azure hawk
#

why is this not working

young knoll
#

1.8 moment

noble lantern
#

L

young knoll
#

You need to use the old method that takes strings rather than GameRule

ashen quest
#

the problem is

noble lantern
#

not to mention

young knoll
#

Also you should be using the 1.8 api

ashen quest
#

^^

noble lantern
#

why are you on a newer api version running on a lower api version

#

^^

ashen quest
#

^^

earnest forum
young knoll
#

Because it gives me more methods

#

That’s how it works right

young knoll
azure hawk
noble lantern
noble lantern
ashen quest
noble lantern
#

your using in gradle/maven

young knoll
#

Or the jar you depend on

#

If you do it that way

noble lantern
#

i remembe when i first started

azure hawk
#

is that bad

noble lantern
#

using intelij artifacts lmao

noble lantern
azure hawk
#

and where LOOL

noble lantern
#

you can typically google "spigot <version> <maven/gradle> import"

#

its how i do it

#

theres normally a thread somewhere or a list of the versions from repo url

#

sonatype repo i think it is

#

if someone has the url they can send

#

you can view the version in a browser normally as a list of directories

azure hawk