#help-development

1 messages · Page 1637 of 1

hardy swan
#

Furthermore, comes with an animation

lost matrix
#

Yes runnables for cooldowns is a bad idea. Use timestamps instead.

#

It could be as simple as that:

public class CooldownManager {

  private final Map<UUID, Map<String, Long>> cooldownMap = new HashMap<>();

  public void setCooldown(UUID userID, String cooldownName, long cooldown) {
    cooldownMap.computeIfAbsent(userID, key -> new HashMap<>()).put(cooldownName, System.currentTimeMillis() + cooldown);
  }

  public long getTimeLeft(UUID userID, String cooldownName) {
    long stamp = cooldownMap.computeIfAbsent(userID, key -> new HashMap<>()).getOrDefault(cooldownName, 0L);
    return stamp - System.currentTimeMillis();
  }

  public boolean isCooldownOver(UUID userID, String cooldownName) {
    return getTimeLeft(userID, cooldownName) <= 0;
  }

}
unborn lintel
#

I put a 1.8.9 map in a server 1.16.5 map and a few chunks are loaded and the map is half bent, can you fix it somehow? sorry for my english die Chunks wollen also nicht geladen werden, aber alles funktioniert in 1.8.9

lost matrix
#

Ew timings v1

#

Hm ok so 3% of your tick is too much? For how many users?

#

Show some code and we can see if there are some low hanging fruits optimization wise

narrow furnace
#

?paste

undone axleBOT
lost matrix
#

Ill just read the code from top to bottom and throw my 2 cents in.
First:

Block block = player.getTargetBlock(new HashSet<Material>() {{
            add(Material.AIR);
            add(Material.WATER);
        }}, 5);

Anonymous initializer will clutter the ram with thousands of anonymous classes if you do it like this. Make this Set an private static final EnumSet for optimal performance.

#
  private static final EnumSet<Material> MATERIAL_FILTER = EnumSet.of(Material.AIR, Material.CAVE_AIR, Material.WATER);
twilit summit
#

Hello, is there a way to handle exception in console?

shy wolf
#

how can i disable my plugin

#

what is the mothod?

regal moat
#

how do i NOT make display names italic

lost matrix
#

Next:
You can just use the spigot method to get the distance squared between two locations:

    Location locA;
    Location locB;
    double distanceSq = locA.distanceSquared(locB);
    if(distanceSq > 1024){
      return;
    }
regal moat
#

(in 1.17.1)

lost matrix
regal moat
#

like this then?

lost matrix
#

Those lines kind of make no sense to me:

        BrokenBlock brokenBlock;
        if (time == -1) brokenBlock = new BrokenBlock(block, time);
        else brokenBlock = new BrokenBlock(block, time);

Because in the end brokenBlock will always be just a new BrokenBlock(block, time)

narrow furnace
#

...

#

bro

crisp arch
lost matrix
#

BrokenBlocksService can be reduced like this:

public class BrokenBlocksService {

  private static Map<Location, BrokenBlock> brokenBlocks = new HashMap<Location, BrokenBlock>();

  public BrokenBlock getOrCreateBrokenBlock(Block block) {
    return getOrCreateBrokenBlock(block, -1);
  }
  
  public BrokenBlock getOrCreateBrokenBlock(Block block, int time) {
    return brokenBlocks.computeIfAbsent(block.getLocation(), loc -> new BrokenBlock(loc, time));
  }

  public static void removeBrokenBlock(Location location) {
    brokenBlocks.remove(location);
  }

  public boolean isBrokenBlock(Location location) {
    return brokenBlocks.containsKey(location);
  }

}
#

computeIfAbsent gets the Object from the map or puts a new one in the map and then returns it if it does not exist

crisp arch
#

anyways, i got a question

does InventoryDragEvent cover hotkeying items from one slot to another?

full spruce
#

hi

tardy delta
# lost matrix It could be as simple as that: ```java public class CooldownManager { private...

I had something like this

protected final Map<UUID, Long> cooldowns = new HashMap<>();

public boolean hasCooldown(int secondsIfNotDefault) {
        long time = secondsIfNotDefault == -1 ? 5 : secondsIfNotDefault;
        if (cooldowns.containsKey(p.getUniqueId())) {
            if (cooldowns.get(p.getUniqueId()) > System.currentTimeMillis()) {
                Utils.message(p, "§cPlease wait " + (cooldowns.get(p.getUniqueId()) - System.currentTimeMillis()) / 1000 + " more seconds!");
                return true;
            }
        }
        cooldowns.put(p.getUniqueId(), System.currentTimeMillis() / 1000 + time);
        return false;
    }
full spruce
#

Playing Intellij 🤣🤣🤣

tardy delta
#

sure

lost matrix
#

There is probably something you can do in the BrokenBlock class but ill play some games with the boiz

full spruce
#

i was just learning java

lost matrix
full spruce
#

manupulationg variables

lost herald
full spruce
#

nah notepad for life

hybrid spoke
tardy delta
#

notepad..

lost matrix
#

This or bust

crisp arch
lost herald
#

no, eclipse 4life

full spruce
#

this ide actually LoOkS gOoD

#

notepad for life

#

paper is just better

lost herald
#

sus

tardy delta
#

sublime text 😳

hybrid spoke
#

i am coding in my book with a pencil

crisp arch
#

im coding with my imagination

full spruce
#

i am coding with a coal

#

better i see a tree to get some charcoals

hybrid spoke
#

i was serious

full spruce
lost herald
opal juniper
#

coding on paper is fun

#

you don’t know if it works

#

but

full spruce
#

yeah

opal juniper
#

it is an interesting experience

narrow furnace
#

vim is superior

hybrid spoke
#

chisel my code into marble

full spruce
#

best ide is paper and pen

opal juniper
#

it’s one of those things that i can see the advantage of but like

narrow furnace
#

yes

opal juniper
#

i need muh auto completions

narrow furnace
#

only advantages

#

plugins exist for vim

hybrid spoke
narrow furnace
#

coc plugin for auto complete

#

ezpz

opal juniper
narrow furnace
#

vim wins

hybrid spoke
narrow furnace
#

yes that one

opal juniper
#

you feel like a pro

hybrid spoke
#

its like spoonfeeding here

crisp arch
#

guys check out the new and improved

hybrid spoke
#

without your IDE

opal juniper
#

lmao

opal juniper
#

what’s this

crisp arch
#

offline editor

full spruce
#

