#help-development

1 messages ยท Page 1606 of 1

undone axleBOT
#
CafeBabe Help Menu
Syntax: ?customcom 
Alias: ?cc
Base command for Custom Commands management.

โ€‹

**__Subcommands:__**

list List all available custom commands.
raw Get the raw response of a custom command, to get the proper...
search Searches through custom commands, according to the query.
show Shows a custom command's responses and its settings.

quaint mantle
#

ahhh

#

PlayerItemBreakEvent
also exists @tacit drift

tacit drift
#

oh ok

#

thx

quaint mantle
#

if you ever got an example hmu @lost matrix xD

lost matrix
#

?paste

undone axleBOT
fluid cypress
#

how can i make .* also match linebreaks?

#

using java.util.regex.Pattern and Matcher, idk if there is a diffrence with String.replaceAll, but i specify just in case

lost matrix
#

Regex is witchcraft

#

But i think there is some s modulator for that

#

let me take a quick look. But when im gagging while looking at regex ill just stop.

craggy cypress
#

How can i get a damaged anvil in 1.12.2, I looked into the docs but block.getData() is deprecated

#

Normally you can still use deprecated methods, But it doesn't work.

#

So i was wondering if there are other methods to get a damaged anvil with the PlayerInteractEvent

lost matrix
lost matrix
fluid cypress
maiden briar
#
       Bukkit.getWorlds().add(Bukkit.createWorld(new WorldCreator(world)));```
This gives me an exception if I try to `Bukkit.getWorld(world);` directly after?
fluid cypress
quaint mantle
#

oh

#

im blind

#

i should read first

civic lantern
#

Guys I need some help that I use a vanish plugin and it doesn`t remove the vanished player from the server list online players
Can you help?

quaint mantle
#

i dont understand how it works xD

maiden briar
quaint mantle
#

nothing really working right?

lost matrix
quaint mantle
#

welp that's sad I guess we gotta use what we have then

cold tartan
#

my plugin just isnt working, no error message or anything

#

ive never faced this issue before so im not sure what to do

lost matrix
cold tartan
lost matrix
cold tartan
#

lemme check

cold tartan
lost matrix
#

Then scroll up and see if you got an error early on

cold tartan
#

nope dont

lost matrix
# cold tartan nope dont

Not possible. If there is a jar in the plugins folder that could not be loaded as plugin then you will see a stack trace.

cold tartan
#

yeah thats what im confused about too

#

do u have a java decomp? i can send u the jar

lost matrix
#

Stop the server. Put in the jar. Start the server.
Doesnt matter what the jar contains. If it couldnt be loaded then you will see a stack trace in your console.

cold tartan
#

i put that into the plugins folder

#

here is the log:

lost matrix
#

Doesnt matter what it contains.
This is a binary outcome.

  1. The plugin gets loaded and is listed under /pl
  2. You get a stack trace
cold tartan
cold tartan
lost matrix
cold tartan
#

oh

#

with no other plugins

#

ok

#

i mean the nbtapi im using with gradle loads

lost matrix
cold tartan
#

but the plugin itself doesnt

#

should i send my gradle.build or something

lost matrix
echo basalt
#

You can shade all classes but not a plugin (without modification)

cold tartan
#

ok

paper geyser
#

do you have a .yml

cold tartan
#

plugin.yml, yeah

paper geyser
#

hmm

gleaming grove
#

Someone knows why i cant cast it to LectureInventory?

echo basalt
#

LecternInventory is the inventory that belongs to the lectern block

lost matrix
echo basalt
#

Also pretty sure you need nms to do this stuff

lost matrix
#

You can just return the Inventory there. Casting within this method makes no sense.

gleaming grove
#

i make this to show problem with few lines of code, i will need LecternInvetory in other place

shadow gazelle
#

So I have a command that adds an NPC with whatever specified name when you use with it. When I use reload, the click event I have stops working. It does basically nothing, I'm already uninjecting the player packets onDisable, do I need to remove them, too?

#

The click event is still working, i.e. I can spawn another one and it works, but clicking one of the old NPCs (from before the reload) doesn't do anything

hollow sand
#

How do I check if a player doesnt have a potion effect?

lost matrix
hollow sand
#

I've searched everywhere but cant find anything

lost matrix
shadow gazelle
lost matrix
shadow gazelle
#

Where would I even start?

hollow sand
# lost matrix ```java public boolean hasAnyPotionEffects(Player player) { return !player...

But if I wanted to put it in a bukkit runnable, would I have to do it like

@EventHandler
    public void onJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        if(player.hasPermission("staff.join")) {
            return;
        }
        else{
            player.addPotionEffect(new PotionEffect(SLOW, 500, 60));

            new BukkitRunnable() {
                @Override
                public void run() {
public boolean hasSlowEffect() {
  return !player.getActivePotionEffects().isEmpty();
}

                }
            }.runTaskLater(this, delay)
        }```
#

?

shadow gazelle
#

runTaskLater

lost matrix
#

Ah never mind

#

Thought it was runTaskTimer

hollow sand
#

oh aha, but would it work?

lost matrix
lost matrix
hollow sand
lost matrix
hollow sand
#

with the code, right?

lost matrix
#

Doesnt matter. Just click into the class and press the shortcut

hollow sand
#

oki

hollow sand
lost matrix
#

Good. Next: Dont declare a method inside another method.

valid crag
#

learn java

proud basin
#

Anyone know why im getting this? error: cannot find symbol iPlayer.setCooldown(res.getString("Cooldown")); symbol: method setCooldown(String) location: variable iPlayer of type IPlayer

quaint mantle
quaint mantle
lost matrix
# quaint mantle <@220605553368498176>

Thats just a basic mock up. Creating a proper attribute system can get quite complex.
For now you should just create a simple Map<> that contains the attributes

proud basin
#

I was just showing the error

#

but really there isn't any code because im using lombok

#
private final UUID uuid;
    private String cooldown;
    private long time;

    public IPlayer(UUID uuid) {
        this.uuid = uuid;
    }

    public UUID getUuid() {
        return uuid;
    }
#

Iplayer ^

lost matrix
#

Make a screenshot of the location that contains the error -.-

proud basin
#

symbol: method setCooldown(String)
location: variable iPlayer of type IPlayer

lost matrix
#

Show the entire IPlayer class including the annotations

dusk flicker
#

why do you have another getter when using lomboks getter?

lost matrix
#

Apply @Getter or @Setter to the fields or use @Data on the class.

proud basin
#

never bothered removing it

manic bison
#

hey, how can i do to prevent player from right clicking or left clicking ?

i have a weapon plugin which when you right click a weapon, it fires a projectile.

#

and i'd like to prevent player from right clicking / left ny item

manic bison
#

i've tried on if(action == Action.LEFT_CLICK_BLOCK) {
event.setCancelled(true);
} but it doesnt work

#

or anything

#
    public void onInteract(PlayerInteractEvent event) {
        Player player = event.getPlayer();
        Action action = event.getAction();
        Player playerr = (Player) player;
        if(playerr.hasPotionEffect(PotionEffectType.BLINDNESS) && playerr.hasPotionEffect(PotionEffectType.SLOW)) {
        if(action == Action.LEFT_CLICK_AIR) {
            event.setCancelled(true);
        }
        if(action == Action.RIGHT_CLICK_AIR) {
            event.setCancelled(true);
        }
        if(action == Action.LEFT_CLICK_BLOCK) {
            event.setCancelled(true);
        }
        if(action == Action.RIGHT_CLICK_BLOCK) {
            event.setCancelled(true);
        }
        if(action == Action.PHYSICAL) {
            event.setCancelled(true);
        }
        }
    }```
