#help-development
1 messages · Page 715 of 1
the fact the non pro one has usb-c type 2 is the wildest shit
Courage
money
money
Courage
imagine you're a photographer or some shit
you gotta buy the pro
otherwise
fuck you
🙃
I wonder how/if they'll handle the repairable battery thingy
the apple engineer after dedicating 5% of the A17 soc to usb3
tho that is far away, 2027 iirc
Did you see the diy battery thing you can buy today
nah thats only a few years away
plugin for auto mine
prob advertise it as the most revolutionary ecological change
Wait thats it?
They ship you like a 200kg kit
fuck deep customization
lmfao

you gotta give more detail, exactly as much detail as you would want to make it
Bro send the specs my way and I'll work with ya to get it out the door for deadline if it isnt ridiculously soon
and if you don't they charge you 20 grand or somn
is that jerry
It all started with thse damn screws on the macintosh
that looks like the jerry background
brush you dont know what the autoMine plugin?
nope
md_Handyman
auto pickup? straight to ur inv?
1200 is good
@sullen marlin considering @ivory sleet has muted my ass for hours for "spam" in the help dev channel before can we maybe move the funni apple stuff to anotehr channel as folk in here rn are wanting help
how can i execute command on player that are not in the server?
1200 hundred to repair a battery you can get done by a shop for 50 bucks
how is it written in English when they connect <<automatic> <mine>
player.performCommand(String command)
player#performCommand
you can't
player is not on the server so it can't issue commands
when they mine a block drops go to their inv? or like you break a block and its auto regenerated
i have wrong
aaaaaaaaaaa is beautifull
Fancy codes
ah my bad i mean AuthMine
an auth plugin?
some plugins like CMI can, you can execute command like gm/tp/tphere/fly on offline player
thats because its handled inside of that plugin
so its able to make a queue for when they relog
it just shows that the player is offline
"You activeted fly for playerName (offline/online)
Hello everyone. i want to match coord in overworld and nether. bypass */8 of default. but im stucking when tried to do that here is my listener demo https://ibb.co/YPHSmVL
ah, makes sense
The coords in the location are already the real coords
@livid dove basically a prison server except the blocks become cobble stone and get upgraded, no idea how that works if its a full mine but hey ho,
would take like 30 min to an hour prob
full setup of NPCs, cases, logic of the automine itself, interserver connection, etc.
this is fucking hard
npcs use citizens api, most likely only ores so make it config, inteserver stuff is pointless just use sql db
would probably take like a week at my current schedule
Or just use the above plugin
I wrote on this topic before @echo basalt say that this may take 2-4 weeks
I didn't give a complete description
he most likely had more info that i do
Sorry, I am quite new in java. As you can see I have set getX-Z / scalingFactor by default to 1. That means it will multiply and divide by one. but when I tried it, it didn't seem to be very effective. The logic returned is very normal, but the actual coordinates when moving and creating gates are still / 8
Multiplying and dividing by 1 does nothing
That's math
If it's been divided by 8 and you want it back to the original, then you multiply by 8
I understand what you mean. but I want for example the player in the overworld with coordinates 300,80,300. then when going to the nether it will be 300,80,300. not 37.5,y,37.5
Then give a full description
@remote swallow wanna help this guy out with me? Could be banter, never got to code with you before so :L
Could be a neat challenge
Then just set the to coordinates to the from coordinates
depends on how complex, if its not too bad yeah ill help
Or multiply by 8 to undo the shrink
Oh my god why didn't I think of that?. Thank you very much
Hey man if you are new to java im gonna tell ur rn ur aight.
Even the most experienced devs get brain farts over the simple stuff
Part of the fun :L
And see? People pretend md_5 is a grumpy git sometimes, but here he is, main Spigot boi, helping out the humble noob dev ❤️
Warms ya heart
xD
Give a full brief, top to bottom, and I'll personally help you out if I think its reasonable. Youve got ill and that aint ur fault lad, and whislt development is cool, it shouldnt come at the impact of ur health
This save my night. tks alot bro
Np
Imagine coding with that design at 3am, being sleeped with 1h
You wanna **... ** **... ** yourself
You need to loop through the contents and get the name for each.
Either done through a for loop or through a lambda function. My personal preference is a lambda, but either will work.
If you need some more help as youve not worked with invs before or something lmk
did we get full detail?
what plugin you feeling like
Legit no clue atm.
Just thought it could be fun to collab. Got any old pet projects uve wanted to get an MvP for?
ill also tell you now half the stuffi do will be very jank and miss the obvious way untill im told about it and then realise how easy it couldve been
ive got a suggestion plugin i was gonna finish at somepoint
its on github atm, idk if its had my recent changes published
theres a lot i need to fix on it
i remember what i was last doing now
yeah its pretty jank
i remember why i probably stopped working on it, could probably just implement hibernate now though and remove json support
ye did it ty
ill try and do some cleanup today and tomorrow so it isnt such hell to work with
lombok 🤮
shut
If uve ever used @EventHandler, shut
huh?
do ihave to delombok my classes
If youve ever used @EventHandler, you literally cant complain about lombok
True, a compiler hack do be on the same level as a marker annotation 😭
YES
Truth
Wait
Hold on
sarcasm
Lmao mb mb
There were legit people a day or so ago shitting on lombok
Cipher and them
promotes some rather bleh behaviour on potentially inexperienced devs
Olie really comin in here tonight with violence
I mean you just described half the stuff in Bukkit
xD
no
like annotating your main class with getter ehem epic
bukkit is a terribly easy to understand API
Yeah but there arnt exactly great practices in it
Bukkit.java ✨✨
that was 5 months ago
leave me alone
it does its job
"great practices" are rather relative to interpret IMO.
API design is hard, some of bukkit is certainly terribly outdated, but the core principle of a simple API such as bukkit is a nice feat
m a t e r i a l
xD
it’s changing
🙏
I know, legit praise be
ping me if im needed to answer stuff
you won’t be
Who was the god who came up with that?
🥰
What does the plugin do?
it’s been floating for a while
proper interfaces, sourced from a registry
Huh, so that would give the ability to make custom "materials" no?
YES
exactly ✨
well
it lays the groundwork for the API to support those once mojang does in their client
but yea
Praise fuckin be
it also makes a LOT of stuff nicer because we can skip UnsafeValues
mojang when please 😭
the configuration phase stuff in .2 looks promising
Tell me this is a joint endevaour on ur lot's end too lynx
interfaces ?
suggestion plugin, you can suggest somethng in game or from discord, allows users to vote for said suggestion if they would like to see it or not and allows for an answer in both places
Well, we have been on the PRs in terms of feedback yea
I.e. Spigot and paper gonna both nod and silently pick it up mutually
paper doesn’t have a choice 
Huh, sounds simple enough
true that 
#SoftSpoon
but yea, we have been on it for review, mostly MM
I'll give it a read once my exam phase ends
yeah, when i started it, it was taking me ages to do basic stuff kek
shouldnt take aslong now
but yea, I mean, paper has a few more things planned that will change
but the work is splendit and serves nicely
im just gonna clean it up a bit so its not as bad as it could be
nah, i was the one backing it up
even showed pathetic as an example
i think he confuses shitting on lombok with shitting on him
because i'd definitely do that
@livid dove i just realised how much i miss something in another lib i dont also wanna shade so im just gonna like make a new main lib for myself removing pointless classes so you probably wont have anything to work on tomorrow lol
Lmao no worries
Why do you hate me when I show nothing but love 😭
this is also a good reason to remove the jank in my current lib and refractor it too
Anyone know how to modify speed without changing FOV, or maybe the other way around?
setWalkSpeed does that iirc
@eternal night i keep thinking. u have a big mullet
but it’s just. aplant
in the back
lul?
I am trying to check if a player places a chest next to an existing chest, to make it a double chest... is there a better way than this? because as of now, it doesn't even have to become a double chest, it still catches it just being placed next to it
@EventHandler
public void onBlockPlace(BlockPlaceEvent event) {
Block block = event.getBlockPlaced();
Player player = event.getPlayer();
// If a chest is placed next to an existing protected chest, protect it automatically
if (block.getType() == Material.CHEST || block.getType() == Material.TRAPPED_CHEST) {
BlockFace[] faces = {BlockFace.NORTH, BlockFace.EAST, BlockFace.SOUTH, BlockFace.WEST};
for (BlockFace face : faces) {
Block adjacentBlock = block.getRelative(face);
if (protectedChests.contains(adjacentBlock.getLocation())) {
Chest chest = (Chest) block.getState();
Chest adjacentChest = (Chest) adjacentBlock.getState();
if (chest.getInventory().getType() == InventoryType.CHEST && adjacentChest.getInventory().getType() == InventoryType.CHEST) {
protectedChests.add(block.getLocation());
player.sendMessage("Adjacent chest has been automatically protected.");
return;
}
}
}
}
how do u make hover and click text in kyori adveture?
Should probably ask paper
Guys, i'm trying remove the <> before and after player name, but it's not working. who can help? ``` @EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
String playerName = event.getPlayer().getName();
String filteredName = playerName.trim();
try {
int playerRank = ReadPlayerRank(playerName);
String newNickname = "[Rank " + playerRank + "] " + filteredName + ": ";
event.getPlayer().setDisplayName(newNickname);
} catch (SQLException e) {
throw new RuntimeException(e);
}
}```
You want AsyncPlayerChatEvent.setFormat
- Doing SQL in the
PlayerJoinEventcan completely destroy your servers TPS String#trim()simply removes leading and trailing whitespaces
I need sql in player join event for get player's rank
Use the AsyncPlayerPreLoginEvent to load player specific data.
Doing any IO in a non-async event will lead to TPS drops and even server crashes eventually.
Can you please mod my code? or show example
i'm noob in spigot/java code
And like md5 stated: To format the chat you should not change a players name.
Rather modify the format using AsyncPlayerChatEvent.setFormat
and if u say about asyncplayerpreloginevent
i have one big problem in my plugin
Here is an example:
https://paste.md-5.net/gebukocuka.cs
WritePlayerData(p.getName(), 0, 0);
I'm using this code in every command
💀
thanks
I would highly suggest not using Databases if you are new.
Just write your data into files.
Focus on getting better in java and put SQL by side for now
i need this plugin for my big server, then i need good db
No you dont
And if you run this on a big server then it will simply crash. I can assure you that.
Than what i can do?
my big server it's 50 people max 😅
Files are perfectly fine. Even for slightly bigger projects.
How big are we talking? And do you run mutliple server instances?
50-64 players max
If you have consistently 50 concurrent players then you are one of the top 0.1% of servers
and should hire professional developers.
no, bro, i want to launch my server, than i making plugin for it
I see. Do you run multiple server instances or one big server?
One server, but not big. idk about online
max 50-64 at one time
Use Files then. You wont need a DB for this.
why db is so bad?
i think db it's better than files
Why
I might get flamed for this, but wouldn't PDC work just as well ?
Kind of, but only for very specific data.
I would only use it for Tags and less for data like ranks.
You want to be able to modify ranks for offline players and modifying
PDCs of offline players is a hustle.
I guess that is a fair point.
Ty for answering.
i'm using db to save: name of user, balance, rank and job id
i don't need anything more
Anyways im late for my workout. The megumi weeb can probably help you as well.
example please
Databases add an unnecessary amount of complexity to your system.
And if you cant explain why they are better for your case then you should 100% not use them
I'm saying to you, i need to run big server, but i don't have money for normal developers
well thats a skill issue
@EventHandler
public void onChat(AsyncPlayerChatEvent event){
Player p = event.getPlayer();
String msg = event.getMessage();
String prefix = "YOURPREFIX";
//can also do without permission
if(p.hasPermission("your.permission")){
event.setFormat(prefix + msg));
}
}```
thank you ❤️
Anyone know what this error is?
I've tried everything and can't figure it out
(Edit: Ik it says player table not created but I made a debug check so if the table is created it sends a message. The .db file is not being created either)
My table create function:
public void createTable() {
try {
connection.createStatement().execute(
"CREATE TABLE IF NOT EXISTS player_data (" +
"id INTEGER PRIMARY KEY AUTOINCREMENT," +
"player_uuid TEXT," +
"lives INTEGER" +
")"
);
System.out.println("Table 'player_data' created successfully.");
} catch (SQLException e) {
e.printStackTrace();
}
}```
for anyone curious on why I'm using SQLite its because I'm storing every player's data and yml or json is just not the go. And true I can use external databases with SQL or mongo but I would like it to be user friendly as I will most likely be releasing this plugin publicly
org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: players)
according to the create function it creates a player_data table did you look in sql which table are created ?
How would I look in SQL?
I'm a bit confused
CMD for/in sql: "show tables";
where would I use this command
I'm using SQLITE which is just flat-file storage I'm not to sure if theres a terminal for that
Unless you are refering to the terminal in Intellij (Which wouldn't make sense)
can you see any tables created in sqllite ?
maybe this will help
https://www.sqlitetutorial.net/sqlite-show-tables/
Does spigot allow custom implementations like custom impls of Inventory?
do you mean just create your own inventories with items ?
Like making a class that implements Inventory itself
should be possible to my knowledge
I looked through it and I'm still having the same issue ¯_(ツ)_/¯
Is there another flat-file storage method I could use instead? (That is recommended for player data storage.)
H2 is the best option
It's sql
I see
H2 SQL?
Yeah
Is it flat-file base storage?
yeah
I see, I'll have a look now thanks for the suggestion 👍
You can use it as a file based jdbc database and memory
I tried using H2 SQL but I got these errors:
[07:12:52 WARN]: java.lang.ClassNotFoundException: org.h2.Driver
[07:12:52 WARN]: at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:183)
[07:12:52 WARN]: at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:150)
[07:12:52 WARN]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
[07:12:52 WARN]: at java.base/java.lang.Class.forName0(Native Method)
[07:12:52 WARN]: at java.base/java.lang.Class.forName(Class.java:375)
[07:12:52 WARN]: at HardCorePlus-1.0.jar//com.developedmade.hardcoreplus.DatabaseManager.<init>(DatabaseManager.java:12)
[07:12:52 WARN]: at HardCorePlus-1.0.jar//com.developedmade.hardcoreplus.HardCorePlus.onEnable(HardCorePlus.java:26)
[07:12:52 WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281)
[07:12:52 WARN]: at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189)
[07:12:52 WARN]: at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104)
[07:12:52 WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507)
[07:12:52 WARN]: at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:640)
[07:12:52 WARN]: at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:551)
[07:12:52 WARN]: at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:635)
[07:12:52 WARN]: at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:434)
[07:12:52 WARN]: at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:308)
[07:12:52 WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1100)
[07:12:52 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317)
[07:12:52 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)```
Are you familiar with them?
did ya shade the dependency?
oh I did not
yeah same error
public void spawnMobs(int size, int mobCap, int spawnTime) {
task = new BukkitRunnable() {
List<Entity> removal = new ArrayList<>();
@Override
public void run() {
for (Entity entity : entities) {
if (!entity.isValid() || entity.isDead()) {
removal.add(entity);
}
entities.removeAll(removal);
}
int diff = mobCap - entities.size();
if (diff <= 0)
return;
int spawnAmount = (int) (Math.random() * (diff + 1));
int count = 0;
while (count <= spawnAmount) {
count++;
int ranX = getRandomWithNeg(size);
int ranZ = getRandomWithNeg(size);
Block block = world.getHighestBlockAt(ranX, ranZ);
Location loc = block.getLocation().clone().add(0, 1, 0);
entities.add(world.spawnEntity(loc, EntityType.ZOMBIE));
}
}
}.runTaskTimer(this, 0L, spawnTime);
}
yall trying to make a mob spawner of sorts
am I to put the removal array insite or outside run()
your error is ?
wrong thing hol on
[09:10:33] [Server thread/WARN]: [FirstProject] Task #2 for FirstProject v1.0 generated an exception
java.util.ConcurrentModificationException: null
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1013) ~[?:?]
at java.util.ArrayList$Itr.next(ArrayList.java:967) ~[?:?]
at me.marsim.firstproject.FirstProject$1.run(FirstProject.java:34) ~[?:?]
at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3869-Spigot-d2eba2c-78796c9]
at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:415) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3869-Spigot-d2eba2c-78796c9]
at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1256) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3869-Spigot-d2eba2c-78796c9]
at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:387) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3869-Spigot-d2eba2c-78796c9]
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1197) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3869-Spigot-d2eba2c-78796c9]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1014) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3869-Spigot-d2eba2c-78796c9]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:303) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3869-Spigot-d2eba2c-78796c9]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
34 would be
for (Entity entity : entities) {
the dependency is not loaded, the inclusion seems to be wrong maybe ?
You can't modify the list while looping it like that
have you ever tried it with just a for-loop ?
Because you're not using a concurrent list so it will cause a CME
You're better off removing from the list after the loop is done
wdym
Show us how you shaded the driver
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
group = 'com.developedmade'
version = '1.0'
repositories {
mavenCentral()
maven {
name = "spigotmc-repo"
url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/groups/public/"
}
}
dependencies {
compileOnly "org.spigotmc:spigot-api:1.20-R0.1-SNAPSHOT"
compileOnly 'com.h2database:h2:1.4.200'
}```
all i did
...
So no you didn't
plus the gradle shadowjar command
Read the shadow jar docs
wait am i supposed to add the jar to the files 💀
yeah okay I see what you mean
im so confused
@chrome beacon Solved, thanks mate
who can help me again?
how to install commandapi in my project?
i got error Could not find artifact dev.jorel:commandapi:jar:8.7.3
yes, i'm using maven
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>dev.jorel</groupId>
<artifactId>commandapi</artifactId>
<version>9.1.0</version>
<type>pom</type>
</dependency>
</dependencies>``` my maven dependencies
but it doesn't appear at all
Seems that your artifactId is different from the one on this site
https://commandapi.jorel.dev/9.0.3/setup_dev.html
bruh
it's not working for me
no errors but i not see anything from this dependency
do you have dependency reloaded in your project ?
yes
hm
and the IDE dont check this package for use ? or the plugins dont load on your server ?
[INFO]
[INFO] --------------------< org.fluffiesun:FluffieCraft >---------------------
[INFO] Building FluffieCraft 1.0
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- resources:3.3.0:resources (default-resources) @ FluffieCraft ---
[INFO] Copying 1 resource
[INFO]
[INFO] --- compiler:3.8.1:compile (default-compile) @ FluffieCraft ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\fluffiesun\IdeaProjects\FluffieCraft\target\classes
[INFO]
[INFO] --- resources:3.3.0:testResources (default-testResources) @ FluffieCraft ---
[INFO] skip non existing resourceDirectory C:\Users\fluffiesun\IdeaProjects\FluffieCraft\src\test\resources
[INFO]
[INFO] --- compiler:3.8.1:testCompile (default-testCompile) @ FluffieCraft ---
[INFO] No sources to compile
[INFO]
[INFO] --- surefire:3.0.0:test (default-test) @ FluffieCraft ---
[INFO] No tests to run.
[INFO]
[INFO] --- jar:3.3.0:jar (default-jar) @ FluffieCraft ---
[INFO] Building jar: C:\Users\fluffiesun\IdeaProjects\FluffieCraft\target\FluffieCraft-1.0.jar
[INFO]
[INFO] --- shade:3.2.4:shade (default) @ FluffieCraft ---
[INFO] Replacing original artifact with shaded artifact.
[INFO] Replacing C:\Users\fluffiesun\IdeaProjects\FluffieCraft\target\FluffieCraft-1.0.jar with C:\Users\fluffiesun\IdeaProjects\FluffieCraft\target\FluffieCraft-1.0-shaded.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.551 s
[INFO] Finished at: 2023-09-14T10:38:14+03:00
[INFO] ------------------------------------------------------------------------
All log
.
@lofty badge I do not provide support in DMs
Your scope and artifactId is wrong when compared to the wiki page
remove the type pom
ok
than who can help?
I need just a template project with imported CommandAPI
Elgar is trying to help you rn
noone talked about creating new project
Just replace the dependency with the one from the documentation
and then change the version
Maven
I'm making a player tracker using a compass and I'd like it to work across dimensions, so I'm using lodestones. The problem is that every time I change the lodestone location, the nbt data of the item changes and so the re-equip animation plays. Does anyone know how I can get around this?
setCompassTarget
@lofty badge I do get that English is not your native tounge but I will not help you in DMs
I think you can understand that much
Change the dependency to
<dependency>
<groupId>dev.jorel</groupId>
<artifactId>commandapi-bukkit-core</artifactId>
<version>9.0.3</version>
<scope>provided</scope>
</dependency>
And refresh maven, there's a button for that that pops up on top right when you make any change
Or you can access it by opening the maven tab
I don't want to use setCompassTarget as it needs to work across dimensions
therefore I have to use lodestone
Well not much you can do then
how would that work tho?
if you're in nether it'll show the closest portal?
CompassMeta lets you set lodestone location
so I keep track of the last location a player was in for the nether, end and overworld
i see
if they're not in the same dimension as you, then it points to where they last were in that dimension
which will lead you to the portal they went through
the problem is that changing the lodestone location changes the compass nbt, since it's unique to the compass and not the player
heads?
oh lol
if you really dont want the animation
anything I could do with packets?
there seems to be a method you can ovveride on an item in forge, there are some posts about it
so maybe there's some equivalent?
I couldn't see any for an ItemStack but maybe for an nms item?
i know 0 about forge sorry mate
nor do I lol
also aint aware of something similar in spigot
see, the same thing will happen if I use heads now that i think about it
cause every time the direction changes I'll have to change the look of the head
which would cause an nbt change
I really can't win lol
but heads dont play an equip animation
they arent tools
oh wait
im stupid
ignore what i just said
lol
well but now that i think about it there 100% is a way. Hypixel Skyblock utilises that
not sure how they did it
but they did
hmm
what was the tracker?
or compass
was the location it was pointing to changing?
Maybe I can use a recovery compass?
not that exact scenario but for example when using tools they constantly change the data of the tool, mining speed, name description etc without playing animations
wish i could work with a skyblock dev just for one day x) i feel my coding skills would tripple
frfr
I did a whole dive into making a tab screen display
it turns out to be annoyingly difficult
you have to create fake players
not sure whats the topic, but keep in mind that hypixel also has a modified spigot fork
and remove the real ones, but also send packets when people get in render distance cause it tturns out removing them from the tab board messes stuff up
I then went back on to hypixel skyblock and looked really closely and the nsaw they did it exactly in that way
whenever a player gets into render distance, or an npc, their name briefly appears on the tab screen before getting removed
i made bossbars in 1.8 and i just cant figure out how they did it. I found a way but its definetly different from their way. I read EVERYTHING there is to find about bossbars in 1.8 and they still found a different way
like literal days
yeah it's crazy

but yeah I might try a recovery compass, cause that points towards the player's last death location
yh gl mate
There are recovery compasses?
yes
i suspect it's a wither with negative size
it is packets
and that
i think i still have the code for 1.8.8 bossbar somewhere
if you want it
thats also the way i do it now but it works a millon times better for them
i already got it
just took me way to long
to figure something out xd
like if you turn really really really fast the bossbar flashes for like half a second
and it doesnt do that on hypixel even with a 200ms ping
maybe it's on top of the player head?
what bossbar
if you look closely you can see effects of the wither
uhhh
if I don't update nbt data on client the compass won't point in the right direction though
send packets to change the compass direction?
I really want to see you provide some code/source for this
there's player.setCompassTarget
what’s the best way of setting up a job that gets run at a specific time every week?
to check for that specific time every week
🤔
this doesn't work cross dimensions
I know
hmph

i don’t wanna set up a thread routineeeee
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
public void schedule() {
LocalDate nextDate = LocalDate.now().with(TemporalAdjusters.next(DayOfWeek.MONDAY));
long midnight = LocalDateTime.now().until(nextDate.atStartOfDay(), ChronoUnit.MINUTES);
scheduler.scheduleAtFixedRate(()-> { /* Code here */ }, midnight, TimeUnit.DAYS.toMinutes(7), TimeUnit.MINUTES);
}
-credit elgarl
You can also use files for big servers. You should do that.
It will decrease the complexity of your plugin.
how do they add complexity
its programmatically just like a file system
and they are even better and more optimized
Databases add a ton of complexity compared to flat files. They need a completely new
programming language, just to query data.
Thats not the point
That the introduction of a new programming language, just to administrate data, adds a ton of complexity to your design.
and with the different ms's you can even optimize on your specific case
i dont see the point
This highly depends on the use case
I mean, if designed correctly, that is all abstracted away tho.
sure you need more skills for it
bro, chill. i can't create commands))
I would not call it a large increase in complexity overall
at all*
I dont know how to make this any more clear.
If you struggle with basic java then you shouldnt touch SQL and use flat files as they
are way easier to work with.
the proper design of the database structure maybe
I mean, I agree with smile here
if you barely can smack together java, SQL is overkill
migrate later once you get better
I want make commands with args, but i can't use for this CommandAPI.
if (args.length!=0) {
String name = "";
for (int i = 0; i < args.length; i++) {
name = String.valueOf(name)+args[i]+"";
}
if (sender instanceof Player) {
Player p = (Player) sender;
try {
p.sendMessage("Баланс игрока " + name + ": " + ReadPlayerBalance(name) + "$");
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}
else {
if (sender instanceof Player) {
Player p = (Player) sender;
try {
p.sendMessage("Ваш баланс"+ ": " + ReadPlayerBalance(p.getName()) + "$");
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}
}```
My current command with arg
stick to bukkit YamlConfiguration for now and run into the issues filesystem data storage brings down the line
if thats the case, sure, go for it. but to say nah dont use sql it adds too much complexity is bs
it's hell
I guess the initial statement was a bit unfortunately worded 
If you are very experienced then this isnt a debate anymore. You program against an abstract persistence interface
and for all you care it can be implemented via storing your data in a floating zombies pdc.

