#help-development

1 messages ยท Page 1685 of 1

quaint mantle
#

reflection, however, is possible

minor garnet
#

no man,

quaint mantle
#

ah yes

#

yes man

minor garnet
#

man, that's not what I wanted

quaint mantle
#

you cannot invert

#

but you can reflect

#

im not sure exactly why this is

lost matrix
#

This would be my proposal for a really simple custom mob wrapper
that can be used if you dont want to get into NMS:

public class CustomMobWrapper {

  private final LivingEntity entity;
  private int ticksAlive;
  private final Map<Ability, Integer> abilityCDMap = new HashMap<>();

  public CustomMobWrapper(final LivingEntity entity) {
    this.entity = entity;
  }

  public void tick() {
    ++this.ticksAlive;
    this.abilityCDMap.forEach((abil, cd) -> {
      if (this.ticksAlive % cd == 0) {
        abil.executeFor(this.entity);
      }
    });
  }

  public void addAbility(final Ability ability) {
    this.abilityCDMap.put(ability.getCooldown(), ability);
  }

}
minor garnet
#

i've already made the code that changes the player's camera position

quaint mantle
#

ok

#

so then what is the issue

minor garnet
#

go to your minecraft options

quaint mantle
#

you cannot make the camera zoom in or out is what im trying to say

#

xD

minor garnet
#

find this option:

quaint mantle
#

you cannot change the fov

#

without modifying the client

#

thats crazy

ivory sleet
#

guys calm down

minor garnet
#

I've done it too, but it's not what I want, wait for me to finish talking

quaint mantle
#

ok

lost matrix
olive lance
#

Not spigot but where can I find javascript functions like getting system time and stuff

quaint mantle
minor garnet
#

go to your minecraft option: find this option, activate it and go back to the game and move your camera sideways

quaint mantle
#

ok sec

ivory sleet
olive lance
#

I tried finding it I am blind

minor garnet
#

i'm sorry, but I'm confusing saying perspective with cinematic..

quaint mantle
#

OH

#

THIS

#

yeah

olive lance
#

Ty

lost matrix
quaint mantle
#

hmmmmmm

#

imma be honest

ivory sleet
quaint mantle
#

i dont believe you can do what youre asking

minor garnet
#

obvious

olive lance
#

ty guys for the references

minor garnet
#

I just want to make a system that the player's camera moves to the same side like this using spigot

lost matrix
minor garnet
#

i plan to use this feature for other systems, but now the part and how to make it move fast, then slowly and slowly...

lost matrix
#

You can however record a fixed track with a List<Location> that include the rotation
and then force the player each tick to be teleported to the next Location in the track.

minor garnet
#

wait

#

I have a scheduler running at 60 tps so I don't use 1 tick to make the camera move smoother

lost matrix
#

You can also write an interpolation algorithm that works with waypoints and delta timesstamps.

