#help-development

1 messages ยท Page 614 of 1

remote swallow
#

you have to register it lowercase in getCommand and have it lowercase in plugin.yml

quaint mantle
#

ok

#

ion know bro i started today

tender shard
#

you can check if a string equalsIgnoreCase another string but you cannot do getCommand with equalsIgnoreCase

tender shard
#

tl;dr just use the same CaSe for plugin.yml and getCommand

quaint mantle
#

ok

quaint mantle
#

[19:37:29 ERROR]: Error occurred while enabling VoidTimerPlugin v1.0 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "org.thehole.voidtimerplugin.VoidTimerPlugin.getCommand(String)" is null
at org.thehole.voidtimerplugin.VoidTimerPlugin.onEnable(VoidTimerPlugin.java:35) ~[VoidTimerPlugin.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.1.jar:git-Paper-68]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.1.jar:git-Paper-68]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:639) ~[paper-1.20.1.jar:git-Paper-68]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:550) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:435) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-68]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

tender shard
#

show your plugin.yml and your code

quaint mantle
#

!paste

#

bro

#

i forgot the command

remote swallow
#

?aste

tender shard
#

?paste

undone axleBOT
remote swallow
#

?paste

undone axleBOT
quaint mantle
#

plugin.yml:

name: VoidTimerPlugin
version: '${project.version}'
main: org.thehole.voidtimerplugin.VoidTimerPlugin
api-version: '1.20'
commands:
timer:
description: abc123
usage: /timer {seconds}

ItemTimer:
description: nbc123
usage: /itemtimer [material] [seconds]

createhole:
description: abc123
usage: /createhole

quaint mantle
chrome beacon
quaint mantle
#

i did

chrome beacon
#

Not in the code you sent or that plugin.yml

quaint mantle
#

i changed timer, itemtimer and createhole to lowercase

tender shard
remote swallow
#

this doesnt look lowercase

tender shard
#

why don't you just make all commands lowercase?

#

timer, itemtimer and createhole
in plugin.yml and in your code

quaint mantle
#

to do that

#

i changed itemtimer to lowercase

young knoll
#

It's 3 commands

#

It doesn't take long to do manually

quaint mantle
#

so i just replace

#

itemTimer with itemtimer

#

Timer with timer

#

and createHole with createhole

tender shard
#

how come you now are talking about "Timer" when in the code you sent, it was "timer" already

quaint mantle
#

incase i missed it

quaint mantle
# tender shard how come you now are talking about "Timer" when in the code you sent, it was "ti...

[19:45:38 ERROR]: Error occurred while enabling VoidTimerPlugin v1.0 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "org.thehole.voidtimerplugin.VoidTimerPlugin.getCommand(String)" is null
at org.thehole.voidtimerplugin.VoidTimerPlugin.onEnable(VoidTimerPlugin.java:35) ~[VoidTimerPlugin.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.1.jar:git-Paper-68]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.1.jar:git-Paper-68]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:639) ~[paper-1.20.1.jar:git-Paper-68]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:550) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:435) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-68]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

#

WHERE IN THE HELL

tender shard
#

what's line 35

quaint mantle
#

WHAT IN THE FUCK DO I DO

remote swallow
#

run a clean build

quaint mantle
#

I DIDNT

#

DO

#

UPPERCASE

chrome beacon
#

Show your plugin.yml

tender shard
#

are you using the new .jar?

eternal oxide
#

command is still not in your plugin.yml

quaint mantle
quaint mantle
#

what do you mean

eternal oxide
#

bro

quaint mantle
#

name: VoidTimerPlugin
version: '${project.version}'
main: org.thehole.voidtimerplugin.VoidTimerPlugin
api-version: '1.20'
commands:
timer:
description: abc123
usage: /timer {seconds}

ItemTimer:
description: nbc123
usage: /itemtimer [material] [seconds]

createhole:
description: abc123
usage: /createhole

#

WHAT DO I CHANGE HERE

eternal oxide
#

like dude, read my lips man, bro

quaint mantle
#

NOW WHAT

tender shard
#

dude can you stop writing in this annoying way pls

quaint mantle
tender shard
#

open your .jar with winrar, check your plugin.yml there

quaint mantle
#

bro

#

im so dumb

tender shard
#

what was the issue?

quaint mantle
#

i didnt notice itemtimer was Itemtimer

#

the first letter was uppercase

#

๐Ÿ’€

tender shard
#

so line 35 was itemtimer instead of timer?

quaint mantle
#

itemtimer was in line 36

tender shard
#

but the stacktrace mentions line 35

quaint mantle
#

i guess something with the spacing messed it up

quaint mantle
twin venture
#

Hi after few tries and error with redis i got it some kind working ..

chrome beacon
#

We did mention that multiple times though

twin venture
quaint mantle
#

[19:50:21 ERROR]: Error occurred while enabling VoidTimerPlugin v1.0 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "org.thehole.voidtimerplugin.VoidTimerPlugin.getCommand(String)" is null
at org.thehole.voidtimerplugin.VoidTimerPlugin.onEnable(VoidTimerPlugin.java:35) ~[VoidTimerPlugin.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.1.jar:git-Paper-68]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.1.jar:git-Paper-68]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:639) ~[paper-1.20.1.jar:git-Paper-68]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:550) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:435) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-68]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

#

im dead bro

twin venture
#

it just load the data not the new one ..

quaint mantle
#

โšฐ๏ธ

remote swallow
#

i bet you arent updating your jar

quaint mantle
#

and then im rebuilding it

remote swallow
#

do you use maven

quaint mantle
#

yes

remote swallow
#

or well

#

have a pom.xml

quaint mantle
#

yes

remote swallow
#

out isnt the correct output folder ten

#

its target

tender shard
#

it also keeps throwing errors for line 35

#

yet they claim Itemtimer was line 36

quaint mantle
remote swallow
#

where

tender shard
#

?paste your full pom

undone axleBOT
young knoll
#

Run maven clean package to clear any old stuff

eternal oxide
#

don;t set the output destination of the jar

tender shard
#

you probably fucked up changing the output directory and are hence constantly using an old version

quaint mantle
tender shard
#

you haven't changed the output directory at all

#

your jar is in target/

#

it's target/VoidTimerPlugin-1.0.jar

chrome beacon
#

Hope this isn't a case of them using Artifacts for building ๐Ÿ’€

tender shard
#

probably it is. How do you compile @quaint mantle ?

quaint mantle
twin venture
#

not sure if iam doing anything wrong ..

eternal oxide
#

he's using artifacts as he's set to java 1.8 but compiling against 1.20

chrome beacon
#

It should still be Java 8

quaint mantle
#

and as a jar

#

and then

eternal oxide
#

doesn;t 1.20 require 17?

tender shard
#

maven -> lifecycle -> package

quaint mantle
#

oh

tender shard
eternal oxide
#

ah ok

tender shard
#

i always use jdk 17 (and access java 17 dependencies like spigot or worldguard) but still compile for 1.8

quaint mantle
#

so the compile button?

chrome beacon
#

API is Java 8
NMS and implementation is Java 17
iirc

quaint mantle
#

under validate?

chrome beacon
#

Open it and find package

quaint mantle
#

yeah its open

eternal oxide
#

wrong quote ๐Ÿ˜›

eternal oxide
quaint mantle
#

oh package