iirc the event is only called when the piston extends
no clue what you're on about, I store all my data in a ProtocolLib packet
Using packet meta
you see


does the createInventory size arguments means amount of rows or general size
Slots, yeah
It should be a multiple of 9 for generic inventories (e.g. 9, 18, 27, 36, etc.)
"softdependent" - in plugin.yml understands disabled required plugins, even if they are on the server?
how can i make an autorespawn plugin when someone die the death screen didn't apear
softdepened makes your plugin load after then if they are on the server
but it also disables the plugin if the dependencies are not found
does the plugin take into account the fact that dependencies exist but are disabled?
try calling respawn() on the player
player.spigot().respawn()
unless its in depend too or you disable the plugin if its not found it wont
So all these checks for the presence of dependency are not needed?
if you can function without them you do not need to check if they arent there
if you require them to be there use depend
i mean write check code in enable metod
i can just connect in plugin.yml "depend" word
and not check in enable metod
correct
if you have depened you dont need to check if its enabled, it wont start to enable without it
oh nice
I'm tired of just writing all these check metods hahaha
how can i make a gui where i can disable the pickup of some drops
i need only the think for disable the pickup
i know how do all the other
For which language?
from/to?
which
for all lang
Create an inventory where you can add items to. On close you read out all items in the inventory
and add them to a Set<Material>. Then you prevent the pickup of all items in that set.
I think you don’t need anything other than English
Deepl is the best ik of its better than Google which is something
so yea fro inglish
yeah i was gonna say deepl
If you're German deepl is pretty good iirc cuz their main thing is German to English
i rus
deepl outclassed google translate the last time ive checked
onSignChange include sign edits that were added? or only whne a sign is saved?
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/SignChangeEvent.html
Called when a sign is changed by a player.
Last time, my friend said yandex translate is very good for english <-> russian
Kinda super basic question:
Do I understand it right that if I change the display name using player.setDisplayname(name);, I can still get the real name using player.getName()?
yes
Alright thanks
Yes, although it probably wont do what you think it does
Wym by that?
Yes
What do you think I think it does?
Something that it actually wont do
Can‘t you just tell me man? I can‘t test rn and don‘t wanna bother getting back to that later bc I am refactoring code rn to not have kamehameha anymore and I just stumbled over some weird code
:/
he means that it wont actually change the "display name", but only the name in chat messages
Changing the name like this wont result in actually changing the name of the player.
Only its appearance in chat.
Oh damn
How do nick plugins work then?
I thought that code worked when i first implemented it 💀
(It‘s been years)
There are multiple approaches for this. Most involve packet fkery.
nick plugins typically change the gameprofile of a player
Oh what the fk
iirc you can now use text displays mounted on an appropriately sized interaction entity to not mess with the profile
there was a github gist with that somewhere ..
it worked wonders
Main drawback: No auto completion for your name then
i mean the real player name will still be on the client
Main benefit: No char size limit
Depends. Couldn‘t you do the autocompletion manually with the displayname?
the client doesn't know about the bukkit display name
if you change the game profile, you'll change the "real" name other clients see the player as
Does it need to?
Ive used the display entity approach for NPCs
no, that's kind of the point of it
Yeah that‘s pretty cool ngl
if you just want to change the name tag on players I strongly recommend not changing the game profile and use the text display approach https://gist.github.com/Owen1212055/f5d59169d3a6a5c32f0c173d57eb199d
Is there a tutorial on how to add npcs?
Thanks :D
the interaction.customName(this.name); method is Paper but, just, setCustomName
NPCs are difficult to get right. Ive done mine completely from scratch using packets.
Oh damn
I‘ve been wondering for a long time how you get a "fake player" somewhere. Something like an new instance of Player or sum where u set a location for but never got too deep into it

