#help-development

1 messages ¡ Page 18 of 1

jade roost
#

i was recommended learnjavaonline

river oracle
#

lol I hate learning conventionally tbh its so boring to work through basically what is a worksheet I just throw myself into projects and actually make stuff

jade roost
#

nice

wet breach
#

When I learned, there was no such thing as tutorials

jade roost
#

o

#

how long do you know java

#

for

wet breach
#

since nearly its beginning

jade roost
#

wow

#

so like

#

u can make any plugin

#

from scratch

wet breach
#

which I have

jade roost
#

wat

wet breach
#

I have made plugins for people and have a few in my own library o.O

jade roost
#

can you send link

#

if u uploaded it on

#

spigot

wet breach
jade roost
#

you have alot of downloads

#

👀

rain mason
#

switching between JSON and yaml is literally so annoying

wet breach
#

HoloAPI was the first plugin to allow customizable Holograms and is part of the reason why armor stands exist

wet breach
rain mason
#

well the formatting's different

jade roost
#

tru

dim palm
#

hello how can i do a code that automatic builds a glass cube without nothing inside?

wet breach
#

the reason Mojang introduced armor stands the way they did, where they can be invisible and as an entity, was so that holograms could still exist. Originally, holograms made use of a bug from the horse. If you set the horse to a negative age it made it invisible except for its name tag

wet breach
#

Mojang was going to patch it, and if it weren't for HoloAPI and HolographicDisplays(HoloAPI had a 3 month start on them :P) making holograms popular

#

armor stands wouldn't be what they are now lol

jade roost
#

o

#

ok

wet breach
#

so many people got upset when they learned holograms were going to possibly go away

jade roost
#

i want to learn java so i can make better plugins for all versions

jade roost
#

cuz skript cant do the same

wet breach
#

true it can't

#

well technically it can

jade roost
#

yes but

wet breach
#

just more difficult and inefficient

#

in case you want to look at holopi's code lol

#

it is open source after all

jade roost
#

there are so many classes

wet breach
#

its defunct now, but the one feature that holographicdisplays still has not managed to replicate is touch screen holograms 🙂

jade roost
#

wym

wet breach
#

HoloAPI allowed you to go up to the holograms and touch in different spots to do things

#

currently HoloAPI is the only plugin to ever have such a feature

jade roost
#

cool

wet breach
jade roost
#

a

#

i am just looking at the source code

#

i pretty much have no clue

#

what most of the things do

wet breach
#

well its a plugin and api at the same time

#

it allowed other plugins to hook into it to extend its functionality

jade roost
#

ik

#

then

#

cant just hd use the api

#

to add the the touch feature

wet breach
#

need the plugin to be working, which currently it does not work on updated versions because how holograms must be done has changed

#

maybe one day I will get it working again

jade roost
#

a

#

what about now

#

:)

wet breach
#

If someone can find the relevant code for the touch feature, I am sure they could figure out how to add it to another plugin

jade roost
#

a

wet breach
#

but that is if you can find it in that web of code 😄

jade roost
#

do you have any other source to share

#

xd

noble lantern
#

its still updated 🤔

#

Ill just make Burchograms

jade roost
#

yes

#

#isupporttheidea

rain mason
#

oh cool

jade roost
#

anyways

#

i still dont know how to fix this

#

Material.PLAYER_HEAD < error: cannot find symbol

river oracle
#

send code

#

like entire method

jade roost
#
package me.goldenheads.goldenheads.commands;

import com.google.common.collect.Multimap;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.SkullType;
//import org.bukkit.attribute.Attribute;
//import org.bukkit.attribute.AttributeModifier;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.SkullMeta;
//import org.bukkit.inventory.meta.tags.CustomItemTagContainer;
//import org.bukkit.persistence.PersistentDataContainer;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class GoldenHeadCommandGiver implements CommandExecutor {
    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if(sender instanceof Player) {
            Player player = (Player) sender;

            ItemStack goldenhead = new ItemStack(Material.PLAYER_HEAD);
            ItemMeta itemStackMeta = goldenhead.getItemMeta();
            itemStackMeta.setDisplayName("&6Golden Head");
            SkullMeta skullMeta = (SkullMeta) goldenhead.getItemMeta();
            skullMeta.setOwningPlayer(Bukkit.getOfflinePlayer("BlindFrenetic"));
            goldenhead.setItemMeta(skullMeta);
            player.getInventory().addItem(goldenhead);
        }
        return true;
    }
}

noble lantern
#

If it cant find the key PLAYER_HEAD its a version issue iirc

river oracle
#

what version are you on

noble lantern
#

Older versions, it was just HEAD i think

jade roost
#

1.8.8 minecraft version

noble lantern
#

or PLAYER_SKULL

#

^

river oracle
#

wasn't it skull?

noble lantern
#

yeah something with SKULL, in fact just that

river oracle
#

make sure you use the outdataed 1.8 doccumentation

#

so you don't get confused

noble lantern
#

^^

river oracle
#

its 7 years old so there have been a few changes

noble lantern
#

Or, you can develop on 1.14 😄

upper vale
#

SKULL_ITEM i think

#

SKULL is the block

jade roost
#

There is only player_head and player_wall_head

river oracle
noble lantern
#

i prefer 1.19

river oracle
#

minimum for what

#

player heads?

noble lantern
#

version to support when making plugins

river oracle
#

he's probably making a pvp plugin lol

noble lantern
#

the head was changed in 1.12 iirc

noble lantern
jade roost
#

uh

#

idk

#

;-;

jade roost
#

sure

#

xd

#

first time that this channel is this real quiet

crisp wharf
#

I'm having troubles loading a hashmap (string integer) from the config file. When loading, the key returns fine but the value always returns null

