#help-archived

1 messages · Page 94 of 1

spare frost
#

each Map has a unique name btw

tiny dagger
#

its slower tho

runic wadi
#

hash cod 🐟

subtle blade
#

In this case, referential equality is probably fine

runic wadi
#

equail 🕊

#

wait what’s a quail look like

subtle blade
#

It’s a bird of some sort idk lol

runic wadi
#

yes hashcod and equail

subtle blade
runic wadi
#

ew?

subtle blade
#

They’re not the prettiest

runic wadi
#

what is that absolute SPROUT on its head

#

to detect evil

subtle blade
#

He’s a dick head

keen compass
#

quail is good to eat

runic wadi
#

cods aren’t so hot either

worn siren
#

0

keen compass
#

however, need to catch like 5-6 of them to have anything decent in terms of amount of food

#

they are very tiny birds that do not really fly. They mostly run on the ground XD

runic wadi
#

oh that’s so weird

spare frost
#

pigeons yummy

keen compass
#

they can fly short distances

#

otherwise they live on the ground lol

#

kind of cool sometimes to see quail especially around spring time to see all the baby quail follow the Mother quail

runic wadi
subtle blade
#

lmao

keen compass
#

Quail is California's state bird, pretty much the only reason I know about them

#

other then having eaten quail before

runic wadi
#

we don’t have them here in north korea

keen compass
#

you are in north korea o.O

runic wadi
#

yes this is kim

#

THE kimberly jong un

subtle blade
#

Quail is California's state bird, pretty much the only reason I know about them
Is it really? Oh I am so making fun of the gf lol

#

“haha ur state bird has a penis on its head”

keen compass
#

lol

hallow surge
#
    switch(args[0].toUpperCase()) {
                case "on":
                    p.sendMessage(plugin.onOffArgs("OnOffArgs.On"));
                    break;
                case "off":
                    p.sendMessage(plugin.onOffArgs("OnOffArgs.Off"));
                    break;
                default:
                    p.sendMessage(plugin.helpString("HelpMessage"));
                    break;    
            }``` whats wrong with the switch statement it just uses the default even if ingame i type /example on Im thinking it might be something wrong with my config
subtle blade
#

toUpperCase()

#

"on" & "off"

#

It's best here to use an if/else anyways so you can at least compare with equalsIgnoreCase() and allow for "oN" or "OfF"

#

eh, guess it does that anyways. yea. nevermind. Just fix your casing lol

hallow surge
#

okay

#

so in the toUpperCase I add "on" "off"

subtle blade
#

No

#

If I were to run for example, /command on

#

Your switch statement is going to uppercase it and turn that argument into "ON"

#

"ON" will never equal "on" nor "off"

hallow surge
#

i see

#

okay yea i was basically thinking toUpperCase was the same thing as equalsIgnoreCase() but im stupid because it literally means To Upper Case

subtle blade
#

Yep

#

Consequently there is a toLowerCase()

hallow surge
#

thats too long for me to type out

#

maybe another day

subtle blade
#

I mean you literally just have to change toUpperCase() to toLowerCase() and it'll work ;P

hallow surge
#

OOF

#

the effort

subtle blade
hallow surge
#

ill do it toLowerCase()

#

wo DotRar very techy name

#

@subtle blade yay now i can see that im getting syntax errors mighty fine

subtle blade
#

Lol

hallow surge
#

And it has to do with my chat color

#

this is fun

#

what would be the propper syntax so i dont get null pointer errors :|

    public String onOffArgs(String config_message) {
        ChatColor.translateAlternateColorCodes('&', getConfig().getString("OnOffArgs.On"));
        ChatColor.translateAlternateColorCodes('&', getConfig().getString("OnOffArgs.Off"));
        return getConfig().getString("OnOffArgs");
    }```
rocky knot
#

Is there an equivalent for inventory view setCursor That is not deprecated?

subtle blade
#

Config's getString() is nullable

#

No

#

It works fine but is inconsistent and practically non-functionality in creative mode

rocky knot
#

It works fine but is inconsistent and practically non-functionality in creative mode
Just tested in creative and it worked well

hallow surge
#

@subtle blade i have been meaning to ask this I have 0 idea how the parent child works in configs i have just started working with them

subtle blade
#

The result of getString() will be null if not present in the config, which will throw an exception in ChatColor.translateAlternateColorCodes(). However, your calls to these methods are useless anyways as you don't assign them to anything. It's an empty call

#

Strings are immutable. Any change you make to a String will return a new String

#

String coloured = ChatColor.translateAlternateColorCodes('&', getConfig().getString("OnOffArgs.On"));

#

Also, getString() will accept a second argument to act as the default. getConfig().getString("OnOffArgs.On", "This will be used if not in the configuration file")

#

Lastly, return getConfig().getString("OnOffArgs"); is wrong because OnOffArgs is not a string. It's a category. This will throw an error too

hallow surge
#

i see

#

what should i return?

subtle blade
#

I don't know what you want to return

hallow surge
#

I want to return the strings that is called

subtle blade
#

oic whatever was passed

hallow surge
#

yea

rocky knot
#

I dont get why dont people use things like nightconfig for managing configuration files.
It has annotation api, supports more formats than yaml, and is far simpler to use

hallow surge
#

yaml isnt too complex this is my first ever project incorperating a yaml file and this is my first issue im having

subtle blade
#
public String onOffArgs(String path) {
    return ChatColor.translateAlternateColorCodes('&', config.getString(path, "The default message so it's not null"));
}```
rocky knot
#

Yaml is bad for users

naive goblet
#

Why lol

#

It’s far more readable than json

subtle blade
#

JSON isn't a configuration file format

rocky knot
#

HOCON is

#

yaml requires correct spacing for example, it has very scrict syntax

subtle blade
#

Yes but far less user-friendly than YAML

rocky knot
#

Yes but far less user-friendly than YAML
Hocon? hell no

subtle blade
#

If you really want to, you can write your own FileConfiguration implementation for HOCON

#

It's extendable

naive goblet
#

YAML takes short time to learn almost like instantly and it’s very user friendly as Choco said.

subtle blade
#

YamlConfiguration is an extension of it for plugins to use by default

rocky knot
#

But hocon is user friendly

#

I presonally dislike yaml for its syntax

naive goblet
#

I mean yeah Ig but many people likes yaml because if it’s syntax.

rocky knot
#

tbh many people dont know anything else

naive goblet
#

Depends

hallow surge
#
    switch(args[0].toLowerCase()) {
                case "on":
                    p.sendMessage(plugin.onOffArgs("OnOffArgs.On"));
                    break;
                case "off":
                    p.sendMessage(plugin.onOffArgs("OnOffArgs.Off"));
                    break;
                default:
                    p.sendMessage(plugin.helpString("HelpMessage"));
                    break;    
            }``` basically I want this to when player sends message /example [on, off] to send on or off message
```java
    public String onOffArgs(String path) {
        return ChatColor.translateAlternateColorCodes('&', getConfig().getString(path, "The default message so it's not null"));
    }    ``` using the class you gave me what should I do
naive goblet
#

what

#

Use getBoolean?

#

If it’s just an on-off thing use boolean

hallow surge
#

im adding more later im just testing with on off

#

if it was only on and off I would have used if statements

naive goblet
#

You could have used ternary as well

#

But yeah ig

hallow surge
#

I have never worked with yaml parent child sections before

naive goblet
#

What

#

It’s almost like any other config file system

hallow surge
#

😐

naive goblet
#

Well okay Choco gave you a method first of all

#

Not a class

hallow surge
#

i know

#

xD why i type class idk

naive goblet
#

Well I mean the YamlConfiguration#getString(path, def) is a way to get a fallback value if the present value of the path is null.

winged umbra
#

