#help-development

1 messages · Page 1873 of 1

ivory sleet
#

That’s not weird

chrome beacon
#

There is a team option for disabling name tags

#

I use it in one of my plugins to hide player names of players that aren't visible

#

(Like behind a wall)

misty current
#

ok so my custom lines work and i got the logic down but now how do i add more lines? what entities should I stack?

#

(for context i'm tryna make a multiline api above player's name)

sterile token
chrome beacon
#

Nametags don't need protocollib

#

Hiding armor from certain players does

sterile token
#

player.getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(hidden.getName(), true, 10));

#

it worked

#

dont ask me why. Btw

naive jolt
#

Hey how do I edit the entity's NBT like invisibility or tag

#

player.getWorld().spawnEntity(chairLoc.add(0.5d, 0, 0.5d), EntityType.ARROW).addPassenger(player);

chrome beacon
#

Don't edit tag use api methods

naive jolt
#

please elaborate

ivory sleet
#

Just use Entity::setInvisible for instance

chrome beacon
#

Actually arrows can't be invisible that way. They aren't living entities

naive jolt
#

just like I added the passenger 🤦‍♂️

#

thanks

spiral light
#

what happens if you set a player on an arrow and then send arrow remove packet to the player ... ? will the player just stops flying ?

naive jolt
naive jolt
young knoll
#

Don't chain them

#

Store it to a variable

naive jolt
#

Let me do that

dreamy idol
#

A Cat is no Wolf. Both are in the BukkitAPI both have the method setCollarColor(DyeColor). Should I make a feature Request for a interface like Collarable or is this word to near to Colorable? Or should i direct create a pullrequest if this is possible anywhere?

young knoll
#

?cla

undone axleBOT
heavy heart
#

Good morning/day/evening comrades, I am currently messing around with yml. I want the code to find for example the "beverage" section in my config, and in that section add say a drink such as "beer". How would I accomplish this? I suspect I need to first ofc find my section config.getString("Beverage"), but how can I add the beer into this section? In a new line?

young knoll
#

wat

naive jolt
#

I replied to the wrong message, sorry

ivory sleet
naive jolt
#

oh you use ``

heavy heart
naive jolt
#

there

ivory sleet
#

getConfigurationSection("beverage").createSection("nestedSection"); @heavy heart

young knoll
#

Although you probably want Player#launchProjectile instead

naive jolt
#

Oh, that makes so much more sense

tacit drift
heavy heart
naive jolt
#

its just the perfect entity

#

for my chair

royal vale
#

How to get who killed someone using respawn anchors or other explosions that don't count as player? Since respawn anchors will kill the person, but not give kill credit to the one that blew the anchor.

#

Is there a resource for this out there?

#

Or if not, how would I do it myself

charred echo
#

How would I remove all teams from the main scoreboard?
Bukkit.getScoreboardManager().getMainScoreboard().getTeams().clear();
is it this simple?

young knoll
#

Ah right the type one doesn't return a generic

#

Use Arrow.class instead of EntityType.ARROW

naive jolt
#

Coll1234567 I just needed to cast to the Arrow

chrome beacon
naive jolt
young knoll
#

I mean that probably works too

#

But blah casting

naive jolt
#

lol

opal juniper
#

does player#setResourcePack take into account changes in the resource pack?

#

like how does it calculate the SHA1

rough drift
#

backtracking is pain

buoyant viper
#

Files.readAllLines >>>

misty current
#

also the closing method should be in a finally statement

buoyant viper
#

Files.readAllLines reads all of the lines from a file and puts them into a List<String>

#

very helpful

ivory sleet
#
  • it uses the Path api and not File
buoyant viper
#