minor garnet
#
    Set<PacketPlayOutPosition.EnumPlayerTeleportFlags> set = new HashSet<>(Arrays.asList(
            new PacketPlayOutPosition.EnumPlayerTeleportFlags[] { PacketPlayOutPosition.EnumPlayerTeleportFlags.X,
                    PacketPlayOutPosition.EnumPlayerTeleportFlags.Y, PacketPlayOutPosition.EnumPlayerTeleportFlags.Z,
                    PacketPlayOutPosition.EnumPlayerTeleportFlags.X_ROT,
                    PacketPlayOutPosition.EnumPlayerTeleportFlags.Y_ROT }));

    public void camera(final Player player, final float y, final float x) {
        PacketPlayOutPosition packet = new PacketPlayOutPosition(0.0D, 0.0D, 0.0D, x, y, this.set, 0);
        ((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
    }```
minor garnet
quaint mantle
#

could you just set packetplayoutposition to exact coordinates?

minor garnet
#

I would really need to create something that does that, but I don't have the slightest idea

lost matrix
#

Player movement is not fully server authoritative. You can get away with 20 TPS and velocities pointing to the next location. Let the client do some work.

minor garnet
#

16.67 ms = 60 tps scheduler

crimson terrace
#

is there a way to grab the plugin version from the pom.xml?

lost matrix
#

Ah i see. In most cases recoil can just be done my lifting the crosshair a bit.
If you want smooth animations then you should def build an animation system which
allowes mid animation cancelling + merging animations first.

crimson terrace
# lost matrix From where?

I want to grab it from my plugin to check wether the config is up to date or not so I can tell people to update the config

lost matrix
#

.bat btw

crimson terrace
#

I just read something about PluginDescriptionFile.getDescription().getVersion()

lost matrix
#

"from the pom.xml?" ...

crimson terrace
#

honestly just a string with the version so I can compare it

#

sorry if I was confusing

#

I confuse myself most the time

lost matrix
crimson terrace
#

thank you ๐Ÿ™‚ I really appreciate the work you do here

round finch
#

spigot soft vs not soft dependency?

#

net.luckperms.api.LuckPermsProvider from LuckPerms v5.3.65 which is not a depend, softdepend or loadbefore of this plugin.

formal dome
#

can't figure out why my hikariCP connection doesn't connect.

#

can i post a stack trace/code?

cold pawn
#

How would I go about making a players armor invisible?

#

Ik packets ofc but what would I have to put in the PacketPlayOutEquipment?

lilac dagger
#

the raw slot usually

#

the entity's id, enum item slot and the nms itemstack

lost matrix
lost matrix
formal dome
#

?paste

undone axleBOT
lost matrix
#

Do you use maven?

formal dome
#

i'm using gradle

lost matrix
formal dome
#

this one? id 'io.spring.dependency-management' version '1.0.1.RELEASE'

#

i know i tried adding a certain plugin in for it... btw that's from my build.gradle file

eternal oxide
#

if using 1.17.1 use the libraries entry in plugin.yml

formal dome
eternal oxide
#
libraries:
    - com.h2database:h2:1.3.159```
formal dome
lost matrix
eternal oxide
#

its a maven central repo address

unreal quartz
#

1.16.5

eternal oxide
#

late in 1.16.5

lost matrix
#

lul. Noice.

reef pelican
#

I suppose it is a channel to ask questions I do not know because I speak Spanish but what plugin do you recommend for ranges and permissions. Permissionex or luck?

#

In my time it was widely used in permission but I see that now half the world uses luck

eternal oxide
#

GroupManager or Luckperms

#

Spit on Pex

reef pelican
#

Thanks!

formal dome
eternal oxide
#
libraries:
    - com.zaxxer:HikariCP:5.0.0```
formal dome
#

i also have the required lines in my build.gradle file... will this make a difference?

eternal oxide
#

gradle is for building/packaging

#

libraries in plugin.yml means you don;t need to package/shade any dependencies in your jar

halcyon mica
#

Has seriously no one ever worked and tried to expand the vanilla pathfinding?

halcyon mica
#

what

#

This literally has nothing to do with the spigot abstraction

#

Nor is it something that can be pred

#

This is about the underlying server

dire marsh
#

wdym expand

halcyon mica
#

I need to modify the vanilla pathfinding to allow a entity to climb ladders

#

While entities themselves can infact climb ladders, the pathfinding does not account for it

dire marsh
#

iirc paper has mob goal api and such

halcyon mica
#

This is unrelated to goals

#

This is about pathfinding

#

Not ai

dire marsh
#

I am pretty sure there is pathfinding stuff as well

#

let me check

halcyon mica
#

Unless paper is modifying the Path Navigation, Pathfinder and MoveController, no

formal dome
#

well @eternal oxide that actually worked.. i'm getting a different exception. at least i can try to work through that for now

dire marsh
formal dome
#

still kinda curious as to why i couldn't get the hikariCP dependency to compile via the build.gradle

dire marsh
hasty prawn
halcyon mica
#

Again

#

I am not working with goals

#

Or ai

dire marsh
#

You need goals to set pathfinding targets...

hasty prawn
#

Still, if they modified Goals I wouldn't be surprised if they modified Pathfinding as well.

halcyon mica
#

I am not trying to set pathfinding targets

#

I am trying to modify the pathfinding

eternal oxide
halcyon mica
hasty prawn
#

Not what I meant.

halcyon mica
#

Goals don't interact with the pathfinding beyond telling it to "go to there"

hasty prawn
#

I'm aware lmao.

halcyon mica
#

The paper stuff is just wrapping the vanilla pathfinder for allowing access to it on the abstracted layer

#

Since it is usually hidden away in nms

#

It's not messing with the actual path generation, or allow modifications to it

formal dome
eternal oxide
#

shading is adding any dependencies you specify into your final jar. That bit you don;t have gradle configured to do.

#

However you don;t need it with the libraries feature

#

Using libraries keeps your jar smaller and removes any needs to relocate dependencies

formal dome
#

ahhh there was a bit in the file about adding a dependencyManagemet block in the build.gradle... but i couldn't get the methods to work right

dire marsh
#

@halcyon mica what exactly is it that you need

formal dome
#

very cool feature

#

bravo md5~

halcyon mica
#

Mobs can infact climb ladders, but pathfinding ignores them

hasty prawn
#

Probably just need to Override createPath() in GroundPathNavigation. It seems like it only creates a path if their target block is Air.

#

Moj Maps for names also ^

#

Seems like that would be a good place to start atleast

halcyon mica
#

The navigation is not actually what judges nodes

dire marsh
#

ask on paper discord

#

there are much more experienced people there

torn vale
#

How can I enable the Event, if the command gets send? I want to make a godmode command ๐Ÿ˜„

undone axleBOT
torn vale
paper viper
#
if (e.getCause() == EntityDamageEvent.DamageCause.BLOCK_EXPLOSION) {
            e.setDamage(0.0);
            e.setCancelled(true);
        }
        if (e.getCause() == EntityDamageEvent.DamageCause.ENTITY_ATTACK) {
            e.setDamage(0.0);
            e.setCancelled(true);
        }
        if (e.getCause() == EntityDamageEvent.DamageCause.ENTITY_EXPLOSION) {
            e.setDamage(0.0);
            e.setCancelled(true);
        }
        if (e.getCause() == EntityDamageEvent.DamageCause.CONTACT) {
            e.setDamage(0.0);
            e.setCancelled(true);
        }
        if (e.getCause() == EntityDamageEvent.DamageCause.CUSTOM) {
            e.setDamage(0.0);
            e.setCancelled(true);
        }
...

don't do this

#

please

#

Instead, use an EnumSet and store the DamageCauses

#

then check if it contains the cause

formal dome
#

if i include my username and password in my db.properites file... when it comes time for deployment that seems really easily accessible...

quaint mantle
#

Can someone help me please. :

#

main needs to extend javaplugin

#

and dont name it main name it your plugin name

#

ok

wispy bridge
#

You could store a Set* of UUID's of players that have ran the godmode command, then check if the entity being damaged's UUID is in that list, then just cancel the event

#

Although I am confused as to what the setDamage bit is for, cancelling the event prevents any damage from being applied, you dont need to specify

quaint mantle
#

Set

wispy bridge
#

Right

lost matrix
quaint mantle
#

but

#

its better to save persistence

#

keeps it even on restart

#

(Optional!)

wispy bridge
#

Datacontainers might be a bit complex for a beginner

quaint mantle
#

learn early

#

?pdc

halcyon mica
#

So I have created a custom entity with a custom NMS entity as a handle. It is using the pillager entity type for rendering etc on the client, but here's the issue:
When restarting the server, the entity becomes a regular pillager. How can I have it stay a unique entity after restart?

formal dome
shadow tide
#

Plugin Main class not found

halcyon mica
#

Oh damn, true

#

Threads exist

#

Terribly underused

wispy bridge
#

Based

shadow tide
#

look at it

lost matrix
lost matrix
#

So that minecraft uses it to deserialize them.

halcyon mica
#

So I assume a custom entity type is necessairy?

lost matrix
#

You could use a workaround and just save your data in the PDC of the entity, then listen for
the chunkloadevent and replace them with your own entity.

formal dome
#

Im considering if a central database would be plausible or installing one locally

lost matrix
halcyon mica
lost matrix
halcyon mica
#

I suppose a custom entity type will work

#

But the question is, how will it work with the client

#

Since the server sends the entity type identifier to the client for rendering

lost matrix
#

How do you let the client know the type of the entity?

halcyon mica
#

Right now, I simply inherit the nms mob entity and pass the pillager as it's entity type

#

Which is then used to serialize the entity to be sent to the client

#

But the same applies to chunk serialization on save

#

Which leads to them becoming regular pillagers on restart

lost matrix
#

Thankfully minecraft gets more data driven with every update. But currently a lot is still a bit obscure.

halcyon mica
#

Hm, I see

lost matrix
#

I think you provide a Supplier<T extends Entity> somewhere that is used for instantiation. But dont quote me on that. Ive done this a while ago.

halcyon mica
#

I'll verify it in a bit

lost matrix
#
            EntityTypes.b<? extends net.minecraft.server.v1_16_R1.Entity> nmsCreator = (entityType, world) -> {
                try {
                    return constructor.newInstance(entityType, world);
                } catch(InstantiationException | IllegalAccessException | InvocationTargetException e) {
                    throw new RuntimeException(e);
                }
            };

EntityTypes.b
Looks to be a functional interface taking type, world and producing the entity.
You'll be fine

halcyon mica
#

The issue is less the registry and instantiation, and more serialization to the client

#

Because while it is considered a custom entity by the server, the client has to see it as a pillager

#

(Or whatever other entity I pick as its representation)

#

I remember having a remap util to remap from mojmap to onfuscated, can someone link me to that?

#

I need it for reflection

#

Actually, nevermind

#

I don't need reflection to register a type

halcyon mica
#

@lost matrix What event would I register the entity type at?

lost matrix
halcyon mica
#

Oh, I already have the registry code

#

I meant what bukkit event to have it happen before any world shennanigans

lost matrix
#

oh event. Ive read that as "What even would I register the entity type at"

lost matrix
#

in the plugin.yml

load: STARTUP
winged anvil
#

So

pastel hemlock
#

Is there a way to make a hoe break dirt at the same speed as a shovel

waxen plinth
#

Not unless you give the player haste

sour mica
#

What is the expected outcome if a plugin fails to clean up an async repeatable task as the server shuts down - does the scheduler throw a stacktrace or is it suppressed / warned ?

dusk needle
#

is there are any plugins that give custom % of damage received with armors

ivory sleet
torn oyster
#
 if (p.getInventory().containsAtLeast(new ItemStack(Material.STAINED_CLAY, t.getWoolColor()), 1)) {
                    System.out.println("contains item");
                    p.getInventory().remove(new ItemStack(Material.STAINED_CLAY, t.getWoolColor()));```
#

why no work

#

it contains item

dusk needle
#

i cant belive there is no public plugins for that

#

i mean i searched a lot

#

most dont work and rest dont have this feature

#

such basic feature

chrome pewter
#

Can anyone help me please

#

public void InitPathfinder() {
super.initPathfinder();
this.goalSelector.a(1,new PathfinderGoalFloat(this));
}
}

#

the goalSelctor isn't working

#

??

quaint mantle
#

is there a fullproof way to make pvp normal (so you can spam click)

#

in 1.17

#

and disable cleaves for sword

quaint mantle
#

Just containsAtLeast(Material.STONE) for example

shadow tide
#

#help-development message
I'm not asking to ask the question is in the top of the thread, can someone please at least check it out?

frosty tinsel
#

goalSelector -> bP

chrome pewter
#

Sorry I don't understand can you edit my code please

lean gull
#

can someone help me? i made a custom crafting gui, but it has some bugs

code for the events of the gui: https://hastebin.com/ibitububub.java

bug 1: when i put a recipe that is not just 1 item i have to click an allowed slot in the gui to update it and only then it puts the result in the result slot
bug 2: after i do bug 1 and take the item from the result slot it will remove 1 of each item in the crafting grid, let me take the item but then it will put another one in its place, then if i take that one it will just give me another one and disappear from the result slot"

lost matrix
lean gull
#

idk

copper dove
#

Hello, can anyone give me a hand?
I've got a class that reads a lot of data and then has to store it

lean gull
#

config files

copper dove
#

let me type ๐Ÿ˜‚

#

So I've got it all in a config file like so:

#
illnesses:
  slowvid:
    # Name of illness
    name: "Slowvid-19"
    # Percentage chance of horse getting it
    percentage: 5
    # prevent illness from recurring again
    preventReccuring: true
    # You'll get an error in console if this is not recognised
    potionEffectType: "SLOW"
    # Multiplier of potion effect
    multiplier: 3
    # Command to vaccinate horse.
    # Keep in mind it will be after /vaccine, for example
    # /vaccine slowvid
    command: "slowvid"
    # Permission for vaccine command
    permission: "horse.vaccine.covid"
#

And then I read through this using a for loop

#

And I have all my data in the respective strings and integers

#

So in my IllnessManager.java class I've got a string called 'name' which can successfully read the data from the config file

#

Only thing is I want to have mutliple illnesses

#

e.g.

#
illnesses:
  slowvid:
    ...
  anotherone:
    ...
#

How should I store all of the data within my class so I can easily access it? Like should I dump it all in a list?

lost matrix
copper dove
#

So in the map you've specified <String, Illness>
How would I create an Illness object? You can send me a wiki on it or something - new to java ๐Ÿ™‚

eternal night
#

might want to follow a java tutorial first then to learn the base concepts

#

?learnjava

undone axleBOT
eternal night
#

has some nice starter tutorials ^

lost matrix
frosty tinsel
copper dove
#

So I should be able to use an Enum

lost matrix
copper dove
#

Thank you! I'll fiddle around for a bit and do some research and try and get it working ๐Ÿ˜„

#

Thanks for your help @lost matrix and @eternal night

lost matrix
# copper dove Thanks for your help <@!220605553368498176> and <@!202850073812402177>
public class IllnessManager {

  public final Map<String, Illness> illnessMap = new HashMap<>();

  public Illness getIllnessFromName(final String name) {
    return this.illnessMap.get(name);
  }

  public void loadFrom(final FileConfiguration configuration) {
    final ConfigurationSection illnessGroupSection = configuration.getConfigurationSection("illnesses");
    for (final String illnessName : illnessGroupSection.getKeys(false)) {
      final ConfigurationSection illnessSection = configuration.getConfigurationSection(illnessName);
      final Illness illness = new Illness(illnessSection, illnessName);
      this.illnessMap.put(illnessName, illness);
    }
  }

}
public class Illness {

  public Illness(final ConfigurationSection section, final String name) {
    this.name = name;
    final String effectName = section.getString("potionEffectType");
    this.potionEffect = PotionEffectType.getByName(effectName);
    this.percentage = section.getInt("percentage");
    // And so on
  }
  
  private final String name;
  private final PotionEffectType potionEffect;
  private final int percentage;

}

You should be able to figure out the rest.
If not then i recommend the tutorials from above ^^

eternal night
#

๐Ÿฅ„

#

smh

copper dove
quaint mantle
lean gull
#

what kind of logic is that

crude charm
#

are you joking or...

lean gull
#

what

#

i thought they were asking how to store variables

crude charm
#

yes

#

why tf would you use a config

#

for storing alot of data

quaint mantle
lean gull
#

um you should read their name again

#

also how they bein kind

#

oh wait ur talkin about urself

quaint mantle
#

yeesh butthurt are we?

lean gull
#

???

#

vro you ain't makin sense

#

?

#

use ?paste

#

what's with people not making any sense today

#

???

tall dragon
#

@lean gull why not use a loop

#

instead of using duplicated code

lean gull
#

idk

tall dragon
#

๐Ÿ™ƒ

lean gull
#

i'm not judging people on their java skills?

#

vro wtf is going on today

#

then why u mad

#

is there like a requirement to judging people?

quaint mantle
#

lol

lean gull
#

you must be this high and know this much java to judge people?

quaint mantle
#

i think you need to look at a mirror @lean gull

lean gull
#

i swear everyone here is conspiring against me to confuse me ๐Ÿ‘€

quaint mantle
#

please get some thicker skin

lean gull
#

see? i told you i'm not crazy!

#

i told you all!

#

wtf is that even supposed to mean, your langauge sounds like it comes from a mumble rap community

quaint mantle
ivory sleet
#

?ban @hybrid spoke disrespectful behavior

undone axleBOT
#

Done. That felt good.

ivory sleet
#

Stop harassing

lean gull
#

what

stone sinew
#

What did he do?

quaint mantle
#

tf

stone sinew
#

I was reading his message he replied to me xD

lean gull
#

even i don't think that's a good reason to mute

stone sinew
lean gull
#

i mean ban'

quaint mantle
#

he banned he didnt even mute

lean gull
#

i mean ban, ok?

ivory sleet
#

Iโ€™m tired of people being uncivilized here now

lean gull
#

um ok

stone sinew
#

He said something about math so I'll reply to that...

Derpy posted specific slot integers no math could be used to get them...

quaint mantle
#

damn

lean gull
#

um

#

1 loop for adding 1, 1 loop for adding 9

#

ezpz

tall dragon
#

dont mess with @ivory sleet ๐Ÿ˜ฌ ๐Ÿ˜‚

ivory sleet
#

And for the record, that was not the first time he did something like this.

lean gull
#

i'd do it but it's not more readable imo

#

like no offense and all

quaint mantle
ivory sleet
#

Thereโ€™s no mute

quaint mantle
#

damn

tall dragon
#

is that ban perm?

ivory sleet
#

Like it hasnโ€™t been implemented

quaint mantle
#

thats sucky

ivory sleet
#

Yeah weโ€™ve been asking for it quite a while

stone sinew
#

You can mute... just takes alot more work then banning xD

lean gull
#

anyways, can anyone help with my bugs?

ivory sleet
#

?

#

We just concluded mutes are not possible atm

stone sinew
stone sinew
stone sinew
#

Or just have a bot remove messages posted by the user

lean gull
ivory sleet
#

Thing is, md5 hasnโ€™t added that so itโ€™s not possible as said earlier

stone sinew
lean gull
#

fair, fair.

#

add a timer before it gets deleted too that'd be funne

#

md5 should do da funy

stone sinew
# lean gull ^^^
Inventory clicked = e2.getClickedInventory();
List<Integer> slots = Arrays.asList(11, 12, 13, 20, 21, 22, 29, 30, 31)
slots.forEach(slot -> {
    ItemStack item = clicked.getItem();
    if(item != null)
        item.setAmount(item-1);
    // Also need to set item to null if amount == 0
});
``` Implement this code then repost your code.
lean gull
#

i like my own version doe

#

is very readable

quaint mantle
#

I want to make an event that teleports you back up 200 blocks when fallen through void and turns off your fall damage, checks the block under you and sets your hearts to half a heart. How can I implement the turn fall damage off in my event?

        Player player = event.getPlayer();
        if (event.getTo().getBlockY() == 0) {
            player.teleport(player.getLocation().add(0, 200, 0));
            //turn fall damage off

            if (player.getLocation().getBlock().getLocation().equals(-1)) {
                if (player.getLocation().getBlock().getType() != Material.AIR) {
                    player.setHealth(1);
                }
            }
        }
stone sinew
#

Ah I see what he meant about math now. Because of the grid pattern. Meh a list of the ints suits fine.

tall dragon
#

isnt this loop way more readable

lean gull
#

cause u can easily understand what it does

#

a loop is more efficient but less readable

tall dragon
#

no?

lean gull
#

that's my opinion, atleast

tall dragon
#

well thats a you problem then ๐Ÿ˜‚

lean gull
#

sadge

stone sinew
lean gull
#

conclure epicgodmc202 hurt my feewings

tall dragon
#

:(

lean gull
#

am so sadge now

quaint mantle
#

:(

stone sinew
#

@lean gull have you debugged and found out which if statement discontinues the code block?

quaint mantle
#

is conclure your helping hand for banning people now?

lean gull
#

idk what code block u mean and what's a code block but i think i figured out something (that may be what you're asking for)
so basically it checks all the items first for a recipe and then it removes one of each, but the thing is that can be what's causing the bug

#

i tried switching their places but then it broke even more

#

i forgot why this is lol

stone sinew
lean gull
#

1 sec lemme check my message

ivory sleet
lean gull
lean gull
ivory sleet
#

Iโ€™m serious

lean gull
#

no i mean what i said was a joke

ivory sleet
#

Alright

stone sinew
#

Maybe get a video?

quaint mantle
#

How to stop fall damage in an event?

lean gull
#

conclure i can post streamable links, right?

#

eh i'll just dm it

ivory sleet
#

Those r fine as long as theyโ€™re relevant however it wonโ€™t show an embed

#

Since youโ€™re unverified

lean gull
#

ok

#

as you can see it lets me craft it twice, and for recipes that are not 1 item per recipe i need to click an allowed slot in the gui

formal dome
frosty tinsel
drowsy helm
#

docker-compose is for docker compose, he means a plugin yml

formal dome
drowsy helm
#

no, a yml file within your plugin folder (usually config.yml)

#

plugin.yml is strictly for plugin configuration

formal dome
#

where would that be located... as in: where within my plugin directory

hasty prawn
#

Anywhere, you can define your directory structure.

#

Just as long as its in that folder.

formal dome
#

word... so i'm passing it through "src/main/resources/config.yml"

drowsy helm
#

That's within your jar directory

#

its external

formal dome
#

ohh

lean gull
#

i still need help btw, pls

drowsy helm
#

unless you want to hardcode db settings in

formal dome
#

nah cuz people can easily decompile jars lol

hasty prawn
#

You can copy it to your plugin directory though. Call saveDefaultConfig() in your onEnable()

formal dome
#

i'm aiming for secure in case people actually want too use this

drowsy helm
hasty prawn
drowsy helm
#

line 90-124 is just run on

#

it can be in one for loop

formal dome
#

does that grant the host access to the database password and such

drowsy helm
#

yes

quaint mantle
#

Is there any way to stop your server from picking up the teleport in your tp event?

hasty prawn
#

Well, the config just allows the user to define the database username and password for the plugin to access it.

#

The host doesn't really care what the password is. Your plugin does.

drowsy helm
#
if (Bukkit.getCraftingRecipe(slots, e2.getWhoClicked().getWorld()) != null) {
                    e2.getClickedInventory().setItem(24, Bukkit.getCraftingRecipe(slots, e2.getWhoClicked().getWorld()).getResult());
                } else {
                    e2.getClickedInventory().setItem(24, null);
                }

is also redundant

#

if it is null, you are setting it to null

#

and you arent removing the item after the fact, thats why it is duplicating

#

since its on a scheduled task, it will set the result again once they pick up the result

formal dome
lavish hemlock
#

I mean

#

If you're trying to support SQL databases

#

That's a good thing

#

Since people can use their own databases instead of yours

#

(And anyone using SQL in the first place probably has their own DB setup)

formal dome
#

that's ideal

#

i don't personally wana host everyones data

#

cool

drowsy helm
formal dome
#

so i guess il'l include notes about that in a potential README

#

"define your database stuff here"

drowsy helm
#

i mean its self explanitory with the variable names craftinc

#

can also have a message on startup saying "You have not defined database stuff"

formal dome
#

word

#

awesome

hasty prawn
chrome pewter
#

public void InitPathfinder() {
super.initPathfinder();
this.goa

}
#

like it does give me the option to select goalslector

#

Ahhhhhhh

#

please someone helpme

ivory sleet
#

Be patient

chrome pewter
#

i ask this question 6 times

chrome pewter
ivory sleet
#

Create a thread

chrome pewter
#

??

ivory sleet
#

A discord thread

chrome pewter
#

ohhh

chrome beacon
#

And be more specific

#

I have no idea what the issue is

chrome pewter
#

do you mind if dm you the issue

hasty prawn
drowsy helm
#

Post it here in detail. More people will see

hasty prawn
#

Or your class doesn't extend an entity that has a goal selector

chrome pewter
#

public class custom_mobs extends EntityWolf {
public custom_mobs(Location loc) {
super(EntityTypes.bc, ((CraftWorld) loc.getWorld()).getHandle());
this.setPosition(loc.getX(), loc.getY(), loc.getZ());
this.setHealth(2000);
this.setSprinting(true);

}
@Override
protected void InitPathfinder() {
    this.setGoalTarget(2, new PathfinderGoalFloat(this));
    
}

}

#

this is my entire coded

hasty prawn
#

Yeah you need to use it's obfuscated name

#

Not sure what that is

chrome pewter
hasty prawn
#

You're using 1.17 right?

shadow gazelle
#

I know 1.8.8 is outdated, but how can I spawn particles? There's no spawnParticles like there is in newer versions

#

Last time I tried to use playEffect it did nothing

#

That was in 1.16 though, so it might be different in 1.8

shadow gazelle
#

What version was it changed in?

#

playEffect did nothing in 1.16

unique meteor
#

1.9

formal dome
#

OH

#

or do i need to use that still

unreal quartz
#

what does hikari have to do with handling configuration files?

eternal night
#

you can create a hikari config from a properties file if you want, but that is as far as it goes

shadow gazelle
#

Hikari is for SQL

formal dome
#

and hikari is my connecting api

quaint mantle
unreal quartz
#

as in a place for users to configure their connection

shadow gazelle
#

And not a plugin config

unreal quartz
#

you can load it yourself, or hikari probably has a way as well to use some standardised file or something

formal dome
#

i guess that brings me to my real question xD sorry i wanted to make sure i understood all that before i went forward... when passing files in and out of my plugin class where is the root of the path. im' getting a "file not found exception". String configFile = "src/main/resources/db.properties"; i guess i'll move it outside of the plugin. just need to know how to construct the path

and to continue off of what i was saying before about config files... hikariCP uses a file called db.properties to configure the database. THAT sounds like it would be my config file.

minor garnet
#

6:00 does anyone have any idea how i can add this in java? some feature that does something similar

opal juniper
#

this must be the first time i have seen a woman-narrated programming tutorial

formal dome
#

women in dev is awesome

eternal oxide
#

No more than a man. The placement of ones sexual organs should not affect how awesome you are.

formal dome
#

couldn't agree more

#

should be equal

lavish hemlock
#

#egalitarianism

ancient plank
#

๐Ÿ‘ pogging

unreal quartz
#

it should be equal, but sometimes the treatment of women in STEM in atrocious

opal juniper
#

Yeah - i just meant it in the sense that i dont really see many, not that they are in any way different

minor garnet
#

tf

quaint mantle
solid cargo
#

cant seem to find on how to make a custom entity drop custom exp

weak mauve
#

how can i make a task executes every 1 miliseconds?

eternal night
#

anything below you'd have to start your own thread and use Thread#sleep

#

tho you cannot interact with most parts of the spigot API off the main thread, so it won't help you much

weak mauve
#

i tried that to make the armorstand perfectly follow the entity

#

since 1.8 nametag bug is a thing

#

but when the mob move too quick the name tag move very strangely

quaint mantle
weak mauve
solid cargo
#

btw i cant do public class Blahblahblah extends EntitySkeleton

quaint mantle
#

uncool

#

๐Ÿ›ธ

solid cargo
#

p o r q u e?

weak mauve
#

idc how do others thought about mine project

solid cargo
#

invalidating cache does not work

weak mauve
#

hover it

solid cargo
#

yes

weak mauve
#

hover that red thingy

solid cargo
#

it gives nothing

quaint mantle
solid cargo
#

straight up nothing

#

just Create Class (EntityZombie)

#

sorry, EntitySkeleton

quaint mantle
#

How do I turn off the {Player} moved too quickly! In my server

#

@quaint mantle

weak mauve
#

this is not a place for public plugin asking

#

go somewhere

quaint mantle
#

not what hes asking

weak mauve
#

using a plugin???

#

i think he meant some public plugins

quaint mantle
#

no

#

my own plugin

weak mauve
#

ok so discuss it clearly

quaint mantle
#

bro

#

you're literally causing confusion

#

and telling people to talk clearly

#

????? logic??

solid cargo
#

meh i will create a thread

#

public class (whatever) extends EntitySkeleton doesnt work

formal dome
#

hen passing files in and out of my plugin class where is the root of the path. im' getting a "file not found exception". String configFile = "src/main/resources/db.properties"; i guess i'll move it outside of the plugin. just need to know how to construct the path

and to continue off of what i was saying before about config files... hikariCP uses a file called db.properties to configure the database. THAT sounds like it would be my config file.

quaint mantle
#

nah u dont need that

#

just use a norma config.yml

kindred valley
#

?paste

undone axleBOT
formal dome
# quaint mantle nah u dont need that

i want to use hikariCP because (if i understood correctly) i don't need to create a new connection for every time i need to give the data base data

#

using the JDBC seems a bit heavier in that you have to create a new connnection everytime

waxen plinth
#

what

#

Where did you hear that JDBC makes you make a new connection for every query lmao

ivory sleet
#

new pfp! (:

waxen plinth
#

yea

#

And another one coming soon

#

Stay tuned

ivory sleet
#

Oo

formal dome
waxen plinth
#

Depends on your use case

#

JDBC is verbose and annoying to use but you can easily make a wrapper (or use an existing one)

#

I have never used hikari but I know it's for connection pooling

formal dome
kindred valley
#

hey i want to make a simple cluffing plugin when someone right clickes the other entity the entity will be moveless until player closes the inventory.


                       ((Player) clickedEntity).setWalkSpeed(0.2F);                                                                                                      
                   }```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               I cant open while loop cause server is crashing i keep  entitys walk speed at 0 until player closes his inventory, after that if player closes his inventory want to set entitys walk speed 0.2F again 
as i said above how can i do that.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       Code: https://paste.md-5.net/tofimaduna.java
waxen plinth
#

Just set their walk speed to 0

#

Then listen for an InventoryCloseEvent

eternal oxide
#

don;t mess with speed or any of that, just flag teh player as locked, and prevent movement in PlayerMoveEvent

waxen plinth
#

After you get that event you can just set their walk speed back to 0.1

kindred valley
#

where should i listen inventorycloseevent

waxen plinth
#

Alternatively you can stop them from moving with potion effects (high levels of jump boost overflow to become negative; the player cannot jump, and slowness can prevent movement)

#

You already have a listener

#

Just make another

kindred valley
#

so i need to make new event

formal dome
#

essentially, i'm gonna access the log messages (i would prefer as strings) and parse them to see if i need them. basically its supposed to be a discord bot that uses the database populated from the plugin to post useful messages to a discord channel

#

what database connector do u suggest?

#

at least on the spigot side

kindred valley
waxen plinth
#

Wait why do you need a database for this

#

Is it going to be used for anything other than putting the messages in the channel?

waxen plinth
#

Hmm

#

I don't see why you need a database at all then

formal dome
#

my original thought was to output the log messages to a text file and read it from there

#

then delete em

#

to save space

waxen plinth
#

That's not a good solution either

#

Just use sockets

formal dome
#

is there a socket interface that comes with spigot?

normal flower
#

Would both of these return a ItemStack with the material GOLDEN_APPLE with the method getItemStack()? ```java
new ItemButton(Material.GOLDEN_APPLE);
new ItemButton(new ItemStack(Material.GOLDEN_APPLE));

solid cargo
#

any like good nms tutorials?

#

that dont have 1st step : Print out "Hello, world" 2nd step: make a self driving car from scratch

ivory sleet
#

Lol

#

Understanding nms means you inherently understands java good also

normal flower
ivory sleet
#

๐Ÿ‘

solid cargo
#

i just wanna make my custom entity somewhat smart :(

ivory sleet
#

goals is a pain

#

Tho I believe paper has an api for it, not to glorify by paper by any means however maybe see it as an alternative to nms

solid cargo
#

idk i just want to make my entity not run into walls every 2 seconds

ivory sleet
#

Understandable

#

Is it a flying one?

solid cargo
#

no

ivory sleet
#

Good

solid cargo
#

just a skeleton boss

ivory sleet
#

Flaying entities are a true pain

solid cargo
#

fax bro

ivory sleet
#

What u got now

#

Also can you make a thread and we will continue there

solid cargo
#

i got an entity that isnt made in nms

#

ok will do

#

head over to public class (whatever) extends EntitySkeleton doesnt work

#

the thread

quaint mantle
ivory sleet
#

โ˜บ๏ธ

formal dome
#

@waxen plinth can you suggest any popular java "socketing" libraries?

#

or are there any ways to talk with the file descriptor table like in c

ivory sleet
#

Like a web socket or just sockets?

#

If itโ€™s just sockets I think netty has some framework stuff for it

formal dome
waxen plinth
#

Why do people gotta keep pinging me for things they can easily google

#

Just look up "java sockets" it's not that hard

solid cargo
#

is there any way i can make my custom entity deal certain DPS to the spawner?

waxen plinth
#

???

#

A spawner is a block

#

It doesn't have health

#

Or do you mean modify what the spawner is spawning so that the enemies deal a certain DPS to players?

solid cargo
#

by the "spawner" i mean the player who spawned it

quaint mantle
#

I know its a bit stretched but I could make a custom item class that manages the meta and display name etc. of a custom item, so that i have a better foundation to easily make new custom items. I just want to know if anyone has any tips or sources that can help me? Thanks

ivory sleet
#

ye

#

I have a framework for it sorta

#

but its kinda huge

quaint mantle
#

Do you have it publicly available? I would like to see how it's done since i have no clue :p

ivory sleet
#

hmm

#

I haven't tested it

#

like tested the individual units

#

so idk if it works

#

and im not done yet lol

quaint mantle
#

oh ok xD

ivory sleet
#

tho if u're interested still I could add u to the gh repo

#

and in that case dm me ur gh name

quaint mantle
#

That would be great

ivory sleet
#

gh - github

quaint mantle
#

ye ye ik

#

How to create team for arena

ivory sleet
#

elaborate

quaint mantle
#

And Scorboard

tardy delta
#

ugh if i create a new object in a class method does that creates an new object every time the method is called or not?

#

๐Ÿ˜ณ

ivory sleet
#

like

pulsar schooner
#

Heh

ivory sleet
#
class A {
  A a = new A();
}```
?
#

then yes

tardy delta
#
CommandFly cf = new CommandFly();
        cf.fly(p, vanish, false);
waxen plinth
#

I don't know what this is but it really looks like it can't possibly be good

tardy delta
#

like maybe i could write new CommandFly().fly(p, vanish, false)

waxen plinth
#

Why are you instantiating a new object just to call that method on it and then never use it again

tardy delta
#

iknow

waxen plinth
#

And why is it CommandFly if it seemingly has nothing to do with a command

tardy delta
#

its a command :/

quiet ice
#

use static

waxen plinth
#

If it's a command then why are you instantiating it like that

#

It should be a singleton at least

quiet ice
#

you should keep the CommandFly instance somewhere cached at the very least

tardy delta
#

i only use it once

#

in another command

quiet ice
#

so what, it makes perfect sense to have it static then (if the #fly method is a utility method, otherwise it might be more of an issue).

tardy delta
#

i cant access a non static player uhu

quiet ice
#

but the fly method can be static?

tardy delta
#

like this is the method

public void fly(Player player, boolean fly, boolean message) {
        if (fly) flyingPlayers.add(player.getUniqueId());
        else flyingPlayers.remove(player.getUniqueId());
        player.setAllowFlight(fly || player.getGameMode() == GameMode.CREATIVE);
        if (message) Utils.message(p, fly ? "&aSet fly mode enabled" : "&cSet fly mode disabled");
    }
quiet ice
#

is flyingPlayers static?

tardy delta
#

if i make the command executor static but that will lead to the same player on every command

#

yes

quiet ice
#

I am big dum dum

wary harness
#

So got question how would I stack items in getDrops Collection
thing is I got like 64 seperated ItemStackes by 1 stone

#

when I add them

#

to palyer inventory

#

they take seperated slots

tardy delta
#

i call the fly method in a vanish command

solid cargo
#

this seems not to work

ivory sleet
#

do it sync

#

and

#

dont override that method

#

the first one

solid cargo
#

just delete the override?

quiet ice
#

no, delete the method

#

Java allows for implicit overrides, which can be quite the pain if not intended, which is why the override annotation exists

solid cargo
#

delete this one?

quiet ice
#

yep

solid cargo
#

'runTaskAsynchronously(org.bukkit.plugin.Plugin)' in 'org.bukkit.scheduler.BukkitRunnable' cannot be applied to '(me.powerbutton.kaboom.SMPCore, long, long)' but then this shiz, but it is part of my poor java knowledge

quiet ice
#

hm

#

ah, I see

#

does SMNPCore extend JavaPlugin?

solid cargo
#

yes, its main class

#

this thing isnt in main

quiet ice
#

Okay, and are you sure that you want to call runTaskAsynchronously(Plugin, long, long) (which does not exist in bukkitrunnable)?

solid cargo
#

well yeah, i want to for the boss to deal 1 hp every second

#

even if its far away

sweet sun
eternal oxide
#

No, you don;t extend ComponentBuilder

#

its Final for a reason

quiet ice
#

what should it do in the first place?

sweet sun
#

ChatComponentBuilder its for the chat

sweet sun
quiet ice
#

you see, there are likely better alternatives than .. this

quiet ice
sweet sun
#

It is bungeecord right?

#

I'm not understanding why he net_5 have made it a final class

quiet ice
#

Well, it's a builder - builders usually don't need to be extended

#

Well, if I knew what it is I could say it - but looking at the code I cannot deciper easily what it should do

sweet sun
#

ah

solid cargo
#

how can i check if my custom entity is alive?

quiet ice
#

Entity#isValid()

#

or #isDead()

solid cargo
#

doesnt seem to work

quiet ice
#

you'd probably want to use !isDead tbh

solid cargo
#

hm ok

quiet ice
#

or just both for maximum efficency

solid cargo
#

meh will continue tmr, if u want to help me more, just dm me

#

going asleep. bye

loud grove
#

Hello everyone. I'm working now on a class to create custom books for 1.8 to 1.16.5 but i have a problem on the reflection for the 1.8 to 1.16 (excluding the 1.16.5 because It works in an other way). My problem is that I want to set TextComponent object in the book but we cannot just put textcomponent.getText() and I don't know why. On a website, someone did something similar but for me it does not work and I have some errors, like something for the setLenient(boolean b) method from the Json.

The way i'm doing this (like other plugins) is that:

TextComponent mainCompound = new TextCompound();
TextComponent base = new TextComponent(string.text);
base.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, string.value));
mainCompound.addExtra(base);