#
public void setLivesHash(HashMap<String, Integer> hashMap) {
        for (String key : hashMap.keySet()) {
            getConfig().set("HashMap."+key, hashMap.get(key));
            System.out.println(key + " now has " + hashMap.get("HashMap."+key) + "lives.");
        }
        saveConfig();
    }
    public HashMap<String, Integer> getLivesHash() {
        HashMap<String, Integer> hm = new HashMap<String, Integer>();
        for (String key : getConfig().getConfigurationSection("HashMap").getKeys(false)) {
            hm.put(key, getConfig().getInt("HashMap."+key));
            System.out.println(key + " has " + getConfig().getInt("HashMap."+key) + "lives.");
        }
        return hm;
    }

here is my code to save and load the hashmap

jade roost
#

higly doubt i can help u with this

dim palm
#

anyone got a cuboid class that has the getBorders method?

#

i need fill only the borders and not the entire cuboid

waxen plinth
#

or the faces?

dim palm
#

faces

waxen plinth
#

I've got that

#
CuboidRegion region; //Assume this is populated
for (BlockFace face : LocationUtils.PRIMARY_BLOCK_FACES) {
  CuboidRegion face = region.getFace(face); // Do whatever you need with this
}```
dim palm
#

(im new on spigot and java)

#

oh nvm i found the way

waxen plinth
#

forEachBlock

#

So that could look like

#
CuboidRegion region; //Assume this is populated
for (BlockFace face : LocationUtils.PRIMARY_BLOCK_FACES) {
  CuboidRegion face = region.getFace(face);
  face.forEachBlock(b -> b.setType(Material.STONE));
}```
#

This would give you a hollow cuboid

slate delta
#

any ideas?

quaint mantle
#

how would i make tab completors that sort?

#

like he default player one, If i have "o" it'll come up with everyone's name that starts with an o

young knoll
#

StringUtil.copyPartialMatches

ocean lion
#

Any good guides on WorldEdit API Schematics

quaint mantle
delicate lynx
#

you're doing the format wrong

#

and that deprecation is from paper's api

#

try it

#

for the format, you have to use %s
event.setFormat("<%s> " + "%s"); this is the example

#

that will set the format to be <username> message

#

otherwise, trying a percentage into the chat throws an error

#

in your case, this would be your formatting String msg = "%s" + ChatColor.WHITE + ": %s";

#

are you trying to get a custom name or the item's type for the name? (wood, iron_pickaxe, etc)

#

ah I see, because getLocalizedName() returns localized name based on the server's language

merry lodge
#

Yo, How do I detect the name of the item the player is holding?

#

I'm kinda dumb at this

#

Yeah

#

one sec

#

oh alr

#

player.getInventory().getItemInMainHand()?

#

alr, thanks

gleaming grove
#

is something like that possible in java? Goal is to take objects of type type

gleaming grove
#

thx 😄

#

do you think instanceof use Class#isInstance under the hood?

worldly ice
#

not sure

#

don't know much about jre and how java gets compiled

gleaming grove
#

I worry that Class#isInstance could be slower

#

ok

merry lodge
#

Yo, How do I make a item Unstackable

worldly ice
#

at least not a noticeable slow down

kind hatch
#

Does your displayname have colors? Also, yes. Your display name, likely “Fiesta Potato” isn’t going to be “fiesta_potatoes”

valid folio
#

Hi i have model and i wan't to give it to myself in game how do i do it? Its chest model

kind hatch
#

Use the PDC

#

That way you can name it whatever you want and still assign custom data to your items.

#

?pdc

kind hatch
#

Why not?

#

I mean, NBT and Metadata are also options, but come with their own set of challenges.

#

You know that you can store multiple pieces of information in the PDC right?

#

You just have to use a different key

delicate lynx
#

you can also just replace the spaces with underscores

#

simple string method

merry lodge
#

Yo, How do I make a item Unstackable

kind hatch
#

It’s not even about convincing. It’s just a good option that’s very flexible. Converting underscores to spaces is an option, but it’s not perfect.

Take your config section “fiesta_potatoes”. Replacing the underscores would result in “fiesta potatoes”. Which would not equal your displayname of “Fiesta Potato”

You could run it through a capitalization method, but what if your display name is something like “FiestaPotato”? Then your capitalization method would only capitalize the first letter and you wouldn’t have a proper comparison.

If you don’t want to use something sane, thats fine, but you should be aware of the potential problems you might face with a system like that.

worldly ice
#

absorption?

keen ridge
#

pls help with crates plus

#

[19:51:43 WARN]: [CratesPlus] Plugin CratesPlus v4.5.3 generated an exception while executing task 11207032
java.lang.IndexOutOfBoundsException: Index 11 out of bounds for length 9
at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?]
at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]
at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) ~[?:?]
at java.util.Objects.checkIndex(Objects.java:359) ~[?:?]
at java.util.ArrayList.get(ArrayList.java:427) ~[?:?]
at plus.crates.Opener.BasicGUIOpener$1.run(BasicGUIOpener.java:84) ~[?:?]
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.16.5.jar:git-Paper-794]

drowsy helm
#

java.lang.IndexOutOfBoundsException: Index 11 out of bounds for length 9

keen ridge
#

where?

drowsy helm
#

what

keen ridge
#

i have a lot of codes in that plugin

merry lodge
#

Hey, How do I make a Item unstackable

drowsy helm
drowsy helm
keen ridge
#

so if i change the 8 for 0 all will be okay?

drowsy helm
#

wait is this your own plugin or?

keen ridge
drowsy helm
#

ask the cratesplus dev

keen ridge
#

ok thanks

drowsy helm
#

this channel is for people who code their own plugins

sleek turret
#

lol

merry lodge
drowsy helm
#

use PersistentDataContainers and set a tag as a random uuid

merry lodge
#

K

drowsy helm
#

also that looks like static abuse

merry lodge
#

I just follow random tutorials lol

drowsy helm
#

ah fair enough

#

do you need help with persistent data containers?

merry lodge
#

Yeah

drowsy helm
#

?pdc

drowsy helm
#

thats a pretty good link i can give examples if oyu need

