#help-development

1 messages · Page 30 of 1

tender robin
#

getPersistentDataContainer() and PersistentDataType has a red underline

tender shard
#

and what does it say?

#

probably you are using 1.8 and expect it to have new features

young knoll
#

Or 1.12

tender shard
#

or 1.7.10

tender robin
#

1.13

tender shard
#

PDC was added in 1.14.1

tender robin
#

ughh

tender shard
#

also who tf still uses 1.13 lol

tender robin
#

1.13 api

subtle folio
tender shard
#

but yeah, PDC is 1.14.1+

#

there is something similar in 1.13

#

erm

#

?pdc

tender shard
#

it's explained in the beginning of that post

tender robin
#

ok

tall dragon
#

this is so bigbrain

#

to detect jumps like this

tender shard
#

is this a joke

#

lol

tall dragon
#

i mean it could work no?

#

or does it not

tender shard
#

it does work totally fine

young knoll
#

Mostly

tender shard
#

only problem is that the "getTo" location will not be 100% accurate

young knoll
#

I hear it’s still a bit jank around ladders and stuff

tall dragon
#

yea make sense

tender shard
#

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, ...

tall dragon
#

i dont rlly understand why spigot hasnt implemented a PlayerJumpEvent like paper

tender shard
#

or an armorequipevent

young knoll
#

Because jumping isn’t server side

tall dragon
#

i mean the server has to know about the player jumping

young knoll
#

Just a movement packet afaik

tender shard
#

from what I know, the client simply sends the new coordinates to the server lol

tall dragon
#

how did paper implement this event then

tender shard
#

so there isn't really a "jump" packets, only "i am now in the air lmao" packet

tender shard
tall dragon
#

that woulnt wqrk with ladders and stuff tho

tender shard
#

this is the full code that paper uses

flint coyote
#

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

tall dragon
#

if a player is on a ladder will #isOnGround return true?

gray merlin
#

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?

chrome beacon
#

Paper are using the same checks as vanillas jump statistic iirc

young knoll
#

Probably

tender shard
young knoll
#

Which is basically just the statistic event

tender shard
#

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 ","

crude patio
#

Hello guys, how are you? Sorry to interrupt, can i ask something?

tender shard
#

?ask

undone axleBOT
#

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!

tender shard
#

sure 😛

gray merlin
crude patio
#

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

young knoll
#

Well yeah, they’re going to keep trying to trigger the plate

chrome beacon
#

Add a cooldown on that message

tardy delta
#

or dont send it at all :)

crude patio
#

im making that for a parkour plugin with checkpoints

young knoll
#

Launch them off the plate into space

crude patio
#