// some other code with the mainCompound...

versionName = Bukkit.getServer().getClass().getPackage().getName().replace(".", ",").split(",")[3];
craftBookMetaField = Reflection.getClass("org.bukkit.craftbukkit." + versionName + ".inventory.CraftMetaBook").getDeclaredField("pages");
chatBase = Reflection.getClass("net.minecraft.server." + versionName + ".IChatBaseComponent$ChatSerializer");

Object object = chatBase.newInstance();
Object page = object.getClass().getMethod("a", String.class).invoke(object, ComponentSerializer.toString((BaseComponent) mainCompound));
List<Object> p = (List<Object>) craftBookMetaField.get(meta);
p.add(page);
this.book.setItemMeta(meta);

All this works for simple Strings added in the invoke method

With this I have the error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 8

golden turret
#

i think you can use the spigot api for that

loud grove
golden turret
#

maybe

loud grove
#

Let's try

burnt current
#

In my main method, I first create the Config.yml and also execute the following:

https://paste.md-5.net/igabadipup.cpp

However, I get the following error:


This is usually caused by a limit on the number of sockets imposed by the operating system. This limit is usually configurable.

For Unix-based platforms, see the manual page for the 'ulimit' command. Kernel or system reconfiguration may also be required.

Cannot assign requested address: connect

