#help-development
1 messages · Page 6 of 1
man rotating with the WE api is a trip
What is the new method for Team#setNameTagVisibility(NameTagVisibility visibility); ?
Because that one doesn't work anymore
team.setOption(Team.Option.NAME_TAG_VISIBILITY, Team.OptionStatus.ALWAYS);```
Thx. For some reason others can't see my nametag anyway...
Thats the bit of the code
scoreboard = player.getScoreboard();
if (scoreboard.getTeam(player.getDisplayName()) == null) {
scoreboard.registerNewTeam(player.getDisplayName());
}
team = scoreboard.getTeam(player.getName());
team.setPrefix(Color(prefix));
team.setSuffix(Color(suffix));
team.setOption(Team.Option.NAME_TAG_VISIBILITY, Team.OptionStatus.ALWAYS);
switch (action) {
case CREATE:
team.addEntry(player.getName());
break;
case UPDATE:
team.unregister();
scoreboard.registerNewTeam(player.getName());
team = scoreboard.getTeam(player.getName());
team.setPrefix(Color(prefix));
team.setSuffix(Color(suffix));
team.addEntry(player.getName());
break;
case DESTROY:
team.unregister();
break;
}
Not my code, just edited it btw, but I understand what it's supposed to do
I mean they can see my name tag, but not my prefix, even though prefix and suffix have a value and are not ""
players should be added by name not DisplayName I believe
Oh yeah, that might be it lol
Why when I use nms in the newer versions of it, its so damn hard to understand the methods
why is it like that
because you are not using Mojang mappings
how would one go about getting the held item of an entity(not players)
plus no documentation
cast to LivingEntity first
Entities cannot hold items, LivingEntities can
will it fix all these weird impossible to understand methods like player.a();
or whatever
of course first check if the entity is a livingentity
ok so i assume just cast it
if(entity instanceof LivingEntity)
then do your casting
if you dont you might get ClassCastExceptions
yes, you will use things like ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.REMOVE_PLAYER)
not all Entities are LivingEntities but all LivingEntities are Entities if that makes sense
LivingEntity#getEquipment#getItemInMainHand
do u have any links where I can learn more about mojang mappings, bc its the first time ive ever heard of it
ye....i havent used livingentities too much i always have done players, commands, and blocks
mappings are basically just renamings of methods and properties and stuff
thanks for this i was about to ask
mfnalex has a wiki page but I forget teh link (if he has updated it). One sec
mojang mappings are one way these renamings are done
So i am trying to make it so if Pumpkin is placed on stonecutter it drops carrots (dont ask me why) but its dropping pumpkin when i place it above stonecutter
public class MelonHandler implements Listener {
public MelonHandler(FirstTest plugin) {
Bukkit.getPluginManager().registerEvents(this, plugin);
}
@EventHandler
public void onMelonPlace(BlockPlaceEvent event) {
if (event.getBlock().getType() !=Material.PUMPKIN || event.getBlockAgainst().getType() !=Material.STONECUTTER) {
return;
}
else event.getBlock().breakNaturally(new ItemStack(Material.CARROT));
}
}
breakNaturally() doesn't take in the argument of the item it should drop lol
^
it takes in the argument of the tool with which you break it with
It’s the item used to break it
Ok so how would i make it drop an item?
Set it to air and manually drop some carrots
just set the pumpkin to material.air
and drop the carrots naturally
you should instead listen to a BlockDropItemEvent and check if it's a pumpkin and if there is a stonecutter under it, then change the drops
or that works too
He hasn;t updated it, but this should do https://blog.jeff-media.com/nms-use-mojang-mappings-for-your-spigot-plugins/
tysm
god bless jeff
anyway, say i have like a map with an integer id and some kind of value, is there a specific implementation of map with which i can get the next empty integer id available without iterating through it from start to end
so if i have a map where 1 3 and 5 have values assigned it has like a method that returns 2
otherwise ill just do the iteration method
I know I keep asking about this, but I got no other option rn, can you take a look at my spigot post and see if there is an obvious problem https://www.spigotmc.org/threads/halting-and-restoring-redstone-a-bug-or-a-mistake.566065/
Ok i think i'm dumb because i still dont get what to do
turns out that wasn't it
Can't see the name tag of others, but that of myself
confirm it still works
set the block type to air and drop your carrots manually
sry, gtg. Food and stuff
i use that guide everytime i need a remapped jar
and drop your items with World#dropItemNaturally()
How do i get the previous block type of the block in BlockBreakEvent?
e.getBlock().getType() should return the block type before it was broken
keep in mind if you delay this method by as little as a tick it will instead return the "new" block type
I'm having an issue with persistent data
I have an item which has a custom persistent data type
which on BlockPlaceEvent it is also adding it to the block placed
but on BlockBreakEvent it doesn't look like the pdc is there
blocks cant store pdc
did you set the tile state back to the block
you will have to update teh PDC on the placed block 1 tick later
kinda like item meta on an item
I didn't see any setState or anything like that
so i assumed that it was automatically done
No PDC is not transfered when placed
only BlockData is 
BlockState#update
@EventHandler
public void blockPlace(BlockPlaceEvent e){
Block b = e.getBlock();
Player p = e.getPlayer();
ItemStack itemStack = e.getItemInHand();
if (itemStack.getType() != Material.SHULKER_BOX) return;
PersistentDataContainer container = itemStack.getItemMeta().getPersistentDataContainer();
if (!container.has(Utils.VAULT_PDC_NAMESPACED_KEY, Utils.VAULT_PERSISTENT_DATA_TYPE)) return;
VaultData vaultData = container.get(Utils.VAULT_PDC_NAMESPACED_KEY, Utils.VAULT_PERSISTENT_DATA_TYPE);
TileState state = (TileState) b.getState();
PersistentDataContainer blockContainer = state.getPersistentDataContainer();
blockContainer.set(Utils.VAULT_PDC_NAMESPACED_KEY, Utils.VAULT_PERSISTENT_DATA_TYPE, vaultData);
p.sendMessage("Setting "+vaultData.getVaultType().getName());
}
this is my code
dont TileState changes need to be directly saved to the chunk
or is that only using nms you need to do that
i know when i was messing with the data inside spawners i had to do a really funky update thing, but it was nms so the whole things funky
state.update()
for getNearbyEntities(double,double,double) it is range in xyz?
ItemStack vault = vaultData.getVaultType().getStack();
PersistentDataContainer itemContainer = vault.getItemMeta().getPersistentDataContainer();
itemContainer.set(Utils.VAULT_PDC_NAMESPACED_KEY, Utils.VAULT_PERSISTENT_DATA_TYPE, vaultData);
using this, do i need to set the meta back?
Meta is always a clone
ah
Ive done what was told there, the maven thing gives me an error
ran buildtools with --remapped ?
Do I have to try and guess the error?
I added the classifier and it says this:'pom.xml' has syntax errors
?paste your pom
is InventoryCloseEvent#getPlayer() always going to be an instance of a Player? because it returns a HumanEntity
Yes
Ok so i have made it to drop carrot but i want the pumpkin to break too
public class MelonHandler implements Listener {
public MelonHandler(FirstTest plugin) {
Bukkit.getPluginManager().registerEvents(this, plugin);
}
@EventHandler
public void onMelonPlace(BlockPlaceEvent event) {
if (event.getBlock().getType() !=Material.PUMPKIN || event.getBlockAgainst().getType() !=Material.STONECUTTER) {
return;
}
else event.getBlock().getDrops(new ItemStack(Material.AIR));
event.getBlock().getWorld().dropItemNaturally(event.getBlock().getLocation(), new ItemStack(Material.CARROT));
}
}
hey guys, is it possible to create NPCs without NMS, and while using NMS with Minecraft v19 im getting this error
Unresolved dependency: 'org.spigotmc:spigot:jar:1.19-R0.1-SNAPSHOT'
add event.getBlock().setType(Material.AIR);
thanks i guess i really am stupid i know what that does but still lol
all good we all look over things
What type of NPC's
ServerPlayer's?
or just normal entities like cows and stuff
and that dependency error is related to something else
can you send your pom
or build.gradle, whichever your using 🙂
sure
Sry, I'm back now. Any idea why others can't see the correct name tag?
i want them to be an entity
Yes but what type
but shouldnt be visible when we do [tab]
Player
Gonna say it right now
Hi guys im trying to do the following :public static Pattern HEX_PATTERN_2 = Pattern.compile("{#([A-Fa-f0-9]){6}}");for "{#([A-Fa-f0-9]){6}}" how do i do the surrounding curly braces because then i do an escape character infront, eg: "\{#([A-Fa-f0-9]){6}\}" it says 'Illegal escape character for string literal'
-
Not possible without nms
-
With NMS its still relatively complicated
I would say use citizens
dont say citizens is slow either pls
i can use nms
but this error popped up
NMS Its still complicated
You need to do a LOT of stuff for Player entities
i did but i cant get the stuff from NMS
such as CraftPlayer
i have 1
Did you run build tools with --remapped option
^ Can someone help with this please
that seems to be the issue a lot of the time
and make sure your nms remapped import matched my spigot one
or you wont get remappings properly
how do we do that?
im just using the old maven build
thing
hey guys i got some issue with itemsadder can u help me ?
Download build tools, and when you run it for 1.19 add --remapped to the end
it will auto install to your .mvn local repo
and just refresh ur maven after that
where do i download the build tools
anywhere
doesnt matter
i do mine on a folder on my desktop
just dont forget --remapped
?bt
alright
so basically
java -jar BuildTools.jar --rev 1.19 --remapped
when i leave my server itemsadder stop working and say that in the tchat but when i reload it's good u know why this appen ?
Is this a coding question about items adder api or somethin
🗿
so this isnt a programming question
Strictly items adder?
My first guess, if i was having issues with a plugin would to be to join theyre discord
ItemsAdder support is very good
wait no
thats CustomItems
idk about IA
ok so still the same error
i installed the build tools in the same directory as the plugin
you refreshed maven and fixed that import right
you
dont
need to do that but okay haha
if your uploading to github
.gitignore it
import to spigot-api
spigot
check the bottom import
copy paste that one only
well
cant copy paste
sec
can you send the pom again with the error
might wanna link so u can send images
!link
something like that
who knows the command
you didnt change import
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<classifier>remapped-mojang</classifier>
</dependency>
Copy paste this directly
i needs remapped-mojang
line 29 is the issue
oh ok
spawns should not be null though as I initialise it as an empty array
also
record(Vector, Vector) 😢
of special source
and I don't set it to null anywhere else I don't think...
tried, still same error
changing it didnt seem to change stuff
um sure ig
These are the only 4 usages so I def don't set it to null anywhere
anyone able to help?
try it without lombok
idk why you arent declaring that variable in your constructor
initializing**
can I not do it the way I did?
https://paste.md-5.net/urufolerir.xml
Try to make a fresh project with this pom.xml
Lombok may be messing with it
try without @Getter and see what happens
kk
ok ill see
that way is typically better, i personally dont like declaring variables like that unless theyre final statics
same issue, I'll try without lombok
lombok shouldnt be an issue now
question
what class you extending
you got a variable named spawns in there too?
yeah
I'll send the full class
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
GameMap ^
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
BoatMap ^
where and how do you call loadMetaData(FileConfiguration) at?
do any superceding classes call it? Or is it called on an instance of BoatMap
Ah yep there we go
how would you fix it?
lol
but to be it sounds like the extensions need to be reversed
wdym?
I can't see the modified name tag of others for some reason
scoreboard = player.getScoreboard();
if (scoreboard.getTeam(player.getDisplayName()) == null) {
scoreboard.registerNewTeam(player.getDisplayName());
}
team = scoreboard.getTeam(player.getName());
team.setPrefix(Color(prefix));
team.setSuffix(Color(suffix));
team.setOption(Team.Option.NAME_TAG_VISIBILITY, Team.OptionStatus.ALWAYS);
switch (action) {
case CREATE:
team.addEntry(player.getName());
break;
case UPDATE:
team.unregister();
scoreboard.registerNewTeam(player.getName());
team = scoreboard.getTeam(player.getName());
team.setPrefix(Color(prefix));
team.setSuffix(Color(suffix));
team.addEntry(player.getName());
break;
case DESTROY:
team.unregister();
break;
}
Not sure why
it wouldn't make sense if GameMap extended BoatMap
Yeah exactly, so likely best way is just make a new list on that event call
can I somehow disable this stupid "implementations" thing?
nope
jk
idk how
D:
I'll init the list in constructor anyway, and loading the meta data will just overwrite with a new list, that makes good sense
It's so messy to fix the formatting when intellij adds weird newlines for those popups
thanks for the help anyway
right clicking has a hide option for me
^ Can someone help with this please
oh yeah thx. Right click -> Configure and then disable inheritors
i think its better to tell us what type of strings you want to parse instead for, seems really confusing without a screenshot of where the errors shown
ofc!
@noble lantern error now gone, ty
having it on the right is soooooo much better lmao
finally I can see again whether I added a new line or not
{#ffffff} Is an example and I want to turn that into a Color from the hex
Any idea why? Cuz I'm a bit confused as of why this doesn't work
or / and \ is invalid for regex on java
Anyway to inherit the @EventListener annotation?
you okay my mans
yes
its fine without the surrounding braces
did you write the regex yourself by chance?
see if using a regex creation website if they come up with something else
they might box it in something else to make it valid for java
okay thanks
ive never used Pattern before thou i feel like theres a diffrent class
So originally there was just the trigger function. That was inherited and worked fine, but I had to add the @fresh templetHandler annotations every time. So I then tried adding the trigger function which isn't overwritten, and then calls the onEvent function which is overwritten. I don't think this works though cause of type erasure
okay guess thats standard
ignore me on that part
So if possible, when I extend the class the annotation is automatically inherited somehow
so complicated
why not
search your jar for Listener classes
and then call new instances via reflection
and you never need to Bukkit.registerCommand manually ever again
i mean
the registerEvents method
well that's what my system already does ;-;
so leave like that xD
but that's not where the issue is
the issue is I have to add @fresh templetHandler every time I extend
look
I know it's not really an issue
but
Hey, i have a problem with my config.yml is empty when i generate it on the server and i have no idea why. Do anyone have a fix?
sec
ik theres a boolean for replace
did entities as a zombie has UniqueId?
in that case im sorry idk xD
All entities have a UUID
did you do cfg.options.copyDefaults(true) and then save?
god spigot has some of the weirdest methods sometimes
nope, i have no idea what that is lol
me neither dw
you need to do this in oder for the defaults you wanna add to be saved
so i just add it to my onEnable?
in a sense yeah
yes
the weird thing is that i dont have anything like that on other plugins ive made and they still generate a config with text in it. I have no idea why
there we go, yea it worked. Just had to delete the old empty one first
thanks
np
actually it works all the time if done properly
I mean there's no "if(chance <= 50)" or so in the code to make it work only sometimes
yeah but I think thats like how they tell you in the docs
copyDefaults fucks with your config styling
Thats why it adds empty lines on start when i use it?
could be
It also converts your arrays to lists
arr: [1, 2, 3]
```will become
```yml
arr:
- 1
- 2
- 3
It also adds in default example configs that are intended to be optional.
#2 is elite anyways
pog change
i feel like this could be handled better
How, it can at most be a separate file that I somehow know will never be updated?
There isn't an event such as EntityCollideEntityEvent, should I use EntityChangeBlockEvent?
whats the point of all those numbers anyways?
why tf are calls to "this(...)" and "super(...)" only allowed in the first line D:
that sucks so hard
number of mobs per wave
for me yes
wdym?
dont make your dev life a pain to help 9 year olds :))
UX
even tho most 9 year olds will be using free public plugins we make 
I mean this
I have no idea, just started coding, and didnt even know super was a thing
super refers to the "class" you're extending
is there a reason to use super?
I actually never needed and never will need NBT, but since my library has NMS stuff already annyway, I thought about adding this too 😄
yes when extending classes that have constructor arguments
ofc, let me give you an nexample
purely for java dev's convenience, for your inconvenience
cant remember if empty constructors need super() or not, java might call those automatically
https://github.com/JEFF-Media-GbR/JeffLib/blob/master/core/src/main/java/com/jeff_media/jefflib/data/tuples/Triplet.java check out this. It's a triplet (a class that can hold 3 values of anything). It extends a Pair, so it only adds stuff for "get third item" etc. Hence it calls "super" (the constructor of the pair), and super.hashCode() etc for the other stuff that's related to the first 2 values
if super's constructor has no params, it is automatically called iirc
3 km
minecraft distance
3000 blocks
thats what? 😄
im gonna afk these npcs
and teleport somewhere and see if they pathfind to me overnight
31234 blocks
one km should be exactly 1000 blocks
IIRC notch once said that a minecraft block is one cubic meter
kk, not sure if i have enough ram to cache 31k points 100 times though for the npcs
i think i can maybe do 50 npcs
lemme see
.
that sucks
what are you trying to do
Cancel the collide with projectile on armorstands.
they just want to know if you call super methods they are already initialized properly
tbf, for readability sake anything before super can be a method or sth
try reducing armorstand's hitbox to smol
How resource intensive is calling Collections.shuffle on a List of 50 elements
It is possible
to cancel the collide
Maybe check the impl?
Idk how to do it.
just doing something like this i doubt its that harmful
check api docs for armor stand entity
uuuuugh and I also cannot declare static methods in interfaces, this sucks lmao
this doesn't make sense tho
you never use abstract classes??
I do but
there is an event for that idk how.
I have two things I need to extend / implement
interface NBTitemStack, and abstract class HatchedNBTDataHolder

my HatchedNBTItemStack class must implement both
do you know how to get the armorstand entity from the event?
oh
nvm then
so yeah both are abstract classes D:
I saw somewhere an event such as EntityCollideEvent and checking the both entities you can cancel the collide.
okay alex time to let the npcs go
no not always, there is no such event too
Hello !
I have a question more about Java '
ᴸᵉᵗ'ˢ ˢᵃʸ ᴵ ʰᵃᵛᵉ ᵃ ˡᶦˢᵗ ᵒᶠ ᵃᵛᵃᶦˡᵃᵇˡᵉ ʳᵉʷᵃʳᵈˢ ᵉᵃᶜʰ ʷᶦᵗʰ ᵃ ʷᵉᶦᵍʰᵗ. ᴴᵒʷ ᶜᵃⁿ ᴵ ᶜʰᵒᵒˢᵉ ᵒⁿᵉ ᵒᶠ ᵗʰᵉ ʳᵉʷᵃʳᵈˢ ᵗᵃᵏᶦⁿᵍ ᶦⁿᵗᵒ ᵃᶜᶜᵒᵘⁿᵗ ᵗʰᵉ ʷᵉᶦᵍʰᵗ ᵒᶠ ᵉᵃᶜʰ ʳᵉʷᵃʳᵈ?
ᴴᵉʳᵉ ᶦˢ ᵃⁿ ᵉˣᵃᵐᵖˡᵉ:
ᵀʰᶦˢ ᶦˢ ᵐʸ ᶜᵒⁿᶠᶦᵍ.ʸᵐˡ:
ʳᵉʷᵃʳᵈˢ:
ᶠᶦʳˢᵗᴿᵉʷᵃʳᵈ:
ᶜᵒᵐᵐᵃⁿᵈ: "ᵇᶜ %ᵖˡᵃʸᵉʳ% ʷᵒⁿ ᶠᶦʳˢᵗ ʳᵉʷᵃʳᵈ !"
ʷᵉᶦᵍʰᵗ: ²
ˢᵉᶜᵒⁿᵈᴿᵉʷᵃʳᵈ:
ᶜᵒᵐᵐᵃⁿᵈ: "ᵇᶜ %ᵖˡᵃʸᵉʳ% ʷᵒⁿ ˢᵉᶜᵒⁿᵈ ʳᵉʷᵃʳᵈ !"
ʷᵉᶦᵍʰᵗ: ¹
ˡᵃˢᵗᴿᵉʷᵃʳᵈ:
ᶜᵒᵐᵐᵃⁿᵈ: "ᵇᶜ %ᵖˡᵃʸᵉʳ% ʷᵒⁿ ˡᵃˢᵗ ʳᵉʷᵃʳᵈ !"
ʷᵉᶦᵍʰᵗ: ¹
ᴴᵒʷ ᶜᵃⁿ ᴵ ᵍᵉᵗ ᵃ ʳᵃⁿᵈᵒᵐ ʳᵉʷᵃʳᵈ ᵗᵃᵏᶦⁿᵍ ᶦⁿᵗᵒ ᵃᶜᶜᵒᵘⁿᵗ ᵗʰᵉ ʷᵉᶦᵍʰᵗ ᵒᶠ ᵗʰᵉˢᵉ ʳᵉʷᵃʳᵈˢ ?
ᴵⁿ ᵗʰᶦˢ ᵉˣᵃᵐᵖˡᵉ, ᶠᶦʳˢᵗ ʳᵉʷᵃʳᵈˢ ʰᵃˢ ⁵⁰%, ˢᵉᶜᵒⁿᵈ ʰᵃˢ ²⁵% ᵃⁿᵈ ˡᵃˢᵗ ʰᵃˢ ²⁵% ᵗᵒᵒ ⁽ᵇᵘᵗ ᶦᵗ'ˢ ᶜᵒⁿᶠᶦᵍᵘʳᵃᵇˡᵉ !⁾
ᵀʰᵃⁿᵏ ʸᵒᵘ
nice font
skript has an event for that
@tender shard uhh
they become self aware
i never gave them flight permissions....
theyre in survival mode....
lol
btw I made up a new term
sometimes you need to declare an empty constructor for reasons
but there's no name for this
let's call it Burchard's constructor
"Yo Bro, this can't work. You need to add a Burchard's constructor in the super class"
"Ah, thanks, now it compiles"
i love it
@ivory sleet ?burchard-constructor command when
lol
?learnjava!
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. https://media.discordapp.net/attachments/694661573125472256/998143126373941248/6n0v4g.gif
oh lol this will probably offend people even more than the previous message lol
aaah it's two commands?
perfect
then one can send the gif one only when people ignored the first "learnjava"
i only use it on people who obviously dont wanna learn haha
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.
?learnjava!
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. https://media.discordapp.net/attachments/694661573125472256/998143126373941248/6n0v4g.gif
perfect
Did you actually put it into the bot
Xd
i cant put photos here
I contributed the ?notworking command and the pinned msg in this channel lol
You gotta use exclamation mark at the end right?
link your account
Usage: !verify <forums username>
yee
this is the best one
@ivory sleet why is it !verify and not ?verify 😢
true
alex im sorry to do this to you
how do i generate a random number in range starting at a negative value
not 0
Random#nextInt says bounds must be positive
ThreadLocalRandom should have that
You must substract it from the result
Also from Java 17 Random#nextInt has two Params as well
ohh
dont have it for me weird
Now I am reading the docs and it seems that it actually doesn't
But I swear it was there, maybe I had different jre?
I mean jdk
Sorry for reposting, but I think this one drowned in the other messages :)
I've been trying to figure out why, but I don't see why it doesn't work
Hello !
I have a question more about Java ^^'
(Rewritten so it can be read)
Let's say I have a list of available rewards each with a weight. How can I choose one of the rewards taking into account the weight of each reward?
Here is an example:
This is my config.yml file:
reward:
first_reward:
command: "bc %player% won first reward !"
weight: 2
second_reward:
command: "bc %player% won second reward !"
weight: 1
last_reward:
command: "bc %player% won last reward !"
weight: 1
How can I get a random reward taking into account the weight of these rewards ?
In this example, first reward has 50%, second one has 25% and last one has 25% too (but it's configurable, I can't use raw numbers)
Thank you 🙂
what is the packet to spawn living entities
I've actually done the same thing
spawn_living_entity in protocollib seems depreceated now
Hard to explain
Read protocol wiki
There's everything
Thank you for your help ... 🤨
Ah okay
https://wiki.vg/Protocol couldnt find anything here
You are right,interesting
4.8 protocollib gives me errors when I use spawn_entity_living
There's an addon for that
Just lookup Multiverse addons or smth
sec
Do you mean Multiverse-core?
Oh sorry, not sure about this. You could probably use a hashmap lol
put the player on the hashmap on join and the value of the hashmap is the world name
and when they die you get the world and tp them to that world
would be a work-around
but if you do it that way, you'd have to change the current world everytime they change world
But look if there's a plugin for that for MultiWorld. Would be easier
what are the chances of me baing able to hack into this via reflection
and changing its max amount?
ohh
under the hood it uses put
i wonder if i could just overwrite it?
oih no
its final
Bukkit is broken lol team.setOption(Team.Option.NAME_TAG_VISIBILITY, Team.OptionStatus.NEVER);
If I use it like that players can see name tags of others if I use it like that
team.setOption(Team.Option.NAME_TAG_VISIBILITY, Team.OptionStatus.ALWAYS);
You can only see your own name tag
like bruh
Someone should PR this as a SpigotConfig
other attribute instance have it
Should cancelling the event cancel the collide?
IntelliJ gives me error like there is no implementing of the interface Cancellable in this event
What version are you on
what version are you using
oh interesting
spigot version?
yes
Let me guess 1.8
1.12.2
RangedAttributes maxValue is public 🤔
never
I'll explode if it's only for 1.13+
Looks like it is
🤬
ill explode if you develop under 1.14
same
1.12.2 most optimized
lol
you sure
I do
some people call it "more optimized", I call it "lack of features"
idc, it's light to install and is the most compatible version
Not at all
most compatible to what?
ok let me check quickly
You really sound like a 1.8 player lmao
Version such as 1.8 are bad
Stop saying that never installed that shit

You're using the exact same arguments for running outdated stuff
"most used version"... 11 % lol
So i want to make it so that when i right click with a specific item it turns grass block into farmland of radius 10 blocks (i have this but how do i make it so it only replaces grass block and make it farmland in a 10 block radius)
public class PlayerEvents implements Listener {
@EventHandler
public static void onRightClick(PlayerInteractEvent event) {
if(event.getAction() == Action.RIGHT_CLICK_BLOCK) {
Material material = event.getClickedBlock().getType();
if(material.equals(Material.GRASS_BLOCK)) {
if (event.getItem() !=null) {
if (event.getItem().getItemMeta().equals(PlayerHandler.gh.getItemMeta())) {
Player player = event.getPlayer();
player.getWorld().setType(player.getLocation(), Material.FARMLAND);
}
}
}
}
}
}
i cant
CrackShot is useless in 1.13+
You would need to iterate through a highest X /Z combo + lowest X/Z combo
EG 23 25 - 13 15
Would make a 10x10 squre
There is the real reason
sorry if my math is wrong
im trying
im horrible at it
cannot access com.mojang.authlib.GameProfile
why dis happen
what java version are you on
How are you trying to access it
dat too
okay but does a-
and which spigot version?
1.12.2 has a lot of error like the shields and elytra but is that light version that you use with a lot of feature, since I make a Rp server I prefer using 1.12.2
then it should work. did you add spigot or spigot-api as dependency?
<repository>
<id>minecraft-repo</id>
<url>https://libraries.minecraft.net/</url>
</repository>``````xml
<!--Mojang -->
<dependency>
<groupId>com.mojang</groupId>
<artifactId>authlib</artifactId>
<version>3.5.41</version>
<scope>provided</scope>
</dependency>```
^
spigot
yeah forget 1.8
but thats for
yeah anyway, 1.12.2 is outdated and lacks sooo many features. I understand that people claim it's faster, because it is indeed faster, since most features are missing. but calling it "better" or "more optimized" is just bullshit. It's only faster because it misses like half of the new stuff
?paste
1.19 literally runs 20tps with 100 npcs on a contabo vps
A lot of things are lost in 1.13+
here look
you cannot tell me 1.19 isnt optimized
yeah for example the outdated numeric IDs
lost?
how to get skullmeta from itemstack???
ding dong here is the pom.xml
Do anyone know why this doesnt work? It's supposed to be a teleport ability and it stops working where it's checking whats action is being used https://pastebin.com/Kr12uawA
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.
Get item meta and cast it
(SkullMeta) meta
cast the meta to skullmeta
:)
ok thx
bro
I literally asked "do you use spigot-api or spigot"
and you said spigot
BTW
Anyone know if im able to use reflection to change the default value of this?
yet you use spigot-api
I need to cancel the ProjectileCollideEvent
its the max value
It's possible somehow even in 1.12.2
blind af
what are you actually trying to achieve
sorry man
NMS Attributes btw *
My idea is to reshot the projectile but I need to calculate things like the speed and so on
Max pathfinding range is dependent upon that value
Make a fork and add the feature yourself
i want to override it to make it higher just for testing
Do you have to use armorstands to make mob NPCs have name tags or is there a way to show the name tags set by setCustomName?
wdym
Make your own spigot version where it is cancellable