so i need to send a message and i cant add cooldown :(

#

xdd

chrome beacon
#

Just send a message when the checkpoint is saved

charred blaze
#

public void onJoin(PlayerHandshakeEvent e) {
e.getConnection().getName()
}

chrome beacon
#

and only saved if it hasn't been saved before

charred blaze
#

what does this returns?

tender shard
#

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?

charred blaze
tardy delta
#

no

chrome beacon
tardy delta
#

check what getConnection returns and the impl and check docs for getName

crude patio
tender shard
chrome beacon
#

If you feel it's a dirty method then parse it

charred blaze
#

so it returns player's username?

tender shard
tender shard
#

I am like 99.9% sure that it's always just the same thing except the URL

chrome beacon
#

Yeah

tender shard
#

then I'll just substring it

tardy delta
#

"user logging in into the proxy" so getName() would return the players name

charred blaze
tardy delta
#

handshake would refer to the player requesting login or smth ig

charred blaze
tardy delta
#

idk

tender shard
#

sooo

#

yeah

#

there's a ton of events when joining lol

charred blaze
tender shard
#

because there is no player object yet

charred blaze
tender shard
#

oh

#

wrong link

charred blaze
#

whats in arg0?

charred blaze
#

kick message?

tender shard
charred blaze
#

'-'

tender shard
#

it's all explained here

vocal mirage
#

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

cunning canopy
#

at miklath.sheepstack.Sheepstack.<init>(Sheepstack.java:17) ~[?:?]

#

this means the errir us caused at line 17 right?

#

error

ornate mantle
#

whats the HandlerList and how am i meant to use it

#

what would be some use cases for HandlerList

#

while creating a new Event

chrome beacon
#

?event-api

undone axleBOT
ornate mantle
#

epic

tender shard
#

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

cunning canopy
#

I think this line is giving me Index out ouf bounds

#

private final World world = Bukkit.getServer().getWorlds().get(0);

#

would that make sense?

tender shard
#

erm normally you always have at least one world loaded

#

show the full stacktrace

cunning canopy
#

?paste

undone axleBOT
cunning canopy
tender shard
#

send your full Sheepstack class pls

#

seems like you're getting a world too early

#

e.g. before it gets loaded

cunning canopy
#

?paste

undone axleBOT
tender shard
#

did you set LOAD to STARTUP in plugin.yml?

cunning canopy
#

oh heck

#

im so dumb

#

it needs to be in startup fucntion right?

tender shard
#

just set "world" to null, then in onEnable do Bukkit.getServer().getWorlds().get(0)

cunning canopy
#

thanks

tender shard
#

np

cunning canopy
#

how did I not realise that

cunning canopy
tender shard
#

yep

gray merlin
#

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?

tender shard
#

what's the DataFolder field?

gray merlin
tender shard
#

try to do getDataFolder().mkDirs()

gray merlin
#

And it's what happens on my pc

#

But i'll try to do so too, then. One sec.

small current
#

Random.nextInt(100)

#

can generate an int

#

that can be 1 and 100 ? and between it

#

and not 0 ?

tender shard
#

no

#

it'll be 0, ... 99

#

will never be 100

small current
#

so its 0 to 99 ?

tender shard
#

yeah

small current
#

so a Random.nextInt(1-101)

young knoll
#

If you want 1-100

small current
#

ok thanks

young knoll
#

Random.nextInt(100) + 1

tender shard
#

^

gray merlin
#

@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!

tender shard
#

files in java are weird

gray merlin
#

true

cunning canopy
#

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

reef lagoon
#

how do I get a material by a number ( For example 15 for wool)

young knoll
#

Ew legacy

#

Honestly I don’t even remember

reef lagoon
#

well im trying to get a random item so what's a better way than random number and get an item from that

young knoll
#

At startup make a list of all materials where .isItem is true

#

And then get a random value from that

tender shard
young knoll
#

That will get you a bunch of junk

#

Including stuff that isn’t valid as an item

reef lagoon
young knoll
#

There is

tender shard
#

yeah just filter out the junk items beforehand

young knoll
#

It’s called a loop

tender shard
#

e.g. using a Set<Material>

young knoll
#

Or a stream if you want to be fancy

reef lagoon
cunning canopy
#

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

young knoll
#

Your world doesn’t exist

cunning canopy
#

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

young knoll
#

barrier is a location

#

With an invalid world

cunning canopy
#

what?

#

then

#

how do I fix it?

#

cause im pretty sure there is a world

young knoll
#

Idk, make sure the world exists

#

And is loaded

cunning canopy
#

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

young knoll
#

?paste

undone axleBOT
young knoll
#

Show the actual code, not just one line

tender shard
#

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()));
    }
cunning canopy
twilit pulsar
#

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?

young knoll
cunning canopy
#

oh

#

thanks

tender shard
#

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

lofty cedar
#

Hello someone could help me to have a seed plenter plugin compatible with
minecraft:carrot_on_a_stick{CustomModelData:1}

balmy valve
#

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() ?

tender shard
#

fuck you github >.<

tender shard
balmy valve
#
            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 🤷‍♂️

lofty cedar
#

and for me pls

balmy valve
vocal mirage
#

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.

full holly
#

Is there any way to block/remove the "Spawnpoint set" message if you're entering a new bed?

vocal cloud
lofty cedar
#

Hello someone could help me to have a seed plenter plugin compatible with
minecraft:carrot_on_a_stick{CustomModelData:1}

vocal cloud
#

What

vocal mirage
vocal cloud
#

Then I fail to see the concern