merry lodge
#

Can I have an example? Since I'm kinda confused lol

dusk flicker
noble lantern
noble lantern
#

Just as in detecting if the NPC is coliding when sending the move packet

drowsy helm
#

Oh nah havent really looked into that sorry

#

been busy trying to make my dude blink lol

noble lantern
#

Wtf

#

how? switching skins quickly or layer skins somehow?

drowsy helm
#

yeah switching skins

noble lantern
#

thats pretty smart ngl, couldnt possible be to complicated i dont think

#

Unless theres some limitation to hot swapping skins

drowsy helm
#

by the looks of it, they quickly flash to default position before moving so i might have to do some trickery

#

you got much progress on yours?

noble lantern
#

Might be able to force some update to the client somehow

Ngl i havent focused too much on skins, when i did it one time and it didnt work i commented it out and said ill work on it later 💀

Been trying to just get them to move, which i got absolutely perfectly.... but now im at the point where i need to calculate AABB and jumping calculations myself ._., cause now they just kinda float up to the block and phase through blocks lmfao

#

Show your code where you accessing the variable plugin from

drowsy helm
#

i tried to do pathfinding and gave up after an hour lol

noble lantern
#

your trying to access it statically when its not a static

drowsy helm
#

it just refused to move

noble lantern
#

here i got a vid of one moving

drowsy helm
#

are you creating an item in a static method

noble lantern
drowsy helm
#

thats why

#

just create it on demand

#

static itemstacks suck and arent dynamic at all

drowsy helm
#

itll be really easy to make it face the right direction

noble lantern
#

ofc need head rotations added int and it is 100% fine for same y axis with clear path

#

yeah i was just lazy xD

#

i used .Pos instead of .PosRot

drowsy helm
#

its because you are accessing pl from a non static context, just make a static

#

but you're abusing static

noble lantern
#

im actually trying another lib rn

drowsy helm
#
for(Player player : getInstance().getPlayers()){
            Location loc = entity.getBukkitEntity().getLocation();
            loc.setDirection(player.getLocation().subtract(loc).toVector());
            float yaw = loc.getYaw();
            float pitch = loc.getPitch();

            Util.sendPacket(new ClientboundRotateHeadPacket(entity, (byte) ((yaw%360)*256/360)), player);
            Util.sendPacket(new ClientboundMoveEntityPacket.Rot(entity.getId(), (byte)((yaw%360)*256/360), (byte)((pitch%360)*256/360), false), player);
        }``` this is my head rot method if you want
noble lantern
#

but for some reason, the npc is there but well, its invis xD

noble lantern
#

one sec

drowsy helm
#

but you have to send the ClientboundMoveEntityPacket.PosRot

#

at the same time

#

instead of both Rot and Pos separately

noble lantern
west scarab
#

Does anyone here know JDA? I need help with a way to get the Guild ID

noble lantern
#

you need to split the packet relative distance values by the speed you want the NPC to move to

noble lantern
#

soo

drowsy helm
#

if not they have a JDA discord

west scarab
#

yea i asked in there wasn't much help

#

i just need a getter to get a guild by ID

noble lantern
#

I basically just add this callback as the last argument on the final location so i know when it reaches

#

its a universal interface i use

drowsy helm
#

what class is that in btw?

#

i see its an override

noble lantern
#

oh my ServerPlayer class implements a NPC interface i made

#

so it overrides that

noble lantern
# noble lantern so it overrides that

You can remove overrides and it will work fine, just no distances longer than 8

Ill work on a splitter for distances longer than 8, but math drives me nuts lmfao

drowsy helm
noble lantern
#

Better to send code in a pastebin

#

?paste

undone axleBOT
drowsy helm
noble lantern
drowsy helm
#

ah i see what you mean with collision

noble lantern
#

if you manage to ever figure out AABB lmk xD

#

yeeaaah haha

#

he just phases through

drowsy helm
#

ill try and do some A*

noble lantern
#

well A* will help but

#

ngl

#

that might fix it?

#

i mean the astar dooooes check for valid walking spots hm

drowsy helm
#

well if its paths around blocks you dont need to worry about collision right

noble lantern
#

that is very true

#

i need to do something irl

drowsy helm
#

its just a lazy way of doing it maybe lol

noble lantern
#

then ill be back with results

drowsy helm
#

alr ill tell you how it goes

noble lantern
#

ill just nag @opal juniper to have his astar to collisions

#

(make it do collisions)

drowsy helm
#

oh before you leave

#

why can distance not be > 8?

noble lantern
#

minecraft limit

#

uhhh its this packeett

#

sec

drowsy helm
#

oh ez then

#

ill split it up

#

because its a short right

#

makes sense

noble lantern
#

ollis pathfinding is actually block by block

#

so youd never need to worry about the limitation if you use his think

#

thats with citizens tho, they move a physical entity with velocity

#

them getting stuck is actually the reason i switched everything up

#

cause velocity was messing with theyre actual destination

loud haven
#

May I get some help with naming for a few messages in a language file I'm working on? I'm having a lot of troubles explaining my problem clearly, but I'll do my best. There are two parts to the problem.
First part: I have several pairs of related messages in the file with similar keys, like this pair:

full-inventory-target: #warn target that their inventory is full```
These two messages are used when a sender tried to send their target a gift. Obviously, one of them is sent to the sender, and other to the target.

Second part: I also have a several unrelated messages with a similar naming convention, but each one of them is used in a different situation from each other. Like one for when the sender is in a wrong world, and another for when the target is in a wrong world. In both examples, the message is sent to the sender, and none to the target.

How should I name messages like ones in both parts of this problem so that this distinction is clear?
drowsy helm
#

I really like how the mojang remapped packets are named. For example ClientboundMoveEntityPacket

#

or ServerBoundPacket

#

you could do TargetboundInventoryFull or SenderboundInventoryfull?

noble lantern
#

im back, adding astar now

