#help-development

1 messages · Page 1926 of 1

wary harness
#

I think it is not working with living Entities

quaint mantle
#

cant believe people actually fall for those things

spiral light
#

what did i miss with that acc ?

terse ore
#
    @EventHandler
    public void onWellClick(PlayerInteractEvent event) {
        if (event.getAction() == RIGHT_CLICK_BLOCK) {
            Player player = event.getPlayer();
            World world = player.getWorld();
            Location clickedLocation = event.getClickedBlock().getLocation();
            Location wellLocation = new Location(world, -1197, 70, -1060);
            System.out.println(clickedLocation + " | " + wellLocation);
            if (clickedLocation == wellLocation) {
                player.sendMessage("Chi");
            }

        }
    }```
The sout locations --> Location{world=CraftWorld{name=world},x=-1197.0,y=70.0,z=-1060.0,pitch=0.0,yaw=0.0} | Location{world=CraftWorld{name=world},x=-1197.0,y=70.0,z=-1060.0,pitch=0.0,yaw=0.0}

It isn't printing "Chi"
worldly ingot
#

discord.gift phishing link

#

Nothing fancy

spiral light
#

oh wow

worldly ingot
#

You can't == compare Location instances, akex

terse ore
#

oh

worldly ingot
#

Or, really, anything that isn't referentially comparable

#

.equals() is your friend

terse ore
#

uhm

#

ill search that up

blazing scarab
#

what does "compomised" mean?

worldly ingot
#

If you google "equals() vs == Java" you'll get lots of info on it

#

Credentials stolen, Gepron1x

quiet ice
#

== can be usefull, but you really know when to use it

quiet ice
#

In 99% of cases, you do not need it

terse ore
#

It works :D

quiet ice
#

For object comparisons that is

terse ore
#

Now the other problem

#

How do I execute it only one time

quaint mantle
#

downloaded malware or leaked their login qr code or entered their details (how, ikr)

young knoll
#

Or they just straight up put in their password and username

worldly ingot
#

The interact event is fired once for each hand, akex, so you can ignore one of them by checking the event's getHand()

young knoll
#

Because they think they will get nitro

worldly ingot
#
if (event.getHand() == EquipmentSlot.OFF_HAND) {
    return;
}```
quiet ice
#

Or a skyblock mod

worldly ingot
#

(valid use of == vs equals() btw lol)

quiet ice
#

That's because these are constants

spiral light
young knoll
#

Enums and primitives

quiet ice
#

What happens if you accidentally put in a correct combination?

young knoll
#

That’s the main usage

quaint mantle
spiral light
#

its funny to see how long it takes for them to take those websites off xD

young knoll
#

Honestly maybe we should be attacking those discord scams with scripts

terse ore
worldly ingot
#

No it returns an EquipmentSlot

terse ore
#

How would I make it for detect if it's HAND

worldly ingot
#

That's what that snippet above will do

#

It will return (not proceed) if it's the off hand

terse ore
#

It worked Choco :DDD

proper marlin
#

How to fix KB so it doesn't pull players into the ground?

terse ore
#
package playertracker.playertracker.utils;

import org.bukkit.ChatColor;

public class color {

    public static String translate(String message) {
        return ChatColor.translateAlternateColorCodes('§', message);
    }

}


#

Is there something wrong with this code?

#

it isn't replacing

hasty prawn
#

Use '&' not '§'

terse ore
#

&

#

thx man

proper marlin
hasty prawn
#

Java uses it also, but if you're using translate alternate color codes the char provided should be the same in your string.

#

If the string was `§e... §6... §e..." it would've worked also.

young knoll
#

Well, it wouldn’t have really done anything

hasty prawn
#

Well true

#

But if they were both, for example, $, would've worked.

terse ore
proper marlin
#

For me it doesn't get sent in chat lol

terse ore
#

like in p.sendMessage or broadcast

final monolith
#

someone here knows about ChunkGenerator? im trying to make a Smooth Biome transitions but i cant, asking for help

forest edge
#

Is it possible to send "fake armor" (place an item on a player's head without taking up the slot) but still have the item appear?

final monolith
#

You cannot send a fake armor to the player without changing his inventory

terse ore
#

You technically could

#

with armor stands

final monolith
#

yeah, thats a good way to do this

terse ore
#

I could do that with a cmd block

final monolith
#

but i didnt recommend

terse ore
#

why

final monolith
#

lag issues, and the armor stand will not be perfectly fixed in your body

forest edge
#

that being said... I'm using client side armor stands for multi line name tags at the moment, so a fake armor solution would be better

final monolith
#

🤔

#

I think you cannot ride an client-side entity in a player

#

ive tried that a week ago

forest edge
#

The armor stands are riding the player

final monolith
#

Client-side armor stands?

forest edge
#

yes, fake entities sent to the player

final monolith
#

I didn't know this was possible, thanks for the info

terse ore
#

What does this mean?

[22:33:04 ERROR]: Caught previously unhandled exception :
[22:33:04 ERROR]: Paper Async Task Handler Thread - 17
java.util.ConcurrentModificationException: null
        at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1486) ~[?:?]
        at java.util.TreeMap$ValueIterator.next(TreeMap.java:1531) ~[?:?]
        at net.minecraft.commands.Commands.fillUsableCommands(Commands.java:419) ~[?:?]
        at net.minecraft.commands.Commands.sendAsync(Commands.java:378) ~[?:?]
        at net.minecraft.commands.Commands.sendCommands(Commands.java:368) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]```
terse ore
#

when reloading a plugin

final monolith
#

are you sure that is this the full error log?

terse ore
young knoll
#

Something about paper and commands

#

Does it occur on spigot

final monolith
#

try removing your servers plugins one-by-one, until the error disappears

terse ore
#

idk what hapened

final monolith
#

are you using paper?

terse ore
#

purpur

final monolith
#

ChunkGenerator Smooth Transitions

delicate lynx
#

when you reload the plugin, are you reloading the config or the WHOLE plugin

terse ore
#

