#help-development
1 messages · Page 30 of 1
and what does it say?
probably you are using 1.8 and expect it to have new features
Or 1.12
or 1.7.10
1.13
PDC was added in 1.14.1
ughh
also who tf still uses 1.13 lol
1.13 api
based
it's explained in the beginning of that post
ok
this is so bigbrain
to detect jumps like this
it does work totally fine
Mostly
only problem is that the "getTo" location will not be 100% accurate
I hear it’s still a bit jank around ladders and stuff
yea make sense
oh no, after all I just listen to the statistic increment event
it was working fine when I tested it
also on ladders, in water, on scaffolding, ...
i dont rlly understand why spigot hasnt implemented a PlayerJumpEvent like paper
or an armorequipevent
Because jumping isn’t server side
i mean the server has to know about the player jumping
Just a movement packet afaik
from what I know, the client simply sends the new coordinates to the server lol
how did paper implement this event then
so there isn't really a "jump" packets, only "i am now in the air lmao" packet
they check if the old location is on Ground, and whether the new location is not on the ground
that woulnt wqrk with ladders and stuff tho
this is the full code that paper uses
They could add additional checks for those cases. If none of those special cases occured & the player was on the ground & the players Y coordinate is larger than before -> Jump Event. For Details you can obviously check their code
if a player is on a ladder will #isOnGround return true?
Hey @tender shard I'm sorry to bother but, inventoryToB64 returns String[], and invFromB64 takes in String. Are there any code usage examples with this, or do I just String.join the array and pass it to be decoded?
Paper are using the same checks as vanillas jump statistic iirc
Probably
do you have more than one inventory you wanna serialize?
Which is basically just the statistic event
nope
you can just do ```java
String base64 = ItemSerializer.toBase64(myInventory);
Then to load it again:
```java
Inventory inv = ItemSerializer.inventoryFromBase64(base64);
If you want to save more than one inventory into the same string, just use some delimiter that's not used in base64. For example a normal comma ","
Hello guys, how are you? Sorry to interrupt, can i ask something?
?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!
sure 😛
That makes sense, thank you.
Beat me to it
thanks! I am having trouble with pressure plates interactions,
@EventHandler(ignoreCancelled = true)
public void onPlayerInteraction(PlayerInteractEvent e) {
if (e.getAction() == Action.PHYSICAL) {
if (e.getClickedBlock().getType() == Material.STONE_PLATE) {
e.setCancelled(true);
e.getPlayer().sendMessage(ChatColor.GOLD + "this is a pressure plate");
}
}
}
i send this because i think its more clear. I want to cancel the event when a player press a pressure plate, but what happens here is that the event is cancelled and it spams the same message
Well yeah, they’re going to keep trying to trigger the plate
Add a cooldown on that message
or dont send it at all :)
im making that for a parkour plugin with checkpoints
Launch them off the plate into space
Just send a message when the checkpoint is saved
public void onJoin(PlayerHandshakeEvent e) {
e.getConnection().getName()
}
and only saved if it hasn't been saved before
what does this returns?
i need to turn a base 64 json into an URL. Would you people rather just strip the "json" prefix and suffix, or manually parse it?
name of player?
no
Benchmark and see what runs the fastest 🙂
check what getConnection returns and the impl and check docs for getName
yes thats ok, but for example if you press the start pressure plate i want to restart the timer, so it keeps restarting sending messages
ofc not parsing the json will be faster, I just feel like it's a dirty method lol
If you feel it's a dirty method then parse it
so it returns player's username?
well I'm not sure. IIRC the json is always exactly the same
I am like 99.9% sure that it's always just the same thing except the URL
Yeah
then I'll just substring it
"user logging in into the proxy" so getName() would return the players name
thx
is handshake event same to motd refresh event?
handshake would refer to the player requesting login or smth ig
what is playerjoinevent called in bungee? i cant find it
idk
there is LoginEvent, ClientConnectEvent, ServerConnectEvent, PostLoginEvent, PreLoginEvent, ....
sooo
yeah
there's a ton of events when joining lol
https://javadoc.io/doc/net.md-5/bungeecord-api/latest/index.html here's a list of all events
why cant i get .getPlayer() on loginevent?
how can i kick player on that event?
by using disconnect on the player object
oh
wrong link
kick message?
please just read the javadocs yourself
'-'
it's all explained here
Hello!
Was wondering if players could create/edit plugin messages (if I use a custom channel) on their one side.
If they can, is there any way to secure those?
Thanks
at miklath.sheepstack.Sheepstack.<init>(Sheepstack.java:17) ~[?:?]
this means the errir us caused at line 17 right?
error
whats the HandlerList and how am i meant to use it
what would be some use cases for HandlerList
while creating a new Event
?event-api
epic
you basically don't need to use it. spigot / craftbukkit uses it to store a list of listeners that have to be notified when an event gets called.
you simply only have to do this
public class MyEvent extends Event {
private static final HandlerList HANDLERS = new HandlerList();
and then return this in the getHandlers() method
and in the static getHandlerList method
I think this line is giving me Index out ouf bounds
private final World world = Bukkit.getServer().getWorlds().get(0);
would that make sense?
?paste
send your full Sheepstack class pls
seems like you're getting a world too early
e.g. before it gets loaded
?paste
did you set LOAD to STARTUP in plugin.yml?
just set "world" to null, then in onEnable do Bukkit.getServer().getWorlds().get(0)
thanks
np
how did I not realise that
then I would have to make it non final right?
yep
My plugin works fine on a self-hosted server, however, the configuration folder doesn't even get created on a proper hosting site, and I am assuming it's because I might've done something wrong.
The code here is the one that creates a very important file directory in my plugin, which also creates the data folder, this isn't how it should be done, is it?
what's the DataFolder field?
Static field that contains getDataFolder()
also did you try whether YourClas.DataFolder actually exists? You are trying to create a child file without creating the actual data folder
try to do getDataFolder().mkDirs()
Since i'm doing mkdirs() it would create the entire file structure, though
And it's what happens on my pc
But i'll try to do so too, then. One sec.
Random.nextInt(100)
can generate an int
that can be 1 and 100 ? and between it
and not 0 ?
so its 0 to 99 ?
yeah
so a Random.nextInt(1-101)
If you want 1-100
ok thanks
Random.nextInt(100) + 1
^
@tender shard You were right, thank you. I'm curious though, why was that?
calling mkdirs() usually creates the file structure, but does it require more permissions to create multiple folders at a time or something?
Actually, nothing else was created, weird.
I'll figure it out, thanks!
i'm also not sure lol
files in java are weird
true
this line is causing an error barrier.add(1, 1, 0).getBlock().setType(Material.BARRIER);
Cannot invoke "org.bukkit.World.getBlockAt(org.bukkit.Location)" because the return value of "org.bukkit.Location.getWorld()" is null
how do I get a material by a number ( For example 15 for wool)
well im trying to get a random item so what's a better way than random number and get an item from that
At startup make a list of all materials where .isItem is true
And then get a random value from that
lmao? I ain't sitting here for 30 hours typing item names
there must be a better way
There is
yeah just filter out the junk items beforehand
It’s called a loop
e.g. using a Set<Material>
Or a stream if you want to be fancy
loop what? I don't have a list of materials and that's what im asking, how do I get one
Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.World.getBlockAt(org.bukkit.Location)" because the return value of "org.bukkit.Location.getWorld()" is null
eh
Your world doesn’t exist
but it does
its caused on this line
barrier.add(1, 1, 0).getBlock().setType(Material.BARRIER);
and I dont get how it has something to do with world
well
it definetly is
cause this thing is run on a command
how could you run a command if you are not in a world
?paste
Show the actual code, not just one line
it'd get a random item like this, I guess
public class Test extends JavaPlugin implements Listener {
private static final List<Material> ITEMS;
static {
ITEMS = Arrays.stream(Material.values()).filter(Material::isItem).collect(Collectors.toList())
}
public static Material getRandomItem() {
return ITEMS.get(ThreadLocalRandom.current().nextInt(ITEMS.size()));
}
Thanks!
Heyyy, does anyone know how i can make so if like a player gets hited by someone and then fell into lava how do i make so the person who hited them last gets the kill?
Create those locations after you set world to not null in onEnable
omggg
who wants to be a millionaire runs 4 times this week!
and they raised the final prize from 1 million to 3 million €
best show ever lol
Hello someone could help me to have a seed plenter plugin compatible with
minecraft:carrot_on_a_stick{CustomModelData:1}
Ok so I have a lever that gets unpowered by the plugin after a period of time, the problem is that after it gets un powered the blocks around it dont realize that until they recieve a block update, would the best way to do that just be to in a radius around the lever go update all of the blocks with, block.getState().update() ?
fuck you github >.<
how are you changing the "powered" thing?
BlockData d = block.getBlockData();
( (Powerable) d ).setPowered( !( (Powerable) d ).isPowered() );
block.setBlockData( d );
this is what unsets its powered, I could just make it be .setPowered(false) but eh 🤷♂️
and for me pls
still has the same issue regardless
Hello!
I coded a plugin that sends packets through a custom channel. Even though data isn't really sensible it will still add player to an arena.
How can I make sure that the data hasn't been edited/created?
Thanks.
Is there any way to block/remove the "Spawnpoint set" message if you're entering a new bed?
Is the client sending this info?
Hello someone could help me to have a seed plenter plugin compatible with
minecraft:carrot_on_a_stick{CustomModelData:1}
What
no, it's the bungeecord server that should send this info.
Then I fail to see the concern
public void onLoad() {
dependencyInjection();
}
private void dependencyInjection() {
AntiChatSpamConfig config = new AntiChatSpamConfig(this);
AntiChatSpamMessages msg = new AntiChatSpamMessages();
command = new AntiChatSpamCommand(this, msg);
events = new AntiChatSpamEvents(this, config, msg);
}```
ok so even though i use a custom channel, any risk of data creation/modification by the player
liket his?
Hello someone could help me to have a seed plenter plugin compatible with
minecraft:carrot_on_a_stick{CustomModelData:1}
Doubtful
What does this mean? You want to pay someone to make you a plugin? You want it so that a custom item plants seeds? I don't understand
I have a script but it doesn't work
so it would be better using another method as it can be edited/created by player?
I said doubtful as in it's unlikely that anyone would be able to modify it.
Script? As in Skript?
"option:"
Erreur &cErreur tu n'as pas la permission !
"commande /houe [<Seed plenter 5x5>]:"
"trigger:"
"if player is op:"
"give 1 minecraft:carrote_on_a_stick{CustomModelData:1} "&bSeed plenter (5x5) to player
false:
"send f@Erreur to player"
"stop"
"on rightclick with carrote_on_a_stick{CustomModelData:1}:"
"name of player's tool is &bSeed plenter (3x3)"
"event-block is dirt or grass block:"
"loop block in radus 3:"
"loop is dirt or grass block"
"loop-block isn't farmlan or 59:"
"set loop-block to farmland"
"set block above loop-block to 59:"
"on leftclick with carrote_on_a_stick{CustomModelData:2}:"
"cancel event"
"if name of player's tool is seed plenter (3x3):"
"is event-block is farmland:"
"loop block in radus 3:"
"broadcast 1"
"if loop-block is farmland:"
" if block above loop-block isn't 59:"
"broadcast2"
"set block above loop-block to 59:"
"broadcast "3"

Thank God for disabled embeds
bump cause I still cant figure this out XD
BlockData d = block.getBlockData();
( (Powerable) d ).setPowered(false);
block.setBlockData( d );
Thats how its getting unpowered

does spigot ship apache-commons-configuration?
is there a Map<K, V, V2> impl?
oh ye records exist too
why do you want that kacper
Images on resource pages not loading for anyone else here?
load for me
hmm
?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/
would be useful sometimes if there were mutable variants of records
Hm images definitely not loading for me, only a few, some others are just blank
Not only on my projects but also on projects from other people
Tried switching browser already, same result
Ah sorry this should be in general probably
what images
anyways how would i call a record that holds the current progress and level of a skill?
SkillSnapshot?
the ones uploaded by resource owners to showcase their resource
i called my class which holds the skillsmap SkillData so cant use that lmfao
Hey, anyone know why nothing happens after sending /spawn?
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if(sender instanceof Player){
if(sender.hasPermission("drainstealcore.spawn")){
Location loc = new Location(Bukkit.getWorld("spawn"), 1447, 64, 122, -135, 0);
sender.sendMessage(Utils.color("Hey!"));
((Player) sender).teleport(loc);
}
}
return true;
}```
basically nothing
no exceptions in the console
bruh whats this
i mean you can replicate this by just covering a class in lombok
your git user?
lombok 🥺
i’m not a fan, but would work
ugh do i know any password
have no idea what to fill in there
oh doesnt need password
no… lol
ok so almost any risk about that.
Thanks 🙂
bump
Is it possible to get the current burn time and already passed burn time of a furnace as it is working?
It looks like you can get the passed cook time, but not how long it will run in total
guessing the player doesn't have the correct permission if it's not displaying the hey message
im an operator though
make sure the permission node is being correctly assigned in your plugin.yml
make sure it's default is set to op
woah i never did that and it always worked fine
i mean i only register the command
that's my guess at least
but instead of doing permission in plugin.yml
i check the permission in the code
allowing me to set my own no-perms msg
hmm i was thinking of this for my skill data https://paste.md-5.net/ezosayidom.cs
does player.teleport(Location) teleport them to the ground or in the air?
Is there a way to teleport them to a world like they would spawn in? Like on the ground not in the middle of the air.
I am using multiverse as a dependency to create and destroy worlds so it can be something in there.
does player.teleport(Location) teleport them to the ground or in the air?
it teleports the player to EXACTLY the location you gave
Is there a way to teleport them to a world like they would spawn in? Like on the ground not in the middle of the air.
I think vanilla uses the DefaultRandomPos class to get "random" locations
I think this is the method used to determine the spawn location for new players
(NMS)
i'm wondering how i would implement a levelling system here, meaning that every level of a skill needs more xp to be completed https://github.com/FourteenBrush/xKingdoms/tree/master/src/main/java/me/fourteendoggo/xkingdoms/skills
Ok, so, I have a lever, its powered value is getting set to false
That works, as the lever flicks back
My problem is that the blocks around it arent registering that it has unpowered, until they get block updated.
I have already tried using "block.getState().update()" to give them a block update but that has no effect
Whats really confusing me is that any redstone block that is around it registers it isnt powered anymore, but that stone block has not
but after i do something to update on of the broken powered blocks, say add another piece of redstone, it fixes
And no one seems to know what to do about it 🥲
Is there a way to get the assochiated block entity from a FurnaceInventory?
Reflection question, are static fields included in the declared fields of a class?
new RecipeChoice.MaterialChoice(material)
Wait no
You're putting in strings
its char
for the first argument
they are of course included
is the purpose of sealed classes just an alternative to final so that only specific classes can extend it?
ye
huh, makes sense ig
they are in the getFields, i’m not sure if they are in both
They are in getDeclaredFields
ok then
getDeclaredFields returns everything that actually is "declared" in that class file. That also includes private stuff, and nothing from super classes
getFields returns everything that is "accessible" from that class, which includes stuff from like super classes, but e..g. no private fields
Interesting, so then I need to do some debugging for my reflection util
private static <T> T fieldForClass(Class<T> returnType, Class<?> sourceType, Object in, int ordinal) {
int field = 0;
for(Field i : sourceType.getDeclaredFields()) {
if(i.getType().equals(returnType)) {
if(field == ordinal) {
i.setAccessible(true);
try {
HoloUI.log(Level.FINE, "[NMS] Found %s in %s#%s.", returnType.getSimpleName(), sourceType.getSimpleName(), i.getName());
return (T) i.get(in);
} catch(IllegalAccessException e) {
e.printStackTrace();
}
} else {
field++;
}
}
}
return null;
}```
Object in question is the AbstractFurnaceBlockEntity
The field being litTime
c for loop
ordinal eleven
i love how you use "field" to describe the number, and "i" to describe the field
lol
creating his own norms
Why is there even a field counter i see it
I prefer to go for int ordinals rather than having to rely on obfuscated or mapped names
he wants to do stuff like "I need the second string field in this class"
Seems unstable
yeah
how? they are always 100% accurate
Regardless, that ain't the point
The field in question here is AbstractFurnaceBlockEntity#litTime
Which should be ordinal 11
It is, however, not being found
i’m gonna assume that you have been debugging and sysouting the field names in the loop
and it actually isn’t there not just at the wrong ordinal
My InventoryCloseEvent listener doesn't seem to be working. Does anyone have a clue as to why?
registered it?
yep
this.getServer().getPluginManager().registerEvents(new PlayerDataSavingEvents(), this);
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
iirc it's called CraftingInventory, not PlayerInventory
Apologies. I have created an InventoryCloseEvent listener, and registered it. It should be fired and print "SAVED DATA" whenever a player closes their inventory, but nothing ha-
just put a sysout at the first line and you know its being called
Yep thank you.
Probably that
hmm, idk then. if the field isn’t there at all maybe you are giving the wrong object or something but idk. i’m not too hot with reflection
ordinal ten
it's the 11th field of type int, hence it's field == 10
Nope doesn't work
I'll just check if it's a player firing the event, it won't have the same effect but it doesn't matter much in this use case
Thanks though!
I detect players closing their own inventories like this
Ohhh, that makes sense. Thank you.
i’m not sure i like the != conversion. looks cool but impractical
wdym?
I've been using it for a LOT of time now, and I have to say that it's honestly even better than "!="
how do i set a block to air
by using Block#setType
the font change for not equal to
haaa, it's called "ligatures"
fair enough
sounds like a disease ahahah
it's also also >= etc
true lmao
GH copilot getting ahead of itself there
it suggested to write a comment about AdvancedChests lol
The resemblance to human lazy-talk is astounding.
how do you rotate a look vector (vec3) by an euler angle (vec3)
or euler axis
idk what its called
just 3 components for x y and z
from -1 - 1
hey, i know for the very experienced spigot developer this might be an dump question.
but when i change something in the default config programmatically, do i first use saveConfig(); or first reloadConfig(); ? because when i change something in the config it seems not to apply the changes i made via code.
you can;t just rotate one vector around another. You need an amount to rotate. You can rotate a Vector about a second Vector as an axis, but you still need an angle
eg your second Vector is {0,1,0} pointing straight up, or a Y axis. you can rotate yoru original vector around that, but you need an angle
i dont know exactly what you mean by rotate a vector around a second vector as an axis, but i want to make a vector (0, 0, 1) rotated by (1, 0, 0) to result in (1, 0, 0), if you think about the 2d plane, it would look something like this
@eternal oxide
They are, but having to hardcode spigot mappings when working with mojmap is just annoying and generally difficult to do
Espicially because the mini mapping viewer seems broken
Why doesn't this work?
@Override
public void onEnable() {
getCommand("speedrunner").setExecutor(new SpeedrunnerCommand());
getCommand("start").setExecutor(new StartCommand());
plugin.yml
Ah ok
show now.
name: PlayerCompass
version: '${project.version}'
main: com.gampis.pc.Main
api-version: 1.19
authors: [ Gampis ]
description: Manhunt type plugin
commands:
speedrunner:
description: Puts you in the speedrunner team
where did u register /start?
start ain’t registered
u didn't.
?
I'd love to know what it is
this is the only properly working mappings viewer https://nms.screamingsandals.org/1.18.1/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.html
anyone know of a file translator or a translator that keeps the format of the text? trying to translate a .yml file with languages all the ones ive found either done keep the format or create random weird characters everywhere
https://paste.md-5.net/muterocazu.cpp
Does anyone know why it's not copying my world just creating a new one?
(and to these guys that are triggered by arrow code dont click on the link)
To achieve this you would rotate around {0,1,0} with an angle of 90
but is there a way to make it work with like { 0.7, 0.1, 0.9 } as well?
new Vector(1,0,0).rotateAroundAxis(new Vector(0,1,0), 90)
i guess i could calculate each axis angle with some trig functions and use vector rotate x, y and z
yes, this is what vectors are for
not sure its 90 though. You'd have to check if you need radians
whats this
In linear algebra, a rotation matrix is a transformation matrix that is used to perform a rotation in Euclidean space. For example, using the convention below, the matrix
R
=
[
cos
θ...
is that the change of the component?
Its rotation but you still need angle θ
but i know that minecraft does something like it with the ^ ^ ^ things in commands
where you can specify like the point in a direction where x = sideways, y = up/down and z = forward/backward
relative to the look vector
ah yes
but there, when you are for example pointing to the east perfectly (look vec 1, 0, 0) and you specify ^ ^ ^5 (0, 0, 5) it results in pos vec 5, 0, 0 because you were pointing east
minecraft does that
i want to know how
I don;t know the MC internals
if that was a unit vector (0, 0, 1) it would be like rotation by a vector right
rotation by an euler angle
if(lastBlockMined.get(p.getUniqueId()).getLocation().equals(block.getLocation())) {
p.sendMessage(ChatColor.translateAlternateColorCodes('&',"&cYou cannot mine the same block twice in a row."));
e.setCancelled(true);
return;
}
lastBlockMined.put(p.getUniqueId(),block);
``` how can i handle it if .getLocation() is null?
i currently get a console error
it doesnt require an angle tho, because its taking the cos and sin of the angle and those are the components of the rotation vector i assume
so cos 90 = z / r, but since a rotation is a unit vector it should always be r = 1
and it must be sin 90 = x
so i can just plug those into all the matrices
instead of calculalting them from the angle
i hope
yes and no. You are rotating by euler so you may have an issue with ginbal lock.
lol
its basically when two axis align they weld together and you lose one axis of rotation
if you bound the values per axis between -1 and 1 it shouldnt happen right
its a nightmare with up and down. People use Quaternions to get around it.
oh no
not fucking quaternions
i just had sin and cos bro
not gonna deal with that
yeah, I hate them too. never did get my head around them
mojang matrix3f code lol
wait in this image does this transform the Z component or is it rotation around the Z axis
oh wait fuck Z is Y
ok im confgusdd
ima go outside get air and come back and suffer
Is there any event fired right before a player quits the server?
Like whilst they're still in the server but have quitted in client
still not working
pdc
1.13.2
am gonna use hashmap pdc doesnt work
bro
I literally told you that 1.13 is too old to use PDC
it was added in 1.14.1
so obviously it's "not working" in a version that doesn't even include it lol
1.13.2 only has this weird thing https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/meta/tags/CustomItemTagContainer.html
declaration: package: org.bukkit.inventory.meta.tags, interface: CustomItemTagContainer
Does ItemSpawnEvent get called whenever an item get spawned/crafted/summoned/loaded into a world?
I see, thanks.
?jd-s
I have read them , but it doesn't explain much
"Called when an item is spawned into a world"
The definition of "spawned" is what i'm trying to understand.
I use it to check it myself.
Spawn would be whenever an item is introduced into the world I imagine
I see
You can always try it and see
How could I get which play a player is facing while placing a block. I need to build a structure facing that direction based off what direction they were facing when they placed the block
+1 to that answer
I believe you can get a player's yaw or pitch, whatever is the one for left and right looking
https://paste.md-5.net/olihecicob.cpp
Hello guys i need help! I have been trying to figure out what the problem is and why its not working/copying the world probably. It would mean alot to me if you could help me bc i did everything and you guys are my last hope. Thx ^^
?tas
video
Lmao getting really mad ith mongo
BlockPlaceEvent provides a BlockFace
Or
Yes
I think is Player#getBlockFacing()
Or was something to check it
Player#getLastTwoTargetBlocks and then you compare the faces
Yeah that thing
intellij bugging out
Lmao im really hatting mongo
Im having a really stupid error hahaha the data is saving and loading correctly when server is started for the first time. But after you restart it its like all get broken
😂
2 indent supremacy
How do i make so when players are hited by other players they get their health back, but They still like take damage and take knockback.
setDamage(0)?
or like 0.000001
Check the EntityDamageByEntity and set the health to the player
lemme try that
How can I remove a custom Tag from an item's data?
PDC?
1.7.10 :/
6th person to say that
doesn't work either lmao
Lmao i dont think much people wil lhelp
?doesnt-work
what can I do there has to be a solution
You will have to check a lot
Because mostly here doesnt like legacy versions
bro
That wouldnt be happening if you where using 1.19 😙
I wanted to support my plugin from 1.8-1.19 now I accepted it that some problems can occur and decided to use 1.13 api now on 1.13 things again don't work well
nms
which versions should I support?
Alright, thank you.
1.16 up that are the most supported here
1.16 api supports - 1.19 ?
That is diff
Because each api has diff things
Let say if you want to make specific things which changes in each version there you will have to mix with NMS
Please confirm it
I'm looking at that but the transparent parameter still doesn't make much sense
transparent - Set containing all transparent block Materials (set to null for only air)
How much material is the fern in the spigot?
there are no useful tutorials for me..
I literally read so many threads about nms and stuff
nothing helped
pass a null or empty set
or pass a set of material types to ignore
NMS is something that is not really easy and if possible its better to skip it
oh its for ignoring materials okay
yes that why
so what is the best to support multiple versions except APIs
If where a spigot plugin seller/publisher i would support 1.16.5 up
how do I retrieve the block faces from that method though doesn't the getBlockFace from block take in a parameter
?
but they will change everything again if new mc versions come..
bruh spigot down again
Oh yes
Idk what happening
I think its because md5 has his credit card retained
site now working. An unexpected error occurred. Please try again later.
😂
SPIGOT IS DOWN!
We have just mention it
😂
- sorry.
How much material is the fern in the spigot?
?
this item
What?
bro got weed
Oh which is the material ?
yes
Okay because you were saying how much making reference to an amount
?
What do you need
I can help you
For listening plugin message on bungee side its an event
PluginMessageEvent
yes but, what is the material? I can't find it if I write MATERIAL.FERN
Oh i dont really know if not i would already told you
thanks🦀
ok
the ID says tallgrass, maybe try that?
And them for sending i just loop over each ServerInfo: getServers().values().foreach(server -> server.sendData(bytes here));
So I found this discussion:
https://web.archive.org/web/20190119213112/https://www.spigotmc.org/threads/how-to-remove-particles-from-block.296906/#post-2839706 (using web.archive.org because spigot is down)
How would something like that look in code?
Is there any event fired right before a player quits the server?
PlayerQuitEvent?
That's fired after they have physically quit
Oh i dont think there is another
Ah, pain. Thanks.
Spanish?
there server doesn't know the player is going to leave until they actually tell the server they are quitting
Yeah that why
Portuguese, how'd you guess that I was from around there?
Where did you get your weed?
this screenshot
hahaha i suppouse because of the "ah" word
Makes sense, lol.
Im native spanish speaker also haha
i need it only send back, on server where locate player
What?
You can send the plugin message with the uuid of the player, on bungee get the ProxyPlayer, then get the ServerInfo
And send data back
event.getSender().getServer().sendData(bytes)
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/CreatureSpawner.html#setRequiredPlayerRange(int)
Though a value of zero is just always on so I'm not entirely sure what that user was talking about.
CreatureSpawner spawner = (CreatureSpawner) block.getState();
spawner.setRequiredPlayerRange(1);
spawner.update();```
To see if a player is shielded in the EntityDamageByEntity, I should compare the finalDamage to 0, right?
now i have this
Is this conditon okay?
https://paste.md-5.net/olihecicob.cpp
Hello guys i need help! I have been trying to figure out what the problem is and why its not working/copying the world probably. It would mean alot to me if you could help me bc i did everything and you guys are my last hope. Thx ^^
If a damage is from back
I think someoe send a code for copying worlds
It gets called anyways
Check if event.getSender() doesnt contain a getUuniqueId() method
that can be replaced by args.length >= NumberWhatYouNeed and switch;
nope
Im already using a switch
🤪
Let me send full command
PendingConnection extends Connection
Because its telling me the usage message all time
where
On this channel
wtf dude
you are checking the equals of args without ignoreCase
and sends it next
the webiste got an database error
Website is worldwide down
Are block sounds when placed fully client side or is there a way I can stop them from sending and send a different sound instead
ok
if args[0] equals Add/ADD or smth like this, but not add
why?
replace 8 line on
if (args.length < 2) {
on 1.8 its server side but its client side on later versions
damn only if I were using a wildly outdated version
yep
1.18.2 😢
put 17-21 lines in try/catch and send error in catch
Ok i wil ltru
also replace return false; on return true;. You printing custom error, you needn't display error from plugin.yml
?
No error on pluginy,ml
that its weird
i cant acces the website..
return true; shows nothing
omg, write it again
but where lol
texture pack with empty block place sounds 👀
why bruh
idk why spigot devs do things reallly diff
If was server side why did you change it!
🤔
stopping sounds is fucked function
Mojang probably changed it
it stops sounds before Nms of playing it
wha
And, it makes sense to have the sounds client sided honestly.
Are they not??
They are
then wtf this about or am i hopping in without enough context
hey```package knockbackffa.knockbackffa;
import org.bukkit.GameMode;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerToggleSprintEvent;
public class EntityDamage implements Listener {
public void onPlayerEntityDamage(EntityDamageByEntityEvent e) {
Player player = (Player) e.getEntity();
player.setHealth(20);
}
}
Server doesnt keep track of the sounds currently playing 🤔
Just sends a packet with the sound string
is that right?
cause it did not work
almost
you forgot @EventHandler annotation
yea not really worth the effort with my current project maybe I will do this when I touch up everything, thanks for the advice though
you were 🤏 close
Either i forget to register it or i forget to do that
All good i did same thing when first learning the spigot api
Is there a way to convert an NMS ItemStack to a bukkit ItemStack?
Should be able to getCraftItemStack or similar
NMS entity has getBukkitEntity
so maybe getBukkitStack, or similar?
also cancel event if you want get rid of attack sound and effect
who is ghost pinging me?
I see, i'll check, thank you.
I receive tags join here and dont see them
no one ghost pinged you in the past 5 mins here
I dont know a big red nubmer appear on the channel
Which line?
weird
thats all reflection
Oh the replys tag you?
its not actually NMS
And where :)!?
🤪
mojang remappings right
CraftItemStack#asBukkitCopy
dude's on 1.7.10
do you really think mojmappings exist
for that version
Desie
what the fuck dessie
wot
wtf
I am not on 1.7.10
and who?
kelpy
lmao
not dessie
I use 1.19 with mojmaps 😢
Yes?
what the fuck kelpy
pervert
lol wtf
bro your not hrlping me xd lmfao
upgrade that shit
8th person: It's not a personal choice, it's a client requirement.
find a new client
poor client
are you serious
man's devving for hypixel or some shit
?1.8
Too old! (Click the link to get the exact time)
9th person
it will continue
I don't blame him
Agree
Figured it, but thank you.
Indee rack
I interviewed for hypixel myself and the code challenges used 1.7 nms
tbh its rare
WAS THAT EXISTS?
That should just kick them from the server
i agree
1.7.10 isn't even spigot afaik
me2
just craftbukkit
Yeah 1.1.10 isnt from spigot
kick it any user with version under than 1.19
1.16.5*
1.19)
Not only 1.19
1.19 == s**ht
1.19.1: /me exists
Isn't 1.19.1 out now
1.16.5 >>> 1.19
good joke
write yourself code and http://tryitands.ee how it be works
Not as bad as the time when SO was down
Was wild.
🤪
Oh that was the video
???????
To do what
? + tas
The command is ?tas isn't it?
?tas
Probably because they didn't want it cluttering the channel with embeds
idlers
dont joke
spigot down rn?
Yes
yes
Down for 1h or more
Can smone pls help me im trying to copy a world but it doesnt work/copy it probably. Do you have any idea why? I tried severtal thinks but none worked D: LG
https://paste.md-5.net/olihecicob.cpp
i think the website is down because md5 has his credit card retained
why tho
no, it's working, but database broken
not loading for me
🤪
And they are trying to fix it ? I IMagine
don't think so
Because i must need webite up for next 3hrs or more
md_5 in offline
I really need to finish something
An unexpected database error occurred. Please try again later.
And its impoible ith wbesite down
How is it impossible with the website down?
md55 pingm omment
oh god, leave outside
@sullen marlin sorry for pinging but webite is down with a database problem thanks
what do you need?
reminder to all devs: go take a shower, maybe spigot will be back up by the time you come back
hahaha
While at it, touch some grass maybe
Are you wondering to die?
:p
Spigot devs doent take grass not even paid
genius
make me 
but all my spigots was broken
check if your backyard's spigot is working
make a graph of working:non-working spigots
i haven't backyard
🦀
discord needs to touch some grass as well
now i need listen and send data from spigot
i love mixins!
spent 6 days debugging
just to discover
that a simple System.setOut to receive data from some other mods
fucked me up
wtf
?tas
thank you
then, can you check player's mod list?
well ofc u can
in a forge mod tho
im not doing spigot
i can just go to mc directory