How can I make arrows go through certain players?
I don't mind using NMS
But would prefer a protocollib approach

naive goblet
#

I guess you kind of don’t really know what you try to accomplish @hallow surge ?

subtle blade
#
Foo:
  Bar:
    Baz:
      HelloWorld: "This is my value!"```
`String thisIsMyValue = getConfig().getString("Foo.Bar.Baz.HelloWorld");`
#

Dots act as category separators

rocky knot
#

laughs in hocon

hallow surge
#

that wouldnt help me

naive goblet
#

đŸ€”

#

Y2K what are you trying to do?

hallow surge
#

thanks choco

#

thats what i did initally

#

so the color sattement was wrong as itss returning null and a section which you said earlier

dense escarp
#

i want anticrash

hallow surge
#

how did they crash it

dense escarp
#

client

hallow surge
#

why arent they beingkicked for too many packets

#

thats how most crashes work

dense escarp
#

idk

hallow surge
#

send an enormous amount of packets to the server and it dies

#

i can literally crash a server by running through another player

#

you need to kick for too many packets

dense escarp
#

ok how can i fix it ?

hallow surge
#

you need to kick for too many packets

dense escarp
#

plugin ?

hallow surge
#

you'd have to ask someone who knows I just know you should kick a player if they send too many packets

#

i thought it was a build in spigot feature but maybe not

sturdy oar
#

ehy I know I've asked this already in other places, but does someone here know how to register multiple LiteralCommandNode with permission (Using Commodore)?

#

Basically trying to set a required permission tab completion for subcommands of the same command

rain plank
#

Is there anyone here willing to help set-up the votingplugin to my server.

frigid ember
ashen stirrup
#

For some reason this seems to be returning null.

                for (String string : buckets.getConfig().getStringList("pseudo-buckets." + bucketType + ".lore")){
                    pseBucket.addLore(API.colorize(string)); // NPE HERE
                }

It can do everything else like pseBucket.setDisplayName(API.colorize(buckets.getString("pseudo-buckets." + bucketType + ".display-name"))); but adding the lore doesn't seem to work.

tiny dagger
#

what triggers null specifically?

ashen stirrup
#

I comment coded it

tiny dagger
#

pseBucket.?

ashen stirrup
#

I can't see why it would be that

#
for (String bucketType : buckets.getConfig().getConfigurationSection("pseudo-buckets").getKeys(false)){
                Buckets pseBucket = new Buckets();

                pseBucket.setGuiItem(new ItemStack(Material.matchMaterial(buckets.getString("pseudo-buckets." + bucketType + ".gui-item"))));

                pseBucket.setPrice(Integer.valueOf(buckets.getConfig().getInt("pseudo-buckets." + bucketType + ".price")));

                pseBucket.setDisplayName(API.colorize(buckets.getString("pseudo-buckets." + bucketType + ".display-name")));
                pseBucket.setStack(new ItemStack(Material.matchMaterial(buckets.getString("pseudo-buckets." + bucketType + ".item-material"))));

                for (String string : buckets.getConfig().getStringList("pseudo-buckets." + bucketType + ".lore")){
                    pseBucket.setLore(API.colorize(string));
                }

                pseudoBuckets.add(pseBucket);
                getLogger().log(Level.INFO, "Loaded pseudo Bucket: " + bucketType);
            }
#

It specifically throws an NPE on pseBucket.setLore(API.colorize(string));

tiny dagger
#

what's a buckets?

ashen stirrup
#

Object

opal bay
#

is displayname null?

tiny dagger
#

i think it is

opal bay
#

show us your config

torn robin
#

i would debug out string

ashen stirrup
#

It's not display name

#

And alright

torn robin
#

also you're setting the lore per line

#

as in the lore would be the last line only

ashen stirrup
#

I know, the actual method adds to the array list

torn robin
#

addLore

#

that's very unintuitive

ashen stirrup
#

That's not the issue though.

torn robin
#

what's the method you have for addLore?

#

and can we see the NPE

ashen stirrup
#

Debugging the string outputs &7( Left click to place gen bucket. )

stray iron
#

Yo, can I ask a question about some Vault related thing that seems very odd to me? Or is it just Spigot API here?

torn robin
#

sure Gadse

ashen stirrup
#
[19:08:36 WARN]: java.lang.NullPointerException
[19:08:36 WARN]:        at me.straggly.genbuckettest.Buckets.setLore(Buckets.java:38)
[19:08:36 WARN]:        at me.straggly.genbuckettest.GenBucketTest.loadBuckets(GenBucketTest.java:125)
[19:08:36 WARN]:        at me.straggly.genbuckettest.GenBucketTest.onEnable(GenBucketTest.java:38)
[19:08:36 WARN]:        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321)
[19:08:36 WARN]:        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340)
[19:08:36 WARN]:        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405)
[19:08:36 WARN]:        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:357)
[19:08:36 WARN]:        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:317)
[19:08:36 WARN]:        at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:414)
[19:08:36 WARN]:        at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:378)
[19:08:36 WARN]:        at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:333)
[19:08:36 WARN]:        at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:263)
[19:08:36 WARN]:        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525)
[19:08:36 WARN]:        at java.lang.Thread.run(Unknown Source)
torn robin
#

yeah it's the setLore function

tiny dagger
#

setlore is null

torn robin
#

what's line 38 in Buckets

ashen stirrup
#

Oh I'm stupid lmao, forgot to initialize the ArrayList

torn robin
#

f

tiny dagger
#

there you go

opal bay
#

👀

ashen stirrup
#

I've done that so much đŸ€Š

tiny dagger
#

just don't :d

torn robin
#

in general should i/we initialize arrays in the constructor or instantiation or does it matter

stray iron
#

So, I'm having this weird issue that vault is not withdrawing balance from players, sometimes.
I'm calling

economy.withdrawPlayer(player, Math.min(actualDeposit, economy.getBalance(player)));

Where actualDeposit is a primitive double. But! Logging the EconomyResponse while debugging, returns that "Loans are not allowed", but only like in 10% of cases, not always. I'm genuinely confused as to why that would happen x)

torn robin
#

like is there a substantial diff between

private List<String> example = new ArrayList<String>();

and

private List<String> example;

public Example() {
  this.example = new ArrayList<String>();
}
tiny dagger
#

not really msws

#

if you have only 1 constructor

#

it basically gets instanced anyway

#

while you have 2 or more constructors you can choose

#

if you want to save a lil' ram or not

subtle blade
#

Both are equivalent to

private List<String> example;

{
    this.example = new ArrayList<>();
}```
torn robin
#

neat ty

stray iron
#

anyone got a smart idea or..

subtle blade
#

There's a slight difference between the two actually

#

Load order

#

Fields are initialized first, constructors called after

torn robin
#

@stray iron i'd probably look if vault supports loans natively but other than that no idea

subtle blade
#
private String example = null;
private String usingExample = example.concat(" World!");