#

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: io.papermc.paper:paper-api:jar -> duplicate declaration of version 1.20.1-R0.1-SNAPSHOT @ line 85, column 21
[ERROR] 'repositories.repository.id' must be unique: papermc-repo -> https://repo.papermc.io/repository/maven-public/ vs https://repo.papermc.io/repository/maven-public/ @ line 65, column 17
[ERROR] 'repositories.repository.id' must be unique: sonatype -> https://oss.sonatype.org/content/groups/public/ vs https://oss.sonatype.org/content/groups/public/ @ line 69, column 17
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.thehole:VoidTimerPlugin:1.0 (C:\Users\goofy\IdeaProjects\VoidTimerPlugin\pom.xml) has 2 errors
[ERROR] 'repositories.repository.id' must be unique: papermc-repo -> https://repo.papermc.io/repository/maven-public/ vs https://repo.papermc.io/repository/maven-public/ @ line 65, column 17
[ERROR] 'repositories.repository.id' must be unique: sonatype -> https://oss.sonatype.org/content/groups/public/ vs https://oss.sonatype.org/content/groups/public/ @ line 69, column 17
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

Process finished with exit code 1

tender shard
#

you declared paper-api twice

quaint mantle
#

error

tender shard
#

why? don't do that

quaint mantle
#

oh shit

tender shard
#

same for the repository

quaint mantle
#

i think i copy pasted it two times

tender shard
#

you also got the papermc-repo there twice

#

both should only be there once

#

delete these

quaint mantle
#

there

#

i changed it to once

tender shard
#

now compile it again

quaint mantle
#

bro

#

[19:59:01 ERROR]: Error occurred while enabling VoidTimerPlugin v1.0 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "org.thehole.voidtimerplugin.VoidTimerPlugin.getCommand(String)" is null
at org.thehole.voidtimerplugin.VoidTimerPlugin.onEnable(VoidTimerPlugin.java:35) ~[VoidTimerPlugin.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.1.jar:git-Paper-68]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.1.jar:git-Paper-68]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:639) ~[paper-1.20.1.jar:git-Paper-68]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:550) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:435) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-68]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

tender shard
#

you're still using an old version

#

did you even copy the new .jar?

quaint mantle
#

YES

tender shard
#

which jar?

eternal oxide
#

get the jar from your target folder

quaint mantle
#

there are two jars

tender shard
#

which did you copy

quaint mantle
#

original and normal

#

i copied the normal one

tender shard
#

how is it called exactly

eternal oxide
#

delete all teh jars on your server. Then copy one

quaint mantle
#

i did the second one

#

i double clicked package

tender shard
#

there's no way any of those is the correct one

#

the correct one is exactly called "VoidTimerPlugin-1.0.jar"

#

without any underscores or anything

quaint mantle
#

original-VoidTimerPlugin-1.0.jar

tender shard
#

no

quaint mantle
#

VoidTimerPlugin-1.0.jar

tender shard
#

the correct one is exactly called "VoidTimerPlugin-1.0.jar"

dawn ledge
#

HI, it's me again,
I spawn a display entity with that : RA.spawn(pointer, BlockDisplay.class, en -> { en.setDisplayWidth(1); en.setDisplayHeight(1); BlockData block = en.getBlock(); BlockState state = block.createBlockState(); state.setType(Material.BLACK_CONCRETE); state.update(); en.setBlock(block); });
but I can't see my entity in the world. did somedy know how to set the block displayed in my entity ?

tender shard
quaint mantle
#

and it shows the error

#

๐Ÿ’€

tender shard
#

DM me your .jar

young knoll
#

Just do en.setBlock(Material.BLACK_CONCRETE.createBlockData())

quaint mantle
#

OH SHIT

tender shard
quaint mantle
#

@tender shard

tender shard
#

and the paper-plugin.yml it contains still uses ItemTimer

quaint mantle
#

shit

#

im blind

#

i thought paper-plugin and plugin.yml were the same

dawn ledge
tender shard
quaint mantle
#

it was feault

#

default

#

with intellij

#

when i opened the project it was like that only

#

there was an option called paper manifest or smth

#

also i just realized

#

i had both the jars

#

in the plugins folder

tender shard
#

it was because you chose "paper plugin" and not "spigot plugin"

quaint mantle
#

๐Ÿ’€

tender shard
quaint mantle
#

[20:05:34 ERROR]: Error occurred while enabling VoidTimerPlugin v1.0 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "org.thehole.voidtimerplugin.VoidTimerPlugin.getCommand(String)" is null
at org.thehole.voidtimerplugin.VoidTimerPlugin.onEnable(VoidTimerPlugin.java:35) ~[VoidTimerPlugin-1.0.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.1.jar:git-Paper-68]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.1.jar:git-Paper-68]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:639) ~[paper-1.20.1.jar:git-Paper-68]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:550) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:435) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-68]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

#

stilil doesnt work

#

i fixed the itemtimer

#

and i put in the right jar

tender shard
#

send me your .jar again

#

new jar is correct, except that you still use paper-plugin.yml

#

the .jar in your server's folder is not the one you DMed me

quaint mantle
#

it is

tender shard
#

then it wouldn't complain about line 35

quaint mantle
#

what

#

ok

#

let me heck

#

i removed

#

all plugins

#

and im trying again

tender shard
#

stop the server

quaint mantle
#

i stopped the server and restart it

rose trail
#

Is there something similar to CompletableFuture but reusable? I need to arrange to receive Bungeecord messages

quaint mantle
#

[20:09:03 ERROR]: Error occurred while enabling VoidTimerPlugin v1.0 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "org.thehole.voidtimerplugin.VoidTimerPlugin.getCommand(String)" is null
at org.thehole.voidtimerplugin.VoidTimerPlugin.onEnable(VoidTimerPlugin.java:35) ~[VoidTimerPlugin-1.0.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.1.jar:git-Paper-68]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.1.jar:git-Paper-68]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:639) ~[paper-1.20.1.jar:git-Paper-68]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:550) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:435) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.20.1.jar:git-Paper-68]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-68]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

#

which line 35 is this tlaking about bro

#

istg

tender shard
#

this line 35

quaint mantle
#

here how about i send you the code and you compile it

#

and then lets check

#

ok nvm

#

@tender shard what do i do ๐Ÿ˜ญ

tender shard
#

you are still using this weird paper-plugin.yml file

#

it must be called plugin.yml

quaint mantle
#

ok

#

should i rename it

tender shard
#

yes

quaint mantle
#

ok

#

done

tender shard
#

compile it and try it

#

should work

quaint mantle
#

ok

#

YES

twin venture
#

after 2 day's of debugging , and using varius things to fix it ... i endded up at the start ..

using redis rn but it does not seem to fix it ..

quaint mantle
#

NOW

#

COMMAND TEST

#

TO SEE

#

IF IT WORKS

#

YESSSSSSSSSSSSSSS

#

@tender shard have my future kids

#

i dont want em

#

thank you for your guidance sire ๐Ÿ™

tender shard
#

np, but I also don't want your kids lol

#

maybe you can sell them on ebay, idk

quaint mantle
#

ok

marsh fog
#

Hello Every one hope u have a nice day! I am wondering how can I redirect java server logging from txt file to C++ application and how can I send commands from C++ app to java server? thx!

alpine urchin
#

