#help-development

1 messages · Page 847 of 1

hardy cairn
#

yea?

carmine mica
#

also I think that list contains blocks that will be destroyed, not all blocks hit by the explosion

quaint mantle
#

thats the answer to check if the player is in circle

hardy cairn
#

OH

#

ok

pliant topaz
#

So, I've got a hell lot of positions (i think around 50), which are always 2x3 (2 high, 3 wide) where the player can place blocks and I want to know on which of these 2x3 positions they've placed the block and it shouldn't matter on what of the 6 blocks it was placed. I had the idea of creating a two-dimensional array for storing the positions, but that would be pretty annoying to do (the positions are also all on the same y-axis). In my idea the array stores the offset from the middle point of the 'board' (where all the positions are). Anyone got another, simpler idea on how to do this?

quaint mantle
#

use distance() not distanceSquared()

#

also might need to make it absolute idk

hardy cairn
#

ok i will change it , im not good at math lol

opaque scarab
#

I created a custom biome class that doesn’t use any api. I could send it if you’d like?

quaint mantle
opaque scarab
#

It is obviously harder to use than an api, but I try to step away from relying on others apis

hardy cairn
#

i mean i know that but generally not that good at math lmao

opaque scarab
#

It’s for 1.20.2, but probably will work on 1.20.4

rare rover
#

mines all nms

hardy cairn
#

@quaint mantle sorry for ping ```

 double return location.distance(center); <= radius;``` but do you think this is ok?
rare rover
hardy cairn
#

i think im stupid

#

thats why im asking

opaque scarab
rare rover
#

no

#

or just setup multiple nms versions

spare mason
#

josh

#

how were you able to do custom biomes with nms?

#

i tried for several hours but i couldn't figure it out

hardy cairn
#

@quaint mantle really sorry but that didnt work entities few blocks outside are still taking damage ;-;

hardy cairn
#

oh i included double as mistake return location.distance(center) <= radius;

#

but i used this

#

in my code

#

now

quaint mantle
#

Are you sure that radius is just not really big?

hardy cairn
#

radius is 15.0

quaint mantle
#

Can you check

#

With counting

hardy cairn
#

with counting? like do it in game

quaint mantle
#

Yes

hardy cairn
#

ok wait few sec

#

wait by counting in game radius is actually quite smaller than 15

#

Draco

#

well not alot butlike few blocks less than 15

forest pumice
#

yo I'm trying to hook Vault into my plugin but it keeps saying no dependency found, i tried adding depend Vault and also vault, but it doesn't seem to work, I also have it installed in my server and it works fine, its also in my plugin pom.xml

hardy cairn
#

i thought the radius was exactly 15 blocks

remote swallow
forest pumice
#

in the pom?

remote swallow
#

to your build file

forest pumice
#

Ive never done that, how so?

remote swallow
#

add this with the other repos

forest pumice
remote swallow
#

check the dependency is correct then

forest pumice
remote swallow
#

reload maven then

forest pumice
#

I mean I did when I installed it lol

remote swallow
#

reload it again and say if you still get the error

forest pumice
#

ok

forest pumice
remote swallow
#

where is the error appearing

forest pumice
#

console

remote swallow
#

?paste the error

undone axleBOT
forest pumice
#

Its this

#

Console is just that, no point in pasting it

remote swallow
#

thats not no vault dep

#

theres no economy provider

forest pumice
#

what

remote swallow
#

you have nothing providing the economy, vault is just an api

forest pumice
#

does it need to have a use for it to load?

#

I'm still using the chat and permissions of vault

tender shard
#

Do you need vault for economy?

forest pumice
#

for future yes, but rn i havent done anything in economy specifically

tender shard
#

Then dont check for an economy provider if you dont need one

forest pumice
#

aight

agile hollow
#
    public void onEntityExplode(EntityExplodeEvent event) {
        if (event.getEntity().getType() == EntityType.PRIMED_TNT) {
            String list = "OBSIDIAN";
            List destroyed = event.blockList();
            Iterator it = destroyed.iterator();
            while (it.hasNext()) {
                Block block = (Block)it.next();
                String name = block.getType().toString();
                if (list.contains(name))
                    it.remove();
            }
        }
    }```
why it explode all the other blocks but not the obsidian? i want to make explode only the obsidian
mellow edge
#

so if any1 here has played bedwars in it when a player has invisibility it is completely invisible except footsteps, so what if I send a "lie" packet to other clients that the player removed his armour and give the player invisibilty?

tender shard
#

Also you have to remove everything that‘s NOT obsidian

#

And obsidian doesnt break from explosions, you have to manually destroy them

#

It‘ll never be in the list in vanilla

agile hollow
tender shard
rare rover
#

how would i break client side blocks in survival? I can't find a forum or anything talking about this

#

i can break client side blocks in creative

#

but not survival

patent socket
#

Is there a way to set a World variable to the overworld without detecting the world from a player?

tender shard
#

wdym with "set a world variable to the overworld"?

#

you want to get the default world, you mean?

patent socket
tender shard
#

Bukkit.getWorlds().get(0) is the default world

pliant topaz
#

I've got a hell lot of positions (i think around 50), which are always 2x3 (2 high, 3 wide) where the player can place blocks and I want to know on which of these 2x3 positions they've placed the block and it shouldn't matter on what of the 6 blocks it was placed. I had the idea of creating a two-dimensional array for storing the positions, but that would be pretty annoying to do (the positions are also all on the same y-axis). In my idea the array stores the offset from the middle point of the 'board' (where all the positions are). Anyone got another, simpler idea on how to do this?

opaque scarab
rare rover
#

well, i have client side blocks. But if i try to break one in survival it just doesn't do anything

#

so yes packets

#

if i need to do that

opaque scarab
tender shard
# tender shard 50 isn't much at all

i'd just create a custom class, e.g. PlaceableLocation or sth, that has a method to return the list of blocks it contains, and/or a static method that turns a block into a PlaceableLocation, or return null if it's outside of any allowed locations

pliant topaz
#

it's 300 blocks

#

just 50 locations of each 6 blocks

tender shard
#

300 is still not much. I'd just create a list of your 50 custom locations (or e.g. a list of boundingboxes, or whatever)

quiet ice
#

Especially if your positions are sorted you can use binary search (once you migrate the position to a long)

#

So basically you check if there are any of your positions in a given region, and if there are you perform your binary search on a long array to obtain the index which you can use to obtain the origin of your position

#

If the positions change frequently it becomes a bit more tricky as you need to use a TreeMap<Long, MyObject>, but that is also achievable

#

You just need to remember to add all 6 corresponding longs to the map for every position you add

quaint mantle
#

Saving config removes all comments

#

As they are not stored in YamlConfiguration

opaque scarab
#

@rare rover almost done

patent socket
#

I'm trying to make it so if you do not provide the amount of ticks for this command, it returns false with a message. However, whenever I run the ocmmand without providing the amount of ticks, it causing an internal server error, with an error at line 31, which is line 2 here.

                if (!args[1].isEmpty()) {
                    delay = Integer.parseInt(args[1]);
                    sender.sendMessage(ChatColor.GREEN.toString() + "Delay time set to " + delay + " ticks.");
                } else {
                    sender.sendMessage(ChatColor.RED.toString() + "You did not provide the amount of ticks!");
                    return false;
                }
            } ```
