#help-development

1 messages · Page 2167 of 1

winged anvil
#

but its not attributes i had already tried

sleek turret
#

i thinks it's cause its a hardcoded creative feature

winged anvil
#

odd

iron glade
#

I'll try it, thanks

#

If I remove an entity which has passengers, does it remove the passengers too?

sullen dome
#

try it ig

#

i'd guess it does but idk

#

alltho i think it'd more likely just remove the passenger from the entity

iron glade
#

That's what I ended up with atm

#

removing the passenger and then the entity

sullen dome
#

the itemgroup is forcefully rendered

languid lynx
dim bronze
#

ideas why gradle wont download 1.18.2 api? Could not find spigot-api-1.18.2-R0.1-SNAPSHOT.jar (org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT:20220428.092138-38).

Full build.gradle.kts

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    kotlin("jvm") version "1.6.21"
    id("com.github.johnrengelman.shadow") version "7.1.2"
}

group = "com.jackchapman"
version = "1.0-SNAPSHOT"

repositories {
    maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
    maven("https://oss.sonatype.org/content/repositories/snapshots")
    mavenCentral()
}

dependencies {
    compileOnly("org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT")
    implementation(kotlin("reflect"))
}

tasks.withType<KotlinCompile> {
    kotlinOptions.jvmTarget = "1.8"
    kotlinOptions.freeCompilerArgs = listOf("-Xcontext-receivers")
}
tender shard
#

hm I'm wondering whether I'm converting between timeunit once too often but I wouldn't know a way on how get rid of it

    public long getRemainingCooldown(OfflinePlayer player, TimeUnit remainingTimeUnit, long delay, TimeUnit delayTimeUnit) {
        return remainingTimeUnit.convert(precision.convert(delay, delayTimeUnit) - (currentTimeSupplier.getAsLong() - getLastReset(player)),precision);
    }
fallow violet
#

Hey there. Can someone tell me how to fix this error in my pom.xml: Cannot resolve org.spigotmc:spigot:1.18.1-R0.1-SNAPSHOT
I am sure i made many mistakes here...
pom.xml: https://paste.md-5.net/ovugumifij.xml

fallow violet
#

xd

sullen dome
#

1:1

fallow violet
#

okay so i must run it and finish?

sullen dome
#

yea

#

or use spigot-api instead

fallow violet
#

doesnt matter where?

sullen dome
#

if you dont insist on nms and shit

fallow violet
sullen dome
#

then run bt, and then try it again

fallow violet
#

alright brb

#

while its running: What does buildtools do exactly?

sullen dome
#

basically it decompiles mc

#

in short

#

and deobfuscates it ig

fallow violet
#

and i dont have to move any files for the pom.xml thing??

sullen dome
#

nah

#

it automatically saves it in your local .m2

#

which the pom takes by default

fallow violet
#

well thats nice

sullen dome
#

i still got no frickin idea how paper does it in like 10 seconds or smt

fallow violet
#

and why i need this?

sullen dome
#

while bt needs minutes

sullen dome
fallow violet
#

buildtools

#

i mean why it doesnt do this by itself?

sullen dome
#

because it's illegal to distribute mc code

fallow violet
#

well

#

oh

sullen dome
#

copyright

fallow violet
#

and why is it legal with buildtools? da fuq

tender shard
#

hm is there any way do to this?

public class Cooldown <T extends TimeUnit> {
    
    private final TimeUnit myTimeUnit;
    
    public Cooldown(T unit) {
        this.myTimeUnit = unit;
    }
    
    public static class Test {
        public static void main(String[] args) {
            Cooldown<> cooldown = new Cooldown(TimeUnit.MILLISECONDS); // Diamond operator won't work
        }
    }
    
}

I basically need to use the TimeUnit (an enum constant) in the line with the comment

sullen dome
#

because it isn't distributed directly ig?

#

idk

proper notch
#

distributing compiled spigot includes distributing more than just spigot.

fallow violet
#

wait. When its illegal to do this. How spigot got made?

sullen dome
#

it's just illegal to let people download that already compiled stuff

proper notch
#

idk the full reason as to what's in there that can't be distributed, but there are many threads on why and stuff.

sullen dome
#

by doing it with bt, you basically decompile/deobfuscate it yourself only for yourself, which makes it legal ig

#

i'm not a lawyer btw

fallow violet
sullen dome
#

thats why i wonder how tf all those websites who upload server-jar's can still be legal

#

and online

#

does mojang just not give a shit? lol

humble tulip
#

It's safe to create itemstacks on other threads just not add them to inventories right?

fallow violet
#

mojang is too rich for that lmao

proper notch
#

something being illegal doesn't necessarily mean someone actually cares to come sue you and force u to take it down.

#

I'd recommend just reading one of the many existing threads that go into great detail.

sullen dome
#

i remember mojang beeing hard about that tho

#

about their eula at least

proper notch
sullen dome
#

like, in past they banned so many servers for selling p2w stuff

fallow violet
#

buildtools just closed. Is it finished?

sullen dome
#

try it and see lol

fallow violet
#

same error

sullen dome
#

if it copied a spigot jar inside the bt folder, it did

#

if not, check the log

#

if you think i've ever read it, you're wrong

#

i dont think anyone in here really reads it lol

proper notch
fallow violet
#
Success! Everything completed successfully. Copying final .jar files now.
Copying spigot-1.18.2-R0.1-SNAPSHOT-bootstrap.jar to D:\Documents\BuildTools\.\spigot-1.18.2.jar
  - Saved as .\spigot-1.18.2.jar

#

but error still there

sullen dome
#

what do you mean with "error"

#

just the red thing?

#

if it's just this type of "error", ignore it and reload your maven proj

fallow violet
sullen dome
#

thats odd

#

oh

#

you ran bt with 1.18.1

#

1.18.2*

fallow violet
#

oh no w/ 18.2 im dumb

sullen dome
#

happens

fallow violet
dim bronze
#

ideas why gradle wont download 1.18.2 api? Could not find spigot-api-1.18.2-R0.1-SNAPSHOT.jar (org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT:20220428.092138-38).

