#help-archived

1 messages · Page 159 of 1

subtle blade
#

Then if (BREAKABLE_BEDS.contains(someMaterial))

distant silo
#

Clearlag, tickmonitor, beehiveinfo, BKcommonlib, Traincarts

proper wolf
#

And I put that at the top of my class

torn robin
#

@distant silo if you remkove all of those do droppers still not fire?

proper wolf
#

Does my gamemode sound interesting @torn robin haha

distant silo
#

@torn robin Thanks that fixed the issue

torn robin
#

👍 not sure if you count that as a fix but np

frigid ember
#
        if (!(event.getMessage().startsWith("@"))) return;
        if (!(event.getPlayer().hasPermission("kits.staffchat"))) return;


        event.setCancelled(true);

        for (Player players : Bukkit.getOnlinePlayers()) {
            if (!(players.hasPermission("kits.staffchat"))) return;

            players.sendMessage(CC.s("&3[Staff] &b" + event.getPlayer().getName() + "&f: " + event.getMessage().replaceFirst("@", "")));
        }
    }``` why does it not send the players.sendMessage?
subtle blade
#
        for (Player players : Bukkit.getOnlinePlayers()) {
            if (!(players.hasPermission("kits.staffchat"))) return;```
#

continue

frigid ember
#

ah ok....

#

why cant i make a 1.8.9 spigot server

#

?

subtle blade
#

A 1.8.9 server does not exist

#

You will have to use 1.8.8. If I recall correctly, 1.8.9 clients may still join

frigid ember
#

ok

torn robin
#

can someone remind me why List.toArray(new Class[0]) works

#

specifically the 0 part

zinc basin
#

Is there a kernel version 1.12.2 in Russian?

subtle blade
#