or you can use player.setDisplayName - setDisplayNameList
that does not change the displayed name tag
that's what the whole conversation was all about
you mean Player.getName ?
you cannot change the visable name people see anywhere but chat with setDisplayName
lol I used to add prefixes to the player name and it worked
do you have multiple display entities or this entity supports multiple lines?
Display entities support multiple lines
that's super cool
does inventory.contents contain the helmet and stuff?
and does it contain offhand?
Nope it contains the contents
what about offhand
Wait contents might contain everything, i thought about storage contents.
?
quick question, how do i query the explosion resistance of a block, both default and current?
Can you run a listener inside of a bukkit runnable so it’s only listening while the runnable is running
You can just set a boolean to true while the bukkit runnable is running
and when it stops you just set it back to false
is there some way to get the item involved with a ProjectileLaunchEvent without a bunch of hacky shit
Bukkit runnables have isCancelled iirc so you can just use that
correct
it throws exceptions
this method only works if the runnable has been scheduled yet
Yeah but my question is is there a way to register a runnable with event listeners attached
So it a certain state is true only certain listeners will be active
no need to just do an if statement
Yeah technically
Because of how large it is
Although I’d avoid doing that
what are you trying to do with it anyway
i can think of two equally stupid ways to do it
I assume you mean sth like
class X extends BukkitRunnable implements Listener no?
Yes
Myeah no
So it’s stupid or there’s no way to do it
i cant think of a reason why you'd want to do it both in one class
just separate the two
Its a bit complicated since you’re essentially coupling yourself to the logic of the BukkitRunnable
Hmmmm
Oh I know a better way
Use a Bukkit Runnable to manage active listeners in main Java file
So if a certain state is active only certain events will be listened
Too
good lord why
My project has a lot of States and Settings as well as Managers
And it’s gonna be holy hell
To manage them all
Sounds like a design flaw
mate
extend runnable
on run register listener
on cancel unregister
register it for super long
done
private boolean running = false
@EventHandler
public void onEvent(Event event) {
if (!running) return;
You usually want your event listeners to be at the very very bottom of your structure, that is no class should in principle rely on an event listener as a dependency
Yes
low to monitor yes
Gotcha
Uguh avoid doing that
If you can that is
?paste
well i mean yeah
heres my terrible solution
because of course everything internal must throw exceptions
i would have a handle method for the events in respective managers that would just not doing anything if its not requested
wtf no dont do that
Just have your event listeners as normal, plain, simple event listeners. Then just make them delegate to your managers as needed
^ you... do you use this?
yes, unironically
same with runnables, just pass a runnable to the scheduler and delegate within its run() method to whatever manager
i hate internals
conclube answer is best though delegate!
Ugh
got a better solution
that is not a try catch lol
r u telling me to cache the bukkitTasks ?
Yeah
because querying by ID CAUSES EXCEPTIONS BRUH
And if you rly don’t like caching bukkit tasks under a longer time, you can ofc be smart and cache a snapshot of one
that code up there is me throwing my hands up and giving up doing it 'normally'
what are these exceptions
cant remember and cba to test
i just remember that everything caused exceptions
so i just made a wrapper
or whatever u call something like this
some illegal state exceptions
do u know how much time it eats to see exceptions in ur console every time u do something with schedulers that might not have been scheduled yet and you need to be certain have been stopped
a good 20% of code in affected classes was there for handling those damn things
now its just 'runnable.cancel() runnable = null'
yes but do u know why it gives u those exceptions
cuz spigot is dumb
because otherwise u'd get a nullpointerexception
since bukkitrunnable literally just wraps around a bukkit task
and if there is no bukkit task, then null and u get it lol
im pretty sure its not supposed to give me an null pointer exception when im basically asking 'hey is task x null'
does isCurrentlyRunning() not work
it is in bukkitscheduler
^
the kind of the first thing you should look for when working with running or not running tasks lol
::isQueued and ::isCurrentlyQueued from BukkitScheduler
::isCancelled from BukkitTask
no lol
the documentation page doesnt mention any exceptions it throws
but i know it can be incomplete sometimes
though that is the intended way you check if tasks have been scheduled or not
(hi conclure)
hello :)
how are you bestie
caught a cold otherwise good :>
alright im testing this
aw damn, I hope you feel better soon my guy :c
since i happen to be on my pc here is the impl
@Override
public boolean isCurrentlyRunning(final int taskId) {
final CraftTask task = runners.get(taskId);
if (task == null) {
return false;
}
if (task.isSync()) {
return (task == currentTask);
}
final CraftAsyncTask asyncTask = (CraftAsyncTask) task;
synchronized (asyncTask.getWorkers()) {
return !asyncTask.getWorkers().isEmpty();
}
}
@Override
public boolean isQueued(final int taskId) {
if (taskId <= 0) {
return false;
}
for (CraftTask task = head.getNext(); task != null; task = task.getNext()) {
if (task.getTaskId() == taskId) {
return task.getPeriod() >= CraftTask.NO_REPEATING; // The task will run
}
}
CraftTask task = runners.get(taskId);
return task != null && task.getPeriod() >= CraftTask.NO_REPEATING;
}
see
no exceptions
viola
u used BukkitRunnable
alr myea maybe
wait what
why does a logger NPE crash the server
alright what the fuck
java.lang.ClassCastException: class io.github.moterius.GreekGodsPlugin.Echo cannot be cast to class io.github.moterius.GreekGodsPlugin.Echo (io.github.moterius.GreekGodsPlugin.Echo is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @52066a6b; io.github.moterius.GreekGodsPlugin.Echo is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @71fc3fce)
sooooooo
class != class
WTF
is this some residue nonsense caused by reload?
i cant understand how the logger would cause this
you're shading the class into the other plugin
no im not
im trying to obtian the instance of the JavaPlugin implementation
internally i might add
package org.welcome.welcomer;
import org.bukkit.plugin.java.JavaPlugin;
public final class Welcomer extends JavaPlugin {
@Override
public void onEnable() {
getLogger().info("[WELCOMER]: Pluginul a fost incarcat.");
}
@Override
public void onDisable() {
// Plugin shutdown logic
}
}
Hello, I am a beginner in java and in the development of plugins for minecraft. How could I add color to a text in the console when the plugin is activated? I added that log but I want to know how I can manage the colors in the console.
on reload new classloaders for every plugin are instantiated
well yea but why would it still refere to the old loader
spigot's console doesn't support arbitrary colors
for a good reason
I understand, thanks for the information.
if some reference keeps referencing it
hm i figured out part of it
it's apparantly keeping the old instance of the plugin in memory despite it being disabled
so the call Echo.getInstance() returns the static singletron of itself of the old plugin
disabling the onDisable singletron flush stopped the NPE
hmm under normal circumstances static may be gcd on class unloading
but may wanna just set the singleton to null onDisable
um
the error occurs if i set the singletron to null
if i dont it works
which...
i THIKN means that all 'Echo.getInstance()' calls grab the old class instance
uuuurgh
do it in onDisable
yea i did
just?
instance = null -> crash
// instance = null -> no crash
some part of my code references the old instance, which it really shoudln't be able to
no see i'm about 95% sure its an issue with the singletron reference
let me test this
yup i figured it out
so apparantly LogHandlers keep the old plugin handler classes, so they need to be removed and re-registered on reload
DI 😇
myeah well simple solution sometimes as well may be to not cache getInstance() too much moterius, else listen to emily
rly?
but the logger kept the reference to the old instance
the class name
whatever
for some reason the class itself didnt get removed from the pluginclassloader
Do you think development will speed up if you create separate modules for the plugin (plugin with pieces of code) with tests?
so when the old listener tried to access Echo it got the pluginclass from before the reload
depends
short term no
any project u do short term will be faster if u skip all tests lol
but in long term yeah tests may actually help a lot, (not always; but sometimes esp. w/ these religious practices like agile)
yeah well if its just ur own project u do have the luxary of just testing the parts u wanna test
Hi, Is there a way I can list all items as a command tab complete arg like essentials does, which allows for shortened names like 'diamondpick' instead of typing out the full 'diamond_pickaxe'
anyways now that my logger doest crash, back to the question i originally wanted to ask
Regexr says the regex ((.|\n)*?)(?=(Caused)) finds anything up until the first instance of the word 'Caused'.
I throw an exception in
aaaand its the exact same
https://paste.md-5.net/ebivexupoh.cs
just after I made the plugin I realized that it could be done in a week but for lack of a complete plan I had to spend a lot of time
TabCompleter allows you to return a list for possible values for tab completion
but how can i list all items
for example a config file, or just grabbing all materials (dont)
OH FUCK COPY PASTE BRUH
\n isnt \\n
why my command gives error when i type it without args? ``` if (command.getName().equalsIgnoreCase("pay")) {
String name = args[0];
String value = args[1];
if (args.length==2) {
if (sender instanceof Player) {
Player p = (Player) sender;
try {
if (ReadPlayerBalance(p.getName()) > Integer.parseInt(value)) {
SendMoney(p.getName(), name, Integer.parseInt(value));
p.sendMessage("Вы успешно отправили " + value + "$ " + "игроку " + name + "!");
} else {
p.sendMessage("На вашем балансе недостаточно средств!");
}
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}
if (args.length!=2){
if (sender instanceof Player) {
Player p = (Player) sender;
p.sendMessage("Использование: /pay <пользователь> <количество>!");
}
}
}```
didnt help -.-
because you access args[0] when there is none
you assume it always has args
also why are you checking the command's name?
oh i just realised essentials has it all in an 'items.json' config file
Wtf? args[0] is first arg, name
you yourself said that you type it "without args"
without args = no args[0]
See how it does not make any sense?
Is this what developer startups look like?
maybe
bruh.. my brain is fucked by java, i don't need anything today
alex do u know regex?
a bit
so here issue
String causedTrace = fullTrace.replaceFirst("((.|\n)*?)(?=(Caused))","");
according to the website it matches that first part
but the console print still includes everything
and yes im not accidentally printing 'fulltrace'
why are you even trying to suppress the Caused by part?
you did not double escape the \n
Exeption#getCause() ?
tried, nope
\n shuold be \\\n
What do you mean nope 
i tried that too
it returns everything EXCEPt the caused by
I still don't get what you're trying to do
you want to print only the Caused by part, or everything except the caused by part?
print caused by part only
with its message and stacktrace
u dont try it
send an example of your stacktrace as codeblock here pls
basically the string you have
https://paste.md-5.net/ebivexupoh.cs
//This is the only way to obtain the full stacktrace.
//It's also 500x slower than obtaining the stacktrace wihtout caused by
StringWriter out = new StringWriter();
PrintWriter out2 = new PrintWriter(out);
thrown.printStackTrace(out2);
String fullTrace = out.getBuffer().toString();
//This contains the stack trace, but not the caused by
//Object test = thrown.getStackTrace();
//Tried \n and \\n here, neither did anything
String causedTrace = fullTrace.replaceFirst("((.|\\n)*?)(?=(Caused))","");
Echo.getInstance().getLogger().info("Full CausedTracke: "+fullTrace);
Echo.getInstance().getLogger().info("Truc CausedTracke: "+causedTrace);
this is what I get
for a
@EventHandler
public void on(final ServerExceptionEvent event) {
getLogger().info("Full exception:");
event.getException().printStackTrace();
getLogger().info("Cause exception:");
event.getException().getCause().printStackTrace();
}
wait one second here
this works on the event yea
not if youre registering a Log Handler
I mean, your cause looks right there no ?
and an 11 element stacktrace ?
theyre basically identical
its a copy of the stacktrace with the name of the plugin added
i want teh caused by not the stack trace
the "caused by" part ?
yes
then literally just grab the first element on the stack ?
or like, however nelements you need
Like, the JVM does nothing but just adding Caused by and then printStackTrace on the cause
the bottom stacktrace looks similar because the exception is rethrown in the handler
so its stacktrace is naturally not that different. Its missing the call to Command#execute and has a different line number in the SimpleCommandMap
but beyond that, same method and same call stack, so same stacktrace
private static final Pattern CAUSED_BY_PATTERN = Pattern.compile(".*(?<causedBy>Caused by: (.*))", Pattern.DOTALL);
public static String getCausedBy(String input) {
Matcher matcher = CAUSED_BY_PATTERN.matcher(input);
matcher.find();
return matcher.group("causedBy");
}
this what you want?
using regex for this is absolutely useless
i don't even understand what you're trying to achieve tbh
doesnt it point to different spots?
I mean, you can do all of this programatically
the "caused by" is simply added in printStackTrace for the sake of printing it if getCause isn't null
me neither, but I like finding regexes when people ask for them