and the following line is given as the source of the error:
try (Connection conn = dataSource.getConnection()) (its in the first block from my message)
Does somebody know how i can fix this?

opal juniper
#

?paste

undone axleBOT
opal juniper
#

please paste it

#

it is hard to read

loud grove
golden turret
#

sad

burnt current
quasi flint
#

How can one calculate the Players y Motion without relying on the client to send me the informations?

#

Because people bad, people cheat

quasi flint
#

I want to calculate how far the given player fell in an specific time

waxen plinth
#

Only reliable way to do that would be to compare their location each tick

quasi flint
#

Ok thx

quasi flint
#

Found a good and reliable way

#

I check if the player is reporting he is on the ground, actually check if he is near a block in his y location value

#

And if the client and server conflict I flag em

#

Anything wrong with how I try to achieve my goal?

eternal oxide
#

You could have a rounding issue as x/y/z are doubles

#

I've not checked to see what y value is "on the ground"

quasi flint
#

Well I could probably somehow deal with the rounding error

#

If the ground idea works

eternal oxide
#

It sounds a good plan

quasi flint
#

Because only the client can lie to me D:<

eternal oxide
#

You would need to check auto step and the real Y value variance (if any)

quasi flint
#

Yes

#

Got a semi workin prototype

dry pike
#