public Example() {
    this.example = "Hello";
}```
That's an exception for instance
stray iron
#

@torn robin no, the loans is an essentials economy sub-call, i know i could just hand out the permission, but all i want to do is take all money the player has .. which that call should do and does in 90% of cases

torn robin
#

no idea, i'd debug the balance and see if it's at all different for the 10%

naive goblet
#

Choco static block is initiated first right?

tiny dagger
#

yeah

subtle blade
#

It is, yes

#

afaik, static block, static fields, init block, member fields, constructor

#

Though static blocks and fields are initialized when the class is loaded by the classloader, not an instance of it

#

All of the above are initialized in order of appearance in source (such that they are of the same type - respective of their category)

naive goblet
#

Oh totally forgot about the initialize block

ashen stirrup
#

Is there a way to get the title of the destination inventory's title in InventoryMoveItemEvent

naive goblet
#

?jd

worldly heathBOT
naive goblet
#

Pretty sure #getInventory() would give you the destination inventory?

robust glade
#

You can check the name of the other Inventory

ashen stirrup
#

How would I do that

robust glade
#

for example: by getting the TopInventory

#

The InventoryMoveItemEvent even has a method called "getDestination" which returns the "destinationInventory"

ashen stirrup
#

But I need the title

naive goblet
#

Inventory#getTitle ?

ashen stirrup
naive goblet
#

S

ashen stirrup
naive goblet
#

Nvm

#

But like

#

Wait lemme browse

robust glade
#

getName

#

Not getTitle

ashen stirrup
#

Not a method

robust glade
#

Which version are you using ?

ashen stirrup
#

1.15.2

robust glade
#

get the InventoryView and then the Title

ashen stirrup
#

Under what? Destination?

naive goblet
#

I think the event provides the InventoryView ?

ashen stirrup
naive goblet
#

Uh Idk maybe you could use the DragEvent instead ?

ashen stirrup
#

Alright

naive goblet
#

Or I mean you could make your own MoveItem event based on other inventory events

meager elk
#

Does anyone know how I can execute a plugin command in a vanilla function?

naive goblet
#

Vanilla function ?

meager elk
#

yeah datapack in the world folder

naive goblet
#

No idea

pastel fox
#

When is SignChangeEvent fired?

#

Afaik players can't change sign text

#

Or is it fired after a sign block is placed?

worthy wing
#

Anybody have a server That I can join?

pastel fox
#

What kind lol

torn robin
#

@pastel fox after the sign is placed

naive goblet
#

When the player is done writing the sign?

subtle blade
#

Yes

#

When "Done" is pressed

terse river
#

How can I put data from an Async function into a Sync function?

ashen stirrup
#

When I open an inventory for a player, it automatically picks up an item from the inventory for them, how can I prevent this?

naive goblet
#

ItemPickup event ?

ashen stirrup
#

Isn't that for when a player picks up an item from the ground?

naive goblet
#

Thought you meant that

ashen stirrup
#

One sec

#

I'll try record it

subtle blade
#

That's good because I have no idea what you're talking about lol

ashen stirrup
naive goblet
#

Clear the cursor on itemclickevent

#

Or maybe its inventoryclickevent

subtle blade
#

Delay the inventory opening by a single tick

#

Oh, you're re-setting the items aren't you?

ashen stirrup
#

I fixed that in the next build

#
        if (event.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase(API.colorize("&9&lHorizontal Buckets"))){
            player.closeInventory();
            horizontalGUI.openInventory(player);
        }
#

I use that

naive goblet
#

You don’t need to close current inv to open a new one?

ashen stirrup
#

Yeah I was just testing solutions there

naive goblet
#

Btw isn’t there like you can grief inventories if the player is sleeping with any inventory open?

ashen stirrup
#

I'll look into that at another time lmao

naive goblet
#

iirc that I struggled with that but just put an isSleeping check else bamboozle them from the inventory

robust glade
#

Just prevent the player from taking out the items at all

naive goblet
#

^

#

InventoryClickEvent#setCancelled(true)

ashen stirrup
#

Now with this

        if (event.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase(API.colorize("&9&lHorizontal Buckets"))){
            Bukkit.getScheduler().runTaskLater(GenBucketTest.getInstance(), new Runnable() {
                @Override
                public void run() {
                    event.setCancelled(true);
                    horizontalGUI.openInventory(player);
                }
            }, 3L);
        }

It just drops the Lava bucket from the main GUI

naive goblet
#

Don’t cancel it in the task

#

Cancel it before

tawdry venture
#

how can I check if the plugin is running on a server that is in a bungee network?

naive goblet
#

A bungee plugin?

#

PluginManager#getPlugin != null

terse river
#

How can I put data from an Async function into a Sync function?

chilly eagle
#

hello! searching for a good program tutorial for spigot, found a really cool programing tutorial for spigot and bukkit, but he uses bukkit and I couldnt solve a problem that I had. Any of you could recommend a tutorial for spigot? Dont know any of this stuff, so it should teach from the beginning. Thanks!

#

tag me on answer

#

ping me on answer*

naive goblet
#

tim03we make your own Future implementation and once you invoke a request method you block the thread and wait for callback or smtng similar

#

Maybe do a quick google search to find a more pedantic solution

#

@chilly eagle for coding spigot plugins?

chilly eagle
#

yes

naive goblet
#

I mean I’d recommend IntelliJ IDEA but Eclipse IDE works as well.

#

And ask a lot of questions for your own understands.

#

Don’t copy paste

vernal spruce
#

Hmm anyone know if force opening a inventory(p.openInventory on top of a opened inventory) still calls close event on the first one?

ocean sparrow
#

I have a skygrid server and it also has water source blocks floating in the air. These blocks are currently automatically updating at random. How do I disable random block updates?

pastel condor
#

any reason this code doesn't work, when I have almost identical methods in other classes that work? ``` public void preventShiftgui (InventoryMoveItemEvent event) {
if (!Arrays.equals(event.getSource().getContents(), advancedSettingsGUI((Player)event.getSource().getHolder()).getContents())) return;
event.setCancelled(true);

}


public Inventory advancedSettingsGUI(Player player) {
    Inventory inv = Bukkit.createInventory(null, 36, "Basic Settings");
    Worker work = new Worker();

    inv.setItem(11, work.createGuiItem(Material.BLUE_ICE, "§fFreeze Day Night Cycle at current time", "§f(Default on)"));
    inv.setItem(13, work.createGuiItem(Material.DEAD_BUSH, "§fToggle plant growth", "§f(Default on)"));
    inv.setItem(15, work.createGuiItem(Material.PIG_SPAWN_EGG, "§fToggle Mob Spawning", "§f(Default on)"));
    //random tick speed 3
    
    inv.setItem(31, work.createGuiItem(Material.BARRIER, "§fGo Back"));

    



//Here opens the inventory
    return inv;
}```
#

there are no console errors

terse river
#

tim03we make your own Future implementation and once you invoke a request method you block the thread and wait for callback or smtng similar
@naive goblet did u have an example?

ashen stirrup
#
if (API.colorize(event.getView().getTitle()).equalsIgnoreCase(API.colorize(GenBucketTest.config.getString("config.gui-title")))){}
#

Should that work for checking a GUI title for InventoryDragEvent

pastel condor
#

I would check the contents

#

@ashen stirrup

ashen stirrup
#

Oh, why?

idle zodiac
#

what did they rename it to?

#

Method method = EntityType.class.getDeclaredMethod("a", Class.class, String.class, int.class);

#

better

strange grove
#

hey does anyone know how to make the players chat window type something they are not typing ?

hoary parcel
#

Yes

#

You can use click events to insert text

paper compass
strange grove
#

well not a click event

#

um more like a chat event

#

like if they type a command

torn robin
#

@strange grove player.chat

strange grove
#

hm

#

welll

torn robin
#

issa method of Player

idle zodiac
#

Method method = EntityType.class.getDeclaredMethod("a", Class.class, String.class, int.class); how do i fix that 'a' doesnt exist?

#

i'mn on 1.8

tiny dagger
#

ouch ohsry

idle zodiac
#

and i think its been renamed

#

and i havent got a clue what it is

torn robin
#

just dont use 1.8 ezpz

strange grove
#

im saying like if I type a command and then i want it to get my commands contents and put it into that command

idle zodiac
#

nah

#

i'm using 1.8

frigid ember
#

there is absolutely nothing wrong with 1.8

tiny dagger
#

don't use replaceall đŸ€”

idle zodiac
#

try doing a fucking skywars plugin in like 1.15.2

#

you will die

torn robin
#

h311 player.chat but with "/" then?

strange grove
#

then call in another command then place the contents of the command i asked for and put it in there

tiny dagger
#

@idle zodiac so are you challanging me?

strange grove
#

so it's a combined effort

idle zodiac
#

no

#

i just want to know what 'a' was renamed to

#

that is all

tiny dagger
#

which a

hallow surge
#
public String onOffArgs(String path) {
        getConfig().getConfigurationSection("OnOffArgs").getKeys(false);
        return ChatColor.translateAlternateColorCodes('&', path);
    }``` what should return should I use so my child statements print like so