How can I fix this?
rare rover
#

if i am correct

patent socket
#

so if (args.length < 2) {?

quaint mantle
glad prawn
#

= min

opaque scarab
# rare rover it seems you have to change the packet?

Yes. My method uses a Channel Duplex Handler. It checks for an incoming ServerboundPlayerActionPacket. It then gets the action and sees if it meets criteria. What you could do is create such a handler, and look for a packet from the client that indicates a block left click. Then send a packet breaking the block.

The following code should do this (keep in mind this is within an extention class of the ChannelDuplexHandler). I have to send it as a text file do to size.

This isn't tested, so hopefully it'll work. Somewhat rushed coding this on the fly

knotty aspen
#

Just be a bit careful with adding ChannelDuplexHandlers. If there are other plugins on the server also doing that, you can get fun conflicts, so I wouldn't really recommend doing it for public plugins
Perfectly fine for a private plugin though

opaque scarab
#

@rare rover I doubt this, but an interaction event might be called even if the block doesn’t exist server side. I have a feeling this is only works on creative players though. If so, intercepting packets is the only way I see for survival

halcyon hemlock
#

@rare rover greetings. josh.

remote swallow
#

what happened to zweaty palms

patent socket
#

This is being looped in my command using runTaskTimer. Is there a more effecient way to do this?

            while (zloops <= 96) {
                blocation.getBlock().setType(Material.LAVA);
                zloops = zloops + 1;
                delz = delz + 1;
                blocation = new Location(world, delx, voidlvl, delz);
            }
            xloops = xloops + 1;
            zloops = 1;
            delx = delx + 1;
        }
        delx = 850;
        delz = -48;
        xloops = 1;
        zloops = 1;
        voidlvlv = voidlvlv + 1```
Currently it only sets the z "strips" to lava, but I need it to set the entire square to lava.
opaque scarab
rare rover
#

yeah i fixed that

#

now just trying to fix interacting with blocks

patent socket
#

Set the entire 96x96x1 square to lava

#

But it only sets the z "strips" to lava

rare rover
#

which works but everytime i interact with a block it reset's all the other client side blocks i broke

rare rover
# rare rover which works but everytime i interact with a block it reset's all the other clien...

just changed it to this:

    @Override
    public void channelRead(ChannelHandlerContext channelHandlerContext, Object packet) throws Exception { //this will trigger when the client sends a packet to the server
        if (packet instanceof ServerboundPlayerActionPacket actionPacket) {
            recieveAction(actionPacket);
            return;
        } else if (packet instanceof ServerboundUseItemOnPacket) {
            return;
        }

        super.channelRead(channelHandlerContext, packet);
    }```
opaque scarab
patent socket
#

thats what I have so far

rare rover
opaque scarab
forest pumice
#

Why does permission-message not work and gets overriden by the Unknown command when using a command with insufficient permissions?

halcyon hemlock
knotty aspen
#

Because commands without permission don't exist to the client

#

which is also why they don't show up in tab complete

opaque scarab
carmine mica
#

@lone jacinth do you recall your motivation for CraftLimitedRegion#saveEntities clearing the entities in the chunk? Or more generally, loading the entities into fields instead of loading them each call?

forest pumice
opaque scarab
# rare rover nah its the same

Try this. Noticed my code runs the following tick Bukkit.getScheduler().runTask( <plugin instance here> , () -> { sendBreakPacket(connection, breakPacket); player.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()).breakNaturally(); });

#

IDK if it’ll make a difference, but worth a shot

rare rover
#

i'll try iut

rare rover
#

how he does it

#

just he did it in kotlin

#

i still got no clue why its resetting them

idle sparrow
#

If a world is deleted, but a player's location is still set to that world, will the game hash it out and just send the player to another available world?

#

i want to have a seperate world for farming/gathering and want it to automatically reset itself to a new world every week

opaque scarab
# rare rover i still got no clue why its resetting them

When blocks are mined, the block break is actually handled on the client. It sets a timer for when the block should break (if not interrupted). The BlockDestructionPacket is usually there to show other players (not mining the block) the progress from afar. The client sends a packet to the server once the timer completes, updating the world.

If I remember correctly, this block break packet sent goes to the server, and the server sends a packet to nearby players updating the world. When the client begins breaking a block, but does not complete it, a “break fail” occurs. The packet is sent to the server, and the server sends a packet to all other players that basically says “undo the break animation” This is why the block reappear when you release your click.

The purpose of doing block#breakNaturally is to prevent this. When the block breaks, the server sends a packet to all players that updates the state. This tells the client the break is successful, and a “break fail” event shouldn’t respawn that block.

rare rover
#

ig

#

but i'm not sure where to put it?

#

since there is no location or blockdata

#

in the duplex

wide coyote
#

you may need to listen for break packet instead of break event

rare rover
#

i am listening for the break packet

wide coyote
#

not quite sure if spigot check the block is valid or doesnt care if its clientsided or not

wide coyote
rare rover
#

cuz there's no location or blockdata

wide coyote
#

there must be a location

rare rover
#

is there a way to convert BlockPos to Location?

wide coyote
#

its that getPos method you call

#

you can manually

rare rover
#

ah

#

okay

opaque scarab
wide coyote
#

I dont actually understand what you are trying to achieve here

#

if you are gonna let every client know about the block break and place

#

what is the point of clientsided blocks

rare rover
#

okay yeah that fixed it '

rare rover
opaque scarab
rare rover
#

and its just easier for me to do it this way

wide coyote
#

this might cause a lot of compatibilty issues with other plugins

#

like.. a lot

rare rover
#

good thing i'm using all custom plugins

wide coyote
#

still, there isnt many ways to check the type of that block using bukkit api

#

doesnt worth the headache imo

opaque scarab
wide coyote
#

why not just use minestom if you are using packets and all custom plugins?

rare rover
#

cuz my host doesn't support minestom

#

and minestom is more of a hassle

#

to get setup

wide coyote
#

this is a weird way but alright

#

its your server after all

#

glad it fixed the issue

rare rover
#

exactly

opaque scarab
pseudo hazel
#

is apache commons still good for simple file io or is there something better thats more recent

opaque scarab
#

Anyone know if getNoiseBiome takes world coordinates?

pseudo hazel
#

whats getNoiseBiome

opaque scarab
opaque scarab
pseudo hazel
#

oh its an nms thing

#