Looking for some help possibly. Im using citizens2 and trying to get a npc to generate locations between locations, essentially creating waypoints at a specified range, each moving closer to the destination.

I have a working system but its pretty "dumb" as is just takes the direction/vector from the npc's location to the final destination, moves whatever the specified range is in that direction, then finds the highest block at that location, and sets the npc's target there. Issues are that if a mountain is inbetween the waypoint will go straight into it and then staight to the highest location, which will usually end up out of the pathfinding range. I currently have citizens pathfinding range at 75 blocks and the waypoints generator at 30. I can only think to increase the pathfinding range or reduce the waypoints generator range to try to mitigate the issues. Another issue is when the npc is in an area with many trees or in a cave, most likely a waypoint will be generated at the top of a tree/cave, causing the npc to teleport or get stuck. Im very concerned with performance and being as lightweight as possible. There may be hundreds of these npcs wandering the world.

Another question, are you aware of a way to process pathfinding on another server? Is pathfinding async?

shadow tide
#

When using player.getLocation().getDirection() is it possible to go from the head, not the feet?

eternal oxide
#

getEyeLocation()

shadow tide
#

thanks

#

do I replace player.getLocation() with player.getEyeLocation()?

#

@eternal oxide I did that and its still going from the feet

eternal oxide
#

