#help-development
1 messages · Page 1807 of 1
that would essentially be like running /teleport @a 821 32 917 i guess since its getting all the online players
Ideas why i am getting Failed to create remapped artifact, project main artifact does not exist. for specialsource-maven-plugin?
I want all players to be teleported to a lava pool because imm making a troll plugin
I suggest you to study and understand Java first for making plugins
Ok
learning java and the bukkit/spigot api helps
Is ok for me to only one player
Hello, what's the best way to send a command to a plugin trough a website?
sockets 😎
MySQL?)
idk if they meant that kind of command..
I mean so people can ban people from the website
yeah u need a way for server and site to interact
yeah
so anything with communication works ig, http, websocket, custom java.net.Socket stuff
just a matter of [de]serializing the data
I'm trying to make a staff hub for Spigot where people can monitor there server from a website, check who's online, execute commands etc
is it fixed ?
No
I have tried a lot of configuration variants but still Failed to create remapped artifact, project main artifact does not exist
you would just need to edit names at the top ... and this wont work ?
I've encountered a bug in spigot that has yet to be fixed officially, but I can fix said bug locally. Is there a way to have build tools build the local changes rather than fetching the bugged version from git?
you could edit craftbukkit / bukkit and rebuild the stuff ....
what is you full maven ?
this is my full parent maven
With your edits
This is my original one
Same Failed to create remapped artifact, project main artifact does not exist., without plugin specialsource-maven-plugin jar contains net.minecraft.nbt.CompoundTag
<finalName>ntdLuckyBlock-${project.version}</finalName>
can you remove this and try again?
same
and you forgot
No
This lines in my modules
Each module contains this lines
parent pom not contains that
couldnt find it there
It is a parent pom
hmmm dont know about module-system in maven... did you try to add this too ?
and this is still removed ?
Yes
Why not submit the fix….
You can’t execute ss on a parent pom
That’s probably where you’re getting the error from
hmm weird ... maybe fault of a childmodules ? dont know about the modules system sry
Where i could move it?
To nms 1_18 module?
To the child pom where you need it
ss 🧐
special source i guess
The ss config is version dependent anyway
So putting it in the parent pom doesn’t make much sense
what is the bug ?
It works
Thank you so much
I love you
The bug is labeled as an issue SPIGOT-6278 Persistent piglins count towards mob cap
Inside the issue is a full overview of the issue and how to fix it and then nobody actually submitted the fix
then you should do that
dont wait for others
just submit a PR
and everything will be fine
and according to what i've seen, you dont really know how to use git isnt it?
I know how to use git
oooo ok
I can submit a pr, but I'm not sure exactly how to test to verify the fix actually works
md_5 will do that for ^^
Once you’ve committed your changes you can use BuildTools —dont-update to build
You can use —dev to have buildtools put you into the master branch
Thank you
public class HelloCommand implements CommandExecutor {
@SuppressWarnings("unused")
private Main plugin;
public HelloCommand(Main plugin){
this.plugin = plugin;
plugin.getCommand("gravityaroundthepizza").setExecutor(this);
}
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (!(sender instanceof Player)){
sender.sendMessage("no console!");
return true;
}
Player p = (Player) sender;
if (p.hasPermission("gravity.use")) {
p.sendMessage("GRAVITY AROUND THE PIZZA");
return true;
} else{
p.sendMessage("Ur Gravity");
}
return false;
}
} ```
where do i add codes
in your plugin or what ?
create a new class named 'HelloCommand'
that's the hellocommand clas
and you want the cmd to be added ?
and whats the problem then ?
public class HelloCommand implements CommandExecutor {
public HelloCommand(Main plugin){
plugin.getCommand("gravityaroundthepizza").setExecutor(this);
}
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
/* code */
}
} ```
ty
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (!(sender instanceof Player)){
sender.sendMessage("no console!");
return true;
}
Player p = (Player) sender;
if (p.hasPermission("gravity.use")) {
Bukkit.getOnlinePlayers().forEach(n->n.teleport(location));
return true;
} else{
p.sendMessage("Ur Gravity");
}
return false;
}
Does it matter
I dont want provide this
Otherwise search maven shade excludes / filters
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (!(sender instanceof Player)){
sender.sendMessage("no console!");
return true;
}
Player p = (Player) sender;
if (p.hasPermission("gravity.use")) {
p.sendMessage("GRAVITY AROUND THE PIZZA");
return true;
} else{
p.sendMessage("Ur Gravity");
Location loc = new Location(world, 821, 32, 917);
Bukkit.getOnlinePlayers().forEach(p -> p.teleport(loc));
return true;
}
return false;
}
}
``` so like this?
It just has like version info, its not sensitive
md_5 how is it going with the new worldcreator 😄 ?
?
this will now teleport only if you dont have the permission
Ok so thats where i put it?
Yesterday i have tried a lot of build configurations and one of them have removed this. I dont know how remove it now... search maven shade excludes / filters trying to understand...
in the same class (HelloCommand)
Anyway it is extra information and resource weight
Did i put it in the right spot tho
i dont know where you want to put this
is it gona work?
do you want to put it there when "GRAVITY AROUND THE PIZZA" displays in the chat ?
See second example with meta inf filter excludes
yea
Someone already told you earlier today, please learn more java
then its obviously not the right spot
yea
i need this rn im rushing this plugin
where do u recommend put it
where "GRAVITY AROUND THE PIZZA" will be send ?
Yes
then move it into there
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (!(sender instanceof Player)){
sender.sendMessage("no console!");
return true;
Location loc = new Location(world, 821, 32, 917);
Bukkit.getOnlinePlayers().forEach(p -> p.teleport(loc));
return true;
}
Player p = (Player) sender;
if (p.hasPermission("gravity.use")) {
p.sendMessage("GRAVITY AROUND THE PIZZA");
return true;
} else{
p.sendMessage("Ur Gravity");
``` so like that or something different?
yea
why do you dont put it there then ?
mix it in with gravity around the pzza?
?help
selfrole Add or remove a selfrole from yourself.
cleanup Base command for deleting messages.
embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.
findcog Find which cog a command comes from.
names Show previous names and nicknames of a member.
userinfo Show information about a member.
listcases List cases for the specified member.
reason Specify a reason for a modlog case.
permissions Command permission management tools.
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
there you go
ok
Without knowing java basics you cannot code plugin
If you want obligate us to code it for you it is really not a good solution
ok ;-;
Community ready to help you, but not code full plugin from scratch
If you need it fast pay someone to make it
+1
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
Why is new Entity hide/show API got deprecated?
@solemn igloo it's clear that you want to learn how to make a plugin, but I must make it perfectly clear that you need to learn how to program before you dive into this. I made the same mistake a couple years ago and it put me off the programming game for a while before I got back into it with Python. Any one of the links that have been being given to you all night are good, you just need to learn this first.
I'm happy to code a quick plugin for you if you need it right now, free of charge. It's 2:31 am right now so I can start work on it tomorrow. Just DM me what you need
533 for me
it's like Gordon Ramsey but discord mod
stop writing ... so annoying
congratulations you are wasting people's time, bandwidth, space, air, oxygen, and your own life
👍
if he's doing this then he was planning on wasting all of that either way
save the messages!
ok i helped you bro no prob
https://github.com/Aeternum-Studios/LocalResourcePackHoster i'd like to compile this module (and add it to maven path so i can import it my own plugin), how can i do it
usually modules have a maven guide and at least a compiled version already, this one has none
sorry if my question seems a bit "u should learn java in the first place" i simply never really gave a freak about compiling and stuff and now that i search i can't find
i dont think learnjava command really effective?
oh the compile
hmm k
?learnjava when 😂
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
hmmm
Can anyone help me
it doesnt have pom.xml
yeah thats the whole pb
if normal then you can just go and use mvn -e clean install
but if you dont then get a template from somewhere
alright
and try to get every dependencies the repo need and put it in pom.xml
will do, thanks for the help, i'll update on how it goes
public JavaPlugin plugin = Utilities.getPlugin(Utilities.class);
@EventHandler
public void OnJoin(@NotNull PlayerJoinEvent e){
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
Player p = e.getPlayer();
Location location = p.getLocation();
p.playSound(location, Sound.ENTITY_PLAYER_LEVELUP, 1.0F, 1.0F);
}, 20L);
}
}``` it doesnt play the sound
i tried sending a message and it didnt work either
Hello, I'm getting an error when I try removing a merchant, could you help me figure out what I'm doing wrong? ``` @EventHandler
public void onInventoryClose(final InventoryCloseEvent event) {
if (event.getInventory().getType() == InventoryType.MERCHANT && event.getPlayer().hasMetadata("Trading")) {
System.out.println("Holder: " + event.getInventory().getHolder());
final InventoryHolder merchant = event.getInventory().getHolder();
((Entity) merchant).remove();
//event.getPlayer().removeMetadata("Trading", SimplePlugin.getInstance());
}
}```
What's the error
I made a small hello world plugin, it’s just 30 lines of code and does nothing but add a new recipe to the item stack. The .jar i get is 51 MB. Is this normal? Dependencies I guess?
you forgot to add <scope>provided</scope>...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
great job compiling the entire jar into your file
Ah that makes sense thanks
ok so i did, it compiled, then i moved the new .jar into the plugins folder of my minecraft server, restarted it; and i get this error
https://i.imgur.com/F78a0im.png
any clue?
it pretty obvious isnt it?
learn how to make bukkit plugin when
oh wait, the pom.xml
does it contain the line with src/main/resources?
if it does
then move config.yml, plugin.yml or everything related to the jar but isnt .java files to that folder
dont move license and readme btw, it does nothing so dont need to keep it
yes it does
alright will do
also i was wondering
their docs mention to add https://i.imgur.com/pRb5wrG.png
but their plugin.yml doesn't contain it
where should i add it?
nvm it does
[18:31:17 ERROR]: Error occurred while enabling GravityAroundThePizza 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 "me.Jaden.GravityProject.Main.getCommand(String)" is null
did you register your command in plugin.yml?
you should
yes?
Should i do it like this
commands:
gravityaroundthepizza
or do i add more
thats the only commands
command*
check this: https://www.spigotmc.org/wiki/plugin-yml/
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
and make sure you keep all indentations
don't mind, just check command section
then just add only one
ok
name: GravityAroundThePizza
version: 1.0
author: JadenPlaysMC569
main: me.Jaden.GravityProject.Main
description: FIRST PLUGIN I CODED
api: 1.18
commands:
gravityaroundthepizza
Is thsi gud
what is indentations
place 2 spaces before 'gravityaroundthepizza'
Also, java package names should be lowercase ALL
like me.jaden.gravityproject, not me.Jaden.GravityProject
2 spaces should be only before command name
yes
other is ok
name: GravityAroundThePizza
version: 1.0
author: JadenPlaysMC569
main: me.jaden.gravityproject.main
description: FIRST PLUGIN I CODED
api: 1.18
commands:
gravityaroundthepizza
Thats good?
it should be ok
ok thakns
add : at the end of the command
Then?
change api to api-version
also did you changed the actuall name of package?
that's it ig
yea
anyone know why i might be getting "cannot access <package>" when im trying to use 1.18 NMS?
@vale ember i ahve error
your project java version should be java 17 i think
you are trying to access package that don't exist, can you send full error
?
it says canntot find main class
did you renamed your main class?
cannot access net.minecraft.world.entity.npc.InventoryCarrier
cannot access net.minecraft.world.entity.ai.goal.PathfinderGoalLookAtPlayer
cannot access net.minecraft.world.level.GeneratorAccessSeed
on compile
what is your java version for the project
oh let me check
i put all letters lowercased except m in main
it should matched your actual main class path
ok
and it's case-sensitive
Try delaying with a tick
'x()' in 'net.minecraft.world.entity.EntityInsentient' clashes with 'x()' in 'net.minecraft.world.entity.EntityLiving'; attempting to use incompatible return type
anyone seen this?
no idea how to fix
@summer scroll when i did the command this showed p
tried adding in a filler and it errored x() in me.marco.Economy.NMSShopkeeper cannot override x() in net.minecraft.world.entity.EntityLiving
[18:53:18 WARN]: Unexpected exception while parsing console command "gravityaroundthepizza"
org.bukkit.command.CommandException: Unhandled exception executing command 'gravityaroundthepizza' in plugin GravityAroundThePizza v69420.69
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[spigot-api-1.18-R0.1-SNAPSHOT.jar:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-api-1.18-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_18_R1.CraftServer.dispatchCommand(CraftServer.java:800) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3353-Spigot-dbf4938-f49e9d1]
at org.bukkit.craftbukkit.v1_18_R1.CraftServer.dispatchServerCommand(CraftServer.java:785) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3353-Spigot-dbf4938-f49e9d1]
at net.minecraft.server.dedicated.DedicatedServer.bf(DedicatedServer.java:453) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3353-Spigot-dbf4938-f49e9d1]
at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:429) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3353-Spigot-dbf4938-f49e9d1]
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1206) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3353-Spigot-dbf4938-f49e9d1]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1034) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3353-Spigot-dbf4938-f49e9d1]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3353-Spigot-dbf4938-f49e9d1]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.Error: Unresolved compilation problem:
String literal is not properly closed by a double-quote
at me.Jaden.GravityProject.commands.HelloCommand.onCommand(HelloCommand.java:26) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-api-1.18-R0.1-SNAPSHOT.jar:?]
... 9 more
@vale ember
send your command code, there's an error
i guess nms got a bit more difficult
ok wait
yea honestly, the 1.18 is really different from the rest
@vale ember
has anyone figured it out atm?
id love to use my old code but i guess thats nms pains
@SuppressWarnings("unused")
private Main plugin;
public HelloCommand(Main plugin){
this.plugin = plugin;
plugin.getCommand("gravityaroundthepizza").setExecutor(this);
i don't know, i'm still trying figure it out too
😂
without using remapped-mojang, that's confusing as hell
@vale ember
deepdiving is part of the fun but
i mean onCommand method's body
this is just bonkers
Just use remapped?
'x()' in 'net.minecraft.world.entity.EntityInsentient' clashes with 'x()' in 'net.minecraft.world.entity.EntityLiving'; attempting to use incompatible return type
ArmorStand would be my guess
wait etating brbr
hold on, let me open my ide
wait how do u even spawn stuff in in 1.18??
super(EntityTypes.aX, ((CraftWorld) loc.getWorld()).getHandle());
WorldServer craftWorld = ((CraftWorld) loc.getWorld()).getHandle();
this.bR.a(0, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 16.0F));
this.b(loc.getX(), loc.getY(), loc.getZ());
craftWorld.addWithUUID(this, CreatureSpawnEvent.SpawnReason.CUSTOM);
}```
is his like not how u do it anymore
Level#addFreshEntity with mojmaps
Since you're using unmapped good luck finding it
public class NMSShopkeeper extends EntityVillagerTrader {
errors
'x()' in 'net.minecraft.world.entity.EntityInsentient' clashes with 'x()' in 'net.minecraft.world.entity.EntityLiving'; attempting to use incompatible return type
i found like everything its just this error
how can i use remapped version with gradle?
Two methods have the same name. They can't have that
To solve it use remapped
its from spigot itself tho
isnt remapped like
not allowed to be compiled with or smth
so it wont solve my problem anyway bc when i re-compile with non mapped itll be the same
what is EnumItemSlot on remapped?
how else do u make numb entities with look@player tho
You don't
oh okay
the package names are still the same right?
i guess i can find it from the package names
should b
fixed indeed!
Now a new error, which I really don't understand: https://i.imgur.com/idxKf3c.png
"Cannot find main class network.aeternum.bananapuncher714.localresourcepackhoster.LocalResourcePackHoster"
But look: https://i.imgur.com/Mg2HTC2.png my plugin contains this class right?
This is the pom.xml btw https://i.imgur.com/X2XLWLw.png
i just go on an old version and 1:1 deep dive
usually works
dont even need to do the mapping thing but probs makes life ez
so far most thing shave stayed the same
@summer scroll im getting the error even when i make my object extend EntityArmorStand
are you also getting it?
Those are uncompiled classes in that screenshot. Are you looking in the jar?
nah
the whole plugin got compiled into a jar called LocalResourcePackHolder.jar moved to the plugins folder of mc server
Is there an event that gets triggered when a player gets deop'd?
am i just stupid or is NMS on the new patch literally impossible
You could listen to PlayerCommandPreprocessEvent and check if the command starts with op or deop,
found that on a google
of the two given options, the second one is wrong
i take back my word xd, remapped is useful
I need to prevent /deop'ing
wait did u fix it?
and just print the deop message
without the player being deopd
can u show me ur class pls i legit cant get anything to work
so fried
how r u creating nms entities
still haven't tried yet
o
The screenshot is it of the contents of the jar or contents of project
what about packets Olivio?
Clientbound hmm
What about them?
content of project, which i then "mvn clean package" and mv the target/blabla.jar to the plugin dir
How would I give the player an Item when they stand on a type of block? For example blue glass
Open the jar and see if stuff is in the right place
movevent, check block under feet (loc.add(0, -1, 0), //giveitem
That doesn't work because Entity cannot be converted to void.
uhm how can i open the jar from command line?
do u just want me to read its content? (characters)
Why would you convert it to void??
Could you elaborate? I suck at Java :3
@EventHandler
public void onMove(PlayerMoveEvent event){
Player player = event.getPlayer(); // get the player
Block block = player.getLocation().add(0, -1, 0);
if(block == null) return;
if(block.getType() == Material.DIAMOND_BLOCK){
player.getInventory().addItem(new ItemStack(Material.DIAMOND_BLOCK, 64));
}
}
might not work
That's not how you do it
i wrote it off memory here
what's the difference between a player's metadata and the persistent data container?
@chrome beacon in fact it is empty https://i.imgur.com/CmrjGam.png
?scheduling
Olivo r u at your pc? If so can you push 😅
Yeah
Thanks for the help it works
Thanks :3
Done
package com.host.ringitem;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
public final class RingItem extends JavaPlugin
{
@Override
public void onEnable()
{
}
@EventHandler
public void onMove(PlayerMoveEvent event){
Player player = event.getPlayer(); // get the player
Block block = (Block) player.getLocation().add(0, -1, 0);
if(block == null) return;
if(block.getType() == Material.DIAMOND_BLOCK){
player.getInventory().addItem(new ItemStack(Material.DIAMOND_BLOCK, 64));
}
}
@Override
public void onDisable()
{
}
``` I spammed alt Enter and now I dont seem to have any errors 🤔
🙌🙌
public class HelloCommand implements CommandExecutor {
@SuppressWarnings("unused")
private Main plugin;
public HelloCommand(Main plugin){
this.plugin = plugin;
plugin.getCommand("gravityaroundthepizza").setExecutor(this);
}
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (!(sender instanceof Player)){
sender.sendMessage("WHY U IN CONSOLE U MUST BE IN GAME"");
return true;
IntelliJ moment
Could you upload the project to github so we can take a look
Plugin content: https://i.imgur.com/1EkSO7s.png https://i.imgur.com/yq6uMEs.png
whats wrong with it
i dont get what u mean
bit tired sorry
Wait you're missing the plugin classes in the src folder
@slim cairn do you need to registerevents for javaplugisn
try add getServer().getPluginManager().registerEvents(this, this); in onEnable() idk if u need to do that
Oh, so everystuff of the plugin (except readme and pom.xml) have to go in src/main ?
Nothing wait
implements Listener is also missing
package com.host.ringitem;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
public final class RingItem extends JavaPlugin implements Listener {
@Override
public void onEnable()
{
}
@EventHandler
public void onMove(PlayerMoveEvent event){
Player player = event.getPlayer(); // get the player
Block block = (Block) player.getLocation().add(0, -1, 0);
if(block.getType() == Material.GREEN_STAINED_GLASS)
{
player.getInventory().addItem(new ItemStack(Material.LIGHT_BLUE_DYE, 1));
}
}
@Override
public void onDisable()
{
}
}
``` I changed a bit more, how's this?
no its there at the public final class
kinda confusing xd, is PacketPlayOut clientbound/serverbound?
How do I stop fake blocks from disappearing on left or right click?
Would this work?
How do I export it to a usable .jar for my server lol
idk its been a while since ive done starter tutorial plugins
uh
what are you using 😂
eclipse or intellij
are you using maven
ye Maven
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
far out i dont even remember my own
linking him wont help tbh if hes a noob he just wants to learn by doing
he will learn by reading when hes had more hands on imo
It literally tells you want to do
What do you think hes doing now
reading what we're saying
same thing
thnx
bro what
Reading is exactly what learning is
haha
if u understand it go for it
just wanted to help u m8
i remember even after following that there was smth else i had to do but that might just b me
gl
nah its fine I was just confused
I mean you can learn by other ways also 😅
by doing 🕺
@ivory sleet How do I stop fake blocks from disappearing on left or right click?
@ivory sleet are u a contributor?
No
Looking for someone to code me a very simple chest locking plugin. DM me for more info and to discuss price!
he is a discord helper
does sending another update work
i see
has anyone thats come online recently dealt with 1.18 nms?
im getting 'x()' in 'net.minecraft.world.entity.EntityInsentient' clashes with 'x()' in 'net.minecraft.world.entity.EntityLiving'; attempting to use incompatible return type
bump
What’s a fake block?
like a fake block update
Who can help me
i think from my little testing experience you can just like send another fake update
[18:53:18 WARN]: Unexpected exception while parsing console command "gravityaroundthepizza"
org.bukkit.command.CommandException: Unhandled exception executing command 'gravityaroundthepizza' in plugin GravityAroundThePizza v69420.69
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[spigot-api-1.18-R0.1-SNAPSHOT.jar:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-api-1.18-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_18_R1.CraftServer.dispatchCommand(CraftServer.java:800) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3353-Spigot-dbf4938-f49e9d1]
at org.bukkit.craftbukkit.v1_18_R1.CraftServer.dispatchServerCommand(CraftServer.java:785) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3353-Spigot-dbf4938-f49e9d1]
at net.minecraft.server.dedicated.DedicatedServer.bf(DedicatedServer.java:453) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3353-Spigot-dbf4938-f49e9d1]
at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:429) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3353-Spigot-dbf4938-f49e9d1]
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1206) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3353-Spigot-dbf4938-f49e9d1]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1034) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3353-Spigot-dbf4938-f49e9d1]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3353-Spigot-dbf4938-f49e9d1]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.Error: Unresolved compilation problem:
String literal is not properly closed by a double-quote
at me.Jaden.GravityProject.commands.HelloCommand.onCommand(HelloCommand.java:26) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-api-1.18-R0.1-SNAPSHOT.jar:?]
... 9 more
Legit just had to double click package
yeah it doesnt work
have u tried 1 tick after with a scheduler?
show me ur yml
I didnt have to do the dependencies since I'm using the SpigotMC Minecraft Development thing
all goods broskis?
trying it out attm
easy lmk how u go
Kk wait
name: GravityAroundThePizza
version: 1.0
author: JadenPlaysMC569
main: me.Jaden.GravityProject.Main
description: FIRST PLUGIN I CODED
version-api: 1.18
commands:
gravityaroundthepizza:
commands:
gravityaroundthepizza:
description: gravityaroundthepizza
usage: /<gravityaroundthepizza>
aliases: [gatp]
make it that
copy mine over your commands part
Wdym
name: GravityAroundThePizza
version: 1.0
author: JadenPlaysMC569
main: me.Jaden.GravityProject.Main
description: FIRST PLUGIN I CODED
version-api: 1.18
commands:
gravityaroundthepizza:
description: gravityaroundthepizza
usage: /<gravityaroundthepizza>
aliases: [gatp]
make this your yml brother
Ok thanks but can u dm me this because im on my phone rn
Interesting command name
Thats my friends catch phrase
classic