noble lantern
drowsy helm
noble lantern
#

im working on a new strategy for it

drowsy helm
#

ah cool

noble lantern
#

by default it wont rly go for smartest location without a changed method

#

i just finished adding in the impl

#

time to test z_aCRYYY

#

this kinda cute tho

drowsy helm
#

no time for rest >:)

#

the pathfinder is async right

noble lantern
#

yep!

#

im actually

#

doing everything async

drowsy helm
#

waiiit a minute

noble lantern
#

lol look at all this shit ive tried xD

drowsy helm
#

packets dont have to be sent sync right

noble lantern
#

nooope

#

;))

drowsy helm
#

yooo

quaint mantle
#

^ His gui api is now 20x faster

noble lantern
#

thats why i use futures in that method i sent you

noble lantern
drowsy helm
#

my current system uses "NpcInstances" so different players/groups of players can see diff npc states

#

i think i can abuse async

noble lantern
#

oh i abuse tf out of it

#

as you can tell by my spawnIn()

#

the callback returns sync, then throws back async with pathfind

drowsy helm
#

right

noble lantern
#

okay, testing

drowsy helm
#

ah man i forgot y axis exists

#

im trying to write an A* pathfinder from scratch

noble lantern
#

weird

#

this isnt waiting

#

oh

#

i never implemented the callback

#

i need the ruber ducky method smh

drowsy helm
#

wtf is that

noble lantern
#

its basically you have a rubber ducky on your table

#

and you explain your problem to it

#

most of the time just by explaining it, you can fix the problem

drowsy helm
#

not a horrible idea tbh

noble lantern
#

not at all

#

most of the time when i ask for help in here i fix it by asking and make myself look like abimbo

drowsy helm
#

yeah same lmao

#

when i rephrase my question it usually answers it for me

glossy scroll
#

getBlockData returns a copy of the blockdata, not a retro-active reference, right?

#

at least nothing in the code tells me that updating a blockdata reference will automatically reflect in the world

#

(just double checking here, ive tried modifying blockData and i think i forgot it works more like itemMeta)

drowsy helm
#

nah you have to set the data back iirc

glossy scroll
#

ok thats what i figured

noble lantern
#

okay buoo

#

this run should

#

theortically work

#

nvm

#

i suck

#

bbl

#

buoo stupid question

#

or is it a different casting

#

OH

drowsy helm
#

uh

noble lantern
#

its a default method and im overriding it 💀

#

ffs

drowsy helm
#

lmao

noble lantern
#

amazon needs to deliver my food im fucking up on simple stuff

drowsy helm
#

amazon delivers food?

noble lantern
#

yeh amazon grocery

#

free delivery too with prime on like 25$ or more

#

(not sponsored)

drowsy helm
#

oh damn

#

ive never used amazon before

loud haven
compact haven
noble lantern
#

its sooo buggy too

#

god i wish this was fuckin easier

#

oh

#

the one time i need code to block a thread

carmine nacelle
#

With mojang mappings, how hard would it be to "restrict" an entity from moving outside of X amount of blocks from a location

drowsy helm
drowsy helm
#

not really popular over here

noble lantern
#

i think

#

every move send i need to send absolute position packet

the npc collided client side and got knocked off course

real spear
#

I have no clue why this won't work

drowsy helm
#

or paper and spigot api or other way around

real spear
#

I did switch the project from paper to spigot using maven. im not sure how I would resolve this issue tho

#

I can send the pom file if u need that

carmine nacelle
#

Anyone know how to control entity AI with mojang mappings?

real spear
noble lantern
#

considering it has AI

carmine nacelle
#

hmmm...

#

but I cant like.. force them to stay within 25 blocks of a location or anything like that

noble lantern
#

yes

#

calculate the target vector from current location vector

#

.distance they have a method for it

carmine nacelle
#

Would I have to do that like..on move or..?

#

never used goals before

spring minnow
#

is it a bad idea to extend my "Item maker" class to ItemStack?

#

I already made that class with just an instance of ItemStack in it but by extending it i can remove a lot of lines of code

spring minnow
drowsy helm
#

lines of code in a class doesnt affect performance at all

#

its how it's executed

drowsy helm
spring minnow
spring minnow
# drowsy helm could you explain what you mean by this

Basically everytime I have to modify an item stack i convert it to an utility class that I called CustomItem, so I do new CustomItem(itemstack) and from there to change name I simply call the variable customitem.name(“”), so I don’t have to deal with item meta of the itemstack class

#

But I though that to simplify some methods I could simply make that class extend to ItemStack class directly, and I cut off lots of lines of code doing that

drowsy helm
#

so is CustomItem just an itembuilder or it also has functionality?

spring minnow
#

I just asked if it’s bad for performance to extend a class to another instead to make that class have an instance of that clas ls inside

spring minnow
drowsy helm
#

i mean if its just to make easy methods like that, you can just extend ItemStack

spring minnow
#

Ok, I was worried that doing this could lead to more memory usage since doing that I implement every method of item stack inside custom item class

drowsy helm
#

thats not how memory usage works

spring minnow
#

Oh-

#

So Java is not that primitive as I though

drowsy helm
#

no programming language works like that lol

#

the only "memory" you are really using is how big the jar will end up being. and it will be like 20kb more

ivory sleet
#

I mean you shouldn’t worry about prematurely micro optimizing like that

ebon pumice
#

For some odd reason, when I try and use &#F81D44 for my HubPvP Sword it comes out like this:
#F81D44

#

It's hard to show but some other servers use custom hex codes and it looks fine

ivory sleet
#

&#HEX is not official

#

Unless some plugin decided to support it, that wont work

ebon pumice
#

Okay so how did other servers do it?

#

With the same exact plugin

ivory sleet
#

Idk

#

First and foremost this is the wrong channel

ebon pumice
#

Well there has to be a way

ebon pumice
drowsy helm
#

plugin development

#

like coding

ivory sleet
#