proud basin
proud basin
#

What would that do?

#

I already have @Getter and @Setter above the class

hollow sand
#

bukkitrunnables are timed by miliseconds, correct?

shadow gazelle
#

No idea

#

packet uninjection and injection are fine

lost matrix
shadow gazelle
#

It loads them right

hollow sand
lost matrix
shadow gazelle
lost matrix
proud basin
lost matrix
lost matrix
hollow sand
lost matrix
hollow sand
#

per 60 seconds

lost matrix
#

yes

hollow sand
#

omg

#

im so smort

lost matrix
#

quick mafs

hollow sand
#

yes yes yes

hollow sand
lost matrix
proud basin
#

no

lost matrix
#

Did you use lombok before and it worked then?

proud basin
#

yea

lost matrix
#

Then restart your IDE

hollow sand
proud basin
#

Tried that

quaint mantle
#

Yes

manic bison
lost matrix
manic bison
#

it sys'ed out on console but still works ig

lost matrix
manic bison
#

right clicking an item

#

in crackshot, there are weapons, and i'd like to cancel the weapon right / left click action, so people cant right / left click weapon, in order the weapon doesnt fire projectiles

hollow sand
#

I was drinking chocolate milk and was watching memes, as I was drinking, I saw this funny ass meme and spat all over my screen

lost matrix
# manic bison right clicking an item

What do you mean by that?
Other eventhandler methods still get the event.
If you want to ignore cancelled ones then you need to do the following:

  @EventHandler(ignoreCancelled = true)
  public void onInteract(final PlayerInteractEvent event) {
    // Some custom stuff
  }

Or:

  @EventHandler
  public void onInteract(final PlayerInteractEvent event) {
    if(event.isCancelled()) {
      return;
    }
    // Some custom stuff
  }
hollow sand
#

nice

#

code

manic bison
valid crag
#

you basically cancel the interact event and set the item use result to deny

#

and then pray that crackshot actually respects cancelled events

lost matrix
valid crag
#

if it doesn't, you have to get smart about it

manic bison
#

so i take the fire projectile event, then i cancel it

valid crag
#

and that usually involves reflective bullshittery

lost matrix
valid crag
#

crackshot, as mentioned

grim ice
#

anyone has an idea of a spigot plugin

#

that doesnt suck

quaint mantle
#

No

valid crag
#

no, they all suck

manic bison
valid crag
#

without exception

quaint mantle
valid crag
#

hello

dusk flicker
#

lmao

lost matrix
# manic bison yep

Then you are out of luck. Write the dev that he should make his event handling more robust.

grim ice
valid crag
#

ask them to respect cancellations

dusk flicker
#

bye

proud basin
#

So you don't know how to fix it 7smile7?

valid crag
#

or get around it with a reflective hack

#

I had to do that with slimefun once

quaint mantle
lost matrix
valid crag
#

getting soft I see

quaint mantle
#

nope

valid crag
#

can I use my old account to not be a dick

quaint mantle
#

nope

valid crag
#

how about a new account that looks exactly the same

quaint mantle
#

nice pfp

shadow gazelle
#

@lost matrix yeah, it just doesn't detect right clicks on NPCs after reload

valid crag
#

search result 25 for "batman avatar"

ancient whale
shadow gazelle
#

?paste

undone axleBOT
lost matrix
lost matrix
valid crag
#

it's pretty obvious

quaint mantle
#

"reflective bullshittery"

#

who the hell else says that

lost matrix
#

I see XD

valid crag
#

need to keep the obvious alts obvious so that the sleeper alts go under the radar, after all

quaint mantle
shadow gazelle
#

I have an event called RightClickNPC which returns the player and npc, the click event that uses it just opens the inventory. This is the read packet function:
https://paste.md-5.net/ixisuwonug.cpp

shadow gazelle
#

Yes

#

Wait

#

Let me test something

lost matrix
valid crag
#

Doesn't the entity interact packet have the uuid of the clicked entity directly, or something

shadow gazelle
#

Yep, receiving the packets

hollow sand
#

do guis start from 0-9 or 1-9

#

im confused

lost matrix
lost matrix
valid crag
#

i vaguely think that there might be a way to get an entity by eid through Bukkit, but that might be paper only

lost matrix
valid crag
#

basically everything starts at 0

#

java is zero indexed

grim ice
#

anyone has an idea of how can i stun players

opal juniper
#

apart from lua

grim ice
#

i might use pot effects but its a weird way

eternal oxide
proud basin
#

But there is...

#
@Getter
@Setter
public class IPlayer {

    private final UUID uuid;
    private String cooldown;
    private long time;

    public IPlayer(UUID uuid) {
        this.uuid = uuid;
    }

    public UUID getUuid() {
        return uuid;
    }

}
eternal oxide
proud basin
#

Yea

lost matrix
hollow sand
#

ye?

valid crag
#

0-8

dusk flicker
#

do me a favor and remove the getUuuid and the getter and setter and put a @ Data and see if that changes it

shadow gazelle
eternal oxide
hollow sand
#

ok, ty

proud basin
lost matrix
hollow sand
#

now i just got to do intense meth

#

maht

#

math

eternal oxide
valid crag
#

lombok ๐Ÿ’ฏ

lost matrix
eternal oxide
#

I can;t remember the name of the tool you are using for teh getter/setter

dusk flicker
#

lombok

eternal oxide
#

thats it

eternal oxide
#

Have you checked HOW to use Lombok with Maven?

dusk flicker
#

What he's doing should work

#

I use lombok and like

proud basin
dusk flicker
#

