#help-archived

1 messages · Page 220 of 1

wispy pewter
#

Olivo, stop making this man confused

#

😂

mellow wave
#

xd

#

Take over then

wispy pewter
#

No, I'm eating bread atm

#

Loaf of bread*

warm stirrup
mellow wave
#

Yes that's how it's done

warm stirrup
#

ok ty

wispy pewter
#

Big brain exposed

#

@mellow wave Hey come dm

upper skiff
#

Why is PayPal putting all my spigot plugin sales on hold?

#

how do I even confirm a payment if they want me to set it as “shipped”? Doesn’t the plugin just outright not go to the buyer unless the transaction is okay? Do I issue refunds or what’s supposed to happen?

grim halo
#

I... think you should ask them and not us...

#

(them = PP)

upper skiff
#

Am planning to give PayPal a call tonight

#

Just asking here, was hoping someone ran into something similar

tiny dagger
#

are you new into your paypal account?

upper skiff
#

Yes

tiny dagger
#

well that's the reason

upper skiff
#

just changed accounts

#

but how do I solve it

tiny dagger
#

the reason for holds are either if you're new or the buyer is new or not safe

#

i doubt

#

you need to verify it

#

or it fixes itself with time

#

i forgot

grim halo
#

This could also be caused by too many ppl demanding a refund

upper skiff
#

You mean I can’t verify each transaction? It makes things very complicated though

vernal spruce
#

CrouchToggle..

grim halo
#

@tranquil plaza What... There is a crouch event...

vernal spruce
#

whoops wrong event

grim halo
#

PlayerToggleSneakEvent

upper skiff
#

Because PayPal says a bunch of on-hold payments will be cancelled soon

vernal spruce
#

wrong name actually*

glad summit
#

Hey everyone!
I have a question/bug regarding aliases
I am new to Spigot, and haven't checked if this problem exists in other versions besides latest (1.16.1)

The problem is:
My aliases are registered to the command list in the server (they are suggested in the tab completer if I just press /)
But most of them aren't really registered, meaning I get Unknown command. Type "/help" for help when I call the command using the alias.

plugin.yml as follows:

commands:
  addGravityBlock:
    description: Add a gravity affect to a block.
    usage: "§4Usage: /addGravityBlock <block> <gravity>"
    aliases: [gb, gbAdd]
  removeGravityBlock:
    description: Remove a gravity affect from a registered block.
    usage: "§4Usage: /removeGravityBlock <block>"
    aliases: [gbRemove, gbRem]
  listGravityBlocks:
    description: List all blocks registered with a gravity affect.
    usage: "§4Usage: /listGravityBlocks"
    aliases: [gbs, gbList]
grim halo
fading frost
#

Amazing

frigid ember
#

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {

    public void onEnable() {
        this.getServer().getPluginManager().registerEvents(new NetherStar(), this);
    }
    
    public void onDisable() {
        
    }
    


    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (label.equalsIgnoreCase("plugintest")) {
            Player player = (Player) sender;
            player.sendMessage(ChatColor.AQUA + "" + ChatColor.BOLD + "This plugin exists!");
            return true;
        }

        return false;
    }

}```
i  have this and i exported it but whenever i do /plugintest it doesn't work
grim halo
#

You have to register the command.

#

this.getCommand("plugintest").setExecutor(this); In onEnable

frigid ember
#

@upper skiff you swapped accounts so you're not a 'verified' seller by paypals terms anymore. Transactions will auto be put on hold for that reason.

I can't really give any info on them being cancelled though as usually they are just delayed for me, I also personally send money to my new paypal using "good and services" and get myself 'verified' before actually using it for selling(Altho I might have to not do it this time since I didn't give myself enough time)

And I think "Order Processed" is better than shipped since you're not shipping anything(also why that option will auto disable tracking information not required)

halcyon snow
#

did you forget to annotate that method with @EventHandler?

upper skiff
#

@upper skiff you swapped accounts so you're not a 'verified' seller by paypals terms anymore. Transactions will auto be put on hold for that reason.

I can't really give any info on them being cancelled though as usually they are just delayed for me, I also personally send money to my new paypal using "good and services" and get myself 'verified' before actually using it for selling(Altho I might have to not do it this time since I didn't give myself enough time)

And I think "Order Processed" is better than shipped since you're not shipping anything(also why that option will auto disable tracking information not required)
@frigid ember Order processed seems to imply the product wasn’t given yet

frigid ember
#

@grim halo

#

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {

    public void onEnable() {
        this.getServer().getPluginManager().registerEvents(new NetherStar(), this);
        this.getCommand("plugintest").setExecutor(this);
    }
    
    public void onDisable() {
        
    }
    

@Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (label.equalsIgnoreCase("plugintest")) {
            Player player = (Player) sender;
            player.sendMessage(ChatColor.AQUA + "" + ChatColor.BOLD + "This plugin exists!");
            return true;
        }

        return false;
    }

}``` this still doesn't work
#

do i need the @Override

#

or @eventHandler

hollow thorn
#

for(int i=0; i>= e.getBoundingBox().getHeight();i++){
loc2.setY(loc2.getY()+1);
if(e.getLocation().distanceSquared(loc)<=r){
ent.add(e);
i=(int) e.getBoundingBox().getHeight();
} does this work?

#
                loc2.setY(loc2.getY()+1);
                if(e.getLocation().distanceSquared(loc)<=r){
                    ent.add(e);
                    i=(int) e.getBoundingBox().getHeight();
                }```
frigid ember
#
If you sold a product, select Shipped in the order status dropdown. Type in the tracking information and select the shipping carrier.
If you sold an intangible item or service, select Order Processed ('Tracking information not required' will be checked).

I think in the terms of virtual goods order processed fits it more properly.

#

?

hollow thorn
#
                loc2.setY(loc2.getY()+1);
                if(e.getLocation().distanceSquared(loc)<=r){
                    ent.add(e);
                    i=(int) e.getBoundingBox().getHeight();
                }```

@hollow thorn i have reason to believe that this crashes the server

#

please halp

#

@h ere

#

@her e

#

@he re

frigid ember
#

why is the loop checking for >=

hollow thorn
#

thats the thing to see if the location is so and so far away from r

#

which is an input variable for radius

frigid ember
#

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {

    public void onEnable() {
        this.getServer().getPluginManager().registerEvents(new NetherStar(), this);
        this.getCommand("plugintest").setExecutor(this);
    }
    
    public void onDisable() {
        
    }
    

@Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (label.equalsIgnoreCase("plugintest")) {
            Player player = (Player) sender;
            player.sendMessage(ChatColor.AQUA + "" + ChatColor.BOLD + "This plugin exists!");
            return true;
        }

        return false;
    }

}``` this still doesn't work

@frigid ember @frigid ember

#

do you know why?

#

🤔 why am I being tagged for this

#

idk i need help

#

kek

hollow thorn
#

does it output errors

frigid ember
#

no

hollow thorn
#

if you do /plugins does your plugin show in red or green

frigid ember
#

all green

#

but it doesn't even show up there

hollow thorn
#

meaning that it failed to load

#

this.getServer().getPluginManager().registerEvents(new NetherStar(), this); what is nether star

frigid ember
#

import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryType.SlotType;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.inventory.ItemStack;


public class NetherStar implements Listener{
    
    ItemStack netherStar = ItemFactory.createItem("Skyblock Menu", ChatColor.RESET, Material.NETHER_STAR, null);
    
    @EventHandler
    public void onInventoryClick(InventoryClickEvent event) {
        
        if (event.getSlotType() == SlotType.QUICKBAR) {
            if (event.getSlot() == 0) {
                event.setCancelled(true);
            }
        }

    
    }
    
    public void onPlayerJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        player.getInventory().setItem(0, netherStar);
    }

}```
torn robin
#