idk I am using plugman

delicate lynx
#

don't

final monolith
#

💀

terse ore
#

suppose the whole plugin because I am uploading the plugin again

terse ore
#

💀

#

what's wrong with it

#

:U

delicate lynx
#

reloading plugins instead of restarting breaks everything

final monolith
#

lol men plugman broke plugins, they reload instead restart

delicate lynx
#

and causes unnecessary problems

terse ore
#

but I don't want to restart the server every time

final monolith
#

dont use that, i recommend only for developers that assume the risk

hybrid spoke
#

just never reload or restart

terse ore
#

then?

dense shoal
#

Has anyone ever needed to create a potion with 1 line before? Is that possible?

hybrid spoke
#

stop the server and never turn it on again

terse ore
#

I code the plugin perfectly at first try

young knoll
#

I always /reload in dev

hybrid spoke
#

same

young knoll
#

But I know my plugins can handle it properly

final monolith
terse ore
#

/reload is safe?

dense shoal
#

No, reload is pretty terrible.

final monolith
terse ore
#

But I have a question

hybrid spoke
#

just create a profile in which you automatically build the plugin inside the servers /plugins and start the server

#

so you can also do exception handling in your IDE

terse ore
#

how do /reload from plugins work?

dense shoal
#

Why not just recompile from IDE?

terse ore
#

like /essentials reload

delicate lynx
#

that reloads the config

final monolith
#

not the plugin

delicate lynx
#

not the entire plugin

terse ore
#

hmm

hybrid spoke
terse ore
#

but I am compiling again the plugin

delicate lynx
#

it basically just rereads the config and stores the new one

terse ore
#

so I need to reload whole plugin right?

final monolith
terse ore
final monolith
#

NO

#

omg

#

bro, for developments, just create a server with YOUR PLUGIN and THE DEPENDENCIES

hybrid spoke
#

i mean what even is your goal

terse ore
#

I am in a separate server where I test my plugins

terse ore
hybrid spoke
#

so just restart your server

final monolith
terse ore
#

it hasn't broken

#

so it might work well with reload

hybrid spoke
#

so then use reload

#

whats the problem

terse ore
#

idk man

#

you started hating on plugman

hybrid spoke
#

i just jumped in

final monolith
#

but please, dont kill the server, RESTART! has a difference between just closing the cmd and use the /stop command

terse ore
#

💀

hybrid spoke
#

nah just close cmd

terse ore
#

Ik how the server works

young knoll
#

I mean

#

I also do that a lot

hybrid spoke
#

i do that all the time

final monolith
terse ore
#

I just kill discord bots

hybrid spoke
#

doesnt matter if you dont have one

young knoll
#

Doesn’t matter unless you are specifically testing shutdown logic

#

Like data saving or whatnot

hybrid spoke
#

^

hasty prawn
#

I usually use /reload on my test server anyway tbh

terse ore
#

well I'lll keep working on my plugin

hasty prawn
#

Not plugman though get that outta here

final monolith
terse ore
#

if I need help ill ask

terse ore
final monolith
terse ore
#

And serverutils is good ?

#

or is also 💩

delicate lynx
#

isn't plugman discontinued or something?

final monolith
#

never heard about

hybrid spoke
#

plugwoman

terse ore
#

yeah

delicate lynx
#

the new fork

final monolith
#

lmao

terse ore
#

yeah

#

it's 2022

hybrid spoke
terse ore
#

what are you expecting

final monolith
#

😆

terse ore
#

at least it isn't plugmayonaiseonachair

hybrid spoke
#

ah yes the new plugman fork

#

plugitin

final monolith
terse ore
final monolith
#

💀

terse ore
#

xd

#

Intro Let's be honest: PlugMan is outdated and very often fails to reload even the simplest of plugins. PlugWoman is a very lightweight and simple plugin which can reload most plugins without issue. Note, however, that reloading is still an unsupported operation for many plugins, and not all plugins can be reloaded safely.

#

everyone out here hating plugman xd

final monolith
#

@hybrid spoke for a safe plugin disable, we need to execute the onDisable method, and setEnable(false) no?

terse ore
#

Hey

final monolith
#

oh wait, setEnable() already executes the onDisable method

terse ore
#

Someone is familiar with SlimeFun?

waxen plinth
#

Yeah plugman is shit lol

young knoll
#

If you want to disable your plugin from within

terse ore
#

xd

hybrid spoke
#

for a clean plugin disable you just remove it from your plugins folder

final monolith
#

😆

terse ore
#

@waxen plinth you are a very original dev

young knoll
#

Use Bukkit.getPluginManager.disablePlugin

waxen plinth
#

thanks

terse ore
#

yw

waxen plinth
#

it's not a fork though

final monolith
hybrid spoke
#

not much to fork there

terse ore
#

💀

#

Can someone help me with something from a plugin

final monolith
#

just ask

waxen plinth
#

If you ask the question, yes

hybrid spoke
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

delicate lynx
#

for each plugin in plugin folder, disablePlugin. for each plugin in plugin forlder, enablePlugin EZ reload plugin created

waxen plinth
#

Also that won't work

terse ore
#

starts to search for the docs because he doesn't understand to see if you guys do because i am a noob :(

delicate lynx
#

im joking

waxen plinth
#

You need to reload them respecting dependencies

hybrid spoke
#

?jd

terse ore
waxen plinth
#

It's my turn now

#

?jd

terse ore
#

Could someone help me creating an item

#

Now mine

#

?jd

hybrid spoke
#

you parrots

waxen plinth
#

👍

final monolith
delicate lynx
waxen plinth
#

Why don't you join their discord

delicate lynx
#

follow the wiki page bro

terse ore
#

like imagine don't having a life

waxen plinth
#

Rather than asking here

final monolith
terse ore
final monolith
#

i will kill myself, bye!

terse ore
#

== True

final monolith
#

💀

waxen plinth
#

have a good death

young knoll
#

Does slimefun still have wack code

waxen plinth
#

most likely

terse ore
#

