#help-development

1 messages · Page 1582 of 1

covert bluff
#
Could not transfer artifact org.spigotmc:spigot-api:pom:1.17.1-R0.1-SNAPSHOT from/to spigotmc-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/): Transfer failed for https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.17.1-R0.1-SNAPSHOT/spigot-api-1.17.1-R0.1-SNAPSHOT.pom

#

what is this!!

sharp bough
#

wat

#

what are you tring to do

dense pulsar
#

I'm changing arrows to 1 DMG by using the EntityDamageByEntityEvent

covert bluff
dense pulsar
#

but when a player dies by an arrow the player who kille doesnt get credit

sharp bough
#

maybe that works?

dense pulsar
#
/**
     * Set arrows shot from player in a mini game only do 1dmg
     */
    @EventHandler(priority = EventPriority.HIGHEST)
    public void onArrowHit(EntityDamageByEntityEvent event) {

        if (!(event.getEntity() instanceof Player)
                || !(event.getCause().equals(EntityDamageEvent.DamageCause.PROJECTILE))
                || !(event.getDamager().getType().equals(EntityType.ARROW)))
            return;

        Player player = (Player) event.getEntity();
        if (!PartyManager.inAMiniGame(player)) return;

        event.setCancelled(true);
        player.damage(1);

        new BukkitRunnable() {
            @Override
            public void run() {
                player.setFireTicks(60);
            }
        }.runTaskLater(plugin, 1);
    }
sharp bough
#

im not experienced with maven

sharp bough
#

instead of the player.damage

dense pulsar
#

bruh

#

you can do that?

#

I dont even need to cancel the event then right

#