extend javaplugin

frigid ember
#

extend javaplugin
@torn robin wdym, instead of implements listener?

vernal spruce
#

??

hollow thorn
#

all green
@frigid ember does your plugin show any errors on server launch (failed to launch [PLUGIN NAME] plugin

frigid ember
#

no

hollow thorn
#

this.getCommand("plugintest").setExecutor(this); this shouldnt be needed

#

but even if it you didnt have it i dont think that would have an effect

#

have you tried doing /reload and then doing the command

frigid ember
#

@frigid ember public class NetherStar extends JavaPlugin implements Listener
@tranquil plaza i did this and still doesn't work

#

yeah euan

hollow thorn
#

what api do you use

frigid ember
#

me?

hollow thorn
#
                loc2.setY(loc2.getY()+1);
                if(e.getLocation().distanceSquared(loc)<=r){
                    ent.add(e);
                    i=(int) e.getBoundingBox().getHeight();
                }```
@hollow thorn WHY THIS NO WORK
burnt bay
#

Is someone able to help me include a local maven repo in a gradle project?
Just a jar file as a repo
A plugin I'm trying to compile requires WorldGuardExtraFlags

scenic carbon
#

when you ping yourself

hollow thorn
#

dont make me do it

#
                loc2.setY(loc2.getY()+1);
                if(e.getLocation().distanceSquared(loc)<=r){
                    ent.add(e);
                    i=(int) e.getBoundingBox().getHeight();
                }```

@hollow thorn halp

glad summit
#

Dude, Euan, relax.
If nobody answered you they probably aren't going to.
Sending the same message 100 times is just annoying.

#

You're missing @EventHandler in the last method

rain monolith
#

JoinListener.java

package de.jann.challenges.listeners;

import org.bukkit.Material;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;

public class JoinListener implements Listener {

    @EventHandler
    public void onJoin(PlayerJoinEvent e) {
        e.setJoinMessage("§6The challenger " + e.getPlayer().getDisplayName().toString() + " has joined :D.");
        //
        ItemStack challenge_item = new ItemStack(Material.REDSTONE);
        ItemMeta challengeitemMeta = challenge_item.getItemMeta();
        challengeitemMeta.setDisplayName("§6Challenge-Item");
        challenge_item.setItemMeta(challengeitemMeta);
        //
        boolean exists = false;
        for(ItemStack item : e.getPlayer().getInventory().getContents()) {
            if(item.getItemMeta().getDisplayName().toString() == "§6Challenge-Item") {
                exists = true;
            }
        }
        if(exists == false) {
            e.getPlayer().getInventory().addItem(challenge_item);
        }
    }
}

Console:

hollow thorn
#
                loc2.setY(loc2.getY()+1);
                if(e.getLocation().distanceSquared(loc)<=r){
                    ent.add(e);
                    i=(int) e.getBoundingBox().getHeight();
                }```

@hollow thorn

#
                loc2.setY(loc2.getY()+1);
                if(e.getLocation().distanceSquared(loc)<=r){
                    ent.add(e);
                    i=(int) e.getBoundingBox().getHeight();
                }```
frigid ember
#

still nope

#

@tranquil plaza

worldly heathBOT
frigid ember
#

?

rain monolith
#

Caused by: java.lang.NullPointerException at de.jann.challenges.listeners.JoinListener.onJoin(JoinListener.java:23) ~[?:?]

hollow thorn
#

does it detect the plugin and try to launch it on startup

frigid ember
#

i don't think so

#

no

rain monolith
#

I have this error: Caused by: java.lang.NullPointerException at de.jann.challenges.listeners.JoinListener.onJoin(JoinListener.java:23) ~[?:?]

glad summit
#

@rain monolith Which line is #23?

hollow thorn
#

line 23 has a null

#
                loc2.setY(loc2.getY()+1);
                if(e.getLocation().distanceSquared(loc)<=r){
                    ent.add(e);
                    i=(int) e.getBoundingBox().getHeight();
                }```
#

halp

#
                loc2.setY(loc2.getY()+1);
                if(e.getLocation().distanceSquared(loc)<=r){
                    ent.add(e);
                    i=(int) e.getBoundingBox().getHeight();
                }```
#

halp

#
                loc2.setY(loc2.getY()+1);
                if(e.getLocation().distanceSquared(loc)<=r){
                    ent.add(e);
                    i=(int) e.getBoundingBox().getHeight();
                }```
#

halp

rain monolith
#

@glad summit if(item.getItemMeta().getDisplayName().toString() == "§6Challenge-Item") {

#

I don't no what I have to write 😄

hollow thorn
#

add a @NotNull tag

#

or another not null check

#

for ItemMeta

frigid ember
#

?

rain monolith
#

How euan?

hollow thorn
#

item.getItemMeta()!=null

glad summit
#

Use, item.hasItemMeta()
Instead

frigid ember
#

no work

#

:(

#

no error

rain monolith
#

thank you euan

glad summit
#

@tranquil plaza you forgot to add OnEnable and register this as a listener

sharp cradle
#

weird question: how do I crash the server?

glad summit
#

Close the cmd window?

hollow thorn
#

weird question: how do I crash the server?
@sharp cradle time out the cmd

#

you could us something such as

#

while true{}

frigid ember
#

still no

#

damn it

glad summit
#

You sure there's nothing in console?
add a console print in OnEnable - see if that ever happens.

hollow thorn
#

?paste

worldly heathBOT
hollow thorn
sturdy oar
#

@glad summit if(item.getItemMeta().getDisplayName().toString() == "§6Challenge-Item") {
@rain monolith do not compare strings with '=='. Java basics

glad summit
#

Euan stop spamming.

hollow thorn
grim halo
#

I was about to help... but i guess you have to google now.

glad summit
#

^^

burnt bay
#

Is someone able to help me include a local maven repo in a gradle project?
Just a jar file as a repo
A plugin I'm trying to compile requires WorldGuardExtraFlags

vernal spruce
#

also rather hilarious

#

that it ltierally says the problem

#

not sure whats so hard in reading a error

glad summit
#

@burnt bay Sorry man, I am clueless with Gradle and Maven...
Tried googling it? Sounds like a relatively common question

hollow thorn
vernal spruce
#

google the error

burnt bay
#

I did but I just couldn't figure it out. Thanks anyway

hollow thorn
#

thats not how mafia works

vernal spruce
#

also it literally says what the problem is,spam more and the mods might warn you @hollow thorn

hollow thorn
#

so do bot warns mean nothing then

vernal spruce
#

get enough and ur banned from the discord

hollow thorn
#

oh great so ill need 2 accounts

vernal spruce
#

you can make 10

#

if you cant read a stacktrace its a problem for you

grim halo
#

But you can only connect one with your spigot acc

glad summit
#

Euan stop. If you want anyone to help you, be a bit more mature and patient.

vernal spruce
#

also its ironic that all you need is a pair of eyes to even see what the error is

hollow thorn
#

there is a difference inbetween patience and waiting so long tha lockdown ends for something to happen

vernal spruce
#

Caused by: java.lang.NoClassDefFoundError: com/javaminecraft/StaffWeaponUse$2 at com.javaminecraft.StaffWeaponUse.onStaffWeaponUse(StaffWeaponUse.java:221) ~[?:?]

hollow thorn
#

that code was unchanged since the last edit

vernal spruce
#

it literally points you

#

to the line the error is at

hollow thorn
#

and ive checked it to no availe

#

its a red herring by the looks of it

#
                                  @Override
                                          public void run(){```
glad summit
#

With all due respect, man, it has been barely 20 minutes since your first message.
We're not your slaves, and we don't owe you any of our time.
If you can't figure it out yourself - post a question on the forms and wait.

hollow thorn
#
                                  @Override
                                          public void run(){
                                              Player me = e.getPlayer();
                              Location loc = me.getEyeLocation();
                              World world = me.getWorld();
                                  loc = loc.add(loc.getDirection());
                              int f =100/30;
                              int i = 100/30;
                              i = ((Damageable) em).getDamage() - f;
                              ((Damageable) em).setDamage(i);
                              while(loc.getBlock().getType() == Material.AIR) {
                    loc = loc.add(loc.getDirection());
                    world.playEffect(loc, Effect.SMOKE, 500);
                    world.spawnParticle(Particle.CRIT, loc, 0);
                    world.playSound(loc, Sound.ENTITY_IRON_GOLEM_HURT, 1, 1);
                    for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
                        if(ent instanceof LivingEntity) {
                            if(!(ent.equals(me)))
                            ((LivingEntity) ent).damage(10, me);
                            
                            
                        }
                        
                    }
                }}}.run();```
#

also my first message was asking for help on another problem

#

and was literally ignored

glad summit
#

Well, you don't always get what you want. Grow up and use google/the forms.

sturdy oar
#

I don't understand people that use BukkitRunnable

#

when you can use anonymous classes with lambda

hollow thorn
#

what elese should i use

hollow thorn
#

i dont know what lambda is

frigid ember
#

that's all my classes

glad summit
#

Lol yeah, Viper, it is deprecated - no?

hollow thorn
#

how do i get an equation from a message
@hollow thorn this was one of the older messages 10:21

sturdy oar
#

I don't know, but it's still looks bad and adds so many unnecessary lines of code

#

() -> {}, is way shorter

hollow thorn
#

seemed to be a reload problem

#

sorry

#

also for some reason my plugin only starts on reload

frigid ember
#

How to use getBlockState() ?? These method is unknown

sturdy oar
#

Version?

frigid ember
#

1.16.1

glad summit
#

You'll have to be a bit more clear, if you want help...
What is the question? What is the context?

sturdy oar
frigid ember
#

hm

#

ne sce

hollow thorn
#

what class is endcrystal stored under

glad summit
#

Palm, look at what SteelPhoenix replied to your post.

frigid ember
#

i already did that

#

still no work

tranquil aurora
#

java: cannot find symbol
symbol: variable ARMOR_STAND
location: class org.bukkit.entity.EntityType

why am I getting this error?
Im trying to compile a premade plugin

frigid ember
#

this server blows incredible winds ...

#

1.8

#

ok

glad summit
#

@tranquil aurora Can you show the code that brings up this error?
Also, give additional info - version, intention, etc.

frigid ember
#

1.8.8

tranquil aurora
#

@tranquil aurora Can you show the code that brings up this error?
Also, give additional info - version, intention, etc.
@glad summit do you want me to link the github?

#

im getting all these errors

glad summit
#

That works, yes, if it recent code

tranquil aurora
glad summit
#

Just to make sure, did you add the Spigot jar to your project?

tranquil aurora
#

yep

#

all .dependencies

glad summit
#

Version?

bleak plaza
#

Hey. Can bungee be with 2 different versions spigot servers ?

frigid ember
#

?

bleak plaza
#

For example 1.15.2 and 1.12.2

hollow thorn
#

why isnt The EndCrystal under LivingEntity

#

and how do i damage it

#

Hey. Can bungee be with 2 different versions spigot servers ?
@bleak plaza i guess you could combine it with waterfall or some other cross version thingy

winged umbra
#

Spigot is having issues

ancient ridge
#

Working fine for me

lunar widget
#

how to make that every 5 minutes something happense

odd knoll
#

Use the bukkit scheduler.

lunar widget
#

ok

odd knoll
#

scheduleSyncRepeatingTask

frigid ember
#

i di not

formal nimbus
#

does anyone know what this means?

#

Caused by: java.lang.UnsupportedClassVersionError: me/palm/menu/Main has been compiled by a more recent version of the Java Runtime (class file version 58.0), this version of the Java Runtime only recognizes class file versions up to 52.0

torn robin
#

update your java

formal nimbus
#

ah ok

sturdy oar
#

Isn't 52

#

Like java 5

subtle blade
#

8

bold anchor
#

lol

#

58 is J14

subtle blade
#

yep

#

you've compiled your plugin using 14 but are running it on a java 8 server

#

java is forwards compatible, not backwards compatible

sturdy oar
#

I compile with Java 8 usually

#

With AZUL ZULU Jdk

burnt bay
#

Hey guys I'm still unable to get this gradle project running, is there anyway I could get someone to try to reproduce what I'm having issues with?

formal nimbus
#

there's a windows x86 now?

grim halo
#

32 bit

formal nimbus
#

o

#

is there a way I can download JDK 1.8 without having to make an origin account?

#

I'm trying to find a link but the only place I can seem to find is on origin's sight

subtle blade
#

Would have to use another project. AdoptOpenJDK is typically the go-to one

formal nimbus
#

hmm?

#

wdym use another project?

#

as in make a new one?

subtle blade
#

No no just another JDK

#

i.e. instead of installing Oracle's implementation, install a different one

formal nimbus
#

oh

subtle blade
#

Again, AOJDK is the preferred alternative for most - myself included

formal nimbus
#

so this 🙂

subtle blade
#

Yes 🙂

formal nimbus
#

sick

#

I can't remember how I got my JDK, (this is for a friend)

#

but I don't think I went through ehre

odd knoll
#

IntelliJ offers a downloader inside the IDE IIRC.

frigid ember
#

ok

#

this link

#

i downloaded it and

#

it gives me a .msi

odd knoll
#

Click it and it will install it.

subtle blade
#

Microsoft Installer

frigid ember
#

yeah but it gives me a .msi

#

file

#

and i can only import .jar

subtle blade
#

Yeah... it's an installer

#

Double click the MSI to install it

frigid ember
#

OH

#

k

#

but where

#

there is so much

#

like

#

it comes

odd knoll
#

What? You just double click the file in your downloads folder. Don't open it with your IDE or anything.

frigid ember
#

bruh

blazing burrow
#

hey guys im having problems with detecting the material a player is standing on

frigid ember
#

i downloaded it and it went into programfiles

odd knoll
#

Yes, because it's a program.

#

JDK is not a JAR file.

frigid ember
#

so what do i do

odd knoll
#

What IDE are you using?

frigid ember
#

Eclipse

rare prairie
#

Seems, like you a very beginner of installing programs/applications

odd knoll
#

Ok IDK then.

frigid ember
#

bruh

rare prairie
#

bruh

#

okn't

frigid ember
#

like

blazing burrow
rare prairie
spring parrot
frigid ember
#

so

#

what do i do now

#

i clicked add external jars

#

but what jar do i select

rare prairie
#

add library instead

frigid ember
#

oh

blazing burrow
#

@rare prairie it didnt work

#

i tried to do the same thing

rare prairie
#

@rare prairie it didnt work
wat

blazing burrow
#

but when it stood on the block it wouldnt say "you found your block!"

frigid ember
#

rhen what do i choose

rare prairie
#

library

frigid ember
#

yep

#

now i have

#

execution environment

#

alternate jre

#

and workspace default

#

which one?

frigid ember
#

it WOrk

blazing burrow
odd knoll
#

They're on Eclipse.

rare prairie
#

but when it stood on the block it wouldnt say "you found your block!"
BSIsOn can be false if you're doing something wrong, p1loc block where you stand can be air, you have to make a new location, like new Location(getX, getY - 1, getZ) to make sure where the player standing that is a block

undone narwhal
#

Is it possible to disallow the server to generate new chunks?

rare prairie
#

May be listens to chunk generation events?

undone narwhal
#

We can't actually cancel them

rare prairie
#

great

rain monolith
#

Can I disable entity drops on entitydeathevent

subtle blade
#

Sure. Clear them

rain monolith
#

how

subtle blade
#

The event has a getDrops() method

rain monolith
#

and then

rare prairie
#

clear

subtle blade
#

... clear it?

#

I would hope you understand how to clear a list

rain monolith
#

with which command, can you send the two commands please 🍪 ?

subtle blade
#

No. Listen for an EntityDeathEvent, call getDrops() and clear the list

#

Given that you should be capable of doing this yourself

shell zephyr
#

Hi!

#

May anybody help me?

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.

rare prairie
#

?ask

subtle blade
#

Ask a question and someone will, sure

shell zephyr
#

I would like to code an unknowncommandmessage

#

There are many yt tutorials, but I don't understand

mellow wave
#

Could you show us what you have so far?

shell zephyr
#

Wdym?

rare prairie
#

it would better to learn java first, if you don't understand yt videos @shell zephyr

shell zephyr
#

yeah

#

but

#

it's urgent

subtle blade
#

There isn't much room for "but" here. You should have a basic understanding of the language in which you're writing

shell zephyr
#

I only copy the code text from the youtubers

rare prairie
#

it's urgent
there are many plugin on spigot which doing this

shell zephyr
#

But not so like I want to have

subtle blade
#

Do you just want to change the default message for unknown commands?

#

i.e. "Unknown command. Type "/help" for help."?

shell zephyr
#

Yeah

#

AND...

subtle blade
#

There is a configuration option for that provided by Spigot

shell zephyr
#

There should be the command, which the player executed

rain monolith
#

Sorry Choco, I thought (is this the past of think, I'm not good at english) this is very difficult... 😢

subtle blade
#

spigot.yml, messages.unknown-command

shell zephyr
#

I know

#

But I want to have it that i the message is the command, which the player executed, which is unknown

mellow wave
#

So you want it like /help is an unknown command!

#

Just an example

shell zephyr
#

Yeah similar

#

It should be...

#

&8[&bThe Dimensi❖n&8] &cDir ist es nicht erlaubt &8[&7UNKNOWNCOMMANDl&8] &czu verwenden!

#

Or

#

&8[&bThe Dimensixn&8] &cDir ist es nicht erlaubt &8[&7UNKNOWNCOMMANDl&8] &czu verwenden!

#

Is it possible?

subtle blade
#

ender crystals don't take damage. they just explode

hollow thorn
#

how do i damage an ender crystal

#

ender crystals don't take damage. they just explode
@subtle blade then how do i cause that to happen

shell zephyr
#

Shoot at them

hollow thorn
#

in the api

mellow wave
#

With code

subtle blade
#

Ehm. I'm not sure there's actual API for that unless remove() does it

shell zephyr
#

@mellow wave But which code?

mellow wave
#

Not sure either maybe call the damage method

shell zephyr
#

Ah sorry

mellow wave
#

And see if something happens

subtle blade
#

oh, yeah, you should be able to damage it

#

or not

#

it's not a living entity

mellow wave
#

Yeah just noticed

subtle blade
#

Yep, I see no API for this

mellow wave
#

PR time

rare prairie
#

for EnderCrystal?

#

if you listens to EntityDamageByEntityEvent its been called before the endercrystal explodes

mellow wave
#

But how do you force it to blow

#

That's the question

subtle blade
#

Solution is to call upon NMS unfortunately until a PR is made

mellow wave
#

You could probably just spawn an explosion and remove it. As a work around

subtle blade
#

EntityEnderCrystal#damageEntity(DamageSource.GENERIC, 1.0F)

#

So if you want to resort to NMS, you can. Else, Olivio's solution is also viable

#

Really, that's all NMS does. Just creates an explosion

#

Explosion radius is 6.0 by default

#
                    // CraftBukkit start
                    ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 6.0F, false);
                    this.world.getServer().getPluginManager().callEvent(event);
                    if (event.isCancelled()) {
                        this.dead = false;
                        return false;
                    }
                    this.world.createExplosion(this, this.locX(), this.locY(), this.locZ(), event.getRadius(), event.getFire(), Explosion.Effect.DESTROY);
                    // CraftBukkit end```