Full build.gradle.kts

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    kotlin("jvm") version "1.6.21"
    id("com.github.johnrengelman.shadow") version "7.1.2"
}

group = "com.jackchapman"
version = "1.0-SNAPSHOT"

repositories {
    maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
    maven("https://oss.sonatype.org/content/repositories/snapshots")
    mavenCentral()
}

dependencies {
    compileOnly("org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT")
    implementation(kotlin("reflect"))
}

tasks.withType<KotlinCompile> {
    kotlinOptions.jvmTarget = "1.8"
    kotlinOptions.freeCompilerArgs = listOf("-Xcontext-receivers")
}
crisp steeple
sullen dome
#

don't spam

crisp steeple
#

would pretty much be like an enum still

fallow violet
#

Pom.xml error Cannot resolve org.spigotmcspigot1.18.1-R0.1-SNAPSHOT

sullen dome
#

you ran bt with 1.18.2, and in your pom you're trying to use 1.18.1

#

just change it to <version>1.18.2-R0.1-SNAPSHOT</version>

fallow violet
#

already did

queen geode
#

This worked! Thank you!!

humble tulip
#

No problem

sullen dome
#

now that's funny

fallow violet
#

xd

#

i run it now with the --remapped tag

#

worked

sullen dome
#

why tf is bt broken

#

wtf is wrong with my pc agaiiiiiiin

fallow violet
#

i dkkk

#

but mine works now :>

sullen dome
#

lets see if a bt redownload fixes it

#

nope, doesnt fix anything

fallow violet
#

sad

#

xd

sullen dome
#

i hate this game

fallow violet
#

woah :o

sullen dome
#

might quit mc completely

#

also my gpu doesnt like mc, after like 30 minutes it straight up overheats lmfao

#

cyberpunk on high settings? no problem
minecraft? no way

fallow violet
#

Minecraft has level.

sullen dome
#

minecraft's performance is hillariously bad

humble tulip
#

I run bungee, 2 servers and 2 mc instances on my ryzen 7 apu

#

To test on

sullen dome
#

and tbh, as long as they won't go away from opengl, it's likely for me to abandon it

#

just imagine minecraft running on vulkan

tender shard
#

I'm writing a Cooldown library right now because people keep asking how to do stuff like this all the time, But I'm wondering whether it's better to provide the duration to wait at the moment while checking (basically comparing last usage with current time) or whether it's better to provide the "future time" when it's allowed again when the item is used, whatever.

Here's an example of both methods:


    private final Cooldown cooldown = new Cooldown(TimeUnit.MILLISECONDS);

    // Rather like this, where you can set the duration while checking it?
    public void onCommand(Player player, String[] command) {
        if (cooldown.hasCooldown(player, 1, TimeUnit.MINUTES)) {
            player.sendMessage("You can run this command only once per minute, please wait %d seconds.", cooldown.getRemainingTime(player, 60, TimeUnit.SECONDS));
            return;
        }
        player.setCooldown(); // Basically saves "current time" as last usage
        // Run the command log
    }

    // Or like this, where you set the "future time" after the cooldown check was successful?
    public void onCommand(Player player, String[] command) {
        if (cooldown.hasCooldown()) {
            player.sendMessage("You can run this command only once per minute, please wait %d seconds.", cooldown.getRemainingTime(player, TimeUnit.SECONDS));
            return;
        }
        player.setCooldown(1, TimeUnit.MINUTES); // Saves "current time + 1 minute" 
        // Run the command logic
    }
#

the second option is probably easier because then one doesn't have to also provide the duration in getRemainingTime?

fallow violet
#

what da fuck

#

why so big?

river oracle
#

Sus

tender shard
fallow violet
#

oupsi

tender shard
#

<scope>provided</scope> in your spigot dependency

iron glade
fallow violet
#

to me :>

iron glade
#

imagine exporting ur plugin and it's 73mb

#

this a whole new game xd

fallow violet
sullen dome
#

looks like something related to nms

tender shard
#

because you used the remapped class names without remapping your plugin's code

fallow violet
#

thanks

iron glade
fallow violet
#

oups

queen geode
#

Hmph

#

World#getHighestBlockAt(int x, int z, heightmap: Heightmap) is weird

#

using HeightMap.WORLD_SURFACE_WG as the heightmap results in proper worldgen results when a block is placed in the current session

#

but when the server is restarted it seems as though player placed blocks are put into that heightmap as well so it returns a player placed block instead of a generated block

tender shard
#

0 is 1 minute, 2 is 15 minutes

iron glade
#

I'm currently trying to join on my localhost and I get stuck in a "building terrain" screen

fallow violet
#

I spawned an npc in nms but it has only one layer of its skin. How can i fix it?

iron glade
#

only way to exit without closing the game is to kick myself from console

#

i tried restarting the server and the client but didn't change anything

#

with another account it works as usual

sullen dome
iron glade
#

is there a way to debug my launcher or smth?

sullen dome
#

sure, just check the log, depending on what launcher you use

iron glade
#

aight

sullen dome
#