Then you did something else wrong

shadow tide
#

ill try compiling it again

#

@eternal oxide can u call me just so I can share my screen, i'm gonna mute you can if you want to

eternal oxide
#

Use your words. Be descriptive

shadow tide
#

err ok

#

its still coming out of my feet

eternal oxide
#

what is coming out of your feet?

fiery inlet
#
Bukkit.getLogger().info("lol");
Bukkit.getLogger().log("lol");

Difference??

eternal oxide
#

First one specifies the log level, second one uses the default

fiery inlet
#

the log level?

#

dafuq dat mean

eternal oxide
#

info, warning, severe

fiery inlet
#

and where is log on that scale

eternal oxide
#

log is the action. It has no scale

#

actually your code will error. The second will not compile

#

log with a single argument takes a Record not a String

fiery inlet
#

is there a way to get the last output from console

eternal oxide
#

No, you add a handler

upbeat sky
#

alright so i need some help

I have two coordinates, and I'm trying to calculate X amount of points between those locations. However, they need to be in the shape of a (Festoon?, Garlands?)

I would like the points like the circles in the image

opal juniper
#

โญ math ๐Ÿคฉ

severe marsh
#

How do I make plugin wait for player's response?

iron condor
#

hey what is getLocalizedName()?

#

its always null, do I have to set it for each item?