frigid ember
#

question: i have locked something in the 9th slot, you can't drop it but whenever you go into your inventory and click the hotkey on a random slot it goes there

alpine spindle
#

"&7&l>> %animation:Bem-Vindo%&3 &l%nick%&7&l! &7&l<<"

#

Why animation cant work?

hollow thorn
#

EntityEnderCrystal#damageEntity(DamageSource.GENERIC, 1.0F)
@subtle blade or just summon a snowball inside it

subtle blade
#

depends on whether or not you want to trigger an event

#

and how much you want to fuck with the listeners of said events

sturdy oar
#

Is someone able to make me understand a thing? So is like the chat format , the player money, the player prefix all handled by vault?

#

Like it's managed by Vault

tiny dagger
#

ye

#

but not really

sturdy oar
#

But all the data is saved by plugins

tiny dagger
#

it's like a wrapper

#

that people can just go and know it will work

#

for any other million of plugins there are

sturdy oar
#

It kinda sucks that I'm basically forced to use it though...

tiny dagger
#

imagine devs having to support 50 standards for their shop plugin

rain monolith
#

how can i change a result of a crafting recipe?

sturdy oar
#

Does LuckPerms work without vault? I might just not use it otherwise

#

I am coding every single plugin by myself so I don't want to use Vault if I can make my own stuff