connect to the server with ip and port in code

#

find a way to encode and decode your packets on both ends

marsh fog
#

mhmmm

chrome beacon
#

If you have access to the server you can use JNI

marsh fog
chrome beacon
#

Use JNI

marsh fog
#

I have never touched Java before XD!

#

well I think it's time to downgrade lol

#

from C++ -> Java XD

chrome beacon
marsh fog
#

oh alright I really appreciate ur help thx!

edgy crystal
chrome beacon
#

I wouldn't call it a downgrade

#

They both have their uses

marsh fog
#

lol

hazy parrot
#

Or just send it over websocket or some kind of socket

upper hazel
#

what event i can use for check when player jump in horse

marsh fog
chrome beacon
marsh fog
#

bruh i am trying to have render distance in minecraft to max and still the game lags lol

eternal oxide
#

in horse?

upper hazel
#

yes

chrome beacon
eternal oxide
#

no idea what you mean

chrome beacon
#

It's not Javas fault that MC runs poorly

marsh fog
upper hazel
#

when he click SPASE end jump when he seat in HORSE

eternal oxide
#

jump statistic increase event

tender shard
#

cyberpunk was one of the most boring games I ever played lol. and the dialogues were generic and boring

upper hazel
#

a

marsh fog
#

they didn't think that the game would get popular

umbral ridge
#

Is this supposed to be main hand or off hand?

eternal oxide
#

read teh deprecation

umbral ridge
#

I'll use PlayerInventory ๐Ÿค“

upper hazel
tender shard
#

funny how spigot got a horse jump event but not a player jump event lol

twin venture
mossy halo
#

Sorry, asking the wrong thing, getting too far ahead in one question

buoyant viper
#

u could try tracking their onGround state and motion but

tender shard
tender shard
mossy halo
tender shard
#

e.g. like this

    private static final TypeToken<Structure> STRUCTURE_TYPE_TOKEN = new TypeToken<Structure>() {};

    private static Structure deserialize(String json) {
        return GSON.fromJson(json, STRUCTURE_TYPE_TOKEN.getType());
    }
    
    private static String serialize(Structure structure) {
        return GSON.toJson(structure, STRUCTURE_TYPE_TOKEN.getType());
    }
#

(GSON is a normal gson instance)

upper hazel
#

Component name = event.getName();

  • how get name in string format
mossy halo
tender shard
mossy halo
#

org.bukkit.generator.structure.Structure

#

My end goal is to save/load a list of them to use in world.locateStructure

tender shard
#

oh well that class doesn't really have any fields, there's nothing to serialize

mossy halo
#

Like

"structures": ["WOODLAND_MANSION", "JUNGLE_TEMPLE"]```
tender shard
#

wouldn't it be enough to simply get the namespacedkey?

#

Structure.MANSION.getKey().toString() ?

#

that should return "minecraft:woodland_mansion" etc

#

there's nothing else to serialize

chrome beacon
#

Tbh I'd just use a yml file

mortal hare
#

just look at RollerCoaster tycoon

#

it was written in assembly

#

yet ran on any potato pc of that time

mossy halo
tender shard
#

tbh I still think you don't need to serialize anything. You can simply get the structure's name, and then later on get the structure back through the name. unfortunately Structure has no getByKey so I'd loop over the Structure class's fields or sth, idk

    private static String getStructureName(org.bukkit.generator.structure.Structure structure) {
        return structure.getKey().getKey().toUpperCase();
    }

    private static Structure getStructureByName(String name) {
        try {
            for(Field field : org.bukkit.generator.structure.Structure.class.getFields()) {
                if(field.getName().equals(name)) {
                    return (Structure) field.get(null);
                }
            }
            return null;
        } catch (ReflectiveOperationException ex) {
            throw new RuntimeException(ex);
        }
    }
#

Ofc itd be better to cache that

mossy halo
#

tbh I still think you don't need to serialize anything.
I'm serializing a data class which contains a HashSet<Structure> which is then iterated and passed into world.locateStructure, I'm just figuring out how to save/load it with it containing the hashset

tender shard
#

Just turn your set<structure> into a set<string> with the names as above

#

Then use a typetoken for set<string>

bright spire
#

Its like not responding and compilation freezes

#
        <repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.8.8-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>```
#

This are my dependencies

next stratus
#

Hey, does anyone know how to remove a Item from the world? I spawned things in using the Item class and made it non-pickupable but can't work out how to remove it ๐Ÿ˜…

next stratus
#

I tried that but it's not going ๐Ÿค”

#

I take that back, I was just really dumb!

tender shard
# mossy halo I'll give this a go, ty!

so basically if you just wanna turn a Set<Structure> into a gson string and then back into a Set<Structure>, i'd do it like this

private static final Map<org.bukkit.generator.structure.Structure, String> STRUCTURE_NAMES = new HashMap<>();
    private static final Map<String, org.bukkit.generator.structure.Structure> STRUCTURES_BY_NAME = new HashMap<>();
    
    private static final TypeToken<Set<String>> STRING_SET_TYPE_TOKEN = new TypeToken<Set<String>>() {};
    
    private static final Gson GSON = new GsonBuilder().create();

    static {
        try {
            for (Field field : org.bukkit.generator.structure.Structure.class.getFields()) {
                STRUCTURE_NAMES.put((org.bukkit.generator.structure.Structure) field.get(null), field.getName());
                STRUCTURES_BY_NAME.put(field.getName(), (org.bukkit.generator.structure.Structure) field.get(null));
            }
        } catch (ReflectiveOperationException ex) {
            throw new RuntimeException(ex);
        }
    }

    private static String getStructureName(org.bukkit.generator.structure.Structure structure) {
        return STRUCTURE_NAMES.get(structure);
    }

    private static org.bukkit.generator.structure.Structure getStructureByName(String name) {
        return STRUCTURES_BY_NAME.get(name);
    }

    {
        Set<org.bukkit.generator.structure.Structure> myStructures = new HashSet<>();
        String json = GSON.toJson(myStructures.stream().map(structure -> getStructureName(structure)).collect(Collectors.toSet()));
        // ...
        Set<String> structureNames = GSON.fromJson(json, STRING_SET_TYPE_TOKEN.getType());
        Set<org.bukkit.generator.structure.Structure> myStructures2 = structureNames.stream().map(name -> getStructureByName(name)).collect(Collectors.toSet());
    }
mossy halo
next stratus
mossy halo
#

I ended up with a type adapter which is doing the job

public class StructureSerializer implements JsonSerializer<Structure>, JsonDeserializer<Structure> {
    @Override
    public JsonElement serialize(Structure src, Type typeOfSrc, JsonSerializationContext context) {
        return new JsonPrimitive(src.getKey().getKey().toUpperCase());
    }

    @Override
    public Structure deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
        for(Field field : org.bukkit.generator.structure.Structure.class.getFields()) {
            if(field.getName().equals(json.getAsString())) {
                try {
                    return (Structure) field.get(null);
                } catch (IllegalAccessException e) {
                    e.printStackTrace();
                }
            }
        }
        return null;
    }
}
tender shard
#

oh yeah that might work too. but I'd rather cache the structures by name as in my code above

#

using reflection is hella slow compared to a normal map

mellow pebble
#