upbeat sky
eternal oxide
opal juniper
worldly ingot
upbeat sky
worldly ingot
#

Bezier curves might be a better approach

severe marsh
#

/calculate
I type: 4+1
and then i get message

opal juniper
#

oh right

#

conversations api

#

or manually do it

severe marsh
#

got any tutorials for api?

worldly ingot
#

Conversation API seems overkill for this

opal juniper
#

yeah

#

it just depends

#

on whether they wanna implement it manually

#

You just need a listener for the chatevent and then just add/remove players to listen to their messages

severe marsh
#

oke

eternal oxide
severe marsh
#

ty

quaint mantle
#
calc command -> {
    chat listener
    runnable {
        wait 10 seconds
        remove player response
        "You took to long!"
    }
}
upbeat sky
#

The link you sent is to like an unsolved thread. Is there any tutorial or something i can use? It's my first time doing these kinds of maths using java

cold pawn
unreal quartz
#

if you want a simple implementation you could just form a quadratic curve from your two points and transform (stretch) that function to control the slope

opal sluice
torn oyster
#

p.getInventory().remove(new ItemStack(Material.STAINED_CLAY, 1, (short) t.getWoolColor())); isnt working

#

i have 18 of that type of clay

#

but it doesnt remove it

chrome beacon
#

Isn't the meta a byte value and not a short

torn oyster
#

idk

#

maybe?

#

i fixed that

#

still same thing lol

#

no errors

#

just doesnt remove item