bold anchor
#

Yes it does

#

Luckperms is standalone

sturdy oar
#

Cool

blazing burrow
#

@rare prairie i did what u said with new location it didnt work xd

formal nimbus
#

hey guys 🙂

frigid ember
#

question: i have locked something in the 9th slot, you can't drop it but whenever you go into your inventory and click the hotkey on a random slot it goes there

formal nimbus
#

he's has an inventoryClickEvent which will cancel the event if event.getCurrentItem() is equal to the item he's locked in the 9th slot

#

the problem is because he technically never picks up the item when he uses the hotkeys to move it, the check doesn't work

rain monolith
#

how can i change a result of a crafting recipe?

subtle blade
#

Is someone able to make me understand a thing? So is like the chat format , the player money, the player prefix all handled by vault?
Like it's managed by Vault
Vault is a common interface between these plugins. It just provides methods that can be called upon regardless of its implementation on the server so you can make use of economy without having to depend on 15 different economy plugins

#

Any decently programmed economy (or whatever) plugin should work without Vault. It should be a soft dependency

#

It's like Bukkit. Theoretically, it's written in a way that it can be used on servers other than CraftBukkit. Like Glowstone

sturdy oar
#

Yeah I will be using Glowstone in the future

subtle blade
#

You obviously can't use NMS or CraftBukkit code. It has to be strictly Bukkit API