or just tell us what your actual goal is
Nvm it just doesn't work and I'm stupid or smth.
I have this bit of code here, which is supposed to change the name tag of players. And it does, but others can't see it.
scoreboard = player.getScoreboard();
if (scoreboard.getTeam(player.getName()) == null) {
scoreboard.registerNewTeam(player.getName());
}
team = scoreboard.getTeam(player.getName());
team.setPrefix(Color(prefix, '&'));
team.setSuffix(Color(suffix, '&'));
team.setOption(Team.Option.NAME_TAG_VISIBILITY, Team.OptionStatus.ALWAYS);
switch (action) {
case CREATE:
team.addEntry(player.getName());
break;
case UPDATE:
team.unregister();
scoreboard.registerNewTeam(player.getName());
team = scoreboard.getTeam(player.getName());
team.setPrefix(Color(prefix,'&'));
team.setSuffix(Color(suffix,'&'));
team.addEntry(player.getName());
break;
case DESTROY:
team.unregister();
break;
}
idk why, I've been trying to fix this for hours but idk where the problem is
me?
no, the dude who wants to cancel the event
oh
👁️ 👄 👁️
Cancel the collide of projectile with armorstand
🥲
I should add the armorstand to player's team and not the opposite since I use player's teams for other things, isn't it?
team api for mc sounds so scuffed
what is that supposed to mean
cancel the collide? you want to change the position of the arrow?
I love how I have to call load to save the data
Have you watched naruto?
no
I was going to make an example if u've watched it, I will do it anyways using a gif.
okidoki
lol i hate how my data managment always ends up like that
my save method and reload is always just load() 💀
Literally, letting a projectile pass through armorstand @tender shard
ooh ok
you couldn't do that even when cancelling the event
I think you'd have to manually set the location on every tick while the arrow is "colliding with" the armorstand
^
cancelling the ProjectileHitEvent will not change any velocity / physics stuff, it's only for cancelling stuff like "taking damage" etc
Does spigots optimizations automatically ignore LivingEntity#setCollidable?
that looks... tasty
There were 3 options, 1 using teams, 2 reshoting the projectile with same speed of the previous, 3 using your tp way
its dangerous
teams are definitely the best way
dont tough, you go flying
I'm worried that using the teams, adding the projectile in the same team of the armorstand won't work if I use the ProjectileHitEvent
Is there a feature request for spigot?
wdym?
sorry I can't help with that. Never used teams
IE Anywhere i can ask, for someone to PR a feature into spigot?
Trying to figure out if u're ironic.
I could do it, but idk how to dev or make prs for spigot
- Making the event cancellable yourself
its relatively simple and other types exist already
oh
didnt see the new feature one
How.
?contribute
You can find information about contributing to Spigot at the following links:
https://www.spigotmc.org/wiki/cla/
https://www.spigotmc.org/wiki/guide-contributing-to-spigot/
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/README.md
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/CONTRIBUTING.md
what is your feature request btw @noble lantern ?
Have followRange added to spigot config attributes
I think the supports for legacy versions is deprecated.
I mean, you could just Pr it yourself 😛 because IIRC feature requests on jira tend to get ignored lol
Well yeah you only follow the modifying spigot part
Don't actually PR it in to Spigot
So would i just edit the built source from BuildTools?
PRing into spigot seems overall confusing its such a large project
i could do it myself on a private jar but for actual src i have no idea
Follow this @noble lantern
yeah it's indeed a bit complicated lol
Dont i need PR access to open new PRs too btw
Thought you needed jira access for that
What about this @chrome beacon ?
Would be nicer to have it directly added to spigot, no harm in it i mean the max entity speed change is more devestating xD
found the form for access to it ty
man the amount of times i try it and see are crazy
Hoping that when the event is fired the entity is not removed yet
but the amount of actual times i see are low 
So i have done this but it does not make grass in a certain radius farmland only the single one that i right click on (btw gh is my custom item)
public class PlayerEvents implements Listener {
@EventHandler
public static void onRightClick(PlayerInteractEvent event) {
if(event.getAction() == Action.RIGHT_CLICK_BLOCK) {
if (event.getItem() !=null) {
if (event.getItem().getItemMeta().equals(PlayerHandler.gh.getItemMeta())) {
Location playerPos = event.getPlayer().getLocation();
int r = 3;
for(int x = (r* -1); x <= r; x++) {
for(int y = (r* -1); y <= r; y++) {
for(int z = (r * -1); z <= r; z++) {
Block block = playerPos.getWorld().getBlockAt(playerPos.getBlockX() + x, playerPos.getBlockY() + y, playerPos.getBlockZ() + z);
if(block.getType() == Material.GRASS_BLOCK) {
block.setType(Material.FARMLAND);
}
}
}
}
}
}
}
}
}
https://paste.md-5.net/kobisoyewi.java
The EntityTypes.ENDER_DRAGON throws an error any suggestions?
Where should I store private vaults
btw
setLocation in NMS is a teleport method
oh wait wtf
man use 1.14
smh
all that to spawn an ender dragon
Thats not intellij thats a maven/gradle thing
you change the import of the spigot version you use
depends
what storage system are you gonna use?
how?
Flatfile? Database?
you change the spigot import in your pom.xml if your using maven, in the <dependencies> tag
No
So
Half failure
I mean, sometimes it works, but sometimes no
I think that it's the same even the plugin I've made.
no just the version itself, its typically the name of the jar eg 1.19-R.1-SNAPSHOT or similar
Your gonna need to google "Spigot <version> maven import" on google
itll show up
?maven
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
I doubt they actually want to change version though
if i had to go through 40 lines of NMS to spawn a single entity im changing versions