@torn robin

    public <T> T[] toArray(T[] a)
    {
        if (a.length < size)
            a = (T[]) Array.newInstance(a.getClass().getComponentType(), size);```
frigid ember
#

I created my server with ALL the Files but i dont have my Console how do i get console

#

for 1.8

subtle blade
#

If the size is < than that of the ArrayList, it will create another one at the exact size

#

It's basically a Math.max(a.length, list.size())

frigid ember
#

I created my server with ALL the Files but i dont have my Console how do i get console
for 1.8

tiny pebble
#

Hey Choco, using the code you gave me yesterday, is it possible to check for a left-click after the first right-click as well? I don’t have the code up but having an idea of what I could do would help

frigid ember
#

@subtle blade PLEASE ANSWER I created my server with ALL the Files but i dont have my Console how do i get console
for 1.8

torn robin
#

how dare someone not answer in 2 minutes

#

outrageous

#

absolutely absurd

frigid ember
#

ikr

tiny pebble
#

if you ever want an answer, ya never ask over and over

karmic stone
#

how dare someone not answer in 2 minutes
What is wrong with u

#

Hey If I want to display title in game what event I use?

#

Or is it just a command

subtle blade
#

player.sendTitle() you mean?

karmic stone
#

Hmm

frigid ember
#

What's the best way using world guard if someone is combat ragged it makes a box or shows a couple of blocks around the spawn preventing them from going in

karmic stone
#

And text with double quotes in the brackets?

nimble stump
#

that's not a worldguard feature

#

you'll need to find a plugin that does that or write one yourself

frigid ember
#

That was the point how would I do that using world guard as a depend

nimble stump
#

check if the region has a safezone flag

subtle blade
#

Pho, you can escape characters in Strings. " included

#

"Some string \"surrounded in quotations\""

frigid ember
subtle blade
#

org.bukkit.plugin.UnknownDependencyException: WorldEdit

#

Ah nevermind, that's because WorldEdit is throwing a startup error

#

Though isn't WorldEdit & WorldGuard 7 for Minecraft 1.13+?

torn robin
#

why doesn't Color have a valueof method

subtle blade
#

What is it you want to valueof?

torn robin
#

player input

#

im trying to have a custom firework builder

#

so the player can do like firework color:red

subtle blade
#

There's some overloads of that method too to return a default

torn robin
#

import org.bukkit.Color;

#

not java.awt.color

subtle blade
#

oic ic

#

You can map some of the default colours yourself if you'd like

torn robin
#

yeah i could

#

thats sO mUch wOrk ThOugh

#

i was hoping there'd be a better way

rigid sluice
#

Hey, how I can see when they have new version of spigot ?

fleet crane
#

/version command

cold wharf
#

How can I show a block break particle effect?

#

In 1.16.1 pls

#

This is not a place to advertise -.-

opal bay
#

I mean he did ask

cold wharf
#

Yeah but why here? I thought someone finally came to help me but when I came here I saw this :/

zenith palm
#

?kick @tulip pendant Advertising (second time)

worldly heathBOT
#

👢 Kicked Dog Lover#4005

cold wharf
#

Thank you ssamjh 😛

opal bay
#

all he wanted to do was love dogs

#

😢

zenith palm
cold wharf
#

How can I show a block break particle effect? In 1.16.1 pls

opal bay
#

oh that's awesome

cold wharf
#

Anyone?

edgy sail
#

Need tech support and not afraid to call someone for it?
Look in the sidebar and find ssamjh the staff member! He's welcoming all callers!

#

Call now and get his undivided attention!

pastel condor
#

I wonder how he has the time for this.

edgy sail
#

Its 7pm for him atm

pastel condor
#

Wow he’s almost a day ahead of me

undone narwhal
#

Is it possible to cast commandsender to a player?

quick bolt
#

if its an instance of Player, yes

undone narwhal
#

I mean in the other side

#

(CommandSender) player

quick bolt
#

player inherits all the methods that commandsender has

undone narwhal
#

So yes

#

Thx

quick bolt
#

yeah, im just curious what your use case is

undone narwhal
#

Cause I've a method which can both be used by a player or other command source (console, etc)

regal drum
#

Heya. Hopefully this is a simple enough question, Just wondering how to get the raw link of a resource so I can directly download it to a server

undone narwhal
#

just adds download?version=<HERE YOU ADD THE VERSION>

regal drum
#

so essentially i can just copy paste the link from download resource and that should do the trick

undone narwhal
#

I hope so, but I'm not 100% sure it will work

regal drum
#

thanks, appreciate it
EDIT* Found an API for Resource Downloading - Spiget

undone narwhal
#

Ok guys, I want my plugin to execute a task in parallel. The fact is, I usually run many tasks at the same time, and close it 20 seconds after. Currently I'm using the runTaskTimerAsynchronously but I'm wondering if it manages wekk the stuff etc.
Is there a kind of "pool" to use properly these Tasks? Should I execute all of the tasks in only one parallel task? Other tips appreciated.

edgy sail
#

@regal drum personally I recommend releasing your versions on github and downloading it from github

#

You can see ProtocolLib uploads its jar to the release, has a changelog

#

Problem is making it work in your code which I kinda don't want to help with.. No offense

#

Spigot in comparison is protected by cloudflare, and may be blocked from access

fossil shoal
#

@undone narwhal I wouldn't recommmend using separate tasks where each task does just one thing.
You should have a repeating that is polling objects from a queue where each object represents a task.
Take a look at this: https://www.spigotmc.org/threads/guide-on-workload-distribution-or-how-to-handle-heavy-splittable-tasks.409003/

frigid ember
#

I have a question. If bungee.yml and plugin.yml exist will bungeecord load the bungee.yml and ignore the plugin.yml?

#

And spigot will only load the plugin.yml?

rare prairie
#

yes, exactly

frigid ember
#

Hey,

I'm using this code to add new aliases to my commands:

private void addAlias(String cmd, String[] aliases) {
        cmd = cmd.toLowerCase();
        log("Adding aliases " + Arrays.toString(aliases) + " to command " + cmd);
        try {
            Object result = null;
            try {
                result = this.getPrivateField(this.getServer().getPluginManager(), "commandMap");
            } catch (NoSuchFieldException | IllegalAccessException e) {
                e.printStackTrace();
                return;
            }
            SimpleCommandMap commandMap = (SimpleCommandMap) result;
            Object map = this.getPrivateField(commandMap, "knownCommands");
            HashMap<String, Command> knownCommands = (HashMap<String, Command>) map;
            if (cmd == null) return;

            if (this.getCommand(cmd) == null) return;

            Command command = knownCommands.get("serversystem:" + cmd.toLowerCase());

            for (String alias : aliases) {
                knownCommands.put(alias.toLowerCase(), command);
                knownCommands.put("serversystem:" + alias.toLowerCase(), command);
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

But in 1.16.1 it seems like it doesn't add it to the commands that are sent when logging in, anyone know how I can fix that?

rare prairie
frigid ember
#

Ok, I'll try that, thanks

quartz trench
#

anyone know the best way to check if a player is vanished by any plugin

rare prairie
#

Using Essentials API, or CMI

quartz trench
#

figured that was the case

#

im guessing most other plugins will trigger essentials as well

frigid ember
#

Is there a way to have 2 tags with deluxetags

civic totem
#

Can someone explain to me how I create a plugin where you can put in the config a command and a amount of ticks, after I run a command it starts

frigid ember
#

how do i make it so if someone is wearing an iron chestplate it will give them slowness but once they take it off they dont hasve slowness

#

because i want to make a tank kit

#

adn it slow u down

#

?

civic totem
#

With a runnable async, and then you should make a event and give a slowness effect for 1 seconds every 10 ticks he wears it

frigid ember
#

how

#

but i dont know coding

#

idk java

#

or smth

#

thow do i do it with plugin?

#

would Custom Armors work

#

i got it

peak glade
naive goblet
#

@frigid ember If you only want to add aliases to your commands, reflecting the commandMap is kind of unnecessary. Before you register a command just set the aliases?

bleak cipher
#

huh

#

Hey,

I'm using this code to add new aliases to my commands:

private void addAlias(String cmd, String[] aliases) {
        cmd = cmd.toLowerCase();
        log("Adding aliases " + Arrays.toString(aliases) + " to command " + cmd);
        try {
            Object result = null;
            try {
                result = this.getPrivateField(this.getServer().getPluginManager(), "commandMap");
            } catch (NoSuchFieldException | IllegalAccessException e) {
                e.printStackTrace();
                return;
            }
            SimpleCommandMap commandMap = (SimpleCommandMap) result;
            Object map = this.getPrivateField(commandMap, "knownCommands");
            HashMap<String, Command> knownCommands = (HashMap<String, Command>) map;
            if (cmd == null) return;

            if (this.getCommand(cmd) == null) return;

            Command command = knownCommands.get("serversystem:" + cmd.toLowerCase());

            for (String alias : aliases) {
                knownCommands.put(alias.toLowerCase(), command);
                knownCommands.put("serversystem:" + alias.toLowerCase(), command);
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

But in 1.16.1 it seems like it doesn't add it to the commands that are sent when logging in, anyone know how I can fix that?
@frigid ember I may be late but can you please start following the Liskov Substitution Principle?

naive goblet
#

He should cache that reflection as well

bleak cipher
#

yeah didn't see that

frigid ember
#

@frigid ember If you only want to add aliases to your commands, reflecting the commandMap is kind of unnecessary. Before you register a command just set the aliases?
I want the players to set the aliases by themselves without editing the plugin.yml

bleak cipher
#

actually they can't edit the plugin.yml without the plugin's source :kekw:

#

I want nitro :(

frigid ember
#

They can. Just open the jar file with WinRAR and edit the plugin.yml file

bleak cipher
#

ah yes forgot that jars are just zips

#

@frigid ember well I may be wrong but I think commands.yml had this functionallity

#

to add aliases to commands

naive goblet
#

Entity you’d have to get the command, check if it exists, unregister it, set the aliases, register it which is not recommend as the register part is synchronized.

bleak cipher
#

this is just too much play for making custom aliases

#

just say the dude who wants this functionallity to use bukkit's commands.yml

granite kiln
#

What's happenning if you have two versions of the same plugin installed?

torn robin
#

try it out and see

naive goblet
#

I think it throws an error when a plugin of the same is already registered

granite kiln
#

lol thank you for your super answer MSWS it's so helpful.
Conclure well it didn't for me ;

I actually ask because we just realized that our server had LuckPerms 5.1.66 & 5.1.64 jar files, and only the latest was running, I was wondering if a check were made on maybe a Version() method that all plugin would get or if it's random and i've been lucky 😄

torn robin
#

ur welcome 😛

naive goblet
#

That’s interesting

bleak cipher
wraith thicket
weak violet
#
@EventHandler(ignoreCancelled = true)
  public void onDamage(EntityDamageByEntityEvent event) {
      //Player entityA = (Player)event.getEntity();
      //for (Player playerz : AntiKB.tobesecret) {
         // if (playerz == entityA) {
                if (!(event.getDamager() instanceof Player) || !(event.getEntity() instanceof Player))
                      return; 
                    Player entity = (Player)event.getEntity();
                    //KnockbackHandler_17.sendKnockbackPacket(entity, 0.0D, 0.0D, 0.0D);
                    Vector velocity = new Vector();
                    velocity.setX(0.0D);
                    velocity.setY(0.0D);
                    velocity.setZ(0.0D);
                    entity.setVelocity(velocity);
                    l.info("REACHED");
          //} else {
              //return;
          //}
      //}
  }
  
  @EventHandler
  public void onKnockback(PlayerVelocityEvent event) {
    Player player = event.getPlayer();
    //for (Player playerz : AntiKB.tobesecret) {
        //if (playerz == event.getPlayer()) {
            EntityDamageEvent lastDamageCause = player.getLastDamageCause();
            if (lastDamageCause == null || !(lastDamageCause instanceof EntityDamageByEntityEvent))
              return; 
            EntityDamageByEntityEvent lastDamageCauseByEntity = (EntityDamageByEntityEvent)lastDamageCause;
            if (lastDamageCauseByEntity.getDamager() instanceof Player)
              event.setCancelled(true); 
      //}
    //}
  }
``` why dosen't this work?
frigid ember
#

Entity you’d have to get the command, check if it exists, unregister it, set the aliases, register it which is not recommend as the register part is synchronized.
@naive goblet
Well, even if I just unregister the command, you can still tab that command in 1.16.1

My problem is the tab completion, not the alias adding

naive goblet
#

If you unregister a command from the commandmap it should remove eventual tabcompleter associated with it?

frigid ember
#

But it doesn't update the commands which are sent when players log in

naive goblet
#

Wym

frigid ember
#

The commands which are sent in the PlayerCommandSendEvent won't update.

If I unregister a command, it will not remove that command from the list of commands which are sent in the PlayerCommandSendEvent

naive goblet
#

That one is mutable?

frigid ember
#

Well, I don't know how to edit that.

It has to do with stuff like RootCommandNode and CommandNode, etc.

#

Well, nevermind. I checked how bukkit updates that list. At the end, I didn't have to do anything with the CommandNode stuff

river cradle
#

Hi there, I'm creating a minigame which involves storing a lot of coordinates, is saving those to JSON a valid option in Spigot/Java development? Or is this bad practice?

tiny dagger
#

it's not a bad practice no

#

tho you should make it accessible to users

#

yes for databases as well

#

i had users who would rather copy new arenas from there than setting another one which is a great option

frigid ember
#

I'm supposed to be releasing the plugin to my server today and wanted to change out one of the Nether Stars for a Netherite Block (hence the need for a repository update)

weak violet
#

where is reach located in the spigot?

#

in what class?

boreal tiger
#

is there a way of getting the "item" of a block that is being placed in the BlockPlaceEvent?

#

can PersistentDataContainer be used in blocks?

#

nvm found it

#

If the maximum number of entities is set for a beehive, it does not persist when the beehive is broken, is this the correct behaviour?

frigid ember
#

anyone know a plugin for setting armour attributes like making the user slower or faster

proper cairn
#

Anybody find the spigot docs helpful?

frigid ember
#

no

boreal tiger
#

yes

subtle blade
boreal tiger
#

normal beehives store 3 bees

#

if I break it

#

it still has 3 bees when I place it back

clear night
#

Is there an event for the smithing table at all? When upgrading items I mean

boreal tiger
#

in vanilla there isnt really a way of setting the maximum count so I'm not sure what it should be @subtle blade

kind dawn
boreal tiger
#

but its a bit ironic because its called Persistent data container xD

subtle blade
#

The only part that's persistent is what's provided by PersistentDataHolder

#

Nothing else should be persistent

#

Well...

#

Yeah that's actually a lie lol. Let me double check

boreal tiger
#

😂

#

the max entity count is set using the persitentdataholder tho

subtle blade
#
 
@@ -276,6 +307,11 @@
             this.flowerPos = GameProfileSerializer.b(nbttagcompound.getCompound("FlowerPos"));
         }
 