sturdy oar
#

I know rip NMS

frigid ember
#

question: i have locked something in the 9th slot, you can't drop it but whenever you go into your inventory and click the hotkey on a random slot it goes there
@frigid ember anyone?

#

"he's has an inventoryClickEvent which will cancel the event if event.getCurrentItem() is equal to the item he's locked in the 9th slot
the problem is because he technically never picks up the item when he uses the hotkeys to move it, the check doesn't work"

blazing burrow
#

whats the best way of detecting what block the player is standing on

sturdy oar
#

BlockFace

blazing burrow
#

because i tried new location (getx, gety - 1, getz) and it didnt exactly work

#

huh

sturdy oar
#

Check if he's on ground before

lone fog
#

onGround is deprecated

sturdy oar
#

no lol

lone fog
#

Does appear to still work though

sturdy oar
#

player.isOnGround() isn't deprecated I think

odd knoll
#

It is.

blazing burrow
#

bruh xd

sturdy oar
#

Oh it is

#

Why

odd knoll
#
     * @deprecated This value is controlled only by the client and is therefore
     * unreliable and vulnerable to spoofing and/or desync depending on the
     * context/time which it is accessed```
blazing burrow
#

so i add isonground as a condition a swell

sturdy oar
#

I mean unless the player is cheating that method works

blazing burrow
#

Ah okay XD

sturdy oar
#

Also I suggest trying using BlockFace

frigid ember
#

question: i have locked something in the 9th slot, you can't drop it but whenever you go into your inventory and click the hotkey on a random slot it goes there
@frigid ember ..

unkempt ridge
lone fog
#

InventoryClick event

frigid ember
#

yeah

#

but i did

#

look

#
    public void onInventoryClick(InventoryClickEvent event) {

        if (event.getCurrentItem().isSimilar(netherStar)){
            event.setCancelled(true);
        }

    }```
#

i did this

#

it doesn't work

sturdy oar
#

InventoryMoveItemEvent

lone fog
#

No

#

That’s for hoppers and such

bold anchor
#

Is it in creative?

frigid ember
#

survival

#

@bold anchor

bold anchor
#

Listen for the other events too

#

dragevent

#

other shit

#

there is tons of inventory events

frigid ember
#

IS THERe a hot key one

#

because i can just hotkey the item into inventory

#

what does that count as

bold anchor
#

It's a combination

frigid ember
#

hm

#

shall i make another listener

#

for inventorymoveitemevent

lone fog
#

No

#

That one is for hoppers and such

frigid ember
#

oh

#

what shall i do then

#

what do you think will work for hot key

lone fog
frigid ember
#

hm

#

getHandlerList()
HandlerList getHandlers()
Inventory getInventory()
Gets the primary Inventory involved in this transaction
InventoryView getView()
Gets the view object itself
List<HumanEntity> getViewers()

#

which one couild it be

bold anchor
#

......

frigid ember
#

?

lone fog
#

No

#

Those are the methods

#

Look at direct known subclasses

frigid ember
#

huh

#

?

balmy sentinel
#

@frigid ember we aren’t going to spoon feed you the code and answers. You have to be willing to put in your own effort and research into figuring out the answers.

#

Otherwise you learn nothing

frigid ember
#

bruh all i am asking is where it is, i can't see it

#

OH I FOUND IT

#

i couldn't see it

#

i was just trying to know where it is on the page

balmy sentinel
#

Read the entire page it’s helpful and will pretty much answer any question you have.

unreal hedge
#

If a method isn't working how you'd like it to work, make sure to check the javadocs and see if it works how you think it does.

fair abyss
#

can I place nms block?

daring oracle
#

How to stop vexes going through barrier blocks?

#

Is there a way to do that?

lone fog
#

What were the packets for customizing block break speed

unkempt ridge
blazing burrow
naive goblet
#

What version atin?

rain monolith
#

Is there a way to change the result of a crafting recipe?

#

in a event handler

blazing burrow
#

i havent set an api version

#

@naive goblet

naive goblet
#

Is it like 1.15.2 or newer?

blazing burrow
#

making it for 1.16 should i set it to

#

yes

naive goblet
#

Don’t use BukkitRunnable

blazing burrow
#

Oh damn okay

naive goblet
#

There’s also some repetitive code which could have a clean up

#

Use the BukkitScheduler and use Consumer<BukkitTask> cuz lambdas

blazing burrow
#

oh damn wow okay

#

thanks

#

@naive goblet how would i use that xddd

#

is it the same as runnable like BukkitScheduler() {

}.Consumer<BukkitTask> or something

naive goblet
#
BukkitTask bukkitTask = Bukkit.getScheduler().runTask(plugin, task -> {
//
});```
#

You can also

Consumer<BukkitTask> consumer = task -> {

};

Bukkit.getScheduler().runTask(plugin, consumer);```
blazing burrow
#

Ohh okay

naive goblet
#

If you want to store a task

#

Like before you want to run it

blazing burrow
#

when you do runTask(plugin, task -> do you have to put ending bracket

naive goblet
#

Nope

#

It’s most likely if you want more than 1 line of code

blazing burrow
#

ooh okay

naive goblet
#

You should learn more about functional interfaces, method references and lambdas

#

Very interesting

blazing burrow
#

thats weird so u never put a closing bracket??

#

Okay sure

naive goblet
#

Wym closing?

blazing burrow
#

in (plugin, task ->

naive goblet
#

Yes you do

#

You’d have to put a ) in the end

#

Else compiler error

blazing burrow
#

so u write down the entire "task" then )?

naive goblet
#

Uh no