I see

carmine mica
#

think it takes biome coords

grand flint
#

What? 🤔

carmine mica
#

biomes are 4x4x4

grand flint
#

getNoiseBiome(int x, int y, int z, Sampler arg3)

carmine mica
#

well #1, that's not the method they said

#

LevelChunk#getNoiseBiome

#

also, trusting parameter names is not a good idea

#

looking at the implementation in ChunkAccess#getNoiseBiome, it looks to me they are biome coords

opaque scarab
crimson scarab
#

can somebody explain this

warm mica
#

The last bits of the 64 are: 22 for x, 22 for z, 20 for y

echo basalt
#

that's 64 bits not 128

agile hollow
#

how can i check if a block was place in the last period??

warm mica
#

Which should mean x = (pos >> (64-22))&0x16

echo basalt
#

0xF

warm mica
#

Yes, 0x8F

#

0xF only gets 16

echo basalt
#

I mean the & 0xF

#
long pos = 0;
pos |= (chunkY & 0xFFFFF);
pos |= (chunkZ & 0x3FFFFF) << 20;
pos |= (chunkX & 0x3FFFFF) << 42;
#

sumn like that

crimson scarab
#

damn i've never seen this before

warm mica
#

Yes that looks right

crimson scarab
#

is this just integer concatenation or something

#

is chunk y just the normal y

echo basalt
#

y >> 4

warm mica
pseudo hazel
#

you are taking advantage of the fact that a chunk has 16 blocks, which is 2^4

warm mica
crimson scarab
#

what is 0x3FFFFF

#

and 0xFFFFF

#

i get shifting but why do we need all of that

hazy parrot
#

its hex representation of number

echo basalt
#

that number meaning the maximum value you can fit with the amount of bits

#

Basically we grab the number and strip the bits we need

#

Then we grab those bits and toss them in ther dedicated area

crimson scarab
#

how can i convert a long into a varlong

rare rover
#

would i have to store the types of block inside a list

#

(client side)

#

I'm sending client side block updates to the client and i need to get the block type from that location

#

would i have to store it in a map or smth

warm mica
wet breach
patent socket
#

thats what I have so far

warm mica
young knoll
#

Location is mutable, so you don’t need to make a new instance each time

#

Also

#

?workdistro

rare rover
#

Nvm that wouldn't work

#

It would have to be Map<Location, Material>?

young knoll
#

You can remove the world and go down to just a vector

#

And then handle the world separately

civic apex
#

just for curiosity (ik i can use bukkit api for this and i can explain why/how i got here), but does anyone know how to use protocollib's NBT API to custom enchant an item?

grand flint
#

ask him to send you the error and how he produced it

#

ask him what other plugins he uses what version which world

#

then how does he know

#

its ur plugin doing it

#

lol

#

what

#

did he just randomly assume

#

its ur plugin

#

tell them its not the plugin then

#

idk what u want us to do

#

be specific or tell them its not ur plugin

#

well by info

#

i mean

#

what ur plugin even is

#

what happend to ur user

#

what ur code is

#

and such

#

well it depends how u change the tool

#

so it could possibly be ur plugin, we would need code though

#

what 💀

#

then its probs that

astral scroll
#

hey

#

Recipe#shape("GGG", "GDG", "GGG") isnt working even tho i set the ingredients

young knoll
#

?notworking

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.

civic apex
# civic apex just for curiosity (ik i can use bukkit api for this and i can explain why/how i...

i figured out from https://minecraft.wiki/w/Player.dat_format#Item_structure that enchants are stored as a list of compounds, but protocollib's NbtList implementation only allows .add() to be called with a NbtBase<T> (where T is the generic type of the list, which from my understanding should be NbtCompound). NbtFactory doesnt allow for the creation of neither NbtBase<NbtCompound> nor generic NbtBase<T>, so idrk what the proper way to create it would be. Im also confused as to what NbtBase is even supposed to be/accomplish

Minecraft Wiki

<player>.dat files are used by servers to store the state of individual players. The format is also used within level.dat files to store the state of the singleplayer player, which overrides any <player>.dat files with the same name as the singleplayer player. These files are in NBT format.

civic apex
# civic apex i figured out from https://minecraft.wiki/w/Player.dat_format#Item_structure tha...

nvm figured out how to do it after i realised how NbtCompound was related to NbtBase, if anyone for whatever obscure reason faces the same problem here's how I did it

NbtCompound tag = NbtFactory.asCompound(NbtFactory.fromItemTag(item));
NbtList<Map<String, NbtBase<?>>> enchants = NbtFactory.ofList("Enchantments");
NbtCompound enchant = NbtFactory.ofCompound("");
enchant.put("a", "b");
enchant.put("b", 1);
enchants.add(enchant);
tag.put(enchants);
#

so unintuitive to have to figure out i didnt have to make a list of nbtcompounds but a list of maps of strings to any base nbt (which is what essentially makes a nbtcompound, just not wrapped in nbtbase)

river oracle
#

well you'd really have to register your enchantment with a Vanilla registry

#

just adding it as an NBT tag doesn't do much I wonder if it would even stay like that

carmine mica
#

no, it won't not if it runs through CraftMetaItem which happens on most inventory clicks/drags

young knoll
#

Well if it’s on the packet level it should already be past that

carmine mica
#

yeah, if the enchantment is only going to exist on the packet-side of things, then it will stay. But it will break in creative mode

#

any creative mode interaction could remove it or will make it a server-side enchant which can then be removed by CraftMetaItem conversion

young knoll
#

Oh creative mode

#

How we love you

lone jacinth
carmine mica
#

ok, I get the second part. I don't think I'm following the first part relating to clearing the entities in the chunk

#

when you add an entity, it just gets added to that list, not added to the underlying nms region

Do you mean like if a plugin discards/removes an entity, its easier to just not add it back?

spare mason
#

There is any event that register when a player has more than 100 ms?

civic apex
civic apex
#

drag doesnt

idle sparrow
#

Am I remembering correctly that you can't check if Chunk == Chunk?

#

have to check coords right?

lone jacinth
carmine mica
tender shard
#

lol

#

PlayerHasPingOver100MsStartEvent

hardy cairn
#

i need help, i have made a sphere of particles of radius 15 and i want to damage entities in that radius but some entities aprox 5-6 blocks outside the sphere are also taking damage. here is my code https://pastebin.com/w59pnKMw

#

i will be very gratefull if someone help me, i am trying to figure out this problem for days

#

still didnt able to fix it

chrome beacon
#

Why are you checking if it isn't a player and then if it is a player?

#

also you're damaging in a radius around the particle not the center of the sphere

hardy cairn
hardy cairn
chrome beacon
#

use the sphere center location

#

instead of the particle location

hardy cairn
#

wait lemme cook

#

ima try

#

yoooooo thanks!

#

it works, my dumbass was using particle location as centre thanks alot!