it can just be ```java
/**
* Set arrows shot from player in a mini game only do 1dmg
*/
@EventHandler(priority = EventPriority.HIGHEST)
public void onArrowHit(EntityDamageByEntityEvent event) {

    if (!(event.getEntity() instanceof Player)
            || !(event.getCause().equals(EntityDamageEvent.DamageCause.PROJECTILE))
            || !(event.getDamager().getType().equals(EntityType.ARROW)))
        return;

    Player player = (Player) event.getEntity();
    if (!PartyManager.inAMiniGame(player)) return;

    event.setDamage(1);
}
analog inlet
#

World#getTime World#getFullTime World#getGameTIme

#

whats the diffirent?

#

Is this day time?

sharp bough
dense pulsar
#

I mean i used google to arrive at my other solution so perhaps the magic is just more present for you

sharp bough
analog inlet
#

thanks

sharp bough
dense pulsar
#

I tried to modify the damage of the item but that would not work

#

this works just fine

analog inlet
#

getTime is strange

#

1000 is 9:00

sharp bough
# analog inlet 1000 is 9:00

i think thats the "normal" way of having time in a 24 hours cycle, meanwhile the other times are in either long or int

#

and are way bigger

analog inlet
sharp bough
#

no idea

analog inlet
#

strange number of 1 minute

quaint mantle
#

how do i get the name of the player for who triggered an event

twilit vector
#

event.getPlayer()

#

i guess

quaint mantle
#

yea

#

but

#

not work

twilit vector
#

then i dont know

sharp bough
#

getPlayer.getName

twilit vector
#

yea right

sharp bough
#

or getDisplayName

quaint mantle
#

i send my code

#

u might cringe

#

but dont lol

sharp bough
#

k

quaint mantle
#

its me first plugin

sharp bough
#

?paste

undone axleBOT
sharp bough
quaint mantle
#
package bunk.dev;

import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import litebans.api.*;

public final class BanSmite extends JavaPlugin {

    @Override
    public void onEnable() {
        // Plugin startup logic

    }

    public void registerEvents() {
        Events.get().register(new Events.Listener() {
            @Override
            public void entryAdded(Entry entry) {
                if (entry.getType().equals("ban")) {
                    Player player = event.getPlayer();
                    ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
                    String command = "/command";
                    Bukkit.dispatchCommand(console, command);
                    /* ... */
                }
            }
        });
    }

}

sharp bough
#

OMG

#

na

#

just joking

quaint mantle
#

lol

#

i have only got to main class

#

its litebans api

twilit vector
#

Can someone tell me the terms used while making a vehicles plugin so that i can google it.
When i google spigot cars plugin tutorial i get tutorials on setting up cars plugin.

quaint mantle
#

i make so player get smite when ban

quaint mantle
sharp bough
quaint mantle
#

in on enable

sharp bough
#

this will create a new instance of the class you are using

#

yes in the onEnable

quaint mantle
#

Cannot resolve symbol 'getServer'

sharp bough
#

wat

quaint mantle
#

idk

sharp bough
#

are you sure you did the setup correctly?

quaint mantle
#

the @fresh templethandler

#

no work

twilit vector
#

import stuff

quaint mantle
#

i did

sharp bough
#
#

watch his videos

#

they are really good

quaint mantle
#

it says annotations arent allowed here

sharp bough
#

current code

quaint mantle
#
package bunk.dev;

import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.plugin.java.JavaPlugin;
import litebans.api.*;

public final class BanSmite extends JavaPlugin {

    @Override
    public void onEnable() {
        @EventHandler
        getServer.getPluginManager.registerEvents(new BanSmite(), this))

    }

    public void registerEvents() {
        Events.get().register(new Events.Listener() {
            @Override
            public void entryAdded(Entry entry) {
                if (entry.getType().equals("ban")) {
                    Player player = event.getPlayer();
                    ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
                    Bukkit.dispatchCommand(console, "smite");
                    /* ... */
                }
            }
        });
    }

}

sharp bough
#

oh

#

remove that even handler

#

you dont need it there

#

and remove the registerEvents()

#

create a new class

#

name it whatever you want

quaint mantle
#

then i get this Cannot resolve symbol 'getServer'

#

huh

#

i make new class file?

sharp bough
#

and replace the BanSmite() with your class name

sharp bough
quaint mantle
#

liekt hsi?

#

everything go red

sharp bough
#

remove the registerEvents()

#

the public vod

quaint mantle
#

the whole thign?

sharp bough
#

yea

#

that code is not correct

#

thats not how you register events

quaint mantle
#

i copy it off litebans

#

doc

sharp bough
#

na

#

trashcode

twilit vector
#

copy paste never works

sharp bough
#

now, why do you get an error in getServer

#

thats weird

sharp bough
quaint mantle
#

all i wanted to kniow

#

was how to

#

get the

sharp bough
#

never copy paste code you dont understand

quaint mantle
#

players name

#

for who triggered

#

the event

twilit vector
#

yea for that you need to register the event first

#

else it wont be called

sharp bough
#

yea nothing in java is quite that simple, you need to register the event, create the class, implement Listener, add @EventHandler, get the event, get the player in the event, and then get the name of the player

twilit vector
#

lol

quaint mantle
#

im confused

#

when i add @fresh templethandler

sharp bough
#

watch the playlist i sent

twilit vector
#

ohhh

#

loll

quaint mantle
#

it fixes the getServer error

twilit vector
#

waittt

sharp bough
#

i cant explain it like this

twilit vector
#

i knowwe

#

i know

#

i know

quaint mantle
#

but u cant put in on eabele

twilit vector
#

it is

#

getServer()

#

brackets

sharp bough
#

ah

#

yea hes right

quaint mantle
#

ok now

#

GetPluginManager

twilit vector
quaint mantle
#

thingy

#

red

#

i put bracket on it

#

it work

twilit vector
#

nice

sharp bough
#

ok now create a new class,

#

and next to the name

quaint mantle
#

?

sharp bough
#

add implement Listener

quaint mantle
#
package bunk.dev;

import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import litebans.api.*;

public final class BanSmite extends JavaPlugin {

    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(new LiteBansEvent(), this))

    }

    public void registerEvents() {
        Events.get().register(new Events.Listener() {
            @Override
            public void entryAdded(Entry entry) {
                if (entry.getType().equals("ban")) {
                    Player player = event.getPlayer();
                    ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
                    Bukkit.dispatchCommand(console, "smite");
                    /* ... */
                }
            }
        });
    }

}
sharp bough
#

in your class

quaint mantle
#

this is my main class

sharp bough
#

remove the registerEvents()

quaint mantle
#

the whole thing?

sharp bough
#

yea

#

read this

#

its gonna explain it better

quaint mantle
#

no it wont

#

i cant read shit like that

twilit vector
#

youtube then

sharp bough
quaint mantle
#

this easier for me

twilit vector
quaint mantle
#

i added implement Listener

#

and it has

#

red

twilit vector
#

implements

quaint mantle
#

oki donkey

#

thaty fixed

twilit vector
#

nice

quaint mantle
#

what do i put in the event class?

twilit vector
quaint mantle
#

the extra class

#

i made

twilit vector
#

idk

#

ask Lucas

quaint mantle
#

@sharp bough

#

i got the thign done

#
package bunk.dev;

import litebans.api.*;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;

public class LiteBansEvent implements Listener {

    public void registerEvents() {
        Events.get().register(new Events.Listener() {
            @Override
            public void entryAdded(Entry entry) {
                if (entry.getType().equals("ban")) {
                    Player player = event.getPlayer();
                    ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
                    Bukkit.dispatchCommand(console, "smite");
                    /* ... */
                }
            }
        });
    }



}

#

this my code

#

but

#

the

sage swift
#

no

sharp bough
#

oh hell na

quaint mantle
#

Player player = event.bklagha

#

no work

sharp bough
#

you need to start reading docs

#

im gonna help you this time

sage swift
#

stop sending 40 messages at a time, read the goddamn documentation you were sent, and figure it the fuck out

sharp bough
#

but coding like this

#

is like trying to walk

#

without legs

#

you wont get anywhere

quaint mantle
#

u said u wouldnt make fun of me

twilit vector
#

great analogy lol

sage swift
#

the first part applies to you too lucas

twilit vector
#

happens to me as well

sharp bough
twilit vector
#

we have to live with it until we become a pro at this

sharp bough
#

the same question over and over is not a way to learn

#

you learn by reading the docs i sent, the yt link i sent

quaint mantle
sharp bough
#

?learnjava

undone axleBOT
sharp bough
#

and those links

sharp bough
#

gl!

quaint mantle
#

bruh

#

i had it like done

#

then u made me change half of it

sharp bough
#

dont bruh me

sharp bough
#

i sent you like 8 links

#

for you to learn

#

i wont make your plugin

quaint mantle
#

i asked

#

OMG

#

i already

#

had

#

it

#

done

#

then u made me edit it all

sage swift
#

clearly it wasnt done since it didnt work lol

twilit vector
#

dont put everything in different messages i cant tolerate the pings

quaint mantle
#

i want know how to get player for who triggered event

twilit vector
#

so like what do you call the movement of car

#

and modeling the car

#

what should i google

sharp bough
#

of no sorry i have no idea how to make a plugin car

#

give me a sec i google it

twilit vector
#

i googled it

#

it gives me tutorials on how to setup a plugin

#

setup a car plugin in a server

#

the only tutorial i found was 7 years ago ._.

sharp bough
#

thats an open source cars plugin

quaint mantle
sharp bough
#

but it uses a bunch of custom things

sharp bough
twilit vector
quaint mantle
twilit vector
#

yes

#

copy pasting works many times but you don't learn anything

quaint mantle
#

and you're not doing anything yourself

twilit vector
#

yea

sharp bough
#

he can check that code out

#

see if he understands the logic of it

#

and recreate it himself

twilit vector
#

nah reading docs is better than reading codes

quaint mantle
twilit vector
#

so i want to know what should i read in the doc

quaint mantle
#

thats what im trying to say

#

just throwing around ideas, but i would probably start with armor stands

#

they seem like something you could use for vehicles

sharp bough
twilit vector
#

is there a page about that in the wiki?

quaint mantle
twilit vector
#

okay

#

thank you!

#

and what about the modeling

#

in resource pack

quaint mantle
#
GitHub

A spigot plugin which allows in-game creation of custom models - NichtStudioCode/MiniatureBlocks

twilit vector
#

Okay

#

Thank you!

#

also one more thing

#

what is the command for changing lava at certain cords to air

#

is it setBlock or something?

quaint mantle
twilit vector
#

okay

#

idt its setblock

#

not working

quaint mantle
#

are you setting it to air?

twilit vector
#

yes

#

but the setblock method is not showing in the tab list

#

idk what that list is called

#

the sugestions

quaint mantle
#

oh you mean actual commands, i have no idea

#

Heya, anyone know why opening a book (right click to read Material.WRITTEN_BOOK) calls PlayerInteractEvent and says the action is Action.LEFT_CLICK_AIR instead pf Action.RIGHT_CLICK_AIR?

Basically, my event listens for PlayerInteractEvent, if the item is a paper or a written book, in their main hand, clicking air, then it takes the custom display name and then parses the lore off of the item they're holding in order to grab coordinates of a location that's imprinted in the lore. Then port the player to said location. However the hang up right now is that when a player right clicks the Written book, it both opens the book to read it AND calls my PlayerInteractEvent, even though i've specified that if it's a written book it should only trigger on left click

https://pastebin.com/sWq4kHNE (Spigot API 1.16.5)

twilit vector
quaint mantle
#

yay

#

i

#

got

#

it

#

to work

twilit vector
#

nice

quaint mantle
#

litebans had a method in their api already

#

but not for player name

#

only for uuid

#

i think i'm sure that i think i found a bug since running the method a tick later still doesn't seem to work

#

but i'm not 100% sure it is or where i could report it (i'm like 98% sure)

undone axleBOT
tame fern
#

Is a Custom Chunk Generator compatible with amplified worlds? I can't seem to get the world to let me past the 255 build limit with custom terrain.

sharp bough
quaint mantle
digital plinth
#

is there any benefit for using maven and gradle?

#

they are more confusion than plain java

manic helm
#

You can add packages

digital plinth
#

plain java also can use api

manic helm
#

Maven and grade is a great tool if used correctly

digital plinth
#

they r really confusing

digital plinth
#

plugins cant do that

#

use mods

#

sad

hybrid spoke
manic helm
#

You can have shaded versions of a plugin in your plugin by using maven and grade

digital plinth
#

i added MV api with maven

#

and uh

#

i still need the MV jars in the plugin folde

#

r

manic helm
#

Yes because it's a plugin you need to have loaded.

digital plinth
#

gradle not maven

digital plinth
#

if i need the jar even when i have maven then whats the use of maven

manic helm
#

That's for Minecraft plugins..

#

Also Maven / gradle automatically downloads the plugins when you transfer the code to GitHub and copy the code from GitHub

hybrid spoke
#

coding together is also easier since y'all don't have to need the same version of every jar using

#

maven does that for you

digital plinth
#

no friend who know coding to be more precise

digital plinth
#

how?

#

what is github anyways, isn't it just a file uploading and storage platform?

manic helm
#

Oh dear

digital plinth
#

its not?

fathom timber
#

Can I get a tutorial for basics of Spigot? Its documented like Oxide... Oxide doesn't have documentation.

digital plinth
fathom timber
#

That's a hard one

digital plinth
#

true true

manic helm
digital plinth
#

you should be familiar with docs

fathom timber
digital plinth
fathom timber
#

No, the game Rust uses Unity.

digital plinth
#

ahh unity

#

the buggy game engine

#

lol i think its actually me thats buggy

fathom timber
#

Sadly you can't use C# 9.0 methods. So it sucks because you're using 6.0

digital plinth
#

ooo dunno what 9.0 is

manic helm
hybrid spoke
#

?jd

manic helm
#

As long as you keep the code updated tho

#

Then a very good insurance

digital plinth
manic helm
#

If you set them in pom.xml

digital plinth
manic helm
#

Also in pom.xml you can change the version of X plugin with just typing the version

hybrid spoke
#

keep coding, stop argumenting. you will see what an automatic build tool can summon from hell once you understood it.

manic helm
#

^ try it and you will see it's the best thing ever.

hybrid spoke
digital plinth
quaint mantle
maiden thicket
#

hey @quick turtle how do you send a msg to a player?

sage swift
#

your best bet is to set a global ignore variable to true right before opening, back to false right after
then ignore all interact events when the variable is true

quaint mantle
#

unless is there a specific event for books being read? (not edited, since this is just a written book)

sage swift
#

oh, youre not opening it programmatically

quaint mantle
#

nahh, just default minecraft behavior in game, right clicking to open it appears to call Action.LEFT_CLICK_AIR, rather than anything relating to right click

sage swift
#

hmmm

quaint mantle
#

ohhh wait

#

i think i might have found a way one sec testing

#
            // If display name contains "&4Court Case Document"
            //   and the Action is left clicking the air only
            } else if(name.contains(ChatColor.DARK_RED + "Court Case Document") &&
                    event.useItemInHand().equals(Event.Result.ALLOW)){
                event.getPlayer().sendMessage(event.getAction().name()); // DEBUG
                teleportCourtCase(event, main);
            }
#

event.useItemInHand() controls that vanilla behavior

sage swift
#

use == for enums

quaint mantle
#

forgot about that, for the usItemInHand
and yeahh will swap it^^ thanks for the help still

exotic scroll
#
            HashMap<UUID, Boolean> witch = Witch.getWitch();
            Player defender = (Player) entity.getEntity();
            if (entity.getDamager().getType() == EntityType.PLAYER && defender.isBlocking() && Witch.getWitch().get(entity) == true) {
                return Boolean.TRUE;
            }
        }```