#
Bukkit.getScheduler().runTaskLater(plugin, task /*reference to BukkitTask */ -> {
  System.out.println(“hi” + task);
}, 20L);
//same as
Bukkit.getScheduler().runTaskLater(plugin,  new Consumer<BukkitTask>() {
  @Override 
  public void accept(BukkitTask task) {
    System.out.println(“hi” + task);
  }
}, 20L);```
#

Might have written something wrong, on mobile

blazing burrow
#

I see

naive goblet
#

Pretty sure BukkitTask would print a garbage value anyways

blazing burrow
#

this is gonna take a while to understand

naive goblet
#

Oh well, essentially you’ll have to learn this cuz a lot of more advanced apis and rest APIs use this for callbacks as an example. And not using lambdas would give you huge boilerplate code.

blazing burrow
#

Ohhhh i see

#

welp F

pseudo crown
#

shit ive never used lambdas in java before

unkempt ridge
#

What is the best scheduler for running minigames? I use runTaskTimer for the in-game timer and lobby countdown

naive goblet
#

That would be the one to use in most cases

unkempt ridge
#

sweet just wanted to see if I could've used something better

naive goblet
#

Maybe try TaskChain

unkempt ridge
#

never heard of it I'll take a loook at it

naive goblet
hollow thorn
#

?paste

worldly heathBOT
hollow thorn
frigid ember
#

Does anyone know any plugins that if you right-click with an item it runs a command?

#

I use executable items but the permissions don't work.

balmy sentinel
#

If you know how to code just listen for PlayerInteractEvent and when they click the item you want use #performCommand(command);

frigid ember
#

I don't.

#

i dont know how to do the script tho

#

how i put it in nminecraft

subtle blade
#

server owner, not a plugin developer

frigid ember
#

?

subtle blade
#

You are a server owner, not a plugin developer. I'm clarifying to palm lol

frigid ember
#

im not server owner i am admin

unkempt ridge
frigid ember
#

but that doesnt matter

hollow thorn
frigid ember
#

idk how to make plugin

balmy sentinel
#

@frigid ember do a little research on the forums for one, if you can't find one it's really not that hard of a plugin to code and I'm sure you could find a developer to make it for little to nothing.

sleek ivy
#

so apparently bungee has an exploit that allows anyone to get OP? Can I read on that somewhere? I need to protect my own stuff but another server I watch has been hacked 3 times in a week and they said it's due to a bungee issue

frigid ember
#

ok

#

also i download a plugin but its .sk how i use it?

#

not .jar

naive goblet
#

Skript😩

frigid ember
#

?

naive goblet
#

@sleek ivy iirc there’s some forks patching it

sleek ivy
#

any ideas which?

naive goblet
#

Nop

#

Not a fork glorifier sry

frigid ember
#

@subtle blade i am not a server owner i am trying to learn plugin development

sleek ivy
#

any idea what I can look for? I don't know what the issue is to look based on

#

it's a catch-22, no one talks about it but as an owner I can't protect myself against it until I find out what the issue is lol

pseudo crown
#

@frigid ember im rlly bored i can make you a simple plugin if that's what you're looking 4

subtle blade
#

I know, palm. bicxter, the person who you are assisting, is not a plugin developer. They cannot write a plugin. They are just an administrator looking to use an existing plugin

balmy sentinel
#

@sleek ivy I highly doubt anyone is going to share where that information is whether you're a server owner or not. It's an exploit which you could use or someone else with bad intent could use to take advantage of a server. It's like exploits in the real world they aren't really shared until they're patched.

sleek ivy
#

I get it, I just hate it. I'm dropping bungee entirely

#

no sense using a clearly broken product

#

they got dismantled 3 times in a row

naive goblet
#

Idk

balmy sentinel
#

I would argue differently. As a computing security major I can assure you everything has exploits. Nothing is 100% secure.

naive goblet
#

But there’s a fork called aegis

frigid ember
#

@frigid ember im rlly bored i can make you a simple plugin if that's what you're looking 4
@pseudo crown i have to think about it.

naive goblet
#

Idk but it’s known for being good and patching lots of stuff

pseudo crown
#

ill leave it open source so you can re-build it yourself

frigid ember
#

im just installing litebans

#

so brb

hollow thorn
#

?paste

worldly heathBOT
hollow thorn
odd knoll
#

Show code.

hollow thorn
#

?paste

worldly heathBOT
hollow thorn
frigid ember
#

yo how would you get the number of unique player joins?

rare prairie
#

its an ugly code

lone fog
#

Bukkit.getOfflinePlayers().size?

#

Not sure if that’s it

formal nimbus
#

hey guys 🙂

frigid ember
#

hmm, I don't think so.

formal nimbus
naive goblet
#

The indentations as well

formal nimbus
#

I have this code here inside of an inventoryClickEvent

#

I'm trying to stop a player using hotkeys to move an item fixed in slot 9

#

*in the 9th hotbar slot

lone fog
#

You might have to add onlinePlayers.size too

balmy sentinel
#

I usually have an ID associated with my players in my database that's auto increment so I just get the last ID.

formal nimbus
#

unfortunately this doesn't work, as event.getSlot() returns the slot which the mouse was hovering over when the hotkey was pressed

#

so the code I pasted above doesn't work

#

the only other option I could find was to completely disable the ability to use hotkeys

#

but I'd rather not do that

#

I've look at all the inventory events and I can't see one which would allow me to specifically stop the item being moved

#

does anyone know of a better way of locking an item in a slot?

#

or a way to detect which of the 9 hotkeys is pressed?

#

If so that would be really helpful 🙂

unique oyster
#

how can i use nms in my codemc build?

subtle blade
#

wat

#

what is codemc?

quick arch
#

A maven repo iirc

#

And nms is on there, no idea why

subtle blade
#

in which case that is not supported

#

run BuildTools, the server will be installed to your local Maven repository

quick arch
#

cough Ivan recommended it to me cough but BT was easier

unique oyster
#

i have no local maven repo

#

i want to make it automatically from jenkins

quick arch
#

You'll need a local repo if you want to make it far.

subtle blade
#

of course Ivan recommended it

#

of course he did lol

unique oyster
#

okay

#

thanks

teal halo
#

does anyone know if there's a way for the aliases added through commands.yml to have the original command's tab complete?

#

it's basically useless right now except for one word commands like spawn or somethin g since you can't use them really without the tab complete :/

nova badge
#

InventoryClickEvent#setCursor() is deprecated

#

what should I use?

nova badge
#

okay, I will try. Thanks.

mellow wave
#

You should ready why it is deprecated:

Deprecated.

This changes the ItemStack in their hand before any calculations are applied to the Inventory, which has a tendency to create inconsistencies between the Player and the server, and to make unexpected changes in the behavior of the clicked Inventory.

nova badge
#

good point

frigid ember
#

how do i use litebans website thing i have a dmonain already

mellow wave
#

You need to setup so that the domain points to the host and port which the litebans website is located

frigid ember
#

eh?

#

ill go on yt

warped coyote
#

What triggers the falling block harm type? Just anvils?

quick arch
#

yeah

#

you can however still be suffocated

warped coyote
#

I have a different check for that

livid spruce
grim halo
#

Im not sure if the abstract instance works like this? If not you should use .equals() instead.

grim halo
#

Also getBlock is a pretty hefty method. You should probably use some arithmetic checks instead

livid spruce
#

?

grim halo
#

Location#getBlock() is not that cheap to call. There are a ton of safety checks before you actually get the block.
You should rather compare X Y and Z

subtle blade
#

?

#
    @Override
    public Block getBlockAt(int x, int y, int z) {
        return CraftBlock.at(world, new BlockPosition(x, y, z));
    }```
grim halo
#

There are null checks for the world for example.

subtle blade
#

there actually aren't

#

and even then, that's not expensive

#

it's a referential comparison to a null pointer

grim halo
#

Wait... but Location can have null worlds

subtle blade
#

it can, you're right

#

Call getBlock() on it and you'll get an internal NPE

#

You are right though. No reason to call getBlock() if you don't need that block

grim halo
#

I just thought that something like this would be the cheapest:

    if (to.getBlockX() != from.getBlockX() || to.getBlockY() != from.getBlockY() || to.getBlockZ() != from.getBlockZ()) {
      return;
    }
nova badge
#

@livid spruce, what theme is that?

subtle blade
#

Yep

#

Definitely would be

quick arch
#

Choco I'm trying to fix your serializer but it's dumb

shell zephyr
#

Does anyone know a good Minigames Plugin for the 1.15.2 ?

#