because
genius
thanks for reminder
Hex wtf
why every other day your a booster and every other other day you are
ah, i was wrong. that better
is spigot up?
yup
Okay so i want to clear players inventory right before they die, problem is that it wont work
import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerToggleSprintEvent;
public class PlayerDeath implements Listener {
@EventHandler
public void onPlayerDeath(PlayerDeathEvent e) {
Player player = e.getEntity().getPlayer();
player.getInventory().clear();
player.updateInventory();
player.sendMessage(ChatColor.GOLD + "KnockbackFFA: " + ChatColor.GRAY + "You have died!" );
}
}
why are you cleaning it?
and why player.getinvenory.clear?
use e.getDrops().clear()
read spigot api
+1 to that answer
Will do
Have you read the basics about java?
That its really important, tho
you can't google how to clear drops in PlayerDeathEvent ?
Agree
?jd-s
I started writing plugins without the slightest knowledge about java🤪
but, before year or two, I succeeded in this
Does anyone have any experience with the JeffLib? It seems that my armour slots aren't getting decoded from b64
I know but that is how you must do it, because then you are like me
A really unseusfull dev which doesnt mainly know about java itself
🤡
How can I save a List<Map<>> into YAML? I found FileConfiguration.getMapList() but I can't figure out how to save it there.
I don't see where the solution is, nor any useful information
with practice, you realize and learn everything you need.
My issue is that the armour slots aren't getting decoded
use urself encoding&decoding
?not work
Eh, alright, thank you.
I'm already using FileConfiguration.createSection() and FileConfiguration.getSection() for a Map<> but I couldn't find how to make that work for a List<Map<>> or if you needed to do something else for that
Why need a list map?
The goal is to have a list with ~2 key-value pairs and couldn't think of a better way to do it? It could just be a List<List<>> I guess, but that would be less understandable
You need something like this?
Users:
uuid-here:
name: "bla"
coins: 10
other-uuid:
name: "bla"
coins: 20
Yeah something like that
Not users though
Just treat Users as section and each key ("uuid-here", "other-uuid") as other section
I would do that
When im compiling my plugin i get this error
Failed to delete C:\Users\Amir\IdeaProjects\KnockBackFFA\target\maven-status\maven-compiler-plugin\testCompile\default-testCompile
Is there a way to not have those keys? I don't need them and I'd rather not if its not a pain to do
What do you nee dto save?
If it confident send me a dm
I'm trying to save a number and a string, related to each other but nothing else.
One second
Users is a section and each "uuid-here and other-uuid" are child sections
I'd rather have yaml like this if possible ```yml
schedules:
- time: 13047
command: help - time: 3600
command: tps
Its valid yaml that does what I want, I just don't know how to make it in the code.
getMapList -> List<Map<?,?>>
Images still not working on spigot
?
Still not loading
How would I save it though?
Having a list of ConfigurationSections should work
^
How so?
Conclure you are alive
I am
Its tellin me that target is always null
Try to clean your browser cache
Bro spigot images are not getting loaded o nthe website
@lost matrix back again.... 😓
Caused by: java.lang.NoSuchMethodError: 'java.util.UUID com.squallz.testbee.CustomBee.cp()'
at com.squallz.testbee.CustomBeeListener.join(CustomBeeListener.java:51) ~[?:?]
@EventHandler
public void join(PlayerJoinEvent event) {
Player player = event.getPlayer();
ServerLevel world = ((CraftWorld) player.getLocation().getWorld()).getHandle();
CustomBee customBee = new CustomBee(player.getLocation(), ColorUtil.color("Bee"), true);
world.tryAddFreshEntityWithPassengers(customBee);
testbee.setBeeUUID(Bukkit.getEntity(customBee.getUUID()), customBee.getBukkitEntity().getUniqueId());
}
Line 51 is testbee.setBeeUUID(Bukkit.getEntity(customBee.getUUID()), customBee.getBukkitEntity().getUniqueId());
public void setBeeUUID(org.bukkit.entity.Entity bee, UUID uuid) {
NamespacedKey beeUUIDKey = new NamespacedKey(this, "bee-uuid");
bee.getPersistentDataContainer().set(beeUUIDKey, PersistentDataType.STRING, uuid.toString());
}
Sorry how would I do that?
Sure that that is the issue?
OfflinePlayer is never null
Yes
Intellij tell me that
🤡
I think it weird
Why does Player#setCollidable() not stop colliding
(API Version: 1.16)
Bukkit has no Contract annots, so you Made a misidentification
Me?