idk but their support is trash

#

so that's why I am asking here

#

because is a more noob-friendly zone

waxen plinth
#

Well I don't think any of us have used slime fun

#

So I don't think we'll be able to help you

hybrid spoke
#

no

#

?learnjava and fuck off

undone axleBOT
terse ore
waxen plinth
#

?jd

terse ore
#

ik java

delicate lynx
#

then you can read the guide

waxen plinth
#

the whole thing?

#

😱

terse ore
#

idk minecraft java

terse ore
hybrid spoke
#

so you dont

delicate lynx
#

he knows the entire java!!

terse ore
#

I helped develope it

waxen plinth
#

ok ok

#

do this then

terse ore
hybrid spoke
#

oh he's notch

terse ore
#

who you think i am

waxen plinth
#

write me a program to prove to me you know all of java

terse ore
#

ok

waxen plinth
#

a program that takes in ints from stdin until the user types "done" and then prints the sum of all numbers entered

#

but

#

do it with a one-liner

terse ore
#

System.out.println("A prove I know Java at a 100%");

#

done

waxen plinth
#

I don't think that will solve the problem

delicate lynx
#

wheres your class declaration

terse ore
#

bruh

#

I am a noob

#

leave me alone

#

cries

waxen plinth
#

So there is a simple solution to "knowing java" but not knowing "minecraft java"

#

This is gonna blow your mind:

#

?jd

terse ore
#

?jd

terse ore
#

O wow

#

this command is interesting man

waxen plinth
#

For real though read wikis and documentation

terse ore
#

for @waxen plinth
this command is interesting woman*

#

just to be equal

waxen plinth
#

🤔

terse ore
#

plugwoman

waxen plinth
#

no I got that

waxen plinth
hybrid spoke
#

have fun

terse ore
#

inserts virus for dos botnet*

waxen plinth
#

Nice try

#
public class Main
{
    private static final String LINK = "https://www.youtube.com/watch?v=dQw4w9WgXcQ";
    
    public static void main(final String[] args) throws IOException, URISyntaxException {
        Desktop.getDesktop().browse(new URL("https://www.youtube.com/watch?v=dQw4w9WgXcQ").toURI());
    }
}
terse ore
#

bruh

waxen plinth
#

I would recognize that link anywhere

terse ore
#

💀

hybrid spoke
#

its for people doubleclicking plugins

waxen plinth
#

Oh lol

young knoll
#

I love how easy it is

#

Desktop best class

waxen plinth
#

Stream best class thank you very much

terse ore
#

well i'll continue trying to understand slimefun's wiki

waxen plinth
#

good boy

sterile token
#

A question

waxen plinth
#

yes

delicate lynx
#

no

sterile token
#

In mongodb its possible to save ItemStack?

waxen plinth
#

yes

terse ore
#

I know the answer to that question

young knoll
#

Sure

terse ore
#

?jd

waxen plinth
#

serialize it

terse ore
#

yw

waxen plinth
#

My library has a method to serialize items

sterile token
waxen plinth
#

ItemUtils.toString and ItemUtils.fromString

young knoll
#

Turn it into a byte array or base64 string

waxen plinth
#

Or use my library ✨

#

My 400kb library just for one helper method lol

terse ore
#

|| too many new things I recognize but don't udnerstand ||

young knoll
#

This is why I use minimize

sterile token
waxen plinth
#

That's fair honestly

sterile token
#

Remeber?

waxen plinth
#

Java serialization bad

#

Will take up way more space than needed for items

waxen plinth
#

Using a library and minimizing honestly sounds like a very reasonable solution

#

I am sure mine is not the only library that has a method like this

mellow edge
#

is there portal open event?

#

like when you got o end portal

delicate lynx
waxen plinth
#

Beat me to it

sterile token
#

How much would you ask for coding 2 methods:

byte seriliaze(Packet packet) -> serialize packet object (a class implemeting packet class) to bytes

T deserialize(byte[] bytes) -> deserialize bytes to packet object

young knoll
#

Just use the ones in redlib

waxen plinth
#

No mine doesn't have general purpose serialization

#

I mean I guess it does

young knoll
#

Ah I didn’t read

waxen plinth
#

But it only has a helper method for items

young knoll
#

Thought we were still on itemstacks

undone axleBOT
sterile token
young knoll
#

Just turn the object into json and then turn the json string to a byte array

waxen plinth
#

kinda a good idea honestly

sterile token
#

I dont wanna think in json

waxen plinth
#

json is good

sterile token
#

🤢

waxen plinth
#

it's the only good thing to come out of js

young knoll
#

Gson makes it easy

sterile token
waxen plinth
#

how do you think discord works

sterile token
#

XDDD

waxen plinth
#

200G?

#

Gson is 200 gigabytes?

#

🤔

sterile token
#

Its an example saying that its to much

young knoll
#

Gson is in spigot anyway

#

Well

sterile token
#

Oh

#

Not

young knoll
#

Not even spigot, it’s in vanilla

sterile token
waxen plinth
#

Someday redlib will be in vanilla

sterile token
#

I tried and it doesnt find the methods

waxen plinth
#

Not even for anything, since vanilla is obviously not spigot

young knoll
#

Well you would have to import the NMS jar

waxen plinth
#

But I will pay microsoft $300 billion to shade redlib into all copies of minecraft

young knoll
#

Gson is in fact used in vanilla

sterile token
#

For me maven doesnt resolve the methods

#

Let say, its find me the method. But then the plugin throws error

delicate lynx
#

org.json > gson 😎

waxen plinth
#

I should rewrite my json parser to be faster

#

It's already faster than gson but not by a lot

#

And I know gson is not the fastest json parser

#

I think jackson is faster

young knoll
#

What’s that new one

waxen plinth
#

One thing that's annoying is that java doesn't support string slicing

#

Which would make json parsing much faster

sterile token
young knoll
waxen plinth
sterile token
#

I can pay you

waxen plinth
#

no thank you

sterile token
#

I think i have some dollars on paypal