You should ask plugin specific questions in the plugin author’s discord itself, or in #help-server (hint you may wanna read the channel descriptions)

ebon pumice
#

ah

drowsy helm
#

Anyone know the exact values to replicate the vanilla block break particles? seems so ahrd to get it exactly

tender shard
#

wtf is a Mnemonic bookmark

worn tundra
drowsy helm
worn tundra
#

Oh nice

drowsy helm
worn tundra
#

Barriers?

#

No?

drowsy helm
#

nah just some semantics to avoid certain roadblocks

worn tundra
#

Wym

drowsy helm
#

dw about it lol

worn tundra
#

Well why not share it

#

I've been using your custom guis thread to guide people for a long time

drowsy helm
#

didnt think people still used that lol ty. Pretty much if you want to avoid a block dropping items, you can either use breakNaturally and listen for the event (which is annoying). Or use player.breakBlock. Both viable but if you want to simulate clientsided block breaking (breaking blocks just visible to one player) neither of the methods really work too well

#

so im just trying to make it as controllable as possible

quaint mantle
worn tundra
#

Ohh alright got that, makes sense Ty

drowsy helm
#

theres probably some easier way to do it, but this works for me

worn tundra
#

No no this ones good

#

Exactly as you said, more control

noble lantern
#

Anyone got some good plugin ideas to make Eyes

drowsy helm
#

plugin that makes a plugin

noble lantern
#

wait

#

AABB vs AABB rly this simple?

drowsy helm
#

yeah its just boundingbox calcs

noble lantern
#

Only issue is, how would you calculate the exact point they intersected at?

opal juniper
#

could use vector math

#

but err, that would require doing it on 4 lines i think

#

so probably a better way

noble lantern
#

sad

tender shard
#

what's the difference between a mob's goalSelector and targetSelector? Both seem to do the exact same thing when I add a new goal myself

quaint mantle
#

One is named goalSelector and the other is targetSelector

noble lantern
#

Targetting is for like aggression of pussy runaway shit

#

goal selector is for a specific instruction of goal to execute in order

tender shard
#

hm well I didn't notice any difference in behaviour though

#

no matter whether I add a goal the goalSelector or targetSelector, it does the same thing

#

also pillagers are using the goalSelector instead of targetSelector for stuff like shooting bows

#

weird

naive bolt
#

why doesnt restricted: true work in my bungee config?

#

anyone can still join

onyx fjord
#

Would it be possible to remove this annoying popup with packet manipulation?

chrome beacon
#

No just let it be

solid cargo
#

Idk maybe a texture pack

hasty obsidian
#

Lingering potion cancel

shadow zinc
#

how do I find my github repo tag for adding to maven?