```yaml
OnOffArgs:
 On: On!
 Off: Off!

Would print in game like On and Off

idle zodiac
#

Method method = EntityType.class.getDeclaredMethod("a", Class.class, String.class, int.class);

#

that one

tiny dagger
#

and it does?

idle zodiac
#

XD

#

i have no clue

tiny dagger
#

show more then

idle zodiac
#

i followed a tutorial because i'm like that and i'm new so

#

its EntityType

tiny dagger
#

of what you got

strange grove
#

uh can I have some help?

idle zodiac
#

?paste

worldly heathBOT
tiny dagger
#

custom entity registry?

strange grove
#

😩

tiny dagger
#

you don't need to modify custom entity registry in 1.13+

hallow surge
#

H311 dont post to ask to help post your question

idle zodiac
#

I

#

DONT

tiny dagger
#

if not 1.12+

idle zodiac
#

CARE

#

I'M USING 1.8

strange grove
#

y2k

#

@hallow surge iasked before

idle zodiac
#

DONT ANSWER IT

tiny dagger
#

okay then

hallow surge
#

than post a message link to before

strange grove
#

ok

torn robin
#

h3 did you not try player.chat("/" + args)

tiny dagger
#

go be annoying somewhere else

strange grove
#

how so?

idle zodiac
#

if you cant help dont just cyberbully me about what fucking version i'm using

#

i'm not in the mood ok

strange grove
#

oof

hallow surge
#

Occy calm down

tiny dagger
#

i can see it

#

fine

idle zodiac
#

sorry

#

i'm just not in the mood today

strange grove
#

@torn robin wdym by that?

torn robin
#

are you asking for how to code it?

#

or just with a plugin?

tiny dagger
strange grove
#

well im using the plugin animated frames

#

and imtrying to make a replace command

#

so you can replace images

#

but i do not know and it's a bit to complicated

tiny dagger
#

you better say thank you after you scream at me

idle zodiac
#

thank you

strange grove
#

so i got the idea

idle zodiac
#

so what is it renamed to?

strange grove
#

to combine commands

tiny dagger
#

string is d

#

integer f

idle zodiac
#

i'm looking for a

strange grove
#

and use the remove command and the afcreate command

#

to make a totally new command

tiny dagger
#

what you wanna do tho

#

a of what

idle zodiac
#

ok so

#

you know how like nms entity attributes were renamed and stuff

warm carbon
#

quick question guys, since I'm not sure about that one. Best method to create a 3x3 inventory?

idle zodiac
#

i think that's whats happened here

strange grove
#

so i'm trying to do this Asynchrounsly @torn robin

idle zodiac
#

i need the method 'a' in EntityType I think

#

and it doesnt exist apparently

tiny dagger
#

in 1.8.8

#

?

idle zodiac
#

yes

#

1.8

strange grove
#

so it runs the remove command first taking the contents of the command I asked for

#

it removes the image

tiny dagger
#

can you send your current code

idle zodiac
#

hastebin dont work

tiny dagger
#

pastebin

idle zodiac
#

ye

tiny dagger
#

md5 bin

idle zodiac
#

i was about to try it

tiny dagger
#

pm

strange grove
#

then it executes the afcreate command

#

taking the contents from the replace command yet again

idle zodiac
#

sorry

#

md5 bin wasnt working

#

haste does

strange grove
#

and using the name and url to create a totally new image

idle zodiac
#

and it's literally the same thing so

strange grove
#

without the players knowledge

torn robin
#

if you're coding it it should be simple as player.chat

idle zodiac
#

also pro gamers like myself use dm

strange grove
#

hmm

idle zodiac
#

pm reminds me too much of boris johnson

#

and it scares me to the core

idle zodiac
#

as a british citizen

tiny dagger
#

1.8.8?

frigid ember
#

help me pls

idle zodiac
#

yes

#

1.8

strange grove
#

so

idle zodiac
#

@frigid ember patience my friend

tiny dagger
#

this is it tho..

#

there is no a

#

or something like that

idle zodiac
#

ah

#

ok thanks so much

strange grove
#

your sure @torn robin ?

frigid ember
#

ok

torn robin
#

yes

strange grove
#

it's just as simple as player.chat?

torn robin
#

you can make the player chat with that yes

idle zodiac
#

cannot resolve registerentity

strange grove
#

so i can put text into their chat

torn robin
#

yes

strange grove
#

with them dispensing the command not me?

torn robin
#

correct

strange grove
#

hmm

#

ok imma gonna friend

#

u

idle zodiac
#

@tiny dagger my brain hurts and i need to go soon lol

strange grove
#

@torn robin

#

so i'll notify you if I have problems

#

🙂

torn robin
#

👍

strange grove
#

thx for the help @torn robin

#

sending friend request 🙂

#

thank you for accepting 🙂

frigid ember
#

someone can help me??? '-'

strange grove
#

uh jaajlemes

idle zodiac
#

@frigid ember be patient my dude

strange grove
#

try asking your problem instead of putting in a txt

idle zodiac
#

some of us have to wait multiple days for help ok

strange grove
#

u sure ?

idle zodiac
#

rather than just going

#

"ooh give help not gonna ask what tho"

#

just fucking as

#

your

#

question

strange grove
#

no need to be salty

idle zodiac
#

i'm not

strange grove
#

you were given help

paper compass
#

Whats happening lmao

idle zodiac
#

i know

#

i'm tired

#

and crotchety

strange grove
#

then take a nap bro

#

🙂

idle zodiac
#

literally i'm about to just like cry

#

but ye

#

fun times amirite lads

#

anyway

paper compass
#

why @idle zodiac ? 😩

idle zodiac
#

@paper compass now let me introduce you to a little fun thing called clinical depression

paper compass
#

oh

strange grove
#

play doom

idle zodiac
#

nah

strange grove
#

it's good for chill

idle zodiac
#

i'm literally -1 years old

strange grove
#

🙂

#

in china?

idle zodiac
#

i cant play the nasty heathen nasty evil games yet

strange grove
#

no no

idle zodiac
#

else i will be smited by the lord above

frigid ember
#

plugin = premium bedwars, when I enter the game already configured, I am not teleported to the base and the villagers do not appear

idle zodiac
#

rip

strange grove
#

your killing demons

#

not people

idle zodiac
#

ah

strange grove
#

ur punishing satanists

idle zodiac
#

much better

paper compass
strange grove
#

so be happy

idle zodiac
#

i prefer bedwars

frigid ember
#

when you have time mention me: D

idle zodiac
#

so i can kill children

strange grove
#

well

idle zodiac
#

like irl children

#

rather than npcs

strange grove
#

u can kill fodder demons

idle zodiac
#

its much more fun

strange grove
#

and u can kill player demons

#

like playing battlemode

#

where it is slayer versus demon

idle zodiac
#

ye i'll stick to just playing skywars insane mode with my armorsmith kit

strange grove
#

and theirs no cussing

idle zodiac
#

"saying heck in roblox not clickbait"

strange grove
#

proffessionals have standards friend

#

🙂

#

lol

idle zodiac
#

schilm

dry kiln
#

What happens if i cancel the swim event. What is the unintended behaviour

#

I can cancel the event correct?

idle zodiac
#

the unintended behaviour is that the swim event cancels

#

sorry

#

XDD

#

that was an attempt at comedy

#

i'm going to overdose now

#

cya soon nerds

strange grove
#

no

idle zodiac
#

bye 💙

strange grove
#

do not

idle zodiac
#

r/woooosh

#

byebye

strange grove
#

r/thathappened

#

@idle zodiac

#

🙂

ashen stirrup
#

At least they tried to be funny?

winged umbra
#

How can I add an Entity to a Team?

dry kiln
#

Can i have an actual answer?

winged umbra
#

I'm seeing posts of people having issues adding the entity's uuid

dry kiln
#

If anyone has any experience with the event

hallow surge
#

yes you can cancel the swim event

#

you just cant swim..

paper compass
winged umbra
#

oh god the nesting

tiny dagger
#

there is a lot of work

paper compass
#

its for a custom prison enchant plugin thingy

#

mhm

tiny dagger
#

like a lot

#

i don't think anyone would be such an adventurer to go into that

paper compass
#

mhmm

tiny dagger
#

😂

winged umbra
hallow surge
#

wait seriously

winged umbra
#

name = primary + "§1" + en.getKey().getName();

paper compass
#

DIG_SPEED

#

???

#

but yh

#

.replace

winged umbra
#

just do that 1 check for dig speed

#

and fortune

paper compass
#

Should I just .replace?

#

;P

winged umbra
#

do you not know about return;

paper compass
#

I know

winged umbra
#

if something is null, return

#

else keep working

ashen stirrup
#

How do you stop inventory dragging in 1.15.2?

frigid ember
#

use 1.8

paper compass
#

lmfao

frigid ember
#

oh sorry didnt know you like using 1.15.2

#

my bad

ashen stirrup
#

I don't lmao, it's for a client

#

I was originally in 1.8 but I had to convert to 1.15.2

winged umbra
#

1.8 is like 6 years old

#

probably older than you, fatalpacket

ashen stirrup
#

L

winged umbra
#

Check the events

paper compass
#
                                String name = "";
                                if (en.getKey().getName().equalsIgnoreCase("DIG_SPEED")) {
                                    name = primary + "§lEfficiency";
                                    continue;
                                } else if (en.getKey().getName().equalsIgnoreCase("LOOT_BONUS_BLOCKS")) {
                                    name = primary + "§lFortune";
                                    continue;
                                }

                                name = primary + "§l" + en.getKey().getName();
                                minedLore.add("§7" + name + "  " + en.getValue());
                            }```
