#help-development
1 messages · Page 425 of 1
I already do that for maven actions using scripts, but I need for jitpack too
does jitpack not run the github actions?
anyway I'd just compile it locally, then use mvn deploy
you can do that for jitpack?
i hate maven so much...
how is it maven's fault lol
it's not maven's fault, i just hate it myself
I don't know whether jitpack supports the normal deployment / uploading of .jar files
I just use my own nexus for repositories
hi.
does anyone here have experience working with the mysql database?
um
i need some help with some stuff.
Pretty sure kinda few guys here have an experience with mysql
I would just ask question
I want to add emojis in my minecraft server scoreboard without any texture pack, how can i do that
you can't
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
how do i post images here?
i have been here so long i have not really been able to post images here lol.
?verify
!verify
Usage: !verify <forums username>
Or use some image site
Just get verified, it only takes 10 seconds
No we can
No you cannot
We can bru
is there a way to see which columns of the index are being used like sqlite?
Lol no
I cant send images here
!verify
Usage: !verify <forums username>
and i am trying to get const/eq_ref for the type.
!verify
Usage: !verify <forums username>
!verify @little gull
Could not find your SpigotMC.org account!
Use your spigotmc username
!verify ArnavJain69420
A private message has been sent to your SpigotMC.org account for verification!
lol I just checked in, there's 4139 files and 272 folders in the configuration folder of my plugin
well yeah actually
among other things
arenas, custom bosses, loot, dungeons, minidungeons, lairs, sanctums, npcs, quests, worlds
anyone know if java has literal JIT? Like, getting a string and translating it into .class/.jar, then executing it?
You want to compile it inside of your app or like external tool
?
inside
Look at java.tools package, I'm sure there is some kind of documebtation/tutorial online
birb
are there any functions which change the colour of the water in a cauldron
Erm
i tried that, trust me, unless it is absolutely necessary you shouldnt even try
cuz the ONLY way to do it server side is to define a custom biome, apply it to the block the cauldron is in, and somehow manage to constrain the biome to a 1³ area. The math behind it is as complicated as the code
nope
damn rly
afaik the only thing affecting water color is biome fog
so you need to do biomes
which has its own slew of problems
damn alright
im not even sure if you can set the biome gradient to 0 so that there's no bleed in from the surrounding biomes
isnt water cauldron block data exclusively the water level?
ok one sec
how do i use it im putting the right coords
and it just says the target block
is not a block entity
iirc its /data get block <xyz>
it worked on a beehive
loop over the char array
not a block entity then
thats weird
since when are commands caps sensitive bruh
why do you care how many files it creates? btw none of those seems to be the correct one
?paste your pom
I get 3, plus javadocs/sources
that is not your full pom
i always forget which one the correct one is
nothing else left that matter
its the remapped-obf ur allowed to publish right?
the one that's called ${artifactId}-${project.version} is the correct one
srsly?
AngelChest-9.5.1.jar
not the obfuscated
whats up with the remapped-obf file then
is that part of the md_5 plugin?
oh yeah my bad. remapped-obf is the obfuscated, original minecraft mappings
the one without any classifier is the one that uses spigot mappings
remapped-obf uses "axh" instead of "EntityPlayer"
"remapped" uses "ServerPlayer"
without classifier uses "EntityPlayer"
I guess, haven't checked
anyway, the one without any classifier is the one you're supposed to use
whats the easiest way to register a listener, i think im doing it wrong
the obfuscated one won't work, you need to use the spigot mappings
how can i make it only create the one that i need :l
AngelChest-9.5.1 is the proper one. AngelChest-9.5.1-remapped uses mojang maps, AngelChest-9.5.1-remapped-obf uses vanilla obfuscated names
you can't
it needs the other files
why do you bother about the other files
I dont need it :l
you need it
otherwise it can't remap your stuff
it's like saying "I don't need all the .class files, I just want to have a .jar"
usually I just get the final result automatic push to the plugins folder
as I already said: ?paste your pom
yes
say what now
this is where you fucked up
DO NOT TOUCH the specialsource settings
use these settings:
?nms
alright so i google 'javadoc list.of' and get pointed to the list interface which doesnt list a list.of method bruh
IDK why everyone thinks they must change the maven-shade-plugin or specialsource plugin settings to change the output directory
oh i see
The maven-jar-plugin is the ONLY proper place to change the output location
where
you can use the "lazy way" although I suggest to use profiles instead
java 8 doesn't have List.of iirc?
got it tysm
exactly
np
Well its just an array delegate, so yeah but then add for instance wouldn’t work
For the AsyncPlayerChatEvent#setFormat method it states that it wants a valid String#format value.
I'd assume that's something like "<%s>: %s" which would translate to "<Fabsi>: Whatever I said".
How would I reverse message and username here? e.g. "Whatever I said <- Fabsi"
I know that it's not common practice but since it's gonna be in a configuration idk what requirements owner have.
Alright I'll check. Thx
It's really not well made D:
still don't like that syntax but alright I'll work with it. Thanks!
Imagine you wanna make it look like this:
"My name is jeff" said mfnalex
Then the format would be
"%2$s" said %1$s
alex i love you
Is there any open source projects with gradle configuration also uses reflection for NMS or at least any tutorials / docs?
For remapped mojang with gradle check my github and epic spigot lib
Mine also does that. But if you're just wondering if you can use remapped names for reflection, you cannot. You have to use the obfuscated ones.
Sure. You create a class and implement the interface with it
one question, can you detect when an end portal is replaced by a mushroom?
Check BlockGrowEvent or BlockFromEvent
Dont remember which one is fired
for PathfinderGoalMeleeAttack in v1_16_R3, what is the second argument? is it the damage?
also, does anybody know the goal to make an entity run away from another entity?
I love you too
AvoidEntityGoal or sth IIRC?
nah not a thing
i took a look at Tweakin and for 1.17 it seems to be FleePathFinder
there's no such thing for 1.16.5 unfortunately
doing a comm for 1.16.5, seeing if it's possible at all
TL;DR the boolean is wallhack
oh I misread
yeah the speed modifier is so weird
for some entities, 0.2 is extremely fast, for others it's so slow yuo can't see it moving
shouldn't it just be 1.0
if you don't wanna change it
because x * 1 = x
quick mafs
and everything
one would imagine that's how it works, but it's not
._.
anyway do you know how one would change the damage of MeleeAttackGoal?
doesn't seem to have any relevant methods either
it just calls the normal "hit entity with main hand" method
I'd put the entities you wanna change in a set, then adjust the damage in EntityDamageByEntityEvent or sth
that could work
lastly, could you take a look at the constructor of AvoidEntityGoal for me plz? i'm not using the mojang mappings because i probably hate myself so it's just shit
oh true that too
that's what it does, so yeah just change the attribute - iirc ATTACK_DAMAGE is only for meelee anyway
alrighty i'll do the attribute
figured it out:
new PathfinderGoalAvoidTarget<>(entity, EntityPlayer.class, 10, 1.2D, 1.5D)
I have a world folder that I just copied from the data folder, whenever I load it using WorldCreator it takes a ton of time (just like if it was generating it, however it doesn't regenerate anything)
World folder
please how to do it i just want to learn simple world generation
This tutorial will give you the basic steps of creating a custom world generator using Bukkit. Following this tutorial, you will be making a simple, infinite world of plains and oceans, with some features added. IMPORTANT: Before reading this tutorial, you are required to know the basics of the Java programming language, and the basics of creati...
hi
but isnt it old?
How can i make maven see whole tree of dependency with provided scope
For example i have
<dependency>
<groupId>io.javalin</groupId>
<artifactId>javalin</artifactId>
<version>5.4.2</version>
<scope>provided</scope>
</dependency>
Which have jetty server and jetty utils both shaded in, but in my project
import org.eclipse.jetty.server.Server;
Remains undefined
i would like to know if there’s any cool way to overwrite interaction event making it so the player can eat (food in hand) but cannot open a chest
yo guys anyone have any ideas on my problem in #help-server ?
check if the action is right click block, and the block clicked is a chest cancel it
it doesnt have anything shaded from what I see
however I can see the transitive dependencies
yea but that’s not cool enough i need to block all interaction on blocks (other chest types like dispenser but also other blocks like lever, red stone repeater) and allow only eating
or shield blocking
maybe not shaded, but its somehow included, because if i have no scope set to provided, it works fine
but when i set it to provided
without scope
ah alright, thanks
using provided, you won't see transitive dependencies
i was hoping is there any method to check for the clicked block to return if it is interactable or not
How to send chest opening animation using protocollib
Update Spigot
version?
try this
again) check code https://i.imgur.com/QEdEWgX.png
yee
but what do i do here?
just logic?¡
yes
kay
Now i have to listen to this class anywhere?
bcause i have this class GUIListener that implements a Listener
Not Important for the conversation
Whats your color theme?
This describes the behavior of your GUI
Just the logic. And then if you want to use it you simply register it in your manager and open the Inventory
you are cracked
yes
and centered 😭
👕 MERCH IS OUT FOR PRE-SALE: https://shopdoggos.com/
Order before March 27 before the pre-sale ends!
More about the meaning behind the merch in this video: https://youtu.be/Jt0xACFZ_hw
In this video, I tell you the best IDE to use for programming. No matter what kind of programming you do.
Music by Joy Ngiaw:
https://www.joyngiaw.com/
https...
actually the real big bosses uses a sheet of paper in real life and scan the text and make it to computer text
og video
damn, good IDE
damn TwT
lmfao......
I am trying to implement, that the player is able to basically turn all living entities into marionettes, that will basically behave like wolves and fight for him, but I don't really know how I would do it.
I thought about a custom marionette class
public Marionette(Location location, org.bukkit.entity.EntityType entityType) {
super(toNmsEntityType(entityType), ((CraftWorld) Objects.requireNonNull(location.getWorld())).getHandle());
setPos(location.getX(), location.getY(), location.getZ());
level.addFreshEntity(this);
}
But there are a lot of exceptions, for example when I hit the entity and I also don't know how I would make it behave like a wolf.
I also thought about just using a listener to check for when the entity wants to target the player and cancel that event, but then the entity would still not fight for the player
we need to visually see the exception my friend
If word adds a autocomplete it will be top #1 ide.
sorry, I forgot abt that. one sec
nah it would be the #0 because on #1 is word with no auto complete
i like writing verbose code
public class Main{ public static void main(String[] args){System.out.println("Hello, World");}}
hot code
https://paste.md-5.net/ideqavaqej.bash
The excpetion when summoning the entity
https://paste.md-5.net/baxiviyasa.css
The exception when hitting
an itemstack is null?
okay so the problem is u have some variables undefined
as you can see here if u summon the entity
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.item.ItemStack.b()" because "itemstack" is null
means an itemstack is null
wait
u german?
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
I asked gpt4 to create a spinning donut wtf
its mean to just send the link but its true
yeah, how did you know
+1
"de."
ah right
don't know which though
anyways mistake is in line 20 in Marionette.java
theres not much more to the class, sorry. Level is passed to the super constructor in the constructor
public class Marionette extends LivingEntity {
@SuppressWarnings("unchecked")
public Marionette(Location location, org.bukkit.entity.EntityType entityType) {
super(toNmsEntityType(entityType), ((CraftWorld) Objects.requireNonNull(location.getWorld())).getHandle());
setGlowingTag(true);
setInvulnerable(true);
setPos(location.getX(), location.getY(), location.getZ());
level.addFreshEntity(this);
}
@SuppressWarnings("all")
public static EntityType toNmsEntityType(org.bukkit.entity.EntityType bukkitType) {
return EntityType.byString(bukkitType.getKey().toString()).orElse(null);
}
@Override
public Iterable<ItemStack> getArmorSlots() {
return null;
}
@Override
public ItemStack getItemBySlot(EquipmentSlot equipmentSlot) {
return null;
}
@Override
public void setItemSlot(EquipmentSlot equipmentSlot, ItemStack itemStack) {
}
@Override
public HumanoidArm getMainArm() {
return null;
}
}
idk if it works like this but never tried it
so as you can see here
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.item.ItemStack.b()" because "itemstack" is null
it has to do something with ItemStack so u could start google and search for errors in classes extending LivingEntity and on the addFreshEntity comes NullPointer
version is 1.16, The code that ChatGPT gave me does not work. Can you post yours I'll try it
gl getting any plugin code from chatgpt that works
I used some and it worked
ChatGPT is not a code generator
nah this is perfect
"spinning donut"
i should put this on my portfolio
yeah this is nice
welp I'm shrieking internally
tf is mu
1000mu = 1ms
I like to debug shit in mu
xddd
anything that's used more than once is only acceptable within the <100mu range
u the pro here
guys can someone help me
i have this code here
and its meant to put an item in the gui
it puts it but it doesnt put the meta
here is my code
small tip, try to not make so many if nestings
try to make an if with the !version and then just return, looks better
Damn, sick editor!
thanks do you know why im getting the problem
sorry to bother you again, but I couldn't really find anything regarding my two errors. Do you have any other idea how I could implement the marionette feature
You're not setting the meta back on the item. getItemMeta returns a clone, not a direct reference, iirc.
item.setItemMeta(meta)
yep
do you any compilers for my ide
javac 
i need a built in compiler
i don have time rn but google does
i can help u
explain the problem
I am trying to implement, that the player is able to basically turn all living entities into marionettes, that will basically behave like wolves and fight for him, but I don't really know how I would do it.
Need to hit up microsoft, maybe they can integrate something for you, xD
i have the source
show ur code
There are exceptions when summoning or hitting the entity:
https://paste.md-5.net/ideqavaqej.bash
The excpetion when summoning the entity
https://paste.md-5.net/baxiviyasa.css
The exception when hitting
and i don't really know how I would implement, that the entity is friendly towards and fights together with the player
public class Marionette extends LivingEntity {
@SuppressWarnings("unchecked")
public Marionette(Location location, org.bukkit.entity.EntityType entityType) {
super(toNmsEntityType(entityType), ((CraftWorld) Objects.requireNonNull(location.getWorld())).getHandle());
setGlowingTag(true);
setInvulnerable(true);
setPos(location.getX(), location.getY(), location.getZ());
level.addFreshEntity(this);
}
@SuppressWarnings("all")
public static EntityType toNmsEntityType(org.bukkit.entity.EntityType bukkitType) {
return EntityType.byString(bukkitType.getKey().toString()).orElse(null);
}
@Override
public Iterable<ItemStack> getArmorSlots() {
return null;
}
@Override
public ItemStack getItemBySlot(EquipmentSlot equipmentSlot) {
return null;
}
@Override
public void setItemSlot(EquipmentSlot equipmentSlot, ItemStack itemStack) {
}
@Override
public HumanoidArm getMainArm() {
return null;
}
}
Ik, but I don't know which Itemstack
nms is kinda confusing
probably one of the ones where you return null
Oh, wait sorry. i didn't even see those , I just implemented them
alright
If you look at the call sites of those methods where you just returned null, you see that they're not nullable. You can always return an empty list for the iterable, an AIR stack for the getbyslot and just one of LEFT or RIGHT for the main arm, if you don't need those values.
I couldn't manage to send the chest boot animation to the player
yeah so bukkit likes to be fucked
you gotta return something
just extending entity won't do it
Yeah, not getting anymore exceptions now. Currently trying to make it fight for the player
💀
i dont see any point to let an user specify a exit code cuz they will only abuse that
what is this
?scheduling
dont instantiate bukkitrunnables, use the scheduler
i should count have many times i've already said that
@lost matrix we need the bukkit runnable concrete impl class speech
uh well this is some unexpected behaviour
Bukkit.getScheduler().runTaskTimer(plugin, () -> {
stoof
}, 20 * 1, 20 * 3);
we love lamda
on todays lesson of learning java
minecraft
Hello, I would like to know if it is possible to put a player of the text in his chat.
For example I use a framework for GUI and when I click on an item I would like it to put in the player's chat the command "/msg playername" and after that he can edit the command before sending it.
I don't think it's possible but you never know!
not possible
Okais thank you
you can send a message as the player but you can't allow him to edit it
yeah you cant force the player to open the chat even
I think you can with a clickable component
You can but you would need to click it manually
Yeah
Is there any good APIs for disguises
LibDisguises
Does it's API work on 1.8
Too old! (Click the link to get the exact time)
How can I make my plugin command executable in execute run?
Or, it's just right for my pvp based servers
Use an API that supports brigadier
why do you want it available in execute?
How then?
i dont have to worry about packets a player has received after they leave the server correct?
wtf does that mean
current.setFireTicks(200);
will this set an entity on fire
'current' is an entity
yes
I cant remember your code perfectly but I know it was failing on getting the player from some string
yes
how then?
can you show the code again?
getban is null
yeah but why?
// Getting Data for Kick
Date date = Bukkit.getBanList(BanList.Type.NAME).getBanEntry(name).getCreated();
how are you executing the command
also maybe you have to wait a tick or 2?
and you're banning the person that executes the command??
pass the players UUID instead of their name
you could also try this:
BanEntry banEntry = Bukkit.getBanList(BanList.Type.NAME).addBan(name, reason.toString(), expire, player);
Date date = banEntry.getCreated();
bans are a bit messed up, they take a UUID
Oh I thought only names are possible
getPlayer("name").getUniqueID()?
Hey guys so I have a plugin.yml with depend: [WorldGuard] but my client says it shows a classnotfound exception he is using 1.8 is the depend part different in older versions?
No it works the same as now
Since it's a 1.8 user it might be their fork breaking things or them using the wrong version of WorldGuard
Make sure WorldGuard loads correctly and that you made the plugin using the correct version of spigot-api and wolrdguard api
maybe thx
1.8 uses WorldGuard 6 or some other shit, 1.13+ is WorldGuard 7
yes it was this
thx
just do
((Player) sender).getUniqueId(); or something
Same problem.
Show new code
Does any one has expiriance with modification/making custom logger one with log4j to get custom colours
I manage to modify colors in papermc but there is no effect in spigot
so why is that so
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(this.word));
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new net.md_5.bungee.api.chat.TextComponent(this.word));
^
Still no
Same error as before.
What is the error?
how can I detect when a portal get's broken
?
(a nether_portal block after breaking surrounding blocks)
no suitable method found for sendMessage(net.md_5.bungee.api.ChatMessageType,net.md_5.bungee.api.chat.TextComponent)
Which mc version?
?jd-bcc
..."word: %s", this.word);
A problem occurred evaluating root project 'PrivateMines'.
> No signature of method: java.math.BigDecimal.call() is applicable for argument types: (BigDecimal) values: [0.5]
Possible solutions: scale(), add(java.math.BigDecimal), max(java.math.BigDecimal), wait(), abs(), ulp()
what does that mean
More like. Does it mean what I think it means? Just doesn't exist?
Correct
Yeah
It's 5am
my brain no work
atleast im getting some progress on the pasting of goofy schematics
Im trying to do a Mana system, but its not working. When I check for the mana it doesnt do anything not even an eror, when I try to take it away, it doesnt take it away. What has gone wrong?
https://paste.md-5.net/rozosewido.cs
Just a question, Are you making a skyblock remake?
also this code will run a runnable everytime the player moves
I know
eclipse fix version is too low
select java version
-product
org.eclipse.epp.package.java.product
-vm
C:\Program Files\Java\jdk-18.0.1.1\bin\javaw.exe
put this here to remind myself if i ever forget
your events never end so you are startign and running thousands of runnables
millions over time
if you run a runnable, it already runs every second
your server will die
yeah
there are thousands of movement packets every second or 10 seconds
not sure but server tps will drop hard
start a runnable for each player on join and stop it on quit
OR one runnable which loops over players and updates their action bar
start your runnable when the first player joins, stop it when the last leaves
you just need a Set in your listener to hold their UUIDs
this is what I do
Me when cpp in java
Are skyblock plugins the new LifeSteal plugins
idk
i've been working on this plugin for like 8 months lol
please dont do a bunch of redundant map lookups
how can I get a safe teleport location under y = 51?
Uhh
I guess your best bet it to pick a x and z and then loop down from y51 looking for a space
Pick a new x and z
segz
?
I don't think you are above discord's minimum age
for (BlockVector3 vector : region) {
Block block = BukkitAdapter.adapt(vector).getBlock();
if (block.getType().equals(Material.AIR)) {
airBlocks++;
}
}
This doesn't work because #adapt(vector) isn't a thing
What can I do about it
Make a location with the xyz of the vector
Need something more efficient
I'm trying to loop through every block in a CuboidRegion from WG
I think there is a world#getBlockAt(xyz)
Or more specifically, I'm trying to get the % difference between air and other in a CuboidRegion
declaration: package: org.bukkit, interface: World
Need something more efficient than that
Or is there nothing better?
To get the % difference between air and other?
Idk what more you want
I'm not sure if there's an alternative
Worldguard may have methods to get the count of blocks in a region already
Idk, but it does have a count command so maybe
interesting
Is it that bad then?
I think you might be able to make it a bit faster if you use isEmpty() on the block instead of checking for air
do you want to know how many blocks (solid) or just total?
since getting the type requires a conversion iirc and I don't think isEmpty() does
I want to know how many blocks have been removed in a region
I need a % specifically
Not with that attitude!
So I guess airblocks * 100 /total
Yes
Well, you could listen for the break event, check if it's in the mine, and then add 1 to a counter
I guess I can just store the data every time instead of resetting to 0 every single call
So it'll optimize a biktr
1.19.3
didnt even know this was a thing
Oh lol, first time i seen that
that nextDouble(-1, 0) wont work makes sense
hey iam new at Minecraft dev stuff
is there a plugin that if the user use it that he teleport than to a coord ?
minecraft 1.19.4
are you trying to dev it or you are looking for tp plugin
if existing just the plugin 🙂
isn't that just vanilla command ?
every nms guide on pathfinding seems to apply it to a custom entity, but it should be possible to do it to a non-custom entity right? or nah?
Yep
I really don't know if I want to do my own pathfinding or use paper's
really wish spigot had it
are there any resources/guides on packet listening?
PR :p
I want it because I don't want to write it
Move the instanceof check and player cast to the if statement's block at line 120
also I don't believe the iron golem case will ever be true since the arguments are split by space
could benefit in readability by moving some of that method's logic to like private methods
"squelette" wtf is French
krankenwagen
am I just SOL if I want to use mojang mappings but use gradle?
for Spigot yes, Maven all the way
man why does maven have to be so much slower than gradle
is there a way to optimize it to run as fast as gradle?
Maven never takes more than a few seconds for me on any project
maven was taking 30s per compile when I gave up on it
actually over 30s
sometimes over 1m
how large is your largest project?
uh, Groupmanager, Towny, iConomy a few larger but unreleased
I was more asking class / line count so I have an idea
no idea, I never count
I'm on 1195 classes according to this
probably more than me then
75k lines
anyways I rewrote my scripting system today
and I'm thinking on maybe just maybe using the same logic for commands
as the syntax is easy enough
and now you've taken longer to come up with it than I have
they call me first try andy because it only takes one try
they call me first try andy because I be coming in handy if y'know what I mean
they call me woody by the way I be making this paper
how the fuck is it wednesday already
I am still not sure if I want to do this pathfinding thing
at this point the "easiest" way for me to do it would be to make an api using mojang mappings because I just can't insert it in my normal project, I refuse to switch back to maven
and I feel like depending on paper would come back to bite me in the ass
just use obfuscated stuff
I did say easiest
and tbf this is not the only project that I need pathfinding for so it would make sense to make it standalone
Something weird is going on with my server, where me and my players cannot activate a left click packet event or a damage event within a certain range of a hit box
Heres a screenshot, which I will go into detail with:
Can’t you use just paper and not use paper methods?
Like use paperweight
Also no reason not to use paper
it's a public plugin posted on spigot
I don't expect 100% of people downloading there to be using paper, that would be silly
the distance of the zombie and the player makes it so that I am UNABLE to hit the mob, yet it doesn't trigger a left click event, only when i get further away from the entity that is the case.
Most stuff is compatable between paper and spigot
this is a very small brain take
this does not trigger a sound effect, or any event in my code(done in skript.)
Well you don’t have another solution
If you don’t want to switch back to maven
yeah, no other solutions other than the other solutions we listed
namely the one I am already halfway through coding or the one imillusion suggested
Chad
I just use userdev
Works fine if you avoid paper methods
Never again will I have to look at obfuscated code
I mean mapped code isn't truly obfuscated anyway
although it does pose some fun questions like how am I supposed to get a level for this pathfinding thing
got it
Back to the original post, here is an example video of this annoying ahh problem https://streamable.com/pcl143
this is done in skript!
dayum
you should ask in skript discord, most people here use Java, though I'll say you might wanna learn java imo gives you more options to do crazy shit
Hi i have a question som1 know how i can make armor with more protection without using enchantement, like a custom gold armor with + 50 protection on the full stuff (by exeample)
Wdym by keyset ?
And how do i calcule how much the protection is going to give protection
uh ?
What if player add a protection 4 book on the armor ?
Its cancelling the other or just "upgrading"
wdym with this ?
Can i give armor protection instead of the protection echantement ?
I asked. They think its a server.jar or spigot or paper issue. which is annoying
This is really the only option for help. this could potentially ruin the server and plus other servers i've played on dont have this issue. there has to be a solution
Well its not because I'm calling the events for damage and left click which are the only events(that I know) are used from clicking the left mouse button
I've found a pattern. The zone where I cannot activate a damage or a left click event is gone when im in creative mode
It seems my player reach is lower in survival
Hello, I would like to ask a question, as soon as a Bedrock player wants to connect to the server, he must have a Java account so that he can join my server. Can this be deactivated?
java account?
yes
No the main types of Minecraft
I mean the gesyr
This is Spigot, and this channel is for Spigot plugin devs
C++ correct
?fork
SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.
Paper ok
The paper discord say I should contact you guys
lol why?
They say that the file is from you and that's why I should ask you🥲
what file?
What does that mean for you?
I have no idea what you are talking about
Ok, let's start again
I have a Paper Server with the Spigot plugin on it.
I want to register as a Bedrock player, but first I need to register with a valid Java account. However, I would like to disable this feature
Ok, well right in your first statement, you are running a Paper server.
With the Spigot plugin
Spigot is not a plugin
Spigot is a server, Paper is a server (a fork of Spigot)
Paper != Spigot
if you need help with a specific plugin you need #help-server
is ok
I think they are looking for floodgate
what is packetplayout in remmaped version ?
Hey,
How can I reroll the enchantments a enchantmenttable gives a player?
ClientboundNAMEPacket iirc
Hi, som1 know why this doesnt work for get the spawner generated by the other commands ?
https://paste.md-5.net/xuqilawuxu.java
The other command
https://paste.md-5.net/xiresivule.java
I have no error its just not working
And if som1 know how i can let player in survival place spawner with egg inside pls
Ill help wait let me get on pc
you need a class to extend command executor, the on command method in the 2. class is so random there
Hey,
How can I let a player enchant an item multiple times in a enchantmenttable?
yoo cars whats up
o/ hey
you can try to modify the enchantment gui but i dont know if this is possible
It basically just runs the next tick
How would I be able to make it so the entity I am spawning will follow the player around and fight for the player??
This is my entity class:
public class Marionette extends LivingEntity {
@SuppressWarnings("unchecked")
public Marionette(Location location, org.bukkit.entity.EntityType entityType) {
super(toNmsEntityType(entityType), ((CraftWorld) Objects.requireNonNull(location.getWorld())).getHandle());
setPos(location.getX(), location.getY(), location.getZ());
level.addFreshEntity(this);
}
@SuppressWarnings("all")
public static EntityType toNmsEntityType(org.bukkit.entity.EntityType bukkitType) {
return EntityType.byString(bukkitType.getKey().toString()).orElse(null);
}
@Override
public Iterable<ItemStack> getArmorSlots() {
return new ArrayList<>();
}
@Override
public ItemStack getItemBySlot(EquipmentSlot equipmentSlot) {
return CraftItemStack.asNMSCopy(new org.bukkit.inventory.ItemStack(Material.AIR));
}
@Override
public void setItemSlot(EquipmentSlot equipmentSlot, ItemStack itemStack) {
}
@Override
public HumanoidArm getMainArm() {
return HumanoidArm.LEFT;
}
Is there a way to rename a team or do I have to get all players from one team to be added in a new team and then remove the old team?


the illusion of choice
this remapping thing is killing me
how
am I supposed to use the reobfuscated jar?
yes
it's a long chain of stuff that needs to work for this to work
I have to make a maven repo on sonatype so I can use the pathfinding api I'm making on my other plugins and I'm still trying to figure out how everything is meant to be hooked up
a smarter man would've just gotten the pathfinding test to work standalone first...
nope still getting a noclassdeffound for craftmob
paste your pom
?paste
you are supposed to use the .jar that's just called "EasyMinecraftPathfinding-1.0.0.jar"
hm
however you are using 1.19, is that correct?
yes
uh
1.19.3 actually, I tried to get 1.19.3 several times and was about to test by going back
replace every occurance of 1.19 with 1.19.3 in your pom
I tried, it can't get that
have you ran buildtools with remapped for it
and in your java files, replcace 1_19_R1 with 1_19_R2
iirc java -jar BuildTools.jar --rev 1.19.3 --remapped
that writes to a local repo on my machine?
is this correct use of CF's TimeOut?
ur maven local, yes
USER_HOME/.m2/repository/stuff
yeah it's coming back to me, I see how I got confused
I ran remaps ages ago when 1.19 came out and forgot about it so I was thinking this was going to pull from remote because I couldn't remember doing remappings before
actually what's the correct identifier for 1.19.3? Like the fully qualified version? I cannot figure it out
- run buildtools 1.19.3 --remaped
- change all 5 occurances of "1.19" with "1.19.3" in your pom
- change your imports to 1_19_R2
- then mvn package it and use the YourProject-YourVersion.jar (not the ones with "obf" or "remapped" in the name)
then it should work
1_19_R2 / 1.19.3-R0.1-SNAPSHOT
aaaalright. So this is what buildtools says:
[INFO] BUILD SUCCESS
Copying spigot-1.19.3-R0.1-SNAPSHOT-bootstrap.jar to D:\Minecraft\.\spigot-1.19.3.jar
- Saved as .\spigot-1.19.3.jar
and this is what maven says:
Could not find artifact org.spigotmc:spigot-api:jar:javadoc:1.19.3-R0.1-SNAPSHOT
i did run the --generate-docs flag
hot dang
I think it works
insofar as it doesn't error lol, now I need to get the pathing to work
thanks
like seriously im stumped, if i do --generate-docs why arent the docs there
I don't believe javadocs show up as artifacts
I could be wrong
it worked like this with every previous version i have used
all i did was change the version number
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19.3-R0.1-SNAPSHOT</version>
<classifier>javadoc</classifier>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19.3-R0.1-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
i think so
also why would it find the api but not the docs
because the javadoc jar was most likely not created
when maven errors on javadoc creation it doesn't necessarily halt the build process depending how it is setup
or should say, it doesn't make the build a failure
[INFO] Building jar: D:\Creation\Minecraft\Spigot\Spigot-API\target\spigot-api-1.19.3-R0.1-SNAPSHOT-javadoc.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
any other ideas
it didnt fail the build
its just not recognized for some reason
using intellij I presume?
ye
did you refresh the project?
ye
have you tried clearing caches?
no
this should be like the go to thing for people who use intellij
not talking about maven caches
its system files and VCS log right?
talking about intellij caches
somewhere in the menus there is an option to clear caches
the next thing if this doesn't work, is to navigate to your project with the command line
and invoke maven directly on it, assuming you have maven installed
and not just using the one provided by intellij lol
mvn package
did you name it maven instead?
no i installed it and it worked yesterday but today its an unrecognized command
lol
no path
maybe that has been your issue
especially if you told intellij to use the installed maven version too
can i force-add an attribute to a nms entity? i'm trying to make a hostile chicken, and apparently if i just give it some attack goals, the server literally crashes when the chicken starts attacking because it does not have a Generic.ATTACK_DAMAGE attribute lmao
cant u extend chicken and add the attribute and make that attack?
yeah i'm trying to add an attribute
that's why i'm asking how to do it lmao
the code in the if-statement is never executed
because the damageModifier is always null
i debugged it
does the chicken even have an animation to attack?
think that would be the only other problem
sure, but the server or client wouldn't know what to do with that
it did try to attack
@wet breach
i set my PATH to both ...maven-3.9.1 and to ...maven-3.9.1\bin but in either case typing mvn or maven in cmd just told me 'unrecognized command'
and the server crashed because there's no attribute
have to close and re-open command when modifying variables
[16:18:12] [Server thread/FATAL]: Preparing crash report with UUID d2bebd74-3c54-45b9-849e-cb5a39ccbe76
[16:18:12] [Server thread/ERROR]: Encountered an unexpected exception
Caused by: java.lang.IllegalArgumentException: Can't find attribute minecraft:generic.attack_damage
(evertyhing omitted)
well as I said, that is only one problem
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.160 s
[INFO] Finished at: 2023-03-22T14:22:14+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project PermissionShards: Could not resolve dependencies for project org.example:PermissionShards:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: org.spigotmc:spigot-api:jar:javadoc:1.19.3-R0.1-SNAPSHOT (absent): Could not find artifact org.spigotmc:spigot-api:jar:javadoc:1.19.3-R0.1-SNAPSHOT -> [Help 1]
im so done
is the javadoc jar in the maven repo?
ok but currently i'm asking how to force-add an attribute to an entity, if it doesn't work i'll stop trying, if it does then it's perfect
maybe that's only one problem
ah right you would need to execute the javadoc goal to get the jar
why dont you just download them from the official repo?
isnt there a param to make it gen javadoc jar
im aware of that. i did --generate-docs
but i like solving problems in the order of their appearance
yeah its a maven command
or goal I should say
i mean on buiildtools
but I don't think buildtools moves it to the local maven repo
in intellij, just go to "execute maven goal" and enter this
mvn dependency:resolve -Dclassifier=javadoc
and that may be the issue
(you need to have spigot-api as dependency)
i couldve sworn buildtools also copies javadoc and sources into the .m2 folder
apparantly i was mistaken
hm maybe this on AttributeBaseMap will work
website ?
screaming sandles
just give a zombie a chicken skin or model or something lol
just add this to your maven settings.xml to make it downloads all javadocs automatically, always
you know a zombie can't fly right
in this channelon ly sarcastic commands work
i'll just try
no vim 😤
why not?
where do i find that?
if the zombie has a chicken model it will behave like a chicken, but the attacks are done as if it was a zombie just looks like a chicken 😄
ah ig
$HOME/.m2/settings.xml:
<settings>
<profiles>
<profile>
<id>downloadSources</id>
<properties>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>downloadSources</activeProfile>
</activeProfiles>
</settings>
all my .m2 contains is the repo folder
create that file
lol
I don't know of a different way since you can't just mash two entities together
unless that does work
cat <<EOF > $HOME/.m2/settings.xml
<settings>
<profiles>
<profile>
<id>downloadSources</id>
<properties>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>downloadSources</activeProfile>
</activeProfiles>
</settings>
EOF
i mean alternatively just make a baby zombie and pretend its a chicken
lol
that's a very original idea i must say
seems i've found a fitting thread: https://www.spigotmc.org/threads/nms-add-attack_damage-attribute-to-a-mob-that-doesnt-have-the-attribute.586397/
@tender shard i found a funny
whats the code to unload in onEnable if a dependency is not found? or does that happen automatically?
fuck you on about, thats the default human pathfinding. Were just extending and adding a random element to it
the only humans that move in a* are cool parkour kids like me 😎
this bitch won't start 😭
generally it will disable itself yeah
but you can always do getServer().getPluginManager().disablePlugin(this)
I bet you don't even like smash mouth's all star song
loser talk
it's all ogre now
hey, I still haven't figured out how to force add an attribute to an entity, this is the closest I've got:
// class NMSChicken extends EntityChicken
// this is in the main constructor
this.getAttributeMap().getAttributes().add(new AttributeModifiable(Attribute.GENERIC_ATTACK_DAMAGE, AttributeModifiable::getAttribute));
unfortunately this does not work because the first argument in AttributeModifiable must be an AttributeBase (nms), not Attribute
i got here by the virtue of brain and google (also https://www.spigotmc.org/threads/nms-add-attack_damage-attribute-to-a-mob-that-doesnt-have-the-attribute.586397/)
ples help?/
what's getAttributeMap?
it's a method on EntityChicken, but probably somewhere deeper
one sec
it's on EntityLiving
oh are you using spigot mappings o0
yeah unfortunately
i was too lazy to switch to mojang in the beginning
and now i don't care enough
ugh
well 1.16.5 doesn't have any mojang mappings anyway
oh true too
oh wait
i think i got it
this.getAttributeMap().getAttributes().add(new AttributeModifiable(GenericAttributes.ATTACK_DAMAGE, AttributeModifiable::getAttribute));
bless copilot
i'll try it out now
so what are cool kids doing to maintain nms code throughout versions?
generally abstraction
but i don't do nothing i'm working on specifically 1.16.5 atm
ah shit this didn't work
gonna debug the fuck out of it now
it still says no attribute found
libraries. specifically ones that depend on a bunch of versions and then translate api calls depending on the version into the proper nms ones
ive only seen it once so i dont remember the exact code tho
library is basically what I'm doing, I'm wondering what the best way to structure it would be
multi module project and reflections?
I'd probably do switch statements
they're easy to copy paste and if the call doesnt change you can just leave a few lines empty
What does this mean? (It's in spigot source code at Spigot-API/pom.xml line 68)
What is "proper"?
I don't know that I can avoid modules because I am using remappings
I was thinking I might be able to do per-module remaps (probably?)
i mean
i remember it essentially being
version_1.18.2
version_1.18.1
version_1.18
and then another file serving as endpoint that redirects depending on the current server version
like i said no idea where it is
1 jar, you have an interface that has the methods you would need nms for
a manager class or whatever to call get the adapter for that version
not sure what exactly you need but we did it like this for example
https://github.com/patheloper/pathetic/tree/production/pathetic-nms
how do you not know this
you dont have to figure out what could cause that and do hacky stuff in your overall code
I hate string formats