only downside ig is then u gotta collect the strings into one, but i think theres a String.join method that will work, if not then .stream().collect(Collectors.joining or whatever

rough drift
buoyant viper
#

oh string.join does take in collections, cool

ivory sleet
#

Well you could simply go with Files::newBufferedReader and do whatever you want otherwise

misty current
lavish hemlock
#

I'm actually not sure if Files.newBufferedReader is faster than wrapping a BufferedReader around new FileReader(file).

#

But nio is generally preferred since it's newer.

kindred aurora
#

Someone known how to get the falling distance of a falling block (like an anvil) without monitoring each tick this falling block ??

spiral light
#

.getFallDistance maybe

lavish hemlock
#

Maow will eventually make his own IO library though.

charred echo
#

How would I add a Player to a Team

ivory sleet
#

eventually

lavish hemlock
#

It'll use the pre-existing Java IO library but provide some niceties :)

spiral light
lavish hemlock
#

Like better abstractions over sources/sinks.

charred echo
kindred aurora
chrome beacon
charred echo
chrome beacon
#

addPlayer is deprecated. Use addEntry with the player name

gleaming grove
#

hey, is there more emoticons that could be used in spigot, or i've already collected all set?

charred echo
proud basin
#

Anyone one know how I can get a player's client version with tiny protocol?

gleaming grove
#

sure

chrome beacon
gleaming grove
spiral light
kindred aurora
#

Get falling distance of anvil

gleaming grove
#

thank you

gleaming grove
charred echo
#

does Player#getScoreboard#getTeams return a collection of Team that the player is a member of?

#

or the teams in the players main scoreboard

#

the latter im guessing

#

if so, how would I get the Team the player is a member of

dusk flicker
#

I would presume the latter, check the JavaDocs for it

buoyant viper
#

jk

naive jolt
#

wait is event.getDismounted the entity that was dismounted in the event?

dusk flicker
#

Check JavaDocs

naive jolt
#

It does not help

buoyant viper
#

i think if u listen for the handshake packet that should say the client protocol version

naive jolt
#

so I guess I will just try it out

buoyant viper
#

favorite site

chrome beacon
#

Is also good

#

Fun stuff

dusk flicker
#

LMAO

naive jolt
#

xD

spiral light
chrome beacon
#

Someone at Paper made that one

sterile token
#

Where do you find that?

#

Im interested on that

#

pd: Sorry for the tag

gleaming grove
#

i send you private

sterile token
#

Allright thanks!!

quaint mantle
#

54% of minecraft server software moment

spiral light
#

its faster and i cant see a disadvantage of using the faster software O.o

tulip owl
charred echo
#

I have a string = "&c[Admin] &7"
Now I want to get the last color code wich is &7 as a ChatColor, how would I go about this

minor garnet
#

how i multiply a vector to left direction?

minor garnet
#

for example, the vector is for this arrow, but I want to multiply it for my right arm

spiral light
minor garnet
#

like a x.add ?

spiral light
#

no

minor garnet
#

why do i intend to do this relative to the world

spiral light
#

Vector direction = ....

Vector left = new Vector(direction.z, 0, -direction.x)
you will probably need to check if "-direction.x" is right and play around with the - before the x value and z value

minor garnet
#

okay?

#

let me see if it works

tulip owl
minor garnet
#

just move it to left

#

or right i dont know

quaint mantle
#

how do you get an instance of the current running server using the Server class? I want to access it to get the current playercount

misty current
#

Bukkit.getOnlinePlayers().size()

spiral light
#

well you need to do more math ... creating the orthogonal vector is just good to move the startLocation to the right or left ... from there you need to use the normal direction vector to get something from that position

misty current
#

it's getting better+

#

lol

#

i just need to figure out how to space them properly

spiral light
#

wtf

minor garnet
misty current
minor garnet
#
    private void Vector rotateVectorAroundY(Vector vector, double degrees) {
        double rad = Math.toRadians(degrees);
        double currentX = vector.getX();
        double currentZ = vector.getZ();
        double cosine = Math.cos(rad);
        double sine = Math.sin(rad);
        return new Vector((cosine * currentX - sine * currentZ), vector.getY(), (sine * currentX + cosine * currentZ));
    }```
misty current
#

with bats

minor garnet
#

nice ideia

misty current
#

yes but it's kinda taunting me

#

ngl

quaint mantle
#

how do you log inside a Listener object?

chrome beacon
#

Grab your logger instance and logger#info

#

For example

#

Or if you're lazy sysout like you normally would

spiral light
minor garnet
#

what

spiral light
#

you want the weapon to be turned 90° ?

minor garnet
#

nothing it

#

wait let me got translator

spiral light
#

what main language ?

minor garnet
#

i made the armor stand stay resumed for a weapon, now i would need to move it to the center of the stand

minor garnet
keen lake
#

Hi guys. I need to be sure about smth. I have my BlockBreakEvent listener on priority LOW. This listener also does nothing if the event is cancelled (it has ignoreCancelled = true. Does that mean when I break a block inside a WorldGuard region (and it does not break) my listener won't fire? (I think WG listeners have priority HIGH)

spiral light
minor garnet
#

this a vector or something?

#
    private ArmorStand spawnHologram(final ArmorStand armor, final Material type) {
        final Location local = armor.getLocation();
        final Vector dir = rotateVectorAroundY(local.getDirection(), 77).multiply(2);
        final Location newloc = local.add(dir);
        final Location loc = newloc.add(getDirection(newloc, local).multiply(2));```i used it
spiral light
#

do you can send me your resourcepack for this ? would make things a lot easier

minor garnet
#

yes i can

heavy heart
#

My goal is to make a config.yml that looks alike this:

Beverages: (which is preset)
  Beer:
    - text

Starting from:

Beverages:

So my question is how do I set "beer" beneath beverage? and how do I set "text" again into "beer"?

My "main" code so far goes as following:

"Beer" and "text" both being variables, beer(string) and text(integer). Though I believe this is irrelevant when making this. As they will be converted accordingly..

                config.getString("Beverages").set(beer);
                config.getString(beer).set(text);
                this.saveConfig();
misty current
#

intended result

#

totally

spiral light
#

wait... if you now move the player rotation.... does everything sync with it or is it a laggy delay ??

golden turret
#

wtf is these texts

minor garnet
#

resourcepack

quaint mantle
#

I need to store some data, like.. a lot. I need to be able to retrieve them and build stats. Is SQLite a decent solution? I want zero configuration for the end user.

left plover
#

Is there an event for when water breaks a block/entity?

lethal coral
#

trying to get the 2nd screenshot as a result

#

tried setting it to null and that didn't work either

vocal cloud
lethal coral
#

this is what I got from the 1st screenshot

quaint mantle
vocal cloud
# quaint mantle is there a specific reason ?

SQLite is exceptionally good for smaller programs and is much faster in that regard. If you don't plan on having a crazy amount of data it's probably your best bet. Just know it has limitations. SQL Server is kinda slower but it's got more to it.

quaint mantle
vocal cloud
wet breach
lethal coral
#

how can I create a blank path in my custom yml file so that I can add paths to it later on

quaint mantle
#

I need to store mostly numbers and integers to make some calculations on it, i won't need elsewhere but i'll keep looking if there is a better alternative.

naive jolt
#

Hey what is the best way to get a random online player?

wet breach
quaint mantle
vocal cloud
#

^

sterile token
#

Hi. Im again. Is there a way to convert an specific icon to a string format. Like unicode/UTF-8 so i can send it to the console/player?

#

I have seen that in some resources they use them

left plover
#

Is there an event for when water breaks a block/entity?

rough drift
#

https://www.baeldung.com/java-a-star-pathfinding I have found this and made my own version of it, however when i run it in 3D even a two block distance takes AGES to complete, why's that? (Note, in two dimension it was instant at pretty much any distance)

lethal coral
#

the a: from your example

#

this is what I'm planning on doing:

players:
  theiruuid:
    playerinfostuffhere
rough drift
#

if so just run

config.set("players.playerUUID", someVal)

if you run this multiple times it will append the other player UUIDS to players, otherwise if it does not exit it will create players

rough drift
#

you can also do

lethal coral
rough drift
#

mhm

wet breach
lethal coral
#

will it create players again if it's set

lethal coral
#

ok

rough drift
#

it will just add it to players

lethal coral
#

👍

#

problem

rough drift
rough drift
wet breach
lethal coral
#

it won't tell me if when getting the player's uuid from there if it's null or not

rough drift
#

you can also use config.setConfigurationSection("players") imo

lethal coral
# rough drift wdym
    public static Boolean hasPlayed(Player player){
        UUID uuid = (UUID) SkyMining.getInstance().getPlayedConfig().get("players." + player.getUniqueId());
        return uuid != null;
    }
rough drift
#

thats

#

not

#

how you do it

quaint mantle
#

why do you use A boolean wrapper btw

rough drift
#

just use boolean

lethal coral
#

also I am aware there is already a hasPlayedBefore() method

rough drift
#
config.contains("players." + player.getUniqueId());

config.containsKey("players." + player.getUniqueId());
```one of the two
#

check which of the methods exist

#

i forgot

sterile token
#

If you want to have mutiples player values like this, you should do:

players:
  uuid-one:
    name: "name"
    age: 10
  uuid-two:
    name: "name"
    age: 10    

For getting first player name or age do: config#get("players.uuid-one.name") and for the second player: config#get("players.uuid-two.name")

lethal coral
#

🤔

#

good idea

low temple
#

Is there a secure way to host a plugin's SQL database for all users using that plugin?

lethal coral
#

thank you though I appreciate it

#

❤️

rough drift
gleaming grove
#

Is it possible to create custom achievements? i found some old threat about that but it seems that class CustomAchievement no longer exists

low temple
rough drift
sterile token
#

Wait i didnt understand his question

#

🤔

low temple
#

no no I mean, I develop a plugin, and rather having the server owners needing their own SQL database, could I the developer securely host a database that hold all the info for everyone using the plugin

gleaming grove
#

@wet breach so how can i do this, and is it possible to achieve that without NMS?

low temple
#

Like maybe through a web API or something

rough drift
sterile token
quaint mantle
#

when i listen for an PlayerQuitEvent, i get the count of online players on the server. for some reason it registers as if the player is still online. for example, if there is one player on the server and they leave, this code:

    private int getPlayerCount() {
        return getServer().getOnlinePlayers().size();
    }

returns 1, even though the player has already left. Is there a way to delay the handling so it gets an accurate count?

wet breach
rough drift
#

Maybe have the owners get a pass when they download the plugin (say in your disc), and put that in config, and then encrypt/decrypt the data sent/received with that pass

low temple
sterile token
#

Another way you can do is using a key-value for credentials. Look it on internet

rough drift
wet breach
#

you can make a restful api if you want for your general java stuff and probably good practice

#

it is one of the few ways you could securely add stuff to a DB without exposing credentials

low temple
sterile token
rough drift
sterile token
gleaming grove
rough drift
#

Btw for a fast HttpServer i'd suggest Undertow, i am using it for my plugin (Update checker) and it works wonders, even with hundreds of requests it keeps up nicely

#

Yooo day changed xD

sterile token
#

To solve database credentials problems

#

🤔

rough drift
#

a simple 128bit or 256bit key would also work

lavish hemlock
#

Doesn't that go against the entire point of Spigot's library loader?

rough drift
lavish hemlock
#

A built-in feature of Spigot?

sterile token
#

I have never thouth that

tiny wolf
#

Heyo, are there any known issues with serialization with the bukkit api and kotlin?

lavish hemlock
#

That part of Spigot does require an internet connection btw.

sterile token
#

Good point of view Maow

lavish hemlock
#

And even that

#

That's fucking retarded

sterile token
#

Yes

#

We should open a thread

lavish hemlock
#

So many things in this world are dependent on the internet.

rough drift
lavish hemlock
#

You know how many services exist on da interwebz?

rough drift
#

then it works fine

lavish hemlock
tiny wolf
sterile token
#

Yes but its retarded because the spigot rules say that the plugins cannot depend on inthernet. But it has a feauture from them that its dependent from internet. BTW

lavish hemlock
#

Hell, you can't even build a Spigot plugin without an internet connection because of Maven resolution.

rough drift
rough drift
#

and its pretty annoying, tho i've gotten around it by using the lib loader

sterile token
lavish hemlock
#

Yes

tiny wolf
#

Umm the plugin works just fine just when getting a serialized thing from a config..

wet breach
#

how does that depend on internet? o.O

rough drift
#
libraries:
  - org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin.version}
```that's how i am loading
rough drift
lavish hemlock
#

Yeah

rough drift
#

its amazing

lavish hemlock
#

Isn't that also against Maven Central policies tho or smthn?

sterile token
#

Does that exists on spigot 1.8.8?

lavish hemlock
#

At least from what I've heard?

rough drift
#

my plugin went down by 2mbs in one swoop

rough drift
sterile token
#

Oh ok

sterile token
#

Smth new to add to my library

#

Btw

#

Thanks people.

rough drift
#

np

#

idk what for

wet breach
sterile token
#

Some spigot rules are really controversial.

rough drift
ivory sleet
#

I mean plugins can depend on internet, but if they do, all internet requires resources must be provided with a download link or sth iirc so for instance runtime dependencies

wet breach
#

which can be a Vlan

sterile token
#

have you read them?

ivory sleet
#

ofc

sterile token
#

ofc?

#

What that omg

ivory sleet
#

Of course

sterile token
#

Ah ok

rough drift
wet breach
rough drift
#

My internet speed would like to disagree

lavish hemlock
sterile token
#

Its controversinal. Because the rules said that the plugins cannot depend from a connection for running. But the spigot has a built-in system that yes or yes requiere

rough drift
wet breach
#

also not hosting a server either

rough drift
sterile token
lavish hemlock
wet breach
ivory sleet
sterile token
#

I have a asigned a simple web server to run with 6mb. And it support over 100 clients per second without problems

rough drift
lavish hemlock
ivory sleet
#

Interesting

lavish hemlock
#

I trust Urbandictionary with slang definitions :p

ivory sleet
#

So do I

rough drift
wet breach
rough drift
wet breach
#

my dedi, I had a gigabit connection

sterile token
wet breach
#

2.3mb for such a connection is nothing at all

sterile token
#

I only 60mb asimetric :crying:

#

😡

wet breach
#

but most dedi's in data centers generally have gigabit connections

sterile token
#

Please take me out from latam

wet breach
#

at minimum you might have a 200mb connection

sterile token
#

How i can disable the mongodb logger?

rough drift
lavish hemlock
arctic moth
#

how do you make player-specific config

rough drift
arctic moth
#

like each player has their own config

sterile token
tiny wolf
#

Kotlin with the serialization api in bukkit

sterile token
wet breach
#

I didn't forget about you @gleaming grove

rough drift
arctic moth
gleaming grove
lavish hemlock
sterile token
#

😕

#

I think i having a cache problem

wet breach
#

sounds like it needs to be replaced with a newer maven version

#

its what I do with software that doesn't work

#

it gets replaced with a new one 🙂

rough drift
#

there is a command to clean out the cache in maven

wet breach
#

yes there is

#

it is technically a build cycle though 🤔

sterile token
#

Logger.getLogger("org.mongodb.driver").setLevel(Level.OFF);

#

Mnns

#

That worked btw

wet breach
#

alright I have to leave

#

will be back in like 12 or so hours

rough drift
#

same

sterile token
wet breach
#

driving nearly to the east coast in the US

rough drift
sterile token
wet breach
#

however one of my family members wants us to drop them off at family in Southern Cali bay area

#

we are in northern Cali and the mountain pass isn't passable

arctic moth
#

so how do i make it so every player has their own config

sterile token
arctic moth
ivory sleet
#

Anyways verano I don’t believe spigot rules state that your plugin must not depend on internet or sth

wet breach
# sterile token so much hours why?

so I am going to be driving to go to so-cal, then b-line it for arizona where I already have a hotel room because by the time I get to near flagstaff it will have been nearly 12 or so hours 😛

#

fortunately even though I am driving 2,550 miles

#

there is 3 drivers

ivory sleet
#

Maybe the premium guide lines altho it should be fine if you leave download links to potential services such that it can be used w/o the dependence of internet

gleaming grove
#

what class use to hold Date in java? i thought OffsetDateTime would be good but Gson don't really like it

ivory sleet
#

Gson got broken time type adapters I believe

#

At least it used to

#

For a long time

#

Very long time

gleaming grove
#

so any alternatives for OffsetDateTime ?

ivory sleet
#

Could write your own type adapter

gleaming grove
#

or i need to implement own adapter?

#

meh...

ivory sleet
#

Yeah might be needed

heavy heart
#

How do i export my plugin from Intellij into my server?

ivory sleet
#

Do you use maven or gradle?

heavy heart
#

maven

gleaming grove
#

<outputFile>${project.basedir}\builds${minecraft.version}${project.name}_${project.version}.${project.packaging}</outputFile>

#

try this

#

but with own path

ivory sleet
#

Expand the window in the up/left corner

#

Then click install

#

should generate a target folder in your project file tree

quaint mantle
#

Do I need to prop drilling the plugin instance in order to access it from other components? Or is there some magic static method that can do that?

gleaming grove
#

@quaint mantle var instance = Main.getPlugin(Main.class); this is one way

heavy heart
ivory sleet
#

if u expand the lifecycle

quaint mantle
gleaming grove
#

in my case Main is the class that starts plugin

quaint mantle
#

oh nice

#

But is it the best way? just asking for good practice here

gleaming grove
#

i prefer to use Dependecy Injection

#

and i guess thats all options, by Static (getPlugin) or Dependecy Injection

quaint mantle
#

Appreciate a lot, thanks

sterile token
gleaming grove
#

o god you are so kind to me

#

thank you very much

sterile token
#

Check it if it works

#

Last time i tested it worked

somber hull
#

guys

sterile token
sterile token
somber hull
quaint mantle
#

hi bruh

sterile token
heavy heart
heavy heart
sterile token
#

Allright

#

Look for the folder target

heavy heart
#

the snapshot file?

sterile token
#

It will be a jar

#

called your projectname-version.jar

heavy heart
#

gotcha

#

thank you comrade

sterile token
#

No problem just tag me for help

heavy heart
#

apprecieate the help

gleaming grove
sterile token
#

Allright

#

Omg i couldnt solve this error

#

Btw

#

I will have to a dept reasearch on google

quaint mantle
#

I remember having the exact same problem

#

don't recall the solution toh

#

Google will help you

quaint mantle
# sterile token

You are probably missing the api implementation ... i'm start to remember

sterile token
sterile token
upper niche
#

so im spawning shulker bullets to orbit the player in a circle
when they spawn they circle some offset by one block in a cardinal direction relative to their starting degree for about 10 seconds before just magically changing their orbital center to be around the player
is there any reason why this is?

public class ShulkerOrbit extends BukkitRunnable{
    private ShulkerBullet shulker;
    private Player player;
    private int n;
    private double oldDegree;
    private double degree = 0;
    
    public void run() {
        oldDegree = degree;
        Location playerLoc = player.getLocation();
        playerLoc.add(Math.cos(degree)*(n == 1 || n == 3? -1 : 1), 0.5, Math.sin(degree)*(n == 0 || n == 2? -1 : 1));
        shulker.teleport(playerLoc);
        shulker.setGravity(false);
        shulker.setTarget(player);
        shulker.setGlowing(true);
        degree = (degree+(Math.PI/20))%Math.PI;
        if (oldDegree > degree) n = (n+1)%4;
    }
    
    public ShulkerOrbit(double degree, ShulkerBullet bullet, Player player) {
        this.degree = degree;
        shulker = bullet;
        this.player = player;
    }
}
sterile token
upper niche
#

i did though?

sterile token
#

But add keyword java

#

And it will format with colors

upper niche
#

oh shit i didnt do that though

#

lmao

quaint mantle
#

you can attach the highlighting that is pretty nice

upper niche
#

whoops

ivory sleet
ivory sleet
#

It’s a bit hard to rant about why, unless you have a deeper understanding of Java and object orientation. But yeah (:

sterile token
#

Conclure singleton or static for getting class methods?

#

🤔

ivory sleet
#

getting class methods?

#

Is it a static singleton?

sterile token
#

Yes because some people said:

1- Static methods consume to much resources
2- Singleton has some problems

#

So idk what to use

ivory sleet
#

What lmao

#

First one is false

#

Second one is true and false

#

It has cons and pros like all things

quaint mantle
misty current
ivory sleet
#

Well

#

It’s very easy to implement a thread safe lazy static singleton

gleaming grove
#

badly implemented singleton has problems when it comes to mulitthreading

quaint mantle
ivory sleet
#

And if you don’t know a jack shit about concurrency, even guice provides some stuff to do it for you

#

synchronized kinda sucks

#

but yeah

quaint mantle
sterile token
#

Im talking about class methods, fields, etc. Like some people recommend me using statics and others using class instance (singleton)

ivory sleet
ivory sleet
somber hull
ivory sleet
#
  1. Static singleton
  2. Static helper method
  3. Static factory method
  4. Utility method
#

For fields

somber hull
#

tf is a singleton

#

i get the rest

ivory sleet
#

if it’s a constant or stateless object, or if lazy static singleton might require a non final static singleton

#

singleton is a design pattern

somber hull
#

got it

ivory sleet
#

Ya, pretty sure google got some fairly sophisticated explanations

somber hull
#

_zer0 just reminding us that hes here like: 👍

quaint mantle
somber hull
#

i see that lol

ivory sleet
#

To be fair I use static singleton for my plugin instance lol

somber hull
#

So im using jackson Json for data storage

#

Idk if anyone is familiar with that

#

Anyway

ivory sleet
#

Oh god Lombok

somber hull
#

Should i just get the map

somber hull
#

I dont like it so far

ivory sleet
#

Who told you that

somber hull
gleaming grove
#

what's wrong with lombox, i told him

ivory sleet
#

Don’t listen to him

quaint mantle
#

Straight to jail

ivory sleet
#

Or well at least in this matter

#

Although if you don’t want contributions I guess lombok is an effective tool

somber hull
somber hull
# somber hull Should i get the map, and then use `.put()` or should i make a method in this da...
package me.silentprogram.betterbounties.jacksondata.files;

import lombok.Getter;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

public class Data {
    //On every kill, check if player has claimed bounty in playerBountyMap if they do, loop through claimed bounties and check if the person killed was a bounty
    @Getter
    Map<UUID, Bounty> bountyMap = new HashMap<>();
    @Getter
    Map<UUID, List<UUID>> playerBountyMap = new HashMap<>();
    
    
}

Its litterally just this as the class

ivory sleet
#

Well

#

I very much advice you to encapsulate the map

#

And not just expose it

#

And then serialize the class instead

somber hull
ivory sleet
#

yes

#

Without a getter

somber hull
somber hull
#

Hows that work

gleaming grove
#
 @Getter
public class Data {
    //On every kill, check if player has claimed bounty in playerBountyMap if they do, loop through claimed bounties and check if the person killed was a bounty
   
  private  Map<UUID, Bounty> bountyMap = new HashMap<>();
   
  private    Map<UUID, List<UUID>> playerBountyMap = new HashMap<>();
    
    
}```
ivory sleet
#

Yeet the @Getter

gleaming grove
#

you can use getter like that

somber hull
#

I still need to access this data form outside the class

ivory sleet
#

Provide methods from the Data class itself

somber hull
ivory sleet
#

make the class speak for itself

somber hull
#

Oh, so your just telling me to stop using lombok

#

I get it, but i gotta try it first

gleaming grove
#

no, its not about lombok its about code architecture

somber hull
#

I probably will stop using it

ivory sleet
#

Well partly but also encapsulate your data rather than just exposing it

sterile token
#

Please dont never use lombok its consume the 20% of my JVM

#

😡

ivory sleet
#

Else you might be better off with a public field instead

sterile token
#

And even more depending of how much i use it in a jar

somber hull
#

conclure

ivory sleet
#

Well I’m against lombok because it’s effectively useless and too ide dependent

somber hull
#

Are you telling me to make it private, and make a getter and a custom .put method?

#

Inside the data class

ivory sleet
#

Yes

somber hull
#

Ok

#

thank you

#

gtg

ivory sleet
#

well

#

Skip the getter

somber hull
#

aaaa

ivory sleet
#

And cya then

somber hull
#

hold up ill be on mobile

ivory sleet
#

You don’t

#

Only the Data class itself can touch the map instance

#

If any other class wants to flirt with the map

#

Then they must go through Data themselves

gleaming grove
#

do some methods for getting or setting data in hashmap like that

#

so you can control flow of data

ivory sleet
#

^

lavish hemlock
#

what is SpigotBean

gleaming grove
#

it's attribute for my own implementation of Dependecny injection

ivory sleet
#

You got your own di framework?

gleaming grove
#

ye

lavish hemlock
#

I should make my own DI framework

ivory sleet
#

That’s interesting

quaint mantle
ivory sleet
#

So does it just instantiate the declared constructor Jacek?

sterile token
ivory sleet
#

High abstraction over null

ivory sleet
#

Nothing to do with concurrency actually verano

crimson marsh
#

Anyone know how to help me, Cloud (the plugin seen with the error) works perfectly fine before i add my hub core, when I add my hub core I get this error. Anyone understand what might be the cause of this?

ivory sleet
lavish hemlock
gleaming grove
ivory sleet
quaint mantle
#

maybe he is asking if it's thread-safe

ivory sleet
#

Tho kotlin is kinda hot here also

#

Very hot

lavish hemlock
ivory sleet
lavish hemlock
#

I could probably over-optimize it with ✨ method handles ✨

ivory sleet
#

I think it uses unsafe

#

Unsure

#

Actually

lavish hemlock
#

oh

ivory sleet
#

But possibility

gleaming grove
lavish hemlock
#

I mean Unsafe would be the fastest option actually

ivory sleet
#

And what if you have two constructors jacek

lavish hemlock
#

You could essentially recreate a constructor

ivory sleet
#

Ye true

gleaming grove
#

or like that

ivory sleet
#

Hmm

gleaming grove
ivory sleet
#

Ah right lol

gleaming grove
#

propably i forgot about this case

lavish hemlock
gleaming grove
#

for sure it works if one constructor has no params and second has some

ivory sleet
lavish hemlock
#

yes

#

I might brand them after myself

#

maow-io and maow-di

ivory sleet
#

I am waiting x)

#

Yaa

lavish hemlock
#

and then the Maven artifact can just be

#

xyz.maow:io:1.0.0

ivory sleet
lavish hemlock
#

If you have two bi constructors

ivory sleet
#

Oo yeah

lavish hemlock
#

they'll probably kiss 😳

ivory sleet
gleaming grove
#

ok i was lazy, so i always get first contructor

ivory sleet
#

Lol

#

Fair

gleaming grove
#

and thats good enought for me

ivory sleet
#

There’s just so many times we have two constructors right

gleaming grove
#

especially with classes to Inject

ivory sleet
#

Yeah

buoyant viper
gleaming grove
#

i mean in company i working for there is no class that has 2 constuctors

buoyant viper
#

wait

ivory sleet
gleaming grove
ivory sleet
#

I just tilted towards static factory methods

lavish hemlock
#

Spygot 👀

gleaming grove
#

so in case of static factory i just getting injected classes from Injection container

buoyant viper
lavish hemlock
#

HAHAHA

gleaming grove
#

i mean i would get

lavish hemlock
buoyant viper
#

maowhist

lavish hemlock
#

ONE OF MY FRIENDS GOT MAD AT ME YESTERDAY FOR MAKING A CHINESE JOKE

ivory sleet
#

Well I use guice time from time but I find it hard because the static analyzer can’t work well with it

#

And the compiler

#

So it’s a bit meh

lavish hemlock
#

I dislike Guice because it doesn't make any fucking sense

ivory sleet
#

😔

lavish hemlock
#

What I'd do is combine annotation processing and unsafe reflection

#

So the annotation processor would generate bindings files

ivory sleet
#

So basically dagger

lavish hemlock
#

And then the framework would read the bindings to find out what provides what

#

And then when you would retrieve an instance for a class from the framework

gleaming grove
#

do you know how can i add own code generator to Inteliji?

ivory sleet
lavish hemlock
#

It would use the bindings + unsafe reflection to construct an instance of that class

#

The benefit is that you only have to use annotations and like minimal injector calls

ivory sleet
#

Gradle

#

:3

lavish hemlock
#

Maven has support for annotation processors tho

ivory sleet
#

Yeah

lavish hemlock
#

I'd argue Maven support is actually better than Gradle's

ivory sleet
#

Hmm well gradle’s configurability is op

lavish hemlock
#

True

#

I eventually plan on making my own buildsystem

#

It'll be called Facere

ivory sleet
#

O

lavish hemlock
#

And it'll use TOML as opposed to Groovy/Kotlin or XML

ivory sleet
#

Oh that’s interesting

lavish hemlock
#

But with the added ability to define a build src plugin like Gradle

ivory sleet
#

With what langauge?

lavish hemlock
#

Java

ivory sleet
#

Ah

lavish hemlock
#

I don't want to tether people to Groovy or Kotlin like Gradle does

ivory sleet
#

Why not kotlin

lavish hemlock
#

Because sometimes I just want to write something in Java for my Java-based project.

#

Kotlin is a bit slow to compile.

ivory sleet
#

Hmm true

#

But still, if people really want to shrug

lavish hemlock
#

Then they can use Kotlin lol

ivory sleet
#

Good

lavish hemlock
#

Kotlin is a JVM language, it supports Java libraries

ivory sleet
#

Hmm might as well go all in with clojure

#

But yeah

lavish hemlock
#

Oh yeah also I won't do any weird shit like what Gradle does

ivory sleet
#

Lol

#

Such as

lavish hemlock
#

D A E M O N S

#

And supporting C++ compilation

#

Or deprecated features

#

Or a wrapper

ivory sleet
#

Hmm fair

lavish hemlock
#

For Facere, the version being used shouldn't really matter

#

Hell I wanna make sure that I don't have to put in any additional work to allow it to support newer Java versions

ivory sleet
#

Oh that’s an interesting take

#

As opposed to some other yes build tool

lavish hemlock
#

Your buildsystem failing to work is one of the most infuriating things ever.

#

Which is why I will also prioritize good error handling.

buoyant viper
#

gradle when it cant find a class / method u used for a build task bc it got removed 3 major versions ago

ivory sleet
#

Yeah lol

#

Gradle is a bit baboony

#

Sometimes

lavish hemlock
#

Gradle when you're modifying a 3 year old project

#

There's always some weird problem with that :p

#

But yeah

#

Speed is also a priority

buoyant viper
#

its amazing how backwards-incompatible gradle is

lavish hemlock
#

Which is why TOML is being used as opposed to a buildscript like build.gradle(.kts)

ivory sleet
#

Yeah, I hate that groovy dsl doesn’t tell me what’s deprecated also or well IntelliJ’s fault perhaps

#

Yes Ik kotlin dsl

lavish hemlock
ivory sleet
#

That too lol

lavish hemlock
#

I never felt happier than when I swapped to the Kotlin DSL and all of my Gradle-related problems were mostly solved.

buoyant viper
#

lets all switch to sbt

ivory sleet
#

Yeah, kotlin dsl makes it a bit more doable

lavish hemlock
#

Let's all use Ant 😎

ivory sleet
#

🌞

lavish hemlock
#

I want it to be able to run as fast as running Javac by itself most of the time.

#

Ah yeah I'll also steal some ideas from Maven, like maybe archetypes.

#

Since archetypes are nice for setting up frameworks.

#

And I have this very based opinion when it comes to Gradle

#

We don't need tasks.

ivory sleet
#

Let me know when you get a test build I can try out fingerguns

lavish hemlock
#

Aight I'll contact you in 1.5 years.

ivory sleet
#

Consider it considered

lavish hemlock
#

Oh yeah btw

#

It should support Maven publishing and resolving out of the box.

buoyant viper
#

all i want in build system is repos dependencies and a built-in fat-jar generator

lavish hemlock
#

Oh yeah I was planning on adding some shading features

buoyant viper
#

the amount of times i actually need to shadow stuff in to my projects bc i make standalones

lavish hemlock
#

Same

#

I'll also add additional stuff for MANIFEST.MF generation in case you need to do a Main-Class thing or whatever.

buoyant viper
#

cba to learn that one shadow plugin everyone else uses tho, i just kinda make a new configuration that compile[Only] extends from

buoyant viper
#

i cba to use it then

lavish hemlock
#

It just automatically adds stuff under implementation or compile to the jar.

#

Also use implementation not compile

#

compile is slower and deprecated.

buoyant viper
#

da hell da differnece

lavish hemlock
#

There is no difference.

buoyant viper
#

wtf

ivory sleet
#

Apparently the name was misleading

lavish hemlock
#

So yes Gradle is

#

implementation
api
compileOnly

ivory sleet
#

compileOnlyApi iirc also

lavish hemlock
#

Ah yeah

#

For Facere I'll likely do

#

like a multi-scope thing

#

so

buoyant viper
#

u drive a hard bargain gradle

#

u drive a hard bargain.

#

implementation it is ig

ivory sleet
#

Ya

#

Pewpew

lavish hemlock
#

Facere scopes:
include
compile-only
transitive

#

(working names atm)

ivory sleet
#

And then runtime-only also?

lavish hemlock
#

ah yeah

#

what the fuck is the point of runtime-only though

ivory sleet
#

I believe gradle got it tho you end up using it once in a blue moon

buoyant viper
#

magic voodoo not needed to compile

ivory sleet
#

It’s like

#

We shade this damn jar for you but we won’t offer you it at compile time

lavish hemlock
#

ig it's useful for like

#

SLF4J bindings??

quaint mantle
#

out of curiosity, someone here writes code as a professional?

lavish hemlock
#

ehhhh

#

almost

young knoll
#

I don't even know how 3 gradle

#

I use implementation and yet it still yells at me over transitive dependencies

echo basalt
#

Question: When I do Bukkit.getWorldContainer().getAbsolutePath() there seems to be an extra character added to the file path

#

Is this regular behavior?

quaint mantle
#

Weird

sullen marlin
#

. Just means that directory

#

Shouldn't affect you in any way

#

You can normalise if if you want

quaint mantle
ivory sleet
somber hull
#

Sorry I didn’t respond earlier

#

Things got crazy

ivory sleet
#

Well basically it defends your code against yourself

#

(There are other reasons) but that’s one clear reason why it most likely is going to be a beneficial choice

gleaming grove
#

in simple words if you want to work as programmer just stick to this approach

ivory sleet
#

Yeah there’s a lot more to it

young knoll
#

No public exposure

#

This applies to humans and maps

ivory sleet
#

For instance if you decide you wanna refactor the code (which is a semantic change to the system which does not change behavior) and switch to another implementation, let’s say a list, then other components of code which depend on the Data component won’t likely get affected as hard as they would if they were to depend on the map directly. More over does it make the Data class a unit which might be worth testing. Over and above all you make your class speak for itself so in other words, you’re bound to write code that explains itself much clearer.

gaunt violet
#

looking for help to my server !

mighty pier
#

how do i get a player's luckperms prefix?

quaint mantle
unkempt peak
sterile token
#

Hi

#

Anyone know how to get rank expire time from Luckperms api?

#

I cannot find in their documentation

unkempt peak
#

Is this what your looking for?
https://luckperms.net/wiki/Developer-API-Usage

sterile token
#

Yes i have already red the api

#

But i couldnt find how to get the rank expiration time

#

Like i want to show on scoreboard when your rank will expire

unkempt peak
#

Try asking in luckperms discord

#

It's linked on the homepage

sterile token
#

Ok

unkempt peak
#

Sorry I work help but I've never used that api

echo basalt
#

Is there some sort of delay between WorldSaveEvent and the region files actually being written?

dusk flicker
#

?jkd

#

?jd

echo basalt
#

I seem to have issues with saving data, but calling /save-all works

dusk flicker
#

Hmm, how are you trying to call it?

#

Nothing I can see from WorldSaveEvent that would say it should be delayed in any way (in the JavaDocs that is)

echo basalt
#

I have a listener for worldevents that I add a callback to (when WorldSaveEvent hits, run runnable)

#

So I indicate a runnable to run (which saves region data elsewhere), call World#save and it's giving me the old data

dusk flicker
#

hmm

swift adder
#

?paste

undone axleBOT
glossy dirge
#

hello why this is deprecated ?

    public void hoverEvent(TextComponent component, String message) {
        component.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT,
                new ComponentBuilder(message).color(ChatColor.WHITE).create()));
    }
arctic moth
glossy dirge
#

the new HoverEvent()

echo basalt
#

You know you don't need the times loop right

#

when are you calling that?

arctic moth
#

when a command is run or when the player takes a finaldamage which is higher than their health

#

ok restarted the server now theres error spam

buoyant viper
glass tangle
buoyant viper
#

unless

quaint mantle
#

i wrote a lot of code

#

it compiled and worked at first try

#

godlike feeling

lunar forge
quaint mantle
worldly ingot
#

It now requires a type of Content, which can be one of either Item, Entity, or Text

glossy dirge
worldly ingot
#

new Text() instead of the components

#

Basically just wrap your component in new Text()

glossy dirge
#

got it thank you

heavy heart
#
[Server thread/ERROR]: Could not load 'plugins/PluginName-1.0.jar' in folder 'plugins'

Attempting to make my first plugin on IntelliJ (maven), I've got the Minecraft plugin installed on IntelliJ so most is done automatically. All I did was installing it from the Lifecycle folder, and retrieved the .jar from the target folder. To which I transferred it onto my server. Any tips?

buoyant viper
#

whats the rest of the error

heavy heart
#

That's all I got..

#

I did use a filter tho so hold on

#

Ima setup a test server rlq

#

Got it!

quaint mantle
#

?learnjava

undone axleBOT
heavy heart
eternal oxide
#

2nd line of your error tells you exactly whats wrong

heavy heart
#

I did just now realize that I have this thing called searching, however

quaint mantle
#

you dont even need it.

#

read

#

read

#

or just

#

?learnjava

undone axleBOT
quaint mantle
#

LOL

#

i legit thought you dont like to hear learn java but then the thumpsup, okay

heavy heart
#

Haha yea I love that gif

sterile token
#

Anyone know why the mongo cloud its not creating the collection when it doesnt exists?

ornate frost
#

I'm having trouble using HEX color codes when setting the chat format using setFormat
method for translating hex colors:
https://pastebin.com/8TMvgS5w
It doesn't work when I do it like this: https://pastebin.com/yP51x9cw
But it works when I do it like this: https://pastebin.com/LKyztrwW
The only issue with that is I don't want it to translate color codes in the message

quaint mantle
#

is there a way to get the texture of a players head using the spigot api?

#

value for what

golden turret
#

?!?!?!?!?!?!!?!??????!?!?!!?!?!?!?!?!?

quaint mantle
#

you

#

you good?

#

take em somewhere else then

eternal oxide
#

@ancient plank

sterile token
#

@ancient plank help here

golden turret
#

pov:

#

@

ancient plank
#

?ban @chilly prawn toxicity off joining

undone axleBOT
#

Done. That felt good.

sterile token
#

Thanks

golden turret
#

🙏

sterile token
#

Sorry for tag adele

golden turret
#

but with nms you can

quaint mantle
#

well i found out how to get the full skin

#

but now getting the head will be annoying

golden turret
#

yes

#

no necessary

quaint mantle
#

?

golden turret
#

you have the full skin

#

then just get the head part

quaint mantle
#

o yeah

#

now i just need to go through the pain of image processing lmao

golden turret
#

not pain

#

it is easy

vagrant stratus
#

What did I miss 👀

#

I had a piiing

golden turret
#

well

sterile token
vagrant stratus
#

If you remember, DM me it lol

sterile token
#

He was already banned

vagrant stratus
#

I'm still curious as to what was said though 😂

somber hull
#

Am i making things too confusing?

#
import java.util.*;

public class Data {
    //On every kill, check if player has claimed bounty in playerBountyMap if they do, loop through claimed bounties and check if the person killed was a bounty
    private Map<UUID, Bounty> activeBountyMap = new HashMap<>();
    
    private Map<UUID, List<UUID>> playerBountyMap = new HashMap<>();
    
    public void acceptBounty(UUID playerUUID, UUID bountyUUID) {
        List<UUID> bountyList = playerBountyMap.get(playerUUID);
        bountyList.add(bountyUUID);
        playerBountyMap.remove(playerUUID);
        playerBountyMap.put(playerUUID, bountyList);
    }
    
    public List<Bounty> getBounties(UUID playerUUID) {
        List<Bounty> bounties = new ArrayList<>();
        for (UUID i : playerBountyMap.get(playerUUID)) {
            if (!activeBountyMap.containsKey(i)) {
                removeBountyFromAll(i);
                continue;
            }
            bounties.add(activeBountyMap.get(i));
        }
        return bounties;
    }
    
    public void removeBountyFromAll(UUID bountyUUID) {
        activeBountyMap.remove(bountyUUID);
        for (UUID i : playerBountyMap.keySet()) {
            for (UUID bounty : playerBountyMap.get(i)) {
                if (!bounty.equals(bountyUUID)) continue;
                List<UUID> bountyList = playerBountyMap.get(i);
                bountyList.remove(bountyUUID);
                playerBountyMap.remove(i);
                playerBountyMap.put(i, bountyList);
            }
        }
    }
}
#

Ignore the comment

#

You should be able to infer what the methods do by the names

#

But ask me questions if your confused

somber hull
#

It feels hacky, idk why

somber hull
wicked lake
#

In acceptBounty() and removeBounty you could definitely shorten it a bit, hashmap.put() overwrites any previous values for that key, you don't have to remove the key-value pair first.

night patrol
#

org.bukkit.plugin.InvalidDescriptionException: name is not defined

at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile.java:876) ~[spigot-1.12.2.jar:git-Spigot-79a30d7-f4830a1]

at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.java:228) ~[spigot-1.12.2.jar:git-Spigot-79a30d7-f4830a1]

at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:157) ~[spigot-1.12.2.jar:git-Spigot-79a30d7-f4830a1]

at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [spigot-1.12.2.jar:git-Spigot-79a30d7-f4830a1]

at org.bukkit.craftbukkit.v1_12_R1.CraftServer.loadPlugins(CraftServer.java:305) [spigot-1.12.2.jar:git-Spigot-79a30d7-f4830a1]

at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:205) [spigot-1.12.2.jar:git-Spigot-79a30d7-f4830a1]

at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:545) [spigot-1.12.2.jar:git-Spigot-79a30d7-f4830a1]

at java.lang.Thread.run(Thread.java:823) [?:1.8.0_272]

Caused by: java.lang.NullPointerException

at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile.java:869) ~[spigot-1.12.2.jar:git-Spigot-79a30d7-f4830a1]

... 7 more```
night patrol
#

hello?

lusty cipher
#

@night patrol it says right there. "InvalidDescriptionException", so there's something up with your plugin description (plugin.yml). It also tells you exactly what: name is not defined. So the name field in your plugin.yml is missing.

night patrol
lusty cipher
#

name is not defined, you only have Name. two different things

rough basin
#

lmao

lusty cipher
#

capitalization matters

night patrol
#
@EventHandler
public void onBlockBreak(BlockBreakEvent event){
    Player p = event.getPlayer();
    Block block = event.getBlock();
    if (p.getItemInHand().getType() == Material.GOLD_PICKAXE) {
        if(block.getType().equals(Material.STONE)) {
            Location loc = event.getBlock().getLocation();
            event.getBlock().getDrops().clear();
            loc.getWorld().dropItem(loc, new ItemStack(Material.GRAVEL));
        }
        if(block.getType().equals(Material.GRAVEL)) {
            Location loc = event.getBlock().getLocation();
            event.getBlock().getDrops().clear();
            loc.getWorld().dropItem(loc, new ItemStack(Material.SAND));
    }
        if(block.getType().equals(Material.SAND)) {
            Location loc = event.getBlock().getLocation();
            event.getBlock().getDrops().clear();
            loc.getWorld().dropItem(loc, new ItemStack(Material.CLAY));
    }
    }
}```
#

hmm what wrong with my code

#

it have no errors but still not working

somber hull
wicked lake
#

I do it all the time with no issues

wicked lake
#

block.getType().equals(Material.STONE) use == for Enums, not .equals()

still valley
#

is there a way to tell if a player doesn’t load a server resource pack? does spigot know anything about that i’m not sure how it works

wicked lake
#

PlayerResourcePackStatusEvent might have what you're looking for

wicked lake
#

Throw in some debug println's in to figure out where it's getting held up

#

What version are you coding for?

#

ah 1.12 nvm

tired dagger
#

So, I've got a design question for you all. Is dependency injection of our main class really necessary? For example, I've noticed I've just been using the built in getProvidingPlugin method throughout my classes. It seems pointless to require each class an instance of the main because I believe all plugins are singletons. Am I missing something here or...? Here's what I'm talking about.

wicked lake
tired dagger
#

I mean I suppose you could argue its less safe because its "JavaPlugin" rather than our plugin object, but then again I can just cast the name of the class and is that not essentially the same thing?

thorny python
#

which event will be called when player kill a mob?

wicked lake
#

EntityDamageByEntityEvent, check entity health - event.getFinalDamage() <= 0

thorny python
#

does it include ranged weapon damage and cause fall death?

wicked lake
#

e.getCause().compareTo(EntityDamageEvent.DamageCause.PROJECTILE)

thorny python
#

thanks

wicked lake
#

Hopefully that works for you, I've not gone into that end of things too much

thorny python
#

xd I am check it out, probably works

thorny python
#

cancel EntityShootBowEvent for crossbow will not return the arrow but set crossbow to empty load, is it intended behaviour?

opal juniper
granite burrow
#

How can I handle 10 quad + in code?

quaint mantle
vocal cloud
#

The question being do you really need to handle such a large number?

analog prairie
#
name: Spigot-ExpTech
version: 22w02
author: whes1015
main: Spigot_ExpTech_whes1015.whes1015

commands:
  et:
    description: Control ExpTech Plugin
    usage: /et <args>
    permission: exptech.admin
  cam:
    description: 自由視角
    usage: /cam
    permission: exptech.admin
#
@Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if(Objects.equals(label, "et")){
            if(Objects.equals(args[0], "reload")) {
                plugin.getServer().getPluginManager().disablePlugin(plugin);
                plugin.getServer().getPluginManager().enablePlugin(plugin);
            }else {
                logger.log("WARN","onCommand","Unknown Command");
            }
        }
        if(Objects.equals(label, "cam")) {
            System.out.println("1");
        }
        return false;
    }
#

Why I can't use cam command?

#
>cam
[15:58:04] [Server thread/INFO]: /cam
>cam
[15:58:04] [Server thread/INFO]: /cam
>cam
[15:58:05] [Server thread/INFO]: /cam
thorny python
#

did you register your command executor?

analog prairie
#

Oh

#

Thanks

#

What is return true mean?