Just something's odd

valid crag
#

the tool that saves you time on not having to write things that your IDE would already write for you

granite stirrup
#

Lombok is useless to me

valid crag
#

and then wastes your time with things like these

lost matrix
eternal oxide
#

Have you added lombok as a dependency in yrou pom?

proud basin
eternal oxide
#

or configured it as a plugin in pom?

granite stirrup
dusk flicker
#

you have the lombok plugin in your ide right?

valid crag
#

try using ant

eternal oxide
#

gradle or not, you still have to configure it as a plugin in your build enviroment

granite stirrup
lost matrix
proud basin
#

lmao

proud basin
#
compileOnly 'org.projectlombok:lombok:1.18.20'
    annotationProcessor 'org.projectlombok:lombok:1.18.20'
#

that's what I have in my depend

eternal oxide
#

yep

dusk flicker
#

they use it diff on the lombok site

grim ice
#

anyone has an idea

#

of how do i check

#

if a player is right clicking right npw

#

now

dusk flicker
#

Are you using the lombok gradle plugin jtx?

lost matrix
proud basin
grim ice
#

this only checks

dusk flicker
#

okay then use

grim ice
#

for a 1 click

#

:/

dusk flicker
#
repositories {
    mavenCentral()
}

dependencies {
    compileOnly 'org.projectlombok:lombok:1.18.20'
    annotationProcessor 'org.projectlombok:lombok:1.18.20'
    
    testCompileOnly 'org.projectlombok:lombok:1.18.20'
    testAnnotationProcessor 'org.projectlombok:lombok:1.18.20'
}
proud basin
#

that's what I have...

grim ice
#

i want to check if the player is holding

#

right click

dusk flicker
#

You said you have half of that

#

use ALL of it

proud basin
#

you don't need the other ones

granite stirrup
dusk flicker
#

Try it

proud basin
#

oh look didn't work

granite stirrup
#

You didn't specify which click

dusk flicker
#

This is straight off of their website; Im only telling you what they legit tell you to do

lost matrix
# grim ice right click

Then you need to constantly check if a player has sent the right click packet and define a tick amount that defines when not receiving a packet means he has stopped.

granite stirrup
#

This is why #FuckGradle

proud basin
proud basin
#

ay look at that I guess restarting your pc fixes it

#

@lost matrix What did you mean by Use the db data in memory

lost matrix
proud basin
#

should I be closing the connection after they log in?

#

or only do it when they disconnect

lost matrix
#

Thats what a connection pool is for.
Always get a new connection, do your transaction, then close the connection again.

proud basin
#

ok

shadow eagle
#

what is the spigot api version for 1.17.1

lost matrix
#

1.17

shadow eagle
#

im making a plugin and in pom.xml i put 1.17.1-R0.1-SNAPSHOT

#

is that not it

#

my error says unsupported api version

lost matrix
#

I thought you meant the api version from the plugin.yml

shadow eagle
#

WAIT i may have that wrong xD

lost matrix
#

For the pom its
1.17.1-R0.1-SNAPSHOT

shadow eagle
#

tysm!

shadow gazelle
#

Does the packet include the ID of the NPC that was clicked?

#

Or UUID

lost matrix
#
NPC clickedNpc = npcMap.get(id);
if(clickedNpc != null) {
  // Do stuff with clicked NPC
}
#

The packet contains the entity id as int

shadow gazelle
#

oh

lost matrix
#

And you even use it... why are you surprised?

tacit drift
#

Has any1 worked with inventivetalent's menubuilder?

#

or can any1 recommend an api to build menus easier?

quaint mantle
sleek girder
#

Is there a way where if a player sends you a friend request invite, it shows the message with an achievement? Is this possible in java?

grim ice
#

how to send a player a packet to show him that he has an item in his hand but it doesnt actually exist

granite stirrup
#

Im pretty sure that is for on join what you said

lost matrix
final monolith
lost matrix
#

Right away:
Never ever have a public static non final collection.
Dont even have a final one. No public data structures and no passing the data structures to other classes.

grim ice
#

How do i check if an item is not in its place? what event?

lost matrix
#

Second:
Dont have a hard reference to game bound objects.
No Player, Entities Chunks etc

granite stirrup
#

What's wrong with having public variables

lost matrix
lost matrix
grim ice
#

How to check if a item is not in a specific item slot

#

and then cancel the event that caused that

final monolith
lost matrix
final monolith
lost matrix
valid crag
#

the only good public collection is a final and immutable collection

final monolith
lost matrix
#

This is bad:

#

This is also bad:

#

This is the proper way:

final monolith
#

i will use that

#

thanks for the example

granite stirrup
#

wait how can you remove something from final?

valid crag
#

that isn't what final means

final monolith
ivory sleet
# granite stirrup What's wrong with having public variables

I mean encapsulation is good:

  • It letโ€™s you rewrite internal state without affecting any dependents. You can easily provide defense copy of your internal list as an example.
  • Fields cannot be abstracted, methods can.
  • You can have mutable internals while providing no way of mutating internals to the dependent.
valid crag
#

final means you cannot reassign the value of that field

#

you can't do someMap = someNewMap if it's final

granite stirrup
#

oh

valid crag
#

but you can still use the methods of someMap to change it, to mutate it

lost matrix
valid crag
#

this is why public maps should be immutable

#

because final doesn't protect them from being changed

final monolith
#

ok guys, but... Whats the difference? how the immutable HashMap can impact my code?

#

i dont understand

lost matrix
#

You dont need immutable maps.

#

just make your map private final and work your way around that.

ivory sleet
#

An immutable data structure disallows any mutation on its structure once created.

lost matrix
#

final doesnt mean that you cant access the map

valid crag
#

a field is final; an object is immutable

granite stirrup
#

but whats the point if it doesnt make much difference?

final monolith
ivory sleet
#

What are you referring to idkidk?

granite stirrup
#

?

valid crag
#

what doesn't make much difference?

lost matrix
#

Next thing: Use primitives here.
You really dont want to check for null values on a Boolean field.

valid crag
#

what's the point of what?

granite stirrup
#

what 7smile was talking about

lost matrix
valid crag
#

he talked about a lot of things

final monolith
proud basin
#

What if I saved the uuid, cooldown, time in a json style? 7smile7

granite stirrup
lost matrix
valid crag
#

public anything should always be immutable

granite stirrup
#

what about stuff where it just has methods that messes with the command map?

lost matrix
valid crag
#

arrays.asList is still mutable iirc, it just doesn't allow add

outer sorrel
#

thanks! works now

lost matrix
lost matrix
proud basin
granite stirrup
#

