#help-development

1 messages · Page 2256 of 1

quaint mantle
#

?kick!!!

mortal hare
#

In my country we have January 13th, February 16th and March 11th as our national days

river oracle
#

Yo can we get a pr to fix that

#

Imajin

#

Do it

quaint mantle
#

Fuck that

eternal night
#

Did Imajin contribute anything yet ?

#

have never seen them on the spigot stash

quaint mantle
#

not to spigot

mortal hare
#

send a packet

eternal night
#

ah

mortal hare
#

packette

river oracle
#

Packette

quaint mantle
#

packete

eternal night
#

Yea, packet might be the only real solution here outside of repeatably setting it

eternal night
#

|| or switching to paper and using better API run ||

mortal hare
#

garlic bread is the best

eternal night
#

a universally true statement

river oracle
#

What do you have to do to beable to contribute to spigot

eternal night
#

sign the CLA

river oracle
#

CLA?

pliant oyster
#

WorldGuardPlugin#getRegionManager no longer exists, what should I use now?

eternal night
#

?contributing

#

aww

#

?contribute

eternal night
#

eyy

river oracle
#

Is it a gov document cuz then I can't not 18 moment

eternal night
#

no

mortal hare
#

EnumMap vs switch case

#

guys

#

what's better

eternal night
#

but you have to provide your full legal name and address and shit

river oracle
eternal night
#

no

#

if you'd have to dox yourself to contribute, spigot would have less than the 2 contributors rn

maiden thicket
#

💀

river oracle
#

Why would I give my address hell nah ill just fork it and make changes I want lol

eternal night
#

fork it != contributing to it

river oracle
#

Yea ik but 🤷‍♂️

eternal night
#

and like, have fun forking spigot

eternal night
#

it is pain

mortal hare
#

forking paper isnt 😉

eternal night
#

it isn't 🙂

river oracle
#

Ə

river oracle
eternal night
#

no

#

but like

#

spigot toolchain is just painful

river oracle
#

Figures

mortal hare
#

Finally IE is DEAD

#

imagine how much relief web devs have after this

river oracle
#

I'm curious why you gotta send that info to contribute

brave sparrow
eternal night
#

Well you are signing a contract

#

yea

mortal hare
#

they can finally remove those activeX shitty polyfills

brave sparrow
#

Then you can’t contribute

river oracle
#

F

eternal night
#

how young are you o.O

#

if you can use discord you can sign that contract

brave sparrow
#

It’s to protect spigot from some idiot like Wolverness contributing and then DMCA the codebase years later

#

Like he did to bukkit

river oracle
#

I thought you had to be 18 to sign any contracts

pliant oyster
#

WorldGuardPlugin#getRegionManager no longer exists, what should I use now?

river oracle
#

Atleast in America

brave sparrow
#

You need parental consent under 18

river oracle
#

Ye fuck nah

eternal night
#

Do you ? dunno about the US, but like

#

you should not have to

brave sparrow
#

You definitely should

eternal night
#

but ehhh, this is not legal advise and I am not a lawyer 🙂

brave sparrow
#

As a minor you legally can’t enter into any kind of contractual agreement

#

It’s not enforceable

#

That’s why parents have to co-sign

#

Kids aren’t expected to know better

pliant oyster
#

fuck sake can someone answer my question

brave sparrow
#

I’m sure worldguard has a discord for their API

#

Ask there

twilit nimbus
#

I'm trying to add tab completion to my command which supports multi-word arguments in quotes, and everything's working except if you manually type the first word along with the space, the visual moves to the next word, and if you then press tab it inserts the whole string. Is there a way to stop that? A specific example of the command I'm trying to get to work is /war start "Team One".

kind hatch
#

You can't have spaces in your arguments because a space denotes the next argument. Even if it's in quotes. You'd end up with args[0] = "Team and args[1] = One"

glass sage
#

Hello does anyone know how i could send a pure packet without going through the netty thread? and therefore send it whenever I want without being dependent on the 20 tick limit

dusk flicker
kind hatch
#

Not without a lot of potential jank.

twilit nimbus
#

I have it all working except when I actually press tab in the second word it inserts the whole string instead of just the missing part.

buoyant viper
#

interact probably fires for right click, i just want left

glossy venture
#

i think for left too

#

but idk

#

oh no nvm

#

maybe not

paper viper
#

And also you can use quotations for arguments to define a String

#

If you use brigadier, a greedy string will take anything after

quaint mantle
#

pulsebeat

#

fix my buildtools problem

pliant oyster
#

How would I change a players name tag, not using scoreboard or setDisplayName

#

Basically lets say you want a prefix for the player, only the nametag above his head, not in tab or chat or anything

#

Custom name wont work btw, "This value has no effect on players, they will always use their real name."

crude loom
crude loom
pliant oyster
#

I cant use CraftPlayer for some reason

lost wolf
#

How can I access and modify an Entity's data similarly to the /data command?

pliant oyster
#

attributes?

#

idk what u mean

lost wolf
#

I'm trying to access a ZombieVillager's level, in a Villager you can access this value with the method getVillagerLevel(), but ZombieVillagers lack that specific method

#

In game you can use the command /data get entity <entityid> VillagerData.level to read this value

#

I haven't tried that, I'm currently unfamiliar with that concept

#

Is this the only way to access this information?

river oracle
#

Ye

#

Reflection I'd op

lost wolf
#

But the villager level doesn't seem to be accessible through a ZombieVillager object 🤔

crude loom
#

is it possible to check a player's title?

lost wolf
#

Which public method?

crude loom
#

I mean the title displayed by player.sendTitle

#

thinking about it there is a simpler solution for what I tried to do

#

but thanks for the help!

golden turret
#

can i pass a null ItemStack in the array of PlayerInventory#setArmorContents?

glass mauve
#

its @Nullable ItemStack[] items

twilit elbow
#

Hi, where can I contact support on spigotmc page / open a ticket?

tender robin
#

why does this not work?

@EventHandler
    public void onJoin(PlayerJoinEvent e) {
        Player p = (Player) e.getPlayer();

        Bukkit.getScheduler().runTaskLater(plugin, new Runnable() {
            @Override
            public void run() {
                if(p.hasPermission("fthme.join.gm")) {
                    p.setGameMode(GameMode.CREATIVE);
                    p.sendMessage(SP + "§5KREATIV");
                }else{
                    p.setGameMode(GameMode.ADVENTURE);
                }
            }
        }, 20L);

    }
undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

tender robin
#
Caused by: java.lang.IllegalArgumentException: Plugin cannot be null
        at org.apache.commons.lang.Validate.notNull(Validate.java:192) ~[spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-21fe707-741a1bd]
        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.validate(CraftScheduler.java:397) ~[spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-21fe707-741a1bd]
        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:123) ~[spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-21fe707-741a1bd]
        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:119) ~[spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-21fe707-741a1bd]
        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.scheduleSyncDelayedTask(CraftScheduler.java:102) ~[spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-21fe707-741a1bd]
        at net.fthme.com.jumpsystem.Listeners.joingm.onJoin(joingm.java:25) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-21fe707-741a1bd]
        ... 14 more
#

Error message

hybrid spoke
#

so your plugin variable is null

tender robin
#

y

buoyant viper
#

fuk if we know

tender robin
#
    public static Plugin plugin;

    public joingm() {
        this.plugin = plugin;
    }
quaint mantle
#

ew

tender robin
#

lmao

#

what else can I do so it works?

crude loom
#

where do you initialize this class?

buoyant viper
#

this.plugin = plugin

#

what

#

?learnjava

undone axleBOT
quaint mantle
#

this.nullVariableFromStaticContext = null;

crude loom
#

oh i didnt notice you dont pass a variable there

trim creek
#