#

Missing return statement

#

on the last }

#

for some reason

#

please someone explain

#

okay

#

You have to add a else statment

sage swift
#

why are you using Boolean

#

Witch.getWitch().get(entity) == true is something else

quaint mantle
#

guys can anyone help me?

#

i have a few problems

granite stirrup
#

?ask

undone axleBOT
#

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

quaint mantle
#

in the onGrapple method, i want to add a boolean isGrappling, and use it as reference to activate no fall damage in onFallDamage() method

#

how do i do dat?

granite stirrup
#

¯\_(ツ)_/¯

#

Idk what you just said

#

But idk

#

Lol

exotic scroll
#

I will assume everything

quaint mantle
#

for some reason, if i add entitydamageevent in the on grapple method, it breaks the plugin

exotic scroll
#

if (condition && condition && condition) {
}

quaint mantle
#

and neither will the grappling work

quaint mantle
exotic scroll
#

use it

quaint mantle
#

how

#

u see

#

when the the reel in event is taking place

exotic scroll
#

bc ongrapple in a event listener

#

so you can't

#

put more

#

no

quaint mantle
#

ok, so how do i get a reference then?

granite stirrup
#

Make a hashmap

#

Containing Boolean for each player's uuid

#

Just set it in the reel event

quaint mantle
#