ashen stirrup
#

I used InventoryAction.MOVE_TO_OTHER_INVENTORY in the ClickEvent which seems to prevent shift clicking - that's it.

#

You can still drag and drop it

naive goblet
#

@winged umbra switch instead of if, else if...

winged umbra
#

Or you can just use a map with a for loop

naive goblet
#

a map with a for loop lol what

winged umbra
#

Or even just simple string addition

#

switches are ugly asf

paper compass
#
                                String name = "";
                                if (en.getKey().getName().equalsIgnoreCase("DIG_SPEED")) {
                                    name = primary + "§lEfficiency";
                                    minedLore.add("§7" + name + "  " + en.getValue());
                                    continue;
                                } else if (en.getKey().getName().equalsIgnoreCase("LOOT_BONUS_BLOCKS")) {
                                    name = primary + "§lFortune";
                                    minedLore.add("§7" + name + "  " + en.getValue());
                                    continue;
                                }

                                name = primary + "§l" + en.getKey().getName();
                                minedLore.add("§7" + name + "  " + en.getValue());
                            }```
naive goblet
#

wouldn't say so

#

they become even more useful in jdk 14

winged umbra
#

why do you call continue and then else

#

not many machines run jre14

#

most use 8

naive goblet
#

which is unfortunate

#

and that for loop is still kind of ugly ngl

calm frost
pure canopy
#

How can I know how many users are in a minecraft world?

#

what command ??

tiny dagger
#

viaversion settings

pure canopy
#

viaversion ??

tiny dagger
#

yes

#

but it has a fix

#

look in the config file

slim hemlock
#

in sqlite if I get a ResultSet and then close it, is it fine if I subsequently try to get a string from it?

tiny dagger
#

try and see

#

but i think it should be fine

#

like the data is stored

slim hemlock
#

I tried and it's erroring in some use cases but not others seemingly

tiny dagger
#

i dunno

#

you should open the result set and see what makes it tick

calm frost
#

viaversion ??
@pure canopy ooo Thanks 😄

marble jackal
#

Hey some one nous what is the Scheduled blocks?

#

and how i can fix the ticks

#

becost i looking reports in server and i see the name Scheduled blocks taks 96.98% of ticks

subtle blade
#

in sqlite if I get a ResultSet and then close it, is it fine if I subsequently try to get a string from it?
@slim hemlock If you close a result set, you can't fetch anything from it any longer

#

It will close your statement as well

dry kiln
#

When did entities gain the ability to sleep

#

what ver

lusty quiver
#

essentials commands work and output as expected, but the minecraft chatbar says they don't exist. just started happening after i configured groupmanager. any ideas?

#

new to this whole server-running thing lol

hallow surge
#

what version of essentials are you running

lusty quiver
#

actually now that i look at it, it's not even an issue with every command

#

lemme check

#

2.17.1.0

hallow surge
#

like mc version

lusty quiver
#

1.15.2

hallow surge
#

server version is 1.15.2 im asuming

lusty quiver
#

yes

hallow surge
#

hm not sure i dont use essentials because its a bad plugin to use especially if you can just make your own

lusty quiver
#

ah

#

i just use it for user-friendliness, my server's only for like 10 people tops :p

slim hemlock
#

@subtle blade yeah but assuming I did the fetching previously

#

I think I fucked up something about reloading this garbage

subtle blade
#

Oh yea, fetch previously then you're fine

#

get(), assign to variable, close result set

slim hemlock
#

I mean it works but sometimes it gets weird on reloads

gray pollen
#

i need help with Strikepractice dm me for help please

hallow surge
#

@lusty quiver if its only like 10 of your friends dont worry about it too much

dusty topaz
#
                MobCoinGainEvent mobCoinGainEvent = new MobCoinGainEvent(attacker, 1);
                Bukkit.getPluginManager().callEvent(mobCoinGainEvent);
                if (!mobCoinGainEvent.isCancelled()) { // throwing NPE ???
Caused by: java.lang.NullPointerException
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:493) ~[server.jar:git-TacoSpigot-fd3209f3]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) ~[server.jar:git-TacoSpigot-fd3209f3]
at net.alfiesmith.mobcoins.listener.EntityDeathListener.onEntityDeath(EntityDeathListener.java:35) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_242]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_242]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_242]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_242]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:300) ~[server.jar:git-TacoSpigot-fd3209f3]
    private boolean isCancelled;

    public MobCoinGainEvent(Player player, int amount) {
        this.player = player;
        this.amount = amount;
        this.isCancelled = false;
    }
#

Any reason why that line is throwing an NPE

lusty quiver
#

well, the "unknown command" stuff just annoys me is all, and not being table to tab to auto-finish commands @hallow surge

#

i'd go without permissions at all but, i don't feel like opping everyone just for worldedit

hallow surge
#

understandable

#

its likely an error in the plugins code

#

that just never added tab complete to it

#

for 1.15.2 atlesat

lusty quiver
#

yeah, it's just weird to me that it worked fine until i added groupmanager

hallow surge
#

ahhh

#

😄

#

nothing with essentials

#

possability your group doesnt have the permission to view the tab completion for that command or use it at all

#

@lusty quiver personally i reccomend pex or luck perms but ig its preference

#

as group manager is no longer supported it seemes like

#

Unfortunately I don't have as much time lately as I used to, so I cannot do what I wanted, and add new features to GroupManager. I am compiling for every new major Minecraft version and sometimes fixing bugs or updating deprecated code, but don't expect too much support. Development is taking place on GitHub, so feel free to contribute to the code base yourself, if you find something very important. I am really sorry if I respond late to your bug reports or messages.

lusty quiver
#

which do you think would be better? it's my first time using a permissions plugin at all so i'm really just experimenting

dusty topaz
#
Caused by: java.lang.NullPointerException
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:493) ~[server.jar:git-TacoSpigot-fd3209f3]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) ~[server.jar:git-TacoSpigot-fd3209f3]
at net.alfiesmith.mobcoins.listener.EntityDeathListener.onEntityDeath(EntityDeathListener.java:36) ~[?:?]
at sun.reflect.GeneratedMethodAccessor171.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_242]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_242]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:300) ~[server.jar:git-TacoSpigot-fd3209f3]
... 24 more
  MobCoinGainEvent mobCoinGainEvent = new MobCoinGainEvent(attacker, 1);
                Bukkit.broadcastMessage("pm null: " + (Bukkit.getPluginManager() == null));
                Bukkit.broadcastMessage("is null: " + (mobCoinGainEvent == null));
                Bukkit.getPluginManager().callEvent(mobCoinGainEvent);
                Bukkit.broadcastMessage("event called");
                if (!mobCoinGainEvent.isCancelled()) {
                    mobCoinsManager.incrementBalance(mobCoinGainEvent.getPlayer(), mobCoinGainEvent.getAmount());
                    messages.sendMessage(attacker, "mobcoins-gained", Messages.getPlaceholders("%amount%", String.valueOf(mobCoinGainEvent.getAmount())));
                }
#

pm null is false, mobcoin is null is false...

#

then call event throws a NPE

#

am i missing something or

naive goblet
#

Bukkit.getPluginManager() == null?

dusty topaz
#

wait, i think i've found the issue

#

and yea, i checked if the PM was null (just to confirm, doubted it would be) since calling the event threw an NPE

#

so i assumed either mobcoin event is null or the pm is null, and the event can't be null as i just instantiated it

hallow surge
#

@lusty quiver pex for sure than luck perms can get pretty complex

lusty quiver
#

cool, i'll try it out, thanks

dusty topaz
#

solved my own issue now anyway :p

lusty quiver
#

@hallow surge could you direct me to the official link for PEX? i can't seem to find it

void talon
#

Could anyone help me with bungecord

gray pollen
#

Does anyone know what strikepractice is? dm me pls if you do i need some hellp with it oim new to server
s

hallow surge
lusty quiver
#

oh lol, well thanks!

hallow surge
#

make sure to download vault!

gray pollen
#

No

#

@lusty quiver

#

I got pex

#

Here

#

gimme sec

#

k?

lusty quiver
#

uhh, alright

gray pollen
rapid yacht
#

Do I seriously have to pay $10 to change my spigot name :/

lusty quiver
#

does it run on 1.15.2?

gray pollen
#

Im pretty sure

#

it does

#

Does anyone know what strikepractice is? dm me pls if you do i need some hellp with it oim new to server
s

lusty quiver
#

i much prefer "definitely does" to "pretty sure it does"

gray pollen
#

It does

#

K?

#

and

#

Does anyone know what strikepractice is? dm me pls if you do i need some hellp with it oim new to server
s

hallow surge
#

@lusty quiver just download latest version

#

lol

gray pollen
#

y2k

#

i sent him

#

PEX

#

a jar file not a link

#

its the latest file soo

hallow surge
#

😐 wont learn if they dont do it themselves

gray pollen
#

i think it will work

terse river
#

How can I do this so that the Asynchronous Task inserts the variable that is not asynchronous into the "public string message"?

gray pollen
#

Does anyone know what strikepractice is? dm me pls if you do i need some hellp with it oim new to server
s

subtle blade
#
this.message = CompletableFuture.runAsync(() -> { 
    return "Hello";
}).join();```
#