+        // CraftBukkit start
+        if (nbttagcompound.hasKey("Bukkit.MaxEntities")) {
+            this.maxBees = nbttagcompound.getInt("Bukkit.MaxEntities");
+        }
+        // CraftBukkit end
     }
 
     @Override
@@ -285,6 +321,7 @@
         if (this.x()) {
             nbttagcompound.set("FlowerPos", GameProfileSerializer.a(this.flowerPos));
         }
+        nbttagcompound.setInt("Bukkit.MaxEntities", this.maxBees); // CraftBukkit
 
         return nbttagcompound;
     }
#

It isn't set using PersistentDataContainer, Bukkit just adds its own tag

boreal tiger
#

oh right, isnt nbt persistent though?

subtle blade
#

Bukkit's values are typically just prefixed with Bukkit.

#

Across server restarts, yes

#

Though that doesn't necessarily mean it will be kept when you break the beehive

boreal tiger
#

mhm right

#

let me try with silk touch, maybe im testing it wrong

#

btw can I access the PersistentDataContainer of a block like I can with an itemstack?

subtle blade
#

You can, if you'd like, listen for an ItemDropEvent and replace the beehive with one where the BlockStateMeta matches that of the beehive

#

Yes

frigid ember
#

How do you add a custom message under each message you send on spigotmc.org

subtle blade
#

It has to be a tile entity though (which beehives are)

frigid ember
#

That is always added when you send a message

subtle blade
frigid ember
#

Thanks

boreal tiger
#

mhm right, how do I get the blockstatemeta?

#

nvm found it I think

#

is it #getMetadata ?
if yes, is Bukkit.MaxEntities the key?

river cradle
#

Hi there, what is an efficient method of storing 2D arrays (specifically a double[][])? I would like to store the coordinates of generators for a bedwars-clone I'm making. I initially wanted to do it using JSON, but unfortunately parsing 2D arrays there seems to be a pain...

subtle blade
#

BlockStateMeta is a type of ItemMeta

#

You shouldn't have to access Bukkit's NBT. There are methods for it on the BlockState. #getMaxEntities()

boreal tiger
#

yeah I'm using those

#

I meant

#

You can, if you'd like, listen for an ItemDropEvent and replace the beehive with one where the BlockStateMeta matches that of the beehive
how do I set the blockstatemeta on an itemstack?

#

is that even possible

subtle blade
#

If it's an item that places a tile entity, get the item's meta and cast it to BlockStateMeta

#

It provides you with getBlockState() and setBlockState(). Works like any other ItemMeta

boreal tiger
#

oooooh coool, thanks a lot 😄

kind dawn
#

does anyone know how to fix it?

torn robin
#

you have some funky plugins

kind dawn
#

me?

torn robin
#

yes

kind dawn
#

what do you mean?

torn robin
#

what plugins do you have?

kind dawn
#

WorldEdit, SkinsRestorer, Skript, Vault, ChairStairs, CCTV, ProtocolLib, Multiverse-Core, Essentials, EssentialsChat, EssentialsGeoIP, uPlanes, EssentialsAntiBuild, Carz, HolographicDisplays, EssentialsSpawn, EssentialsXMPP, EssentialsProtect

median dock
#

Anyone here i need your help:
Im trying to develope some sort of replay system is there a way to serialize loaded chunks and to load them in into a new world?
So that i wont have to store the complete worlds

torn robin
#

i probably wouldnt store the chunks

#

then again that might just be the best way

tiny dagger
#

what if you instead store only the edited blocks in the chunk? 🤔

torn robin
#

ya

#

youd also want to store the nearby blocks

tiny dagger
#

why?

torn robin
#

well you dont want a player walking on air

tiny dagger
#

take og snapshot

#

then

#

edit it

torn robin
#

yah thats what they want to do

tiny dagger
#

unless it's a survival world

torn robin
#

well generally

kind dawn
#

so... do you know how to fix it? @torn robin

torn robin
#

try removing each of your plugins

median dock
#

i looked at some example systems what does he serialize with this:

Chunk: 0,0,176%%%18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18:2,18:2,0,0,0,0,0,0,0,0,0,0,0,0,0,18:2,17:2,18:2,0,0,0,0,0,0,0,0,0,0,0,0,0,18:2,18:2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,%%%79%%%world
torn robin
#

probably go from newest to oldest

median dock
#

what does that mean

torn robin
#

oh god

kind dawn
#

probably go from newest to oldest
@torn robin plugin?

torn robin
#

looks just like a list of block IDs

#

@kind dawn newest plugin you installed to oldest

kind dawn
#

emm... okay, and this is not a problem with the engine?

torn robin
#

no easy way to tell unless there's an error in the console

#

easiest way to tell is to disable all the plugins and see if it happens

subtle blade
#

Wow. That is some very uncompressed data

torn robin
#

indeed

kind dawn
#

should I delete one by one, reload, check or delete further?

torn robin
#

delete one by one then reload

river wasp
#

does anyone know of a Minigame API ?

bleak cipher
#

just make ur own xd

#

I'm not aware of any quality minigame api

river wasp
#

that sucks

#

minigames are a pretty big deal on most servers

#

wouldve thought a quality API would be made

frigid ember
#

anyone know of a menu plugin which supports server hopping? ping me

bleak cipher
#

@frigid ember define server hopping

#

nvm I just googled it

#

you can't have proxy menus; proxy doesn't handle these packets

#

you can use plugin messaging to open a menu on the server connected tho

frigid ember
#

Does InventoryClickEvent NOT get called sometimes? I have a listener that sometimes, sporadically doesn't get called at all only when I place the entire itemstack on an empty slot or pick it up with no cursor itemstack

#

ok

#

well what plugins do that?

#

like have the end user run the cmd?

wraith thicket
#

@frigid ember You're probably dragging the item. Use InventoryDragEvent

subtle blade
frigid ember
#

Hmm doesn't explain on pickup tho... but I'll try that too

#

(unless it does, never worked with drag event lmao)

wraith thicket
#

For pickup, you're probably doing some weird checks, i.e returning when current item is null or for certain types of clicks. Or you're in creative mode, which works differently.

bleak cipher
#

fsr I get very weird InventoryClickEvent behaviour

#

with my skins plugin

simple tiger
#

how do i turn off some commands from essentialsx? i disable them, but that also disables the vanilla version

bleak cipher
#

I click on the item, nothing happens

#

I drag it and it registers a click

#