ah thing is i have the public static final var for a class instance that i want to be able to access every where

lost matrix
ivory sleet
lost matrix
valid crag
#

lazy initialization can be really horrible at times, though

#

at least when implemented poorly

granite stirrup
#

lazy initalization?

ivory sleet
#

Yeah

#

When the instance might not always be needed, itโ€™s created lazily which is only when the method is invoked for the first time.

granite stirrup
#

public static final SomeClass something = new SomeClass();
i just have this in one class lmao

grim ice
#

uhhhhhhh HELP

ivory sleet
#

?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.

valid crag
#

often lazy initialization results in the initialization only ever being attempted once

grim ice
#

how do i give a recipe to a exact person

valid crag
#

and if someone happens to trigger the initialization at the wrong time, the whole runtime gets fucked

grim ice
#

without giving others

proud basin
#

add permissions probably?

grim ice
#

that isnt what i want

valid crag
#

for example, static blocks in classes can be considered to be lazy initializers

#

as they are only ran when the class itself is loaded and initialized

grim ice
#

Bukkit.addRecipe()

next crater
lost matrix
#

This might be problematic if the the static instance is created when spigot doesnt accept listener registration at the moment.

grim ice
#

adds it for everyone

lost matrix
#

This is lazy and will work more often

valid crag
#

the issue however is that they only ever run once, when the class is first attempted to be initialized

#

if they fail at that time, they will remain failed until the class is reloaded with a different classloader

grim ice
paper viper
#

Provider class or something?

lost matrix
granite stirrup
paper viper
#

But why

granite stirrup
#

because i want to access it anywhere?

ivory sleet
#

Singleton (:

paper viper
#

Butโ€ฆ Utils are supposed to like the methods itself

#

Should be static in general

#

For utility classes lol

ivory sleet
#

Yeah utils shouldnโ€™t be confused with singletons

granite stirrup
#

i mean i could do that but where would i put the instance lmao

paper viper
#

Singleton good for providers

#

Like GSON provider

valid crag
#

Utils are classes that group stateless functions together

paper viper
#

Stuff like that

lost matrix
#

I think utility classes should be stateless and have only static methods

valid crag
#

A singleton is a class that can only have one instance

#

They have some similarities but are very different

granite stirrup
#

what about ```java
public class Utils {
private static SomeClass someInstance;

public static SomeClass getSomeInstance() {
    if (someInstance == null)
        someInstance = new SomeClass();
    return someInstance;
}

}```

ivory sleet
#

Well not a utility

valid crag
#

That's a singleton

#

Singleton implies state

#

Utils should be stateless

granite stirrup
#

?

ornate hollow
#

how can i check if the PlayerLoginEvent is allowed, what result should i look for (asking bc there is Result.ALLOWED and Result.ALLOW)

I need to make sure the event was successful before i save something to a hasmap

granite stirrup
#

yeah i never made a actual utils class before so i kinda need a example on what you mean

lost matrix
#

The heck is "Truncated class file" supposed to mean? Never seen this error before

honest iron
#

I'm just getting it

tacit drift
valid crag
#

make every method static, make every field static, make every field final

lost matrix
tacit drift
ornate hollow
tacit drift
#

im confused

valid crag
#

and probably also immutable

lost matrix
# tacit drift
  1. Dont use a decade old spigot version
  2. Whats in line 17 ?
tacit drift
#

is line 17

lost matrix
#

Then you didnt write your command into the plugin.yml

tacit drift
#

oooh

#

yeah forgot about that

#

:))))

honest iron
#

i've reached the 2k limit

granite stirrup
#

but can someone tell me how to actually write a utils class

valid crag
#

craftbukkit lmao

lost matrix
valid crag
#

well, you can have fields, but they should be static, final, and their contents should be immutable

granite stirrup
valid crag
#

look at the java Math class for an example

ornate hollow
# granite stirrup but can someone tell me how to actually write a utils class

Example

public class PluginUtils {

    @NotNull
    public static String trimUniqueId(@NotNull Player player) {
        return player.getUniqueId().toString().replace("-", "");
    }

    @NotNull
    public static HttpURLConnection fetchBackend(String uuid) throws IOException {
        URL url = new URL(PluginConstants.BACKEND_API + uuid);
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
        connection.setRequestMethod("GET");
        return connection;
    }

    @NotNull
    public static HttpURLConnection fetchBackend(Player player) throws IOException {
        return fetchBackend(trimUniqueId(player));
    }

    public static String getJson(InputStream stream) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(stream));
        String json = in.readLine();
        System.out.println(json); // Debug
        return json;
    }


    public static BackendData getBackendData(InputStream stream) throws IOException {
        String json = getJson(stream);
        ObjectMapper mapper = new ObjectMapper();
        return mapper.readValue(json, BackendData.class);
    }


    public static BackendError getBackendError(InputStream stream) throws IOException {
        String json = getJson(stream);
        ObjectMapper mapper = new ObjectMapper();
        return mapper.readValue(json, BackendError.class);
    }
}
valid crag
#

you don't store anything

#

storing things means state

#

and Utils should be state-less

#

which means not storing anything anywhere

lost matrix
valid crag
#

again, look at the java Math class for an example

granite stirrup
valid crag
#

statically

#

Class.staticMethod()

ornate hollow
#

UtilsClass.methodName()

valid crag
#

for example... Math.round()

granite stirrup
#

not the utils the one that handles my thing

lost matrix
valid crag
#

again, look at the Math class

ornate hollow
#

i dont like beeing toxic

#

but still

granite stirrup
#

no im saying

#

i have another class...

valid crag
#

that doesn't matter, the Utils methods are static so you can call them, like already stated, from anywhere, at any time

lost matrix
#

Do you compile with jdk 8 ?

honest iron
#

It doesn't run on my computer but it runs on my VPS

valid crag
#

it can be in another class, it can be in another package, it can be in another parallel fucking universe, but static is static and is available as long as the class itself is available

honest iron
honest iron
lost matrix
lost matrix
granite stirrup
valid crag
#

what does that have to do with your utils class

granite stirrup
#

i want to make a thing that interacts with it and probs more soon

valid crag
#

then just interact with it?

grim ice
#

why do i make my plugins so complicated and not test them man

granite stirrup
#

but where do i put the instance

valid crag
#

you don't put an instance

#

it's static

grim ice
#

im sure if i test my plugin now itll have like 100000 errors

ornate hollow
valid crag
#

you don't need an instance

granite stirrup
#

i do because i do important stuff in the constructor on my other class

valid crag
#

import != instance

lost matrix
ornate hollow
#