hi so i am making spigot plugin and i added my server .jar file as dependency so i can access imports from the server and it is uploaded properly i would say and it appears that i can import and everything registers perfectly but when i build plugin to .jar file it throws errors that package doesnt exist and that it couldnt find symbol but everything in IDE seems to be registered properly like it found everything

#

is it maybe because im using maven so it causes problems if i put dependencies like this

sullen marlin
#

is your server jar 1.8

mellow pebble
#

yup

#

1.8.8 from get bukkit website

tender shard
#

dude

delicate lynx
#

...

ivory sleet
#

๐Ÿ’€

tender shard
#

build it yourself, downloading it is illegal lol

#

?bt

undone axleBOT
delicate lynx
#

probably modified too

mellow pebble
#

mhm

#

build > rebuild project and build again worked

tender shard
#

yeah still you're using some unofficial spigot .jar that might contain ANYTHING lol

mellow pebble
#

yes it contains malware but i like to have malware on my pc

ivory sleet
#

Doesnโ€™t make it more justified

#

Illegal quite literally means illegal no matter how you advert your eyes from the meaning of the word

mellow pebble
#

will i get in trouble for downloading it ?

remote swallow
#

Yep

#

Ur going to jail tomorrow

remote swallow
#

Thats optics job

mellow pebble
floral drum
#

weee

mellow pebble
#

im bout to ........

remote swallow
#

Get the feet outta here

austere cove
#

๐Ÿ”จ <-- ban hammer @mellow pebble don't make me do something for once

tender shard
#

meters > feet

alpine urchin
#

bruh

tender shard
#

even 3 feet are < 1 meter

sly surge
#

@mellow pebble mining bitcoin with your minecraft server rn

young knoll
#

Everyone outside of America has big wooden sticks instead of feet

#

Itโ€™s a bit weird

remote swallow
#

I use knots

young knoll
remote swallow
#

Whats that in monkeys

young knoll
#

About 3

remote swallow
#

Small

#

Still needs the magnum condom

tender shard
young knoll
#

Feckin hell I had to google that one

#

Also you spelt it wrong smh my head

quaint mantle
#
                Messages.Kits.COOLDOWN
                    .runReplacements(Replacement("cooldown", formattedCooldown))
                    .send(player)

What do you guys think about this for a message config system?

tender shard
#

is that kotlin or what's Replacement(...) ?

quaint mantle
#

new Replacement(...)

#

same thing as that its just kotlin doesnt have new

tender shard
#

so it is kotlin, yeah that's what I asked lol

#

because if it'd been java, it'd been weird

quaint mantle
#

yeah

#

What do u think about the actual system tho im not sure how else to do it

tender shard
#

looks good, but hard to tell without seeing the code. right now it looks like COOLDOWN is an enum or sth, so I wonder what runReplacements() does

quaint mantle
#

COOLDOWN is an enum

golden turret
#

Lets say I want to import a dependency A in Gradle and that dependency has 2 compileOnly dependencies (C and D). If I add the A dependency as compileOnly, will I have the C and D dependencies, or do I need to include them?

tender shard
#

and runReplacements then returns what?

quaint mantle
#
fun MessagesSection.runReplacements(vararg replacements: Replacement): Component {
    var message = getFromConfig()

    for (replacement in replacements) {
        message = message?.replace("<${replacement.key}>", replacement.value)
    }

    return MESSAGES_MINI_MESSAGE.deserialize(message ?: throw MissingMessageException("Your messages.yml file is missing a message. (${key})"))
}
tender shard
#

oh damn I shouldn't have asked for code after knowing that it's kotlin lol

quaint mantle
#

its the exact same D:

#

in java except for the loop and ?

tender shard
#

and the fact that types are on the wrong side

#

and that the method seems to be declared in a different class

quaint mantle
#

its because MessageSection is an interface

#
    enum class Chat(override val key: String) : MessagesSection {
        NO_ITEM_IN_HAND("NO_ITEM_IN_HAND"),
        NO_PERMISSION_LINKS("NO_PERMISSION_LINKS"),
        ITEM_ONCE_PER_MESSAGE("ITEM_ONCE_PER_MESSAGE");

        override fun getConfigPath(): String {
            return "Chat"
        }
    }

}

interface MessagesSection {

    val key: String

    /**
     * @return The path to the config section. Ex. Server
     */
    fun getConfigPath(): String
}
tender shard
#

i'll never understand why kotlin moved the types to the end of the declaration

buoyant viper
#

i mean even Scala does it iirc

#

and TypeScript n plenty of other langs

tender shard
#

yeah but it's weird and unnatural

#

the type is much more important than the name imho

strange wolf
#

Does anyone know how I can use target selectors like @a and @p in my custom plugin command?

tender shard
#

there's a method in Bukkit for that

strange wolf
#

Will try that out, thanks

short raptor
#

Hello friends, is giving chickens the ability to attack players something that is possible using plugin?

kind hatch
#

Should be with PathfinderGoals

umbral ridge
#

did spigot die for 5sec

tender shard
#

happened earlier already

young knoll
#

Youโ€™ll also need to do some jank to give them the attack damage attribute

#

Otherwise they will break the universe when they attack something

buoyant viper
umbral ridge
young knoll
#

Not the shart

vapid verge
#

Anyone know when an item is checked to break? Is it inside PlayerItemDamageEvent? Iโ€™m manually damaging an item, but itโ€™s causing it to go negative and not break.

quaint mantle
ionic terrace
#

Does anyone know if it's possible to use Files.copy with a file that's already in use by the plugin? I've tried just doing that function but I'm getting this message. Am I doing something wrong? [23:57:06] [Server thread/ERROR]: Error occurred while enabling BugReport v0.6.0 (Is it up to date?) java.lang.RuntimeException: java.nio.file.FileSystemException: plugins\BugReport\bugreports.db: The process cannot access the file because it is being used by another process

next zinc
#

Anyone know how to create a custom mob with NMS in 1.20?

ionic terrace
#

No other code in the plugin uses the file. BugReportDatabase is just called from the main plugin file on load before everything else.```java
public class BugReportDatabase {
public Connection connection;

private final String databaseFilePath;

public BugReportDatabase(String databaseFilePath) {
    this.databaseFilePath = databaseFilePath;
    checkForOldDatabases();
}

private void checkForOldDatabases() {
    String[] columns = {"id", "playerName", "player_id", "worldName", "header", "message", "hasBeenRead"};
    try {
        //
        File databaseFile = new File(databaseFilePath);
        File oldDatabaseFile = new File(databaseFilePath + ".old");

        try {
            Files.copy(databaseFile.toPath(), oldDatabaseFile.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }```
echo basalt
#

mans making his own database or something

ionic terrace
#

.... How else am I supposed to store reports?

#

Maybe a json file but idk ๐Ÿคทโ€โ™‚๏ธ

next zinc
quaint mantle
#

you have no shortage of options

crimson tinsel
#

Guys how am i supposted to get the enchantment level of an tool/armor

tribal quarry
# umbral ridge

i think the whole discord just resets itself, it happened to some servers, not sure why

tribal quarry
# crimson tinsel Guys how am i supposted to get the enchantment level of an tool/armor

i think first you need to have the Player object then:

Player player;

PlayerInventory inv = player.getInventory();
ItemStack helmet = inv.getHelmet(); // for example helmet here