#
        <dependency>
            <groupId>com.github.KyTDK</groupId>
            <artifactId>NeoUtils</artifactId>
            <version>WHAT IS THIS</version>
        </dependency>```
shadow zinc
#

Yeah

noble lantern
shadow zinc
#

what?

dire marsh
#

just set enforcesSecureChat to true in the server data packet (ClientboundServerDataPacket mojmap) @onyx fjord

shadow zinc
#

how?

noble lantern
shadow zinc
#

I got one already

noble lantern
#

So you just use the tag name as version

shadow zinc
#

and I tried it

noble lantern
#

god mojang even made it easier for us by making the method remapped nicely!

onyx fjord
#

you know what that means right ?

shadow zinc
#

doesnt work

#

its doing that

noble lantern
dire marsh
shadow zinc
onyx fjord
dire marsh
#

yes good

onyx fjord
#

shalli use plib or packetevents

dire marsh
#

i used a server patch since i run my own paper fork

#

plib probs better

onyx fjord
#

the diff is that packetevents can be shaded

onyx fjord
#

can you share the patch? i also have my own fork

noble lantern
shadow zinc
#

oh

noble lantern
shadow zinc
#

i see

noble lantern
#

didnt read error

#

but you can view build logs there

shadow zinc
#

its remapped

noble lantern
#

sorry for spam guys

#

ahh

onyx fjord
#

all g brother

shadow zinc
#

do I just remove?

noble lantern
#

yeah you cant rly remap in jitpack

dire marsh
#

i'll find it

noble lantern
#

there might be a way

#

but, yeah just remove if your not using any remaps

onyx fjord
#

can plugins have swear words in names?

noble lantern
#

ye

#

plugin names are spigot sided

onyx fjord
#

u sure?

noble lantern
#

You can send from server -> client whatever

#

eg

#

Bukkit.broadcastMessage("n word");

#

now

#

clients might censor it like bedrock ones

#

but those dont get sent to mojang iirc

onyx fjord
#

i mean like on spigot site

#

the moderation aspect

noble lantern
#

OHHH

#

in the name hm

onyx fjord
#

i wanted to call it Fuck Popup

small current
#

now im gonna fork spigot

noble lantern
#

how about

small current
#

and do a check

noble lantern
#

F*ckPopUp

#

thats more likely fine

#

and seems nicer

small current
#

that if a plugin name contains a swear word

onyx fjord
#

Fvck Popup

small current
#

int won't load

noble lantern
#

oo

#

fvckpopup pretty clean ngl

noble lantern
onyx fjord
#

group id screw.microsoft

shadow zinc
#

Jitpack is giving me another error

#

why is it invalid?

noble lantern
#

because

#

your pom.xml

#

is set to jdk9

shadow zinc
#

bruh

#

but 9 doesnt work for me

#

i need var

noble lantern
#

hence why you change it to 16

#

or 17

#

whatever version 1.19 is on

shadow zinc
#

oh, why is that 9, bruh I thought i had it on 16

#

ffs

shadow zinc
noble lantern
#

on github its set to 9

#

you need to change it, and make a new tag

vivid cave
#

i want to make an algorithm to determine what the player is actually seeing
Obviously I can't guess which camera angle they chose in client settings
But which one should would be the standard one to use server side?
And any clue how I should implment the algorithm?
I thought about "get all the vectors between yaw,pitch - angle and yaw, pitch + angle" and "get all the vectors between yaw - angle, pitch and yaw + angle, pitch", put those vectors in BlockIterator to trace all the blocks in each direction (and break the loop if we got some solid non transparent block)
pitch and yaw being the eye location, angle being the viewangle I asked you above
I don't think it's the correct way to do that though, can I get some input?

noble lantern
#

outward*

#

looking direction never lies (Normally)

#

raytrace**

#

sorry

#

World has a method for it

vivid cave
#

It is not sufficient, raytracing is only for 1 direction

dire marsh
#

what are you trying to achieve

vivid cave
#

i mean yeah obviously i will raytrace at some point

#

Seeing all content that player is viewing, so everything that is displayed to their screens

#

not only the lineofsight, which is, as the name says, a sole line of blocks

dire marsh
#

what are you trying to display to their screens?

vivid cave
#

nothing

dire marsh
#

🤔

vivid cave
#

I'm trying to retrieve all the content that they are seeing

#

blocks especially

buoyant viper
#

making an orefuscator? duke

onyx fjord
#

lol wtf, why does protocollib have spigot jars in their maven repo

noble lantern
buoyant viper
#

could be mirroring the repo couldnt they

buoyant viper
#

like paper mirroring mojangs

onyx fjord
#

1.19.1 doesnt seem to be complete jar tho

#

its 19 mb

noble lantern
#

sounds like vanilla jar

dire marsh
#

protocollib virus

noble lantern
#

ohno

#

anyways nms remapped packets

#

who needs protocol lib anymore

buoyant viper
#

my god is mc really that big now

#

1.8 is like 8mb

dire marsh
#

eh, @onyx fjord probs better off using packet events now that I think about it

noble lantern
dire marsh
#

otherwise you will get 1 star reviews from noobs asking why no work if they dont install protocollib

buoyant viper
#

just to Suffer?

onyx fjord
#

or im looking in wrong place

noble lantern
#

1.19

dire marsh
#

packetevents is easy

noble lantern
dire marsh
#

i can help

noble lantern
#

until you try aabb

onyx fjord
#

ok

#

i can shade it right?

shadow zinc
#

just made a 911 joke to my mum

noble lantern
#

or

shadow zinc
#

also

dire marsh
#

yes

noble lantern
#

NMS Remapped packets...

dire marsh
#

what are you using, gradle?

shadow zinc
#

I cant figure this thing out

noble lantern
#

NMS PACKETS REEEEE

onyx fjord
buoyant viper
#

i worked with the MC client itself

noble lantern
#

NMS REMAPPED PACKETS

onyx fjord
#

shut up

buoyant viper
#

ur tellin me

dire marsh
#

ok 1s

shadow zinc
#

why cant it use my current branch?

onyx fjord
#

vscode?

buoyant viper
#

git gui lolxd

noble lantern
#

really???

#

By chance

buoyant viper
#

i used to make MCP clients lole

noble lantern
#

do you know how to make an entity not collide into a block client side...

#

via packets

#

without aabb

#

example

buoyant viper
#

if block there no it isnt 😎

noble lantern
#

ill just have it detect a block in front and make it scream in chat for someone to break it

buoyant viper
#

well was there actually a block in the entity pos or was it just weird animation stuff

#

try adjusting x and z +0.5

noble lantern
#

i need to log the points i have

buoyant viper
#

actually nvm thats not what looks to be happening

noble lantern
dire marsh
#

https://github.com/retrooper/packetevents/wiki/Setup-2.0#using-gradle @onyx fjord

Add jitpack repo
Then add dependency, e.g:

implementation("com.github.retrooper.packetevents:spigot:2.0-SNAPSHOT") {
    exclude("net.kyori")
}

Shadow:

tasks {
    build {
        dependsOn(shadowJar)
    }
    shadowJar {
        relocate("io.github.retrooper.packetevents", "YOUR_PACKAGE.libs.io.github.retrooper.packetevents")
        relocate("com.github.retrooper.packetevents", "YOUR_PACKAGE.libs.com.github.retrooper.packetevents")
    }
}
noble lantern
#

sometimes

#

its nice

dire marsh
#

in kts but should work / be easy to convert

noble lantern
#

im suprised theres no like collides property for the packet

buoyant viper
#

it actually looks like ur already offsetting by 0.5 (or 1?) somewhere

#

like the center of that npcs aabb is at the 0,0 of a block

#

lolwtf

onyx fjord
noble lantern
#

i set the location to locations returned from ollies pathfinding

#

Should i try and make the ending floating point .50?

buoyant viper
#

maybe

dire marsh
buoyant viper
#

either +0.5 or +1

noble lantern
#

** by chance you got a copy paste it for doing that with doubles **

buoyant viper
#

?!

noble lantern
#

actually

#

nvm im not that bad at math

buoyant viper
#

0.5D

#

smh

noble lantern
#

Math . round

#

then add

#

.5D

buoyant viper
#

hm

noble lantern
#

well no

#

cause 5.6 would round up actually

#

i assum int casting does same thing huh

buoyant viper
#

possibly

#

whats ollies pathfinder btw

noble lantern
#

its amazing

buoyant viper
#

worst comes to worst implement baritones pathfinding server side uwu uwu

#

and then cry

noble lantern
#

nono

#

this is waaaay better

#

cause async

#

plus its stupid fast ngl

#

vid sending

grim ice
#

are questions about automatically solving captchas allowed here

noble lantern
noble lantern
#

ik damn well i dont

shadow zinc
#

Burchard I still got the same issue, my current version tag is 1.2 and its on 16, but it still thinks im on 9, it using a lower version, how do I fix that?

noble lantern
#

if jitpack errors its a long drawn out process most times

#

typically gotta fuck with some type of config

shadow zinc
#

i would rather neck myself

#

k thanks for the help

noble lantern
#

here

#

idk if

#

i used that when i had an issue or not

#

but, might work

#

oh

#

yah it is the fix

#

lmao

hot wolf
#

Anyone who knows H2/SQL? Because I can only find the same stackoverflow post and it doesn't seem to work.
I want to UPDATE if it exists and INSERT if not. But how?

#

btw I don't use the row to indentify. I use the playerUUID as a "key"

noble lantern
#

making floating point .5 is actually nuts

#

YOO

#

I THINK I GOT IT

noble lantern
#

or actual mysql

hot wolf
#

idk tbh, I use H2 I think it's a seperate SQL dialect isn't it?

noble lantern
noble lantern
#

SQLLite, H2, MySQL will all have slight syntax differnces

hot wolf
#

Cuz idk if H2 supports UPSERT (Insert + Update) and Merge into seems to not work, even though it doesn't throw any errors.

grim ice
#

yall

noble lantern
#

Yeah UPSERT is postgre thing for H2 it seems from my searches, you said merge doesnt work?

grim ice
noble lantern
#

my brains totally fried from code

#

or a vid of the captcha

grim ice
#

bro if i knew i wouldnt ask

noble lantern
#

oh

grim ice
#

it basically

#

what i know

#

is

formal bear
#

How to set owner of skull if im using GameProfile with random uuid?

grim ice
#

it sends u smth along the lines of

#

"what is 4 and 9"

hot wolf
# noble lantern Yeah UPSERT is postgre thing for H2 it seems from my searches, you said merge do...

Not for me atleast. I'll see if it actually enters the loop, but this doesn't seem to work:

 public static void saveData(){
        HashMap<UUID,Homes> homesHashMap = Maps.getHomesHashMap();
        for(Map.Entry<UUID,Homes> entry:homesHashMap.entrySet()){
            try{
                Connection connection = Database.getConnection();
                PreparedStatement statement = connection.prepareStatement("MERGE INTO Homes KEY(PlayerUUID) VALUES ( ?,? );");
                statement.setString(1,entry.getKey().toString());
                statement.setObject(2,entry.getValue());
                statement.execute();
            }catch (SQLException ex){
                System.out.println(ex);
            }
        }
    }
grim ice
#

and gives u a list of answers in chat and if u click one

#

it sends it to the backend

#

then

#

it checks it there

noble lantern
#

Google may have the answer

#

pretty sure GameProfile can handle it

hot wolf
noble lantern
#

or random questions that are multiple choice

formal bear
noble lantern
grim ice
grim ice
#

i can make a solver for math questions but

#

the thing is

#

how the fuck

#

do i send it to the backend

noble lantern
noble lantern
quiet ice
#

Parse the Options and perform the command

grim ice
hot wolf
#

They really could've made update insert if there's nothing to update lol

grim ice
#

it's a forge mod

#
 return new DialogBuilder()
                .MsgLine($"What is {McColorCodes.AQUA}{first} {McColorCodes.GRAY}{word} {McColorCodes.AQUA}{second}{McColorCodes.GRAY} (click correct answer)", null, "anti macro question, please click on the answer")
                .ForEach(options, (d, o) => d.CoflCommand<CaptchaCommand>(o.Text, o.Code, "Click to select " + o.Text));```