I'm desperate

hollow thorn
#

you shoudl try looking under datapacks

frigid ember
#

how do i make a gui in 1.8, if someone can put a tutorial ould be appreciated

livid spruce
#

I just thought that something like this would be the cheapest:

    if (to.getBlockX() != from.getBlockX() || to.getBlockY() != from.getBlockY() || to.getBlockZ() != from.getBlockZ()) {
      return;
    }

@grim halo Okay thank you!

#

So what else can I do to make this more performantly

dry horizon
#

how can i use action bar

mellow wave
#

NMS

quick arch
#

or just the chat component api

mellow wave
#

hm can it send an actionbar

quick arch
#

yes

mellow wave
#

didn't know that

grim halo
#

event.getPlayer().getLocation().getBlock().getLocation() should be redundant.
@livid spruce Also it depends on the CookieRegion implementation.
Dont know what that is

dry horizon
#

can i use actionbarapi? is it still viable?

quick arch
#

player.spigot().sendMessage(ChatMessageType.ACTION_BAR, "Test")

mellow wave
#

@grim halo It's not redundant since it will round the location. But it's not the best way

dry horizon
#

that doesnt work for me

player.spigot().sendMessage(ChatMessageType.ACTION_BAR, "Test")
@quick arch

quick arch
#

o

#

1.8.8?

dry horizon
#

i dont have the .spigot() function

quick arch
#

yeah, that doesn't work there

dry horizon
#

nope

#

1.16.1

quick arch
#

🤔

#

wot

dry horizon
quick arch
#

are you using the Piece of Wood

mellow wave
#

I hope you're using spigot as a dependency and not something else...

grim halo
#

If the plugin uses vectors then in this particular case its redundant.

dry horizon
#

no

quick arch
#

🤔

dry horizon
mellow wave
#

See bukkit

#

not spigot

quick arch
#

yeah that's why

mellow wave
#

Switch jar

dry horizon
#

aight

grim halo
#

I think the wood has a sendActionBar method

quick arch
#

yeah it does

subtle blade
#

so does spigot?

grim halo
#

@livid spruce What is CookieRegion? Is this one of your own classes?

mellow wave
#

it is

livid spruce
#

yes

#

Have a moment

formal nimbus
#

does anyone know why i++ is regarded as dead code?

subtle blade
#

probably returning or breaking at some point where a condition is always true

formal nimbus
#

hmm#

subtle blade
#

generally if you want help, the whole snippet is useful lol

grim halo
#

Or .size() is always 0

formal nimbus
subtle blade
#

return at the bottom

formal nimbus
#

but that's not always true?

subtle blade
#

wait, no, that's an if statement

#

wot

#

we want the for loop lol

formal nimbus
#

exactly

quick arch
#

unused else 🤔

formal nimbus
#

it will be used

subtle blade
#

let's see the for loop

grim halo
#

would be nice if you would screenshot the code in question lul

mellow wave
#

Show us the entire loop

formal nimbus
#

annnddd

#

I just realised

#

I misplaced the for loops

quick arch
#

nice

formal nimbus
#

*return statement

grim halo
#

now the return at the bottom XD

subtle blade
#

ye lol

formal nimbus
#

needs to be in one more

#

there we go xD

#

god I'm a dumbass

grim halo
#

Now its redundant

formal nimbus
#

yep

#

but I might add more after

#

who knows

livid spruce
formal nimbus
#

I'm starting to feel like shrek with the number of layers this GUI has x_X

grim halo
#

@livid spruce This region implementation is not suitable for the PlayerMoveEvent.
It scales very poorly.

dry horizon
#

@formal nimbus whats this theme?

formal nimbus
#

hmmm?

#

wdym

livid spruce
#

@livid spruce This region implementation is not suitable for the PlayerMoveEvent.
It scales very poorly.
@grim halo ???

dry horizon
#

your theme

livid spruce
#

What's the Problem

dry horizon
#

in the picture

formal nimbus
#

my theme?

dry horizon
#

yes

formal nimbus
#

blank stare

#

like

#

what am I doing?

quick arch
#

no, your color scheme theme

formal nimbus
#

I don't know wut mean by theme ;-;

#

oh

quick arch
#

IntelliJ theme

dry horizon
#

yyour ide theme

formal nimbus
#

uhhh

#

it's not IntelliJ

#

it's eclipse

quick arch
#

oh

subtle blade
#

holy shit yeah that is definitely not how you want to make a region

dry horizon
#

frick

quick arch
#

kekw

formal nimbus
#

how do I check?

dry horizon
#

can anyone suggest me a very dark theme

formal nimbus
#

I have like an ultra dark theme

tiny dagger
#

close your pc

#

@dry horizon

formal nimbus
#

that just makes it pitch black

dry horizon
#

🙉

subtle blade
#

Have a 10x10x10 region and you now have 1,000 location objects

#

20x20x20 you have 8,000

quick arch
#

Choco I'm going to attempt to convert your reflection to nms

#

:pepe_scared:

grim halo
#

Ok ive read this whole class an this will def take a dump on your TPS with as little as 10 Players and 15 Regions.

tiny dagger
#

should be ez tbh

grim halo
#

And your memory will be gone. Like instantly if you make a decent sized region.

subtle blade
#

Yep

#

There is absolutely no justifiable reason to hold a List of Blocks in a region. Period

quick arch
#

SlimeWorldManager

subtle blade
#

Especially if they're dynamic in size

livid spruce
#

Yes, that's why I ask for help here.

subtle blade
#

What reason do you have to list those blocks?

#

or locations, rather

mellow wave
#

Probably to check if you're inside it

tiny dagger
#

oof

mellow wave
#

Very slowly

tiny dagger
#

no

#

there is a boundary check for that 👀

mellow wave
#

I don't see another reason

subtle blade
#

minX > playerX, minY > playerY, minZ > playerZ, duplicate that with < maxX Y and Z

livid spruce
#

So please tell me what can I do to make it better

subtle blade
#

You can do that entirely with coordinates

#

Please tell us what you're doing with all those blocks

livid spruce
#

Probably to check if you're inside it

grim halo
#

Ok i got some experience with protections. My approach is chunk grouped BoundingBoxes. If you want i can give you some tips.
Even just BoundingBox and iterating over every single one (not even grouped in chunks) should yield a decent performance.

subtle blade
#

minX > playerX, minY > playerY, minZ > playerZ, duplicate that with < maxX Y and Z

tiny dagger
#

this is mine

subtle blade
#

That's literally all you need

#

Though with that being said, Bukkit has a BoundingBox API

lone fog
#

All the blocks belong to me

livid spruce
#

What is min and max?

#

first and second point?

tiny dagger
#

min de max

subtle blade
#

Same principle only min is the minimum point, max is the maximum point

tiny dagger
#

it has to be min and max for that

livid spruce
#

?

formal nimbus
#

goddddd

#

I really need some help with GUIs X_X

#

I'm dying

#

I have a GUI with lots of layers

mellow wave
#

Show us what you've got and what you're trying to do

formal nimbus
#

sure

#

ok so I'll just explain my entire plugin I guess

#

it's not that complex

mellow wave
#

It's a crate plugin

formal nimbus
#

yes

#

each item in a crate has differents eights

#

yada yada

#

that's all fine

mellow wave
#

Why not just fork an existing one

formal nimbus
#

hpwever

#