#

😕

#

Wait its possible to serialize and deserialize using ObjectInputStream + ByteArrayInputStream?

waxen plinth
#

Yes that's java serialization and it's pretty bad

sterile token
waxen plinth
#

uh

#

yes?

#

I think you're asking "is that what the Serializable class does?"

#

?paste

undone axleBOT
terse ore
#

-_-

waxen plinth
#

Thank you

terse ore
#

WHy?

waxen plinth
#

Why what

#

Why am I asking you to pastify it?

sterile token
undone axleBOT
terse ore
#

yeah

sterile token
#

Its easy for get help

waxen plinth
#

If that's your question then the answer is because large code blocks take up a lot of space in chat

terse ore
#

what's the reason

waxen plinth
#

Anyways what's your question

terse ore
#

It doesn't work

#

but

waxen plinth
#

Did you register your listener

sterile token
young knoll
waxen plinth
#

Also your class names should be uppercase, not lowercase

terse ore
#

it does work when I reload it

hollow bluff
#

@terse ore wrong color import

terse ore
waxen plinth
#

So Tracker instead of tracker and Color instead of color

#

Can we see your main class

terse ore
#

?paste

undone axleBOT
terse ore
waxen plinth
#

I don't see you doing registerEvents(new tracker()) anywhere

#

Also please do rename your classes to start with capital letters

terse ore
#

why capitals?

waxen plinth
#

It's the naming convention

#

Having everyone follow for consistency makes code more clear

young knoll
#

CamelCase class names

terse ore
#

okk

young knoll
#

lowerCamelCase methods and variables

#

And then constants are UPPER_SNAKE_CASE

waxen plinth
young knoll
#

Potato potato

terse ore
#

fIsHCASE

vague drift
#

Can anyone tell me the name of the event when an item for example is in a craftingtable and returns to the inventory by canceling or closing the inventory without completing the action?

sterile token
#

Have you read the docs?

#

There you can find all the events

vague drift
#

this I know, but this specific one I didn't find

humble hazel
#

Hello, I've been looking for a plugin to sell things with posters that recommend essentials for a while, it doesn't work for me, stores aren't created

#

Plis help

dawn hazel
#

anyone know why im getting this message?
java.lang.NullPointerException: Cannot invoke "org.bukkit.scoreboard.ScoreboardManager.getNewScoreboard()" because "this.manager" is null
this is the code

chrome beacon
#

Try creating the scoreboard in your on enable

#

Also Intellij seems to be warning you. Take a look at what it says

dawn hazel
#

yeah i realized that

#

i moved it to enabled and it works now

sterile token
chrome beacon
#

So people don't extend it

sterile token
#

Hmn

#

Ah lol, really

chrome beacon
#

Although I'm guessing that one is from a tutorial or template

sterile token
#

Any class that its fianal cannot be extended

elder oyster
#

Should permission nodes be registered through plugin.yml or through pluginManager.addPermission?

waxen plinth
#

plugin.yml is probably preferable

#

I never bother registering permissions though

elder oyster
#

Hmm, was thinking about using a Map to register the plugins then retrieve the Permission object from the Map whenever I check for it.
So I account for any changes to naming

prime reef
#

How would one go about fetching the default attributes for an entity type?

#

i can't seem to find anything about it

sterile token
#

Any good docs for reading about bungeecord permissions api?

#

Or atleast doesnt bungeecord have an api for managing permissions?

elder oyster
sterile token
#

I would be working with bungee perms api

#

Like im not going to use luckperms

#

Im asking if they helped you with the Bungeecord permissions api itselft

muted sand
#

will Inventory#addItem drop items to the floor if the item is filled. It says it returns a HashMap, but how do I make the items in the hashmap drop to the player

waxen plinth
#

Iterate over the map and drop all items that weren't added

muted sand
#

oh okay!

waxen plinth
#

Simplest way would be addItem(item).values().forEach(i -> player.getWorld().dropItem(player.getLocation(), i))

glossy venture
#

does anyone know any 1.8.8 ForgeGradle patcher mappings?

waxen plinth
#

This doesn't seem like the right place to ask

worldly ingot
#

Hmmm Definitely not. 7 year old version and completely wrong software lol

#

Forge is going to beat your ass if you ask them in their cord though

worldly ingot
#

I mean we're not going to be able to answer here either haha

#

We don't maintain Forge

glossy venture
#

nah but i thought since it was more of a general minecraft mapping thing

#

and im trying everything

#

ive been stuck on this problem for 3 fucking days

#

preventing me from working on the project at all

worldly ingot
#

They do something that I wish we did, and they will outright ban you if you ask for support for anything less than the current or most recent version of MC

hybrid spoke
#

its like asking for 1.8 support in here

#

everyone will jump on you

simple frigate
next stratus
#

I hate 1.8 but I am getting help from someone to support it

dusk flicker
#

ive finally said fuck you to 1.8

#

dont regret a thing

glossy venture
next stratus
#

I hate < 1.12

dusk flicker
#

I heavily dislike the 1.9+ pvp, so I'm working on a patch for the server jar to try and fix that

#

hopefully it works lol

next stratus
#

Oh?

#

I wanna learn patches but it's hard

dusk flicker
#

its just compiling a server jar, editing the code, and rebuilding it

glossy venture
#

arent they just git changes in a file

dusk flicker
#

ye

elder oyster
#

Any idea how to set a timer for a player when they interact with something?
I.E "Wait x amount of seconds before using the sign again"

dusk flicker
#

?scheduling

undone axleBOT
dusk flicker
#

that

elder oyster
#

ty

cold pawn
#

Anyone able to help me with this?

quaint mantle
#

Hi I am making a plugin where if someone throws a special enderpearl the player will get mounted but I don't understand how to do the checks for this like checking if it has a display name so far this is my main class```java
private ItemStack epearl = new ItemStack(Material.ENDER_PEARL);

private ItemMeta meta = epearl.getItemMeta();