severe turret
#
  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);
  }```
vocal mirage
severe turret
#

liket his?

lofty cedar
#

Hello someone could help me to have a seed plenter plugin compatible with
minecraft:carrot_on_a_stick{CustomModelData:1}

vocal cloud
lofty cedar
vocal mirage
vocal cloud
vocal cloud
lofty cedar
#

"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"

vocal cloud
vocal cloud
#

Thank God for disabled embeds

balmy valve
vocal cloud
#

Don't you have to send a block update after modifying data?

#

?jd-s

undone axleBOT
onyx fjord
#

does spigot ship apache-commons-configuration?

tardy delta
#

is there a Map<K, V, V2> impl?

chrome beacon
#

Make a record uwu

#

and store that

tardy delta
#

oh ye records exist too

onyx fjord
#

great

opal juniper
#

why do you want that kacper

onyx fjord
#

evil stuff

#

its funny how easy it is to delete .properties file accidently lol

iron glade
#

Images on resource pages not loading for anyone else here?

onyx fjord
#

load for me

iron glade
#

hmm

quaint mantle
#

?services

undone axleBOT
tardy delta
#

would be useful sometimes if there were mutable variants of records

iron glade
#

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

tardy delta
#

what images

#

anyways how would i call a record that holds the current progress and level of a skill?

#

SkillSnapshot?

iron glade
tardy delta
#

i called my class which holds the skillsmap SkillData so cant use that lmfao

fiery prairie
#

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
tardy delta
#

bruh whats this

opal juniper
#

your git user?

tardy delta
#

lombok 🥺

opal juniper
#

i’m not a fan, but would work

tardy delta
#

ugh do i know any password

#

have no idea what to fill in there

#

oh doesnt need password

opal juniper
#

no… lol

vocal mirage
halcyon mica
#

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

delicate lynx
#

guessing the player doesn't have the correct permission if it's not displaying the hey message

delicate lynx
#

make sure the permission node is being correctly assigned in your plugin.yml

#

make sure it's default is set to op

fiery prairie
#

i mean i only register the command

delicate lynx
#

that's my guess at least

fiery prairie
#

but instead of doing permission in plugin.yml

#

i check the permission in the code

#

allowing me to set my own no-perms msg

tardy delta
zenith saddle
#

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.

tender shard
#

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)

tardy delta
balmy valve
#

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 🥲

halcyon mica
#

Is there a way to get the assochiated block entity from a FurnaceInventory?

tender shard
#

getHolder()

#

returns the blockstate / furnace

halcyon mica
#

Reflection question, are static fields included in the declared fields of a class?

quaint mantle
#

new RecipeChoice.MaterialChoice(material)

#

Wait no

#

You're putting in strings

#

its char

#

for the first argument

opal juniper
#

is the purpose of sealed classes just an alternative to final so that only specific classes can extend it?

quaint mantle
#

ye

opal juniper
#

huh, makes sense ig

halcyon mica
#

Hm

#

So then I am wondering why my reflection util is not working

opal juniper
quaint mantle
#

They are in getDeclaredFields

opal juniper
#

ok then

tender shard
#

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

halcyon mica
#

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

halcyon mica
#

ordinal eleven

tender shard
#

i love how you use "field" to describe the number, and "i" to describe the field

#

lol

opal juniper
#

creating his own norms

quaint mantle
#

Why is there even a field counter i see it

halcyon mica
#

I prefer to go for int ordinals rather than having to rely on obfuscated or mapped names

tender shard
halcyon mica
#

So is using mapped names

#

¯_(ツ)_/¯

tender shard
tender shard
halcyon mica
#

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

opal juniper
#

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

halcyon mica
#

Yes, that is correct

#

1.19.1, btw

gray merlin
#

My InventoryCloseEvent listener doesn't seem to be working. Does anyone have a clue as to why?

tardy delta
#

registered it?

gray merlin
#
this.getServer().getPluginManager().registerEvents(new PlayerDataSavingEvents(), this);
tender shard
undone axleBOT
#

"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.

tender shard
#

iirc it's called CraftingInventory, not PlayerInventory

gray merlin
tardy delta
#

just put a sysout at the first line and you know its being called

gray merlin
#

Probably that

opal juniper
#

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

tender shard
#

it's the 11th field of type int, hence it's field == 10

gray merlin
#

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!

tender shard
gray merlin
#

Ohhh, that makes sense. Thank you.

opal juniper
tender shard
#

wdym?

gray merlin
naive bolt
#

how do i set a block to air

tender shard
#

by using Block#setType

opal juniper
tender shard
opal juniper
tender shard
#

it's also also >= etc

tender shard
opal juniper
gray merlin
#

Copilot's amazing

#

But yes

tender shard
#

it suggested to write a comment about AdvancedChests lol

gray merlin
glossy venture
#

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

quaint mantle
#

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.

eternal oxide
#

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

glossy venture
#

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

halcyon mica
#

Espicially because the mini mapping viewer seems broken

opal juniper
#

it’s cause it’s not the best anymore

#

i forget the alternative

runic island
#

Why doesn't this work?

    @Override
    public void onEnable() {
        getCommand("speedrunner").setExecutor(new SpeedrunnerCommand());
        getCommand("start").setExecutor(new StartCommand());
reef lagoon
#

plugin.yml

runic island
#

Ah ok

reef lagoon
#

show now.

runic island
#
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
  

reef lagoon
#

where did u register /start?

opal juniper
#

start ain’t registered

reef lagoon
#

u didn't.

halcyon mica
opal juniper
#

screamingsandals iirc

halcyon mica
#

Damn

#

There even is a gradle plugin

dry forum
#

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

azure hawk
eternal oxide
glossy venture
#

but is there a way to make it work with like { 0.7, 0.1, 0.9 } as well?

eternal oxide
#

new Vector(1,0,0).rotateAroundAxis(new Vector(0,1,0), 90)

glossy venture
#

i guess i could calculate each axis angle with some trig functions and use vector rotate x, y and z

eternal oxide
#

yes, this is what vectors are for

#

not sure its 90 though. You'd have to check if you need radians

glossy venture
#

whats this

#

is that the change of the component?

eternal oxide
#

Its rotation but you still need angle θ

glossy venture
#

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

eternal oxide
#

doesn;t paste well

#

Thsi is what you are doing. It still requires an angle

glossy venture
#

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

eternal oxide
#

I don;t know the MC internals

glossy venture
#

if that was a unit vector (0, 0, 1) it would be like rotation by a vector right

#

rotation by an euler angle

naive bolt
#
    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

glossy venture
#

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

eternal oxide
#

yes and no. You are rotating by euler so you may have an issue with ginbal lock.

glossy venture
#

bruh

#

idk what that is

#

but sounds bruh

eternal oxide
#

lol

glossy venture
#

also idk how to do matrix math in java wiith the mojang math lib

#

wtf

eternal oxide
#

its basically when two axis align they weld together and you lose one axis of rotation

glossy venture
#

if you bound the values per axis between -1 and 1 it shouldnt happen right

eternal oxide
#

its a nightmare with up and down. People use Quaternions to get around it.

glossy venture
#

oh no

#

not fucking quaternions

#

i just had sin and cos bro

#

not gonna deal with that

eternal oxide
#

yeah, I hate them too. never did get my head around them

glossy venture
#

mojang matrix3f code lol

glossy venture
#

oh wait fuck Z is Y

#

ok im confgusdd

#

ima go outside get air and come back and suffer

gray merlin
#

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

tender robin
#

pdc

#

1.13.2

#

am gonna use hashmap pdc doesnt work

tender shard
#

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

gray merlin
#

Does ItemSpawnEvent get called whenever an item get spawned/crafted/summoned/loaded into a world?

#

I see, thanks.

vocal cloud
#

?jd-s

undone axleBOT
gray merlin
#

"Called when an item is spawned into a world"

#

The definition of "spawned" is what i'm trying to understand.

vocal cloud
#

I use it to check it myself.

#

Spawn would be whenever an item is introduced into the world I imagine

gray merlin
#

I see

vocal cloud
#

You can always try it and see

river oracle
#

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

sterile token
delicate lynx
#

I believe you can get a player's yaw or pitch, whatever is the one for left and right looking

azure hawk
#

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 ^^

dusk flicker
undone axleBOT
sterile token
#

Or a video

dusk flicker
#

video

sterile token
#

Lmao getting really mad ith mongo

echo basalt
#

Or

sterile token
#

I think is Player#getBlockFacing()

#

Or was something to check it

echo basalt
#

Player#getLastTwoTargetBlocks and then you compare the faces

sterile token
echo basalt
#

intellij bugging out

sterile token
#

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

#

😂

severe turret
#

2 indent supremacy

twilit pulsar
#

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.

sterile token
gray merlin
#

How can I remove a custom Tag from an item's data?

gray merlin
#

1.7.10 :/

sterile token
#

Get out from there

gray merlin
#

6th person to say that

sterile token
#

Lmao i dont think much people wil lhelp

sterile token
tender robin
#

what can I do there has to be a solution

sterile token
#

Because mostly here doesnt like legacy versions

tender robin
#

bro

sterile token
#

That wouldnt be happening if you where using 1.19 😙

tender robin
#

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

sterile token
#

That why

#

Dont support legacy versions!

#

I tell you as personal opinion

tender robin
gray merlin
sterile token
tender robin
#

1.16 api supports - 1.19 ?

sterile token
#

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

river oracle
sinful rapids
#

How much material is the fern in the spigot?

tender robin
#

I literally read so many threads about nms and stuff

#

nothing helped

echo basalt
#

or pass a set of material types to ignore

sterile token
river oracle
#

oh its for ignoring materials okay

sterile token
tender robin
#

so what is the best to support multiple versions except APIs

sterile token
#

If where a spigot plugin seller/publisher i would support 1.16.5 up

river oracle
echo basalt
#

it returns 2 blocks

#

block.getFace(other)

river oracle
#

okay

#

thanky ou

tender robin
echo basalt
#

bruh spigot down again

sterile token
#

Idk what happening

#

I think its because md5 has his credit card retained

novel glade
#

site now working. An unexpected error occurred. Please try again later.

sterile token
#

😂

sterile token
#

We have just mention it

#

😂

novel glade
sterile token
#

Sorry for me

#

I was rude

#

Im really stressed my bad

sinful rapids
#

How much material is the fern in the spigot?

sinful rapids
#

this item

sterile token
#

What?

delicate lynx
#

bro got weed

sterile token
#

Oh which is the material ?

sterile token
#

Im really stressed

sinful rapids
sterile token
quaint mantle
#

i need to see the bungee plugin messaging

#

but site upside down(

sterile token
#

What do you need

#

I can help you

#

For listening plugin message on bungee side its an event

#

PluginMessageEvent

sinful rapids
sterile token
quaint mantle
delicate lynx
#

the ID says tallgrass, maybe try that?

sterile token
# quaint mantle thanks🦀

And them for sending i just loop over each ServerInfo: getServers().values().foreach(server -> server.sendData(bytes here));

slender widget
gray merlin
#

Is there any event fired right before a player quits the server?

sterile token
gray merlin
sterile token
gray merlin
#

Ah, pain. Thanks.

sterile token
delicate lynx
#

there server doesn't know the player is going to leave until they actually tell the server they are quitting

gray merlin
delicate lynx
sterile token
gray merlin
sterile token
#

Im native spanish speaker also haha

quaint mantle
sterile token
#

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

quaint mantle
#

good idea

#

but there is event.getSender()

sterile token
#

I didnt remember

quaint mantle
#

simply cast to PendingConnection

#

and all problems are solved

sterile token
#

event.getSender().getServer().sendData(bytes)

quaint mantle
#

it's for ProxiedPlayer

worldly ingot
vast raven
#

To see if a player is shielded in the EntityDamageByEntity, I should compare the finalDamage to 0, right?

quaint mantle
sterile token
#

Is this conditon okay?

azure hawk
#

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 ^^

vast raven
#

If a damage is from back

sterile token
vast raven
#

It gets called anyways

sterile token
quaint mantle
sterile token
quaint mantle
sterile token
#

Let me send full command

quaint mantle
sterile token
#

Because its telling me the usage message all time

sterile token
#

Its falling on line 19

sterile token
quaint mantle
#

you are checking the equals of args without ignoreCase

#

and sends it next

molten fable
#

the webiste got an database error

warm patio
river oracle
#

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

molten fable
#

ok

quaint mantle
#

why?

#

replace 8 line on

if (args.length < 2) {
crisp steeple
river oracle
crisp steeple
#

yep

river oracle
#

1.18.2 😢

quaint mantle
sterile token
quaint mantle
sterile token
#

No error on pluginy,ml

#

that its weird

quaint mantle
#

not that, sorry

#

return false; in CommandSender shows you usage line

worn sigil
#

i cant acces the website..

quaint mantle
#

return true; shows nothing

quaint mantle
azure hawk
echo basalt
sterile token
#

idk why spigot devs do things reallly diff

#

If was server side why did you change it!

#

🤔

quaint mantle
#

stopping sounds is fucked function

hasty prawn
quaint mantle
#

it stops sounds before Nms of playing it

noble lantern
#

wha

hasty prawn
#

And, it makes sense to have the sounds client sided honestly.

noble lantern
#

Are they not??

hasty prawn
#

They are

noble lantern
twilit pulsar
# sterile token Check the EntityDamageByEntity and set the health to the player

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);

} 


}
noble lantern
#

Server doesnt keep track of the sounds currently playing 🤔

#

Just sends a packet with the sound string

twilit pulsar
#

cause it did not work

noble lantern
#

you forgot @EventHandler annotation

twilit pulsar
#

Im so dumb

#

i always forget that

river oracle
noble lantern
#

you were 🤏 close

twilit pulsar
#

Either i forget to register it or i forget to do that

noble lantern
#

All good i did same thing when first learning the spigot api

gray merlin
#

Is there a way to convert an NMS ItemStack to a bukkit ItemStack?

noble lantern
#

NMS entity has getBukkitEntity

#

so maybe getBukkitStack, or similar?

quaint mantle
sterile token
#

who is ghost pinging me?

gray merlin
#

I see, i'll check, thank you.

sterile token
#

I receive tags join here and dont see them

quaint mantle
noble lantern
#

no one ghost pinged you in the past 5 mins here

sterile token
noble lantern
sterile token
#

Oh the replys tag you?

noble lantern
#

its not actually NMS

azure hawk
quaint mantle
sterile token
#

Someone send a code yesterday

noble lantern
hasty prawn
noble lantern
#

figured it was something like that

#

was just about to open my ide kek

echo basalt
#

do you really think mojmappings exist

#

for that version

dusk flicker
#

wait wait wait

#

whos on 1.7.10

sterile token
dusk flicker
#

what the fuck dessie

hasty prawn
#

wot

quaint mantle
hasty prawn
#

I am not on 1.7.10

azure hawk
echo basalt
#

kelpy

dusk flicker
#

lmao

echo basalt
#

not dessie

hasty prawn
#

I use 1.19 with mojmaps 😢

gray merlin
dusk flicker
#

what the fuck kelpy

quaint mantle
#

pervert

echo basalt
#

lol wtf

azure hawk
#

bro your not hrlping me xd lmfao

dusk flicker
#

upgrade that shit

gray merlin
dusk flicker
#

find a new client

echo basalt
#

poor client

noble lantern
dusk flicker
#

8 years, 1 month and 5 days old

echo basalt
#

man's devving for hypixel or some shit

sterile token
#

?1.8

undone axleBOT
gray merlin
dusk flicker
#

it will continue

echo basalt
#

I don't blame him

dusk flicker
#

?1.7.10

#

need that

sterile token
#

Agree

gray merlin
sterile token
#

Indee rack

echo basalt
#

I interviewed for hypixel myself and the code challenges used 1.7 nms

dusk flicker
#

tbh its rare

quaint mantle
dusk flicker
#

yeah

hasty prawn
dusk flicker
#

i agree

echo basalt
#

1.7.10 isn't even spigot afaik

sterile token
echo basalt
#

just craftbukkit

sterile token
#

Yeah 1.1.10 isnt from spigot

quaint mantle
sterile token
quaint mantle
sterile token
#

Not only 1.19

sterile token
quaint mantle
hasty prawn
#

Isn't 1.19.1 out now

sterile token
#

1.16.5 >>> 1.19

quaint mantle
sterile token
#

When is sh** forum getting up?

#

I really need to search some data there

#

😡

echo basalt
#

1.12 is decent but the api hurts

#

performance tho

quaint mantle
gray merlin
#

Was wild.

quaint mantle
#

🤪

sterile token
quaint mantle
sterile token
#

I will have to ping conclure to do it

hasty prawn
#

To do what

quaint mantle
hasty prawn
#

The command is ?tas isn't it?

gray merlin
#

I see.

sterile token
#

?tas

undone axleBOT
sterile token
#

but it display an ugly url

#

It used to display the video directly

quaint mantle
#

it didn't display video(

#

simply link sending is better

hasty prawn
#

Probably because they didn't want it cluttering the channel with embeds

iron glade
#

spigot down rn?

hasty prawn
#

Yes

lament sorrel
sterile token
azure hawk
#

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

sterile token
#

i think the website is down because md5 has his credit card retained

iron glade
quaint mantle
iron glade
#

not loading for me

quaint mantle
#

🤪

sterile token
quaint mantle
sterile token
#

Because i must need webite up for next 3hrs or more

quaint mantle
#

md_5 in offline

sterile token
#

I really need to finish something

molten fable
#

An unexpected database error occurred. Please try again later.

sterile token
#

And its impoible ith wbesite down

hasty prawn
#

How is it impossible with the website down?

sterile token
#

md55 pingm omment

quaint mantle
sterile token
#

@sullen marlin sorry for pinging but webite is down with a database problem thanks

quaint mantle
echo basalt
#

reminder to all devs: go take a shower, maybe spigot will be back up by the time you come back

iron glade
#

hahaha

echo basalt
#

While at it, touch some grass maybe

sterile token
echo basalt
#

:p

sterile token
#

Spigot devs doent take grass not even paid

quaint mantle
#

but all my spigots was broken

echo basalt
#

check if your backyard's spigot is working

#

make a graph of working:non-working spigots

hybrid spoke
#

what is this grass

#

i only know weed

#

is it the same thing?

quaint mantle
echo basalt
quaint mantle
echo basalt
#

discord needs to touch some grass as well

hasty prawn
quaint mantle
#

now i need listen and send data from spigot

grim ice
#

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

grim ice
#

also koto

#

ur pfp and banner

#

are

#

AWESOME

sterile token
#

?tas

undone axleBOT
grim ice
#

nazunaaaaaaa chaaaaaaaaan

#

anyywas

quaint mantle
quaint mantle
grim ice
#

in a forge mod tho

#

im not doing spigot

#

i can just go to mc directory

quaint mantle
grim ice
#

go to mods folder

#

and get the files there

quaint mantle
#

it is spigot server

#

why are you there?

#

WHY ARE YOU USING FORGE?

grim ice
#

because

quaint mantle
#

genius

noble lantern
#

Hex wtf

#

why every other day your a booster and every other other day you are

grim ice
#

hmm

#

depends on the mood yk

noble lantern
#

ahh

#

fair fair

sterile token
#

Who is tagging me bruh

#

Stop being painfulll

#

😡 😡 😡 😡

quaint mantle
sterile token
quaint mantle
sterile token
#

allr

#

thanks

twilit pulsar
#

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!" );

    }


}

quaint mantle
#

and why player.getinvenory.clear?

#

use e.getDrops().clear()

twilit pulsar
#

im sorry

#

im pretty new to minecraft dev 🙂

quaint mantle
sterile token
twilit pulsar
#

Will do

quaint mantle
#

lol

#

then

sterile token
#

That its really important, tho

quaint mantle
undone axleBOT
quaint mantle
#

but, before year or two, I succeeded in this

gray merlin
#

Does anyone have any experience with the JeffLib? It seems that my armour slots aren't getting decoded from b64

sterile token
#

A really unseusfull dev which doesnt mainly know about java itself

#

🤡

solemn sorrel
#

How can I save a List<Map<>> into YAML? I found FileConfiguration.getMapList() but I can't figure out how to save it there.

gray merlin
quaint mantle
sterile token
#

Oh so cute!

#

🥰

gray merlin
#

My issue is that the armour slots aren't getting decoded

quaint mantle
sterile token
#

Encode it into base64

gray merlin
sterile token
#

Base64.getEncoder().encode(bytes)
Base64.getDecoder().decode(bytes)

#

👍

solemn sorrel
solemn sorrel
# sterile token 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

sterile token
#

You need something like this?

Users:
  uuid-here:
    name: "bla"
    coins: 10
  other-uuid:
    name: "bla"
    coins: 20 
solemn sorrel
#

Not users though

sterile token
#

Just treat Users as section and each key ("uuid-here", "other-uuid") as other section

#

I would do that

twilit pulsar
#

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

solemn sorrel
#

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

sterile token
#

If it confident send me a dm

solemn sorrel
sterile token
#

so do a section with child sections

#

Its like i have done

solemn sorrel
#

One second

sterile token
#

Users is a section and each "uuid-here and other-uuid" are child sections

solemn sorrel
solemn sorrel
ivory sleet
#

getMapList -> List<Map<?,?>>

iron glade
#

Images still not working on spigot

sterile token
iron glade
sterile token
#

Is intellij weird?

#

😂

solemn sorrel
warm mica
ivory sleet
#

^

quiet ice
sterile token
ivory sleet
#

I am

sterile token
warm mica
sterile token
carmine nacelle
#

@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());
    }
solemn sorrel
#

Sorry how would I do that?

quiet ice
warm mica
sterile token
#

Intellij tell me that

#

🤡

#

I think it weird

granite burrow
#

Why does Player#setCollidable() not stop colliding
(API Version: 1.16)

quiet ice
#

Bukkit has no Contract annots, so you Made a misidentification

iron glade