idk dude so far whatever i did i did with making a backend in spring first, and then from a plugin calling that data, proved to be much faster in the long run

granite stirrup
lost matrix
valid crag
#

that doesn't matter

#

Utils is still accessible from that other class

#

because everything in Utils is static

proud basin
#

Did I do this correct REPLACE INTO kitCooldown (UUID, Time, Cooldown) WHERE UUID = ? VALUES (?, ?, ?)

granite stirrup
#

but how to i access everything in that other class in utils

valid crag
#

you don't

#

or, if you absolutely need to, you can add the other class as a parameter in your utils method

ivory sleet
#

idkidk the thing with utilities are that theyโ€™re utilities. It should help you merely. For instance doing this
calculatePower(double health, double maxHealth) {
return health * 2 + 1 % maxHealth;
}
getPower(Player p) {
return utility(p.getHealth(),p.getMaxHealth());
}

Instead of this

getPower(Player p) {
return p.getHealth() * 2 + 1 % p.getMaxHealth();
}

valid crag
#

and pass this to it

#

but that can lead to weird and shit design

granite stirrup
#

??

ivory sleet
#

Bad example but yeah, Math class is a great one

valid crag
#

it sounds like an utils class is not what you are looking for

#

what are you trying to do

granite stirrup
#

trying to access methods and things from another class

valid crag
#

no, that is not what you are trying to do

granite stirrup
#

but i cant make them static since i do things in the constructor in the other class

valid crag
#

describe to me what you are trying to do

#

"accessing methods and things" isn't an answer

granite stirrup
#

??

valid crag
#

everything in java is "accessing methods and things"

#

accessing methods and things is how you are trying to achieve it, not what you are trying to do

granite stirrup
#

i just want to grab a instance of a class from some where

valid crag
#

again, that is not what you are trying to do

#

that is how you are trying to do it

#

do we have a bot command for xy questions

ivory sleet
#

?xy

undone axleBOT
granite stirrup
#

that is what im trying to do ??

#

get a instance of a class from some where everything can access

valid crag
#

alright, fine, let's turn it the other way around

ivory sleet
#

Singleton

valid crag
#

why do you want to do that?

#

why do you need that instance of a class from some where everything can access

lost matrix
shadow gazelle
granite stirrup
#

because i have a class that needs a instance of it

shadow gazelle
#

Is my brain just not working and that's the point?

granite stirrup
#

and idk if need it for any others

valid crag
#

and what does this class need it for?

granite stirrup
valid crag
#

why are you calling those methods?

granite stirrup
#

to do things?

valid crag
#

what things?

granite stirrup
#

like commandmap stuff

lost matrix
valid crag
#

right, so you're working on your commandmap shit

#

what exactly are you trying to do

shadow gazelle
next crater
#

does anyone has a tutorial about spigot MySQL Databases? I just want to try new things :)

proud basin
#

@lost matrix I would also want to save the kit has been used correct?

granite stirrup
clear galleon
valid crag
#

if you want proper help, you need to ask proper questions

lost matrix
valid crag
#

what you are asking right now is super fucking vague and there is no good answer

#

we need to know the use case and what you are doing

granite stirrup
#

idfk what i am doing

valid crag
#

we can see that

granite stirrup
#

im just messing with the commandmap

valid crag
#

then pass the commandmap instance to the thing that is supposed to mess with it

#

problem solved

granite stirrup
#

im just gonna create this class in the class i need it in lol

proud basin
lost matrix
proud basin
#

right

lost matrix
#

Sure

odd sentinel
next crater
#

now I can

#

sorry

odd sentinel
#

idk it works for me, but I think that site has had downtime issues recently

next crater
#

no, I just reloaded the link and I can now

#

@odd sentinel why do you check if the thing you caught is an item

#

you cant caught like a creeper

#

everything you fish is a item, right?

odd sentinel
#

idk, but I assume so. that could be null though

#

so I need a not null check at least

unreal quartz
next crater
#

youยดre right

#

I was thinking about fishing (water)

#

sorry

odd sentinel
#

I just went with my instanceof to be safe

#

but that's likely unrelated to getting weird results for salmon

#

so far, never happens with cod

unreal quartz
#

are other plugins interfering?

#

donโ€™t see any reason for that to happen

odd sentinel
#

the only other plugin on this dev server is mcmmo because my plugin needs it, so it could be

#

but I am never given those items either

#

it's not like extra loot, I just got salmon and cod

unreal quartz
#

mcmmo does modify your fishing outcome based on your fishing skill

odd sentinel
#

right but I'd actually get that loot

unreal quartz
#

unless youโ€™re going to modify the event you could listen on MONITOR

odd sentinel
#

not saying it's not mcmmo, just I am confused

valid crag
#

those look like fishing treasure

unreal quartz
#

mcmmo is probably firing after you

odd sentinel
#

actually that was originally on monitor, I changed it for testing

unreal quartz
#

try it without mcmmo then, if not then i donโ€™t see the issue

quaint mantle
#

where can I find good tutorials for plugins?

ivory sleet
#

Visual or textual

quaint mantle
#

visual

ivory sleet
#

I know the source code and kody simpsons do decent ones

#

Altho those videos are not really the goto if you wanna write clean code

next crater
#

GHG, CodeRed, TheSourceCode, Kody Simpson

next crater
#

my favourite channels

ivory sleet
#

Many Bukkit/Paper/Spigot tutorials are good if you wanna learn how to implement certain features in your plugin, not really demonstrating good architecture and clean code.

valid crag
#

or good anything, for that matter

#

many spigot/bukkit/paper tutorials fail even at the thing they're trying to present

ivory sleet
#

Of course the code does fine merely if you just wanna get something to work.

valid crag
#

one sql tutorial I don't remember the name of comes to mind

ivory sleet
#

Yeah

#

๐Ÿฅฒ

quaint mantle
#

alright do you know any tutorials that would teach me how to organize plugins, or maybe templates even

#

^textual or visual

next crater
#

what do you mean with "organize plugins"

ivory sleet
#

Probably a clean and decoupled code architecture

next crater
#

hmmmmmm

valid crag
#

just throw a lot of interfaces at it

ivory sleet
#

Well Icy I can redirect you at some stuff, learn about Javaโ€™s 23 design patterns, learn about SOLID, lean about all the features Java has.

#

But thatโ€™s probably irrelevant for most spigot devs.

#

Like ridiculously irrelevant.

next crater
#

@quaint mantle are you a begginer at spigot coding?

quaint mantle
#

yeah

next crater
#

and are you begginer with java?

quaint mantle
#

yeah I have been 'studying' java for a couple months, just looking for stuff to do with it if that makes sense