@Override
public void onEnable() {
    System.out.println("Enderpearlpassenger activated...");

    meta.setDisplayName(ChatColor.BOLD + ChatColor.GOLD.toString() + "Riding Enderpearl");
    epearl.setItemMeta(meta);

    ShapedRecipe s = new ShapedRecipe(new NamespacedKey(this, "ride_epearl"), epearl);
    s.shape(
            "EEE",
            "EDE",
            "EEE");

    s.setIngredient('E', Material.ENDER_PEARL);
    s.setIngredient('D', Material.EMERALD);
    Bukkit.addRecipe(s);

}``` and this is my event ```java

@EventHandler
public void onShoot(ProjectileLaunchEvent e) {

    if(e.getEntity().getType() == EntityType.ENDER_PEARL &&  e.getEntity().getShooter() instanceof Player) {

    }

}``` does anyone know how to check the display name or add more checks to this?
next stratus
glossy venture
#

i dont understand how they work internally, neithr do i know how to use them

#

so all i know is that they are changes

dusk flicker
#

yeah same lmao

glossy venture
#

basically

dusk flicker
#

took me a week to figure out how to apply patches to a server correctly

#

(thats just cause im an idiot)

glossy venture
#

how do patches like decide where to edit

dusk flicker
#

it's just a git change file

#

here 1s

next stratus
#

I must be stupid then :/

glossy venture
#

yeah but if someone changes the file numbers does it break?

dusk flicker
#

one of my patches

glossy venture
#

like if someone adds one line before it does it break everything

#

or is it relative of some sort

dusk flicker
#

eh somewhat

#

you don't actually edit the patch files

next stratus
#

pom.xml?

dusk flicker
#

it's generated by Git

dusk flicker
glossy venture
#

i know

sterile token
dusk flicker
#

google

sterile token
#

I wana create a custom permission plugin for bungee

next stratus
#

Oh no... That's linked to the other system isn't it?

next stratus
#

I can't stand maven

dusk flicker
#

it's gradle

#

at least for Paper

next stratus
#

Pom.xml??

dusk flicker
#

that pom at the top is just a diff file

next stratus
#

I've never had that for gradle

#

Hm...

dusk flicker
#

it's notepad++ so all diff files are open

next stratus
#

Idk why spigot people are so addicted to maven though

dusk flicker
#

personally I like maven

#

but I will prob change to gradle soon

next stratus
#

But... Why?

#

Maven is a gross mess against gradle..

dusk flicker
#

I just started with maven, and it's easy for me, but gradle is nicer now that ive started to use it

glossy venture
#

bro gradle is fucking confusing

#

it melts my brain

next stratus
#

It's truly not

eternal oxide
#

Maven is simple and clean. Gradle is way more complex.

glossy venture
#

i love it but it melts my brain

next stratus
#

Gradle is tidier imo

dusk flicker
#

gradle is way more complex to start I do agree

#

I still have no idea how to do 90% of it

#

lol

glossy venture
#

me neither

next stratus
#

Okay, it's slightly confusing at the start but once you get going it's amazing

glossy venture
dusk flicker
#

its def something I do want to get into

#

maven i like but the errors are useless

hybrid spoke
dusk flicker
#

I cant say how long ive had to debug a stupid maven error for no reason

quaint mantle
next stratus
#

Gradle points you exactly to the line

hybrid spoke
#

gradle > maven but maven ftw.

dusk flicker
#

yeah I had to debug a gradle error and it was much nicer

#

still have like no knowledge of it but it works for me atm

hybrid spoke
next stratus
#

I can't do module shit fully yet but yeah

#

Some people somehow just do it and I'm like... How?!

dusk flicker
#

with maven modules are easy af

#

not sure about gradle

hybrid spoke
#

gradle aswell

next stratus
#

I am just shit at it

dusk flicker
#

if im not sure about something I just keep trying till it works right lmao

#

might take 20 times longer but I learn from it

next stratus
#

Oh I've spent ages trying to do it

hybrid spoke
#

google is your boyfriend in this case

dusk flicker
#

google is always the best bet

next stratus
#

Google blocked my number for asking too many times 😫

hybrid spoke
#

L

dusk flicker
#

what?

#

did you call google and ask questions?

#

Or am I just stupid

hybrid spoke
#

just L him

dusk flicker
#

fair

#

L

glossy venture
#

L

next stratus
#

lol, "Just L him"

#

Am I the only one who has a bit of a list of devs who'd I celebrate if they quit? lol

dusk flicker
#

why would you mention that

#

now half of us are asking like, wait, are we on that list?

hybrid spoke
#

hopefully i am

next stratus
#

It's very small.

#

the token enchant dev, the kid who helps him and the rev enchants kid currently...

glossy venture
#

lmao

dusk flicker
#

spartan.

#

Only thing ill say

#

lmao

next stratus
#

Spartan?

#

What's up with that?

dusk flicker
#

some dont like the dev of it

next stratus
#

I mean I hate the rev enchants kid so much

dusk flicker
#

gradle isnt working again

#

yay

glossy venture
#

bruuhh

next stratus
#

$35 for the initial plugin then it's like $25 per enchant

glossy venture
#

WHAT

dusk flicker
#

yeah

next stratus
#

Yep

dusk flicker
#

its stupid

tall nova
#

How would I check if player is on fire using Entity Metadata?

lost matrix
next stratus
#

35 euro for base
15 euro for rankup
20 euro for Backpacks

lost matrix
glossy venture
#

i made a manhunt plugin like 2 years ago and i remember just completely ignoring the bugs and only adding more features

tall nova
lost matrix
hybrid spoke
tall nova
#

Like if they are gliding, sneaking, sprinting, invisiblem etc.

glossy venture
#

like it has an addon loader, multiple speedrunners, titles, fancy compass name selector gui, and then theres seven hundred thousand bugs

tall nova
#

I know I can, but I want to learn how to check the metadata this way

hybrid spoke
#

just pressing features between everything without caring at all

glossy venture
#

yeah lmao

tall nova
#

because I'm also gonna check metadata for if the clients skin parts are enabled

hybrid spoke
#

and now it comes back to me

#

hunts me in my dreams

#

pain to refactor

glossy venture
#

sleep paralysis

lost matrix
hybrid spoke
#

even worse if the project is 2+ years old

glossy venture
#

yeah

hybrid spoke
#

and you updated it const.

dusk flicker
#

EWG.

tall nova
#

Yikesm thanks Ill try that

next stratus
#

Don't ya love it when you make your friend a crazy amount of money (in 6 figures) and he gives you nothing in return to say thanks? 🥲

glossy venture
#

did u do the work for him

hybrid spoke
#

all you can expect is a "thank you"

#

otherwise he's just a use-"friend" to you

glossy venture
#

also i just realized weve been talking about random shit in #help-development the whole time

sterile token
#

It doesnt exists object Attachment etc

dusk flicker
#

Ive never used bungee for perms ¯_(ツ)_/¯

#

Youd have to look into it yourself

sterile token
#

Oh

#

I have tried but i cannot find anything

tall nova
#

how do i read incoming packets?

#

using the channel duplex handler

#

it doesn't seem to be possible to override read() anymore in 1.18

#

I mean you can but theres no packet in the arguments

eternal night
#

channel duplex handler extends ChannelInboundHandler

tall nova
#

Ohhhh

#

Thank you man

dry forum
#

why doesnt this work

        Scoreboard b = m.getNewScoreboard();
        Objective obj = b.registerNewObjective("name", "dummy", "Test");
        obj.setDisplaySlot(DisplaySlot.BELOW_NAME);
        obj.setDisplayName("TESTNAME");

        e.getPlayer().setScoreboard(b);``` it does nothing