idk much abt hash maps :(

#

i know what they do

#

but...

#

i have no idea how to do what u just said

granite stirrup
#

HashMap<UUID,Boolean> grapleHook = new HashSet<>(); pretty sure

quaint mantle
#

okey

granite stirrup
#

You set the values of the hashmap in the reel event

sage swift
#

tell me this

granite stirrup
#

It's kinda like a arraylist

sage swift
#

why do you need a boolean for each one if you can just have a set of players that essentially accomplishes the same thing

#

you would need a uuid/boolean map if you needed 3 states (not in map, false, and true), but you only need 2 here

granite stirrup
#

Cuz Boolean is the shortest value?

sage swift
#

if you can just have a set of players

quaint mantle
#

no the thing is, if the player is grappling, then i want to check it but in another event method

#

so that will be a boolean

#

so i can check like if (isGrappling) {

#

<code>

#

}

sage swift
#
    @EventHandler
    public void onDamage(EntityDamageEvent evt) {
        Entity entity = evt.getEntity();
        if (evt.getCause() == DamageCause.FALL && entity instanceof Player) {
            Player player = (Player)entity;
            UUID playerUUID = player.getUniqueId();
            if (lastGrapple.containsKey(playerUUID) && lastGrapple.get(playerUUID).longValue() + plugin.getConfig().getLong("enchants.grapple.fallProtection") > System.currentTimeMillis()) {
                evt.setCancelled(true);
            }
        }
    }```
#

old code, but applicable i think

#

add the player's uuid and System.currentTimeMillis to a map when they cast

#

then if sufficient time has passed it won't matter that it's in the map

#

the one thing you want to make sure is that you remove it from the map when the player quits

#

yeah that code is fuckin ugly

quaint mantle
#

what i was thinking is, if the player is grappling, i can set him to no fall damage if the damage is below 10 hearts, and if above 10 hearts, multiply by 0.5 and -9

quaint mantle
sage swift
#

?learnjava

undone axleBOT
silk mirage
#

first learn java

quaint mantle
granite beacon
#

for a game like tnt run would it make more sense to have the PlayerMoveEvent or a runTaskTimer looping thru the players every two ticks?

sage swift
#

move

#

check if they step on a new block

silk mirage
sage swift
#

profit

quaint mantle
#

i put it above all events class

silk mirage
#

...

quaint mantle
silk mirage
#

That is not how it works tho..

junior remnant
#

Hello, i have a lil problem with a disguise plugin i made for 1.8.8
Everything goes good, but the problem is that if I use an original nick from a disguised player on a command it functions normally, which i don´t want to happen because it can betray the disguised player, i don´t know if ia missed something while modifying the player's gameprofile or i have to send other specific packet, can someone help me with this please?

quaint mantle
#

how will it work then?

granite beacon
silk mirage
#

I think it has hasJoinedBefore or smth like that

junior remnant
#

it´s the same, with vanilla commands too

sage swift
#

probably not by much, but it's redundant to check the block if it's not a new one

granite beacon
#

Gotcha

#

Also, is nesting scheduleSyncDelayedTask inside scheduleSyncDelayedTask a bad practice?

granite beacon
silk mirage
#

i mean, it's not bad practice.. Don't follow the stupid practices

#

first know how it works

granite beacon
#

There's nothing wrong with that?

quaint mantle
#

can someone help me in dms?

junior remnant
#

what do you need?

silk mirage
#

A sync operation inside a sync operation may take more time because both are sync, but if a sync operation takes place inside a async operation, async operation will make the perofrmance better.

#

But I won't recommend using a sync scheduled thing, Because it just freezes the thread till its done

quaint mantle
silk mirage
#

It's just like saying I did while(true) and server froze.

sage swift
#

sushant what are you talking about

#

of course if you run stupid code stupid things will happen

silk mirage
#

yes that is what im saying

#

why would u even need 2 sync operations

sage swift
#

offline, it's fine to run a task within a task, but i would split it into separate methods so the code is readable

silk mirage
#

that is nested

junior remnant
sage swift
#

then you can call one method within another

granite beacon
sage swift
#

nope

#

sync is fine

silk mirage
#

But don't over use it

#

it will cause massive server lag

sage swift
#

no, it will not

granite beacon
#

confused

#

so do I use async or sync 😅

silk mirage
sage swift
#

so it runs the code on the main thread

silk mirage
sage swift
#

but unless you run retardedly laggy shit (which you probably shouldnt do at all, main thread or not), you'll be fine

silk mirage
#

sync operations block the main thread until they are done.

sage swift
#

scheduling a sync task for a second from now will not freeze the server for a second

granite beacon
#

why is async depreciated?

sage swift
#

it isn't

silk mirage
sage swift
#

a whole set of methods is deprecated

#

yeah, sushant, in my early days i got scared into thinking every single method i ran was gonna lag so i did everything async

#

it's really not something you should be doing until you start noticing lag from something

granite beacon
sage swift
#

that's what i mean

chrome beacon
silk mirage
sage swift
#

well yeah

#

obviously you do that asynchronously

#

he wants to summon and remove an entity

#
Bukkit.getScheduler().runTask(plugin, () -> {
  // code here
}, 1);``` @granite beacon this is not deprecated
sage swift
#

nope

#

but you don't need async.

granite beacon
#

does doing runTaskAsynchronously​ use it's own thread?

sage swift
#

i feel like you guys are fundamentally misunderstanding how these runnables work

chrome beacon
#

?scheduling

undone axleBOT
sage swift
#

it pushes the code inside to run at a later time, not freezing the existing server processes

granite beacon
vague mason
#

Hello

#

I'm using PrepareAnvilEvent event

#

and when I'm enchant enchanting book with another enchanting book I will get duplicated enchantments.

#
    @EventHandler(priority = EventPriority.HIGHEST)
    public void onAnvilChange(PrepareAnvilEvent event){
        ItemStack item = event.getInventory().getItem(0);
        ItemStack enchantingBook = event.getInventory().getItem(1);
        if(item == null || enchantingBook == null) return;
        if(enchantingBook.getType() != Material.ENCHANTED_BOOK) return;
        if(!(enchantingBook.getItemMeta() instanceof EnchantmentStorageMeta)) return;
        EnchantmentStorageMeta meta = (EnchantmentStorageMeta) enchantingBook.getItemMeta();
        ItemStack finalItem = event.getResult();
        if(finalItem == null) return;
        if(meta.isUnbreakable()){
            if(finalItem.getItemMeta() != null) finalItem.getItemMeta().setUnbreakable(true);
        }

        finalItem.addUnsafeEnchantments(meta.getStoredEnchants());

        event.setResult(finalItem);
    }
sage swift
hollow lodge
#

Hey, how do you start working with NMS in IntelliJ ?

limpid bronze
#

hmm okay ?

sage swift
#

I'd show you code that i have for it but it's the middle of the night

amber hill
#

?help

undone axleBOT
#
CafeBabe Help Menu
*Red V3*
**__Admin:__**

selfrole Add or remove a selfrole from yourself.

**__Cleanup:__**

cleanup Base command for deleting messages.

**__Core:__**

embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.

**__CustomCommands:__**

customcom Base command for Custom Commands management.

**__Downloader:__**

findcog Find which cog a command comes from.

**__Mod:__**

names Show previous names and nicknames of a member.

**__ModLog:__**

casesfor Display cases for the specified member.
listcases List cases for the specified member.
reason Specify a reason for a modlog case.

**__Permissions:__**

permissions Command permission management tools.

vague mason
#

Will come back in 10 minutes.

undone axleBOT
sage swift
#

?bt

limpid bronze
#

so how i can create an enchant ?

sage swift
#

@hollow lodge

#

run that, change the dependency to spigot instead of spigot-api

sage swift
limpid bronze
hollow lodge
exotic scroll
twilit vector
#

There is lava on loc but with this code the lava does not go instead the block under it disappears.

#

Can someone tell me why this is happening

hybrid spoke
twilit vector
#

it should not be

#

it is in the bucket event

hybrid spoke
#

this gets the block which is being clicked

twilit vector
#

ahh ok

hybrid spoke
#

__ - lava
[] - block being clicked to place lava
⬆️ location you are getting

twilit vector
#

got it

#

but i tried changing y to (y+1)

#

it didn't work

#

is there a command with which i can get the lava loc?

#

like getLavaLoc or something?

hybrid spoke
#

get the lava by using the #getBlockFace method

twilit vector
#

ohk

#

what does that give?

#

also is there something i can do instead of setType()

hybrid spoke
#

the blockface. with that you can get the block on the opposite site

twilit vector
hybrid spoke
#

so just cancel the event

twilit vector
#

ohh

hybrid spoke
#

if you don't want them to place the lava

twilit vector
#

rightt

#

why didn't i think of this

#

lol

#

Thank youuuu!

hybrid spoke
#

whoever asked the question about the saveResource method: did you read the javadocs?

twilit vector
#

If I do event.setCanceled(true); will this cancel the event forever?

hybrid spoke
#

it will cancel the event if its not getting overwritten

twilit vector
#

i just want it to cancel if certain condition is met

hybrid spoke
#

so set those conditions and if they pass cancel it

twilit vector
#

but after that will the event stay canceled?

hybrid spoke
#

yes

exotic scroll
#

can anyone explain how to bukkit scheduler, i have look in the java doc and I still doesn't understand

twilit vector
#

ill stick with setType then

undone axleBOT
exotic scroll
#

ty

hybrid spoke
exotic scroll
#

yes

hybrid spoke
#

the event is being called everytime someone places lava, water or whatever. if you cancel this in this situation called event it will be cancelled and emptying your bucket will not work. each like-that interaction has its OWN event being called, so it will just cancel the current action

#
  • as long as it meets your conditions
#

like: setting that if the clicked block is obsidian: cancel

player1 trying to set on obsidian -> cancel
player2 trying to set on dirt -> ok

#

|| @twilit vector ||

ivory sleet
#

Why do you use saveResource first and foremost

hybrid spoke
#

as i just asked you, did you read the javadocs? saveResource is for saving an internal file (which is inside your .jar)

#

you probably want to playerFile#mkDir

ivory sleet
#

It’s for copying a file from your plugin jar into whatever destination you want it to be.

hybrid spoke
#

or createFile or whatever it was

#

probably createFile

ivory sleet
#

createNewFile yeah

hybrid spoke
#

ah yez yez

quaint mantle
opal juniper
#

what code are you using to do this?

hybrid spoke
#

there is no api method to get the servers tps afaik (if they did not add it)

#

?paste

undone axleBOT
hybrid spoke
#

but it will also receive the smallest peaks

dire marsh
#

apparently paper has tps methods available. if you are making a private plugin that could be useful

twilit vector
#

sorry for the late reply i was not at home

quiet ice
#

that returns a double array

hybrid spoke
twilit vector
#

ohh

#

ohhhh

#

Thank youuuu!

hybrid spoke
#

no that was a joke

twilit vector
edgy goblet
#

their needs are too great for you to comprehend

twilit vector
hybrid spoke
#

so an e.setCancelled(true) is totally enough

twilit vector
#

yea

hybrid spoke
#

and just cancels this one interaction

twilit vector
#

Gotcha

#

so the 2nd time he tries to place a bucket and does not meets the condition then he will be able to place the bucket right?

hybrid spoke
#

yes

crude sleet
twilit vector
#

ah ok

#

Thank you once again

hybrid spoke
#

👍

hybrid spoke
crude sleet
#

What does that mean for me? So I don't understand.

torn shuttle
#

Hm something's not right here

    public <T extends Enum> T processEnum(String path, T pluginDefault) {
        if (!configHas(path))
            return pluginDefault;
        try {
            new DeveloperMessage("AAAAAAAAAAA "+ fileConfiguration.getString(path));
            return (T) Enum.valueOf(pluginDefault.getClass(), fileConfiguration.getString(path));
        } catch (Exception ex) {
            new WarningMessage("File " + filename + " has an incorrect entry for " + path);
        }
        return pluginDefault;
    }

that second return (casting to enum) errors and I am pretty sure it's due to the way I am getting the enum class, is there a better way?

#

the string itself is correct, I checked

#

oh my bad? plugindefault is null

#

I'm being dumb

#

fuck of course I forgot to set the defaults after I changed the constructors

chrome beacon
#

Ouch

#

That happens sometimes

torn shuttle
#

this has been a nightmare

#

I'm trying to do some real dumb shit

#

I was just going to tweak some things and it's already been 5 hours

summer scroll
#

I want to disable teleportation using the hotbar in spectator mode, but I want to teleport player with gamemode spectator too, how can I do that?

torn shuttle
#

YES finally

#

it worked

#

my new configuration system is alive

#

and it's a monster

hollow lodge
#

Any way to have like a server that I guess "auto updates / reloads" instead of having to stop the server, build the artifacts and then start the server?
I am pretty sure I have seen someone do something like that before, but I have no idea how they do / did it.

torn shuttle
#

?paste

undone axleBOT
torn shuttle
quaint mantle
#

no copyright javadoc PES_EvilRondo

quaint mantle
#

@ivory sleet teach me step by step how to do this module thing

#

i broke my project

hybrid spoke
#

xD

quaint mantle
#

Good morning, I'm developing a server and would like to know which would be the best for performance. Develop my own menu plugin with what I want using InventoryInteract for each menu, or use the ChestCommands plugin

hybrid spoke
quaint mantle
sour loom
#

how can i add pattern to a shield if i have something like :

ItemStack shield = new ItemStack(Material.SHIELD, 1);
quaint mantle
#

I wanted to know which one would be better for optimization.

hybrid spoke
quaint mantle
#

to know it's the right menu.

hybrid spoke
jade perch
#

That's not how your supposed to do that

hybrid spoke
#

thats a bad way to identify your inventory

quaint mantle
#

What's the best way?

hybrid spoke
#

*as long as its not a lobby where a player is much restricted

hybrid spoke
# quaint mantle What's the best way?

use a wrapper for the inventory just like InventoryHolder and create a new class for each inventory which implements InventoryHolder
on your check if its the inventory compare the holder with your custom holder

jade perch
#

Storing the viewers in a set

hybrid spoke
jade perch
#

Works for me

hybrid spoke
#

still better than checking the title but nah

quaint mantle
#

What is the best option? Make code like this, or use a gui plugin?

hybrid spoke
#

do your own thing. why do you want to rely on an already existing resource

#

its redundant since your plugin would fully depend on it

quaint mantle
#

sorry for my english

hybrid spoke
#

both are doing the same

#

every click on an inventory is firing an event anyways

#

you are just listening for that event

#

and doing your thing if its getting called

quaint mantle
#

Would you recommend doing a click event for each menu, or checking an instance of it using if else

#

👀

hybrid spoke
#

you could also have like 50+ guis but just one listener which calls the method from the guis what should happen on click

hybrid spoke
quaint mantle
#

oh, ok

ivory sleet
hybrid spoke
#

yeah for example. but instead of passing every value in, just set the event as the parameter from which you are getting those values

quaint mantle
jade perch
deft raft
#

Hey, I'm not sure why, but "Skyvival" prints in white bold and not how I wrote it. Does anyone know why it does this, and how to prevent it?

ivory sleet
#

That’s why I usually go with the holder way

hybrid spoke
ivory sleet
#

Presumably

jade perch
#

Could use a weakhashset if you want to be safe

ivory sleet
#

Yeah figured

#

Wonder if you could even go with a weakidentityhashset

hybrid spoke
jade perch
#

I don't even make my own inventory gui's anymore though

quaint mantle
jade perch
#

I just use a lib for it

ivory sleet
# hybrid spoke so you are doing something wrong

The wrong is that that a normal HashSet doesn’t clear its elements thus storing a view will be stored forever unless you explicitly remove it which gets kinda troublesome even if you were to do it on disconnect, so eventually I guess a Map Player, InventoryView could do the job also if we don’t want to go with a WeakHashSet.

jade perch
#

Anytime you are using the Player as a key you probably want to use a Weak implementation

ivory sleet
#

Yeah or clean up key based caches on that player object on disconnect

#

Well value based also perhaps

jade perch
#

best library I have found for inventories

#

I use it all the time

deft raft
ivory sleet
#

I have good hopes for interfaces

deft raft
#

not too sure what that means

ivory sleet
jade perch
#

Last time I used something from incendo (the command framework)

#

it was way over complicated

#

I hope this is different

ivory sleet
#

Yeah cloud is arguably over engineered if that’s the one you mean

#

Well bloated might be a more suitable term

jade perch
#

I might try it out for my next project to see if it is better than what i'm using now

ivory sleet
#

Oh yeah I might check the one you linked also

deft raft
#

@hybrid spoke When I changed it to this, it changed the colour

ivory sleet
#

I hate working primitively around what spigot provides

deft raft
#

but not bold

jade perch
#

You have to concat them

quaint mantle
#

InventoryClickEvent doesn't detect e.isShiftClick() and e.isRightClick()

#

Are there alternative?

hybrid spoke
#

e#getClick

quaint mantle
#

thx

#

i'll try

sour loom
#

does spigot plugins work on paper too?

quaint mantle
#

Paper is fork of Spigot.
Only paper plugins can't work on spigot.

hybrid spoke
quaint mantle
sour loom
#

understood thanks

#

how can i get my plugin for .runTaskLater()?

hybrid spoke
#

static instance in your main class and assign "this" to it in your onEnable

viral tinsel
#

Hello,
I am having trouble with Vault API. How can i get Economy interface in other class

hybrid spoke
#

use that created instance

viral tinsel
#

Can I DM you code?

hybrid spoke
#

you can also send it in here

#

?paste

undone axleBOT
viral tinsel
#
class OpenGUI(private val plugin: Plugin): CommandExecutor {
    override fun onCommand(sender: CommandSender, command: Command, label: String, args: Array<out String>): Boolean {
        val econ =plugin.getEcon()
        if (sender !is Player) {
            cSend(plugin, sender, "no_player")
            return false
        }
#

And I want to get economy in third line but IDE show it in red

sour loom
hybrid spoke
#

good old kotlin

hybrid spoke
sour loom
#

thankyou

hybrid spoke
sour loom
#

the delay of .runTaskLater() is on ticks or seconds?

eternal night
#

ticks

viral tinsel
ivory sleet
#

Which line

#

Also idk if you have to but don’t you need to declare that function open?

#

Also do you need the out there on the array?

viral tinsel
ivory sleet
#

and you have an open function called getEcon or a property?

#

Try just plugin.econ

viral tinsel
ivory sleet
#

Okay I see the problem

chrome beacon
ivory sleet
#

You need in your constructor to declare your main class type instead of Plugin

#

Yeah Olivo fast guy

#

Or just inject the Economy instance directly

vivid temple
#

so i found the canvas plugin for spigot gui's but i dont understand how to install it for intellij, anyone here can help?

viral tinsel
#

I am normally webdeveloper in python so I didnt noticed it. Thank you

sour loom
#
public class RolePlayCore extends JavaPlugin {

    @Override
    public void onEnable(){
        this.getConfig().set("hello", "world");
        this.saveConfig();
    }
}```
will doing something like so, create a YML file in the data Directory and create an attr in it called hello and set it to world?
vivid temple
foggy bough
#
@EventHandler
    public void DropItem(BlockBreakEvent e) {
        Random ran = new Random();
        int BlockDropRates = ran.nextInt(90)+61;
        ItemStack blocks = new ItemStack(e.getBlock().getType(), BlockDropRates);
        
        e.getBlock().getDrops().clear();
        e.getBlock().getDrops().add(blocks);
    }```\
 I wanted to get the block that I broke and multiply the drops but when I tried the plugin it wouldn't work the block drops are not getting multipllied but it does drop the block it was supposed to drop just one though
anyone know how to fix this?
vague oracle
#

I'm pretty sure that list doesn't drop the items in it, you will have to drop them yourself and use event.setDropItems(false);

hybrid spoke
sage swift
#

but also naming conventions

foggy bough
silk mirage
#

Um, I'm trying to make "&eSomething" into colors (BungeeCord), I'm curious if I there is anyway I can get this as TextComponent because I still have to setHover and onClick event

hybrid spoke
# foggy bough what? could you provide example code?

i can't. this wasn't a solution. it was a guess. the block you are handling with is just a copy of the actual block which was broken, so you can't set the drops. but i am not sure. could be that i am wrong here.

#

try the solution @vague oracle just wrote

silk mirage
#

you sure it'll work?

#

I don't wanna do debugging again again and again

#

.-.

hybrid spoke
#

👍

#

otherwise just replace & with §

silk mirage
#

ait

#

it didn't work

#

i tried it earlier

#

im asking for bungeecord btw

hybrid spoke
#

ChatColor is bungeecord api btw

vague oracle
#

that is in my bungeecord plugin :/

silk mirage
#

i tried it

#

or it is due to me, i'll do some debugging and be here

sage swift
#

TextComponent.fromLegacyText

tardy delta
#

is there a way to change the players name above their head without use of packets?

gritty urchin
#

How to pause chunk updates for a particular player and chunk?

#

E.g when a player loads a chunk, all updates within the chunk (entities, sounds, particles etc) will be frozen.

foggy bough
#

I have this ```java
@EventHandler
public void onRespawn(PlayerRespawnEvent e) {
BukkitScheduler br = plugin.getServer().getScheduler();
Player player = e.getPlayer();
br.scheduleSyncDelayedTask(this.plugin, new Runnable() {

        @Override
        public void run() {
            player.getInventory().addItem(compass);
            
        }}, 3L);
    
    
}

@EventHandler
public void onClick(PlayerInteractEvent e) {
    // player
    Player player = e.getPlayer();
    // see what the player was using and gets the type
    Material held = e.getItem().getType();
    // gets the action used on the material
    Action act = e.getAction();
    // checking if the item held is a compass and checking if it is right click on air or block
    if(!(player.getName().equals(this.plugin.hunted)) && held == Material.COMPASS && (act == Action.RIGHT_CLICK_AIR || act == Action.RIGHT_CLICK_BLOCK)) {
        // getting the hunted player
        Player hunted = player.getServer().getPlayer(this.plugin.hunted);
        // setting the target to the hunted player
        player.setCompassTarget(hunted.getLocation());
        player.sendMessage(ChatColor.GREEN + "Now tracking: " + this.plugin.hunted);
    }
}``` I don't understand why it is not giving me a compass when I respawn
sage swift
#

FourteenBrush, setDisplayName, but that will change their name in chat as well

#

did you register the events, Nerd?

sage swift
tardy delta
#

ah i wanted to use a prefix before there name but in would it wouldnt matter

#

👌

gritty urchin
#

Basically stop all packets

eternal oxide
#

Scoreboard team prefix

foggy bough
gritty urchin
#

if they are in that chunk

sage swift
#

because there is no magical "freeze it" button

#

why do you respond to random, not-targeted-at-you messages Nerd

hybrid spoke
sage swift
#

Nerd, why are you registering events in a command

foggy bough
tardy delta
#

like trying to register them when they cant get executed :/

foggy bough
sage swift
#

register it at the start, then just ignore or don't ignore the events based on whether the hunt is currently going on

tardy delta
#

main or something

foggy bough
tardy delta
#

just make sure they're registered in your onenable

strange elk
#

I saw in the code BlockDispenser.eventFired but I never see it actually being set, any clue where it is being set cause i don't see it

foggy bough
tardy delta
#

just put in in your main class smh

#

and instead of bukkit.getpluginmanager... use the instance of your main class

foggy bough
tardy delta
#

just register them

foggy bough
tardy delta
#

main class 🥺

hybrid spoke
foggy bough
#

so like thisjava public void onEnable() { getCommand("manhunt").setExecutor(new Hunter(this)); Bukkit.getPluginManager().registerEvents(new Hunter(this), this); System.out.println("Enabled"); }

gritty urchin
#

How to get PacketType.Play.Server.WORLD_PARTICLES packet location?

foggy bough
tardy delta
#

should the vault chat.getplayerprefix return the luckperms prefix is there is one?

#

i assume luckperms prefix is based on vault

sage swift
#

mmm instantiating Hunter twice

#

set it to a Hunter variable so you only instantiate it once.

tawny venture
#

Hello I have a question. How can I compile the plugin's source into a jar file when the source doesn't have a pom.xml file?

tardy delta
#

not

sage swift
#

well no, you can I'm pretty sure, but it's kinda the problem that maven and gradle aim to solve

tardy delta
#

imagine changing from gradle to maven

#

what 😳

maiden briar
#

player.getInventory().setItem(0, itemManager.getItem(Item.SELECT_TEAM)); does nothing? I am 100% sure the item is not null
I have pint the item out: ItemStack{COMPASS x 1, COMPASS_META:{meta-type=COMPASS, display-name={"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"gold","text":"Select Team"}],"text":""}, ItemFlags=[HIDE_ATTRIBUTES, HIDE_UNBREAKABLE, HIDE_DESTROYS]}}

tardy delta
#

i had that before

maiden briar
#

How did you fix it?

tardy delta
#

changed it with addItem or something

maiden briar
#

addItem does also not work

#

Btw player is in creative

tardy delta
#

did you try it with a simple item?

#

or try in survival

maiden briar
#

Ok I will try in survival

#

Because clearing just works fine

#
player.setGameMode(GameMode.SURVIVAL);        player.getInventory().addItem(itemManager.getItem(Item.SELECT_TEAM));
player.setGameMode(GameMode.CREATIVE);
tardy delta
#

clearing is different smh

maiden briar
#

Ok

tardy delta
#

uhh try that idk

sage swift
#

Yeah creative is stupid

#

Client has way too much control

maiden briar
#

Doesn't work either

tardy delta
#

just change manually gamemode

maiden briar
#

Also keeping in survival does not work

gritty urchin
#

Is it possible to cancel all packets within a chunk for a player?
(freeze a chunk)

ivory garden
#

hi

#

i made a plugin which gives op items when a player swims, but .... i hav some problems

tardy delta
#

uhh maybe tell them

ivory garden
#

gives and error called Invalid Plugin Exception: main class 'me.sam.DD' does not extend javaplugin

tardy delta
#

extend javaplugin

ivory garden
#

i did

#

in my main.java

#

but it still doesnt work

#

it was a line of code saying public class Main extends JavaPlugin

#

😐

crude sleet
maiden briar
#

java.lang.NoSuchMethodError: 'void net.minecraft.network.protocol.game.PacketPlayOutEntityDestroy.<init>(int[])'

crude sleet
#

Yes, he cant find the method

maiden briar
#

No constructor named PackedPlayOutEntityDestroy(int[] intergerArray)

ivory garden
#

ok

#

wait

#

name: DropsDamage
version: 1.0
api-version: 1.17
author: GamingALLday
main: me.sam.DD.Main
description: this is a plugin by GamingALLday

vague oracle
#

It says the error :/

maiden briar
vague oracle
ivory garden
#

@vague oracle my plugin.yml :
name: DropsDamage
version: 1.0
api-version: 1.17
author: GamingALLday
main: me.sam.DD.Main
description: this is a plugin by GamingALLday

vague oracle
#

Well did you re-compile it and re-uplaod the plugin?

crude sleet
ivory garden
maiden briar
#

Then you are not using 1.17?

ivory garden
#

i m

#

idk where is the prob

#

my IDE is also not showin error

crude sleet
# maiden briar Then you are not using 1.17?

I get the Same error and i use 1.17.1. Maybe because the plugin is 1.17.1 and the server is 1.17 but I can not imagine that. The output of "armorstandb" is "70" and not an int array

maiden briar
#

Try not using reflection and directly do new Packet..

vagrant galleon
#

How can I check, if a player already exists in players?

tribal sparrow
#

is anyone experienced in sockets?
https://paste.md-5.net/oxizarotab.cs <- that's how i'm listening/sending but for some reason '→' this arrow is getting sent at the start of the message?

gritty urchin
vagrant galleon
#

ok, I'll try it.

earnest lark
#

do i need any implements for eventhandelers?

#

nvm

gritty urchin
#

How to get location of PacketType.Play.Server.NAMED_SOUND_EFFECT packet

waxen barn
#

hi there, how can I register custom entity in 1.15.2

#

i tried to find it on google, but none code was up to date

quaint mantle
#

question
i used buildtools to download spigot
what do i do once i have the .jar file

mystic tartan
#

If you get a chunk by using World#getChunkAt(Location loc), does it then load the chunk for you, or do you then have to run .load() on that chunk?

hasty prawn
hasty prawn
honest iron
#

What can cause: Could not initialize class

chrome beacon
#

A lot of things

honest iron
#

im using enum for locations

#

, names

#

and it can't be loaded

#

it can but i get: Could not initialize class

chrome beacon
#

Well pretty much tells us nothing

#

Also why hardcode locations it's better to have them configurable

honest iron
#

i have this code

#

i can only use it when i reload it via plugman..

chrome beacon
#

getWorld is null when that code runs

honest iron
#

i see

#

and how to fix it?

#

i tried static {
// load world
}

#

at the start

chrome beacon
#

Make you plugin load post world or load that class later

#

Or create the location in getLocation

honest iron
#

yea

#

ill try:

#

won't worn

#

the error is coming from:
for (Island is : Island.values()) {

hasty prawn
#

Whats the error

#

Same? I assume. You need to load your plugin post-world

honest iron
hasty prawn
#

add load: POSTWORLD to your plugin.yml

honest iron
#

ok

earnest lark
#
    public void onRespawn(PlayerRespawnEvent e) {

        ItemStack compass = new ItemStack(Material.COMPASS);
        Player player = e.getPlayer();
        player.getInventory().addItem(compass);

    }
}
```would this give the player a compass on respawn
hasty prawn
#

Try it

ivory sleet
#

It sure would

earnest lark
#

imma try it

#

do i have to initiate the events

honest iron
#

guys

earnest lark
#

bc i forgot to do that

honest iron
#

i fixed it

#

with new method

#

void onEnable() {

#

after the custom worlds load..

#

spawn = new Location

earnest lark
#

ok how do initiate a event

ivory sleet
#

initiate an event?

#

You most likely only listen to events

stone sinew
#

if I don't set a boolean variable is there a way to check that its not set? Kinda like variable == null

boolean isEnabled;
public void enabled() {
    if(isEnabled == null)
        isEnabled = true;
    return isEnabled;
}
earnest lark
#

how do i put a event in onEnable

summer scroll
#

primitives will never be null

#

if you don't set the isEnabled boolean it will return false afaik

stone sinew
stone sinew
summer scroll
#

i was about to say that xd

burnt current
#

Hey! Quick question: Does anyone know how I can use multifacing on a glass pane that I want to set as follows?:
event.getBlockPlaced().getLocation().add(-2, 1, 0).getBlock().setType(Material.WHITE_STAINED_GLASS_PANE);

ivory sleet
#

It can be true false or null

#

Or well it can be Boolean.TRUE, Boolean.FALSE and null

stone sinew
ivory sleet
#

Aight cool

sage swift
#

until it's enabled

earnest lark
stone sinew
hasty prawn
earnest lark
#

yea

#

ik

#

i need to register the event