chrome beacon
#

No worries

#

do move that damage out from the particle loop

hardy cairn
#

yea will do

proud badge
#

Should getting stuff from a ResultSet be done async, or only the actual part where I access the database?

#

also should I make this async?

lean pumice
#

?paste

undone axleBOT
lean pumice
#

what is this error?

chrome beacon
#

You're modifying the list while looping it

hardy cairn
#

hi im sorry but i need help with one more thing. i am kinda lost, how do i prevent players from putting certain items in containers

#

is it possible?

chrome beacon
#

Listen to the InventoryClick and Drag events

#

not a big fan of the spigot inventory api

lean pumice
hardy cairn
#

so do see if the player clicks the certain item and drags it to chest?

chrome beacon
lean pumice
chrome beacon
#

I'm aware

#

It can be modifed somewhere else

hardy cairn
#

hmm that makes sense lets see if it works

chrome beacon
#

the click event fires when a player clicks an item to move it to cursor, shift click it or using the arrow keys

#

drag event fires when dragging items across multiple slots (so it places more than one slot at once)

charred blaze
#

hey

#

when i build the jar file with this

#

the code isnt updated in the jar file

#

why?

#

(maven)

chrome beacon
#

don't use that directly

#

use package

shadow night
#

Why would you use jar

#

package works fine

charred blaze
#

did i manage to do that

#

xd

#

nvm decompiler bug

#

thanks it worked

charred blaze
shadow night
charred blaze
shadow night
#

Which makes sense, amazingly

#

I wonder if compile, then jar generates a proper jar 🤔

charred blaze
#

Bukkit.getLogger().log(Level.ALL, targetLoc.toString());

#

why am i getting error on this

#

targetLoc null?

#

Location targetLoc = plugin.arenasConfig.getLocation("arenas.arena."+arena.getID()+".pos1");

shadow night
#

Hmmmmmmm 🤔

charred blaze
#

ill try to debug the arena.getID()

#

oh i have already done that

#

but why isnt it printing anything

#

🤔

dry hazel
#

tried using the INFO level?

charred blaze
#

no

halcyon hemlock
#

imagine using logger

#

ong

charred blaze
#

it gives a warning with sysoutprint

shadow night
icy beacon
shadow night
charred blaze
#

its printing this now

charred blaze
chrome beacon
#

why log as bukkit

#

you're not bukkit

icy beacon
#

Well you want your logs to belong to your plugin, not Bukkit

#

It's not like you are debugging Bukkit lol

shadow night
#

Lol

charred blaze
#

ah

shadow night
#

If there is a Bukkit class, is there a CraftBukkit class?

charred blaze
#

why

icy beacon
#

If anyone is experienced with Android, is it a bad practice to do oauth with Google? Their docs give this warning, but after reading the Credential Manager docs, I do not have any understanding of how to do Google auth with it, so I'm kind of in two minds here

#

I wanted to send this in the android dev server but my account isn't phone verified so I can't lol

icy beacon
#

I cannot unfortunately

shadow night
#

My account is phone verified

icy beacon
#

"Unable to send sms message"

shadow night
#

Bruh

charred blaze
icy beacon
#

Long story short, my account was phone verified but I couldn't join some servers for some reason, then I decided to unlink it and link it back again; unlinking helped and I could join servers again, but now I'm unable to link the number back. Contacted Discord and they said that if it says "unable to send sms message" the number cannot be used for verification and I have to use another, which I currently can't

wet breach
wet breach
#

basically the premise is bad apps stealing the token

warm mica
wet breach
#

but with oauth, the token can only be stolen after authentication

icy beacon
#

I'll take a look at that ty

halcyon hemlock
#

ong

icy beacon
wet breach
# icy beacon Fair enough

just pointing out while although that is what they are trying to prevent, to steal an oauth token is just not easy because the token is only present after authenticating lol

#

also google wants to track more

#

can't really do that the way they want with oauth

#

so in otherwords as long as you are aware of some things that you need to be aware about, OAuth is actually pretty secure and works 🙂

icy beacon
wet breach
#

I am informing why Google is trying to discourage it and that there is a valid point to what they say but at the same time not valid and hidden agenda

#

not everything is perfect

icy beacon
#

Gotcha

wet breach
#

the only flaw with OAuth is if you save the token to a file or something

#

but as long as you don't do that and invalidate sessions periodically the odds of someone actually doing something nefarious is like almost 0

icy beacon
#

I see, thanks for the tips 🙂

icy beacon
#

My app can be used without authentication, but some features are only available to authenticated users

boreal sparrow
#

How can I check if the console has executed any (valid) command

#

so not /aiujwddwon or /notacommand

#

but /op, /say, /tp etc.

boreal sparrow
#

thanks

echo basalt
#

Fun fact there's no way to detect if a commandsender is forced to execute a command through performCommand

#

unless you inject a custom command map

hardy cairn
#
    public void onInventoryDrag(InventoryDragEvent event) {
        HumanEntity humanEntity = event.getWhoClicked();

       
        if (humanEntity instanceof Player && isContainerInventoryType(event.getInventory().getType())) {
            Player player = (Player) humanEntity;

            
            for (Map.Entry<Integer, ItemStack> entry : event.getNewItems().entrySet()) {
                if (isForbiddenItem(entry.getValue())) {
                    event.setCancelled(true);
                    break;
                }
            }
        }
    }```  @chrome beacon sorry for ping, but i made it work so that the certain items can not be put in the container but when i shift click and place it, the items are still getting placed in the container. i tried something but it isnt working
chrome beacon
#

As I said shift clicking fires the InventoryClickEvent

boreal sparrow
hardy cairn
#
    public void onInventoryClick(InventoryClickEvent event) {
        HumanEntity humanEntity = event.getWhoClicked();

        
        if (humanEntity instanceof Player && isContainerInventoryType(event.getClickedInventory().getType())) {
            Player player = (Player) humanEntity;

            
            if (event.getAction() == InventoryAction.PLACE_ALL || event.getAction() == InventoryAction.PLACE_ONE || event.getAction() == InventoryAction.PLACE_SOME) {
                
                ItemStack clickedItem = event.getCursor();
                if (isForbiddenItem(clickedItem)) {
                    event.setCancelled(true);
                }
            }
        }
    }``` this is my inv click event, can you guide on how to incorporate shift click check in this method
#

this works when i try to normally place items in a container

#

um hi

#

olivo

#

do you know how can i maybe do this

chrome beacon
#

Check if someone is shift clicking or using the number keys

boreal sparrow
#

How can I check if a command requires op to execute

chrome beacon
#

then check if that item is yours

#

Commands have permission nodes

boreal sparrow
hardy cairn
chrome beacon
#

Yeah I mean the item you want to block

chrome beacon
boreal sparrow
#

I'm using PlayerCommandPreprocessEvent, so would I have to check where the first space is in the string (where to command name stops)