#

this is how he sends

#

the captcha

#

it's in csharp

noble lantern
quiet ice
#

Why are Forge mods in C#?

grim ice
#

its a backend for a forge mod

quiet ice
#

No Wonder modded Minecraft Takes ages to load

grim ice
#

the front end is in java

quiet ice
grim ice
#

i scanned the whole front end man

#

i couldnt get a clue

quiet ice
#

If the source is Not available, Recaf is your friend

grim ice
#

it is available

#

open source in github

noble lantern
#

open a pr to remove the captcha

grim ice
#

lmfao

quiet ice
#

Then wait a min, I'll Look at it

grim ice
noble lantern
#

gonna sleep, having a hard time typing sentences without adding ; to the end kek

grim ice
hasty obsidian
#

Does anyone know what does the damage from a lingering potion classify as?

quiet ice
#

If I Had to guess, there is No captcha

grim ice
#

wait

#

how

#

u mean it's a trick or smth

#

i dont think so

hasty obsidian
#

I am trying to make this plugin where the Warden is immune to all kinds of damage except for melee but when I cancelled the potions the lingering potion of harming for some reason still works

quiet ice
#

There is only CoflSessionManager but that one does Not describe your captcha

grim ice
#

hmmm

#

but i think i caught how they're doing stufff

#

so basically the command isnt registered on the client

#

it gets sent to the client with a socket

#

then when the client

#

sends an unknown command

#

it sends it to the backend

quiet ice
#

Nah