// then you have the Map<Enchantment, Integer> here, which defines enchantment as key and level as value
helmet.getEnchantments().forEach(((enchantment, level) -> {
     System.out.println("enchant: " + enchantment + ", level: " + level);
}));
tribal quarry
vapid verge
#

Any easy way to break an item?

rare rover
#

What's y'all thoughts on CommandAPI? Or should I just make my own API to fit my personal preference

rare rover
#

Oh sick

#

Thanks

quaint mantle
#

yeah

#

acf on top

drowsy helm
#

but yeah no point re inventing the wheel for command frameworks

#

nothing that hasnt been done

rare rover
young knoll
quaint mantle
#

Basic math question: How can I write a function to given a rank (integer) calculate the price of a rank, I want it to scale but not to an unreasonable amount

vapid verge
drowsy helm
#

an exponential is probably the best option

rigid otter
#

Can I dynamically unload a plugin? But not clear them all, just a specific plugin.

drowsy helm
#

"not an unreasonable amount" is very broad aswell

quaint mantle
#

Yeah in not sure how to classify it, like make it still enjoyable for players but not too easy

young knoll
young knoll
rigid otter
#

It's not

drowsy helm
#

again, "enjoyable" is extremely subjective

rigid otter
#

It only disables, but not get rid of PluginManager#getPlugins()

quaint mantle
#

I'll just try trial and error

rigid otter
#

Or I misunderstood something?

young knoll
#

Why do you need to fully unload it

rigid otter
#

Because it can lead to duplication

#

Since I can load them as many times as I want, and in the #getPlugins(), it rerurns all

young knoll
#

Not sure you can unload them with the api

#

You probably need reflection/NMS

rigid otter
#

But I couldn't find any article talking about that. I mean I don't know how.

young knoll
#

See comment 15

rigid otter
#

Ahh, thank you.

wet breach
#

But also not sure why you need a dynamic way to unload plugins either just restart the server

rigid otter
#

I see them inside PluginManager#getPlugins() array

echo granite
#

Plugin#isDisabled

grizzled oasis
#

how can i add if someone has already a potion effect to add time, in "vanilla" seems to not be possible

buoyant viper
#

you can try removing the potion effect and readding it @grizzled oasis

grizzled oasis
buoyant viper
#

otherwise effects can only have time "added" to if the new effects time > remaining time

#

but idk if bukkit intervenes

#

its weird

rigid otter
# echo granite Use a stream and filter the disabled plugins

When I load a new one, there will be 2 loaded plugins with the same name and Plugin#isEnabled()=false is also the same. So which one will be chosen by PluginManager#getPlugin(NAME)? Or how I know which one in PluginManager#getPlugins() is the new version of the-same-name plugin?

echo basalt
#

The second one doesn't load

torn shuttle
#

there's no easy way via api to restore 100% of a player's inventory in one call right

#

you have to target all the different slots?

echo basalt
#

It's a bitch

torn shuttle
#

u's a bitch

echo basalt
#

But you can just call setContents

torn shuttle
#

hm

paper venture
#

Is it possible to run an async task that copies a folder and deletes another? (using it to reload the map)

#

For now the entire server is lagging for several seconds when this process happens

torn shuttle
#

not only is it possible but it's how you're supposed to be doing it in the first place

torn shuttle
upper hazel
#

how to get horse hp at the moment. I want to get the horse's hp when it is hit, but on damage event I get the previous value from the current one

torn shuttle
#

ah I got it, it was doing a shallow copy of the inventory

#

yeah works pretty well

sullen canyon
upper hazel
#

what is the calculation formula?

#

or formula not exisist

eternal night
#

do you mean the "forumla" of "current hp - event.getFinalDamage()" KEKW

upper hazel
#

a

#

lol

silent steeple
#

i am coding a minecraft plugin with custom blocks called gens, these gens spawn items on top of them but i haven't done that part yet. basically when a gen is placed it just looks like a regular block, how do i know which block is regular and which is a custom block (gen)

quaint mantle
#

you could store a list or all gen locations and or apply a custom PDC tag marking it as a gen

echo basalt
#

?blockpdc

undone axleBOT
upper hazel
#

?paste

undone axleBOT
upper hazel
#

I went into a stupor and do not understand how to get the distance from the old location of the horse and the new one in order to calculate how much the horse has traveled. https://paste.md-5.net/ukapupaqov.cs

#

horseData need for check horse

echo basalt
#

Put your oldLocation variable inside your runnable class

#

Then to check distance

#

oldLocation.distance(newLocation)

upper hazel
#

all I solved the problem through get end set

#

a wait

#

oh now i see i need map

silent steeple
undone axleBOT
quaint mantle
#

Illusion sent that earlier for u

silent steeple
#

didnt see

#

mb

#

how reliable are these pdcs

echo basalt
#

They're serialized along the chunk data

silent steeple
#

is there a method to get every item in a players inv

#

nvm

silent steeple
#

how do i get the name of a placed block

#

like lets say i placed a dirt called "durt"

#

how do i check with blockplaceevent if itss named durt

wet breach
silent steeple
#

there no method .getName()

wet breach
#

If its a custom block would need to fetch its pdc or metadata

silent steeple
#

how do i get the metadata

wet breach
#

there is BlockMeta if i am not mistaken

buoyant viper
#

?jd-s 4 me

undone axleBOT
silent steeple
wet breach
#

Material name for vanilla blocks

remote swallow
#

the name of the placed block with be the material

buoyant viper
#

maybe BlockPlaceEvent#getItemInHand().getItemMeta().getDisplayName() ?

wet breach
#

If its custom you will have to resort to pdc or metadata

silent steeple
#

its not custom its just named

remote swallow
buoyant viper
#

true

remote swallow
#

you have to format material.toString

buoyant viper
#

but im just saying thay its probably how u could get the name if its "Durt"