glass blaze
#

how to make reducer bot with citizen ?

hasty prawn
hasty prawn
dry forum
#

i dont see a method for that

glass blaze
hasty prawn
dry forum
#

yeah but thats not setting it

buoyant viper
hasty prawn
dry forum
#

but whats the method to set it

hasty prawn
#

Score#setScore()

dry forum
#

also what does it mean entry? is that the name of the board?

hasty prawn
#

No, it's just the name. Probably want to set it to your player's username.

tall nova
#

Can someone explain how bitmasks work when you combine them? For example, (0x01,0x02, 0x04, 0x08, 0x10, 0x20, 0x40) combined is 127, how sthis

dry forum
#

ight ty

#

Objective obj = b.registerNewObjective("name", "dummy", "Test"); would it be "name" or "Test" because 1 says displayname and 1 says name

hasty prawn
#

Neither, Scores are attached TO Objectives. Don't change your construction of it.

#

Just use that obj to get the Score and set it.

dry forum
#

Cannot resolve method 'getScore(org.bukkit.scoreboard.Objective)'

hasty prawn
#

Nono

#

obj.getScore(player.getName())

dry forum
#

ohh

dry forum
hasty prawn
#

No

dry forum
#

?? but if im getting the players name at the entry why would i not make that the name of the socreboard

hasty prawn
#

An objective can have multiple entries.

neat trellis
#

Is there a way to stop a player from loading a bow? (not all the time just under a specific condition)

dry forum
hasty prawn
#

I don't think you do

dry forum
#

then where does the players name come from

glossy dirge
#

hello how do i remove the [ ]

    /**
     * @param text The string of text to apply color/effects to
     * @return Returns a string of text with color/effects applied
     */
    public static String translateColorCodes(String text) {

        ArrayList<String> texts = new ArrayList<>(Collections.singleton(text));

        for (String value : texts) {
            if (value.equalsIgnoreCase("&")) {
                Bukkit.getLogger().info(value);
            }
        }
        return texts.toString(); // result -> [H4zlq Joined]
    }
hasty prawn
#

If you use a Player's name, it's attached to that player, other wise it's a fake player.

#

^ and fake player's aren't attached to anything

hasty prawn
glossy dirge
#

i want to make it support the & and hex color

hasty prawn
#

Use ChatColor.translateAlternateColorCodes()

dry forum
#

ah thanks but is it possible to just display text or something because i want it to say "Rank #" so "# <text>" doesnt really work

hasty prawn
#

Use teams

lavish hemlock
#

And also, as Dessie said, use translateAlternateColorCodes.

glossy dirge
lavish hemlock
#

I'm pretty sure color codes don't support hex colors.

hasty prawn
#

They do, that's what &x does

lavish hemlock
#

oh cool

#

I didn't know that existed

hasty prawn
#

I think it's &x proceeded by 6 &<character of HEX>

lavish hemlock
#

oh

hasty prawn
#

So &x&f&f&f&f&f&f is white

final monolith
#

@hasty prawn do you know someone that works with ChunkGenerators? I have some questions...

lavish hemlock
hasty prawn
#

Yeah it is lol

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

final monolith
#

i'm working on a ChunkGenerator plugin, but i can't do a smooth biomes transitions

#

And i want some help, some formulas, and tips...

final monolith
#

SimplexOctave

lost matrix
#

And whats your resolution? One cell = one Chunk?

final monolith
#

Sorry what?

lost matrix
#

In your noise matrix

#

[][][]
[][][]
[][][]
Each cell containing a value

dry forum
#