join() will return the value in the completable future after it's completed and assign it

#

afaik it's non-blocking

gray pollen
#

Does anyone know what strikepractice is? dm me pls if you do i need some hellp with it oim new to server
s

hallow surge
#

Ed1ts stop spamming that

#

omg

sturdy oar
#

which do you think would be better? it's my first time using a permissions plugin at all so i'm really just experimenting
@lusty quiver yoyoyoyyo

#

Don't use pex

#

For God's sake

hallow surge
#

i directed to luck perms

#

Ed1ts gave pex

gray pollen
#

Does anyone know what strikepractice is? dm me pls if you do i need some hellp with it oim new to server
s

hallow surge
#

Shut up

gray pollen
#

HAHAH

hallow surge
#

he gave a jar file which is scarry

#

I would never download a jar file from discord

limber kindle
#

Hello,

I'm running a Bungeecord network with 1.15.2 spigot servers. I'm using a bungee plugin which adds a msg command. "whisper" is an alias for the msg command.

I'm having problems with tab completions. When I type in /msg, I see more than the playernames. I can see placeholder names from bungeetablistplus. When I use
the whisper command, I see player names only.

I guess the minecraft msg command adds those completions. Is it possible to turn that of for the specific command?

Tiippex

lusty quiver
#

yeahh, i didn't wanna say anything but there was no way in hell i was gonna download a raw jar file lmaooo

terse river
hallow surge
#

@lusty quiver luck perms

lusty quiver
#

yeah i'll try it out later

subtle blade
#

Sorry. It should be supplyAsync(), not run

hallow surge
#

official page and set up video @lusty quiver

lusty quiver
#

ty

hallow surge
#

HAHAH
Not a big fan of that

#

after i said he gave pex

terse river
#

Sorry. It should be supplyAsync(), not run
@subtle blade Thank you. It's working. If there are still errors because of this, I'll get back to you. ❀

#

@subtle blade I just heard that .join blocks the main thread until the task is completed. Is there another method without blocking the thread?

subtle blade
#

Docs say otherwise though PES_Think

#

Returns the result value when complete implies that it's a step

#

Ah I suppose not

#

See that's a weird one then because you're really not supposed to be able to assign values from a runnable

terse river
#

Actually I shouldn't worry about it, because actually only strings are set and nothing bigger?

barren abyss
#

Hi, is there anyway to make the zombie pig spawn agressive?, or any method to change their status?

wheat summit
#

I would like to get a player using a string name though when I checked out the method if(plugin.getServer().getPlayer("")) it seemed to be deprecated, is there a separate method I should use?

radiant pollen
#

It will still work

#

@wheat summit

wheat summit
#

Ok thanks

#

Also apparently setting a player banned is deprecated? I'm not sure though that seems pretty broad and weird that it's deprecated, does anyone know why?

#

I now see there's a BanList class though not completely sure how to use it ^, I tried assigning a variable to a new instance of it and called it directly though still couldn't exactly find the methods

silk gate
#

@subtle blade join will block

subtle blade
#

Then those docs are very misleading

#

Because what differentiates it from get()?

silk gate
#

if its not a callback itll block

#

uh not sure havent written java in forever lol

subtle blade
#

Inconsistent REEEEE

#

I now see there's a BanList class though not completely sure how to use it ^, I tried assigning a variable to a new instance of it and called it directly though still couldn't exactly find the methods
@wheat summit Bukkit.getBanList()

#

Oh that’s an old message lol sorry, but yea

wheat summit
#

Ok I'll try that out, thanks!

#

It's fine

silk gate
#

useless

subtle blade
#

Ah

#

Let’s you use exceptionally() instead of a try/catch basically

red kernel
#