wet breach
silent steeple
#
                System.out.println("Placed custom block");
            }
            System.out.println("no ");```
#

thats my code

echo basalt
#

"no "

#

Love it

silent steeple
#

yessir

wet breach
#

Lol

echo basalt
#

Frosty can you explain pdc to him

quaint mantle
#

@remote swallow im stuck at another problem

wet breach
quaint mantle
#

๐Ÿ’€

echo basalt
#

I'm out to get breakfast

buoyant viper
# echo basalt "no "

my debug sysouts normally follow this order

"fuck"
"gay"
"shit"
"a", "b", "c", etc

silent steeple
wet breach
buoyant viper
silent steeple
wet breach
#

So if you are talking about the item in the inventory that is different from a block in the world

#

As one is an itemstack the other is a block

undone axleBOT
silent steeple
#

ight look

#

this is the block

wet breach
#

Yeah that is an itemstack while its in the inventory

quaint mantle
#

so basicallyfrom my yesterdays code i installed the worldedit dependency on my project, and i did some worldedit imports, but now when i try and compile it, its giving me an error

#

can somebody help

silent steeple
#

ok so when its placed how do i know its custom

wet breach
#

The moment you place it, none of that stuff transfers to the block

silent steeple
#

so how wouldi k now

wet breach
#

So you will need to use pdc to input custom data using the above link

silent steeple
#

bro i dont like pdcs i know its possible without it

wet breach
#

Then you will need blockmeta

silent steeple
#

how do i get it

quaint mantle
#

@remote swallow u there

wet breach
#

?jd-s

undone axleBOT
remote swallow
#

ye

wet breach
quaint mantle
#

i tried importing worldedit

#

i have the dependency installed

#

but when i try and compile it

#

it gives me import errors

remote swallow
#

?paste ur pom and the log

undone axleBOT
silent steeple
#

e.getBlockPlaced().getBlockData().getMaterial().getData().getName().equals("durt") @wet breach

#

does that work

echo basalt
#

Learnjava moment

wet breach
#

No because as i said the block will not retain what the itemstack has

quaint mantle
#

[ERROR] /C:/Users/goofy/IdeaProjects/VoidTimerPlugin/src/main/java/org/thehole/voidtimerplugin/VoidTimerPlugin.java:[3,27] package com.sk89q.worldedit does not exist
[ERROR] /C:/Users/goofy/IdeaProjects/VoidTimerPlugin/src/main/java/org/thehole/voidtimerplugin/VoidTimerPlugin.java:[4,27] package com.sk89q.worldedit does not exist
[ERROR] /C:/Users/goofy/IdeaProjects/VoidTimerPlugin/src/main/java/org/thehole/voidtimerplugin/VoidTimerPlugin.java:[5,34] package com.sk89q.worldedit.bukkit does not exist
[ERROR] /C:/Users/goofy/IdeaProjects/VoidTimerPlugin/src/main/java/org/thehole/voidtimerplugin/VoidTimerPlugin.java:[6,34] package com.sk89q.worldedit.bukkit does not exist
[ERROR] /C:/Users/goofy/IdeaProjects/VoidTimerPlugin/src/main/java/org/thehole/voidtimerplugin/VoidTimerPlugin.java:[7,32] package com.sk89q.worldedit.math does not exist
[ERROR] /C:/Users/goofy/IdeaProjects/VoidTimerPlugin/src/main/java/org/thehole/voidtimerplugin/VoidTimerPlugin.java:[8,35] package com.sk89q.worldedit.regions does not exist
[ERROR] /C:/Users/goofy/IdeaProjects/VoidTimerPlugin/src/main/java/org/thehole/voidtimerplugin/VoidTimerPlugin.java:[9,39] package com.sk89q.worldedit.world.block does not exist
[ERROR] /C:/Users/goofy/IdeaProjects/VoidTimerPlugin/src/main/java/org/thehole/voidtimerplugin/VoidTimerPlugin.java:[34,13] cannot find symbol

echo basalt
#

Thanks

wet breach
#

You are either going to need to put custom data into the block or track it some other way

undone axleBOT
wet breach
#

Not sure why this is so hard to understand

silent steeple
#

because you are being vague

quaint mantle
buoyant viper
#

basically, when you place a block in Minecraft

#

there is no NBT that gets transferred (unless theres like, an inventory? TileEntities are weird)

chrome beacon
wet breach
#

Its not vague. Simply put the information does not transfer from itemstack to a block. These are two different objects. You will need to make code to transfer such and you either use pdc, blockdata or track the custom info yourself. Blocks do not have display names

silent steeple
#

ight

quaint mantle
buoyant viper
#

ur best bet will most likely be, check the ItemStack name with ItemMeta in BlockPlaceEvent, and if its custom, store PDC in the Chunk that tracks the placed blocks location

quaint mantle
#

@chrome beacon ^^

wet breach
#

You know there is code blocks in discord lol

quaint mantle
#

๐Ÿ—ฟ

chrome beacon
remote swallow
#

just because you add the repo doesnt mean you depend on it

chrome beacon
#

^^

quaint mantle
#

i added external jar

silent steeple
chrome beacon
buoyant viper
#

i mean @wet breach was moreso trying to explain what u were doing wrong and why it was wrong

quaint mantle
#

๐Ÿ˜ญ

chrome beacon
#

Add the dependency to the pom

buoyant viper
#

i was just making a suggestion on what u can do, but i dont know ur end goal, so YMMV

quaint mantle
buoyant viper
#

?maven

undone axleBOT
buoyant viper
#

u see the <dependency> part? thats how u would add WorldEdit to maven

chrome beacon
#

You can find the exact values on their wiki

buoyant viper
#

?jd-s for self

undone axleBOT
quaint mantle
#

<dependency>
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-bukkit</artifactId>
<version>7.2.15</version>
<scope>provided</scope>
</dependency>

#

this

#

?

#

@chrome beacon so i just enter this in my pom.xml right

quaint mantle
#

dependency not found

#

whered everyone go

buoyant viper
#

u have worldedits repository added as well right?

#

oh yeah, looks like u do at least

remote swallow
#

reload maven

quaint mantle
#

ok

quaint mantle
remote swallow
#

do you still have the repo

quaint mantle
#

yes

remote swallow
#

?paste ur new pom

undone axleBOT
quaint mantle
remote swallow
#

oh you copied the wrong url

quaint mantle
#

wat

quaint mantle
remote swallow
#

this is a you url, you can browse html

#

maven cannot

#

use https://maven.enginehub.org/repo/ as the repo

buoyant viper
#

dam didnt even notice, havent used WE as a plugin dep yet

quaint mantle
#

ok

#

now

#

it works les go

#

now let me compile

quaint mantle
#

138.2.98.119

remote swallow
#

no

tender shard
#

2A01:598:C84B:EE1F:461:756E:2AE6:1146

quaint mantle
#

oops

quaint mantle
remote swallow
#

still no

tender shard
#

Say yes to my ipv6

remote swallow
#

no

quaint mantle
tender shard
#

People also dont care about your server

#

I was just going along

quaint mantle
tender shard
#

You didnt even manage to register a command, it cant be that great

remote swallow
#

it has no domain so no one even knows what server it is, no one is going to open minecraft, add ur ip to a server then figure out what server it is to just leave

upper hazel
#

he not work

tender shard
#

how are you registering it?

upper hazel
#

new customPlaceholders().register();

#

this all

#

!paste

tender shard
#

does it show up in /papi list ?

upper hazel
#

?paste

undone axleBOT
remote swallow
#

you do realise calling join on a future forces it to run

#

blocking main thread

upper hazel
#

horse, spark

remote swallow
#

what placeholder are you using

upper hazel
#

this is all join foul?

#

t

tender shard
#

which placeholder did you try to use?

#

try /papi parse me %horse_health%

upper hazel
#

%horse_heath%

tender shard
#

it's called health and not heath

upper hazel
#

yea

tender shard
#

you spelled it heath

upper hazel
#

what you mean

tender shard
#

you called your placeholder %horse_heath% instead of %horse_health%

#

health != heath

upper hazel
#

a waint

#

wait

upper hazel
tender shard
#

then what's the issue?

upper hazel
#

wait i give

#

not filled

tender shard
#

well ofc not

#

you never replace the palceholder

upper hazel
#

then how use

tender shard
upper hazel
#

wait this need? joinText = PlaceholderAPI.setPlaceholders(event.getPlayer(), joinText);

#

I was told that it is automatically filled

tender shard
tender shard
#

it can't work automatically, it wouldn't even know which player to use

upper hazel
#

so I need to fill each Placeholder with data when entering a command?

tender shard
#

wdym "when entering a command"?

remote swallow
#

all you have to do if you want placeholders to be parsed is PlaceholderAPI.setPlaceholders(Player, String)

tender shard
#

you simply gotta call PlaceholderAPI.setPlaceholders(...) everywhere you want placeholders to be replaced

upper hazel
#

then why do you need to fill it in
if(identifier.equals("name")){
return horseData.getHorseName();
}
if(identifier.equals("jump")){
return String.valueOf(horseData.getJump());
}
if(identifier.equals("blocks")){
return String.valueOf(horseData.getTraveledBlocks());
}

remote swallow
#

that is correct

upper hazel
#

this code fills and setPlaceholder method too yes? why are they both needed

remote swallow
#

you have to respond to the call

#

if you dont respond it cant parse the placeholder

#

why are you even using placeholder api if this is just in ur own code

tender shard
#

I don't think you've understood what PAPI is and what it does, at all

#

if you call setPlaceholders, it looks for %placeholders%. Then it sees %horse_health% and it calls your placehodler class and asks it what "health" is

#

then you return something and papi replaces %horse_health% with whatever you returned in your placeholder class

upper hazel
#

I mean doesn't this line of code fill it already, why fill it again in the setPlaceholder method
if(identifier.equals("blocks")){
return String.valueOf(horseData.getTraveledBlocks());
}

tender shard
#

i don't get your question

remote swallow
#

that returns the value

#

placeholdker api then uses that return value where the placeholder is used

upper hazel
#

does this line of code not populate the Plaseholder ?

tender shard
#

if you just do player.sendMessage("%horse_health%") then how is PAPI supposed to replace it?

#

you are supposed to do player.sendMessage(PlaceholderAPI.setPlaceholders(player, "%horse_health%"))

upper hazel
#

ok

cinder abyss
#

Hello, how can I get the new line sended in the console ?

cinder abyss
#

looks like the guy who created this blog is a big chad

tender shard
#

nah I'm a twink

cinder abyss
#

a twink chad omegachad

#

or a ninja ?

tender shard
#

yeah and oliver's a pig lol

cinder abyss
#

ah yes LUL

#

you saved my life with the article for Consumer blessrng

tender shard
#

it bothered me so much that everyone changed their entities after spawning them lol

#

somehow nobody knew about the consumer method

#

same for the scheduler

#

people do weird things like using AtomicInts to get the task id and stuff

cinder abyss
tender shard
#

usually people do this:

scheduler.runTask(myPlugin, () -> {
  ...
});

but then they need the task ID

#

and then they do stuff like this

AtomicInteger taskId = new AtomicInteger();
taskId.set(scheduler.runTask(myPlugin, () -> {
  if(whatever) scheduler.cancelTask(taskId.get());
});
#

instead of using the consumer:

scheduler.runTask(myPlugin, task -> {
  if(whatever) task.cancel();
});
cinder abyss
#

that's why I always use instance of BukkitRunnable LUL

upper hazel
#

setPlaceholder return string

#

so i need save this?

tender shard
#

dude what the heck are you trying to do

#

other plugins just also call setPlaceholder

#

why would you save the result of setPlaceholders

upper hazel
#

oh so i no need

tender shard
#

i still think you haven't understood the purpse of PAPI

#

if another plugin now calls setPlaceholders on %horse_health%, then papi will call your horse plugin's placeholder class, and that's the whole and only purpose of it

upper hazel
#

I want to use these placeholders for another plugin, roughly speaking, pull it out of this plugin and put it in another config of another plugin

tender shard
#

wdym "put it in a config"

cinder abyss
#

Hello, what is the version of log4j for spigot 1.18.2 ?

upper hazel
#

i have custom menu in peluxMenu so i need use this placeholders for menu

#

all text settings in config.yml

tender shard
tender shard
upper hazel
#

how do this?

tender shard
#

I'm giving up

upper hazel
#

just write %horse_heath% in config.yml ?

upper hazel
#

ok

cinder abyss
#

well, looking the jar is working

chrome beacon
#

Why do you need to access log4j directly?

buoyant viper
chrome beacon
#

Just use slf4j?

cinder abyss
chrome beacon
#

See that log4j slf4j jar :p

cinder abyss
chrome beacon
#

slf4j is an api

tender shard
#

log4j-core 2.17.0 is what you need

cinder abyss
#

then I'll use it

cinder abyss
chrome beacon
#

so?

tender shard
#

i don't see how adding slf4j would provide any log4j AbstractFilter class

chrome beacon
tender shard
#

attach a custom filter to spigot's log4j's root logger

#

to read the console output

chrome beacon
#

ah

#

Then you might need Log4J API

undone axleBOT
upper hazel
eternal oxide
#

no

upper hazel
#

now another plugin can use this placeholders?

#

a

eternal oxide
#

did you read the PlaceholderAPI page at all?

upper hazel
#

yea

#

but bad undestand

eternal oxide
#

it doesn;t look like it

upper hazel
#

i see tutorial in yyoutube

tender shard
#

You keep misspelling your health placeholder btw

upper hazel
upper hazel
tender shard
eternal oxide
#

you only need one class to implement your own placeholders

tender shard
eternal oxide
#

?

upper hazel
#

setPlaceholder

#

in this event

tender shard
#

ofc you need setPlaceholder... whereever you want to replace holders

#

I have explained this to you already.

Whereever you want to replace %horse_health% with the horses health, you call setPlaceholders

upper hazel
#

this do in another plugin?:

#

not were i create it&

tender shard
upper hazel
#

so delux menu have code for placeholder api?

tender shard
#

idk, check the plugin's description

upper hazel
#

as I understand it, in 1 plugin I create them and in the other I fill them in, right?

#

so the delux menu should do that?

#

or i do it in mine

tender shard
native bramble
#

How can i change ItemStack of placed ItemFrame? Like i have placed Frame, i want to change the display name of this item

upper hazel
#

so i not need write setPlaceholder in my code yea?

native bramble
#

?

tender shard
native bramble
#

setItem sets item in itemframe

#

i want to change ItemFrame, not item in itemframe

tender shard
#

I dont get it

#

Do you wanna give a custom name to the frame itself?

native bramble
#

There is a frame at certain coordinates. I want to setDisplayName of this frame under certain conditions.

tender shard
#

Then call setCustomName on the frame

native bramble
#

will try

#

ty

#

working

vital sandal
#

I want to add a NPC(fake-player) to a team to hide it belowname scoreboard

#

is that possible?

#

if yes what should be put in the hideEntry()

tender shard
#

the name, I guess

eternal oxide
#

is your NPC added to the world?

#

via nms

#

if so you can get teh Bukkit entity

tender shard
#

but scoreboard teams always only use addEntry(String), so having a player object doesn't really help

eternal oxide
#

Players are added differently to scoreboards than entities

#

Entities you add the stringified UUID.

tender shard
#

CraftTeam#addPlayer just calls getName() on the player and throws that to addEntry

eternal oxide
#

yes

#

but to add entities you use teh same method but pass in a stringified UUID

tender shard
#

but in either way you wouldn't need any bukkit entity, just add the name or the UUID as string to the entries

eternal oxide
#

using Teams if there is no bukkit entity I don;t believe it will be added

cinder abyss
#

Hello, I have a plugin who listen to console and send to a webhook the console messages but when making rl confirm, I get this errors :

[12:33:04 ERROR]: [club.minnced.discord.webhook.WebhookClient] Encountered 429, retrying after 3000 ms
[12:33:04 ERROR]: [club.minnced.discord.webhook.WebhookClient] Encountered 429, retrying after 3000 ms
[12:33:04 ERROR]: [club.minnced.discord.webhook.WebhookClient] Encountered 429, retrying after 3000 ms
[12:33:04 ERROR]: [club.minnced.discord.webhook.WebhookClient] Encountered 429, retrying after 3000 ms
[12:33:05 ERROR]: [club.minnced.discord.webhook.WebhookClient] Sending a webhook message failed with non-OK http response
club.minnced.discord.webhook.exception.HttpException: Request returned failure 400: {"message": "Invalid Form Body", "code": 50035, "errors": {"username": {"_errors": [{"code": "USERNAME_INVALID_CONTAINS", "message": "Username cannot contain \"discord\""}]}}}
        at club.minnced.discord.webhook.WebhookClient.failure(WebhookClient.java:757) ~[DynumoBotPlugin-1.0-SNAPSHOT.jar:?]
        at club.minnced.discord.webhook.WebhookClient.executePair(WebhookClient.java:832) ~[DynumoBotPlugin-1.0-SNAPSHOT.jar:?]
        at club.minnced.discord.webhook.WebhookClient.drainQueue(WebhookClient.java:801) ~[DynumoBotPlugin-1.0-SNAPSHOT.jar:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
        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) ~[?:?]```in loop