Aight what kind of problem a plugin can get, that a unused code (basically just two slashes) are detected as errors?
(ex.: line 40 is //, and nothing more, but yet is still an error)

quaint mantle
#

Its not an error

#

show a screenshot of your code

trim creek
dawn plover
#

what event do i need to check for if someone is standing on a block

#

or is it even a event

buoyant viper
#

or get the block below them

#

and if its solid then yeah its a block

trim creek
buoyant viper
#

?jd-s for me self

undone axleBOT
buoyant viper
#

oh pog theres an Tameable interface

dawn plover
#

or at least not that i know of

#

but i will try to find the block below player, i think thats a good idea

tender robin
#

so guys what can I do with my code?

crude loom
buoyant viper
#

dont need the constructor since the field is static

#

but itd be better to use di probably

#

so add the parameter to constructor and then make the field non static

#

?di

undone axleBOT
loud junco
# tender robin ```java public static Plugin plugin; public joingm() { this.plu...
    private Plugin plugin;

    public joingm(Plugin plugin) {
        this.plugin = plugin;
    }

Initialize the class in your main class i guess and pass the plugin there - dunno, this looks like you're passing the bukkit's Plugin class which you should not unless your main class is called Plugin. Change it to your main class (that should extend JavaPlugin).

#

as of now, you were passing the variable to itself

dawn plover
#

i saw that, but isnt that when a player is moving only

#

so when a block get changed while a playing is standing still

#

it wont react

river oracle
#

When you change a block maybe you can check I'd there are entities above it and apply logic there

dawn plover
#

oh, right

#

thats actually good idea

trim creek
tender robin
loud junco
#

without doing what?

#

i expect you did everything static, which is a way but a ugly way

tender robin
loud junco
#

yeah, i would split your events into a Listener class

tender robin
#

but I just wanted to know if I did it right or not

loud junco
#

and register them - getServer().getPluginManager().registerEvents(new YourListenerClass(), pluginInstance);

fallen steeple
#

Packet armorstand not working anymore ?

#

because i dont have suggestion like "setCustomDisplayName" or something like that

ebon topaz
#
if (event.getEntityType().toString().equals("ENDERMAN")) {}
```how would I make this like a if not return
fallen steeple
#

else ?

modest garnet
#

if your in intellij type .not after ("ENDERMAN")

#

??

fallen steeple
#

if(){
// Code
} else {
// Code
}

ebon topaz
modest garnet
ebon topaz
#

Like cancel if it’s not enderman

fallen steeple
#

its a event ?

modest garnet
#

return <what u want to return>; <--- if not void

if void just put return

#

?learnjava

undone axleBOT
slim brook
#

Hello guys

#

Do you know an API or anything for use custom_model_data or similar in 1.8 ?

#

I'm searching since 2 days but i didn't found anythings work

#

It's for add an texture to a custom item

spare heron
#

And i dont think they are alternative

slim brook
#

Yeah I know that why i'm asking if someone have alternative

slim brook
#

I saw that in youtube video

modest garnet
#

or just deal with a ping and stop crying

slim brook
#

Maybe cause i ping back him but he did first X)

river oracle
#

I always ping on reply

slim brook
#

Yeah that logic

#

But not for all that i see

modest garnet
slim brook
#

F**k

#

If someone have an idea or alternative if you can send me a mp :3

river oracle
slim brook
#

Yeah maybe

lost matrix
buoyant viper
river oracle
fallen steeple
#

why nms methods are hidden

river oracle
#

They aren't

#

Depending on what you want to call

fallen steeple
#

For armor stand

lost matrix
#

Stop complaining about the adhd pvp and invent a new exciting custom pvp mechanic.

lost matrix
fallen steeple
#

I want to do NMS armostand to make armorstand display the name of player in 1.16 it work but in 1.19 i cant see the methods

fallen steeple
#

i used buildtools and replace spigot api with spigot in maven

lost matrix
fallen steeple
#

oh okay

lost matrix
fallen steeple
#

ah yeah I'm damn late

#

there is a tutorial to learn how to use nms in 1.19 ? because i searched about 2 hours and i cant found nothing

lost matrix
fallen steeple
#

Thx!

#

oh yeah i didnt see 1.17 is clickable

fossil eagle
#

Anyone use Maven in VSCode? I'm trying to build my first Maven project but I'm having some problems.

#
& : The term 'g:\Downloads\Spigot 1.16.5 Server\plugins\' is not recognized as the name of a cmdlet, function, script file, or operable 
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:3
+ & "g:\Downloads\Spigot 1.16.5 Server\plugins\" package -f "c:\Users\Da ...
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (g:\Downloads\Sp...Server\plugins\:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException```
#

Unless I'm not doing it right.

vocal cloud
#

99% of people use intellij so

modest garnet
#

maybe dont use vscode lol

viral pike
#

Hello, i have question
I just want to change a value and it doesn’t change anything

main.getConfig().set("whitelist.work",false);
main.saveConfig();```
Config.yml
```yml
whitelist:
  work: true 

Thank you in advance 😄

fossil eagle
#

I prefer VSCode to Eclipse.

river oracle
#

Vscode is nice lol I like it but I don't use the bloatware called windoes

fossil eagle
river oracle
#

Otherwise for command line I'll use mvn clean install

fossil eagle
#

What button are you pressing? I've tried the "package" and "install" ones and they don't work.

river oracle
#

You also have a command not found compiler errorr lolI

fossil eagle
#

Yeah it's running this command when I try "install" the project.

river oracle
#

Try just mvn clean install in the proper directory including the pom

fossil eagle
#

Not sure how to get it so that I can use maven from the command line tbh

timber lodge
#

Plugin antiRedstoneClock

modest garnet
#

how to remove the "no API version" method in the console
as i want my plugin to work on any version.
is this the wrong way to do it and if so how do u do it

fossil eagle
river oracle
#

Yea

fossil eagle
#

Thanks for the help

river oracle
#

Get good next time

fallow crescent
#

hello

got this error

river oracle
#

Hi

fallow crescent
#
org.bukkit.command.CommandException: Unhandled exception executing command 'awc' in plugin AntiWitherCreation v1.0
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper.jar:git-Paper-794]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[paper.jar:git-Paper-794]
    at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:826) ~[paper.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.PlayerConnection.handleCommand(PlayerConnection.java:2185) ~[paper.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.PlayerConnection.c(PlayerConnection.java:2000) ~[paper.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:1953) ~[paper.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.PacketPlayInChat.a(PacketPlayInChat.java:49) ~[paper.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.PacketPlayInChat.a(PacketPlayInChat.java:7) ~[paper.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:35) ~[paper.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[paper.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[paper.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[paper.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[paper.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1271) ~[paper.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1264) ~[paper.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[paper.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1225) ~[paper.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1139) ~[paper.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[paper.jar:git-Paper-794]
    at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
    at eu.cuziamnoah.antiwithercreation.commands.AntiWitherCommand.onCommand(AntiWitherCommand.java:22) ~[?:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper.jar:git-Paper-794]
    ... 19 more
[03:35:49 INFO]: CuziamNoah lost connection: Disconnected
[03:35:50 INFO]: CuziamNoah left the game
#

What I do wrong?

river oracle
#

Null points error

fallow crescent
#

and that means?

#

How do i fix

river oracle
#

Idk 🤷‍♂️ theree a null point error I have 0 other information from you other than that I'll help yoh here and send a few useful links

fallow crescent
#

wait

#

that's the line

river oracle
#

?npe

undone axleBOT
#

The NullPointerException, (commonly referred to as NPE), is thrown in the following cases, but not sealed to: 1. null is passed into a method or constructor which does not allow it; 2. When trying to access a field on an object pointing to null; 3. Casting null to a primitive. See https://stackoverflow.com/a/3988794/17047120 for information on how to debug NPEs.

fallow crescent
#

I want to fix the error, not to know what the error is.

river oracle
#

Don't you have to know what it I'd to fix it

#

If I spoon feed you here you'll come back if you learn you'll beable to do it yourself in the future

river oracle
fallow crescent
#

/awc

river oracle
#

Ok now when you do args[0] that's an array of arguments you send.

#

You can't check for something that could exist without checking if it exists first

fallow crescent
#

yes i know that, but I don't know how to change that.

river oracle
#

For example your assuming every time someone runs aws they will have an argument such as enable or disable attached

fallow crescent
#

I'm very new in java

river oracle
#

So your assuming they will add an argument like so

/aws enable
/aws disable

So if someone were to run
/aws
and you check if an argument exists null a synonym of nil or nothing will return because there Is no argument

fallow crescent
#

Ok and how do I add the argument for aws?

river oracle
#

Now how do you combat null pointer errors or npe so it's fairly simple

#

Pretty simple

#

You can do something like

If object == null or in the case of an array of arguments you check for length so if length == 1 the following things can happen

#

Command arguments are structured like most list indexes in programming for example you can think of it like do
/aws arg0 arg1 arg2 arg3 arg4
And so in

#

If you were to run
/aws it's obvious that arg0 doesn't exist so therefore when you go looking for it it won't return anything and be out of index

#

Indexes always start at 0

fallow crescent
#

okay hmm

#

then enable args1

#

and disable args2

#

or what

river oracle
#

No so you want your commands to look like this right?

/aws enable
/aws disable

fallow crescent
#

yes

#

and /aws for an info about the plugin

river oracle
#

So enable and disable in the examples above are at the index 0

#

So when you do args[0] it'll get enable and disable

fallow crescent
#

ok

river oracle
#

But with the current way your code is structured it's automatically assuming your command will always have 1 argument

#

So you need to check if that array (think of it as a list) is 1 item long

#

Before you can check if the argument is enable or disable

fossil eagle
#

A null pointer error is when you try and dereference something that doesn't exist.

fallow crescent
#

damn

fossil eagle
#

So you have a pointer that's not working properly.

fallow crescent
#

and what do i must change that /aws works?

#

not only /aws enable / disable

river oracle
#

You need to check array length to see if it contains 1 argument before checking if its enabled or disable

#

so the sudo code would be
If array is length of atleast one continue to logic

or alternatively

If array isn't length of 1 return true

fallow crescent
#

ok

river oracle
undone axleBOT
river oracle
#

Other useful resources for basics below

river oracle
undone axleBOT
lime moat
#

Is there a tag/guide to learn how to make my plugin compatible with other versions?

#

Right now, it works with 1.18 and 1.19... I need it to work with 1.16.5 and 1.17 as well.

still light
#

how to modify/update code in a plugin you already added to your server in real time?

buoyant viper
lime moat
# buoyant viper just make sure u use components that exist for all of those versions

I get this error: [22:18:52 ERROR]: Could not load 'plugins/RaidTheMine-Core.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.18 at org.bukkit.craftbukkit.v1_16_R3.util.CraftMagicNumbers.checkSupported(CraftMagicNumbers.java:361) ~[patched_1.16.5.jar:git-Paper-794] at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:149) ~[patched_1.16.5.jar:git-Paper-794] at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:414) ~[patched_1.16.5.jar:git-Paper-794] at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:322) ~[patched_1.16.5.jar:git-Paper-794] at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:393) ~[patched_1.16.5.jar:git-Paper-794] at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:269) ~[patched_1.16.5.jar:git-Paper-794] at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1074) ~[patched_1.16.5.jar:git-Paper-794] at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-794] at java.lang.Thread.run(Thread.java:831) [?:?]

buoyant viper
#

or make ur code do things as similarly as possible if X version doesnt have what Y did

#

use the lowest version api u need to support

lime moat
#

I'm almost certain the components aren't new that I'm using since it's very basic stuff :P

#

Where can I change my api version, sorry?

buoyant viper
#

build.gradle or pom.xml

#

and plugin.yml

lime moat
buoyant viper
#

change ur paper version in there to be 1.16 instead of 1.19 too

#

and then in plugin.yml make api-version: 1.16

lime moat
#

<version>1.16-R0.1-SNAPSHOT</version> like this?

buoyant viper
#

yeah

#

something like that

lime moat
#

Dependency 'io.papermc.paper:paper-api:1.16-R0.1-SNAPSHOT' not found oof

buoyant viper
#

sec let me look at their mvn repo

lime moat
#

Thank you!

buoyant viper
#

so com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT maybe

lime moat
#
    <dependencies>
        <!--This adds the Paper API artifact to the build -->
        <dependency>
            <groupId>com.destroystokyo.paper</groupId>
            <artifactId>paper-api</artifactId>
            <version>1.16.5-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>``` Like this?
buoyant viper
#

looks right

lime moat
#

java: package net.kyori.adventure.text.minimessage does not exist damn. Okay, welp no gradients 😂

buoyant viper
#

F

#

idk which version added the special text stuff

lime moat
#

I thought it was 1.16, but not a clue

buoyant viper
#

hmm

#

well minimessage is @young vine's no? they might be able to help

#

ur also better off asking this stuff in papers discord considering ur working with paper related stuff

#

this is a spigot

lime moat
#

Fair, I'll go there for the minimessage support

#

Thank you so much! :D

ancient plank
#

special text stuff

lost matrix
#

Was about to say...

quaint mantle
#

7smile7

#

Whats your github

lost matrix
#

nope

#

Too much embarrassing old garbage

quaint mantle
#

Show

ancient plank
#

my new projects are still garbage

#

just own up to it

lost matrix
quaint mantle
#

Cute doe

lost matrix
#

Yes thats me

ancient plank
#

beautiful

buoyant viper
quaint mantle
#

What the fuck bro

#

Why does everyone havemore stars than me

lost matrix
quaint mantle
#

7smile7

ancient plank
#

I have 1 star on some of my projects

#

because I star my own projects

quaint mantle
#

💀

#

relatable

#

the most stars i got is 4

#

on ivm

#

thats not even finished

#

lmao

hardy swan
#

Fork projects with many stars

lost matrix
quaint mantle
#

Screenshot 816?

#

goddamn

lost matrix
#

stop gathering my meta data

kind hatch
#

Quit posting it then. :PP

#

♟️

quaint mantle
lost matrix
hardy swan
#

Only occurs to me here that these are two emojis

lost matrix
#

I really missed having emotes when i didnt boost. How do youy guys survive without shitposts?

quaint mantle
#

:big_slime:

kind hatch
#

Ayeee, I got shooters.

quaint mantle
#

me waiting for mojang to add custom glass pane colors

ancient plank
#

PeepoRunRee suspect is fleeing

quaint mantle
#

How to make shooting particle

#

I shoot the particle like beam

#

pew pew

#

yk

buoyant viper
quaint mantle
#

Feel like making a texture for all 16581375 combinations of color?

#

Feel like writing a python script to do that for you?

#

I dont know which one would be worse

pliant oyster
#

What packets would I use to set a players name tag?

humble tulip
#

Packet

quaint mantle
#

setCustomName

pliant oyster
humble tulip
pliant oyster
#

only mobs and other entities

ancient plank
buoyant viper
buoyant viper
river oracle
#

Python is good

#

If you use it properly

#

Scripting in Java is icky get out of here

quaint mantle
#

Shutup

#

Dont talk to me

#

I got 68 rep on stackoverflow 😤

river oracle
#

The clout

quaint mantle
#

Ikr

river oracle
#

If you hate on Python your just a beta male

quaint mantle
#

I really wish i could kick you

river oracle
#

Lol

buoyant viper
quaint mantle
#

How tf do i get one rep

river oracle
buoyant viper
#

idk i dont have an SO account

river oracle
#

Can someone help me figure out how to code a spigot plugin in python

buoyant viper
#

just hack the JVM

quaint mantle
#

I know the ?ask command says to be patient but i am helper and we are friends therefore the rules do not apply

buoyant viper
#

doesnt ask just say dont ask to ask

#

?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!

river oracle
#

Shut the hell up

#

Make the particles go brrrrrr in a direction imajin

still light
#

how to modify/update code in a plugin you already added to your server in real time?

quaint mantle
#

restart

still light
#

is there any faster way to do it

river oracle
#

Alternatively if you want to include memory leaks and unintended errors in your plugin you could reload

quaint mantle
#

^

river oracle
#

Otherwise stick with restart👍

still light
#

how do you edit the code in a plugin?

hardy swan
#

Open compiled class in the jar files

#

And edit them with your unmatched knowledge of the compiled language

hardy swan
still light
hardy swan
#

Edit or make?

still light
#

make and then edit

hardy swan
#

Oh, then it is whatever that has been replied

hardy swan
still light
#

got it thanks all

hardy swan
#

If you meant to debug your plugin and find it troublesome to restart every time you make a change, there are some debugging tools out there able to connect to the server

#

But every time I use it my server will just crash after some time being stuck on the same tick lolol

ivory sleet
rough basin
#

how to change attack speed of item without NMS?

lost matrix
rough basin
#

is it affects all of item?

#

i can't code now so i cant test

lost matrix
rough basin
#

I was asking if items like 'apple' could modify the attack speed, not only tools.

#

Bruh said it too hard.
Can I make the dragon with a speed of 2?

lost matrix
rough basin
#

yeah thanks

#

I almost forgot all

humble tulip
#

O redempt made plugwoman

lime moat
spare prism
#

Is there a way to make this using Bukkit/NMS?

lost matrix
spare prism
lime moat
#

I don't understand... it just builds a pox.xml jar file, what?

quaint mantle
#

Cus pom was selected as module?

lime moat
quaint mantle
#

You should just use build in maven. "Mvn clean install"

sleek dragon
#

can I append a ComponentBuilder to another ComponentBuilder?

#

How could I run a function that returns several Components that I want to append to a ComponentBuilder?

lime moat
vocal cloud
#

You can append components to each other no?

sleek dragon
#

You can make a new ComponentBuilder and append stuff to it like TranslatableComponents or TextComponents but I have a function that creates a long list of Translatable/Text components appended together and i want to append those to the main ComponentBuilder in a different function

quaint mantle
#

I think you can use the search bar and just enter maven clean install, the option will show then.

vocal cloud
#

Then pass the builder into those functions?

sleek dragon
#

idk why i didnt think of that

#

thanks

lime moat
ivory sleet
#

Doesn’t look like it

#

That’s the maven life cycle interface if I am not mistaken

lime moat
ivory sleet
#

Same

#

You usually use BukkitAudiences.create(plugin)

#

And well… first check if the class is loaded during runtime if you’re not providing a classload of it yourself

lost matrix
lime moat
ivory sleet
#

^ + a bunch of qol features

lime moat
#

Nvm, I think I got it installed.

quaint mantle
lime moat
#

Now, time to try it :P

humble tulip
#

click edit configurations, add a maven configuration, command is clean install and click save or add or whatever, then run the configuration

#

@lime moat

ancient plank
#

mister "I made java in python" guy

humble tulip
#

wait that was a serious question?

#

LOL i thought he was joking

#

@quaint mantle single beam or like a projectile?

lime moat
#

Okay, I fixed the building after installing the dev plugin. Now, how can I change the build java version? (I need java 16)

humble tulip
#

in your pom

#

maven compiler source and target to 16

lime moat
#

Ah, thank you!

quiet ice
#

Add the maven-compiler-plugin and set source and target OR relese

lime moat
#
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/froostysnoowman/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 60.0``` still appears to not work
quiet ice
#

Alternatively use the properties to set target+source

lime moat
#
    <properties>
        <maven.compiler.source>16</maven.compiler.source>
        <maven.compiler.target>16</maven.compiler.target>
    </properties>```
humble tulip
#

oh wait nvm

#

60 is 16

#

are you building with maven?

quiet ice
#

IDE moment

lime moat
#

No, with the Intellij build.

humble tulip
#

build with maven

quiet ice
#

Do not use the IDE

humble tulip
quiet ice
#

Most important step

lime moat
humble tulip
#

yeps

#

idk why ur jre is invalid

lime moat
#

Ah, I don't have java 16 installed on my pc. Do I need that?

humble tulip
#

tbh

#

idk

quiet ice
lime moat
#

I have a host :P

quiet ice
#

Ah

#

Still thanks to adoptium and similar installing a JDK is easy

lime moat
#

error while writing com.froostysnoowman.Commands.FlyCommand: could not create parent directories welp

#

That's the error I get when I build it with maven

quiet ice
#

Whaaa

humble tulip
#

select the working directory as your folder

dim palm
#

How can i fix this?

humble tulip
#

the folder ur code is in

quiet ice
dim palm
#

it has error

humble tulip
quiet ice
#

I'd discard the Error If it works anyways

humble tulip
#

maybe use the file selector to selcet the folder

quiet ice
#

My eclipse Install complains about These Plugins Not existing too

dim palm
quiet ice
#

But it still Runs anyways so eh

lime moat
dim palm
#

lol

quiet ice
dim palm
#

okay thanks

quiet ice
#

And find the proper coordinates

lime moat
#

I'm so lost

#

This makes no sense... what?

summer scroll
dim palm
#

my friend uses 1.8 too and he doesn't have that error

summer scroll
#

maybe try to restart the ide

#

or invalidate cache

dim palm
#

okay, thanks

lime moat
#

Nah. This IDE is just shit. What the hell

#

It doesn't make sense

dim palm
#

theres a basic course on youtube

lime moat
#

I've gone through every single tutorial to change the java version. It seems to be changed... then just isn't :D

ivory sleet
#

The IDE isn’t shit due to that, you just don’t know how to change said property… that’s all

lime moat
#

Dunno, I attempted to follow their docs, seems fine, but then just doesn't update?

lost matrix
lost matrix
lime moat
#

🙃

lost matrix
#

Show your pom

lime moat
lost matrix
#

Close all directories and make screenshot of your project structure.
And then show your pom.

lime moat
#

I can kinda build it with intellij... Maven has no hope right now...

But, when I build it and run it on a 1.16.5 server, I get this error: [02:32:23 INFO]: [IDunno] Enabling IDunno v1.0 [02:32:23 ERROR]: Error occurred while enabling IDunno v1.0 (Is it up to date?) java.lang.NoClassDefFoundError: net/kyori/adventure/sound/Sound$Emitter at com.froostysnoowman.test.Main.onEnable(Main.java:26) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.16.5.jar:git-Paper-794] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[patched_1.16.5.jar:git-Paper-794] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[patched_1.16.5.jar:git-Paper-794] at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:518) ~[patched_1.16.5.jar:git-Paper-794] at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:432) ~[patched_1.16.5.jar:git-Paper-794] at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:599) ~[patched_1.16.5.jar:git-Paper-794] at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:298) ~[patched_1.16.5.jar:git-Paper-794] at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1074) ~[patched_1.16.5.jar:git-Paper-794] at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-794] at java.lang.Thread.run(Thread.java:831) [?:?] Caused by: java.lang.ClassNotFoundException: net.kyori.adventure.sound.Sound$Emitter at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:155) ~[patched_1.16.5.jar:git-Paper-794] at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:114) ~[patched_1.16.5.jar:git-Paper-794] at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[?:?] ... 11 more [02:32:23 INFO]: [IDunno] Disabling IDunno v1.0

#

May be an Adventure error, but not 100% sure

ivory sleet
#

Adventure wasnt a part of paper in 1.16.5

#

You might have to shade and relocate

lost matrix
ashen quest
#

the embed and the picture

lost matrix
lime moat
#

I should have it

lost matrix
lime moat
#

It appears to have a build success now, what...

lost matrix
#

After deleting this config entry?

lime moat
#

Yes

#

Thank you for the maven help, I don't understand why that directory was doing that...

lost matrix
#

yes. After compiling with maven the error should be gone.

lime moat
ivory sleet
#

That’s just the Bukkit platform

lime moat
#
    <groupId>net.kyori</groupId>
    <artifactId>adventure-text-minimessage</artifactId>
    <version>4.11.0</version>
 </dependency>```
ivory sleet
#

You probably want to add just adventure as well

#

the base dependency

lime moat
#

Where would I do so?

#

(Also, would it work on 1.16.5-1.19)?

ivory sleet
#

It would but it’s a little bit special

#

You see…

#

In 1.16.5 adventure isn’t a part of paper

#

But in newer versions adventure is a part of paper (the classes get shipped with the paper jar)

lime moat
#

Yeah, that's also another thing, I need it to work with default spigot :P

ivory sleet
#

Why depend on adventure at all then?

lime moat
#
sender.sendMessage(MiniMessage.miniMessage().deserialize(prefix_message + ' ' + no_permission_message, Placeholder.component("permission", Component.text("rtm.fly"))));``` This is the only way that I'm aware of to replace something in my config file with something else
#

(replace <permission> with rtm.fly)

ivory sleet
#

Oh you use mini message

lime moat
#

Yes

ivory sleet
#

I mean why not just MiniMessage.miniMessage().deserialize(message.replace("<permission>","rtm.fly")) and then take the component and just convert it to text and send it

#

Suboptimal but that’s that

lime moat
#

So, something like java sender.sendMessage(MiniMessage.miniMessage().deserialize(message.replace("<permission>","rtm.fly"))); would send it?

ivory sleet
#

Not with spigot

#

Since deserialize yields an adventure component

young vine
#

Don't suggest text replacements when a full placeholder system exists

#

What's wrong with placeholders?

ivory sleet
#

Oh yeah don’t mind me on that one… but anyway you (froosty) probably have to shade both mini message and adventure to make that work on spigot 1.16.5

lime moat
#

How shall I shade? (I'm very new to Java if you couldn't tell heh)

young vine
#

To use MiniMessage on legacy systems you need to shade MiniMessage, adventure and adventure platform so that you can actually send components

#

But why support legacy when the majority moved on? :/

ivory sleet
#

^

lime moat
#

Most of my personal servers use 1.16.5 (for gamemodes), so I need to support that

ivory sleet
#

Time to update then

brave sparrow
#

Let him live lmao

ivory sleet
#

:<

lime moat
#

xd

brave sparrow
#

@lime moat shading with maven is a general Java thing rather than spigot, Google has plenty of resources on how to do it

lime moat
#

Okay, just so I'm not horribly on the wrong track... is this something that I should be looking at? https://datacadamia.com/maven/shade

ivory sleet
#

Else wise

#

Still gonna bugg you to update… but Alex there explains the concept of shading rather well I believe

lime moat
#

Thank you! I'll take a look

#

Thank you guys so much for your help :D

ivory sleet
#

👍

dim palm
#

i can't fix this

#

i reinstalled intellij and java

#

but it's still not working

lost matrix
dim palm
#

tried👍

quiet ice
#

Try to use the maven CLI I guess

lime moat
#

Quick question, would something like .replaceAll("<player>", target.getName() work instead of using MM?

ivory sleet
#

Maybe but I was in the wrong there, use the placeholder tag resolver

#

Probably works much better with mm

kindred valley
#

Im thinking for 6 hours how can i set the block type between z=2000, x=2000??

#

I know how to fill but i dont know how can i make a function

#
            for(int x= 2000; x> 0; x--){
                 //setting stuff
            }
}```
lost matrix
glossy venture
#

you can do it async

#

if you get the nms chunk

#

its block palette is synchronized

#

and yeah distribute it over multiple ticks

hybrid spoke
glossy venture
#

yeah it is

#

im pretty sure

hybrid spoke
#

but you can manually clock the semaphore behind it

#

its not, not in spigot

kindred valley
#

Is there any tutorial? I dont know what is nms

hybrid spoke
#

paper made it synchronized

glossy venture
#

oh

#

bruh

hybrid spoke
#

spigot will throw exceptions at you

glossy venture
#

sucks

chrome beacon
glossy venture
#

cant you synchronize it yourself

kindred valley
glossy venture
#

the data is volatile tho

hybrid spoke
glossy venture
#

BRUH does spigot have that async thread detector built into nms

#

thought only bukkit api

chrome beacon
#

There is a reason why that exists

#

You shouldn't modify the world on another thread

glossy venture
#

if its synchronized

#

you could

#

and the data itself is volatile

#

so it wouldnt cause any concurrency errors

hybrid spoke
glossy venture
#

you can do it per chunk sections

#

and if you subdivide the process into different threads, you can speed it up even more

#

if you make sure they all do different parts

#

and never conflict

ivory sleet
# glossy venture so it wouldnt cause any concurrency errors

Sure you can just put everything behind reentrant-able locks, but that will make your application suboptimal in terms of performance, if you wanna do things faster you’d have to java 9+ memory ordering effects along with compare and swap stuff, but that is hard to test and not at all trivial, as you probably know just setting everything to volatile isn’t very optimized either as you’d essentially be forcing local registries to flush too frequently if every non final variable would be put under memory effects of volatile (and as I hope you’re aware… volatile doesn’t solve all problems with concurrency inherently, especially when you need to invoke a set of operations in one go, where proper atomicity is needed)

humble tulip
#

words ^

glossy venture
#

dont think it would take too big of a performance hit, at least better than blocking the whole main thread with the operation

ivory sleet
#

I mean you can just distribute the operation over several ticks

#

As I believe smile even wrote a guide for that

humble tulip
#

people need to learn how to use repeating tasks as do{} while() loops

#

so many people sturggle to understand that

ivory sleet
#

Yup

humble tulip
#

i think i have something that can paste blocks tho

#

i'll paste it in a sec

dense crow
#

heyho, i have a question. i wanna make a door permission lock, what means that only permissions what i set to them can open the doors.. how do i do that? im trying since 2 months and found no working soloution

humble tulip
#
        Iterator<Block> iterator = cuboid.iterator();

        Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, () -> {
            for (int i = 0; i < BLOCKS_PER_TICK; i++) {
                if (!iterator.hasNext())
                    return;
                iterator.next().setType(blockTypes.generateRandom());
            }
        }, 0L, 1L);
#

@kindred valley

dense crow
humble tulip
#

tbh, if you're trying something like this for 2 months and havent found a solution, something is wrong with how you research stuff

#

what have you tried?

dim palm
dense crow
#

yeah

#

but got the problem

#

how do i set the permissions to the doors

humble tulip
#

huh?

#

what do u want the permission nodes to look like?

dim palm
#

if (player.hasPermission("door.perm")

lost matrix
dense crow
#

i thought its like u click it with a tool, the position of the door getting saved and when the players tries to click the door the locations getting checked and if he got the permission then he can open if not its getting cancelled

humble tulip
#

just need to add a cancel if it doesnt have a next

dense crow
#

my english isnt the best so sorry when u cant understand it very well

#

yeah but how do i register them

ivory sleet
#

?workdistribution (:

severe turret
#

Is there a way to make projectile undodgeable by Enderman

humble tulip
dense crow
#

just set nicks like med mex or something, little permissions i can add players to

humble tulip
#

dont use permissions to store data

dim palm
#

100% real

humble tulip
#

so u need to store trusted players

dim palm
#

easy

dense crow
#

yeah but i dont want to lock every door of that type yk

#

just only a few selected ones

subtle folio
#

is there a way to unobfuscate the nms code

ivory sleet
#

Can’t use moj mappings?

subtle folio
#

all the methods are A b

#

and that stuff

dim palm
earnest forum
dense crow
earnest forum
#

search the class and then the method

#

tells u moj mapping, obfuscated and spigot mapping

dim palm
#

store location and player

dim palm
#

ArrayList<Location, Player> magicdoors = new ArrayList<>();

dim palm
#

i think it is hashmap

#

lol

subtle folio
#

?learnjava

undone axleBOT
dense crow
dim palm
#

yea

dense crow
#

hmm sounds good to me..

severe turret
#

You mean map

dense crow
#

ill go try it, ty

severe turret
#

ArrayList can't have 2 types no?

#

🤔

dim palm
dense crow
#

o.O

dim palm
#

its hashmap

subtle folio
dense crow
dim palm
#

yep

subtle folio
#

PlayerInteractAtBlockEvent

#

i think

dense crow
#

im going try it

dim palm
#

?learnjava

subtle folio
#

there are multiple

#

gtfo

dim palm
#

😦

subtle folio
#

that was mean im sorry

dense crow
#

im such a dumb idiot, forgot to set the sticks names so the plugin recognizes them

dim palm
#

xd

severe turret
#

is there a way to make projectile undodgeable by enderman

mortal hare
#

PacketUtils.ensureMainThread() gets called everytime packet gets handled

#

and its native

kindred valley
#

iirc

subtle folio
#

is it possible to cancel jumping entirely? with or without nms?

brave sparrow
#

Very high jump boost

lost matrix
subtle folio
dim palm
#

PlayerToggleFlightEvent?

subtle folio
#

i tried calculating and canceling it

brave sparrow
subtle folio
brave sparrow
#

The high jump boost is the best strategy

kindred valley
#

Yeah i had many problems with move event too

subtle folio
#

i see

#

255?

brave sparrow
#

Yeah

#

Something along those lines

subtle folio
#

alright thank you all

humble tulip
#

Iterators kill the server?

#

Btw cancel if iterator doesn't have next

subtle folio
#

is it possible to replicate or fire the wardens sonic boom?

lost matrix
subtle folio
#

hmph i’ll do some digging and maybe some ray tracing then

cunning shard
#

what is the "prefix" thing and how do i use it

#

nvm

dense crow
#

okay im back, got it to save the location and owner, but now, how do i save multiple locations for one player?

lost matrix
lost matrix
subtle folio
#

For his use case it’s perfectly fine, no?

lost matrix
#

Its not perfectly fine. Its unclean.

#

It exposes data structures.

subtle folio
#

Unclean, how would you store it then?

lost matrix
#

Map<UUID, SomePlayerData>

subtle folio
#

In an object..

lost matrix
#

And SomePlayerData strongly encapsulates a List<Location>

subtle folio
#

Sure, kinda is the same thing though?

#

I guess not really.

#

i take that back

#

Object is better bc you can have multiple fields other than the said list if you wanted.

#

Alright

dense crow
#

ty

subtle folio
#

Don’t use that,

dense crow
#

okay

subtle folio
#

use what 7smile7 said instead

lost matrix
#

That is just a nice effect. But the real benefit is that the list is no longer exposed which makes your code
just so much more robust.

glossy venture
#

i wouldnt care about the list being exposed but it is nice to have the flexibility to add new fields

lost matrix
#

I would care very much if the list was exposed... It makes working with this data faster and cleaner.

#

Why would you write fragile code if you could just not?

glossy venture
#

yeah using a player data object is better

lost matrix
#

*And you could let the data object implement ConfigurationSerializable which means you can just put .set("some.player.path", playerData) it in a FileConfiguration.

dense crow
lost matrix
tranquil dome
#

Can I get support for ACF here?

lost matrix
#

Im using ACF for quite some while now

tranquil dome
#

I followed their setup guide for the paper version, but in my Main class it doesn't recognise PaperCommandManager

tranquil dome
lost matrix
tranquil dome
lost matrix
#

Or is it still red

tranquil dome
#

Oh hold on

#

It's still red, but now there's import class

#

wasn't there before

#

It works now, ty

lost matrix
tranquil dome
#

Thanks xD

subtle folio
#

what is acf?

small current
#

how can i get the ender dragon's fireball target ?

#

i could get the ghast target

dawn plover
#

how do i give players permisions tags
only thing i can find is player.hasPermission("blabla")

#

other thing, how do i check for multiple events at once

#

so like, something happens when i shift and right after that

echo basalt
#

Ghast#getTarget returns the ghast's target because a ghast is a single-target "simple" entity

#

The dragon has phases

small current
echo basalt
#

Uhh yeah

#

DragonFireball#getDirection / Fireball#getDirection

quartz basalt
#

if i have a plugin thats made for 1.18 but a player uses it on 1.19 how can i make it so the player can use 1.19 blocks if they are on 1.19 even though the plugin is in 1.18?

echo basalt
#

Material#valueOf should consider that

dawn plover
#

how would i add permision to players

#

or check for multiple events that happen right afther eachother

tender shard
tender shard
hushed pawn
#

Hello, did anyone know how to get vector from some location (x,y,z) to some player?

frosty tinsel
tender shard
#

just subtract the destination from the origin

hushed pawn
#

okay, now how to make hit from this direction looks like actual hit from player? xd

tender shard
#

normalize the vector and you should be fine

#

to normalize a vector, just divide it through it's length. there's probably a normalize() method too

wooden fable
#

Hey, is there a way to play custom sounds using spigot? (Those custom sounds are added with a resource pack)

#

Nvm, found it

worldly plover
#

can you help me with plugin

#

Caused by: java.lang.NullPointerException: Cannot invoke "ru.yooxa.yapi.Gamer.isPartyOwner()" because "gamer" is null
at ru.yooxa.party.PartyListener.onQuit(PartyListener.java:67) ~[?:?]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:298) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
... 11 more
plugin - https://dropmefiles.com/2t40I
I can't figure out what's wrong

worldly plover
#

I don't understand why it's null

lost matrix
#

Paste your code pls. And not as download

worldly plover
#

it's not mine plugin but it not obfuscated

#

can you help me pls?

lost matrix
#

Sure. Send the code.

#

PartyListener.java line 67. The whole method.

worldly plover
#

ok

#

just a send

#

a big thank you to you

tardy delta
#

?paste

undone axleBOT
hushed pawn
# tender shard normalize the vector and you should be fine

it still do some different type of kb, it just wired, tere is no vertical kb if im standing still, also power of kb depends on the distance from the block
i did
Location l1 = new Location(p.getWorld(),0.5, 2.62,0.5); Location l2 = p.getLocation(); Vector vec = l2.subtract(l1).toVector(); p.setVelocity(vec.normalize());

worldly plover
#

it's code of this plugin

restive kiln
#

is image on map 1.19 avalable

onyx fjord
#

should be

eternal oxide
tender shard
#

You gotta normalize the resulting vector lol

hushed pawn
#

i can still fly into the sky

eternal oxide
#

what? that is a unit vector from the player to the destination

hushed pawn
#

i also tried swap it

lost matrix
hushed pawn
#

i am trying to do a thing called reduce bot

mortal hare
#

Bukkit.createInventory(InventoryType.BEACON) is broken

#

beacon functionality is completely broken

#

it could be on purpose tho because there's no range

eternal oxide
#

Why are you creating an inventory instead of getting teh beacons inventory?

mortal hare
#

because i want to use Beacon's ui

#

as a GUI

eternal oxide
#

ah

mortal hare
#

Bukkit.createInventory() implementation is very hacky in spigot

#

but it works

#

it creates a Class CraftInventoryCustom which creates spoofed container class for NMS to delegate NMS container classes

#

the problem is that packet handling do not check if craft inventory is custom

#

basically packets gets handled only if container type is derived from the NMS container type

#

which is not the case with wrapped MinecraftInventory class since it directly implements Container interface

#

i bet enchantment table is broken too unless its patched inside delegation class

#

lemme check

visual tide
#

iirc yes

#

anvil, etable and beacon were all broken af when i last checked

mortal hare
#

anvil works fine

#

at least on paper

mortal hare
#

it has a patch inside CraftContainer

#

class to fix the anvil and crafting table

#

but not the enchanting table and the beacon afaik

#

oh man

#

Enchanting table is even more broken LOL

#

lemme record it

tardy delta
#

hmm buggy asf

mortal hare
#

Beacon GUI dont even provide default name when opened

#

beacon name is displayed by hovering the buttons normally

#

but instead i get container.beacon there

river oracle
#

Are you building everything from ground up with containers or using bukkot createInventory

mortal hare
paper viper
#

Nah

#

Yeah

river oracle
#

I tried but one interface I needed to use as a parameter was private and nested

mortal hare
#

this could be fixed easily by adding instanceof CraftInventoryCustom.MinecraftInventory minecraftInventory && minecraftInventory.getType() == InventoryType.INVENTORY_TYPE_OF_PACKET into each guard clauses of ServerGamePacketListener class

tardy delta
#

i'm currently having a KingdomsPlayer class, which is basically a wrapper for a player which provides some extra stuff etc. in my opinion, it would be better to store a WeakReference<Player> internally instead of callin Bukkit.getPlayerExact every time
so is this a good way to set the player object when its actually available, (async pre login event doesnt have a ::getPlayer)

mortal hare
#

since packet handling except for slot handling are being ignored for the most past

mortal hare
#

InventoryTypes are

river oracle
#

So even if you create another type there's no point since it can't be displayed by the client

glossy venture
mortal hare
#

NMS Container class and in some places Menu with SimpleContainer inside store the size data

tardy delta
#

yee

#

i also have a logout method which stops sending an actionbar and stuff and clears the reference

river oracle
glossy venture
#

hopper yeah

river oracle
#

Eh bad example

#

Like 6 or something that's not pre existing

mortal hare
#

unless there's menu type which provides 5 slots

river oracle
#

Hmmm interesting

mortal hare
#

closest i can think of is hopper

river oracle
#

Would you think it'd look fucky or just break

mortal hare
#

just use Bukkit.createInventory(InventoryType.Hopper)

#

and you're fine

river oracle
#

I'm just talking about non-conventional inventory sizes

mortal hare
#

for slot operations this method is not broken

mortal hare
#

and make implement a new class

#

in order to desync other slots

river oracle
#

Do you have to send packets on click to make it seem like there's no free slof

tardy delta