grim ice
#
 
    public void SendCommandToServer(String[] args, ICommandSender sender) {
        String command = String.join(" ", Arrays.copyOfRange(args, 1, args.length));
        
        //JsonStringCommand sc = new JsonStringCommand(args[0], WSClient.gson.toJson(command));
        RawCommand rc = new RawCommand(args[0], WSClient.gson.toJson(command));
        if(CoflSky.Wrapper.isRunning) {
            CoflSky.Wrapper.SendMessage(rc);
        } else {
            sender.addChatMessage(new ChatComponentText("CoflSky wasn't active.").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
            CoflSky.Wrapper.stop();
            CoflSky.Wrapper.startConnection();
            CoflSky.Wrapper.SendMessage(rc);
        }
        
        
    }```
peak depot
#

Hey I try using maven for the first time and I added the spigot api in the pom.xml but I wont work like theres not JavaPlugin, CommandExecutor etc here my pom https://paste.md-5.net/fahodenesu.xml

quiet ice
opal juniper
#

try invalidating caches @peak depot

#

your indenting is kinda messed up tho

quiet ice
#

Hence the command is actually registered

grim ice
#

yeah i meant the args

#

what im missing rn

#

is the args

peak depot
#

@noble lantern ?

noble lantern
#

do what ollie said

sly venture
#

If I click 1, how can I operate the event?

peak depot
opal juniper
#

does maven give an error

peak depot
#

no

opal juniper
#

i doubt that

noble lantern
#

got weird numbers

peak depot
noble lantern
#

Bukkit.broadcastMessage the click events e.getSlot

you can find theyre number there

peak depot
#

pom was in target folder

opal juniper
#

lol

peak depot
noble lantern
#

yep, theres a thread on spigot that shows the slots but the numbers of slots are outdated sadly

#

wonder whos gonna do that 👨‍🦯

peak depot
#

how can I set items in anvil?

solid cargo
#

ok so this

if (e.getItem().getItemStack().equals(new ItemStack(Material.ENDER_PEARL))) {
e.setCancelled(true);
}``` 
works if only there is one epearl to pick up
#

PlayerAttemptPickupItemEvent btw

formal bear
#

I think it's because default amount is 1?

solid cargo
#

yeah thats what i figured out

bitter path
tawdry finch
#

how do i update my spigot plugin to the latest verstion>

#

?

#

bc i got the error

#

'''This server is running Paper version git-Paper-"86f87ba" (MC: 1.19) (Implementing API version 1.19-R0.1-SNAPSHOT) (Git: 86f87ba)'''

chrome beacon
#

What error

#

?paste

undone axleBOT
tawdry finch
# chrome beacon What error

This server is running Paper version git-Paper-"86f87ba" (MC: 1.19) (Implementing API version 1.19-R0.1-SNAPSHOT) (Git: 86f87ba)

tardy delta
#

What error lol

tawdry finch
#

oh shit

#

mb lol

#

one sec

#

java.lang.IllegalArgumentException: Plugin already initialized!

chrome beacon
#

Don't create a new instance of your main class

#

inv is null. Check before using it

tawdry finch
bitter path
#

Will anyone make me a plugin for me for free dm me

rotund pond
solid cargo
#

ahhh ok

tawdry finch
#

ngl i cant see what ive done wrong 😢

#

lmao

solid cargo
#

instead of doing Main.getInstance() in main class, do this

tawdry finch
#

in my main?

hasty obsidian
chrome beacon
tawdry finch
#

okay so what should i be looking out for ?

chrome beacon
#

new Main()

tawdry finch
#

i havent got anything like that anywhere

rotund pond
chrome beacon
tawdry finch
#

oki

frosty tinsel
bitter path
#

Where can i learn java?

#

website

frosty tinsel
#

?learnjava

undone axleBOT
tawdry finch
#

i saw the error lmao i had a final in there

#

actully

#

what should i change it too

#

this is line 13

#

public final class Main extends JavaPlugin {

frosty tinsel
#

Whole

tawdry finch
#

oki

#

?paste

undone axleBOT
tawdry finch
frosty tinsel
#

Sry

#

It's actually in Loadusd.java at line 12

tawdry finch
#

hmm that makes no sense

#

because thats an import

#

?paste

undone axleBOT
tawdry finch
eternal oxide
#

you don;t extend JavaPlugin twice

#

ONLY in your main class

#

?di

undone axleBOT
tawdry finch
#

AHH okay

#

ty

frosty tinsel
tawdry finch
#

what can i swap it too?

frosty tinsel
#

?

#

Nothing, just the commandExecutor

twilit roost
#

How can I include local JAR Api into Maven Build?

eternal oxide
#

did you build the api jar?

twilit roost
#

its downloaded from Internet
its CMIApi

eternal oxide
#

no clue what that is

chrome beacon
#

oh no CMI

twilit roost
#

¯_(ツ)_/¯

#

i tried this:
but as u can see, errors

chrome beacon
#

Don't do that

#

Install the jar to your local maven repo

twilit roost
#

how tho?
via mvn cmd ?

#

oh right thx

peak depot
eternal oxide
twilit roost
#

ye thats where Im taking the APi from

eternal oxide
#

you can use it in via maven using...

#

I forget teh name. one sec

tawdry finch
twilit roost
eternal oxide
#
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>```
twilit roost
#

ye 😄

#

btw what is the ID?
its the name ?

eternal oxide
#

just as you already have it

#

except github

twilit roost
#

i meant how do I get that?
if i would know the id

chrome beacon
#

and remove system and systemPath

#

You can paste the github link in to jitpack

#

and it will tell you

eternal oxide
#

com.github.Zrips.CMI-API or ^

twilit roost
#

ooh

#

ok I got this from jitpack

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>


<dependency>
    <groupId>com.github.Zrips</groupId>
    <artifactId>CMI-API</artifactId>
    <version>Tag</version>
</dependency>
#

buuut I still get

eternal night
#

Tag is most likely not the version

twilit roost
#

changed it to last releaased version on GitHub and still same error

eternal oxide
#

jitpack says latest version is 8.7.8.2

twilit roost
#

yep I tried it with 8.7.8.2 but still it can't find anything

eternal oxide
#

ah looks like it can't be built as its not a maven project

twilit roost
#

but the error says it can't be find in sonatype
isnt that also a repo?

eternal oxide
#

maven searches all your defined repos

#

You will have to do as Olivo said earlier, install it locally

twilit roost
#

well imma try therefore

peak depot
#

what the command for packets?

#

on the dc

eternal night
#

he ?

#

don't think I have ever seen a command specific for packets. What does that command even provide

twilit roost
#

but yet im not doing anything in this folder

jade roost
#

i finished codecademy

#

i want to ask

#

where can i learn

#

spigot

#

?learnjava

undone axleBOT
chrome beacon
#

Didn't you say you already watched like 50 spigot videos

jade roost
#

right

#

but

twilit roost
#

practice

jade roost
#

i want to go advance

#

xd

#

someone said

#

to go thru the course again

twilit roost
undone axleBOT
jade roost
#

a

#

i am gonna go learn more jaa