why is public void ExperienceListener(PlayerExpChangeEvent e) { not being run when i use /xp set <me> 100

final monolith
lost matrix
final monolith
#

I didnt heared about that 😱

dry forum
final monolith
dry forum
#

yep

#
    public void ExperienceListener(PlayerExpChangeEvent e) {
        Bukkit.getLogger().info("tes");```
final monolith
#

Registered the listener class intocyour main?

dry forum
#

yep

#

this.getServer().getPluginManager().registerEvents(new ExperienceHandler(), this);

lost matrix
#

From the javadocs

final monolith
#

Ok thats not normal

dry forum
#

:/ thats rly dumb

final monolith
#

Test with another debug event

#

Like AsyncPlayerChatEvent

#

To see if listener works properly

dry forum
final monolith
#

Oh ok

dry forum
#

is there no alternate method?

final monolith
#

Recreating the command

sullen marlin
#

its hard to trigger events for a raw command like /exp set

final monolith
#

Why?

sullen marlin
#

exp change probably not a good example and I'd need to look into it more

#

but consider like /data changing stuff

lost matrix
sullen marlin
#

idk what youre trying to do

rancid snow
#

why do people use databases when you can just store your data in chunk 0,0’s pdc?

sullen marlin
#

/exp set is basically an admin override command

urban bramble
#

Any recommendations on creating a chunk generator that referances a different chunk?

sullen marlin
#

you can't

urban bramble
#

hm? I have one working

sullen marlin
#

perhaps you want a block populator instead

urban bramble
#

it's just quite slow

#

and borked

rancid snow
#

what are you trying to make with this?

urban bramble
#

every 2x2 of chunks is a scaled up version of another chunk

dry forum
#

i have

        Scoreboard b = m.getNewScoreboard();
        Objective obj = b.registerNewObjective(e.getPlayer().getName(), "dummy", "rank");
        obj.setDisplaySlot(DisplaySlot.BELOW_NAME);
        obj.getScore(e.getPlayer().getName()).setScore(e.getPlayer().getLevel());

        e.getPlayer().setScoreboard(b);```
it works fine for me it displays my xp but when another player joins it doesnt work it just says 0 rank but they have levels
sullen marlin
#

Scoreboard b = m.getNewScoreboard();

#

this creates a new scoreboard each time

dry forum
#

yeah in creating one for each player because each player will have different amount of xp

quaint mantle
#
    public void potLuck(EntityDeathEvent e){
        for (ItemStack item : e.getDrops()){
            Iterator<Recipe> iter = Bukkit.recipeIterator();
            while (iter.hasNext()) {
                Recipe recipe = iter.next();
                if (!(recipe instanceof CookingRecipe)) continue;
                if (((CookingRecipe) recipe).getInput().getType() != item.getType()) continue;
                result = recipe.getResult();
                item.setType(result.getType());
                break;
            }
        }
    }
#

Hi! so I was making an enchantment for autosmelting food

#

This is what I have written so far

#

It isn't working tho; can someone tell me what's wrong with it?

olive lance
#

Whats the best practice to getting the instance of another plugins main class

dusk flicker
#

Why do you need to

dusk flicker
quaint mantle
#
public class EntityDeath implements Listener {
    Player player;
    Entity entity;
    ItemStack itemInHand;
    ItemStack result;

    @EventHandler
    public void onEntityDeath(EntityDeathEvent event) {
        if (!(event.getEntity() instanceof Player)) {
            return;
        }

        EntityDamageEvent e = event.getEntity().getLastDamageCause();
        if (!(e instanceof EntityDamageByEntityEvent)) {
            return;
        }
        EntityDamageByEntityEvent nEvent = (EntityDamageByEntityEvent)e;

        if (!(nEvent.getDamager() instanceof Player)) {
            return;
        }
        player = (Player)nEvent.getDamager();
        itemInHand = player.getInventory().getItemInMainHand();
        if (itemInHand == null) return;
        if (!itemInHand.hasItemMeta()) return;
        if (itemInHand.containsEnchantment(CustomEnchants.POTLUCK)) potLuck(event);
    }
dusk flicker
#

did you register it

quaint mantle
#

Yup

#

pluginManager.registerEvents(new EntityDeath(), this);

dusk flicker
#

what the hell are you doing lmao

#
EntityDamageEvent e = event.getEntity().getLastDamageCause();
#

No chance of that returning a lastDamageCause

#

?jd

quaint mantle
#

How do I get the killer then...?

dusk flicker
#

LivingEntity#getKiller?

#

I have no idea what you are doing above but this is basic bukkit / java

#

you're IDE should be yelling at you

#

Nevermind.. Bukkit is weird

#

But yeah you want to be using LivingEntity#getKiller rather than another event

quaint mantle
#

Oh I just realized I made a mistake

#

if (!(event.getEntity() instanceof Player)) {
return;
}

#

I added a "!" accidentally lol

dusk flicker
#

Lol

red sedge
#

Should I update the disk everytime a file gets updated

#

or only when the server is closed

#

another thing is there anyway to show a value under the item like the item: stone when you have advanced viewing on

#

not like lore

rich creek
#

Hey, i need help.
I'm trying to keep endermans from teping when they take water damage.

#
    
            DamageCause DamageCause = e.getCause();
            
            if(DamageCause == org.bukkit.event.entity.EntityDamageEvent.DamageCause.FIRE ||DamageCause == org.bukkit.event.entity.EntityDamageEvent.DamageCause.FIRE_TICK || DamageCause == org.bukkit.event.entity.EntityDamageEvent.DamageCause.HOT_FLOOR || DamageCause == org.bukkit.event.entity.EntityDamageEvent.DamageCause.LAVA ){
                double damage = e.getDamage();
                e.setDamage(damage*4.5);
                }
            if(DamageCause == org.bukkit.event.entity.EntityDamageEvent.DamageCause.FALL) {
                double damage = e.getDamage();
                e.setDamage(damage*2);
            }
            if(DamageCause == EntityDamageEvent.DamageCause.SUFFOCATION) {
                e.setDamage(e.getDamage()*10);
            }
            
            if(e.getEntity() instanceof Enderman) {
                if(DamageCause == EntityDamageEvent.DamageCause.DROWNING) {
                    
                    e.setCancelled(true);
                }
            }

    }```
rich creek
#

I just cancel that?
How?

red sedge
#

?jd

olive lance
dusk flicker
#

yikes

#

that might suck lol

#

iirc you can use RegistryProviders

#

Let me see if I can find something on spigot

#

Im not able to find any good (or any at all) articles on it, and have never used it myself, someone else might be able to help you tho

red sedge
#

recursion is scary

limber dove
#

hey, I have a question, how would I code a new axolotl variant into a plugin?

red sedge
#

hm?

#

explain

#

you could just get one of the varients

#

add a custom model data to it

#

and retexture it

jagged lava
#

Can I give a wolf a player skin?

red sedge
#

sure

#

why not

cerulean jasper
#

How do I "register" or something another plugins events to my plugin? I implemented them via @eventhandler but it does not get called it seems

sullen marlin
#

did you register the listener as with normal events

#

is the other plugin calling the events

#

thats really all there is to it

cerulean jasper
#

Yes

getServer().getPluginManager().registerEvents(new ArmControlListener(), this);

However I am not 100% sure if I should have used "this" or reference to their own plugin?

#

I checked their source and it seems right to me

#

where they call my specific event I need

quaint mantle
#

Mockbukkit

#

It can simulate a player

hardy swan
#

They are not items

#

But I took a look at the nms

#

It seems like it may be possible to change the axolotls' variant enum to a different id and name

#

Whether that allow us to use different textures is still unknown

#

And may break spigot

hasty prawn
#

You can't add new ones without overriding another variant

#

With resource packs

hardy swan
#

yea

brave goblet
#

E can I ask for datapack support here?

#

even tho this server is plugin based-

waxen plinth
#

You're unlikely to get any useful help for it

brave goblet
hasty prawn
#

You can ask, just don't necessarily expect an answer

ivory sleet
#

?askgoodquestion nonetheless

undone axleBOT
short raptor
#

Spigot

tardy delta
#

is there a way to add a contract to the source.isPlayer method so the compiler knows when i check that the player is present that source.getPlayer.get wont throw an exception?

ivory sleet
#

does source::getPlayer return an optional?

tardy delta
#

yea

ivory sleet
#

Cache it?

tardy delta
muted dirge
#

hi

ivory sleet
#

and invoke sth like isEmpty() -> return

muted dirge
#

how to set plugin as multivesrion

#

to support all version

ivory sleet
#

Either you choose to be the least common denominator

muted dirge
#

what is this

#

im noob

ivory sleet
#

Or you create a powerful abstraction, alternatively excruciate yourself with reflection

#

Maven has nothin to do with your Java skillset tho

#

Not at Java necessarily

#

Just at maven?

muted dirge
#

where i can learn java ?

undone axleBOT
ivory sleet
#

Untrue

tardy delta
#

Maybe better to uee ifpresent tho

ivory sleet
#

FourteenBrush sure but going declarative because some dude thought it was always good is probably wrong

tardy delta
#

Hmm

ivory sleet
#

Theres nothing wrong with:
Optional o = asOptional()
if o.isEmpty{
return
}
Object oo = o.get()

hardy swan
ivory sleet
#

orElse sort of defeats the point

brave goblet
#

I wanna test if an elytra breaks but ofc the elytra isn't in your hand

#

so now i was thinking of using this

#

but i don't understand it

quaint mantle
#

what are you doing

brave goblet
quaint mantle
#

are you making plugins

brave goblet
#

datapack

#

for custom advancements

quaint mantle
#

then just ask, but dont expect an answer lol

brave goblet
#

:P

quaint mantle
#

😛

#

nooooo

#

i dont want to turn that off

brave goblet
#

AHAHA

#

:p

brave goblet
quaint mantle
#

like i know where to turn it off

#

but i just dont want to, even though that makes me unhappy

brave goblet
tardy delta
grim ice
#

what should my database pk be like? its uuid rn

#

but i dont like uuid displaying first cuz its ugly

#

:(

ivory sleet
#

I mean using uuid as primary key is fine?

quaint mantle
#

who cares about ugly bruh

#

if that is a database

ivory sleet
#

After all that’s the primary identification for players

#

So it’s only natural

hardy swan
sinful kelp
#

I'm making a SkyWars plugin for a friend. I've been thinking of the best way to do this and want your thoughts.

Filling chests, on loading into the game? Or when a player opens the chest.

I was thinking of making the chests unable to be broken or exploded.

ivory sleet
#

I’d fill all chests in the beginning

grim ice
#

and fill them each 5 minutes

ivory sleet
#

Since the chest might get broken or opened other ways than what a player is a capable of

grim ice
#

make a refilling class

warm light
#

What will be the path for this?

grim ice
#

and you can just do

ivory sleet
#

Drop.AXOLOTL.Chance

grim ice
#

refillingClass.generateItems();

quaint mantle
#

What is a projectile subclass?

#

I’m trying to make like a tnt arrow enchantment

ivory sleet
#

How does your first question relate to the latter information

grim ice
#

right?

ivory sleet
#

Yeah tho that could cause NPE given that any of the nonlast methods return null

grim ice
#

but none of it should be null

#

if it is then it will print a warning so ig

ivory sleet
#

should doesn’t assert that

#

But ye

#

Both works

quaint mantle
#

It’s asking for a subclass for that method

ivory sleet
#

Arrow maybe?

#

Snowball?

ivory sleet
#

Depends on what entity type you want

grim ice
#

oh player

ivory sleet
#

We really don’t know what you want here

quaint mantle
#

I just need the bow to fire tnt

#

With the same velocity

grim ice
#

u cant

ivory sleet
#

I don’t know maybe look at the tnt interface then?

grim ice
#

with that method

#

tnt doesnt extend projectile

#

Snowball for example does

#

AbstractArrow, Arrow, DragonFireball, Egg, EnderPearl, Fireball, Firework, FishHook, LargeFireball, LingeringPotion, LlamaSpit, ShulkerBullet, SizedFireball, SmallFireball, Snowball, SpectralArrow, SplashPotion, ThrowableProjectile, ThrownExpBottle, ThrownPotion, TippedArrow, Trident, WitherSkull

warm light
blazing scarab
grim ice
#

these are your only options

grim ice
#

eitherway Chance:

#

doesnt have anything

#

in front of it

#

right?

warm light
quaint mantle
ivory sleet
#

?jd-s tho

undone axleBOT
grim ice
#

what is ??

warm light
#

wdym?

grim ice
#

show me

#

your config