#
                    if (p.getInventory().containsAtLeast(new ItemStack(Material.STAINED_CLAY, 1, (byte) t.getWoolColor()), 1)) {
                        p.getInventory().remove(new ItemStack(Material.STAINED_CLAY, 1, (byte) t.getWoolColor()));```
#

thats my code

chrome beacon
#

Is it passing the if check

unreal quartz
chrome beacon
#

Yeah it is a byte

#

That wasn't really a question

unreal quartz
#

no it isnt

chrome beacon
#

It is

unreal quartz
chrome beacon
#

Damage isn't meta

#

Data*

unreal quartz
#

he is using the 3 arg constructor

chrome beacon
#

Then there's the problem

unreal quartz
#

that is not the problem

#

assuming they're using 1.8 (why?), the wool colour was stored in the durability

golden turret
#

yes

chrome beacon
#

Hm you appear to be right

golden turret
#

wool color must use getWoolData

chrome beacon
#

Anyway I'm off to bed now

golden turret
#

the others is getDyeData

#

i think

halcyon mica
#

So, how do I register the attributes for my custom nms entity?

#

The map for it is a immutable one

lavish hemlock
#

Huh

#

It's Vatuu

#

How ya doing?

halcyon mica
#

Torturing myself with spigot for a friend and hating every second of it

#

how about you

lavish hemlock
#

Not much really, just being lazy and getting nothing done while I plan out a theoretical programming lang in my head.

halcyon mica
#

Cool

#

I am more moving towards hardware and low level os stuff

#

Anyway, about my question

#

My custom pathfinder entity cannot be spawned because the default attribute registry lacks the type

#

And due to the map being a immutable map, I can't just add to it

#

Is there a way to add one, or do I have to read the map, copy it, add it, and reassign?

round finch
#

what does this mean exactly?
net.luckperms.api.LuckPermsProvider from LuckPerms v5.3.65 which is not a depend, softdepend or loadbefore of this plugin.

#

is it hard dependency ?

narrow vessel
#

doesnt do anything if you have (in this case) luckperms installed on the server but if you dont you could run into issues

#

aka, doesnt matter if you know what youre doing (and have that dependency already on your server)
matters if youre making a publicly available plugin where a lot of people dont know what theyre doing

round finch
#

no worry i always think if it is not null and plugin is enable

#

i were hooking into the plugin just need to know why the output

eternal oxide
#

add it as a softdepend

round finch
#

ah

eternal oxide
#

or, if you plugin can not work without it, add as a depend

round finch
#

Thank you!!

#

i will remeber

unkempt peak
#

Well for the stick use the PlayerInteractAtEntityEvent

#

ProjectileHitEvent is what you want

#

you want to know when the egg hits the player not when the player throws the egg

#

ProjectileHitEvent > hit entity is player > projectile itemstack is ban egg > ban player that was hit

#

?

#

ok? what do you need help with

#

getHitEntity

#

just wondering, whats this "ban egg" for anyways?

#

? you ban the player if they lose

#

huh

#

ok

winged anvil
#

does bungee have a discord? cant find anything on it. I'm tryna get assistance with plugin messaging

pulsar zenith
winged anvil
#

i love you

pulsar zenith
#

๐Ÿ˜„

winged anvil
#

So basically, I have my main server where I have players sorted into a group for a minigame. Then after I have a group that's ready to play, I want to send a command to my other server to start generating new worlds.

#

I know how to teleport the players to the other server, but I don't know how to send the "message" to tell my second server to start generating worlds

granite burrow
#

how can I get the location a player is looking at?
like a block thats within a 100 blocks of a player or so

silent timber
#

I'm currently trying to update a plugin from 1.12 to 1.17.
Does anyone know the equivalent of this/if it still exists

import net.minecraft.server.v1_12_R1.IChunkLoader;
winged anvil
# young knoll ?pmc

I saw this. But all of these receivers are players. Thats where I'm confused cause there won't be any players on the second server when I send the command to it

granite burrow
spiral bramble
#

Is there any Player event related to elytra flight? I'm looking in the docs but can't find anything

#

^Might add, my goal is to implement 1.8 1.18 Elytra mechanics into 1.17.x

hasty prawn
#

1.8 didn't have an Elytra so you're disabling it? Thonk

spiral bramble
hasty prawn
#

Well how are you going to implement non-existent mechanics KEKW

#

Oh I see the edit now

#

The only Elytra events I know of are EntityToggleGlideEvent

spiral bramble
#

Hmm I'll see what I can do with that. Thanks

valid sorrel
#

can I cancel teleport event seamlessly?

#

it doesn't necessarily cancel the event, but teleport the player back

#

I want to cancel lots of unwanted teleports

hasty prawn
#

What kind of teleports

valid sorrel
#

wdym?

hasty prawn
#

Ender pearls, portals, commands?

#

All?

valid sorrel
#

none of them

hasty prawn
#

So which then

valid sorrel
#

something like player moved wrongly

#

the threshold doesn't really do anything

hasty prawn
#

It's not going to fire an event for that afaik. Kinda sounds like a performance issue.

valid sorrel
#

it does for some reason

proud basin
#

you got an anti cheat?

valid sorrel
#

I'm trying to make a plugin which removes the vanilla anticheat

#

tnt cannons and those stuff work properly then

proud basin
#

vanilla doesnโ€™t have an anti cheat?

valid sorrel
#

kicked for flying is an example

#

and kicked for spamming

proud basin
#

Isnโ€™t that a spigot thing

valid sorrel
#

and illegal characters in chat

#

etc

proud basin
#

bukkit

valid sorrel
#

I'm just trying to get rid of it anyway

hasty prawn
#

Kicked for flying can be disabled & you'll probably have to modify the server jar to get rid of the disconnect.spam

valid sorrel
#

currently managed to remove illegal characters in chat and kicked for spamming and kicked for flying (there is config)

hasty prawn
#

The illegal character one is there for a reason, you can end up crashing clients.

waxen plinth
valid sorrel
#

since I can check the getcause on teleport event but I don't know how to on teleport packets

hasty prawn
valid sorrel
young knoll
#

You can crank up the moved wrongly threshold in one of the config files

valid sorrel
#

does that even work though?

#

it just made the server not boot at all or just did nothing for me last time

#

but there's one more left, the one that blocks players from going through blocks

hasty prawn
#

You want to disable block collisions...?

young knoll
#

I assume they want to disable the server teleporting players back if they somehow end up on the other side of a block?

#

Maybe they want a super anarchy server

dry forum
#

why does https://pastebin.com/nuWmQhcV give me this error: https://pastebin.com/YYiKywM1 ? im trying to get the all of the config sections in a list to see if a message contains one of them, for example the config could be:

  - stuff
test2:
  - stuff```

and i want to check if the player sends a message containing stuff 1 or stuff 2
waxen plinth
#

It's a set

#

You're trying to cast it to a list

#

getKeys(false) returns a set

dry forum
#

so how else am i supose to get the config sections

chilly thicket
#

use it as a set

waxen plinth
#

Just

#

Don't cast to list

#

.-.

dry forum
#

then how else am i supose to check if a player sends a message containing 1 of the config sections..

waxen plinth
#

Store it in a Set<String> variable

dry forum
#

alright il try it thanks

waxen plinth
#

Also you don't use getKeys for that

#

You can use getStringList