ah im not verified
i dont even have a spigot account
@ivory sleet how would you make shopkeepers without nms
its broken in 1.18
yeah clicking now works
but completely breaking block
doesnt
I am using PlayerInteractEvent
hm
so clicking lets you mine it now
right
i wonder if it triggers blockbreakevent?
or if the client sends some sort of trigger
i wonder if like
nah itd be strictly client side
im assuming you cant put a placeholder there?
are you trying to cancel it
or smth
What’s a shopkeeper?
just like an npc zombie/villager or smth standing still but looking @ players
had some code in 1.17 but 1.18 nms is sooo bad 😭
Oh use citizens api?
package com.host.ringitem;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
public final class RingItem extends JavaPlugin implements Listener {
@Override
public void onEnable()
{
}
@EventHandler
public void onMove(PlayerMoveEvent event){
Player player = event.getPlayer(); // get the player
Block block = (Block) player.getLocation().add(0, -1, 0);
if(block.getType() == Material.GREEN_STAINED_GLASS)
{
player.getInventory().addItem(new ItemStack(Material.LIGHT_BLUE_DYE, 1));
}
}
@Override
public void onDisable()
{
}
}
``` Okay so this didnt work
Yeah so right / left click respawns it
i hate APIs 😦
That’s a you problem
but completely destroying
one sec
when you listened do you just listen to eveyrthing in general
id have thought it'd play out a break event on the original
egooo 😭
also masochism
like+retweet this if you like bdsm or pizza
I guess I can accept masochism as an argument
PlayerInteractEvent
and Action.LEFT_CLICK_BLOCK
when you tried blockbreak did u try and listen for the original block if that makes sense
no
k
just in general
make it this tell me if anything happens
I did.. nothing happened
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
public final class RingItem extends JavaPlugin implements Listener {
@Override
public void onEnable()
{
}
@EventHandler
public void onMove(PlayerMoveEvent event){
Player player = event.getPlayer(); // get the player
getServer().broadcastMessage("Hello there!");
Block block = (Block) player.getLocation().add(0, -1, 0);
if(block.getType() == Material.GREEN_STAINED_GLASS)
{
player.getInventory().addItem(new ItemStack(Material.LIGHT_BLUE_DYE, 1));
}
}
@Override
public void onDisable()
{
}
}```
oh
tell me if the message prints out
you could try like, messing with it so they cant mine
No message prints out when desrtoying the block
i.e on left click change the item in their hand
but dont update the inventory
or just update it
just dont let them mine
fk em 😂
May I ask why are you casting a Location to a Block?
did id o that
in my original
which one lolhttps://gyazo.com/08d4dcb03eb2fd75a97d77e40f40415e
This one is what I was referring to
yeah but the item is glass
😅
just make it air
for one tick
then right after maybe anoither tick
??
like oninteract, set it to air, then a tick after, make it glass again
that way the mine stops
and they physically cant break it in time
unless theyre hacking
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
public final class RingItem extends JavaPlugin implements Listener {
@Override
public void onEnable()
{
}
@EventHandler
public void onMove(PlayerMoveEvent event){
Player player = event.getPlayer(); // get the player
getServer().broadcastMessage("Hello there!");
Block block = player.getLocation().add(0, -1, 0).getBlock();
if(block.getType() == Material.GREEN_STAINED_GLASS)
{
player.getInventory().addItem(new ItemStack(Material.LIGHT_BLUE_DYE, 1));
}
}
@Override
public void onDisable()
{
}
}```
@slim cairn
because
if you make it so they cant mine it your problem is solved as scuffed as it seems
since its client side theres not much u cando unless u wanna start dancing around with packets or protocollib
too lucrative to play with unless you enjoy mental gymnastics and update changes
I get this error https://prnt.sc/21u9t5p
Stuff from BetterMinions.java: https://prnt.sc/21u9xgc
DataFiles class: https://prnt.sc/21u9zea
Where messages.yml it's being created: https://prnt.sc/21ua1lz
the file is being created where it should with what it should
https://prnt.sc/21ua7fv - contents of messages.yml
Can anyone help me figure out why i get that error?
Prnt thing doesn’t work on my phone
k
@ivory sleet do u know any smart people that might be able to help me with my NMS problem

yeah if you hold left click it still destroys
@quaint mantle can u answer my question
whats up bro
did you make it air, then change it back?
Ugh no, most people I know use APIs!!! But maybe some guy in paper discord 🤷 or well anti cheat devs usually love to shit themselves with nms
nvm working cheers
I need to teleport @a to a specific coordinates and someone sent me this code
Location loc = new Location(world, 821, 32, 917);
Bukkit.getOnlinePlayers().forEach(p -> p.teleport(loc));```
Where do i put it
normally idm spoonfeeding but did u even try 😂
show me you rcommand
new DataFiles().getMessages() is null gushell
@ivory sleet can u raise the issue i had w the devs
idk if anyone else has had it but
kinda sad to see it happen
What issue?
public class HelloCommand implements CommandExecutor {
@SuppressWarnings("unused")
private Main plugin;
public HelloCommand(Main plugin){
this.plugin = plugin;
plugin.getCommand("gravityaroundthepizza").setExecutor(this);
}
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (!(sender instanceof Player)){
sender.sendMessage("WHY U IN CONSOLE U MUST BE IN GAME"");
return true;
Theres more but its private
t
@ivory sleet just give this a scroll if u can anything from me pls
@tacit drift thing is
specify the return type
brooo
You probably want to use
DataFiles files = new DataFiles();
files.createPluginFolder();
Configuration config = files.getMessages();
Such that you reuse the same DataFiles object
What
Instead of having two different ones
idk to try override it
like i do everything else with nms
'x()' in 'net.minecraft.world.entity.EntityInsentient' clashes with 'x()' in 'net.minecraft.world.entity.EntityLiving'; attempting to use incompatible return type
i cant change the return type of x() in EntityInsentient or EntityLiving
both are read only
Try using remapped
???
if i use remapped, when i use the non mapped jar it wont solve the problem
true - olivio 
you cant compile with remapped
now messages.getString("example") is null
following the eula
You can
@quaint mantle why u wont answer
Just don't release source code
of remapped?
doesnt compiling my jar means i get the remapped source code with it
even tho i probably wont get sued by microsoft id still rather not do that
and considering it works fine normally i feel like this is an easy fix
i people up above are aware of it
Yeah but you don't release that source so it's fine
@quaint mantle why broo
u dont even have a command label or anything
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (cmd.getName().equalsIgnoreCase("gravityaroundthepizza")) { // If the player typed /gravityaroundthepizza then do the following, note: If you only registered this executor for one command, you don't need this
if (!(sender instanceof Player)){
sender.sendMessage("WHY U IN CONSOLE U MUST BE IN GAME"");
return true;
}
Location loc = new Location(world, 821, 32, 917);
Bukkit.getOnlinePlayers().forEach(p -> p.teleport(loc));
return true;
} //If this has happened the function will return true.
// If this hasn't happened the value of false will be returned.
return true;
}
@solemn igloo enjoy
Omg tyy
hello! Does anyone have any Linux-compatible profiler to recommend? I'm looking to investigate into my plugin thread usage, after ~10mn of use my server becomes super slow and often runs several hundreds of ticks behind
if it only takes 10 mins to crawl to a stop you don;t need a profiler
look at every point where you create any new Threads/tasks
well currently I have only one additional thread running, and while I get why I can take much performance (without going much into details I have an external WASM module that constantly polls for events), I don't get why it actually does, it's at the lowest possible priority and doesn't affect directly performance once running, but only after a while
i think this can help you
¯_(ツ)_/¯
performance drop over time you are either creating more and more threads, or you are filling up memory
as for the thread count, I already checked (Thread.getAllStackTraces()) and I can only see one thread that I've created, and as for the memory the JVM has 4GB allocated with plenty of space left in RAM, so I don't think it comes from memory usage
thanks i'll have a look!
package com.host.ringitem;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
public final class RingItem extends JavaPlugin implements Listener {
@Override
public void onEnable()
{
getServer().getPluginManager().registerEvents(this, this);
}
@EventHandler
public void onMove(PlayerMoveEvent event){
Player player = event.getPlayer(); // get the player
Block block = player.getLocation().add(0, -1, 0).getBlock();
if(block.getType() == Material.LIME_STAINED_GLASS)
{
player.getInventory().addItem(new ItemStack(Material.LIGHT_BLUE_DYE, 1));
player.teleport(new Location(player.getWorld(), 1, 63, 0));
}
}
@Override
public void onDisable()
{
}
}
```so this would be the final thing?
Is it possible to send linked glass pane block changes?
Hi everyone, I have a question. When I used the updated Inventory title in 1.18, it caused the item to be cleared, but it was fully usable in 1.17.
Does anyone know the reason?
Is there also a way to change at what direction the player looks when they get tp'd back to spawn? @quaint mantle
ye what this guy said
General question: Is there ANY blocks in minecraft that are invisible & non-collidable? Ones that arent string.
air blocks
anything else?
because I dont want the player to be getting a token every time they touch air 🚎
Umm, so I use remapped-mojang on Gradle, and how can I reobfuscate the thing?
specialsouce?
yeah but i don't know how to use it on gradle
structure void
but those are obtained with the /give command
no example on gradle
i think you need to wait for paper to do it? or they might already do it idk
Insttead of when the player is on the block, can I make it so that when the player touches the block?
for example, flies into it with an elytra
why paper?
Hi, I want to try out the new 1.18 spigot version but I dont get any classes like JavaPlugin or CommandExecuter
cause they use gradle?
?
did you add the dependency?
I just see in the bukkit player class there's sendEquipmentChange,hideEntity,showEntity method,.But when I try to use that, the method isn't exist? (I did try to remove my maven cache)
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
yes the one i got with buildtools
You can use paperweight by paper
How can I make an Itemframe invisible? And how can I edit the item which is placed into the itemframe?
thats like looking at python code for two minutes and after that searching how to become a data scientist
anyways
you can do it by command
lemme search for the code way
Ty
wdym?
I know that way but I didn't find a Subinterface of the itemmeta for itemframes
You cant use specialsource on gradle, but there's an alternative in gradle by paper. I suggest you using it
i want that when a entity shoots an entity with a projectile, the entity that shot, should be teleported. i have the teleport part but i have problems with the hit listener. is ProjectileHitEvent even the right listener for that?
probably
Did you find a way?
meta.getPersistentDataContainer().set(new NamespacedKey(this, "invisible");, PersistentDataType.BYTE, (byte) 1);```
It will reobfuscate the remapped mojang?
yes
just on a itemstack with material itemframe, this refers to plugin's instance
how can i use it?
Great, ty! And how can I place an item into the itemframe?
?
i found this
how can you install the paperweight to your maven local?
it isnt the best code but you should be able to modify it
and ItemFrame#setItem(itemstack)
You dont have to. Just add paper plugin repository in pluginManagment
All you do is add paperweight-userdev plugin and in depenencies you write
paperDevBundle("MC version>")
and now you have remapped mojang jar in your classpath
idk where is pluginManagement
settings.gradle.kts
there should settings in your parent module
@quaint mantle ?
Ty very much
interactevent
But for some reason this is not working
got an error on line 8: https://paste.md-5.net/tasojonubo.php
when trying to reload the gradle
Hi, I want to try out the new 1.18 spigot version but I dont get any classes like JavaPlugin or CommandExecuter
What error
tired rn
maybe later
google it a bit
"how to check hit block spigot"
google that
did you update the item?
apply the new meta
item.setItemMeta(newMeta);```
Caused by: io.papermc.paperweight.PaperweightException: paperweight requires a development bundle to be added to the 'paperweightDevelopmentBundle' configuration, as well as a repository to resolve it from in order to function. Use the paperweightDevBundle extension function to do this easily.
Can you show build.gradle
well, you need paperweightDevelopmentBundle() in dependencies
still i receive error
Hi, I want to try out the new 1.18 spigot version but I dont get any classes like JavaPlugin or CommandExecuter
my settings.gradle https://paste.md-5.net/mocotodomo.php
everything fine with settings
use a proper bulld tool
and that's the build.gradle from the child module
yes
Metadata does not persists
I used the buildtool
if you are about bukkit one
Yeah that doesn't persist
i mean, maven or gradle
Yes. But it underlines '(this, "invisible");,' and the last bracket
Did i miss the link?
I use maven
whats the errror?
oh
this one is the build.gradle from child module
i see a command after the ;
Can anyone recommend a good tutorial to learn java if you already know similar languages?
That was a missclick
I mean, you dont declare dev Bundle version. try paperDevBundle and paperweightDevBundle
But it's still underlined, without the comma
on the dependencies?
Yed
both gives me error
May you resend build.gradle
yes
What language do you know?
From a BlockBreakEvent of a container (e.g. a chest) is there a way to prevent the drop of the actual container item, but allow the loot it contains to drop normally?
Previously I had used event.setDropItems(false) and that used to only cancel the drop for the container item. Somehow there has been an API change because this does not work anymore. It now cancels all drops, including the container content.
Iterate over the inventory and drop each item
Right, so you suggest to still setDropItems(false) and handle the dropping manually?
that could work
Yes
well i get those suggestions when i type paper
ah
i don't have that suggestion at all
because not using kotlin dsl 😎
paperDevBundle is kotlin-only shortcut
try cloning paperweight test plugin and see if it works
is it possible to use custom nms biomes in world generation?
How can i do this ((CraftPlayer) player).getHandle().b.sendPacket(p); using Reflections?
Class<?> craftPlayerClass = Class.forName("org.bukkit.craftbukkit."+ getServerVersion() +".entity.CraftPlayer");
craftPlayerClass.cast(player).getClass().getMethod("getHandle").invoke(null).getClass().getField("b").getClass().getMethod("sendPacket").invoke(p);
I got this so far, but it says Cannot resolve method 'sendPacket'
Hi, I want to try out the new 1.18 spigot version but I dont get any classes like JavaPlugin or CommandExecuter
Is it possible for a player or individual Entity to have some sort of "List" like a scoreboard?
just make a hashmap mapping each player to a list
because it is obfuscated aswell
you can
so what am i doing wrong
but you have to find out obfuscated names
((CraftPlayer) player).getHandle().b.sendPacket(p); <- this works fine
why would i need different names when doing the reflection
alright, gotta look that up xD
C#, C++, and some i wouldn’t consider too similar, like php and python
but i figured just writing own plugins and googling as problems arise is a neat tutorial for me as well. Just worried i might do something that compiles, but is fundamentally wrong from a design perspective
C# is very close
c++ is fun
literally a microsoft java
Just note that we use lowerCamelCase for method and variable names in java
grrrr
Yes i felt pretty much at home with java at once
c#'s naming conventions make me wanna kermit unfunny jokes
thankfully vs autoformats the brackets for me else I'd never get those down
at least it has naming conventions… looking at php 🙂
the fact that its convention to put a space between if and the () bois is annoying
I have JetBrains to handle conventions 🙂
I just use Java and the Spring framework instead of PHP
@quaint mantle
So I do this .getMethod("getHandle", String.class), but then how can I call it?
StackOverflow says i must pass an instance, but I don't know of what. Do they mean like this? .invoke(craftPlayerClass, (Object) null) ?
you dont
Yes, it’s just some legacy code at work where i need php
i dont think getHandle needs a String
how would i add something to a list variable
it needs a null?
CommandSender
no
.add
but it has no parameters
it literally has no parameters
oh so i dont need to declare a type there
So the Method needs a Packet<?>, but how do i do that, Packet.class doesnt seem to do the trick
why
.getMethod("sendPacket", Packet.class)
Class.forName moment
hover over it with your mouse and tell what's the error
Hey, how can I check correctly if player was punched by mob, ...? I want to do nothing if that happens.
EntityDamageByEntityEvent
and about pushing?
no
i want that when a entity shoots an entity with a projectile, the entity that shot, should be teleported. i have the teleport part but i have problems with the hit listener. is ProjectileHitEvent even the right listener for that?
so block the punch
yeah if player is punched or pushed
just put event.setCancelled(true)
yes
@EventHandler
public void onHit(EntityDamageByEntityEvent event) {
event.setCancelled(true);
}```
okay and how can i detect the "shooter" ?
okay cool, seems a way and pushing works the same?
because I mean for example
sheep can push you from the position
Entity shooter = (Entity) projectile.getShooter();```
thats the collision
Pushing players around is different
that wouldnt
You can set entities not to collide
thx
i asked for both things 😄
@quaint mantle maybe it's only work with kotlin?
kotlin is ew
it should work with groovy aswell
casting it to a LivingEntity
but kotlin dsl is cooler anyways
and disabling collision doesnt seem to work
have you tried building paperweight-test-plugin?
can't right now
@young knoll, any tips tho?
thanks btw yeah I faced it just now and I dont know any approach for that
is your repo public?
if you don't mind, ill just try
kk, drop github name
so anyone knows how to detect if player was pushed by some entity?
give me your github
m4nya
should i save a byte in the player's pdc to indicate if he's vanished or not?
instead or saving all the vanished player's uuid in a file?
no
better way?
Set maybe
Yes store it in teh players PDC
thats just storing it in a file
.getMethod("sendPacket", Class.forName("net.minecraft.network.protocol.Packet<?>")) throws a ClassNotFoundException
but
.getMethod("sendPacket", Class.forName("net.minecraft.network.protocol.Packet")) throws a NoSuchMethodException
How can i tell the reflection that its Packet<?> and not Packet ?
its what the PDC is for. Minimal data directly relating to the player
ok i'll try
the type parameter isn't a part of a class's fully qualified name
but how do i get it then
you dont
sendPacket wants a Packet<?>
or well
but the latter throws a NoSuchMethodException
how does the method look inside intellij?
public void sendPacket(Packet<?> packet)
hello people im clueless at this point, what im trying to do is to damage the player again with the same damage as before but 8 ticks later, the event.getdamage is 1.1 but the actual projected damage is 0.1 why is that so, been stuck in this for so long
isnt that for static stuff
no lol
you want getFinalDamage not getDamage
ok lemme try
still java.lang.NoSuchMethodException: net.minecraft.server.network.PlayerConnection.sendPacket(net.minecraft.network.protocol.Packet)
but .getDamage returs the appropiate value it just doesnt damage the player for the right amount but ok ill try
@ivory sleet
getDamage gets teh total damage, it doesn;t account for resistances and armor
getFinalDamage is the actual amount of damage that will be applied
floskater I think that method is obfuscated
but ((CraftPlayer) player).getHandle().b.sendPacket(p); works fine
(playerConnection is obfuscated, but the sendPacket is not)
as far as i can tell
Cannot resolve constructor 'NamespacedKey(myplugin.myplugin.package.class, java.lang.String)'
try Arrays.stream(PlayerConnection.class.getDeclaredFields()).map(Field::getName).forEach(System.out::println)
or smtng and see if it'd print 🤷
run getDeclaredMethods on location and see toString output
make sure you put your main class' instance as the first argument
sendPacket is a spigot mapping iirc
When the server is shut down, what should I do if I want to save the plugin's data?
Save it to a file or database
@eternal oxide no as it seems thats not a problem, its still doesnt work
it almost feels like smth in other classes is messing with it but i have no idea what
safe the data every x minutes... a shutdown will never handle a safe way to protect data
I mean it can?
True, seems to be obfuscated, i cant find it
Right ty, but now only the argument (my Main class) is underlined and if I hove it it says 'Expression expected'
but in intellij, it isnt
i'll just use a then i guess?
and pass (GenericFutureListener) null myself
?di
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
sure floskater
can someone help, when i am trying to create gradle project with intellij and java 17, it says 'Cannot find supported gradle version for java 17, do you want to continue with gradle 6.8?', i have gradle 7.3 install via snap
or find which method it is
me listening for .getDamage on all priorities. that thing where the damage changes thats the recasted hit, it deals just a fraction of it did beofre
what version and what do you want to find out ?
https://timcloud.ddns.net/mapping/
made this for 1.18 ... should be 99% correct translation between mojang <-> obfuscated <-> spigot (but spigot just renames the class and not the methods/variables)
Arrays.stream(PlayerConnection.class.getDeclaredMethods())
.map(Method::getName)
.filter(m -> {
return m.getReturnType() == void.class && m.getParameterTypes().length == 1 && m.getParameterTypes()[0] == Packet.class;
})
.forEach(System.out::println)
I think
without the map
so anyone knows how to detect if player was pushed by some entity? please?
alright :D
hopefully you should get 1 result
uh well then use
.getMethod("a", Class.forName("net.minecraft.network.protocol.Packet"))
:p
xD
you want to get a method in PlayerConnection that sends a packet ?
why reflection?
so my plugin works on every version