next crater
#

ok, its nice to know java first before starting with spigot

ivory sleet
#

What level would you say, youโ€™re right now?

valid crag
#

you'll probably stumble for a while over bukkit and its own shenanigans before you can start thinking about how to organize and structure things

ivory sleet
#

Hard self assessment but that might give us a hint on what you should try learn next

next crater
#

man my first plugins code was all in 1 single class ๐Ÿ™„

quaint mantle
#

id probably say beginner to intermediate, but idk

ivory sleet
#

๐Ÿฅฒ

quaint mantle
#

Ive done some event handler stuff

#

which is pretty basic

ivory sleet
#

Do you know the difference between an instance and a class

next crater
granite stirrup
#

i found this in String :)))

quaint mantle
#

a class makes objects and isn't instance similar to class or am I wrong

valid crag
#

instance is another word for object

quaint mantle
#

ahh alright thanks for clearing that up for me

valid crag
#

"instance of Player" is a way of saying "object that was created from class Player"

grim ice
#

why is this not working

#
ItemStack TOKEN = new ItemStack(Material.EMERALD);
                    TOKEN.getItemMeta().setDisplayName(ChatColor.LIGHT_PURPLE.toString() + ChatColor.BOLD + "Staff Token");
                    TOKEN.setItemMeta(TOKEN.getItemMeta());```
ivory sleet
#

Similar but not identical, an instance is a unit from a class. Classes are blueprints to create units/instances.

#

But anyways thatโ€™s a crucially important thing to know if you wanna start upgrading your code architecture

grim ice
#

it just gives a empty emerald when i do the command

quaint mantle
#

alright thank you

grim ice
#

((Player) sender).getInventory().addItem(TOKEN);

granite stirrup
#

or no?

grim ice
#

OH RIGHT

next crater
#

LOL

valid crag
#

itemmeta is null only for air

#

the issue is that getItemMeta clones the itemmeta

#

you are calling setDisplayName on a clone; it does not affect the original itemstack

quaint mantle
#

so what are some good first plugin ideas for beginners?

valid crag
#

you need to store the itemmeta in a field and then use setItemMeta on the itemstack

ivory sleet
#

Believe paper has a convenient method ItemStack#modifyMeta(Consumer) which doesnโ€™t clone it or smtng

valid crag
#

that is new

#

let me take a look

ivory sleet
#

Yeah think it was added very recent

granite stirrup
#

ItemStack is so confusing lmao

valid crag
#

itemstack is horrible in many ways

ivory sleet
#

Indeed

valid crag
#

mmm yes ItemStack::editMeta(Consumer<? super ItemMeta>)

ivory sleet
#

Ah nice

valid crag
#

now if they could make the equals call not clone it 4 times

granite stirrup
#

LOL what

next crater
ivory sleet
next crater
ivory sleet
#

Itโ€™s just an anchor

valid crag
#

I don't know, I've been pretty out of touch with development recently

#

mostly because I'm still on 1.16

ivory sleet
#

Itโ€™s mainly for Javadocs

granite stirrup
ivory sleet
#

Yeah good point batman

next crater
#

ooooh ok

#

thx

ivory sleet
#

So you get that hyperlink in javadocs when you generate those btw which takes you to the method belonging to that class (;

granite stirrup
#

editmeta is in 1.16 on paper to

#

its not in 1.15 tho

valid crag
#

yeah looks like it is

quaint mantle
#

soo its completely fine to put all of my code in the plugin.java file to start out with?

valid crag
#

far from fine but I'd worry about it once I were familiar with bukkit

quaint mantle
#

alright

granite stirrup
#

doesnt Plugin.java already exists?

shadow gazelle
#

Would this work for that map @lost matrix?

    public static Map<Integer, EntityPlayer> npcMap() {
        for (EntityPlayer npc : getNPCs()) {
            Integer npcID = npc.getId();
            npcMap().put(npcID, npc);
        }
        return npcMap();
    }
ivory sleet
#

Looks like StackOverflow error

shadow gazelle
#

I've never done anything with maps before

valid crag
#

you are recursing indefinitely

#

npcMap calls npcMap calls npcMap

granite stirrup
valid crag
#

well, it'll throw a stack overflow eventually

#

the jvm can only handle calls going so deep

granite stirrup
valid crag
#

depends on where it happens

#

when caused by a plugin, usually not

granite stirrup
#

oh i thought it will lol

ivory sleet
#

I believe somewhere deep spigot uses a try catch (Throwable) or smtng to prevent random shutdowns

quaint mantle
#
public boolean containsInventory(Inventory inventory) {
    if (cache.contains(inventory)) return true;
    boolean v = values().stream().anyMatch(i -> i.getInventory().equals(inventory));
    if (v) cache.add(inventory);
    return v;
}

there's gotta be a better way of doing this

valid crag
#

what is it supposed to do to begin with

quaint mantle
#

when an inventory is clicked it calls like 4 methods, i dont want players to cause performance issues

#

and i check through a map each method

valid crag
#

no but like what is happening here

quaint mantle
#

Map<String, ShopGUI>

ShopGUI -> getInventory.equals(inventory)

#
@Data
public class ShopGUI {
    private String permission = "";
    private Inventory inventory;
}
valid crag
#

consider an Inventory -> ShopGUI map?

#

i'm not sure what you're doing but that'd be what I'd do if this is what I think it is

quaint mantle
#

yeah ill just make this manager class contain 2 maps

ivory sleet
#

What maps?

#

You might be able to utilize a BiMap depending on circumstances

valid crag
#

that'd take you from ShopGUI to String

quaint mantle
#

its String, Inventory -> ShopGUI

ivory sleet
#

Oh right

quaint mantle
#

whats bimap?

ivory sleet
#

Then nvm

valid crag
#

a map that goes two ways

ivory sleet
#

Yeah key to key basically

valid crag
#

instead of key -> value it can go from value -> key as well

#

without like having to iterate over the entire thing

quaint mantle
#

i could use that

#
public String getKey(@NotNull Inventory inventory) {
    for (String key : keySet()) {
        Inventory i = get(key).getInventory();

        if (i != null && i.equals(inventory)) return key;
    }
    return null;
}

it could be used here i imagine

gritty lake
#

Hi is there any solution to fix 1.8 servers can't connect to mysql 8 with is the new default? :/
I updated my plugins to new driver but not able to update other plugins
Many plugins use "com.mysql.jdbc.jdbc2.optional.MysqlDataSource" i believe but on 1.8 it not work anymore but works fine on 1.12+ servers with get me to think 1.8 may using a very outdated driver but i can't update that :/

I also tryed to change characterEncoding on the mysql server but did not work

valid crag
#

sort of, but the inventory -> gui map would serve the same function

quaint mantle
#

alright

valid crag
#

you'd get the gui by the inventory and then call getKey or whatever on the returned gui

shadow gazelle
#

Okay, I'm really stuck now

quaint mantle
#

Hi, could someone help me by giving me ideas of how to make tops, weekly and monthly please?
I can think of ideas but they could kill the database

valid crag
#

leaderboards of what, exactly

#

what kind of data are we talking about

#

how often do the criteria update

quaint mantle
#

leaderboards

valid crag
#

yes, but leaderboards for what data

quaint mantle
#

for example kills, deaths, etc

valid crag
#

maintaining a leaderboard is very simple if the relevant values can only increase

#

things get more difficult for things like killstreaks, that can decrease or reset

quaint mantle
#

Yes, but I would like them to be eliminated from time to time

valid crag
#

if deletions/decreasing criteria are the case, you'll have to maintain the whole thing in order

#

otherwise you end up going through the entire database whenever someone's score lowers or someone is removed from the board

quaint mantle
#

yes, I understand how they work, where I am stuck is to make the statistics reset every day, week and month

valid crag
#

if you for some reason can't just drop the whole table, you can store an expiry timestamp and reset the values on access if it's expired

quaint mantle
#

ok, I'll be testing it

#

thx

shadow gazelle
#

Can someone explain how I would make HashMap for my NPCs like 7smile7 said?

valid crag
#

new HashMap<>()

shadow gazelle
#

Oh, yeah, wasn't very specififc

valid crag
#

you probably want to store the map somewhere in addition to making it, yes?

shadow gazelle
#

Yes

valid crag
#

and how do we store things in java?

shadow gazelle
#

Do you mean variables?

valid crag
#

variables aren't stored

#

they poof and disappear when the method they belong to is done

#

what I'm talking about is fields

#

a field belongs to an object or a class and exists as long as that object or class exists

shadow gazelle
#

Oh, right

valid crag
#

a regular field belongs to an object, a static field belongs to a class

shadow gazelle
#

My brain is gone because I've spent like an hour trying to figure this out

valid crag
#

do you remember how to declare a field

shadow gazelle
#

Yes

valid crag
#

declare a field of type Map<Integer, NPC> named npcMap

#

make it private and final

shadow gazelle
#

Okay, got that

valid crag
#

show me what you ended up with

shadow gazelle
#
public final Map<Integer, NPC> npcMap = new HashMap<>();
valid crag
#

right

#

you now have a map, where you can store things

#

you can then at a later time read those things

shadow gazelle
#

I know

valid crag
#

what don't you know, then

shadow gazelle
#

Where I store things from, I guess

valid crag
#

a map is also called a 'dictionary'

#

it allows you to look up things

#

for example, take a phone book

#

you look up a person's name, and you end up with their phone number

#

in your code, you want a dictionary that, given an entity id, gives you an NPC

#

you then want to take the entity id from the packet, take it to the dictionary, and it'll take you to the NPC

shadow gazelle
#

So pretty much move everything from my List where the NPCs were stored to the Map?

quaint mantle
valid crag
#

i don't know what your list is, but probably yes

#

lists are for when you want things to be in order

#

maps aka dictionaries are for when you need to find things

valid crag
#

you don't need your npc's to be in order; you need to be able to find them

vague oracle
#

The map is a key and value based storage you can get the value from the key if you wanted to get a item from a list, you have to loop through and filter them

quaint mantle
#

Integer, NPC is pretty much the same thing as NPC[]

valid crag
#

yes, but NPC[] is not sparse

shadow gazelle
#

So do I just use a for to put the NPCs in that map from the list with the NPCs?

valid crag
#

seeing as eids range in the millions, an array is haram

#

you can do that yes, but ideally you would get rid of the list altogether

#

and instead of putting the things in the list to begin with, you'd put them in the map instead

shadow gazelle
#

That would require the map being public and changing like ten other things

quaint mantle
#

ah did not know he was using entity ids as key

valid crag
#

he's listening to packerinos so he has to

#

it having to be public and changing like ten other things are issues caused simply by poor design

quaint mantle
#

not necessarily a plugin but how would I customize mobs i.e creepers always being charged or zombies having full diamond all the time

valid crag
#

listen to the creature spawn event and perform whatever modifications you see fit on the spawning entity

shadow gazelle
valid crag
#

because data structures shouldn't be public

#

you should have accessor and mutator methods like registerNpc(NPC) or getNpc(int entityId)

shadow gazelle
#

How would I call every NPC in a map?

valid crag
#

map.values() returns very value in the map

#

the better question is why do you need to do that?

shadow gazelle
#

For sending the packet that adds the NPCs

valid crag
#

wouldn't you only want to send the npcs in the player's view-distance

shadow gazelle
#

How am I supposed to put the NPCs into the map and call them with an ID if they use UUIDs?

valid crag
#

they use both UUIDs and IDs

#

UUID is persistent, ID is not

#

UUID is an UUID, ID is an int

torn shuttle
#

wth, I bricked intellij again

valid crag
#

intellij is trash

torn shuttle
#

no it's not

valid crag
#

it is though

torn shuttle
#

compelling argument, looking forward to seeing the IDE you created and which is better than intillij

valid crag
#

that doesn't mean it's not trash

shadow gazelle
#

But how is it trash?

torn shuttle
#

I think he's a bot

valid crag
#

commentating on something doesn't require one to be 100% proficient at and capable of fully reproducing the subject of the commentary

#

it's trash because it's slow as balls, has too many bells and whistles, the UI is annoying and there is too much eyecandy

torn shuttle
#

saying something is trash 5 times in a row and not going into detail is not commentary, it's something I can teach a parrot to do

valid crag
#

it is better than most other IDE's around because it has more features than any other IDE

#

but it has its own significant share of drawbacks and super irritating issues as well

torn shuttle
#

so the thing that makes it better than the other ides is what makes it trash

#

gotcha

minor garnet
#

How work the minecraft projectile velocity, when losing velocity between distance ?

valid crag
#

not quite

#

I would say the thing that makes it trash is a symptom of it being better than the others, combined with a poor mindset or goal at the source

#

both its advantages and its issues stem from the same root cause

#

that does not, however, mean that the issues cannot be trimmed out if someone competent actually gave a shit

#

which is why I label it trash

#

it is an enermous waste of potential, which to me, is even more haram than not being good to begin with

prisma needle
#

?paste

undone axleBOT
torn shuttle
#

I see your opinion and I raise my opinion about your opinion: your opinion is an enermous waste of character space

valid crag
#

you're the one who asked for real commentary

torn shuttle
#

no I didn't

valid crag
#

you did

#

by complaining about me not actually giving commentary

ivory sleet
#

Aye guys we can just stop this IDE debate

torn shuttle
#

I never asked for your opnion, I was just commenting that intellij bricked itself

#

is anyone having issues with the latest release?

#

I think it might be a plugin issue

valid crag
#

i'm still using a version from 2019

ivory sleet
#

Latest broke some plugins ye

valid crag
#

this is why I never update anything

prisma needle
#

I'm trying to make some code which will create a new config file (with any name) and the contents from an already made file within the project into the new file. It successfully creates the file, but it is always empty. Is there something I'm doing wrong? https://paste.md-5.net/pehiroreva.cpp

valid crag
#

use JavaPlugin::saveResource

#

and then load the created file with YamlConfiguration::load

ivory sleet
#

Geek what ya trying to do

#

That would load the config from the jar

#

Not the one copied to ur plugin folder

valid crag
#

it'd grab the file from the jar to the destination if it doesn't already exist

torn shuttle
#

are you still using that awful red filter nnya

valid crag
#

and then load the file in the plugin directory

#

basically saveDefaultConfig

#

but for any name, not just config.yml

#

if the resource name and the target file name don't match, you'll have to do stuff with io streams to write it to a different location, but that is only one or two more lines

#

and yes I'm using the red theme still

torn shuttle
#

is your favorite game doom or something

ivory sleet
#

Ripcord getting any updates with the new threads coming?

valid crag
#

i don't know, I haven't even updated to the version with replies yet

#

it'll probably take a few weeks or months for threads

ivory sleet
#

Oo yeah, how many developers does it have

valid crag
#

one

ivory sleet
#

Ah fair

valid crag
#

a money hungry fuck who ignores the discord side of the program in favor of slack, because the slack part you have to pay for

#

so nothing ever gets done

torn shuttle
#

I mean

#

in fairness

#

it's probably easier to keep someone banned on a paid service huh

valid crag
#

it's the easiest on a service you run the servers of yourself

#

like IRC

ivory sleet
#

What is ripcord written in?

valid crag
#

like C or something, I don't remember

shadow gazelle
#

So then how do I insert an NPC into that map?

torn shuttle
#

irc is trivial to bypass bans on

valid crag
#

you get its entity id

shadow gazelle
#

If it needs an integer and NPC

valid crag
#

Entity::getEntityID

#

yes but on IRC you at least have rangebans

ivory sleet
valid crag
#

on discord you are entirely fucked if someone has a dynamic IP

torn shuttle
#

yeah seems a good reason not to use discord if you don't want to deal with that

valid crag
#

granted you are still kind of fucked if someone uses a vpn, but I'm sure you can rig up something with dnsbls for IRC

#

discord on the other hand doesn't even let you see an user's IP, let alone block them or prevent them from joining based on it

shadow gazelle
prisma needle
shadow gazelle
#

npc being an EntityPlayer

torn shuttle
#

based on the skype exploit era I much prefer discord acting as a filter for ips

valid crag
#

an Entity declares a method getEntityID of return type int

#

yeah, it does have its advantages

torn shuttle
#

remember when you could get anyone's ip on skype by just looking them up

#

that was fun huh?

prisma needle
quaint mantle
#

how would I make it so when someone mines an ore it replaces it with stone like it does on hypixel skyblock

valid crag
#

are you replying to something I said? I can't see replies

prisma needle
#

yeah you said "use JavaPlugin::saveResource"

valid crag
#

JavaPlugin::saveResource takes a string and a boolean iirc

#

the string is the relative path of the resource in your jar

#

for config.yml, it'd be "config.yml"

#

the boolean determines whether an existing file at the destination should be overridden

#

which for your case you probably want to set to not happen

shadow gazelle
#

pog

#

Now that it's not going to be a lag machine...

valid crag
#

@torn shuttle have they fixed the fucking window focus issue in modern intellij yet

shadow gazelle
#

wtf is happening?

valid crag
#

ripcord doesn't support message links

shadow gazelle
#

:l

valid crag
#

nor does it support replies

valid crag
#

basically copypaste the original question or something

shadow gazelle
#

Yeah

#

So I have a command that adds an NPC with whatever specified name when you use with it. When I use reload, the click event I have stops working. It does basically nothing, I'm already uninjecting the player packets onDisable, do I need to remove them, too?
The click event is still working, i.e. I can spawn another one and it works, but clicking one of the old NPCs (from before the reload) doesn't do anything

opal juniper
#

Just update

#

Orrrrr use the webpage of discord

#

Slightly less Intensive than the electron window

valid crag
#

do you receive the relevant packet in your whatever listener

#

it's still pretty cancerously laggy

shadow gazelle
#

All the NPCs get loaded again from the storage file and put back into the list of NPCs

shadow gazelle
#

Wait, if I relog they work

valid crag
#

then simply track down the specific condition that isn't being met

shadow gazelle
#

OH

#

Got it

#

onDisable and onEnable needed to add/remove the packets

warm galleon
#

when im using spigot clip why is there no org.bukkit and nothning for my to have my main class extend
how do i use it

shadow gazelle
#

When you forget to return true in an onCommand boolean so code runs anyway

valid crag
#

you know those small popup windows that open when you're loading a project?

shadow gazelle
#

No

torn shuttle
#

no?

warm galleon
#

in intellij it does say "open in this window or new window"

warm galleon
#

but only if theres alr one open

valid crag
#

the small window that says "Loading Project..."

torn shuttle
#

lol the stars aligned there

normal flower
#

clipboard.getRegion() returns the region of the place where I first created the schematic file doing //schem save. How do I get the region of the pasted area? Or even better how do I modify the schematic file before pasting using the world edit API? I can't seem to figure it out.

valid crag
#

with status messages like "reopening files..."

#

and a loading bar

#

ring a bell?

shadow gazelle
#

wtf is that red

steep nova
#

nope

valid crag
#

do these popup windows not exist anymore in modern intellij?

shadow gazelle
#

But yes, it's there, it's almost unnoticeable with the load speed if your project is small, though

torn shuttle
warm galleon
#

oh yeah i know it

valid crag
#

Well, see, here is one of the things that grinds my gears about it

#

my machine is slow

warm galleon
#

but since my laptop is a god it appears for .00000000001 seconds

valid crag
#

like, very, very slow

shadow gazelle
#

lol

valid crag
#

which means that this popup is usually open for around 45 seconds

torn shuttle
#

guys no joke this man's computer is legendary