if you use the normal mc launcher (please don't), there's an option somewhere to open the console when launching the game, in multimc just click on "edit instance"

#

other launchers i have no idea

#

it happened to me when the server's playerdata for both my accounts was broken.
just delete the file world/playerdata/<your-uuid>.dat file (which does delete your inventory and locations etc, be aware)

iron glade
#

Do I need to check if a player's gamemode is not survival before setting it to survival or does spigot already do this check for me?

dusk flicker
#

it shouldn't error out

dense falcon
#

The event AsyncPlayerChatEvent, can we check if the message come from a cmd?

iron glade
worthy yarrow
#

I dont believe it would matter either way

dusk flicker
#

you shouldent need a check

#

if you set a gamemode and are already in that gamemode you will just set the gamemode again

#

not like its gonna throw an error

worthy yarrow
#

Whether or not the player is in survival, it will still set their gamemode to survival

#

w/o error

iron glade
#

Okay I'm just asking because I'm setting a player's game mode to survival every second via a repeating scheduler

dusk flicker
#

why do you have to set it every second?

worthy yarrow
#

^

sullen dome
iron glade
sullen dome
#

it's catched by the PlayerCommandPreprocessEvent, or PlayerCommandSendEvent ig

iron glade
#

wait.. is there an event to cancel that they change their gamemode?

sullen dome
#

PlayerCommandPreprocessEvent

#

cancel that, and the command won't run

iron glade
#

that would be the better solution I guess

#

I set their gm to survival once and just cancel the command as long as the creepers spawn

sullen dome
#

alltho idk if there's a GameModeChangeEvent

dusk flicker
#

there is

sullen dome
#

cool

#

then take that lol

iron glade
#

even cancellable

#

nice

dry forum
#

how would i get all the blocks in a FAWE selection?

#

.getSelection(p) doesnt exist

wind tulip
#

Anyone know why .getTag() is returning null in this scenario?

#

I'm trying to save a player's inventory to a file as a string

#

by having basically just one big text of <nbt>|<nbt>|....

#

and split by "|"

humble tulip
#

Why string may i ask?

#

The tag is null btw

#

Is it a regulae item maybe

#

Like dirt or a normal pickaxe

iron glade
#

I want to spawn some falling entities above a player, let's say 20 blocks above him. Is there a way to detect if there's a "free way" between the player and the spawn location? Let's say the player walks under a bridge --> no free way.. what would be an efficient solution?

#

iterate through all blocks between his location and the spawn location and check if there's something that is not air?

sullen dome
#

i'd guess so

fallow violet
#

what is the best way to save an Inventory btw?

sullen dome
#

alltho probably all blocks between the player and the highest block at the current location

sullen dome
fallow violet
#

but how?

sullen dome
#

uh

fallow violet
#

json?

earnest forum
fallow violet
#

thx

earnest forum
#

this serializes and stores the inventory in json

sullen dome
#

i mean, i would've done it in yml because i hate json, but json ofc is probably better for this

worthy yarrow
#

I'm trying to make a MobDamageEffect plugin...

        void MobHitEvent(EntityDamageEvent damage, Player player, Spider spider){

                if (player.getLastDamageCause().equals(damage.getEntity().equals(spider))) {

                    player.sendMessage(ChatColor.DARK_RED + "You have been given poison from the spider bite!");
                    player.addPotionEffect(PotionEffectType.POISON.createEffect(8, 1));

                } else {
                    
                }
earnest forum
#

you could actually store it any way you want

#

that just gives you a base64 serialized inventory

#

put it in json, yml anything

worthy yarrow
#

So when a certain mob damages a player it gives them a certain potion effect

#

With the code I have, it doesn't give the player poison when hit by a spider, i've been spitballing here for the past hour and i'm not sure how to write it

sullen dome
# earnest forum you could actually store it any way you want

i just would've done smt like ```java
for (int i1 = 0; i < 36; i++) {
if (player.getInventory().getItem(i1) != null) {
Main.getPlugin().getConfig().set("inventory.whateverUUID." + i1, player.getInventory().getItem(i1));
}
}
Main.getPlugin().saveConfig();

but i never did itemstack saving, so there's probably more efficient ways to do it
earnest forum
#

that doesnt serialize meta

#

just like the type and amount

sullen dome
#

then save the meta data as well

#

just an idea

humble tulip
#

And save it as a base 64 string

#

Ah the gist above

sullen dome
#

i mean, for most cases the only important things are the item type and amount anyway, so yea, if you need displayname/lore as well, save it as well

earnest forum
#

its 1 long string

#

much more efficient i'd say

sullen dome
#

because i for myself have no idea about what serialize even means lol

earnest forum
#

put it into file

sullen dome
#

or what base 64 means

earnest forum
#

ok

#

so our number system

#

is in base 10

#

because we have 10 digits

#

0-9

#

base 5 only has 0-4

#

base 64 has 64 characters

#

includes letters and stuff

sullen dome
#

i see

earnest forum
# sullen dome i see

serializing into base 64 basically puts the whole item into data in a base 64 string

#

which can be deserialized back into an item stack

maiden vapor
worthy yarrow
#

I have spider and player set to bukkit.entity.Player/Spider

#

I have the damage event to check if the player was hit by a spider

#

if (player.getLastDamageCause().equals(damage.equals(spider)))

#

Damage event = damage

#

I'm pretty new to the spigot api so I'm not sure if I have to write it differently

maiden vapor
#

EntityDamageEvent doesn't guarantee that an entity is being attacked by another entity. Listen for EntityDamageByEntityEvent event instead. getEntity for that event returns the entity that got hit, and getDamager returns the entity that attacked

sullen dome
#
    @EventHandler
    public void MobHitEvent(EntityDamageByEntityEvent e) {
        if (e.getEntity() instanceof Player player) {
            if (e.getDamager().getType() == EntityType.SPIDER) {
                e.getEntity().sendMessage(ChatColor.DARK_RED + "You have been given poison from the spider bite!");
                player.addPotionEffect(new PotionEffect(PotionEffectType.POISON, duration, amplifier, false, true, true));
            }
        }
    }```
i'd say
worthy yarrow
#

Alright

flat leaf
#

Anyone have any idea why after upgrading all my dependencies to 1.18.2, pretty much all of the deobfuscated method names are gone for NMS classes?

iron glade
#

how to send a message in code style here?

flat leaf
#

like for instance, EntityArrow.getShooter() has existed since like 1.14

#

and it is now gone

earnest forum
#
code
#

put java in front for colours

sullen dome
#

if you want specific syntax use

#

-_-

iron glade
#

is it normal that I can't send the message with enter after I used those ´´

earnest forum
#

u gotta add another one

sullen dome
#

well if youre in the things, yes

mortal hare
#

also you can escape backticks, if you guys didnt knew, place \ before the backticks

#

```java

```

sullen dome
#

or you could make it easier

sullen dome
#

lol wait

earnest forum
#

*hi*

sullen dome
#

there's none for code? lmfao

iron glade
#

bruh

#

whatever... anyone knows why this isn't working?

sullen dome
#
public boolean hasFreeWayAbove(Player p, double distanceY) {

        Location loc = p.getLocation();
        double yLoc = loc.getY();

        for(int i = (int)Math.round(yLoc); i<yLoc + distanceY; i++) {

            Location check = new Location(p.getWorld(), p.getLocation().getX(), i, p.getLocation().getZ());

            if(Bukkit.getWorld(p.getWorld().getName()).getBlockAt(check) != null) {

                return false;

            }

        }

        return true;
    }```
#

there ya go

iron glade
#

ty

sullen dome
#

if it will work, the java get's shown in green

iron glade
#

oh good to know

mortal hare
sullen dome
#

as seen here

maiden vapor
sullen dome
#

tell that to minesuchti, not my code

mortal hare
sullen dome
worthy yarrow
#

oops, I think I just upgraded the jdk to lang 16 and now all my code is broken... any way to bring it back down to 8?

#

intellij idea

mortal hare
#

use normal switches, if you already used lambda switch blocks. Remove instanceof autoboxing statements

iron glade
sullen dome
#

and then select all boxes

#

and restart

#

90% of jdk changes break intellij, dont ask me why

#

except if you use java 8, then just switch the lang level back to 8 as well

worthy yarrow
#

I had no idea what I did, everything just errored out

sullen dome
#

show this window

worthy yarrow
#

also with the code you sent i'm getting an error on the Player player in the conditional

#

the first if *

sullen dome
#

wut

#

please don't tell me you use 1.8

#

it's a feature from some newer java version

worthy yarrow
#

I have this project on 1.18.2

sullen dome
#

i mean

#

you can also use

worthy yarrow
#

I usually play on 1.8 personally but im developing on 1.18.2

sullen dome
#
    @EventHandler
    public void MobHitEvent(EntityDamageByEntityEvent e) {
        if (e.getEntity() instanceof Player) {
            Player player = (Player) e.getEntity();
            if (e.getDamager().getType() == EntityType.SPIDER) {
                e.getEntity().sendMessage(ChatColor.DARK_RED + "You have been given poison from the spider bite!");
                player.addPotionEffect(new PotionEffect(PotionEffectType.POISON, duration, amplifier, false, true, true));
            }
        }
    }```
#

it's some newer language level addition i use like all the time

#

which casts and initializes it automatically

#

when the instanceof is true

iron glade
sullen dome
worthy yarrow
#

interesting... now it's saying "can't find class for player"

willow widget
#

Is there a way to register a command without declaring it in my plugin.yml ?

sullen dome
#

tf

sullen dome
willow widget
#

how can I enable/disable a command then? xd

earnest forum
#

you could listen for certain messages on chat event?

willow widget
worthy yarrow
#

I don't know

iron glade
#

Is there a way to prevent squids from dropping ink sacs when dying?

worthy yarrow
#

to be fair,

#

It could have been the lang 16 thing i did

willow widget
earnest forum
#

it wont show up as a command tho when u do tab

willow widget
#

verify entity and cancel drop

#

brb

sullen dome
#

all yml commands are shown in the tab completion

kind hatch
iron glade
#

Just don't execute it? CommandPreProcessEvent

sullen dome
#

you can just unregister the executor i guess

iron glade
#

or that

sullen dome
#

but that doesn't remove it from the completion

#

or may even throw errors when running it

worthy yarrow
#

rivex, should I have a separate class for this eventhandler logic?

sullen dome
#

people tend to have seperate classes for this

#

i usually myself just junk all of my listeners in one class

#

doesn't make a huge difference in the end i'd say

earnest forum
#

its more for your own reading

#

i usually categorize mine

#

PlayerEvents, MobEvents, etc

sullen dome
#

i personally hate having many classes

#

so yea, preference

worthy yarrow
#

can I @eventhandler @(something else)

sullen dome
#

what

worthy yarrow
#

well,

sullen dome
#

you can just do this for example

worthy yarrow
#

How on plugin enable has a @override

sullen dome
#

every event has a @EventHandler annotation

worthy yarrow
#

can i do two of the @

sullen dome
#

why not

#

you only register the listener class, not every single event itself

iron glade
#

Normal entities have no custom name, or do they?

#

and it's just invisible

sullen dome
#

that's where the annotations are for, to see if a method is an event method or not, when bukkit registers it

kind hatch
iron glade
sullen dome
#

i still wonder, can you actually change the name above players without nms?

#

dont think so

kind hatch
#

You mean their actual name? No. The prefix and suffix, yes. (Scoreboard teams)

sullen dome
#

i mean the name that is displayed above the player only

#

to for example make it colored

earnest forum
#

yes

#

scoreboard teams again

#

change the colour of the team

sullen dome
#

scoreboards -_-

#

might learn redstone as well when attempting this lol

#

i hate commands

#

especially scoreboard

#

i just learned how to suffix a player's death count in tablist, thats all tho

earnest forum
#

not like a sidebar scoreboard

sullen dome
#

i know

iron glade
sullen dome
#

the scoreboard is like the tablist etc as well, i'm aware of that

earnest forum
#

yes

kind hatch
iron glade
#

what's pdc?

sullen dome
#

persistentdatacontainer

kind hatch
#

Persistent Data Container

#

?pdc

sullen dome
#

/data command basically

iron glade
#

Ahhh I remember

sullen dome
#

which contains all data of entities/blocks

#

which changes

worthy yarrow
#

rivex ```public void MobHitEvent(EntityDamageByEntityEvent e, Player Player) {

    if (e.getEntity() instanceof Player)``` doesn't give me errors
iron glade
#

yes I remember, very useful

sullen dome
#

why tf

#

why do you pass the player

iron glade
#

Player Player 2 times capitalized?

worthy yarrow
#

Well I was just switching code around, now nothing is erroring...

#


        if (e.getEntity() instanceof Player) {
            Player player = (Player) e.getEntity();
            if (e.getDamager().getType() == EntityType.SPIDER) {
                e.getEntity().sendMessage(ChatColor.DARK_RED + "You have been given poison from the spider bite!");
                player.addPotionEffect(new PotionEffect(PotionEffectType.POISON, 8, 1));
            }```
sullen dome
#

is it possible to unverify my account?

worthy yarrow
#

no errors

#

I have no idea

sullen dome
#

i don't have access to my spigot account for 2 years now

#

i hate the fact i can't change my name

iron glade
#

But isn't this checking if the entity is instance of the variable player you passed through?

sullen dome
#

oh

#

you made it uppercase

#

dumb

iron glade
#

cause Player variable is uppercase

#

ye

sullen dome
#

passing the player there is completely useless

iron glade
#

true

kind hatch
#

Also, I don't think that's a valid event handler. I'm pretty sure you can only pass in an event if it's annotated as @EventHandler

worthy yarrow
#

It's the only thing that gives me no errors... it's weird i'm not sure

sullen dome
#

just use

iron glade
#

Did you check your imports?

sullen dome
#
 public void MobHitEvent(EntityDamageByEntityEvent e) {
        if (e.getEntity() instanceof Player) {
            Player player = (Player) e.getEntity();
            if (e.getDamager().getType() == EntityType.SPIDER) {
                e.getEntity().sendMessage(ChatColor.DARK_RED + "You have been given poison from the spider bite!");
                player.addPotionEffect(new PotionEffect(PotionEffectType.POISON, 8, 1));
            }
      }
}
worthy yarrow
sullen dome
#

that's everything you would use

#

there's no need in passing a player into it, why would you do that

worthy yarrow
#

alright, and like I said I was just switching code around and that was what gave me no errors

sullen dome
#

it doesn't give any errors when not passing anything except the event

iron glade
#

Is what @sullen dome sent giving you errors?

sullen dome
#

i hate reading that name

#

might change my discord account ngl

iron glade
#

@sullen dome 😛

sullen dome
#

dont use that name for long time now

worthy yarrow
#

Not this time no,

#

installing and testing brb

iron glade
#

Damn the 3 people who were faster then me

#

only reason I have 4 "i"'s

#

xD

sullen dome
#

Rivex was taken

#

so yea, i'm not creative enough to put 4 other x's next to it

sullen dome
#

create a thread

iron glade
sullen dome
#

instead of bumping if no one knows an answer

sullen dome
#

and is more clear

iron glade
#

you're german

wind tulip
#

.getTag() returning null (NMS)

sullen dome
#

you're a stalker

kind hatch
#

I mean so does mine, but I'm also stuck with my name for the time being. :/

iron glade
iron glade
kind hatch
#

IIRC, you can get a name change for the forums which would carry over to the discord, if you were to donate.

hasty prawn
#

It's $10 donation for a name change iirc

sullen dome
#

i dont know if it would be handled as alt account when i leave with this and join with my other account

worthy yarrow
#

If I change my test server version from 1.8.8 to 1.18.2 would it conflict with the 1.8.8 world

sullen dome
hasty prawn
#

That's true KEKW

sullen dome
#

and staff apparently doesnt give a shit

#

sad

kind hatch
hasty prawn
#

How did you lose access?

worthy yarrow
#

Alright

sullen dome
#

by having 2fa enabled

#

and not having backup codes

kind hatch
#

cough imagine not saving your backup codes cough

iron glade
sullen dome
#

i did save those

hasty prawn
#

yikes lol

sullen dome
#

they just were on my pc instead of any cloud

#

and yea

#

staff doesn't even answer on any support emails, so apparently they either don't care or don't read it, idk

#

i wonder actually what'd happen when i leave this discord, and re-join. would i still be verified? probably

kind hatch
#

Probably not

#

Just due to how discord roles work

sullen dome
#

well let's see

kind hatch
#

If you leave, you lose every role.

iron glade
sullen dome
#

can someone send me an invite per dm?

#

to rejoinm

#

nvm i can copy a link myself lmfao

kind hatch
#

Unless the bot has auto restore functionality, be prepared to lose the verification.

iron glade
sullen dome
#

well

#

that answers it

kind hatch
#

Wait

sullen dome
#

apparently it doesnt work

#

wtf is

kind hatch
#

Discord is acting very weird for me.

sullen dome
#

wait

worthy yarrow
#

org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/nuclearkat/custommobeffects/CustomMobEffects has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 52.0

kind hatch
#

You are becoming verified and then unverified.

sullen dome
#

what tf is this bs

worthy yarrow
#

getting this awful error in console

sullen dome
#

what happened now

#

now my name reset to my old spigot name

kind hatch
worthy yarrow
#

against meaning?

kind hatch
#

with. Compile your code with an older version of java

sullen dome
#

but when i join, it verifies me again?

kind hatch
#

Idk, you are verified right now, so maybe the bot does have the ability to restore verified account status.

worthy yarrow
#

Where would I do this in intellij

sullen dome
#

what is the bot command prefix

kind hatch
#

? <- prefix

sullen dome
#

?unverify

#

?verify

#

weird

eternal oxide
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

sullen dome
#

!unverify

#

sad

#

would be nice

kind hatch
# worthy yarrow Where would I do this in intellij

Depends on how your project is setup. If you are using maven, you'd want to set the following properties in your pom.

<properties>
  <maven.compiler.source>8</maven.compiler.source>
  <maven.compiler.target>8</maven.compiler.target>
</properties>

If you are using gradle, set the values in the proper file. Otherwise, you just need to change the jdk version your project is using in the project settings.

iron glade
#
Squid s = (Squid) Bukkit.getWorld(target.getWorld().getName()).spawnEntity(spawnLoc, EntityType.SQUID);
                                                    s.setCustomName("I don't drop stuff");
                                                    s.setCustomNameVisible(false);```
#

???

worthy yarrow
#

now reinstall plugin?

kind hatch
sullen dome
#

i'll just leave with this, and join with my other account lol, just need to wait 10 minutes to be able to send messages

worthy yarrow
#

I changed the maven properties, test server is in 1.18.2, and I was already compiling with 1.18.2

kind hatch
#

Then make sure your server is running with Java 17 and not Java 16

kind hatch
# iron glade

It's cause you are looking directly at the entity up close.

#

Custom names will still show up if you are in close proximity and are looking directly at it. Otherwise the custom name would just be visible from a distance. Similar to player names.

iron glade
#

oh

#

I guess I'll still switch to the pdc method

#

what do I use as NamespacedKey tho?

quaint mantle
# iron glade

please tell me you did not just do Bukkit.getWorld(world.getName())

#
new String("lol");
humble tulip
quaint mantle
kind hatch
humble tulip
#

Bukkit.getPlayer(player.getUUID)

iron glade
#

IDK why I used

Bukkit.getWorld(target.getWorld().getName()).spawnEntity()```

instead of ```java
target.getWorld().spawnEntity()```
#

lmfao

#

it's almost 5am here so .. :DD

slate mortar
#

so, fixed ig

iron glade
#
s.getPersistentDataContainer().set(plugin, PersistentDataType.STRING, "Good boi");```
#

huh?

earnest forum
#

you dont pass in the plugin instance

#

pass in a namespaced key

#

its basically like the key in a hashmap

kind hatch
#

Use the plugin instance for the namespaced key

slate mortar
#

new NamespacedKey(plugin, "key")

earnest forum
#

^

iron glade
#

Ahhhh got it

#

Anyone knows why sometimes when I spawn a damaged anvil in the air it's not being removed after hitting the ground?

#

instead it gets placed

maiden vapor
#

Don't think it's guaranteed that it breaks

slate mortar
#

idk

#

i mean, you could remove all anvils that are not in the air every x seconds

iron glade
#

Could I use the pdc thing on it too?

maiden vapor
#

Try EntityChangeBlockEvent, maybe put some metadata on the FallingBlock anvil so that you know that anvil is from your plugin. Then when that event is ran cancel it and remove the entity?

slate mortar
#

i remember having the same problem in my old plugin with anvils

#

i have no idea how i fixed it tho

fallow violet
#

pov: its 5 am and you help others programming xdd

iron glade
fallow violet
#

I know xd

#

but its a hard life i guess

iron glade
#

I enjoy it pretty much tbh

#

None of my friends code

#

😦

fallow violet
slate mortar
#

imagine coding pff

fallow violet
#

xd

slate mortar
#

fuck me, without beeing verified you cant send screenshots?

#

everything has it's downsides ig

fallow violet
#

you know what to do :>

#

verifyyyy

slate mortar
#

god no

lethal python
#

guys i have a playerinteractentity event which creates an inventory and displays it for the player who clicked. I have also created an inventoryclickevent to detect clicks in that specific inventory. i want one of those clicks to affect the entity that the player clicked to show the inventory. how can i access that entity from the inventoryclickevent listener?

slate mortar
#

i just joined with my 2nd account and left with my other

#

hated that name

fallow violet
#

ve

#

ri

#

fy

slate mortar
#

actually

fallow violet
#

yes

slate mortar
#

i couldn't, even if i wanted to

fallow violet
#

what?

slate mortar
#

i cant access my spigot account for 2 years now

fallow violet
#

make a new one

slate mortar
#

god no

#

that's against the rules

fallow violet
#

imagine being not verified

slate mortar
#

imagine breaking the rules

fallow violet
#

imagine having no spigot acc for 2 years

slate mortar
#

imagine you can't speak english pff

fallow violet
#

imagine your mum

slate mortar
#

traaaaash

#

hehe

fallow violet
#

xd

slate mortar
#

just wanted to send a ss from my old plugin's project structure

#

which makes me angry af

maiden vapor
slate mortar
#

i just put all classes in one package lol

#

like 30 classes or smt

fallow violet
#

._.

#

NO

#

NO
HELL NO

slate mortar
#

it's so fricking ugly

fallow violet
#

PLEASE

#

GOD

#

JESUS AND HIS FRIENDS NO

slate mortar
#

"i hate having so many classes"
^ me, about 2 hours ago

fallow violet
#

can you please sort them? c :

slate mortar
#

it's old

fallow violet
#

can you please delete them? c :

slate mortar
#

i updated it the last time end of 2020

#

can't access my spigotmc account

#

you got the problem now? -_-

iron glade
#

Now I have like 20 packages and 10 manager classes lul

slate mortar
#

i remember also making EVERYTHING static

#

like

#

EVERYTHING

fallow violet
iron glade
#

hell

slate mortar
#

it makes me so angry when i see this

#

might redo the plugin

iron glade
#

Important thing is you know how to do this kind of stuff now

fallow violet
#

just press alt + f4

iron glade
#

and that you improved since then

slate mortar
#

but i got kinda burned out on it

#

also i don't play mc that often anymore

iron glade
#

Same

#

I'm redoing a plugin I started like 8 years ago and still support

slate mortar
#

oh my gui class

#

1600 lines

iron glade
#

But the code is so messy and fcked up

slate mortar
#

Lovely lovely 1600 lines

#

i wanna kill myself rn

fallow violet
#

for gui

iron glade
#

Once a main class had 9000 lines

fallow violet
iron glade
#

"who needs classes anyway"

slate mortar
#

some sneak preview

ItemStack randomEnt = new ItemStack(Material.SKELETON_SKULL);
      ItemMeta randomEntMeta = randomEnt.getItemMeta();
      randomEntMeta.setDisplayName("Entities");
      randomEntMeta.setLore(Arrays.asList(new String[] { "- Es werden mind. 4GB Server-Ram empfohlen!" }));
      randomEnt.setItemMeta(randomEntMeta);
      ItemStack timberItem = new ItemStack(Material.OAK_LOG);
      ItemMeta timberMeta = timberItem.getItemMeta();
      timberMeta.setDisplayName(");
      timberItem.setItemMeta(timberMeta);
      ItemStack chunkItem = new ItemStack(Material.CREEPER_HEAD);
      ItemMeta chunkMeta = chunkItem.getItemMeta();
      chunkMeta.setDisplayName(");
      chunkItem.setItemMeta(chunkMeta);
      ItemStack anvilItem = new ItemStack(Material.ANVIL);
      ItemMeta anvilMeta = anvilItem.getItemMeta();
      anvilMeta.setDisplayName(");
      anvilItem.setItemMeta(anvilMeta);
      ItemStack forceBiomeItem = new ItemStack(Material.GRASS_PATH);
      ItemMeta forceBiomeMeta = forceBiomeItem.getItemMeta();
      forceBiomeMeta.setDisplayName(");
      forceBiomeItem.setItemMeta(forceBiomeMeta);
#

good luck sleeping with this

fallow violet
#

✨ Skript Plugin ✨

iron glade
#

xDDDD

#

I DID THAT TOO

slate mortar
#

oh the decompiler fucked it up

iron glade
#

Now I have a method that creates new ItemStack with a one liner

fallow violet
iron glade
#

jesus back in the day it was such a pain in the ass writing out all that shit over and over

slate mortar
iron glade
#

ItemStack.. ItemMeta.. lore etc

slate mortar
#

(i don't recommend it)

#

alltho i have to say

#

it was literally my first plugin i've ever made

fallow violet
slate mortar
#

😦

#

oh no

#

how do i disable auto emoji

#

:/

#

:(

#

done

fallow violet
#

nice

#

:>

#

i dont know why its automatically enabled

iron glade
slate mortar
#

kinda dumb

slate mortar
iron glade
slate mortar
#

lol

fallow violet
#

but the chatcolors are so ew

#

no

slate mortar
#

that's preference lol

#

also i guess it looks a bit different bc of the rp

fallow violet
#

just no

iron glade
#

Which colors you use most of the time?

slate mortar
#

well rn

#

mostly yellow, green and red

fallow violet
iron glade
#

For me it's &5, &6, &7, &c, &e

slate mortar
#

god you really downloaded it

fallow violet
slate mortar
#

good luck sleeping next night

#

ah nvm

iron glade
slate mortar
#

saved

iron glade
#

New challenge: Stand on Lava for 1 minute

slate mortar
#

i mean

#

it's possible

fallow violet
#

it would look better with

&7[&bForceBlock&7] Anweisung: Stehe auf dem Block &b&lCACTUS &7in &b04:38

slate mortar
#

ew

#

bold

#

get lost

fallow violet
#

you are just weird

slate mortar
#

i know

#

that's what makes me special ig

iron glade
#

I use &f&l| very often as separator

fallow violet
#

do you have a screenshot?

slate mortar
#

i always use §7|

#

or 8

#

depends

tender shard
#

don't you people use configurable messages?

muted sand
#

How do I draw something on a map? (render a dirt block on a map or something)?
It seems tedious to loop through everything with the correct pixel

slate mortar
fallow violet
slate mortar
#

like i said

fallow violet
#

not you

slate mortar
#

:(

iron glade
willow widget
slate mortar
#

not possible

willow widget
tender shard
slate mortar
#

idk if you can remove them from the commands list at runtime

#

or if you can access that at all

willow widget
#

Not on runtime, just on enable

#

I'm good enough with it not being registered

slate mortar
#

wtf

#

you ask how to disable a command on enable?

iron glade
slate mortar
#

just don't register it ig? lol

willow widget
willow widget
#

Either that or a way to register it without having it in my plugin.yml

slate mortar
#

well

#

idk if you can use a tabcompleter for normal commands

tender shard
slate mortar
#

or only for arguments

tender shard
#

you can even use it with normal chat color codes:

fallow violet
tender shard
#

&x&f&f&0&0&0&0

eternal oxide
iron glade
willow widget
slate mortar
#

lol

willow widget
#

oh okay its a java thingy will have to look into that ty

slate mortar
#

reflections are used in many video games 🥲

tender shard
#

here's how you can get the command map

fallow violet
#

Why does it smell like chicken soup in here?

slate mortar
#

maybe someone eats chicken soup?

fallow violet
#

its 5:30 AM god no

slate mortar
#

i ate a pizza at 2:30am

#

nothing special

fallow violet
#

pizza is normal

tender shard
#

I tried to sleep but couldn't

fallow violet
#

but not soup

slate mortar
#

why not

#

soup is nice

fallow violet
#

he saw your plugin

tender shard
#

yeah soup is awesome

slate mortar
fallow violet
#

xd

slate mortar
#

if they won't listen, not my fault

fallow violet
#

well

#

he saw it before your warning

slate mortar
#

pff

#

not my fault

fallow violet
#

xd

slate mortar
#

i said it's no longer supported

#

in the description

fallow violet
#

the other plugin

#

is supported

slate mortar
#

it's not updated in a year

#

"supported" not really

fallow violet
#

there is no text called "not supported"

#

you are not good in this

slate mortar
#

there's no law saying "don't kill policemen"

#

so i am allowed to?

fallow violet
#

yes

#

i do this

slate mortar
#

niice

fallow violet
#

but there is a law kill no poeple

#

so

slate mortar
#

there's also a brain

fallow violet
#

not in you

slate mortar
#

:(

#

i think i may pay for nitro again next month

fallow violet
#

you started the brain thingy

#

do it for the pink name :>

slate mortar
#

then it doesn't matter if i'm verified or not

fallow violet
#

smart

slate mortar
#

yea obv

fallow violet
#

you have a brain

slate mortar
#

TOLD YA

fallow violet
#

a small one but you have one

slate mortar
#

EXACTLY

fallow violet
#

xdd

tender shard
fallow violet
#

nobody use this channel

slate mortar
#

^

#

that channel is more dead than my whole dc server

tender shard
#

sometimes we use it to talk bad stuff about @quaint mantle

fallow violet
slate mortar
#

who? lol

tender shard
#

mostly only me

slate mortar
#

this is general

#

as you see here

fallow violet
#

oh

#

xd

#

im sorry

slate mortar
#

smol brain

#

tzz

fallow violet
#

i have bick brain >:C

slate mortar
#

oh yea

#

hope my paypal accepts this time tho

fallow violet
#

you can give me the mony too

slate mortar
#

paypal is so dumb

slate mortar
fallow violet
#

so not? xd

slate mortar
#

you got it

fallow violet
#

:>

slate mortar
#

idk what to play, i'm bored

#

oh also btw, why tf am i not able to run ANY jar file by double clicking?

#

it always says "mainclass not found"

#

but when ran with commandline it works fine

fallow violet
#

play valorant

tender shard
slate mortar
#

jdgui

#

my own ones

tender shard
#

oh ok

slate mortar
#

those manifests exist

fallow violet
#

just use a .cmd to start it

#

oh wait

#

im lost

tender shard
#

then your windows file association is fucked up or sth

fallow violet
#

your pc is trash today

slate mortar
#

i reinstalled java like 5 times

#

so dumb

fallow violet
#

i installed java one time

slate mortar
#

using java -jar whatever.jar works fine

#

what exe am i actually supposed to open those jar files with?

fallow violet
#

lib/java.exe

slate mortar
#

i tried java.exe, javaw.exe

#

all same result

fallow violet
#

javaw is without console, isnt it?

slate mortar
#

no idea

fallow violet
#

like .pyw is without console for python

tender shard
#

i'll try to sleep again, cya later everyone. uwu 69 70 71 :3

fallow violet
#

what now?

iron glade
#

team sleepless still here

slate mortar
#

i need a nice game

#

nice singleplayer game

#

that is fun

fallow violet
#

mmmh

iron glade
#

get some tomb raiders

slate mortar
#

gta is boring

#

mc is boring

fallow violet
#

valo....

slate mortar
#

genshin has no update yet

fallow violet
#

VALOOO

slate mortar
#

valorant isnt an offline game lmfao

fallow violet
#

who cares?

slate mortar
#

me?

iron glade
#

get phasmopbia and we all play it and scare our asses off

slate mortar
#

i'm bad at fps shooters

fallow violet
#

play Luigi's Mansion 2 :>

slate mortar
#

i suck at cod already

fallow violet
slate mortar
#

they call me "Scheibenwischer"

#

dont know why

fallow violet
#

haha

#

because your aim is bad

slate mortar
#

nahhhh

#

my aim is more like "Waschanlage"

#

i really need to learn to play cod with controllers

fallow violet
#

just play

slate mortar
#

aim-assist is so broken

fallow violet
#

without controller

slate mortar
#

i do

fallow violet
slate mortar
#

thats why i suck lol

slate mortar
fallow violet
#

but

#

aimbot

slate mortar
#

which requires everytime creating a new phone number

iron glade
slate mortar
fallow violet
iron glade
#

fps with controller hellll nawww

fallow violet
#

^

slate mortar
#

your crosshair literally moves by itself lol

fallow violet
#

just have skill

iron glade
#

ikr but I'm still way better with keyboard and mouse without aim assist

slate mortar
#

it's so dumb

#

they really need to update their aim-assist imo

iron glade
#

last CoD I played was black ops 3

slate mortar
#

omg

iron glade
#

since then only warzone lol

slate mortar
#

bo3 such a good game

iron glade
#

ikr

slate mortar
#

change my mind

#

alltho now it's so broken

iron glade
#

bo3 was like primetime or smth of cod

slate mortar
#

unpopular opinion: mw (2019) best cod base-game

#

like the engine and shit

iron glade
#

idk about that

#

im not a yearly buyer

slate mortar
#

the movement, gunfeeling and shit is so fucking godlike

#

only thing that breaks the game is sbmm and the horrible maps

fallow violet
#

imagine being bad at fps and have so much cod games xd

iron glade
#

xD

slate mortar
iron glade
#

damn

fallow violet
#

._.

slate mortar
#

i regret buying vanguard tho

#

such a bad game

iron glade
#

hahahah

#

2 friends said the exact same thing

#

good thing I didn't buy it

slate mortar
#

well it can be cool

#

but it's still so broken

#

and dev's dont care

eternal oxide
#

The last Blizzard game I bought was Diablo 2

slate mortar
#

sbmm in vanguard is literally worst sbmm ever existed

iron glade
#

Recently I installed infinite warfare and (not) to my surprise there wasn't a single lobby xd

slate mortar
#

cold war was cool... but idk...

iron glade
#

bo3 still has some lobbies at least

slate mortar
#

yea

#

but those lobbies are full of sniper campers and quickscopers

iron glade
#

I only see prestige 1000 people tho xD

slate mortar
#

thats bo3 today

#

i actually thought about getting bo4

#

dunno if its worth it

lethal python
#

how do you delete an entity

eternal oxide
#

.remove

lethal python
#

does that work

#

i saw someone say it doesn't

slate mortar
#

afaik it does

lethal python
#

ok

eternal oxide
#

if you have the Entity reference remove will work

fallow violet
#

Calling an entity "Problems" can you make remove them?

lethal python
#

what

eternal oxide
#

In English?

fallow violet
#

guys english is not my first language

#

If you call an entity "Problems" you can remove them?

slate mortar
#

uhhh

#

is that a bad joke?

eternal oxide
#

um, not sure I understand the question

fallow violet
#

really bad

slate mortar
#

aight

eternal oxide
#

ah ok

earnest forum
#

ahh

slate mortar
#

kinda agree tho

earnest forum
#

i still dont get it

fallow violet
#

lurker

slate mortar
#

lol

#

it was just bad

fallow violet
#

Calling entity "problems"
Entity.remove();

#

just bad

#

yes

#

now its even worse because nobody gets it xd

slate mortar
#

and you called ME no brain

#

pff

#

i see

fallow violet
#

no its so smart nobody understand it

slate mortar
#

imagine

fallow violet
#

imagine

slate mortar
#

buy me nitro and you'll be smart

fallow violet
#

i have no money

slate mortar
#

(not fake)

#

imagine

fallow violet
#

imagine having money for nitro

slate mortar
#

boost costs only 5€ lol

#

may buy one next month

#

who knows

fallow violet
#

boost is wasted

iron glade
#

sell more plugins xd

slate mortar
#

dont call it wasted

#

get lost

fallow violet
#

just buy nitro and have more

fallow violet
slate mortar
#

5€ more

#

for stuff i dont use

#

nitro kinda useless

fallow violet
#

nitro is nice

iron glade
slate mortar
#

if you use the features

fallow violet
#

same

slate mortar
#

which i don't

fallow violet
#

i just want my 6969 tag

slate mortar
#

i had 0666