Here is my code :```java
@Override
    public void onEnable() {
        saveDefaultConfig();
        Logger rootLogger = (Logger) LogManager.getRootLogger();
        Filter myFilter = new LogListener(this);
        myFilter.start();
        rootLogger.addFilter(myFilter);
    }``````java
public class LogListener extends CAFilter {
    public LogListener(DBP dbp) {
        super(dbp);
    }

    @Override
    public Result filter(LogEvent event) {

        String message = event.getMessage().getFormattedMessage();
        String sender = event.getLoggerName();

        if(message.length() > 400) return Result.DENY;

        String webHookURL = dbp.getConfig().getString("webhook-url");

        if(webHookURL == null) return Result.DENY;

        try (WebhookClient webhookClient = WebhookClient.withUrl(webHookURL)) {
            // Change appearance of webhook message
            WebhookMessageBuilder builder = new WebhookMessageBuilder();
            builder.setUsername(sender); // use this username
            builder.setContent(message);
            webhookClient.send(builder.build());
        } catch(Exception err){
            dbp.getServer().getPluginManager().disablePlugin(dbp);
        }

        return Result.NEUTRAL;
    }
}```
tender shard
#

Username cannot contain "discord"

cinder abyss
#

[club.minnced.discord.webhook.WebhookClient] Encountered 429, retrying after 3000 ms