Why not just fork an existing one
@mellow wave because i want to make one myself

sage kraken
#

Where is it possibile to ask for paid requests for custom plugins?

formal nimbus
#

and learn

#

anyway, I'm struggling to make the GUI system for it

mellow wave
#

Alright, but you can learn by looking and working with others code

formal nimbus
#

I have a working system

#

but the code feels a mess

#

Alright, but you can learn by looking and working with others code
@mellow wave that's true

frigid ember
#

What would be the fastest/simplest code route to grab an armorstand with a custom name in an area so I can change its Y

formal nimbus
#

and I'm wondering what's the best way of making a multilayers GUI

livid spruce
#

@tiny dagger what is min max and growth ?

formal nimbus
#

where I can easily pass values around

#

between the layers

mellow wave
#

@livid spruce First and second point

formal nimbus
#

how I can minimise memory usage

tiny dagger
#

growth is how much bigger than the selection is considered inside

livid spruce
#

okay

tiny dagger
#

you can remove that

livid spruce
#

Okey

tiny dagger
#

i just had uses for it

formal nimbus
#

I feel like my entire GUI code needs a rework )):

mellow wave
#

@formal nimbus I usually use my own fork of Inventory Framework when working with GUIs. It makes things cleaner and easier

formal nimbus
#

right

#

but.....

#

I just realised

#

what if I made a new class for each GUI layer

#

and each Layer is a child of the previous layer

mellow wave
#

Yeah that's how you would handle it yes

formal nimbus
#

....

#

I've made a mess x_x

livid spruce
mellow wave
#

Looks good

formal nimbus
#

cries in corner

#

I've never really done parenting before

#

so this will be fun

mellow wave
#

Yeah that happens, don't give up :)

formal nimbus
#

are package declaration all lower case

tiny dagger
#

you're missing the + 1

formal nimbus
#

or are they lowerCamel?

tiny dagger
#

@livid spruce

#

that fixes the corner being 1 less

mellow wave
#

Package are lower case

formal nimbus
#

k

grim halo
#

com.domain.packages.should.look.like.this.evenwithmultiplewords

mellow wave
#

yes.this.is.my.cool.package

native shore
#

What would you say is the best way to store an ItemStack in some sql db? because obviously i dont want to create a column for each attribute of an itemstack

tiny dagger
#

you.dont.wanna.confuse.with.Class

tiny falcon
#

hey is there any virüs in block shuffle game ?? i wanna play it but i cant trust

grim halo
#

@native shore Serialize it as String if you dont need attribute access for sorting etc.

native shore
#

okey thx 👍

tiny falcon
#

hey is there any virüs in block shuffle game ?? i wanna play it but i cant trust
@tiny falcon ??

mellow wave
#

@tiny falcon Plugins on spigotmc are usually safe. But avoid newly posted plugins and read the reviews

tiny falcon
#

hmm i read but there is just 4 rewiew

frigid ember
#

umm help

#

my chatcintrl plugin broken

unkempt ridge
frigid ember
#

i disabled

#

the auto broadcast

#

and it keeps send a message every 10 seconds

grim halo
#

@tiny falcon Whats the plugin? If its not huge i can take a look at it. Also the Spigot Anti-Malware is pretty nice.

tiny falcon
#

block shuffle game

mellow wave
#

Send a link

quick arch
#

source code on google drive 🤔

grim halo
#

So it has no op backdoor

quick arch
#

however, can only play with 2 players 🤔

tiny falcon
#

i want play with 2 player but

#

i cant trust it

grim halo
#

If i had this on my server i would consider it a virus. (Because the code is just horrendous)

odd knoll
#

loll

tiny falcon
#

ok

odd knoll
#

Ohhhh RIP naming conventions.

tiny falcon
#

i wont download it 😦

grim halo
#

Its fine

#

use it

#

It probably does its job

#

And you dont get a plugin because you want to look at the code right?

tiny falcon
#

so i can download ??

grim halo
#

Sure.

tiny falcon
#

ok ty

lone fog
#

Some people do want to look at the code

formal nimbus
#

alright

#

the new hierarchy is implace

quick arch
#

🤔

formal nimbus
#

🤔 ??

#

am I doing it wrong xD

jagged torrent
#

yes

formal nimbus
#

;-;

native shore
#

usually you dont use underscores in package names and i'm not sure about the names

unkempt ridge
formal nimbus
#

usually you dont use underscores in package names and i'm not sure about the names
@native shore but then it becomes difficult to distinguish between words?

#

oh boi

#

tutorial time I guess ):

quick arch
#

Think I'm doing that right 🤔

faint lance
#

I cant load anything from net.minecreft

import net.minecreft.*
cannot resolve symbol 'minecraft'
native shore
#

i dont understand why you're using the word "children" in each package

lone fog
#

Do you have the proper dependencies

frigid ember
#

I am Having an issue where every player that joins the server is recieving a new UUID and losing their progress in all plugin features, this happened seemingly overnight with nothing we did to trigger it. Any Ideas?

lone fog
#

Aka not spigot-API

#

Did you put the server in offline mode

formal nimbus
#

i dont understand why you're using the word "children" in each package
@native shore because everything in that package is a child of the class specified in the title ;-;

#

anyway I'm looking up a tutorial

native shore
#

hm but you dont have to put in each package :D usually you put each class of some type in the same package
for example...oof
something like blocks
you have a package like org.bukkit.blocks and you put everything about blocks in this package
if you need some abstraction you could do something like org.bukkit.blocks.physics and in this package you put everything about the physics of blocks
if you really want to use more than one word in a package name wourld do like this -> de.marcel.packageName instead of de.marcel.package_name

formal nimbus
#

oh

balmy sentinel
#

@faint lance are you importing the right dependency in Maven (assuming you're using it)?

formal nimbus
#

so you do use lower Camel

grim halo
#

This is my current approach

  public static String serializeItemStack(final ItemStack itemStack) {
    final NBTTagCompound tag = new NBTTagCompound();
    CraftItemStack.asNMSCopy(itemStack).save(tag);
    return tag.toString();
  }

  public static ItemStack deserializeItemStack(final String string) {
    if (string == null || string.equals("empty")) {
      return null;
    }
    try {
      final NBTTagCompound comp = MojangsonParser.parse(string);
      final net.minecraft.server.v1_16_R1.ItemStack cis = net.minecraft.server.v1_16_R1.ItemStack.a(comp);
      return CraftItemStack.asBukkitCopy(cis);
    } catch (final CommandSyntaxException ex) {
      ex.printStackTrace();
    }
    return null;
  }
formal nimbus
#

I was told just lower case D-:<

faint lance
#

@balmy sentinel yes

formal nimbus
#

I can't find a tutorial for a layered GUI anywhere ;-;

quick arch
#

🤔

native shore
#

what do you mean by "layered GUI"?

#

@grim halo does this work? 🤔

frigid ember
#

nimble0 when I turn the server to online mode bungee cord no longer works

grim halo
#

Yes this works.

formal nimbus
#

as in a GUI with multiple pages

mellow wave
#

@formal nimbus Then look at Inventory Frameworks source

fierce briar
#

<< and >> right buttons

mellow wave
#

or some other api

balmy sentinel
#

@faint lance can you show me what you're Maven dependency looks like

formal nimbus
#

@formal nimbus Then look at Inventory Frameworks source
@mellow wave right... I'll see if I can find it