some people aren't that smart
1.8 in a nutshell
WTF is this?! o0
HAHA
lmao
this time I acually want to
someone help me with this lol
haha yeah
how do people make invisable players visable as a "ghost" to some players., does that happen when said players are on the same scoreboard team?
So you're switching mc version?
guess what
theres methods
1.19 be like
dragon.setPhase(...)
for hiding entity from another entity
forgot its name
sorry im not helpful
but thats how ppl do it
not the version im going to play, but the version im going to use :o
i want them to be visable as a ghost
Ohhh
there's only Player#hideEntity
So you're going for ViaBackwards?
ye men
Does it take LivingEntity or Entity?
prolly entity 
declaration: package: org.bukkit.entity, interface: Player
how
entity
also hidePlayer is another option
how tf you that fast
Lmao
man has a AHK setup for the hideEntity method
yea its prolly this Team#setCanSeeFriendlyInvisible(boolean b)
Yeah that is what you want
yea it is
yeah its cool
its cool for team gamemodes
@chrome beacon
so u can see ur team members invisable
is there a better way to change entity's NBT data then "savinng" the entity data into a compoundtag. and then "loading" it back later?
what obfuscation is this?
which?
fernflower, CFR, idk
well just dont decompile plugins xD
you should decompile plugins
im just intrested which obfuscator they use
you absolutely should decompile plugins
I think that the event is called when the projectile already gets removed.
bro that was meant ironicly
well where is this from?
jd gui
¯_(ツ)_/¯
I meant the plugin
okay what program was it? 😄
why are you intrested?
well you asked a question and I tried to answer it
I cannot tell you which obfuscator it is if all you send is "// INTERNAL ERROR"
good luck finding out yourself then, I just tried to help
did i say something wrong?
yes
where exatly?
well noone can help if you dont tell us what you're decompiling and also dont provide any screenshots of decompiled code or whatever
You try and guess where
how do you expect help if we dont even know what you are decompiling
your like "I need your help" hes ok what are you doing, your like "fuck you"
.jar file
obviously....
download recaf
(the version with "dependencies included")
recaf will definitely be able to show you some readable code
its not plugin
we have established that. does that change anything?
it's not plugin brooooo
lol
lol
does giving program's name changes anything?
Ues
yes
Yes
nvm man
because we could download it ourself and check it out
i cant understand. how
ok you do you
by going to the dev's website, then click on download
then waiting until the download is finished
then dragging the .jar into CFR or fernflower or whatever
and then maybe someone could tell you "that looks like stringer / allatori / proguard / whatever"
you may need dex2jar if they obfuscate to smali code
normally only android tho
didnt say that to complicate things at all dont mind me
im trying decompile some crasher
what is dex?
obfer maybe?
Basically takes all jar classes into one file
wtf is a crasher lol. what does it crash?
servers
and when you decompile the dex you get java smali code
from smali code you can convert to plain java
so it's a minecraft client thing that crashes servers with certain packets, or what?
education purposes only*
its not client
why don't you just send the file here
some kid will use it to crash servers 😄
then DM it to me
Me too :)
also crash bugs cant be fixed if they are not known
:DDD
so tbf I think its fine to send it here
if it indeed can crash servers, those bugs should be fixed
watch it be for like 1.8
it sends bots to server ig
alot bots*
oh so it's for cracked servers only?
VERI VERI MUCH
there is also premium accounts
offline mode false moment
those accounts will eventually stop working
since when?
btw who of you knew that this is a thing? be honest pls
I did
same
it’s brand new i thought
choco showed it a while ago
you can also randomly insert links into your code lol
label
interesting
http: // this is just a comment
and the countdown thing is just "while(variable-- > 10)"
I wanted to download iTag and use that in my plugin, but I can't download it for some reason, and setting nameTags with Teams is broken asf
true. Labels are quite cool but rarely of use in java
Any suggestions?
most people probably also don't know that you can spam {} everywhere lol