how to format code

#

?

narrow furnace
full spruce
#

on discord

tardy delta
#

like the good old days 😦

crisp arch
full spruce
#

yeah

tardy delta
#

:{

full spruce
#

discord is way betteer then intelliJ

hybrid spoke
tardy delta
#

how about compiling on discord?

full spruce
#

yeah

#

bot

#

in need

crisp arch
#

dw just compile with your uh brain

tardy delta
#

...

full spruce
#

wh

#

what

#

oh

tardy delta
#

```java
```

#

took me long phew

crisp arch
#

error: wtf is this

#

see? brain compiling is pog

opal juniper
#

make all methods static so there is no need to instantiate classes GigaBrain

full spruce
tardy delta
#

not even private

hybrid spoke
#
Bukkit.BroadCastMessage(new PlayerEnum()[0].GetPlayerEnumTypeResult().HIT.GetDeadText());
full spruce
#

wth

#

not working

hybrid spoke
#

it is

tardy delta
#

on both sides

hybrid spoke
#

:(

full spruce
#
System.out.print(discord);```
#

gg

hybrid spoke
#

wrong

full spruce
#

what

hybrid spoke
#
boolean discord = true;
System.out.println(discord ? !discord ? discord : !discord : "true");
crisp arch
#
pubilc clas smain{}
pulick statik viod main(sTRING[] args){
  System.out.pritnline)"work plsplspls");;;
}
full spruce
#

how you get colors?

crisp arch
full spruce
#
System.out.print(discord);```
#

nvm

#

i was on manipulating variables

hybrid spoke
#
#yea
-lmao
+test
crisp arch
#
System.out.println(true)
full spruce
#

i was learning java

hybrid spoke
#
- big minus
+ but also a huge plus
crisp arch
#
why mobile discord sucks:
  - no color formatting for code blocks
  - pressing "enter" just creates a newline
  - the chat section is bugged af
#

also i cant see the formatting cuz im on mobile sadge

hybrid spoke
#

dont worry it looks like a rainbow on crack

crisp arch
#

he says on spigot official discord

hybrid spoke
#

i need to learn java first

crisp arch
#

java ez, just uh

#

System.out.println("heh")

#

done

hybrid spoke
#

oh okay

#

thanks

#

i will make my minecraft plugins in js

crisp arch
#

honestly, use intellij, and install the minecraft development kit plugin

hybrid spoke
#

so i will learn java easily

crisp arch
#

the plugin will generate a spigot plugin template for you

#

and intellij's autocomplete is top notch

narrow furnace
#

u cant write spigot code without knowing how to code..

hybrid spoke
#

eclipse >

narrow furnace
#

u should learn java first

hybrid spoke
crisp arch
#

just learn the basics of programming, such as functions, ifs, loops, switch statements, etc

#

and java will come by ez

hybrid spoke
#

i wont need it

#

ah fuck

#

answered the wrong one

crisp arch
#

lol

narrow furnace
#

you have not mastered java

full spruce
#

I was learning java

hybrid spoke
#

so okay

full spruce
#

from

#

?learnjava

undone axleBOT
hybrid spoke
#

how can i get a Players instance by their world?

crisp arch
hybrid spoke
#

ah got it

Player player = new Player();
crisp arch
full spruce
#

i was learning from

#

codeacademy

#

?learnjava

undone axleBOT
full spruce
#

1st link

#

I found it the best

hybrid spoke
#

yeah

#

seems like i am a god

#

and now i will hack NASA

full spruce
#

will sysout print message in game?

#

kali linux

hybrid spoke
#

"hacking"

full spruce
#

nothing

hybrid spoke
#

hacking famous communities will be hard since they are fameous and you are probably not the only one who every attacked them

#

also you would have to go over social engineering instead of finding any Vulnerabilities in their code

full spruce
#

social engineering? I would use vulnerbilities

hybrid spoke
#

email

full spruce
#

thats like

#

hard

#

harder

#

becuae they are famous

hybrid spoke
#

easier than finding vulnerbilities

full spruce
#

but not efficient

hybrid spoke
#

it pretty much is

#

they just need to open your email and you are in

full spruce
#

they will have like many avs and managers

#

so social enginering will not work until they are normal people

#

not celebs

hybrid spoke
#

i would've loved to see their faces

full spruce
#

webcam hack?

hybrid spoke
#

boring

full spruce
#

?

hybrid spoke
#

inject pegasus

full spruce
#

well

#

its a virus

crisp arch
#

if you want to hack people without getting fbi on doorstep, i suggest starting with hacking techs support scammers, its so funny

#

and its so easy

hybrid spoke
#

why? i need help at hacking the NASA with my Player.dll

hybrid spoke
#

its a dll

#

not an interface

tardy delta
#

👀

crisp arch
#

you photosynthesis the quadratic reinvestigation

#

yes mmm

#

big boy words

hybrid spoke
#

i already have their IP

tardy delta
#

the what

full spruce
#

whose

hybrid spoke
#

"127.0.0.1"

full spruce
#

lol

hybrid spoke
#

will ddos them now to doom

tardy delta
#

:/

crisp arch
tardy delta
#

wanna us my botnet?

#

lol

crisp arch
#

WOW HOW DID HE DO IT

tardy delta
#

😂

hybrid spoke
hybrid spoke
#

i am godcipher

full spruce
#

if you wanna hack ethically seriuosly go to kali linux

tardy delta
#

he is god

hybrid spoke
#

i've STARTED my dll and let the Player walk around their servers to break the blocks of thei firewall

#

its allowed as long as there are no help questions

crisp arch
#

but seriously, hacking tech support scammers is ez af

  • get a virtual machine
  • make a RAT and disguise it as passwords.txt
  • scammer makes a copy, thinks they've struck gold
  • now you have access to their computer
  • or use wireshark to get their IP address
hybrid spoke
#

literally everybody here

tardy delta
#

😳

crisp arch
#

nms pog, it makes my brain go yes

tardy delta
#

it makes my brain goes brr

crisp arch
#

me, i need to find a way to loose my remaining 3 brain cells

hybrid spoke
#
loop Bukkit.getOnlinePlayers() if(player.getWorld().equals(YourWorld.class)

why this no work

full spruce
#

i was learning java

hybrid spoke
#

another server software?

crisp arch
#

not literally the word "loop" in th code xd

hybrid spoke
full spruce
#

I am on classes

#

of java

hybrid spoke
#
for loop Bukkit.getOnlinePlayers() if(player.getWorld().equals(YourWorld.class)
#

i want to get the world over the player instance

#

but before i need to get the player over the world instance

#

to get the world

#
System.out.println(Player#getWorld());
#

doesnt work

#
System.out.println(yourPlayer.getWorld());
#

doesnt work either

#

i think you are trolling

narrow furnace
#

did u write it with the #?

hybrid spoke
#

says its null

#

probably not online

#

how do i make toto7735 online

#

i think you cant help me

#

i will come back later to troll someone else

narrow furnace
#

he is trolling

#

he doesnt want anything

hybrid spoke
#

i want money

narrow furnace
#

he is

#

not you

#

omg

hybrid spoke
#

xDDD

narrow furnace
#

toto, you are being trolled

hybrid spoke
#

how the turntables

crisp arch
#

godcipher is trolling you hah get baited

narrow furnace
#

this is the strangest conversation ive ever seen

crisp arch
#

also, pro tip when making plugins, my build configuration for intellij is

  • new jar application
    change the build path to the plugins folder for my test server
#

/reload ingame

hybrid spoke
#

make your own custom plugin which compares the plugin version

#

if its a newer one, reload automatically

crisp arch
#

never heard of this, considering it

#

hes a booster since jun 8, so idk maybe

hybrid spoke
#

nah i am literally one of the most active people in this channel

#

to shit on others

#

and helping them afterwards

crisp arch
crisp arch
#
pubilc clas smain{}
pulick statik viod main(sTRING[] args){
  System.out.pritnline)"work plsplspls");;;
}

pls help psl pls spsl spsls

crisp arch
#

oke thx

#

works like a charm, ty!

hybrid spoke
#

no problemo

tardy delta
hybrid spoke
#

why is he swearing to me

#

dont even try it toto

tardy delta
#

getOfflinePlayer()

#

🥺

hybrid spoke
#

try System.exit(0)

#

it did

#

now you are an offline player

#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.

tardy delta
#

LMAO

gritty urchin
#

Hey, what would be the best way to call several fake BlockBreakEvents without lag or errors so other plugins can listen to it.

#

The regular bukkit BlockBreakEvent

true perch
#

When storing data in SQL, is it possible to put tables inside of tables? Also, is it considered bad practice to do so?

hybrid spoke
#

and if you call it the other plugins will automatically listen to it

next zinc
#

Not sure if this is the right place, but anyone know how I'd download a particlelib in eclipse for my plugin?

#

👌 ty

vital ridge
#

Could someone help me understand this:

public static class ModuleComparator implements Comparator<Module> {
        
        @Override
        public int compare(Module arg0, Module arg1) {
            if (Minecraft.getMinecraft().fontRenderer.getStringWidth(arg0.getName()) >
            Minecraft.getMinecraft().fontRenderer.getStringWidth(arg1.getName())) {
                return -1;
            }
            if (Minecraft.getMinecraft().fontRenderer.getStringWidth(arg0.getName()) >
            Minecraft.getMinecraft().fontRenderer.getStringWidth(arg1.getName())) {
                return 1;
            }
            
            return 0;
            
        }

It takes a list and sorts it my string length so the longer words are the first ones, but I just dont understand how it works.

eternal oxide
#

you don;t access that yoruself, you use it as a Comparator in a TreeSet/Map

#

If the width of arg0 is greater then arg1 it returns -1

#

a comparator sorts objects using -1, 0, 1 to signify which is less/more

vital ridge
#

why does it repeat the if statement twice tho

eternal oxide
#

because its wrong

#

the second one shoudl be <

vital ridge
#

The Comparator<Module> is the generics stuff right?

#

I need to specify a type

eternal oxide
#

no

vital ridge
#

What is it then

eternal oxide
#

There is nothgin generic about Module

#

Module is a class

vital ridge
#

No I mean

#

If you use a class and put <> after it

#

Wasnt this generics stuff?

eternal oxide
#

no

#

? extends Module would be generics

#

or T

vital ridge
#

Okay yea I was mixing some stuff up with the T

#

But Comparator<Module>

#

Comparator is a class right?

#

No

#

its an interface

#

But why do I need to specify the <Module>

eternal oxide
#

it has to know what class you will be passing

vital ridge
#

In the code the compare method just asks for 2 arguments and compares them with each other

eternal oxide
#

the logic is exactly as in the compare method. when an item is added it is compared to the current list contents until it finds its slot.

quaint mantle
#

Hello

#

how do i can give player Speed poition item

#

i can't find it on Material.#

vital ridge
#

Potions arent under material.

quaint mantle
#

okay how i can add it

#

or i can't?

vital ridge
#

You can.

quaint mantle
#

Nice 😄

#

how

vital ridge
#
Potion p = new Potion(PotionType.INSTANT_HEAL, 2);
ItemStack item = p.toItemStack(1);
#

Example.

true perch
#

When storing data in SQL, is it possible to put tables inside of tables? Also, is it considered bad practice to do so?

ivory sleet
#

No you can’t put a table inside a table

#

Well you could take the contents of a table and insert into another assuming the tables have the same types

#

Though you can utilize different tables and create relational tables or whatever the term is for that

opal juniper
#

Is there a good way to get the direction of an entity facing

#

like i can getYaw

#

but i wondered if there was an enum or something

ivory sleet
#

Getting the vector or just how the entity is facing?

opal juniper
#

myeah i just need it so they are facing like NORTH, SOUTH, EAST, WEST

ivory sleet
#

Entity#getFacing saves your ass I think

opal juniper
#

oh i realise the issue

#

dumbass 1.8

ivory sleet
#

Lmao

opal juniper
#

myeah i will just parse it manually ig

#

its from -180 to 180 right?

ivory sleet
#

Hmm thought it was 0 - 360

opal juniper
#

huh

ivory sleet
#

But yeah maybe

#

Don’t trust me on this one lol

opal juniper
#

it is

#

0-360

ivory sleet
#

kotlin 👍

opal juniper
#

kotlin???

#

👀

#

im gonna assume u mean that as a K

#

realises he intended to learn kotlin and forgot about it

ivory sleet
#

Oh I missclicked lol

opal juniper
#

haha

ivory sleet
#

Yeah altho you should be doin kotlin my guy 😉

opal juniper
#

myeah

#

after i have finished this stuff

#

i will

ivory sleet
#

I still do Java but that’s cause I am masochistic sort of 🥴

opal juniper
#

😳

#

lmao

#

i heard jetbrain or what ever they are called just released a course

ivory sleet
#

Terrible truth disclosed, but yeah anyways is it that drone thing you’re working on right now?

#

Oo

#

Intriguing

opal juniper
#

myeah

#

apparently it is free

#

so i may give it a gander

ivory sleet
#

Hmm same

opal juniper
#

The first time a yt vid's sponsored section has been useful xD

ivory sleet
#

Lmao

opal juniper
#

this is teh basics one

full spruce
#

hey

opal juniper
#

👋

full spruce
#

how to use PlayerConsumeEvent?

opal juniper
#

listen for it

#

xD

full spruce
#

please tell

chrome beacon
#

?eventapi

undone axleBOT
full spruce
#

thanks

#

well I can't understand'

opal juniper
#

what about it

#

i can try help

full spruce
#

what tp write after Player consume event

#

import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerItemConsumeEvent;
import org.bukkit.plugin.java.JavaPlugin;

public final class MyPlugin extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
        // Plugin startup logic
        System.out.println("Welcome to my server!");
        @EventHandler
       PlayerItemConsumeEvent.



    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
        System.out.println("Bye");
    }
}```
chrome beacon
#

?paste

undone axleBOT
opal juniper
#

oh lmao

chrome beacon
#

Do you know Java?

full spruce
#

Yes little bit

#

I want that whenever i eat I get a random mob spawned

opal juniper
#

@ivory sleet they call me an artist

full spruce
#

i want an example of how you use ]

#

Player consume event

stone sinew
opal juniper
#

I said that

full spruce
#

example?

opal juniper
#

but the jd said 360 - 0

opal juniper
undone axleBOT
#

Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.

opal juniper
#

look at some other example

#

google

stone sinew
# full spruce example?

Exactly what jeff posted...

@EventHandler
public void onPlayerConsume(PlayerItemConsumeEvent event) {
    Player p = event.getPlayer();
    if(event.getItem().getType() == Material.ENCHANTED_GOLDEN_APPLE)
        event.setCancelled(true);
}
opal juniper
#

yeah it is 180 to -180 now i am pissed

#

lets ask md5

#

@md_5

#

fix teh jd

stone sinew
opal juniper
#

bruhhhh

#

what the jd on

stone sinew
#

🤷

opal juniper
#

ruined my pic Sadge

stone sinew
#

Thats always been minecrafts yaw positioning.

opal juniper
#

i wish North = Positive X

stone sinew
opal juniper
#

i just need the 4 like N/S/E/W

#

but yeaj

full spruce
#

event has a red line

opal juniper
#

?paste

undone axleBOT
opal juniper
#

what have you done?

full spruce
#

me?

opal juniper
#

yeah

stone sinew
full spruce
#

i did

#

?paste

undone axleBOT
stone sinew
#

Show the error then.

full spruce
opal juniper
#

LMAO

chrome beacon
#

.-.

full spruce
#

?

chrome beacon
#

You said you knew a bit of Java

stone sinew
opal juniper
#

mf declaring in the onEnable

#

you need to move the method to the class scope

full spruce
#

new class?

chrome beacon
#

?learnjava You need to at least know basics

undone axleBOT
stone sinew
full spruce
#

ok

opal juniper
#
private BlockFace parseDirection(double yaw) {

    if (yaw <= -135 && yaw >= 135) return BlockFace.NORTH;
    else if (yaw <= -45 && yaw >= -135) return BlockFace.EAST;
    else if (yaw <= 45 && yaw >= -45) return BlockFace.SOUTH;
    else return BlockFace.WEST;
}

Does this seem right?

full spruce
#

?paste

undone axleBOT
ivory sleet
#

Looks like it can be static but yeah

opal juniper
#

true

full spruce
#

Correct?

opal juniper
#

seems to be

#

apart from some weird indentation

full spruce
#

this will do nothing no?

opal juniper
#

no

full spruce
#

with bread

opal juniper
#

it will stop them eating it

#

if they try

full spruce
#

disappear?

opal juniper
#

they keep the bread afaik

#

but it just doesn't do shit

full spruce
#

ok

quartz valve
#

How can i save this File in a dictonary?

enFile = new File(getDataFolder(), "en.yml");

This doesn't work :/

enFile = new File(getDataFolder(), "lang/en.yml");

or

enFile = new File(getDataFolder(), "/lang/en.yml");
ivory sleet
#

First is fine

#

However you need to ensure the parent file (directory) exists

#

Then create the file

quartz valve
#

Oh okay this makes sense

#

thx

ivory sleet
#

👍

quaint mantle
#

how to take a certain amount of experience from a player?

true perch
#

Or is there a better way to organize all of that data

eternal night
#

tables should not be created per-player

#

your players uuid should simply be part of the primary key

high pewter
#

I'm trying to make a PvE gamemode plugin and I'm using default mob spawners. One of the spawners is for slimes but, while the Y level will be fine, they will still only spawn if it's a slime chunk. Is it possible to force a chunk to allow slimes or force a spawner to still spawn slimes even if it isn't a slime chunk through the Spigot API?

hardy swan
#

no, don't think so

true perch
eternal night
#

give me an example of the data you store in that table

#

so I can maybe give an example

true perch
#
//      Card UID, Card name, Card Stars, Card description, Card Attack, Card Defence, etc
//
//  Card Skin data
//      Card UID, Skin 1, Skin 2, Skin 3, Skin 4, Skin 5
//
//  Card Pile Data
//      Player UUID 1
//          Card UID 1
//              Skin ID, Rarity, Amount```
#

Each first line = table

#

and for the card pile data, the 3 indented lines would have been tables

eternal night
#

so you basically have a card which has all the stats mentioned in the card data table

true perch
#

yes

eternal night
#

then a table that holds each available skin for the card

true perch
#

yeah how much they own

eternal night
#

how much they own ?

#

in the skin data ?

true perch
#

the skin data stored here:

//      Player UUID 1
//          Card UID 1
//              Skin ID, Rarity, Amount``` would point to the skin data table
eternal night
#

oh, yea

#

tho why is the rarity in there

#

how does that correlate to the player owning the card

true perch
#

because the same card can have multiple rarities

eternal night
#

Ah, but then amount seems problematic there doesn't it ?

true perch
#

// Card Pile Data
// Player UUID 1
// Card UID 1
// 1, 1, 1
// 2, 1, 1
// 2, 2, 1

#

example

#

I was thinking total amount would be calculated based on each amount within the Card UID table

#

Since there are quite a lot of combinations of skin id, rarity, card IDs

eternal night
#

Yea I guess, but then yea your player UUID would just be a collum in the table

#

not the table itself

quaint mantle
#

how can I pick up and give a certain amount of experience to a player?

true perch
#

Yeah since you can't put tables inside tables, like someone mentioned, my above design won't work.

#

Trying to figure out another way to do it

misty zenith
#

how can i do something after sign written

#

and clicked done button

quaint mantle
#

how can I pick up and give a certain amount of experience to a player?

hybrid spoke
misty zenith
quaint mantle
full spruce
#

what is normal creeper radius?

#

explosion

misty zenith
full spruce
#

what is normal creeper explosion radius?

quaint mantle
#

1725 is like level 30. if a player has 2000 experience, is it possible to take only 1725?

eternal oxide
#

Your async is not constructed until the sync is, so your sync runs first

misty zenith
full spruce
#

thats not spamming

#

anyways

stone sinew
eternal oxide
#

create the sync inside teh async after it runs

misty zenith
full spruce
#

does tick means speed

#

if i increase tick of creeper then will it blast fast?

quaint mantle
stone sinew
quaint mantle
#

p.setExp(p.getExp() - 1395);

#

it doesn't work

regal moat
#

?paste

undone axleBOT
regal moat
#

So guys

#

im tryinna make a totem of dying

#

it wont work

#

i am trying to make it kill me when i take damage if its in my hand

unkempt citrus
#

Use player#damage() instead of setHealth

regal moat
#

what is the player has extra health?

#

oh yeah

#

thanks

#
p.damage(p.getHealth());
unkempt citrus
#

Idk use player.damage(player.getHealth())

regal moat
#

this will work

unkempt citrus
#

Yes

regal moat
#

then

unkempt citrus
#

I think so

quaint mantle
#

@misty zenith

#

p.setExp(p.getExp() - 1395);
it doesn't work

misty zenith
#

1- make sure you exp more than 1395

#

then if you want use levels

full spruce
#

how to register item?

misty zenith
#

you must put #getExpToLevel()

quaint mantle
misty zenith
quaint mantle
#

int

misty zenith
regal moat
#

?pate

#

?paste

undone axleBOT
regal moat
#

I am trying to do a Totem Of Dying

#

But uh

#

Nothings working

#

help

unkempt citrus
#

You got a Nullpointer, spawnLoc is null (Line 37)

regal moat
#

it still doesnt fix the

#

totem of dying problem

#

its supposed to kill you when you take damage

young knoll
#

Why are you using CraftPlayer

twilit summit
#

Hi, is there some way to catch exceptions from all classes of my plugin?

young knoll
#

I mean you could just wrap everything in a try catch

#

But like

#

Don’t do that

twilit summit
#

i dont want 😄

young knoll
#

Then what is your goal

regal moat
#

i just forgot to remove it after trying something

oblique pike
#

By any chance, is there any way to set a config value without getting all the comments lost?

oblique pike
#

How?

hybrid spoke
#

is it a custom config or your config.yml?

opal juniper
#

God

#

i need help

hybrid spoke
#

speak

oblique pike
hybrid spoke
opal juniper
#

so i am trying to work out what "angle" one location is from another

tardy delta
opal juniper
#

and its gonna be some maths

#

no

tardy delta
#

👀

hybrid spoke
tardy delta
#

huh

opal juniper
#

like

#

cause

hybrid spoke
#

it saves the config on the default config

tardy delta
#

defaultConfig

#

pog

hybrid spoke
#

instead of rewriting it

oblique pike
#

saveDefaultConfig will do nothing

opal juniper
#

wait actually i may have done a stupid

#

idk

oblique pike
#

As config.yml already exists

hybrid spoke
#

so where is your problem @opal juniper

onyx fjord
#

is there a wae to check if player is in air?

hybrid spoke
hybrid spoke
opal juniper
opal juniper
river dirge
oblique pike
onyx fjord
#

air

river dirge
hybrid spoke
#

so the comments stay

onyx fjord
#

so get block at player location y-1?

young knoll
#

saveDefaultConfig is only for copying the default config from the jar to the plugin folder

tardy delta
#

player.getLocation().substract(0, 1, 0) i hope that workd

river dirge
young knoll
#

Not for saving the config after you modify it programatically

oblique pike
hybrid spoke
ivory sleet
#

Isn’t it for saving also

young knoll
#

No

oblique pike
ivory sleet
#

Lol nice method name then

young knoll
#

You will need to use a 3rd party API to keep comments

#

Or wait for spigot to update SnakeYAML

ivory sleet
#

Which has already happened

opal juniper
#

no

young knoll
#

Then it should save comments

ivory sleet
#

Myes

opal juniper
#

he bumped it back down right?

#

cause issues

#

i thought

ivory sleet
#

Did he?

grim ice
#

how do i make a class only require 1 out of 2 params of a method, i want the second param to be for other uses in another class

ivory sleet
#

Uh last time checked it was the second latest version of snake yaml

opal juniper
#

well im wrong then

young knoll
#

Create a second constructor that only takes 1 param

grim ice
#

:/ ok

young knoll
#

Or allow null for the second param

hybrid spoke
twilit rivet
#

System.out.println or getLogger

young knoll
#

Varargs works if both are the same type

#

Or you want to deal with casting from Object

hybrid spoke
young knoll
#

JavaPlugin#getLogger

grim ice
#

i forgot how to do it

hybrid spoke
#

this()

grim ice
#

how to like access 2 constructors

#

with different params

#

but same name

hybrid spoke
#

oh then your instance depends on the passed parameters

young knoll
#

Give it 1 argument to access 1

#

And 2 to access 2

grim ice
#

so it automatically depends on the argument that i gave it and go to the one that uses it??

hybrid spoke
#

yeah

grim ice
#

so if one uses ItemStack and one uses Material it adapts to Material if I use Material.STONE

hybrid spoke
#

because of that you cant have 2x the same method with the same name with the same parameters and a different return type

grim ice
#

yooooo technology

young knoll
#

The compiler is smart

swift dust
#

how i can grow seeds?

grim ice
#

when oop:
getServer().getPluginManager().registerEvents(new MainListener(this, new RecipesManager(this), new Method(this)), this);

#

fuck the naming btw ill change it

hybrid spoke
quaint mantle
#

hey

#

i am trying to create a directory in the plugins folder but it won't work

#
public class Initialise
{
    public static String IEDirName = "something";

    public static File GetDirectory()
    {
        File PluginsFolder = new File("plugins");

        String[] Files = PluginsFolder.list();
        for (String File : Files) {
            if (File == IEDirName) {
                File IEDir = new File(IEDirName);
                return IEDir;
            }
        }

        File IEDir = new File(IEDirName);
        if (!IEDir.mkdir()) System.out.println("Failed to create directory.");
        return IEDir;
    }
}```
ivory sleet
#

Jesus

#

C# programmer!

young knoll
#

Heh

#

Can't you use plugin.getDataFolder.getParent

quaint mantle
pulsar zenith
#

hey, so my async task just wont run at all. I checked, and there is nothing that is cancelling it. Any help?

private void addManhuntWin(Player player){
        UUID uuid = player.getUniqueId();
        System.out.println("Starting task");
        Bukkit.getScheduler().runTaskAsynchronously(manhunt.getMain().getPlugin(), new Runnable() {
            @Override
            public void run() {
                manhunt.getDatabase().addManhuntWin(uuid);
                int wins = manhunt.getDatabase().getManhuntWins(uuid);
                System.out.println("Running task. WINS = " + wins);
            }
        });
    }
#

Only the "Starting task" prints out

quaint mantle
quaint mantle
pulsar zenith
ivory sleet
#

manhunt.getMain().getPlugin().getLogger().info("Running task...");

pulsar zenith
#

ok

ivory sleet
#

Idk if sys out works asynchronously, should do but doesn’t seem like it does for you

pulsar zenith
young knoll
oblique pike
ivory sleet
ivory sleet
oblique pike
quaint mantle
ivory sleet
#

Oh right, I believe the newest versions of spigot actually does that but if you’re using something older you might have to use an external yaml lib

tardy delta
#

i'm looking for the same 😔

ivory sleet
#

Hmm I use Configurate, but it’s arguably bloated although engineered by knowledgeable people

grim ice
#

how to access a param of a method from another method

quaint mantle
#

how can I pick up and give a certain amount of experience to a player?

#

1725 is like level 30. if a player has 2000 experience, is it possible to take only 1725?

hybrid spoke
quaint mantle
#

p.setExp(p.getExp() - 1395);

#

it doesn't work

opal juniper
#

am i being stupid, i have an entity called
droneEntity and i am calling this:
droneEntity.getLocation().setYaw(90) but nothing happens

#

do i have to teleport it?

hybrid spoke
#

yes

quaint mantle
#

sorry i am a bit rusty at java i guess but

#

java: method getPlugin in class org.bukkit.plugin.java.JavaPlugin cannot be applied to given types;

hybrid spoke
#

otherwise how would it change

opal juniper
#

it just rotates it... idk

quaint mantle
#
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;

public class Initialise
{
    public static String IEDirName = "something";

    public static File GetDirectory()
    {
        File pluginFolder = JavaPlugin.getPlugin().getDataFolder();
        if (!pluginFolder.exists())
            pluginFolder.mkdir();
        return pluginFolder;
    }
}```
grim ice
#

@hybrid spoke waht

#

no

#

if i do that the method will need to become a string itself

grim ice
#

my method is an event btw

hybrid spoke
grim ice
#

i will take the 30 minutes i took to get the idea to explain it

#

its a mess

#

basically

#

i want to get a param in an event in another class

#

in another method

hybrid spoke
#

what?

#

either i am too tired to understand that

#

or you are too tired to explain it correctly

grim ice
#

public void fuckeryfuck(BlockDamageEvent e, ItemStack item, String key, boolean bol, String matchMat) {

#

so

#

the String key

#

i want it in another class

hybrid spoke
#

is this your event method?

grim ice
#

yes but i wont register iit

severe marsh
#

I want to execute method when I right click diamond sword, which event should I use?

young knoll
#

PlayerInteractEvent

severe marsh
#

ty

hybrid spoke
grim ice
#

ok

hybrid spoke
#

there is no other way than just passing it 2 times

grim ice
#

wdym

hybrid spoke
#

1: into this method

#

2: into your class where you need it

grim ice
#

the method i want it in

#

is an event

#

so basically

#

i want an event method param in another event

grim ice
grim ice
eternal oxide
#

only one event exists at a time

grim ice
#

u can have multiple events

#

for different purposes

eternal oxide
#

and only one will exist at a time

ivory sleet
#

You cannot have a callback for multiple ones

hybrid spoke
#

just one is called per time

#

is what elgar wants to say

grim ice
#

mine are for different purposes

#

yes i know

#

but the one im getting the key from exists when a player join

#

so it shouldnt be a problem

#

right

hybrid spoke
#

so you get a String when a player joins

grim ice
#

wait fuck

#

no

hybrid spoke
#

and want to use it in your BlockDamageEvent too

#

and in this method?

grim ice
#

wait fuck

#

no its not when a player joins

hybrid spoke
#

just store the String somewhere

#

if its a String per Player use a HashMap

regal lake
#

I need some help with the PlayerItemMendEvent, i try to modify the amount a item will be repaired buy a half.
But the setRepairAmount ist some kind of broken.. As example if i do event.setRepairAmount(1); the item is instantly repaired and the event will be called quite often...
Does somebody already used that event ?

ivory sleet
#

I have used it yes 🙂

regal lake
#

Do you know why the item will be repaired instantly for the example above ?

ivory sleet
#

I mean doesn’t the repair amount represent half of the amount or something

#

Believe there’s a detailed explanation in the javadocs

#

?jd-s

undone axleBOT
regal lake
#

I already read the docs.. but it doesn't helped... Maybe i don't understand it or something else...
getRepairAmount returns the amount of the damage which will be repaired, so i did getRepairAmount / 2 and set that amount as new repairAmount.
But this also repaired a lot more (also i got kicked), so i tested it with event.setRepairAmount(1); and the it will be repaired instantly.

ivory sleet
#

If you just by default print out the value?

#

print the repair amount and the experience orbs amount

narrow furnace
#

how do i check if a player is holding a certain item? 🤔

ivory sleet
#

PlayerInventory#getItemInMainHand iirc

regal lake
#

If i only print the values there are correct, as example the chicken will return a repair amount between 0 and 6.
The experience orb will return 3.

But as soon i use event.setRepairAmount(1); the Event will be called like 100 times.

ivory sleet
#

Hmm that’s really odd

regal lake
#

yea 😅

ivory sleet
#

Might be a bug

grim ice
#

is it ok if i repeat 30 lines of code for like 5 times and only change a few things

#

its not normally but

#

in my case its rly hard to find another way

#

like uh

#

WAIT

#

i think i got a solution

regal lake
#

I would love to know if that is a bug.. if so, i could cancel the event and manually repair the item 😅

ivory sleet
#

By your explanation it definitely sounds like one

#

Could you setup something to verify that it’s actually firing crazy amount of times

#

Like a second event callback of that event type

regal lake
#

Okay, then i will manually repair the item and open a issue.

#

Could you setup something to verify that it’s actually firing crazy amount of times
Sure give me a second.

jade grove
#

I've been messing around with Bungeecord 1.7-1.8 and 1.8 players are vanished for 1.7 players, is there a fix for this by any chance?

regal moat
#

?paste

undone axleBOT
regal moat
#

This won't work.

#

I am trying to kill the player when they take damage if the player is holding a specific item.

regal lake
regal lake
#

At first.. you asked 3(!) minutes ago... so why do you ask again ?
Also you don't give us more information, what don't work ?
Do you added debug messages to tested if your code will be executed ?

regal moat
#

but the player isnt taking damage

regal lake
#

The whole code (the damage part) will be executed or the event ?

regal moat
#

this is the part that doesnt work

regal lake
#

Try to use .setHealth(0) instead of you damage(getHealth) part.

fluid cypress
#

i want to avoid players from joining the server while doing something that lags the server. im not sure if i should use onPlayerJoin, onPlayerLogin, onPlayerPreLogin, or something else. also idk if i should just cancel the event, or kick the player, or disallow the login, or what. what should i do?

#

also, for the kick message, how do i construct a Component object?

severe marsh
#

How do I cancel item durability change?

compact cape
#

Which event is called with
bomb.getWorld().createExplosion(bomb.getLocation(), 3f);

narrow furnace
#
@EventHandler
public void onEntityInteract(PlayerInteractAtEntityEvent event) {
    event.getPlayer().sendMessage("hey");
}

this sends "hey" twice

#

how can i make it only send it once

eternal oxide
#

only do it for one hand

narrow furnace
#

so just if its the left hand, return?

grim ice
#

how do i see a variable into somthing if a condition is there

#

like if(a = e){
a = c;
}

regal lake
grim ice
#

nvm

tame coral
#

Is there anyway to force a player to move in a certain direction without using setVelocity or teleporting ?

lost matrix
tame coral
#

Okay

lost matrix
#

I mean... you can mount him on an armorstand and move this one i guess

toxic mesa
#

So I'm using the REL_ENTITY_MOVE packet, what would be the steps I need to take in order to get the deltaX, Y and Z of the entity? (Have not rlly worked with packets be4)

tame coral
torpid zinc
#

is there a way I could check if the clicked item is from an inventory and not the player's inventory? Lets say I have a book in my GUI and player has a book in his inventory, only detect book click from the GUI with setting localized name nor display name?

prime oracle
#

so i know this isnt exactly about about spigot but im very desperate. im using this https://github.com/ronmamo/reflections library to scan for all classes in a package
the problem is that not all are found, just a few.
my code looks like this

        Reflections r = new Reflections(packageName);
        Set<Class<? extends LitCommand>> commands = r.getSubTypesOf(LitCommand.class);
        System.out.println("found " + commands.size() + " commands");

am i doing something wrong or is there a better way to do this, a way that actually works?

ivory sleet
#

Why do this?

prime oracle
ivory sleet
#

Yeah

prime oracle
#

to register commands

ivory sleet
#

Feels like it would be much easier just streaming through an instance of every command and then register it so some lookup

prime oracle
#

i dont want that plugin.yml bullsht where i have to list all the commands, also i dont want to register the commands manually. so i wrote this epic annotation

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface EzCommand {
    String cmdName();
    String usage() default "";
    String description() default "";
    String permission();
    String[] aliases() default {};
    boolean hasPermissionByDefault() default false;
}
ivory sleet
#

?

#

Well just reflect the command map?

prime oracle
#

i did that, thats the ez part

#

but i need to scan the package for all the commands i want to register

#

and i dont know an ez way to get all the classes in a package

ivory sleet
#

Unorthodox but what do you pass as package name and what do you mean by just a few

fluid cypress
prime oracle
#

well with package name im refering to a string. i have around 30 commands but only 9 register and i dont see a pattern why these 9 but i think its always the same

ivory sleet
#

Yes Idk either, don’t have much to go on right now

#

I meant what is the string content

prime oracle
#

the string content is the package name

#

u know packages right

ivory sleet
#

No what’s the actual package name you’re passing?

prime oracle
#

me.derwand.epicplugin.cmd.cmds

ivory sleet
#

Okay looks alright on that front

#

How about you show me the base class and then one class that got added and one that didn’t

prime oracle
#

sure 1 second

#

so this one got added

package me.derwand.litessentials.cmd.cmds;

import me.derwand.litessentials.cmd.EzCommand;
import me.derwand.litessentials.util.LitCommand;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;

import java.util.List;

@EzCommand(
        cmdName = "test",
        permission = "lit.test",
        description = "just for testing",
        usage = "/test"
)
public class TestCmd extends LitCommand {

    public TestCmd(String name) {
        super(name);
    }

    @Override
    public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
        return true;
    }

    @Override
    public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) {
        return null;
    }

}
#

this one not

package me.derwand.litessentials.cmd.cmds;

import me.derwand.litessentials.cmd.EzCommand;
import me.derwand.litessentials.util.LitCommand;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.lang.management.ManagementFactory;
import java.util.List;

@EzCommand(cmdName = "mem", permission = "lit.mem")
public class MemCmd extends LitCommand {

    private static final double MB_SIZE = 1048576d;

    public MemCmd(String name) {
        super(name);
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        double jvmMax = Runtime.getRuntime().totalMemory() / MB_SIZE;
        double jvmUsed = jvmMax - Runtime.getRuntime().freeMemory() / MB_SIZE;
        double systemMax = ((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getTotalPhysicalMemorySize() / MB_SIZE;
        double systemUsed = 0d;

        sender.sendMessage("§6MB jvm memory used, max: §a" + (int) jvmUsed + ", " + (int) jvmMax + "\n§6MB system memory used, max: §a" + (int) systemUsed + ", " + (int) systemMax);
        return true;
    }

    @Override
    public @Nullable List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, @NotNull String[] args) {
        return null;
    }
}
#

they both extend litcommand so they both should be found

ivory sleet
#

Yeah indeed

#

And how does LitCommand look

#

?paste btw

undone axleBOT
prime oracle
#

litcommand is some garbage thing i wrote 3 years ago or something

ivory sleet
#

Oh it’s fine not reviewing code here

prime oracle
ivory sleet
#

Read up (:

prime oracle
#

i have trouble finding all the classes in a package

ivory sleet
#

Anyways do you import or reference the 9 classes that do get added anywhere

#

As opposed to the 21 others

prime oracle
#

nope

#

i was thinking maybe they get optimized out because they arent used at all

#

but they dont

ivory sleet
#

And all classes are in that package of yours?

prime oracle
#

yes all the commands i want

ivory sleet
#

Yeah cuz it won’t scan transitively

prime oracle
#

transitively? u mean subpackages?

#

ill try

ivory sleet
#

Yeah

#

You could try scan every package with ClasspathHelper.forClassLoader()

prime oracle
#

error

ivory sleet
#

Because you’re using the system class loader

#

You probably have to MainPluginClass.class.getClassLoader() and do it from there

prime oracle
#

i did that but now it finds 0 commands

glossy scroll
#

is getChunkSnapshot an expensive method?

prime oracle
#

i added a peek and nothing shows up

    public Set<Class> find(String packageName) {

        InputStream stream = LitEssentials.class.getClassLoader()
                .getResourceAsStream(packageName.replaceAll("[.]", "/"));
        BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
        return reader.lines()
                .filter(line -> line.endsWith(".class"))
                .peek(System.out::println)
                .map(line -> getClass(line, packageName))
                .collect(Collectors.toSet());
    }
ivory sleet
#

Try ClassPath.from(MainPluginClass.class.getClassLoader())
.getAllClasses()
.stream()
.map(ClassInfo::load)
.filter(cls -> cls.isAssignableFrom(LitCommand.class))
And then do whatever u want

#

Might be LitCommand.class.isAssignableFrom(cls)

#

I never remember which one to invoke it on

prime oracle
#

k ill try both

narrow furnace
#

when i use ItemMeta#setDisplayName() it makes it italic

#

how can i make it not do that

ivory sleet
#

Add ChatColor.WHITE + "blah"

#

Or smtng yeah

narrow furnace
#

ah

#

thank you

ivory sleet
prime oracle
tepid parrot
#

could someone help me figure out what in the world is going wrong? i keep getting this error and i've reworked my plugin.yml/pom, but nothing's changing
https://pastebin.com/4ycg8Z7K

prime oracle
#

okay it kinda does something now

ivory sleet
#

Hmm what if u use JavaPlugin#getClassLoder instead

prime oracle
#

nono the class loader thing works now

hasty prawn
prime oracle
ivory sleet
#

Actually getAllClasses might be picking up every class

prime oracle
#

ye there are things like hashmaps n stuff

tepid parrot
ivory sleet
#

Filter the ClassInfo#getName by getting the package

tepid parrot
#

because i've tried both lol

ivory sleet
#

And then yeah

green forum
#

Hello i'm trying to create NPC but i have a problem, if i spawn an EntityPlayer with packets, with UUID of a connected player, the model of the entity don't spawn. It work fine if i used another UUID.
Someone already have this problem ?

prime oracle
#

i have this code now

        List<Class> commands = ClassPath.from(Essentials.class.getClassLoader())
                .getAllClasses()
                .stream()
                .map(ClassPath.ClassInfo::load)
                .filter(cls -> cls.isAnnotationPresent(EzCommand.class))
                .peek(System.out::println)
                .collect(Collectors.toList());

but im still getting this error: https://paste.md-5.net/oduvoyevat.bash

ivory sleet
#

Maybe getTopLevelClasses("your.command.package")

#

Instead of getAllClasses

quaint mantle
#

how to give out experience? giveExp() does not work

prime oracle
ivory sleet
#

Try what I said earlier btw

prime oracle
#

k

#

[23:12:23 INFO]: [LitEssentials] found 31 commands
looks like its working

ivory sleet
#

Oo pog

prime oracle
#

thanks alot guys

ivory sleet
#

That was some effort for me also but yeah cool it works now

prime oracle
#

finally i only have to declare my commands in a single place

ivory sleet
#

😌

#

I mean, just registering them manually isn’t that bad?

prime oracle
#

excuseee mee

ivory sleet
#

🥴

prime oracle
#

why edit multiple files when u can just add an annotation

@EzCommand(
        cmdName = "test",
        permission = "lit.test",
        description = "just for testing",
        usage = "/test"
)
ivory sleet
#

Cuz it’s not very object orientable imo

prime oracle
#

quick to throw some commands together, i always forget to either register them or to put them in the plugin.yml

prime oracle
ivory sleet
prime oracle
#

i think object orientation makes sense in certain places and in others it doesnt

prime oracle
lost matrix
prime oracle
#

ACF is bloat

ivory sleet
# prime oracle what do you mean

Well considering that annotations are metadata merely we still have the ability to create powerful abstractions with classes, I guess inheritance works also with annots but it’s quite limited as annotations are constant.

prime oracle
ivory sleet
#

Yeah well I believe reflections should have worked but apparently not

tepid parrot
green forum
#

Nobody know about npc skins problem i send earlier ? :/

ivory sleet
#

Can you bump it xD

tepid parrot
quaint mantle
#

how can I change the amount of experience for a player?

ivory sleet
#

I would highly recommend and strongly advocate you to use citizens instead of doing it yourself, it handles everything literally for you.

ivory sleet
quaint mantle
#

there is no such thing

ivory sleet
#

setExp

#

My bad

quaint mantle
#

no

ivory sleet
#

Yes

quaint mantle
#

error

green forum
#

Yeah but i like try to do thing by myself ^^, and the npc work, i have juste a probleme when two EntityPlayer is rendered in client, one cannot be seen :/
It can be a NPC and a Player with same UUID or two NPC with same UUID, i can see juste one

quaint mantle
#

this changes the scale, but I somehow managed to change the experience

compact crane
#

How can I get clicks on a BoundingBox I created myself?