at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47)
vs
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)```
those are not the same
the stacktraces may look like it but theyre not
@smoky oak doesn't this exactly do what you wanted to do?
yea
do you have any clue why the original pattern works on the regex website but not in code?
"Caused by: " + ex.getCause()
do you want all caused by's or only the last one?
i mean one logged exception should only have one causedBy right?
probably because your whole regex is non-greedy and matches almost anything and hence replaces the first "nothing" with nothing
no lol
exceptions can have deep causal structures
that can be rethrown/wrapped for as often as you want pretty much
if you want to get only the last caused by, use this. If you want all Caused by's, add a ? after the first .* like this: ```java
private static final Pattern ALL_CAUSED_BY_PATTERN = Pattern.compile(".?(?<causedBy>Caused by: (.))", Pattern.DOTALL);
i see, as for lynxplay's earlier question, i would just grab the upper elements of the Throwable.getCause if they would actually be the same but they aint
the proper way is to log exceptions completely and don't mess with them at all
im trying to print them partially to chat for debugging purposes
in that case I'd just remove all lines that have org.bukkit or net.minecraft or java. as beginning lol
so you're only left with the plugin parts
well the idea here is that my only stint in the console is to press enter when i inevitably crash it again
Trust me when I tell you that minecraft chat is not the most pleasant thing to look at for exceptions
given how limited the width is
Hi, I want to be able to use commands from different plugins that give plugin items, but i want to be able to add them to a chest inventory (or something similar), for example if im using a crate plugin on my server and wanted to do 'crate give key <player>' is there a way i could create a fake player or something so that it puts the key into an inventory which i can then manage with my own plugin? Idk if that made any sense, sry if it didnt
yo wtf
the message in log and in chat are completely different
Many plugins implement an API for this kind of thing. it's not intended to use commands between plugins
okay thanks
@tender shard do u know what the [cr] thing is? It's not a newline
ah its \n\r together
is it possible that 'obj' isnt null but '(SomeClass) obj' is?
carriage return
that causes an exception instead of returning null
private final MongoDB database = (MongoDB) FFA.getInstance().getDataBase();
System.out.println(FFA.getInstance().getDataBase());
System.out.println(database);
but here
database is null
but the other thing isnt
i need extrem help with nbt tags, please dm me i will got depressions
Your private final field is intiialized at class instancing. If your FFA or database in your main class has not yet been set when you instance your other class it will be null
i need help with nbt tags. first i want if the player places a door the placed door got a nbt tag test. now if the player want to open the door, the nbt tag from the block got to send in the chat. but it dont works. i code in spigot 1.20.1 please help me boys
code looks fine
😀
"but it don't works" what doesnt work? does nothing happen?
have yo tried printing at several spots to see if the code reaches that point
if i place the door, no mesage will send
like does it even see if you are placing down a door
ah ok
yes
you don;t have an api version in your plugin.yml i my guess
and i got errors in my console in the interactevent
okay
but in maven, but i dont use it
well stating what errors those are would probably help...
oh errors, you could have said so
there are like infinitely different errors so we dont magically know what you are referring to
wait i upload on pastebin
i have a api from nbttagsapi in my pom.xml in maven but i dont use it. this isnt be the error?
here are the errors: https://pastebin.com/AWX8DhTb
I thought doors had a tilestate?
why would they need that? they don't need to be a block entity
Doors have no TileState so no PDC. They are just blocks
so i cant safe a nbt tag in my doors?
u need to use the chunks pdc
?morepdc
You can create custom persistent data types on your own, or use one of the many libraries available which have implemented those which match your needs. Learn about more persistent data types here: https://www.spigotmc.org/threads/more-persistent-data-types-collections-maps-and-arrays-for-pdc.520677/
Hello packet question
why PacketPlayInUseEntity gets sent when i right click on a packet armor stand
but why doesn't it get sent
when i left click (attack)
okay, now i done this: https://pastebin.com/sBDiF29P and it got no problems
but now how can i read the pdc data if the player clicks on the door.
no, doors have no PDC