#

so the webhook name will be club.minnced.discord.webhook.WebhookClient

tender shard
#

then strip discord from the username, idk

cinder abyss
#

it creates a loop

silent steeple
#

whats the method to check if a player joined before

#

or its their first time

tender shard
#

then ignore LogEvents where the sender's name is club.minnced.discord.webhook.WebhookClient

tender shard
tender shard
silent steeple
#

yeah thanks

grizzled oasis
#

Hi, im making a mine system for my plugin and one question about was how can i place block without making the server lag,
i saw this post https://github.com/TheGaming999/BlockChanger but i can't set multiple blocks in one any idea of a faster way to set random blocks in a cuboid?

silent steeple
#

how do i use custom yml files in my plugin

grizzled oasis
#

scroll and you will find it there

silent steeple
#

ty

smoky anchor
silent steeple
#

like another folder

grizzled oasis
tender shard
silent steeple
#

thx

tender shard
#

ofc you wanna create the subfolder beforehand, using mkDirs()

grizzled oasis
#

dead chat

vital sandal
tender shard
#

have you even tried adding them by name or UUID?

eternal oxide
#

try before looking for an alternative

#

adding a player by UUID won;t work

#

But I do have a memory of a packet based NPC not working in Team

vital sandal
#

So any idea about how to remove the belowname scoreboard

eternal oxide
#

So it is a packet based NPC?

silver robin
grizzled oasis
#

but the problem is i can't use more blocks only one so for a mine is not quite good

vital sandal
#

It is from citizen2 plugin

eternal oxide
#

You will probably have to send yoru own Team meta packet

#

citizens? Then it shoudl work just fine

#

they are full Bukkit entities

vital sandal
#

It doesnโ€™t

eternal oxide
#

you are doing it wrong then

vital sandal
#

The belowname scoreboard is display 0 as health

vital sandal
#

It is the only plugin on the server :l

silver robin
analog crown
vital sandal
#

I used to work with a optimized systems where blocks are all stores in ram and then handle the mining task like: mine the whole layers or mine the whole mine with the complexity of O(1)

grizzled oasis
#

i think i will start using an API for now, for the mines

cinder abyss
analog crown
#

ty ๐Ÿ˜„ i managed to get it nailed down with a bresenham line-like algorithm and tuned just right. it feels really nice. my vids dont do it justice, weird frame drop on OBS when recording on my mac ๐Ÿ˜ฉ โ€“ got everything nice and asynced where i can too. its feather light even with massive arena canvases so far ๐Ÿ˜„

cinder abyss
tender shard
cinder abyss
#

I use java event.getMessage().getFormattedMessage().replaceAll("\u001B(.*?)m", "");Because I have a strange thing with a square with numbers and after a m

#

with this the message is correct

tender shard
#

yeah that's ansii color codes

#

thx, I'll add it to the post later

umbral ridge
#

hey I can use equals method on this yeah?

#

to compare them

tender shard
#

i just wanted to open the blog and it said "couldnt establish database connection"

#

so I got out of bed when I realised, yeah it's the daily backup that takes 3 seconds. and I opened the site in exactly those 3 seconds lol

cinder abyss
cinder abyss
umbral ridge
#

Looks like I'm about to find out xD

tender shard
#

dude it's really 3 seconds. I just made this number up, but it's correct

wet breach
umbral ridge
#

frostalf.getCat() == null ? "Frostalf does not have a cat" : "Frostalf bought a cat " + frostalf.getCat().getType().name();

eternal oxide
#

npe, cat has no name

umbral ridge
#

It's to represent an enum name lmao

wet breach
umbral ridge
#

cat type

wet breach
#

maybe 2

umbral ridge
#

NICE

eternal oxide
#

smelly cat is a type ๐Ÿ™‚

young knoll
#

Ur a smelly cat

eternal oxide
#

I had a smelly cat. Alwasy tried to stick its ass in yoru face.

silver robin
#

I have spigot as dependency added using maven (because I don't want to include spigot jar through intellij idea because it is then decompiled, and this way I get the sources) , but I cannot access obc and nms this way, I saw on the hub spigotmc org/nexus/content/repositories there is bukkit but it's only up to 1.15.2. What dependency do i have to add to get CraftBukkit and NMS (and preferably mojang.authlib)?

icy beacon
#

can i make intellij not index a certain class/file? i have a map with 1000 entries and it really eats ram

icy beacon
#

?mappings maybe

undone axleBOT
icy beacon
#

no

#

?mojang-mappings

icy beacon
#

ah

wet breach
#

above link is for you

silver robin
wet breach
#

yes

silver robin
wet breach
#

jeff-media

#

it will tell you how to get the spigot server jar and use it in maven

#

?bootstrap