chrome beacon
#

yeah

boreal sparrow
#

And then, how do I convert this new name to a command

chrome beacon
#

So what exactly is the goal here

boreal sparrow
#

I want to save all commands executed by an op to a file, but only if the command itself requires op in the first place

chrome beacon
#

uh I guess you can look up the alias map

#

and use that

patent socket
#

no if I can't make it faster, I need it fixed. it only sets the z "strips". to lava, not the entire square.

chrome beacon
#

but again commands have permission nodes so keep that in mind

boreal sparrow
#

huh, is there no way to convert a name to a minecraft command?

chrome beacon
#

getCommand exists but that won't work for aliases as far as I'm aware

#

so you need to look up the command name first

hardy cairn
#
    public void onInventoryClick(InventoryClickEvent event) {
        HumanEntity humanEntity = event.getWhoClicked();

        // Check if the event involves a player and a container
        if (humanEntity instanceof Player && isContainerInventoryType(event.getClickedInventory().getType())) {
            Player player = (Player) humanEntity;

            // Check if the event is a shift-click
            if (event.getAction() == InventoryAction.MOVE_TO_OTHER_INVENTORY && event.isShiftClick()) {
                ItemStack clickedItem = event.getCurrentItem();
                handleForbiddenItem(player, clickedItem, event);
            }

            // Check if the event is a click
            if (event.getAction() == InventoryAction.PLACE_ALL || event.getAction() == InventoryAction.PLACE_ONE || event.getAction() == InventoryAction.PLACE_SOME) {
                ItemStack clickedItem = event.getCursor();
                handleForbiddenItem(player, clickedItem, event);}
            }
         private void handleForbiddenItem(Player player, ItemStack clickedItem, InventoryClickEvent event) {
        // Check if the clicked item is forbidden
        if (clickedItem != null && isForbiddenItem(clickedItem)) {
            event.setCancelled(true);
            player.sendMessage("You cannot interact with this item in containers!");
        }
    }``` i tried what you said but i can still shift click items in containers but it cancles the shift click to drag items in inventory instead
boreal sparrow
#

oh yea tp and teleport

chrome beacon
#

also you could probably just check the action

hardy cairn
#

like i can still put that specified item with the shift click in the container

#

um what?

#

i am checking the action am i not?

chrome beacon
#

action and shift

#

try just action

hardy cairn
#

ok iil try

grim dock
#

Does the HumanEntity#setCooldown(material, ticks) method set the cooldown to be applied everytime the material is used?

chrome beacon
grim dock
boreal sparrow
#

Do you mean getPlugin().getCommand(commandName);?, that's what I'm using

#

I also need to check normal commands such as tp and op

chrome beacon
#

Use the CommandMap

boreal sparrow
chrome beacon
#

It's not easily accessible and they way you grab it can be version dependent

boreal sparrow
#

I'm on latest (1.20.4)

#

How can I do it on that

chrome beacon
#

It should be a field in CraftServer (the implementation of the Server interface)

#

You can access it with reflection

boreal sparrow
#

How do I access CraftServer

#

You mean CraftServer server = (CraftServer) Bukkit.getServer();

eternal oxide
#

you can use annotation based commands

chrome beacon
#

They're not trying to register commands

eternal oxide
#

I think thats still a thing

#

ah ok

chrome beacon
#

let me handle this

eternal oxide
#

yes boss

boreal sparrow
#

CraftServer doesn't seem to be a... thing I can use/import?

chrome beacon
boreal sparrow
#

Oh ok

chrome beacon
boreal sparrow
#

oh ok great, how do I access it

chrome beacon
#

Reflection

#

use reflection to access the commandMap field

boreal sparrow
#

yea, ok, but I don't know where the commandMap field is

halcyon hemlock
#

xd

#

ill tell you wait

boreal sparrow
#

ah ok

#

Bukkit.getServer().getCommandMap()

#

my bad that was a bit dumb

halcyon hemlock
#

final Field bukkitCommandMap = Bukkit.getServer().getClass().getDeclaredField("commandMap");

halcyon hemlock
#
            final Field bukkitCommandMap = Bukkit.getServer().getClass().getDeclaredField("commandMap");
            bukkitCommandMap.setAccessible(true);
            CommandMap commandMap = (CommandMap) bukkitCommandMap.get(Bukkit.getServer());
halcyon hemlock
boreal sparrow
chrome beacon
#

Because that's not a method

#

It doesn't exist

halcyon hemlock
boreal sparrow
shadow night
#

Mm, some useful info here

boreal sparrow
#

just retrieve info

chrome beacon
#

yeah use the command map instance and call getCommand on it

halcyon hemlock
#

Regarding what?

boreal sparrow
chrome beacon
#

yeah

boreal sparrow
#

Think this'll work for "parsing" the command name?

#

String commandName = (event.getMessage().split("\s+")[0]).substring(1);

#

Like you don't inlude the / surely?

chrome beacon
#

yeah skip the /

boreal sparrow
#

yea I'm substringing it

#

ok cool i'll test it

halcyon hemlock
#

You can log the entire map and do some debugging

boreal sparrow
#

Ah this works great, thanks Olivo!!

String commandName = (event.getMessage().split("\\s+")[0]).substring(1);

final Field bukkitCommandMap = Bukkit.getServer().getClass().getDeclaredField("commandMap");
bukkitCommandMap.setAccessible(true);
CommandMap commandMap = (CommandMap) bukkitCommandMap.get(Bukkit.getServer());

if(commandMap.getCommand(commandName) != null){
    event.getPlayer().sendMessage("YAY! " + commandName + " is a real command!");
}
halcyon hemlock
#

Why would you do that though

#

Detecting a command

boreal sparrow
#

nah that's just for testing

#

What I really want to do is this:

#
//If the player has op
if(commandMap.getCommand(commandName) != null){
    if(commandMap.getCommand(commandName).getPermission() == "op"){
      //Log this command to the file, as it requires op to even execute
    }
}
chrome beacon
#

so you didn't have to look up the alias?

boreal sparrow
#

oh \

#

lets see

#

ah finally, spigot is on my side

#

it seems aliases are included

#

so no :>

halcyon hemlock
boreal sparrow
#

yea of course

#

just for showing

halcyon hemlock
#

alright

#

Also there are easier ways to check for permissions though

chrome beacon
#

Not where they want to do it KEKW

boreal sparrow
#

how?
Let me just say the full thing that I want:

Check if the OP player has executed a command, and if the command is a real thing, and requires op to execute, log it

chrome beacon
#

They wanted it in the preprocess event

boreal sparrow
chrome beacon
#

btw there isn't a hard requirement for op

boreal sparrow
#

wdym?

chrome beacon
#

Commands have permission nodes

shadow night
#

Don't permissions have a default, like, true, op, not op, false

chrome beacon
#

^^

#

a non-op player can have access to /gamemode creative

boreal sparrow
#

I lost you? Surely tp must always require an op permission?

boreal sparrow
#

But I'm checking if the player itself if an op

#

as well

hollow oxide
#
Bukkit.broadcastMessage("the objective: "+score.getObjective().getName()+" the Entry: "+score.getEntry()+" the score: "+score.getScore());```
gives me this:
#

whole code

public static int process(List<String> sub,Entity targetEntity){
        for (String e:sub){
            Bukkit.broadcastMessage(e);
        }
        Bukkit.broadcastMessage(targetEntity.getName());
        if (sub.get(0).contains("scoreboard")){
            Scoreboard scoreboard = Bukkit.getScoreboardManager().getMainScoreboard();
            Objective objective = scoreboard.getObjective(sub.get(2));

            Score score = objective.getScore(targetEntity.getName());
            Bukkit.broadcastMessage("the objective: "+score.getObjective().getName()+" the Entry: "+score.getEntry()+" the score: "+score.getScore());

            return score.getScore();
        }Bukkit.broadcastMessage("jcrois que ta commande $ existe pas");
        throw new IllegalArgumentException("Error: truc qui ne marche pas");
    }
boreal sparrow
#

how can I check if the command requires the op permission to execute

chrome beacon
#

getDefault() == OP

#

if you want to check if the permission is given to op by default

boreal sparrow
#

You mean?
command.getPermission().getDefault()

chrome beacon
#

yes

boreal sparrow
#

Oh ok thanks

hollow oxide
tepid turret
#

Hey so I'm a bit of a dumbass, I made a plugin that gets whether or not a player has an action bar toggled (using the plugin supplied command) and displays an action bar. It checks this every 40 or so ticks... per player... and now my servers having lag issues.

#

I would like to provide an image but I can't

#

How do i stop there from being 33,099 instances of org.bukkit.craftbukkit.v1_20_R1.presistence.CraftPersistentDataAdapterContext#...

quaint mantle
#

Fix: Do not create them

tender shard
#

show your code

#

?paste

undone axleBOT
tender shard
#

to send images:

#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

hollow oxide
tepid turret
#

to actively show the action bar or the command?

hollow oxide
#

to listen if an action bar is being created

#

or modified or something

tepid turret
#

the action bar is created in the plugin

#

the same plugin

#

the variable i'm talking about is what controls the action bar

hollow oxide
quaint mantle
#

and make it async

tender shard
quaint mantle
#

Since IO stuff

#

Not gameplay

tepid turret
#

Its hurting

quaint mantle
#

I mean higher

tender shard
#

show a spark report. the code you sent shouldn't cause any lag

tepid turret
#

Yea I get that by DB you mean database if so how?

tepid turret
tender shard
#

it does that automatically

tepid turret
quaint mantle
#

Link

tender shard
#

a database to store a simple boolean per player? why? that'll only cause I/O issues while the PDC is already loaded anyway

tepid turret
tender shard
#

just do /spark profiler stopand it should give you a link or sth

tepid turret
#

Because I never got around to checking it.

tepid turret
#

considering there is 33 thousand instances of it open...

tender shard
#

how do you know that it's 33k instances

tepid turret
#

Because it tells me...

tender shard
#

who tells you?

tepid turret
#

Spark inside of VisualVM

#

33,199 instances of it.

tender shard
#

what does the red dot mean in front of the class names?

#

because usually that should all just get garbage collected

tepid turret
#

If you would not be opposed I can upload the full .hprof to a google drive and share it.

#

Will take some time though.

slate tinsel
#

How much is a projectile affected by water, ie the force?

icy beacon
#

Istg the credentialmanager docs are so fucking confusing

#

Where the fuck do I get the requestJson value

tender shard
#

whut

#

how does the java example look like

icy beacon
#

I mean not much difference

#

There is some bullshit related to JSON above but I do not see how that could be related to this

tender shard
icy beacon
#

Ok I think I can just not allow for the passkeys thing lol

icy beacon
#

Google documentation always makes me feel like a fucking idiot because they say so much but say so little

tribal zephyr
#

Is runTaskTimer optimized?

ivory sleet
#

whats ur definition of optimized

tender shard
#

it uses a thread pool and it automatically shuts down tasks when your plugin gets disabled, so it's at least more convenient than just creating a thread yourself

ivory sleet
#

it does not use a thread pool

hollow oxide
#

how can i get the content of a scoreboard in a plugin to use its values

tender shard
#

then someone once lied to me

ivory sleet
#

the async variant does

#

lol

tender shard
#

ah ok

ivory sleet
#

otherwise its correct ^^

icy beacon
#

I think I understand how to authenticate with Credential Manager, now the question is how the hell do I fetch the email from this

ivory sleet
#

is it google?

icy beacon
#

Yeah google oauth with credentialmanager for android

#

This whole thing is melting my brain

ivory sleet
#

yea their lib apis r huge lol

icy beacon
#

The documentation is not only overwhelming but also all over the place lmao

#

And there's no mention of the word "mail" at all on this page

#

androidx.credentials.exceptions.GetCredentialProviderConfigurationException: getCredentialAsync no provider dependencies found - please ensure the desired provider dependencies are added What the fuck is this supposed to mean 🙂

#

Google is not telling me anything about this

craggy rivet
#

how to developer mode, I am developer

icy beacon
pseudo hazel
#

what is developermode

icy beacon
#

I don't wanna spend more of my time on this siht

sullen wharf
#

Is there anyway to guarantee a Chunk's PDC is stored and updated whenever it is set?

#

I'm trying to store some info associated with chunks, but it seems like the PDC only saves and updates when the server is stopped and world is saved.

wet breach
#

going to be hilarious when you learn down the road that its probably like just a few lines of code you needed

#

but never managed to get that far because the documents are too difficult to read/understand

sullen wharf
#

This happened because I was on the spawn chunks

tender shard
icy beacon
#

Well they should've made their docs more clear 😛

rigid otter
#

I've got no idea what the hell is this error

ChatEvent(super=TargetedEvent(sender=SivannGaming, receiver=net.md_5.bungee.ServerConnection@6e692724), cancelled=false, message=.) @ net.md_5.bungee.event.EventBus:-1
#

on BungeeCord

ivory sleet
#

in general i think its just stored on load / unload

#

but thats good, since it does io and stuff

boreal sparrow
#

How can I get the directory of the latest.log file?

kindred sentinel
#

Is there a way to add enchant higher than maxLevel?

tender shard
boreal sparrow
#

nah I need the actual latest.log file directory

young knoll
boreal sparrow
sullen wharf
hardy cairn
chrome beacon
#

skip the shift check

#

and see what happens

hardy cairn
#

Like remove the isShiftClick part and just try move_to_other_inventory right?

#

Lemme try this

#
    public void onInventoryClick(InventoryClickEvent event) {
        HumanEntity humanEntity = event.getWhoClicked();

        // Check if the event involves a player and a container
        if (humanEntity instanceof Player && isContainerInventoryType(event.getClickedInventory().getType())) {
            Player player = (Player) humanEntity;

            // Check if the event is a shift-click
            if (event.getAction() == InventoryAction.MOVE_TO_OTHER_INVENTORY) {
                ItemStack clickedItem = event.getCurrentItem();
                handleForbiddenItem(player, clickedItem, event);
            }

            // Check if the event is a click
            if (event.getAction() == InventoryAction.PLACE_ALL || event.getAction() == InventoryAction.PLACE_ONE || event.getAction() == InventoryAction.PLACE_SOME) {
                ItemStack clickedItem = event.getCursor();
                handleForbiddenItem(player, clickedItem, event);
            }
        }
    }``` i removed the shift click check from the method but i can still place the item with shift clicking in the chest
#

what should i do..

ivory sleet
#

certain commands may also store it

#

like force store it

#

iirc

kindred sentinel
#

Is there a way to change "Too Expensive!" in anvil, to the real cost?

young knoll
#

yes

shadow night
#

I wanna make a command without registering it or generally having it in my plugin.yml, how would I?

young knoll
#

Use a command framework

#

Or manually jank it into the command map

shadow night
young knoll
#

Uhh

#

Reflection n stuff

quaint mantle
#

Class scanners and annotations

young knoll
shadow night
#

Hmm

icy beacon
#

Do I need to store the password salted hash inside the token and verify it every time i authorize a user

icy beacon
shadow night
young knoll
#

The text might be client side

#

idk

kindred sentinel
#

maybe

waxen plinth
#

best use a command framework

icy beacon
#

Build your own command framework

waxen plinth
#

already did

shadow night
icy beacon
#

I've been wanting to do that for so long lol

waxen plinth
shadow night
#

A command framework would be so overkill lol

waxen plinth
#

¯_(ツ)_/¯

#

I used it for tiny projects

icy beacon
#

I really wanna build my own annotation based framework because I am tired of getting an enormous overhead from acf

waxen plinth
#

try mine, see if you like it

#

it's got a dsl and a builder

kindred sentinel
waxen plinth
#

I much prefer the dsl

icy beacon
waxen plinth
#

don't gotta tell me

icy beacon
#

Haha

waxen plinth
#

building stuff yourself is always the way to go if you have the motivation

#

you learn so much more

icy beacon
#

Yep

waxen plinth
#

ordinate is the 4th rewrite

#

and I originally wrote it as a rewrite of someone else's project too lol

icy beacon
#

I will 100% do a command framework after I'm done with the 2 projects I'm already doing lmao

waxen plinth
#

think it's kinda overengineered tbh

#

¯_(ツ)_/¯

shadow night
hardy cairn
#
    public void onInventoryClick(InventoryClickEvent event) {
        HumanEntity humanEntity = event.getWhoClicked();

        // Check if the event involves a player and a container
        if (humanEntity instanceof Player && isContainerInventoryType(event.getClickedInventory().getType())) {
            Player player = (Player) humanEntity;
                
            //SHIFT CLICK-
            if (event.getClick().isShiftClick()) {
                Inventory clicked = event.getClickedInventory();
                if (clicked == event.getWhoClicked().getInventory()) {
                    ItemStack clickedOn = event.getCurrentItem();

                    if (clickedOn != null && clickedOn.isSimilar(createFireGemLVL3()) || clickedOn.isSimilar(createFireGemLVL2()) || clickedOn.isSimilar(createFireGemLVL1()) || clickedOn.isSimilar(HEALING_WAND)) {
                        event.setCancelled(true);
                        player.sendMessage("You cannot put this item in containers!");
                    }
                }
            }


            //NORMAL CLICK
            if (event.getAction() == InventoryAction.PLACE_ALL || event.getAction() == InventoryAction.PLACE_ONE || event.getAction() == InventoryAction.PLACE_SOME) {
                ItemStack clickedItem = event.getCursor();
                handleForbiddenItem(player, clickedItem, event);
            }
        }


    }``` can some one help me, the block of code which has shift click comment on it is not working as intented, i want to prevent players from shift clicking items from their inventory to a container https://paste.md-5.net/oxazodihuh.cs
icy beacon
undone axleBOT
icy beacon
#

Text wall

hardy cairn
#

ok

waxen plinth
astral pilot
#

yo how do i make my plugin size smaller

tender shard
#

the general idea is less code = smaller file

#

and don't shade things that don't need to be shaded

shadow night
#

Shade spigot

astral pilot
astral pilot
shadow night
#

37kb sounds fine to me

tender shard
shadow night
#

lol

tender shard
#

37kb is almost nothing

waxen plinth
#

37kb is pretty small for a plugin

#

my biggest with no shaded libs were like 400kb

astral pilot
#

nvm i misread those "4-6kb"

#

its actually mb

#

ig 37kb is fine

young knoll
#

4mb is the upload cap

#

iirc

proud badge
#

Whats the best way to pass information from one plugin to another?

river oracle
#

size doesn't matter

young knoll
#

Depends on what you are passing

#

You can make public events, an api, etc

proud badge
#

Alt detector plugin

#

pass a player's alts

proud badge
tender shard
#

you just create a public method?

river oracle
#

if you don't know java well yeah

young knoll
#

yeah an api seems resonable

river oracle
#

ig this is a more of a understanding maven though xD

young knoll
#

Just need something like getPlayerAlts(uuid)

#

Or ip or whatever

proud badge
tender shard
#

it's accessible by anything that has your class(es) on the classpath

#

so other plugins can just add your plugin as maven dependency (or gradle) and then you can get the plugin instance from the bukkit plugin manager, cast it to your plugin instance, and then use those methods

proud badge
#

so I could do import com.yes.myplugin.blablabla.MyClass.myMethod to obtain that method in a different plugin?

young knoll
#

You can also make it static

#

kek

proud badge
#

or something like this

young knoll
#

import com.yes.myplugin.blablabla.MyClass

young knoll
#

You don't import methods

proud badge
#

ok

river oracle
#

static import

young knoll
#

shh

#

Don't confuse them with static imports

hardy cairn
#

💀

river oracle
#

probably don't want to give them a reason to abuse static xD

#

imports

rotund ravine
river oracle
#

fuck

#

I always forget

hardy cairn
#

lmao

young knoll
#

If buildtools fails again I am blaming @river oracle

river oracle
#

blame @kind hatch

#

I get I cleaned up the code, but that doesn't make it my faultr

young knoll
#

Yes it does

river oracle
#

nah

#

are you using the GUI

proud badge
#

why do people hate static things

#

does it like make my TPS lower

#

or what

young knoll
#

I also blame you for requiring me to use BUKKIT:PR rather than just PR

river oracle
#

yeah static kills your TPS

#

imagine

inner mulch
#

whats the approach to a global chat between servers, like how do i call a chatevent across all servers?

inner mulch
hardy cairn
#

yea dont use static import its bad for tps🤣

#

and server too

inner mulch
#

but static is sometimes better??

river oracle
#

imagine if invokestatic killed TPS

hardy cairn
#

fr

river oracle
#

that'd be some wild shit

proud badge
#

I always make my variable/method public static if I need to access it in another class

eternal night
#

tbf invokedynamic is OMEGALUL

river oracle
hardy cairn
#

🤣

eternal night
inner mulch
#

what are you guys talking about??

hardy cairn
#

🤔

river oracle
#

which is why dependency injection is always reccomended even though everyone really uses Singleton pattern for their plugin

hardy cairn
#

def not me 😔

river oracle
#

me dependency injecting my plugin's registries

river oracle
#

you'd have to decompile one / look at source to know for sure though

young knoll
#

Welp

#

java.lang.RuntimeException: Error running command, return status !=0: [C:\WINDOWS\system32\cmd.exe, /D, /C, sh, applyPatches.sh] time to blame y2k smh

rotund ravine
river oracle
inner mulch
#

is it smart to have datamanager plugin that manages the data of all other plugins or should each plugin have it's own data management? (like one big server api)

young knoll
#

Yes I ran it in a fresh folder

river oracle
#

what PR you trying to build'

young knoll
#

[--rev, 1.20.4, --pr, BUKKIT:955, --pr, CRAFTBUKKIT:1327, --compile, SPIGOT]

#

It can compile cb fine, but not spigot

remote swallow
#

did y2k break buildtools

river oracle
#

watch me build it first try with 0 issues

quaint mantle
#

I cant believe someone rlly thought static use lowers TPS😂😂

river oracle
#

no one thought that

quaint mantle
#

I actually giggled

river oracle
#

they were asking a question

young knoll
#

Idk why patch 25 is failing

remote swallow
river oracle
#

I think this is MD_5's fault

young knoll
#

I did not touch anything it touches

river oracle
quaint mantle
#

How would i make a tnt explosion with packet?

river oracle
#

no fake ancestors

remote swallow
#

why do we have fake ancestors

young knoll
#

ree

remote swallow
#

what are these 2 prs im building

river oracle
#

@young knoll that is so wack

#

it builds regulat spigot fine

#

wtf did you do in your PR

#

well is your PR the same as master's latest?

#

if not it could cause issues

#

it needs to be up to date

remote swallow
#

i got a remote does not have refs

young knoll
#

uhh

remote swallow
young knoll
#

I may have to merge master

shadow night
remote swallow
#

yes

#

exceptions are secretly coffeescript?!?!?!?!?!?1

astral scroll
#

Is there a Non-NMS way to do a Hologram?

rotund ravine
young knoll
#

wow it works now

#

I still choose to blame @river oracle

astral scroll
remote swallow
#

so fair

rotund ravine
astral scroll
#

k thanks

young knoll
remote swallow
#

spigot does not support pooping of pantaloons

quiet nacelle
#

can some1 help me with items adder

young knoll
#

Also

#

?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
quiet nacelle
#

wdym by that

tender shard
#

what even is your question

quiet nacelle
#

i cant figure out how to get the recource pack to work

tender shard
#

Ask the developer of that plugin

#

This channel is for help with coding your own plugins

quiet nacelle
#

o

tropic saddle
#

?buildtools

undone axleBOT
tropic saddle
#

where can i find plugin that will remapp my jar

tender shard
#

Maven?

tropic saddle
#

yes

tender shard
#

?nms

tropic saddle
#

thx

pseudo hazel
#

how do I know which plugin will handle a certain event first

tropic saddle
#

u cant u can use eventhandler priority

pseudo hazel
#

/is there a way to force me to handle certain events last or first?

tender shard
tropic saddle
#

in @eventhandler annotation

pseudo hazel
#

ah so its in order of teh handlerlist

tender shard
#

Yes

pseudo hazel
#

I guess that makes sense

#

whats the syntax for the priority annotation

tender shard
#

@EventPriority(priority = EventPriority.WHATEVER)

#

Erm

#

EventHandler i mean

pseudo hazel
#

aha

#

got it

#

thanks

tropic saddle
#

u can use LOWEST

#

for event to be the first

#

handle

pseudo hazel
#

what if multiple have lowest

tender shard
#

Then it depends which plugin has registered it first

tropic saddle
#

reverse enginere code and u will know

pseudo hazel
#

im not here to reverse engineer code xD

#

I am here to use the API lol

#

thanks alex

tender shard
#

Np. I am 99% sure that what i said is true, if it hasnt changed since 1.16

pseudo hazel
#

I see

#

my goal is to make a world , nether and end with working portals, but I want to make sure it doesnt interfere with multiverse or similar

#

so I just wanna handle it asap and then cancel the event

#

if that makes sense

#

unless there is like a better way to do it

timid hedge
#

does anyone know why this dependency dosent work for me?

        <dependency>
            <groupId>net.citizensnpcs</groupId>
            <artifactId>citizens-main</artifactId>
            <version>2.0.30-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
timid hedge
quaint mantle
#

wym ?

#

oh that

#

i read it on github

tender shard
#

that gives no advantages and only has possible downsides

grim hound
#

is there any way for me to refuse a player's connection?

#

before any packets are sent

#

and possibly even before the netty channel is implemented

grand flint
#

block their ip

grim hound
grand flint
grim hound
#

in the plugin

grand flint
#

not possible

#

unless u manage teh firewall w the plugin

grim hound
#

I decide what's possible

grand flint
#

ok then go do it

grim hound
#

okay maybe not

grand flint
grim hound
#

Do not

#

ask questions

grand flint
#

ok blocked

grim hound
#

k

grim hound
chrome beacon
#

As they said a firewall would be the best way

spare mason
#

how can i add a custom biome to the overworldgeneration

grand flint
patent socket
#

no if I can't make it faster, I need it fixed. it only sets the z "strips". to lava, not the entire square.

spare mason
young knoll
#

All the nms

spare mason
#

i am trying to do it by that

#

but failed

timid hedge
#

Is there a way to make a config.yml easyer to read?

I have this:

config.addDefault("Chat prefix", ChatColor.translateAlternateColorCodes('&', "§8[ §lCHAT §8]"));
config.addDefault("non-permission", ChatColor.translateAlternateColorCodes('&', "§7Dette har du ikke adgang til."));

But it looks like this:

Chat prefix: "'\xa78[ \xa7f\xa7lCHAT \xa78]'"
non-permission: "'\xa77Dette har du ikke adgang til.'"
hazy parrot
#

You seem to not understand what translateAlternateColorCodes do

timid hedge
hazy parrot
#

Replace that goofy character with &