(PagedInventoryAPI is the inventory framework for my skins plugin's menu)

#

and that behaviour is only at 1.16.1

crimson sandal
#

Anyone know a way to tell if a Material is a placeable crop?

wraith thicket
#

If you really have some weird behaviour, then I'd suggest trying to isolate it and form a bug report

subtle blade
#

Tag.CROPS.isTagged(Material)

crimson sandal
#

@subtle blade nice one thanks 🙂

bleak cipher
#

@wraith thicket I actually have some gifs and code

  @EventHandler
  public void onJoin(PlayerJoinEvent event) {
    Player player = event.getPlayer();
    Inventory inventory = Bukkit.createInventory(null, InventoryType.CHEST, "I was testing");
    ItemStack item = new ItemStack(Material.PISTON);
    ItemMeta meta = item.getItemMeta();
    meta.setDisplayName("Mama's squeeze");
    item.setItemMeta(meta);
    inventory.addItem(item);
    player.openInventory(inventory);
  }

  @EventHandler
  public void onClick(InventoryClickEvent event) {
    Player player = (Player) event.getWhoClicked();
    if (event.getClickedInventory() == null) {
      return;
    }
    if (player.getOpenInventory().getTitle().equalsIgnoreCase("I was testing")) {
      event.setCancelled(true);
      if (event.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("Mama's squeeze")) {
        player.sendMessage("I will hug you.");
      }
    }
  }

https://img.mrivanplays.com/a6xqgOO2ub.gif
https://img.mrivanplays.com/ICc9iD06Yq.gif

frigid ember
#

For pickup, you're probably doing some weird checks, i.e returning when current item is null or for certain types of clicks. Or you're in creative mode, which works differently.
The only checks I do (besides ignoreCancelled = true, but the event doesn't get cancelled because I can pick the items up, and no, no other plugins installed other than luckperms) is some perms checks and some custom NBT (which none of this apply for the items I want to work with), but besides that, it just doesn't enter the listener method at all sometimes

#

Emphasis on sometimes

tiny dagger
bleak cipher
#

jesus

crimson sandal
#

I always forget Eclipse is a thing I've been using IntelliJ for that long now 😄

tiny dagger
#

minecraft was made in it

#

it had better performance 👀

crimson sandal
#

I thought Notch used NetBeans right?

tiny dagger
#

doesn't matter the point still stands

#

intellij makes you lazy

#

one click button results in pretty streams isn't it?

undone narwhal
#

IntelliJ my life

frigid ember
#

It doesn't matter what you use to code as long as you get the work done properly

bleak cipher
#

I always forget Eclipse is a thing I've been using IntelliJ for that long now 😄
same

crimson sandal
#

The fact the IntelliJ can automatically shorten loops/streams into lambda functions is so nice.

tiny dagger
#

well nice but don't forget for loops still exists or what they do

undone narwhal
#

.not .for .fori .lambda + TAB 🤤

tiny dagger
#

all the hard work is done behind the scene

#

👀

undone narwhal
#

Random Hub?

tiny dagger
#

ye

#

someone requested this feature so i said why not

undone narwhal
#

I had such a painful time making an allocation algorithm

bleak cipher
#

random hubs would be more efficient if done on proxy level Fr33styler

tiny dagger
#

it's bungee mode in my minigame engine ivan

subtle blade
#

You know you can define multiple objects in a try with resources, right?

tiny dagger
#

wait really?

#

what's the separator?

undone narwhal
#

IntelliJ learn that

subtle blade
#
try (ByteArrayOutputStream data = new ByteArrayOutputStream();
        DataOutputStream out = new DataOutputStream(data)) {
    // etc.
} catch (IOException e) {
    e.printStackTrace();
}```
#

Both are auto closed

tiny dagger
#

😮

subtle blade
#

Also, catch specific exceptions, not a general Exception

#

(note the IOException catch)

frigid ember
#

hlep multiverse portals isnt working

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.

frigid ember
#

its not making the file mutivese-portals and its not working ingame

#

help me pls

#

pls help me multiverse portals is not working its not making the file mutivese-portals and its not working ingame

odd knoll
#

What server version?

frigid ember
#

1.15

odd knoll
#

What multiverse portals version?

frigid ember
#

4.1.0?

odd knoll
#

What does it say in console?

frigid ember
#

its says

#

Multiver-Portals-4.1.0.jar i doesnt say anything because there is not file for it

#

:|

odd knoll
#

Ok, so it says nothing in the console?

frigid ember
#

no

odd knoll
#

If so, you don't have it in your plugins folder.

frigid ember
#

oh wait

left plover
#

that might mean that your minecraft version isnt supported

#

idk

frigid ember
#

wdym wot it worked before

left plover
#

well what did you do thats made it not work

frigid ember
#

i deleted it but where do i get it for 1.15 i

left plover
#

just download the latest stable release for 1.15

frigid ember
#

where i try but it says the same

hollow hedge
#

Make sure you have Multiverse installed as well.

frigid ember
#

from spgito? i downloded form curseforge and bukkit

#

i try bothe website

hollow hedge
#

I don't believe Multiverse is hosted on Spigot.

frigid ember
#

i cant find it on spigto

hollow hedge
#

Bukkit is the only place.

frigid ember
#

but it wont work

#

You need to have both Multiverse-Portals AND Multiverse-Core inside your /plugins folder

#

i do

hollow hedge
#

Redownload both Multiverse-Core and Multiverse-Portals, if that doesn't work it may be worth opening a bug report for the plugin.

frigid ember
#

adn mv-c works

#

do i need multiverse-core-4.1.0.jar too

hollow hedge
#

Yes.

frigid ember
#

ok

#

tanku

#

bruh

#

wot

hollow hedge
#

Don't thank me, I came in at the end.

frigid ember
#

but u sed yes and told me ned 4.1.0

stiff oasis
#

Anybody know how to delete all mobs on my server?

sturdy oar
#

kill @e[type!=player]

#

Maybe

#

But will kill drops as well

frigid ember
#

type=!player
the target selectors do the ! the other way around lol

sturdy oar
#

Damn Mojang

#

Imagine being normal and using "!=" Like everyone

frigid ember
#

in a folder and each player his own file

cerulean gust
#

#ServerCrash

frigid ember
#

?

cerulean gust
#

What's going wrong with it? Is it not generating a file because the file path could be wrong - from my experience

undone narwhal
#

Save your files regularly, and directly set get to the YamlConfiguration (there is a cache system)

frigid ember
#
private void saveData() {
        for (UUID uuid : woodgilde.woodDestroyed.keySet()) {
            getConfig().set(uuid.toString(), woodgilde.woodDestroyed.get(uuid));
        }
        saveConfig();
    }```
#

so something like this

#

but than for 3 hashmaps

crimson sandal
#

There really should be a TAG.GLASS_PANES - or am I being dumb? 😄

frigid ember
#

how do i set the destination of a multiverse-portal portal

lone fog
#

You can make that tag with a datapack

#

But idk how spigot would interact with custom tags

frigid ember
#

/mvp create {NAME} [DESTINATION]

#
Destination can either another portal (p:portalname), world (w:worldname), position (e:WORLD:X,Y,Z[:PITCH:YAW]), or current position (here)```
neon epoch
#

hey guys, what are we doing about vault not being out for 1.16

subtle blade
#

To my knowledge, vault works fine on 1.16

#

It's an API. It doesn't often need updates

neon epoch
#

Ok, thanks

frigid ember
#

just got into the end, used a gateway and the whole server died, any reason why?

#

Error?

#
03.07 11:14:42 [Server] INFO java.lang.IllegalStateException: Removing entity while ticking!
03.07 11:14:42 [Server] INFO at net.minecraft.server.v1_16_R1.WorldServer.removeEntity(WorldServer.java:1081) ~[custom.jar:git-Spigot-758abbe-2b00831]
03.07 11:14:42 [Server] INFO at net.minecraft.server.v1_16_R1.WorldServer.removePlayer(WorldServer.java:1100) ~[custom.jar:git-Spigot-758abbe-2b00831]
03.07 11:14:42 [Server] INFO at net.minecraft.server.v1_16_R1.PlayerList.disconnect(PlayerList.java:444) ~[custom.jar:git-Spigot-758abbe-2b00831]
03.07 11:14:42 [Server] INFO at net.minecraft.server.v1_16_R1.PlayerConnection.a(PlayerConnection.java:1416) ~[custom.jar:git-Spigot-758abbe-2b00831]
03.07 11:14:42 [Server] INFO at net.minecraft.server.v1_16_R1.PlayerConnection.disconnect(PlayerConnection.java:268) ~[custom.jar:git-Spigot-758abbe-2b00831]
03.07 11:14:42 [Server] INFO at net.minecraft.server.v1_16_R1.PlayerList.shutdown(PlayerList.java:1054) ~[custom.jar:git-Spigot-758abbe-2b00831]
03.07 11:14:42 [Server] INFO at net.minecraft.server.v1_16_R1.MinecraftServer.stop(MinecraftServer.java:725) ~[custom.jar:git-Spigot-758abbe-2b00831]
03.07 11:14:42 [Server] INFO at net.minecraft.server.v1_16_R1.DedicatedServer.stop(DedicatedServer.java:644) ~[custom.jar:git-Spigot-758abbe-2b00831]
03.07 11:14:42 [Server] INFO at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:887) ~[custom.jar:git-Spigot-758abbe-2b00831]
03.07 11:14:42 [Server] INFO at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[custom.jar:git-Spigot-758abbe-2b00831]
03.07 11:14:42 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
03.07 11:14:43 [PebbleHost Loader] Server Stopped```
#

Pastebin

weak violet
#

where is minecraft reach located in the minecraft server src

#

in what java class

#

if there's any ideas of where it could be please say it

frigid ember
#

@frigid ember

#

its ur custom.jar

#

ok

#

I think

#

whats different to the custom.jar than spigot-1.16.1.jar?

#

or did u just rename it

subtle blade
#

Thedevil I literally answered your question in #general

#

Update
Stop downloading from mirror sites

#

You're likely 90+ versions out of date

frigid ember
#

true

subtle blade
#

Torni I also answered your question here a couple hours ago

#

afaik there is no API for reach distance, though is that not just a constant value? You shouldn't need API.

crimson sandal
subtle blade
#

Welp, glad the bot's working

frigid ember
#

lol xd

subtle blade
#

Heh. That's a nice little client bug

frigid ember
#

wait I got warned? 😦

#

is there a way of making the destination of one portal another portal

#

my guy

#

I told you

weak violet
#

@subtle blade afaik there is something somewhere that calls this but it's weirdly named and it's harder to find

frigid ember
#

i didnt see

#

sorry

#

np xd

#

do u use world edit/the wand to define the area for the portal/

#

wands I think

#

ok

#

thanks

#

just search on the wiki

#

easiest way

#

thanks

#

it works

crimson sandal
frigid ember
#

ok maybe 1.15?

#

umm idk what im talking abt

#

but i just said a word

#

maybe a few words

crimson sandal
#

Sorry @frigid ember I wasn't adding to your conversation 😛

frigid ember
#

it works
np

#

Sorry @frigid ember I wasn't adding to your conversation 😛
@crimson sandal ik

fossil shoal
#

Heh. That's a nice little client bug
@subtle blade No bug spigot fIx NOW

subtle blade
#

:((

forest plaza
#

Hmm so it got fixed somewhere between 1.14.4 and 1.16.1
@crimson sandal whats your graphic settings? if its fabulous, try normal fancy and i think it should be see through again

crimson sandal
#

And oh you mean it breaks on 1.16 too?

frigid ember
#

Is anyone able to help I am getting a crash report on my server about "Ticking Entity"

#

And If I break a Certain Block it stops/crashes my server

frigid ember
#

?paste

worldly heathBOT
frigid ember
#

Please post your crash report in there

#

@frigid ember

#

ok

#

And send the link afterwards lol

#

like the whole crash report right

#

Yup

#

Well I have never worked with Citizens, however I do read "while not enabled"; is Citizens loading and enabling properly on start up? Maybe you'll want to update it

#

hey guys

#

i'm having a problem with the worldguard api

#

i've been trying to use the testState() method: query.testState(location, targetPlayer, Flags.BUILD); but it's saying that I got the wrong syntax. "The method testState(Location, LocalPlayer, StateFlag...) is not compatible with the syntax (Location, LocalPlayer, StateFlag)"

#

this is probably a rookie mistake

#

It's because the Location it takes isn't a org.bukkit.Location, it takes a com.sk89q.worldedit.util.Location. I believe the API provides a method to convert from one to the other

#

lemme look

#

i just tried importing util.location

#

it says that Location isn't defined

#

send code

#

(the relevant parts of it)

#

Location loc = new Location(world, 10, 64, 100);
RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
RegionQuery query = container.createQuery();
if (query.testState(loc, localPlayer, Flags.BUILD))

#

do you need my imports as well?

#

Yeah the imports as well

#

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.plugin.RegisteredServiceProvider;

import com.sk89q.worldedit.util.Location;
import com.sk89q.worldguard.LocalPlayer;
import com.sk89q.worldguard.WorldGuard;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import com.sk89q.worldguard.protection.flags.Flags;
import com.sk89q.worldguard.protection.regions.RegionContainer;
import com.sk89q.worldguard.protection.regions.RegionQuery;

#

Are you using a build system like Maven or Gradle to handle the dependencies? Or just using plain old "add JAR as library dependency"?

#

im using maven

#

in eclipse if that helps

#

hmm unless you messed with how the dependencies are imported, it should work fine like so

// WorldEdit Location
Location loc = BukkitAdapter.adapt(new org.bukkit.Location(world, 10, 64, 100));
RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
RegionQuery query = container.createQuery();
if (query.testState(loc, localPlayer, Flags.BUILD))
#

thx

wanton delta
#

what will getHighestBlock return when there are no blocks in that coordinate?

frigid ember
#

from what api

wanton delta
#

spigot sillly

frigid ember
#

i'm not going to help i'm just trying to help the ppl that are competent coders

wanton delta
#

uh

#

ok

#

i dont know if it will return the block at tthe top of the world or the bottom if there arent any in that column of space :p

#

id assume the top but wanted to check

#

not in the API

atomic geyser
#

Hi, Do you know of a staff plugin for version 1.16.1?

frigid ember
#

make one of your own

#

if you can't find one

#

how do i make a custom road for plotsquared

#

wiki

#

?

limpid jewel
#

how i can create a cash check ? im using the player points plugin

#

but idk how to create an usable item

frigid ember
#

I tried to Update the plugin but it didn't work

silent scarab
#

could anyobody yell how to make uncorupted schematic ?

#

        if (!schemIsland.exists()) {
            this.saveResource("VillageIsland.schem", false);
        }```
code that makes corupted schematic
solid sun
#

Why Iron golem farms are not working in spigot ????
same design works in vanilla but not in spigot

frigid ember
#

?

crude coral
#

It seems citizensnpcs have somes problems.
Try to download another version

sturdy oar
#

citizens always yeets itself

solid sun
#

Any ideas why iron golems are not spawning naturally with villagers?

frigid ember
#

I have already tried to download a different version, Do think if I deleted the world it would fix it?

ember heart
#

@subtle blade my man Im so sorry to bother you

#

Yesterday I had this issue with buildtools

#

You told me to update maven

#

I don't even know where to begin

#

But well, it turns out I didn't have maven installed? Which is weird, considering I've been compiling with maven

#

if I run mvm -version it doesn't recognize mvm as a command

subtle blade
#

If you didn't have Maven installed, don't worry about it. BuildTools downloads a version of Maven it can use

#

If you're still having issues and haven't already, report an issue on the JIRA

frigid ember
#

if I run mvm -version it doesn't recognize mvm as a command
don't you mean mvn?

ember heart
#

yeah mvn*

frigid ember
#

just making sure you didn't actually type mvm xd

#

oh cool

ember heart
#

Oh my god I did

#

I'm so stupid

frigid ember
#

🤣

ember heart
#

I've been testing it with mvm

#

I spent litteraly 3+ hours on this yesterday

#

Oh my god

#

How is that even possible

frigid ember
#

there there

#

it happens

ember heart
#

Welp still doesn't solve the issue

#

I'll report it on the JIRA

#

but oh my god

forest plaza
#

since villagers interaction with composters is weird, does anyone have a solution on how to prevent them from emptying composters, but not from filling them?

twilit orchid
#

idk why that doesnt work

frigid ember
twilit orchid
#

@frigid ember so what do i do

frigid ember
#

Sit and wait until Mojang fixes it

twilit orchid
#

BRUH

solid sun
#

Why iron golems are not spawning naturally in spigot server ???

frigid ember
#

hi, anyone can get in a call, i need to have something explained to me that i dont quite understand, please message me ^^

#

(im a beginner)

#

and the thing is pretty simple

forest plaza
#

maybe you just ask in here

frigid ember
#

its too "complicated" to explain

#

i really need somebody to explain it to me in a call

#

yes

#

I'm a dude

solid sun
#

Why iron golems are not spawning naturally in spigot server ???

forest plaza
#

they should spawn normal afaik

solid sun
#

they are not

#

i tested iron golem farm design in vanilla server they wroked perfectly but when i switched to spigot they are not working at all

uncut pike
#

how i use a world generation mod? bcs if i start the server by first time it generates a world, but without the mod configurations, and to configure it the server has to be already opened

frigid ember
#

so nobody?

opal bay
#

villages need a few factors before iron golems would spawn

forest plaza
#

also mob behaviour might be a little different

#

things like mob caps play a role

naive goblet
#

@frigid ember why would it be hard to explain?

forest plaza
#

so nobody?
@frigid ember i would consider it if you at least told me whats the problem

opal bay
#

you need to shade in AnvilGUI

solid sun
#

This chat is so chaotic everyone is shouting own problems same time 😩

twilit orchid
#

oops didnt mean to double

solid sun
#

And i really need to get that villager iron golem farm thing working my server player are angy at me because its not working 😦

crimson sandal
#

Is it not possible to set the pitch of an armorstand? No matter what I set it, it stays vertical :?

solid sun
#

For real can anyone help me please this is serious problem

hybrid light
#

Hi, need help, I disabled naturalRegeneration, but it's still active in the Nether

daring oracle
#

Hello, can someone help me with the CommandNPC plugin? How do I give a player a permission with it. I tried /npc cmdadd pex user %name% add [my permission] and /npc cmdadd -c pex user %name% add [my permission].

frigid ember
#

Hi, can anyone help with a problem with block.getType();?

forest plaza
#

sure, whats the problem?

frigid ember
#

it keeps outputting LEGACY_(material)

#

where material is the material which i executed getType on

forest plaza
#

that means its a material from an old version, what version are you developing for?

frigid ember
#

JDK 13

forest plaza
#

no, minecraft

frigid ember
#

oh

#

i'm developing in 1.15

opal bay
#

thinkderp that's strange

#

are you using the plugin on a 1.15 server?

frigid ember
#

yea

forest plaza
#

what block are we talking about?

frigid ember
#

every material

subtle blade
#

api-version: 1.15 in the plugin.yml

frigid ember
#

ok

#

ty

subtle blade
#

o/

frigid ember
#

i just set api to null bcuz i didnt know wat to put there

daring oracle
#

Hello, can someone help me with the CommandNPC plugin? How do I give a player a permission with it. I tried /npc cmdadd pex user %name% add [my permission] and /npc cmdadd -c pex user %name% add [my permission].

frigid ember
#

Hello, can someone help me with the CommandNPC plugin? How do I give a player a permission with it. I tried /npc cmdadd pex user %name% add [my permission] and /npc cmdadd -c pex user %name% add [my permission].
@daring oracle I believe if you add the -o flag to the NPC command, it will be executed as operator

daring oracle
#

Oh ok

frigid ember
#

Check the wiki tho

#

I'm not sure

daring oracle
#

I'll try it

onyx ravine
#

Just set api-version to whatever version you're working with, e.g. 1.13, 1.14, 1.15, 1.16 all work I think

forest plaza
#

since villagers interaction with composters is weird, does anyone have a solution on how to prevent them from emptying composters, but not from filling them?
anyone?

subtle blade
#

Just set api-version to whatever version you're working with, e.g. 1.13, 1.14, 1.15, 1.16 all work I think
Ideally you'd set it to the minimum version you're capable of running

#

i.e. if you're working with API added in 1.14, set api-version to 1.14

opal bay
#

last I tried setting my api version to 1.16 it broke

#

haven't tested it lately though

subtle blade
#

Right, I should test that. My plugin needs to be on 1.16 anyways

daring oracle
#

@daring oracle I believe if you add the -o flag to the NPC command, it will be executed as operator
@frigid ember It doesn't work. 😦

opal bay
#

choco if my code works in 1.13 should I set my api version to 1.13?

#

because my code works in 1.8 still

frigid ember
#

Well check the wiki then lol

daring oracle
#

I did: /npc cmdadd -o pex user %name% add warps.usewarp.Mine

frigid ember
#

idk much about citizens

daring oracle
#

I didn't find anything on Wiki 😦

halcyon fiber
#

Can staff delete my resource post plz

tiny dagger
#

yes

#

update

#

change desc/title to delete me plz

#

and report it

opal bay
#

just wondering why would you delete your resource?

onyx ravine
#

i.e. if you're working with API added in 1.14, set api-version to 1.14
I haven't seen this but if I set it to 1.15 and tried to load it on 1.14 would it just not load or how does spigot handle that? It's not something that would ever come across me but I'm curious

frigid ember
#

yeah it won't load if the server version is lower than the api-version

subtle blade
#

choco if my code works in 1.13 should I set my api version to 1.13?
If you're using modern materials, yes

#

If not, no.

halcyon fiber
#

Wanted to make it private, but I guess I couldn't so I rather have it deleted

tiny dagger
#

is 1.16 still having the material mess in?

subtle blade
#

Also, api-version: 1.16 works fine for me, Jochyoua

halcyon fiber
subtle blade
#

Legacy materials are likely to remain, Fr33

tiny dagger
#

wow

#

it's been 3 versions

opal bay
#

alright thanks Chocos

tiny dagger
#

what happens in 1.15 if api version is 1.16 👀

subtle blade
#

Plugin won't load

opal bay
#

oh shit

subtle blade
#

It acts as a minimum version

tiny dagger
#

well there you go

#

1.13 is the best one to use

opal bay
#

yes I'm going to change my api version to 1.13

subtle blade
#

Obviously doesn't apply to api-version: 1.13 and 1.12 because it didn't exist then so the server won't read it, but yeah

tiny dagger
#

tell your users to change it based on their version

#

if they wanna use all the materials

subtle blade
#

You should be doing one of two things:
(1) Compiling against the Bukkit 1.8 API and use legacy materials (they aren't considered legacy in this API, obviously)
(2) Compiling against modern versions of the API and use api-version: 1.13

#

Do not compile against modern versions and use modern Materials because it won't run on a 1.12 server or lower

#

(at least if that's not your intent)

#

I personally advise working with at least 1.13+

forest plaza
#

since villagers interaction with composters is weird, does anyone have a solution on how to prevent them from emptying composters, but not from filling them?
help pls

frigid ember
#

InventoryDragEvent is called before the changes are applied, right?

subtle blade
#

As far as I'm aware, yes

frigid ember
#

Naisu, tankius

subtle blade
#

Still have a bit of cleaning up to do. Javadocs, better argument handling, etc.

tiny dagger
#

When do you plan to sell it? 👀

subtle blade
#

Sometime in the near future. Once everything is cleaner

#

First release will be free because it was previously a free plugin I never updated to 1.13

#

Subsequent releases won't be

#

Though everything is staying open source. People can compile it for themselves if they want. Will still offer support. idrc

forest plaza
#

(TODO - Link)

#

do you have a link yet?

tiny dagger
#

that looks good

subtle blade
#

Want to link it instead to the premium one so I'll update it whenever I publish it

tiny dagger
#

how long did it took you? 👀

subtle blade
#

The rewrite? Of actual work? Probably 3 days

nimble stump
#

10 years

subtle blade
#

It's been 2 weeks since I'd started writing it though. General laziness lol

#

I literally started a new project and started from scratch

nimble stump
#

I’m supposed to have an entity system written from scratch for my job by Monday

#

Procrastination nation

tiny dagger
#

i want to see you do a minigame choco

subtle blade
#

Minigames aren't horribly difficult, it's just a matter of coming up with something fun and actually spending the time to implement it

tiny dagger
forest plaza
#

probably a dumb question, but where does spigot call events?

tiny dagger
#

Bukkit.getPluginManager.callEvent()

nimble stump
#

In the functionality

forest plaza
#

but where would that be?

nimble stump
#

They’re all called from different places

#

In the NMS

forest plaza
#

lets say block break event

tiny dagger
#

yeah in nms

nimble stump
#

Inside the mining handler of the Minecraft server

tiny dagger
#

before the action in the nms

forest plaza
#

if i would look in my dependencies, under nms somewhere?

nimble stump
#

NMS means net.minecraft.server

#

In the original Mojang code

forest plaza
#

i know what nms means, i just dont really understand how spigot works

tiny dagger
#

but what do you wanna do?

#

just callevent if you want your own events

forest plaza
#

i know

nimble stump
#

Spigot modifies the original Mojang code to insert events being called everywhere

#

Among other things

forest plaza
#

exactly i want to look how and where villagers empty composters, right now i only want to understand how spigot works

#

xD

nimble stump
#

Spigot is just a mod

#

It’s a Minecraft mod

subtle blade
#

It's called in BehaviorWorkComposter

frigid ember
#

you could just use buildtools to get the code and start digging down the rabbit hole to find out yourself 🤷‍♂️

forest plaza
#

thanks choco!

subtle blade
#

Actually, no, BlockComposter, sorry

nimble stump
#

Lol

subtle blade
#

It's like BlockComposter.a() or something. One of the static methods towards the middle of the class

#

You'll see a CraftBukkit comment 😛

#

(if you're looking at source)

forest plaza
#

im not, so im doing something wrong lol

#

public static IBlockData a(IBlockData iblockdata, WorldServer worldserver, ItemStack itemstack, BlockPosition blockposition, EntityVillager entity) {

#

this looks right

nimble stump
#

Yeah that’s probably the one

forest plaza
#

yeah it is

#

but theres no spigot code, so where do i get that?

#

sorry if im asking dumb questions

cloud egret
#

Is CoreProtect not being able to log right, and getting stuck after /stop on the newest Spigot a known problem?

#

Its not saving anything

forest plaza
#

wait a second is this spigot calling an event?
!CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, iblockdata1).isCancelled()

nimble stump
#

Yes

tiny dagger
#

oh yes

nimble stump
#

Btw

forest plaza
#

aaah nice

nimble stump
#

@forest plaza

#

That’s the source

trail basalt
#

Question:

Should I use Paper or Spigot? I know Paper is a fork of Spigot, but I never see any massive changes or even minor ones.

It's random. my bad

nimble stump
#

Spigot’s better

trail basalt
#

Even though I asked the question, I do have to agree Spigot's x2 as better. I used Spigot, then switched to Paper, but Paper crashed my game because of an error that stated 'thread dump'. It was ignored entirely on Paper, and I got no response.

#

So, said f it, and moved back to Spigot. Haven't had that error since.

#

This is how it looks now when I start up the game. Paper would immediately state 'Server hasn't responded!' and crash to bits. Never does that here

forest plaza
#

i had that problem with paper too

subtle blade
#

83 seconds? Jesus Christ... how many plugins do you have?

trail basalt
#

h a hhhhhhhhh

nimble stump
#

Zoinks

trail basalt
#

Really? Nice to know someone else has had said problem.

Uh, I have a lotta plugins involving server performance, though others such as Multiverse and CoreProtect

#

@forest plaza Did you ever get it fixed or nah?

tiny dagger
#

'server perfomance'

trail basalt
#

Yes..?

tiny dagger
#

it's snake oil

trail basalt
#

Ehhhh

#

Depends on the plugin for me.

#

ClearLag/LaggRemover succeeded in decreasing lag while playing, though it's unknown as to how effective they shall be in game with others. It won't be a huge server, so I doubt I'll expedience as much lag as I have on an 100+ server with a bunch of builds

forest plaza
#

@forest plaza Did you ever get it fixed or nah?
@trail basalt i did, it was some simple command i had to run in the console. lemme see if i can find it

frigid ember
#

(please don't be save-off please don't be save-off please don't be save-off)

trail basalt
#

lol

forest plaza
#

i think it was "limit -c unlimited"

trail basalt
#

So, you wrote that within the console? Just 'limit -c unlimited'

#

mhmhmmm

forest plaza
#

this was a similar problem

#

to the one i had

trail basalt
#

This is the problem I had (in case we had a somewhat dif one)

'Server has stopped responding! Creating thread dump:'

#

Even though with Spigot, never had this problemo

forest plaza
#

thats something else i think

#

sorry

trail basalt
#

imma try it either way.

forest plaza
#

lmao

trail basalt
#

So, you're on Spigot now, I presume? Paper seemed to be the problem for me.

forest plaza
#

actually im still on paper

trail basalt
#

I just don't know as to whether or not I switch back to Paper in hopes to fix the problem, as I know it offers 'better optimization' and a 'smooth performance', but as Fr33styler stated, seems/seemed like Snake Oil to me.

tiny dagger
#

well

forest plaza
#

a friend im developing with kinda dragged me in, but ive had no regrets. some of the events are nice too i guess

tiny dagger
#

paper isn't snake oil as it can actually improve performance

#

because it can edit the nms code

nimble stump
#

It’s just poorly written and maintained

#

Lol

tiny dagger
#

well

trail basalt
#

Hm.

the 'ulimit -c unlimited' doesn't work in console for me, so I presume it only works for Paper?

tiny dagger
#

i don't know how it works as i haven't looked

nimble stump
#

You can’t run that like a Minecraft console command @trail basalt

trail basalt
#

oooooooooooooooooooooooooooooooooooooooooooooo

forest plaza
#

Hm.

the 'ulimit -c unlimited' doesn't work in console for me, so I presume it only works for Paper?
@trail basalt i dont think so, but i have dont really know

nimble stump
#

It’s a server computer command

#

Not a Minecraft command

forest plaza
#

wait

trail basalt
#

my brain shut off there.

I was thinkin' of the Minecraft console command lmao

#

my bad

forest plaza
#

lol

trail basalt
#

I dunno. Might switch to Paper, might not.

nimble stump
#

@restive elk

#

I would recommend not @trail basalt

trail basalt
#

Why's that?

#

Not saying you're wrong, just interested

nimble stump
#

Lower bar to get code in

#

Tends to be more poorly written

#

Michael runs a tight ship here

trail basalt
#

Ah. Wouldn't be my thing then.

frigid ember
#

Alex, no offense, but you make yourself sound like someone who got bullied by the Paper team or something and came running back to Spigot and you're trash talking about them 🤣

#

Not saying you do, saying you sound like you do

nimble stump
#

LMAO

#

I’ve never spoken to anyone on the paper team

trail basalt
#

Honestly surprised anyone can get bullied by the Paper team, seeing as they literally NEVER respond to anyone in Discord

nimble stump
#

I maintained my own private spigot fork when I was still working in Minecraft

frigid ember
#

Well they did answer my questions when I had them 🤷‍♂️

nimble stump
#

Well not my own

trail basalt
#

Ah. Must've been lucky. People flooded the shit out of that place.

frigid ember
#

In this same server too, there are a lot of questions in this channel that never get answered because of the shear amount of questions people ask

trail basalt
#

And

#

when I saw that

#

I kinda just left Paper

nimble stump
#

It’s more an observation about code quality

trail basalt
#

Spigot seems a bit better in response time tbh

nimble stump
#

I have nothing against anyone working on paper, to be honest I couldn’t even tell you who they are

trail basalt
#

I don't know any of their names either

#

Fefo, I presume you use Paper?

frigid ember
#

As of right now I use spigot, but for plugin testing, I don't manage/maintain a server myself tho, but the network I work for tends to use paper (unless stuff like tacospigot or something like that is required)

trail basalt
#

Ah. I see. Well, I think this helped.

#

I'll stick to Spigot for now.

frigid ember
#

Personally I just use spigot unless I really need a paper-specific event or something (which I usually don't lmao)

trail basalt
#

Paper doesn't help me much, and I've heard similar things about Paper from what Alex stated

tacit vortex
#

an easy question but i do not know how to do it, i'm trying to make that whenever a mob spawns it's actually another mob (like a zombie should spawn and it spawns a creeper), how do i do it?

trail basalt
#

Literally crashed my server 100% of the time, so that's another reason

#

I don't know the answer to that one. Why do you want to tho?

nimble stump
#

EntitySpawnEvent I think @tacit vortex

tacit vortex
#

@nimble stump im there, but how do i make it spawn a creeper instead of a zombie

nimble stump
#

Check the spawn reason, make sure it isn’t custom

#

Then cancel the event if it’s a zombie and spawn a creeper

fair escarp
#

Hey, i want to put a delay on a command - what is the best way to do that?
my case: i want the /afk command to be executed after 5secs, similar to the teleport-delay you can set in essentials
i want to do that so the godmode in afk-mode cant get abused that much

nimble stump
#

Listen to the command event, cancel it if it’s their first time running it, then store that you’re tracking their timer

#

If they move or take damage, cancel

#

After the timer runs out, run the command again, and have the event let them

fair escarp
#

to bad that i got no idea about coding that stuff.., i hope there is a setting or a plugin for that actually

lapis plinth
#

Is there a way to get the values of an arraylist?

nimble stump
#

@lapis plinth how do you mean

#

By index?

lapis plinth
#
            List<BigDecimal> valueTop = new ArrayList<>();
            for(Player player : Bukkit.getOnlinePlayers()){
                String arg = User.getUser(player).getIsland().getOwner();
                File file = new File(this.getDataFolder(), arg + ".yml");
                FileConfiguration config = YamlConfiguration.loadConfiguration(file);
                String valueString = config.getString("CompletedValue");
                BigDecimal value = new BigDecimal(valueString);
                player.sendMessage(ChatColor.AQUA + "" + ChatColor.BOLD + "We are now calculating values of value top...");
                valueTop.add(value);
            }
            Collections.sort(valueTop);
            Bukkit.broadcastMessage(ChatColor.AQUA + "" + ChatColor.BOLD + "Value top has been successfully calculated!");

So i have this, and I want a player to when they run a command output the number 1 value to the #100 value

nimble stump
#

for (int i = 0; i < 100; i++) {

lapis plinth
#

whats the method to get the X number from the array tho?

nimble stump
#

BigDecimal value = valueTop.get(i);

lapis plinth
#

kk ty

frigid ember
#
    public final HashMap<UUID, UUID> woodGildeAccess = new HashMap<>();```
#

How would I only store 1 uuid

#

in a hashmap

nimble stump
#

What do you mean

frigid ember
#

store an uuid in a hashmap

nimble stump
#

Like only the one? Not the second?

frigid ember
#

any1 know how to spawn a block at a location (player.getlocation())

nimble stump
#

You can’t do that in a hashmap

frigid ember
#

yep

nimble stump
#

Use a hash set

#

@frigid ember

frigid ember
#

yes?

tiny dagger
#

or list

frigid ember
#

thanks

nimble stump
#

player.getLocation().getBlock()

tiny dagger
#

or Pair

#

👀

frigid ember
#

.getblock("material") ???

nimble stump
#

What

#

No

frigid ember
#

because i've tried : location.getBlock().setType(Material.SAND);

nimble stump
#

Yes

#

That’s what you do

frigid ember
#

but it doesnt work

nimble stump
#

Define doesn’t work

frigid ember
#

define?

#

because

#

that way of doing it didnt work

nimble stump
#

What do you mean didn’t work

frigid ember
#

What is it you tried to do exactly?

#

Context

#

it doesnt spawn the block

nimble stump
#

Where is that piece of code supposed to be run

#

Is there an error in console?

frigid ember
#

nope, no error

#

just doesnt spawn the block

#

Show the code please

nimble stump
#

^

frigid ember
nimble stump
#

your offsets are wrong

#

player.getLocation() returns their feet

#

So the block below them is add(0, -1, 0)

frigid ember
#

oof

#

i thot it was their head

#

but still

#

the block doesnt spawn at all

nimble stump
#

That would be player.getEyeLocation()

#

Did you check underneath the block underneath them?

frigid ember
#

And make sure to clone the locations!

nimble stump
#

True

frigid ember
#

i changed it to getEyeLocation

nimble stump
#

You’re modifying one location a ton

frigid ember
#

Otherwise, the add, subtract and other operations are applied to the one object you're working with

nimble stump
#

So that’s gonna be setting some screwy block somewhere

frigid ember
#

uuh

#

not sure i understand

nimble stump
#

Whenever you do location.add or location.subtract

#

You’re modifying location

frigid ember
#

oh i see

#

i've been doing the wrong thing then?

nimble stump
#

location.clone().add

frigid ember
#

okay

nimble stump
#

Unless you intend to modify the one you’re calling it on

frigid ember
#

I'll try

#

thank you so much

#

IT WORKED

#

YOU ARE A GOD

nimble stump
#

Lmfao

#

Glad it works

bright forge
#

Someone losted my resource without permission

#

Posted*

nimble stump
#

Report it

subtle blade
#

What is a report system?

#

Man, SpigotMC should add report buttons to resources

#

OOO maybe to the forums too!

#

Y'know under every message or something

nimble stump
#

LMAO

subtle blade
#

PogChamp what if we added report buttons TO USER PROFILES

nimble stump
#

Let’s not get too crazy

subtle blade
#

Yeah you're right KittyPaw

bright forge
#

I dont have report button

nimble stump
#

Are you signed in

bright forge
#

Got removed when i got banned

#

Since then i cant report

subtle blade
#

I was unaware we could remove report privileges

bright forge
#

Well idk either

#

I cant see the button anymore, it was under resource description i think

#

I got banned one day and when unbanned i noticed that the button dissappeared

#

Maybe its an automatic system

#

Or maybe is a chrome extension

#

Nvm i remembered that i got the button back some.months ago thx and sorry

frigid ember
#

public final HashSet<UUID> woodGildeAccess = new HashSet<>();

        woodGildeAccess.add(player.getUniqueId());
#

this wont add the uuid to the hashmap will it?

#

in a statement ofc

subtle blade
#

Sure it will. Why wouldn't it?

frigid ember
#

looked too easy xd

#

but thats perfect thanks

#

So I added recipes to some of my villager entities. Unfortunately, only one player can interact with the villager at a time and see the recipe menu. Is there a way to show this recipe menu to any number of players that interact with that npc?

#

Such as a way to disable only one player interacting with the npc at once?

lone fog
#

You can probably listen for a playerInteractAtEntity event and open a copy of it

#

But it may not work with trade refreshing and villager xp

frigid ember
#

Thats fine, I have those disabled

#

I just want players to be able to interact with the trade menu at the same time, instead of locking out when one player interacts with it

sturdy oar
#

Do you guys know any utilities (that is already shaded into Spigot) that allows me to easily obtain a response from an URL? I currently do it with java.io but it's a lot of code?

crimson sandal
#

Okay so I think that's all the 'Items' in 1.14 that place blocks sorted now lmao

frigid ember
#

How do you check if an entity is currently being interacted with?

#

In my case, if a villager is being interacted with (their trade menu) only one player can interact with it at a given time. I want to allow any number of players to interact with it.

#

If the entity is currently being interacted with, I want to open the trade menu for the new player as well

subtle blade
#

There's not really an API for that

#

Though EntityVillagerAbstract#eO() is what determines that

frigid ember
cobalt yoke
#

@subtle blade any idea on when Spigot will create an API to check if a spigot username purchased your plugin?

subtle blade
#

Was requested afaik but simple has to implement oauth before that can be added

cobalt yoke
#

And why it neever been added

#

Im sure lot of people asked for it

subtle blade
#

Oh I lied, it is exposed, @frigid ember

golden shale
frigid ember
#

@subtle blade Thank sweet mother of mercy

subtle blade
#

(Villager extending Merchant, obviously)

#

You can wget that to grab BuildTools, but you still have to run it

#

You run BuildTools to compile the latest version of Spigot

golden shale
#

does running BuildTools generate a new spigot.jar?

lone fog
#

Yes

golden shale
#

ty

sturdy oar
#

someone has an answer for my question ❓

tawny fractal
#

Has anyone had a problem with end city teleporters crashing your server when you throw a perl into them?

old barn
#

Which do you advise me? buy 3 hosts for my bungeecord / Lobby / Server or buy a vps that takes care of the 3 servers?

sturdy oar
#

I don't think a VPS can handle 3 servers

#

unless your playercount is 10

tawny fractal
#

nvm just saw it was patched in a update

old barn
#

So if you want to buy only for 1 server, which one has more performance? vps or host?

tawny fractal
#

where can I get the latest version?

golden shale
#

oh no

#

it generates spigot-1.15.2.jar

#

can someone point me in the right direction

sturdy oar
#

java -jar BuildTools.jar --rev 1.16.1

golden shale
#

how do i access that?

sturdy oar
#

you build with that argument to get the latest version

neat oxide
#

you just use that command

golden shale
#

oh right!

old barn
#

which one has more performance? vps or host?

sturdy oar
#

what is "host"???

neat oxide
#

We always do this for the first announced builds

sturdy oar
#

it's like saying : "which has more performance: Ferrari or Car?"

regal siren
#

lol

old barn
#

server hosting

sturdy oar
#

still...

#

dedi? bare metal? shared?

#

"server hosting" is way too generic and does not mean anything

opal heron
#

prolly a localhosting server.

#

he just mentioned host anyway.

glad hearth
#

Can I report a person that has resources in spigot and has activity in those websites? (I think it's easy to understand which websites I mean)

opal heron
#

Hm

sturdy oar
#

"those websites"?

opal heron
#

Ah.

sturdy oar
#

Leaking websites?

glad hearth
#

Yeah

opal heron
#

I see, yes it is possible.

#

What, your plugin got leaked?

sturdy oar
#

I mean it's the author of the plugin who should worry of eventual illegal redistributions of his software

#

if it's not yours i would honestly not bother

opal heron
#

You don't need to worry about someone's resources getting leaked, they have terms and they'll deal with it.

sturdy oar
#

but you can still report it if you have proofs of malicious code

glad hearth
#

What, your plugin got leaked?
no but there's a person I know that has activity in leaking websites, a person that is saying my server and plugins are perfect and he is using actual leaked premium plugins

opal heron
#

welp sucks, if he only said that

#

You need the names of the plugins to actually report it to the author

glad hearth
#

I understood that, Thanks.

frigid ember
#

Speaking of which

#

I should check if someone didn't comply with the license of my only public plugin (as if they would fork it an redistribute it anyway lmao)