Hey, I was playin around with the spigot-server and spigot-api and wanted to remove the loading-world screen for players, since a plugin for that already exists. But I wanted to ask how I can do that in the server code?

#

Please @ me when you answer :D

naive goblet
#

Very unspecific wym by removing the loading-world screen. In what context?

red kernel
#

When the player is changing the world

#

There is a plugin that does that, but it only works with ProtocolLib, so I can't really do what he does in the actual server since PLib is a plugin

naive goblet
#

Didn't know it was possible

red kernel
#

It is

naive goblet
#

screen?

#

or like do you have a video?

#

feels very impossible to me

red kernel
#

It just cancels the PacketSendEvent of the loading screen

naive goblet
#

hmm that's intressting

red kernel
#

Jup

#

And I'm trying to implement that in the server itself (For personal use

#

)

naive goblet
#

clone the repo?

#

to ur ide?

red kernel
#

The problem is that it uses ProtocolLib

naive goblet
#

why is that a problem?

red kernel
#

How am I supposed to use ProtocolLib inside the server itself

#

It's a plugin

subtle blade
#

He wants to patch the server and make a custom build

red kernel
#

^

frigid ember
#

Question for any server owners out there. My admins and I are trying to figure out if we should remove towny and go with a different claim system. After some research, it seems that even with servers that are advertising, they don't have towny.

towny.... is tough. it's hard to retain new players because of the process of joining a town. it's not simple at all, but when a town is set up and all, it's great. But then again these great towns could've been done with any other plugin.

Towny just makes it hard to retain new players, it's just so complicated.

thoughts?

red kernel
#

Just use nations or factions

wheat summit
#

Sorry for the ping @subtle blade though what would go as a parameter in the Type field?

subtle blade
#

Forrrr..?

#

Sorry I forgot what I helped you with already 😅

#

OH

wheat summit
#

The Bukkit.getBanList()

subtle blade
#

BanList.Type I think is the enum or something

wheat summit
#

It's fine

subtle blade
#

IP or NAME

#

I think name uses UUIDs though

wheat summit
#

Ok

subtle blade
#

idk. I don't remember. It's probably still names

wheat summit
#

I see now, thanks!

#

Do you have an idea of what the source parameter means?

subtle blade
#

i.e. the person that banned them

wheat summit
#

Ok thanks

frigid heath
#

do PotionEffect's amplifiers start from 0 or 1?

naive goblet
#

0 iirc

frigid heath
#

thx

finite crescent
#

?jd

worldly heathBOT
neon matrix
#

How does bukkit create the plugin dependency graph?

#

I am trying to build my own plugin system (independent of minecraft) and was using bukkit as an example, but I cant figure out load order.

agile girder
#

Why almost all chat plugins work until 1.14.4

#

1.15.2 doesnt support that or what?

#

I've been trying to add a Simple plugin that works as a AntiSwearing but no one works.

frigid ember
#

Hi guys, I have Quickboard installed and whenever I modify the scoreboard to be how I want it to be, it just doesn't show up, until I put it back into the original installation state. Anything I can do, thanks!

dry kiln
#

is it possible to stop the night skip when sleeping

#

I want to make it so players have to sleep through the night

fleet crane
#

TimeSkipEvent.setCancelled

dry kiln
#

Ah i was looking for a SleepSkipEvent

#

no wonder i couldnt find it

#

Thanks

#

👏

rain plank
#

Anyone willing to help me with setting up voting on my server, message me!

frigid ember
#

Do you guys have a favorite gui/inventory library?

red zenith
#

@frigid ember Did you set the proper permissions for your scoreboard?

mystic mango
#

Hey Guys ! I know spigot don't really support NMS modifications, but does someone have enought experience with containers to tell me how to add custom slots to the player inventory, I modified everything I could find about PlayerInventory in the Spigot/Spigot-API but I still can't save/use my slots. Thx for your help 😄 !

fleet crane
#

you'll never be able to see the new slots though

dry kiln
#

You could make an icon in the inventory which goes to a "second page" of the inventory

#

but you cant really make new slots

tall crystal
#

how can I make blockdata? I want to set the note blockdata of a noteblock

mystic mango
#

you'll never be able to see the new slots though
@fleet crane I'm using a moded client

#

It does look like that :p

#

I prefectly works on client side, but it brakes down when I try to add the slots in spigot 😩

lean stratus
#

does anyone know how to make world border a rectangle instead of a square shape?

small citrus
#

so its my first time creating a plugin and first time messing around with java and stuff. I am using intellij ide and when i try to add a event handler, the function name and the import thing are grey. Is that normal?

tall crystal
#

the function name will be grey because the ide thinks its not being used but it will as long as you set it up correctly

small citrus
#

ok thanks

#

also did i do this right?

@EventHandler
public void PlayerInteractEvent(Action action, Block block, BlockFace face, ItemStack stack) {
    
}
tall crystal
#

umm not sure about that one usually I do ```java
public void onInteract(PlayerInteractEvent e) {

}```

small citrus
#

ohhhh thats a class

#

im dumb

compact isle
#

Hey so im trying to spawn an armorstand on server launch at a specific location, how can I do that?

tall crystal
#

oh you mean on server startup after the world loads?

compact isle
#

yes

#

not command based, just after world load

tall crystal
#

you building a plugin or no?

compact isle
#

Yes, its been several years since ive touched this stuff, a lot has changed. The way I was doing it is deprecated

#

and just doesnt spawn

tall crystal
#

ok so you got the plugin.yml down?

compact isle
#

yea

#

How do I post code on discord?

tall crystal
#

with `\

#

do ```java

compact isle
#
@Override
    public void onEnable() {
        
        spawnStand(new Location(Bukkit.getWorld("World"), 136, 64, -174));
        
        
    }
    
    private void spawnStand(Location location) {
        
        ArmorStand stand = (ArmorStand) location.getWorld().spawnEntity(location, EntityType.ARMOR_STAND);
        
    }
tall crystal
#

last time I did something like that I did java Bukkit.getWorld("world").spawn(new Location(), ArmorStand.class);

small citrus
#

how do i get the item from onInteract()?

#

i tried using e.getItem() == new ItemStack(Material.STICK) but its not working

tall crystal
#
@EventHandler
    public void onNoteBlockHit(PlayerInteractEvent e) {
        if(e.getClickedBlock() != null) {
            if (e.getClickedBlock().getType().equals(Material.NOTE_BLOCK) && e.getPlayer().isSneaking() && e.getAction().equals(Action.LEFT_CLICK_BLOCK)) {
            }
        }
    }
#

something like that

small citrus
#

thanks

tall crystal
#

yep 😄

small citrus
#

would that work for items too?

tall crystal
#

like the ones in your inventory that you hold?

small citrus
#

yea like a stick or something

tall crystal
#

ya you would use the getHand() method

#

rather the getItem()

small citrus
#

wait so what do i replace

#

is this right? e.getHand().equals(Material.STICK)

tall crystal
#

it would be e.getItem().getType().equals(Material.STICK)

#

sorry misread what getHand() was

small citrus
#

thanks

tall crystal
#

yep 😄

small citrus
#

where is the list of events i can use in the documentation

small citrus
#

but where are the events i can use?

frigid ember
tall crystal
#

what do you mean you can use all of those

small citrus
#

like example

tall crystal
#

you can't store it in a variable? @frigid ember

small citrus
#

where would i find onInteract

small citrus
#

i cant find onInteract on there

tall crystal
#

onInteract is just a method name

#

when making a method for an event you can name the method whatever you like as long as PlayerInteractEvent is a variable in the method and you have the @EventHandler above it

small citrus
#

ohhhhhhhhhhhhhhhhhhhhhhhhhhh

lean stratus
#

does anyone know how to make world border a rectangle instead of a square shape?

rain plank
#

Use this option to force superperms-based permissions handler regardless of detected installed perms plugin.

This is useful if you want superperms-based permissions (with wildcards) for custom permissions plugins.

If you wish to use EssentialsX's built-in permissions using the player-commands section above, set this to false.

Default is true.

use-bukkit-permissions: false

Does this have to be true in order for people to have to tpaccept instead of automatically teleporting.

frigid ember
#

whats the best way to open and inventory for someone?

tropic nacelle
#

E

rain plank
#

/invsee

frigid ember
#

What....

#

i am talking about opening an inventory i made, i get p.openInv and stuff but it seems to lag the server.

heady jolt
#

then something wrong with ur code

frigid ember
#

How so.

heady jolt
#

Then how p.openInventory cause your server to halt

#

😎

frigid ember
#

Wouldn’t have a clue, all it does is make an intentory get the servers from a config duke in a forloop as you can have as many servers as you want then return the inventory then open the inventory by getting the method

lean stratus
#

does anyone know how to make world border a rectangle instead of a square ?

heady jolt
#

You try to open a menu just like you state in a config? Then open it for player?

tall crystal
#

@lean stratus I don't think such thing is possible currently

idle zodiac
#

Method method = EntityType.class.getDeclaredMethod("a", Class.class, String.class, int.class);
this returns that method "a" doesn't exist.

I'm using 1.8.R3 and I know some methods were renamed.
I was just wondering if you know what "a" was renamed to.

#

EntityType is in Spigoty

#

nvm

#

I was using EntityType not EntityTypes

#

my brain lol

lean stratus
#

Oh ok

#

Is there any other plugins that work similar

pastel fox
#

What's the event for an arrow hitting a wood button?

heady jolt
#

ProjectileHitEvent#getHitBlock

pastel fox
#

Ty

torn robin
#

Is there not a better way of getting a player's ping that doesn't involve CraftPlayer? (1.15.2)

obtuse rose
#

nop

#

actually, you could use protocollib to intercept ping packet

#

but using CraftPlayer would be much easier

#

@torn robin

torn robin
#

oof, ok ty

#

and yeah ProtocolLib would be hella extra just for that

hearty quarry
#

Hello, can you change from PaperMC to Spigot? What if I do?

torn robin
#

most plugins should be compatible with spigot

hearty quarry
#

Well, I downloaded all the plugins in Spigot and Bukkit ...

frigid ember
#

What Java SDK can I use for Minecraft AntiCheats?? Spigot btw :>

torn robin
#

Anything 8+

#

I'd recommend just using the latest though

#

keeping in mind a large amount of servers are on 8

frigid ember
#

java 14 👌

tawdry venture
#

does the metatata stays on player if he disconnects?

sturdy oar
#

Small question:_

#

I've been testing my plugin and I've noticed SQLite didn't quite work in 1.8

#

Is it because Spigot 1.8.8 didn't shade in the driver?

fleet crane
#

It definitely did

pastel fox
#

For this code:

Player p = ...;
ItemStack book = new ItemStack(Material.WRITTEN_BOOK);

p.openBook(book);

The book contains red text: * Invalid book tag *

#

Does the book item have to be in the player's inventory?

naive goblet
#

I think you have to edit something like a bookmeta iirc

pastel fox
#

I'll try re-setting the meta values ty

#

It doesn't help unfortunately:

BookMeta bm0 = (BookMeta) book.getItemMeta();
bm0.setTitle("Blank");
bm0.setGeneration(BookMeta.Generation.ORIGINAL);
bm0.setPages("");
book.setItemMeta(bm0);
#

I tried it with just the title, and just the pages

silk bane
#

i think they have to be holding the book

pastel fox
#

Ah and there's no way to bypass that?

silk bane
#

i screwed around with this a few weeks ago and I ended up saving the item in their hand, and giving them the book before opening it

#

i think you can take the book away as soon as its open tho - it doesn't have to stay in their hand

pastel fox
#

Ah ty, makes sense

tawdry venture
#

heyya if I want to work with nms, how do I exactly add it to dependencies with maven?

terse river
pastel fox
#

Here's another question- shouldn't it be WRITEABLE_BOOK and not WRITTEN_BOOK?
Caused by: java.lang.IllegalArgumentException: Book must be Material.WRITTEN_BOOK
When I use WRITTEN I get this error

#

Also it still says invalid book meta

#

@terse river if handle is an abstract function you can't call it

#

It has no body

#

Abstract means that someone has written the function header (name, return type and arguments) but not written any code for it

terse river
#

Abstract means that someone has written the function header (name, return type and arguments) but not written any code for it
@pastel fox But how else can I call the function?

pastel fox
#

@terse river some class will extend the class that has that function and it will be implemented there without the abstract keyword

#

Or maybe you have to implement it, Idk what that library is that you're using

#

But most probably the first thing I said

#

@silk bane ok so, AFAIK it's impossible to force open a book and quill- only written books

#

so rip

terse river
#

@terse river some class will extend the class that has that function and it will be implemented there without the abstract keyword
@pastel fox But why can I call the function in the Main class?...

#

Ah ik

#

The file must be in the same package as the other one. Now it works.

pastel fox
#

@terse river not sure, if you can call in main class but not in another package I guess it's the access level

#

Yeah

#

You implemented it without using the public keyword maybe? That limits it to files in the same package

terse river
#

yeah

empty salmon
#

Can anyone help? I have a command that takes a player to a different world and I have an event that handles world change. Is there a way that I can stop the event from running when the command is run?

naive goblet
#

Cancel the event?

empty salmon
#

Only on command though

naive goblet
#

No I don’t think so why?

empty salmon
naive goblet
#

That has really nothing todo with it?

empty salmon
#

Making your CustomEvent Cancellable If you ever want to make your event cancellable, remember one thing: "implements Cancellable." Just like you would import Listener. It's really that simple, let me show you an example!

#

Its at the bottom

#

I wondered how I could cancel it for the command this way?

naive goblet
#

This wouldn’t cancel the world change event

#

And it’s most likely completely unnecessary unless you’re making your own api

empty salmon
#

Okay

idle zodiac
#

how would i go about making a custom crafting recipe using a custom itemstack to produce a custom itemstack in 1.8?

jaunty night
#

Hello I'm trying to spawn custom entities. I have a class called DummyZombie which I extends the NMS Zombie, I have a class called CustomEntities which I use for storing the constants and I have a class called CustomEntityType which I use to register the custom entity. Problem is when I spawn the zombie it spawns a pig however the pig acts exactly like a zombie, burns in the daylight, kills the player, etc...

DummyZombie: https://hastebin.com/medeqemima.java
CustomEntityType: https://hastebin.com/uxitoxuqum.java
CustomEntities: https://hastebin.com/cunonebunu.java
Command I use to spawn the entity: https://hastebin.com/febuqulobo.java

idle zodiac
#

lol

jaunty night
#

There is no stack trace incase you ask

naive goblet
#

Yeah

rain plank
#

Is there anyone on who would be willing to help me with the voting plugin configs with votifier?

naive goblet
#

@jaunty night

#

?ask @rain plank

worldly heathBOT
#

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.

rain plank
#

What

jaunty night
#

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.
@worldly heath

rain plank
#

That’s what I did, I’m at work so I meant anyone on in general — at any part of the day. đŸ„°

idle zodiac
#

...

#

how would i go about making a custom crafting recipe using a custom itemstack to produce a custom itemstack in 1.8?

#

sorry

#

oops

naive goblet
#

The API takes custom ItemStacks when managing recipes?

jaunty night
#

@naive goblet Thing is I do change the network id dataTypes.put(key.toString(), dataTypes.get(parentType.h().toString().replace("entities/", "")));, unless that's not what you mean

#

in CustomEntityType