#help-archived

1 messages Β· Page 102 of 1

silk gate
#

yeah org.sqlite has jni

keen compass
#

but the crash happens in 20 seconds

#

so I highly doubt sqlite is responsible for that in the first 20 seconds

obtuse rose
#

@keen compass you realize host kernel is the one that manages process memory inside docker right?

keen compass
#

I am aware, but how often do you see linux kernels causing segfaults? second if this was the host kernel you would think more customers would have been complaining and the hosting provider would have responded with more information other then the indication they are not certain

silk gate
#

yah im agreeing w/ you @keen compass

a buffer overflow in the sqlite lib wouldve been discovered long ago

#

whilst possible its sqlite, realistically its not

keen compass
#

Also have to remember, the docker container isn't crashing either

#

if the kernel was segfaulting there would be more problems then just the JVM crashing in a docker container and more of their customers should be complaining. Wouldn't make sense that only a specific person complaining which makes me think it is more HW related then anything else. As well as empty registers which is not normal.

silver pewter
#

Hello does any know how I can find a canter of a schematic in world edit api and teleport a player there thanks

keen compass
#

canter?

silver pewter
#

centre

obtuse rose
#

@silver pewter math

silver pewter
#

my bad haha

silk gate
#

(min + max) / 2

#

boom

obtuse rose
#

or you mean the location that person who created schematic stands on, whatever that called

keen compass
#

offset

silver pewter
#

It needs to be the location of it as It's generating a random location in the world to paste it then spawn the player and il try offset thanks

keen compass
#

offset is the location from where a person stood when they created the schematic

#

if you need the center of the schematic, you can get that by getting the relative locations of the schematic which is the opposing corners

#

from there you have to do math to get the center

silver pewter
#

okay thanks

keen compass
#

@obtuse rose I am not saying the kernel can't be responsible, just that there is no indication that the hosting provider is receiving multiple complaints about the problem. If it was a memory module, not everyone would be affected, just only the applications that attempted to use that specific module. But if it is the kernel, it would still be interesting to know why the kernel is freaking out over docker or the JVM.

#

Also if the hosting provider is using common kernels that everyone uses, just like the memory module, its very rare to happen

#

especially with applications like docker or the JVM

obtuse rose
#

@keen compass why are we going back at this, I did said I agreed that it's probably hardware πŸ€”

turbid latch
#

Caused by: java.lang.ClassCastException:org.bukkit.craftbukkit.v1_15_R1.CraftWorld cannot be cast to com.sk89q.worldedit.world.World

keen compass
#

I didn't see that sorry @obtuse rose

obtuse rose
#

πŸ€·β€β™€οΈ

subtle blade
#

Answered that earlier, vollx

turbid latch
#

what is bukkit adapter?

#

...Choco

#

i'm still lost here..

subtle blade
#

BukkitAdapter.asBukkitWorld(world)

#

It really can't be much more simple than that

turbid latch
#

thanks

subtle blade
#

Or, rather, BukkitAdapter.adapt(World) works as well. Depends on what you need I suppose

sturdy oar
#

I am not quite understanding one thing from the Spigot Javadoc

#

the PlayerCommandSendEvent is returning a list of commands, and not a single one?

subtle blade
#

Correct

#

PlayerCommandSendEvent is called when the server sends the list of known commands to the client

sturdy oar
#

but how would one player execute 2 commands at the same time

#

oh

subtle blade
#

You want PlayerCommandPreprocessEvent or something like that

sturdy oar
#

yeah probably

#

is therea PostProcess or something

#

called after the command has been executed,

subtle blade
#

Not really

#

Most all events are called before the action actually occurs anyways

sturdy oar
#

ok thank you. PlayerCommandPreprocessEvent is fine anyway

subtle blade
#

Just read those docs to make sure you're not doing something you shouldn't be

boreal bramble
#

Method org/sqlite/RS.isClosed()Z is abstract
Anyone?

dusty topaz
#

Does anyone know if the OfflinePlayer passed String onRequest(OfflinePlayer, String) in PlaceholderAPI can be instanceof Player

#

Can I cast or will I have to grab the player myself

analog roost
#

Hello, does anyone know how to use tab complete with bungeecord ? I have an issue with command /ban and /msg and all other minecraft-natives commands, I'm looking to made a custom tab with them, but for now don't fin a trick :c Can someone help me ? πŸ™‚

subtle blade
#
if (offlinePlayer.isOnline()) {
    Player player = offlinePlayer.getPlayer();
}```
#

No casting necessary

#

(pretty sure it casts internally, but shush)

harsh anvil
#

is the WorldLoadEvent not triggered on startup?

#

or is it triggered before Postworld plugins are loaded?

hoary parcel
#

Well, post world means your plugin is enabled after worlds loaded

#

So that event has long passed

#

You would iterate all worlds it you use post world

harsh anvil
#

i see

#

is nexus down?

#

everything seems to time out for me

hoary parcel
#

What Nexus?

hoary parcel
#

Well, idk what that Nexus is

#

Or why you trying to fetch bukktion 1.8.6

harsh anvil
#

lol what

#

idk either

#

probably some dependency of some plugin

hoary parcel
#

Well you also use worldedit 6...

harsh anvil
#

i used the version on the wiki Β―_(ツ)_/Β―

#

actually its WE 7

hoary parcel
#

That screenshot clearly shows you downloading WE 6

harsh anvil
hoary parcel
#

Worldedit us already at 7.1 btw

#

Gotta exclude such outdated shit then

harsh anvil
#

how would one do that

obtuse rose
#

@hoary parcel you actually don't know what Nexus is or that's a joke?

hoary parcel
#

Pls reread my message

#

I said I don't regonize that particular Nexus instance

minor laurel
#

seems like he was talking about a specific Nexus... not in general mate lol

obtuse rose
#

ohhhh okay

hoary parcel
minor laurel
#

It's known as the MiniNexus?

obtuse rose
#

yea, I have a feeling I've heard you mention that

naive goblet
#

bungeecord.server.<servername>

#

iirc

obtuse rose
#

I dused to have nexus but now I uploaded it manually and serves it via Nginx

#

because less RAM usage πŸ˜†

harsh anvil
#

i dont even know what hc.to is

#

all i know is that times out and that my builds take forever now

hoary parcel
#

And that's why you out a comment to repos you add

#

Or, don't add any custom repo at all

#

I just mirror everything instead

#

So my builds are actually stable

harsh anvil
#

non of them even point to that nexus tho, but idk much about how maven resolves shit so idk

obtuse rose
#

@hoary parcel how much RAM your nexus take?

hoary parcel
#

Idk, zero?

obtuse rose
#

πŸ€”

minor laurel
#

what did u change exactly @rough root ?

obtuse rose
#

mine took like a GB

deep olive
#

is giving this error when a friend of mine enters the serverhttps://cdn.discordapp.com/attachments/711216169050308658/714856327083458611/unknown.png

hoary parcel
#

I run so much shit in that server, It doesn't matter

obtuse rose
#

how much RAM you have in total xD

minor laurel
#

@deep olive is your server port forwarded?

hoary parcel
#

I think 16 on that particular one

harsh anvil
#

Also now i have a different issue. I'm now listening to the world load event (changed my plugin to load at startup). However, now i have issues with load order, since my config defines what plugins to depend on, so i dont have a proper way to deal with loadorder πŸ€”

deep olive
#

yes

harsh anvil
rough root
#

@minor laurel I've changed a lot. I don't know. Been dicking with this for quite a while. I'm using this on a creative server, with the top level of the world at block level 4.

deep olive
#

I put it on Port Triggering or Virtual Server

minor laurel
#

Hmm. I can't find much on it.

rough root
#

players are able to place chests - but they're not creating claims, can't be removed and giving me the message I stated before.

deep olive
#

my router and a TP-link

minor laurel
#

Potentially check sea-level in GriefPrevention config @rough root

rough root
#

set to 2

minor laurel
#

try -1

rough root
#

fucking christ

#

gpreload writes the config file.

minor laurel
#

ah so it's been resetting as you've made changes?

rough root
#

yeah.

minor laurel
#

I'd try full restarts then and see if it makes any changes.

#

rather than using a plugin's reload command.

rough root
#

just did

#

no difference

#

getting annoyed now.

minor laurel
#

Unsure then. Contact the developer possibly.

rough root
#

Robo quit

brittle stone
#

Is there a reason why Maven is not importing a Bukkit artifact? I have referenced repo and dependency in POM, but it still acts as I never imported the artifact

minor laurel
#

@rough root whatcha mean.

#

he still replies to the spigot thread so idk wym

brittle stone
#

Here is how the POM setup looks like: ```xml
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.github.eirikh1996</groupId>
<artifactId>NationCraftGUI-Core</artifactId>
<version>Core</version>
</dependency>
</dependencies>

#

But the Bukkit artifact will not import

analog roost
#

Someone know why TabCompleteEvent wont fired in bungeecord with command /ban and all other natives commands ?

dusty topaz
#

Is it possible to speed up / slow down hoppers individually

#

I'm not seeing it in the javadocs but it sounds like something that should exist

#

Do I just have to listen to inventory move event and do it?

limber sierra
tardy lance
#

how do i give permissions? there is a hasPermissions() function but not a givePermission

brittle stone
#

Also, can I get some help regarding the issues I have importing Bukkit into my project?

harsh anvil
#

error?

obtuse rose
#

@limber sierra this jar isn't the one you've used earlier?

#

I mean like back when you said it was working

dusty topaz
tardy lance
#

ty

brittle stone
#

Alright, When can someone tell me why the Maven artifact is NOT importing the Bukkit library into my project, despite the very fact that I have referenced BOTH the correct repo and dependency in the project's POM. It is also a multi-module project, IDE is IntelliJ IDEA, language is Kotlin, and I am using the recent versions of both

hoary parcel
#

does it work in the CLI?

brittle stone
#

What is CLI? @hoary parcel

hoary parcel
#

mvn install

dusty topaz
#

not using clean 🀒

brittle stone
#

Also, when I try to use for example JavaPlugin to extend the main class from, the IDE generates a cannot resolve error and when I Alt + Enter it to get a fix menu, none of the fixes are import

dusty topaz
#

try typing mvn install

#

into the console

#

when in the root directory

brittle stone
#

And yes, I tried with re-import, mvn clean install but no luck

dusty topaz
#

send stack trace? send pom.xml?

brittle stone
#

Issue is the same

dusty topaz
#

there isnt just a magical solution .-.

languid pewter
#

@brittle stone remember that now in intellij idea you must click the maven icon (top right) to reload the pom file

dusty topaz
#

i hate that :(

#

i liked auto importing

languid pewter
#

I think maybe you can change that

#

I dont think they deleted that at all

brittle stone
#

@languid pewter Is that new in IDEA 2020.1?

languid pewter
#

yes

#

all 2020 IntelliJ IDEAs

hoary parcel
#

not using clean 🀒
@dusty topaz why would I use clean and slow down my builds?

languid pewter
dusty topaz
#

because sanitisation

languid pewter
#

@brittle stone

dusty topaz
#

is key

hoary parcel
#

doesnt make much sense

dusty topaz
#

idk, i always clean install if installing

brittle stone
#

Problem is @languid pewter that I cannot find that icon in the location you are specifying

languid pewter
#

what OS are you using?

#

Windows or macos/linux?

#

Changing the theme, I have a little question, does the permissions in bungee.yml works like in plugin.yml?

#

I'm starting with bungeecord API and I want to know that

limber sierra
#

@limber sierra this jar isn't the one you've used earlier?
@obtuse rose i edited that message to say nvm lol, the only jars i've tried are spigot 1.12.2 and paper 1.12.2

keen cedar
#

How do I make a player open some sign? Asked here before but I don’t think anyone saw.

hoary parcel
#

just send em the packet?

#

need to send a black change too iirc

tulip pendant
#

Guys what the best crates plugin

#

And what's the best free anticheat

keen compass
#

@limber sierra figured out your issue

#

your issue is the sqlite lib shaded in server jar. You need an sqlite version compiled under musl and not gclib

#

there should be one in the repos for alpine

tulip pendant
#

Smh

wheat summit
#

I'm using Java's Time functions and when I try setting the time to expire more than a few weeks it seems to limit the time to only a week and a half, does anyone know how to fix this? Here's a small example of how I'm using it:

#
  int second = 1000;
  int minute = second*60;
  int hour = minute*60;
  int day = hour*24;
  int month = day*30;
  int year = month*12;
  Date date = new Date();
  long numberToExpiredDate = date.getTime() + (month * 2);
  Date dateToExpire = new Date(numberToExpiredDate);

  toBan.kickPlayer(reason);
  Bukkit.getBanList(BanList.Type.NAME).addBan(toBan.getName(), reason, dateToExpire, player.getName());
#

Banning for a day works fine ^

hoary parcel
#

that looks really really dum logic, why dont you use the new time api?

wheat summit
#

I'm not sure what that is

#

Is there an example somewhere I can use?

hoary parcel
#

LocalDateTime.now().plusDays(1).plusSeconds(100).plusMonths(111)

tiny dagger
#

^^^

wheat summit
#

Ok thanks

#

Says it needs a date, not LocalDateTime

#

Tried casting and it doesn't seem to work

hoary parcel
#

need to convert back to date

wheat summit
#

Oh ok, how would I do that?

hoary parcel
#

Date.from(ldt.toInstant()) iirc

wheat summit
#

Ok thanks

chrome edge
#

What is the easiest way to listen all of blocks in a world? I've tried "BlockPhysicsEvent" but this is not what exactly I want. So is there any other way?

subtle blade
#

what?

#

You can't "listen to a block". You can listen to something that happens to a block, sure

chrome edge
#

I meant to say what you said exactly.

#

So is there a way?

wheat summit
#

There are several Block Events

#

You can check if they're broken, placed, formed, and some more information

subtle blade
#

Right. You're not going to listen for every single thing that happens to it in just a single listener. That's not how that works

hoary parcel
#

I mean

#

you coooouuuld

#

but you really dont want to

wheat summit
#

^

chrome edge
#

Okay, we can say I'd want to check liquids. I've tried all of the events related blocks and found that they doesn't work whenever you place block at liquid source except BlockPhysicsEvent

wheat summit
#

Using something like BlockFormEvent or BlockToEvent should work, let me check quickly

#

BlockFromToEvent May work

pastel condor
#

When you click a slot in my gui it jumps 2 inventories over (for example when you click an item in slot 13 which opens an inventory then it clicks slot 13 in that inventory too). Anyone know how I can fix this?

chrome edge
#

Did you try to place a block at liquid source?

#

The event doesn't work whenever liquids back off

hollow cove
#

Hey is their anyway to make a minecraft server that pc and the consoles can play on

wheat summit
#

Potion You can use Nukkit to let consoles play on servers, may want to join their discord for more information

#

It's a bedrock API ^

#

Not Java

chrome edge
#

@pastel condor You should have show your current code to us so we may help you.

pastel condor
#
        final Player player = (Player) event.getWhoClicked();
        if (!(plugin.getGUIInventories().get(player.getName()).equals("AdvancedSettings"))) return;

        event.setCancelled(true);
}``` and ```    public void openInventory(final Player player) {
        final Inventory inv  = advancedSettingsGUI(player);
        player.openInventory(inv);
        plugin.getGUIInventories().put(player.getName(), "AdvancedSettings");
        
    }```
wheat summit
#

Also sorry Black I missed you though did you try BlockFromToEvent Yet?

pastel condor
#

theres more too I can show you the entire class if you need me to

wheat summit
#

Ok Fier though can you upload the code to Hastebin or Pastebin?

chrome edge
#

As I see from javadoc, you're right but doesn't work whenever liquid source destroyed

wheat summit
#

That's weird

chrome edge
#

yep

wheat summit
#

What code do you have for it?

#

Any errors on what you're trying to do?

chrome edge
#

Only physics event works but it's for physic and calling 4 times for block faces

#

No error. It works

#

Okay let me take a picture

#

If you place water, it works but if you destroy the source, it only works for source, not spreaded waters

#

I'd like to know spreaded water status.

wheat summit
#

Ohhh ok

#

Hmm

chrome edge
#

Okay, let's change the question. Is there a way to find source of water from its spreaded part.

tiny dagger
#

not really

#

you can loop

#

and detect by level

#

actually nevermind

#

that wouldn't work if it's a cascade

#

there is no easy way to do it πŸ€”

#

unless you control who places water in first place

#

it might be easier that way

chrome edge
#

oh god wait

#

I think I found it

hollow cove
#

@wheat summit Thanks

chrome edge
#

@wheat summit I forgot the test only one event which works...

#

You were right. "BlockFromToEvent" works but I've to put some delay on it lol

wheat summit
#

What do you mean?

#

Ohh ok loll

pastel condor
wheat summit
#

It's fine

#

So what was wrong @pastel condor ?

pastel condor
#

when you click an item it jumps 2 inventories, for example when you click settings it jumps to the settings gui then to the basic settings

#

same with when you click advanced settings, it click it then toggles a setting

chrome edge
#

you should try with put "return" each if statement

pastel condor
#

I did

chrome edge
#

Have you try with "event.getSlot"

#

instead of raw form

pastel condor
wheat summit
#

What's the SettingsGUI Function?

#

Also personally what I did is checked the name of each item clicked

chrome edge
#

@pastel condor try with normal slot

#

not a raw

pastel condor
#

but still what if I have 2 grass blocks?

#

I would prefer not to just try random things, as it was working perfectley when I checked the entire array of contents of the inventory. So I know that shouldn't be the problem the problem must be with line 28 or 103

chrome edge
#

and use else and if or return. It's not best to use like that.

pastel condor
#

what would that do?

#

it wouldn't solve the clicking two times issue

chrome edge
#

if you use like that, the code will scan all of the statment even first one is true

pastel condor
#

yes, but how would that solve the double clicking?

chrome edge
#

idk is spigot bug or not but try to close inventory before open new one

#

It may work

frigid ember
#

Hey guys how would I make a core plugin so I can have modules?

tiny dagger
#

maven

robust pulsar
#

Hi, I'm a little new to this but I hope you understand me.
I train a network which is hosted on a dedicated server but I don't know how to make it work / restart

opaque swan
#

21:05:01 [INFO] [Rickylacio] <-> ServerConnector [lobby] has connected
21:05:03 [INFO] [Rickylacio] <-> ServerConnector [pryma] has connected
21:05:03 [INFO] [Rickylacio] <-> DownstreamBridge <-> [lobby] has disconnected

#

How i can fix this?

#

i want have a force connect all time in Lobby server

robust pulsar
opaque swan
#

Thank you

brittle stone
#

@languid pewter The OS I am using is Windows 10

reef sparrow
#

This is coded with the ProtocolLib API and I dont know why the Packet Listener doesnt calling when i click done on the Sign here the Code(Method): https://hasteb.in/funasefo.java my MC Version is 1.14.4 ...sorry for my bad english

opaque swan
#

don't work

#

21:20:51 [INFO] [Rickylacio] <-> ServerConnector [lobby] has connected
21:20:53 [INFO] [Rickylacio] <-> ServerConnector [pryma] has connected
21:20:53 [INFO] [Rickylacio] <-> DownstreamBridge <-> [lobby] has disconnected

#

watch

#

i need to add restricted: true to olther servers?

languid pewter
#

@brittle stone So you should use CTRL+SHIFT+O I guess

#

let me check

#

Yes, it's that

#

try using that

brittle stone
#

I tried. The effort, however, was totally in vain

#

Issue remains the same

#

I even tried deleting and re-downloading the bukkit artifact folder in the .m2. Didn't help either

#

I am really out of options

languid pewter
#

Try creating a ticket in jetbrains youtrack

#

maybe it's a intellij issue

#

also try updating to latest version

#

and disabling plugins, maybe one plugin is causing the issues

left plover
#

Guys, I'm using 1_8_R3 base for my plugin and it's cross version over 1.8+. Because of things like the left hand, would it be possible to interact with it or not?

naive goblet
#

wym

#

it would why wouldn't it

left plover
#

the left hand ability doesn't exist on 1.8?

tiny dagger
#

welcome to the ancient versions

#

where nothing exists and you will have to make work arounds for it :p

left plover
#

:')

opaque swan
#

Anyone have any solution?

#

22:16:52 [INFO] [Rickylacio] <-> ServerConnector [lobby] has connected
22:16:54 [INFO] [Rickylacio] <-> ServerConnector [pryma] has connected
22:16:54 [INFO] [Rickylacio] <-> DownstreamBridge <-> [lobby] has disconnected

#

i want have a force connect to Lobby

#

always

brittle stone
#

Also @languid pewter I am doing it on Kotlin

keen compass
#

@opaque swan

force_default_Server: true
worn temple
#

Having forced hosts will bypass that, so make sure people can only connect to the network under one domain

languid pewter
#

@brittle stone yeah, but that doesnt matter, I also create kotlin plugins, it might be something else, try creating another project

#

or maybe reinstalling intellij

brittle stone
#

I reinstalled intellij and it still happens

#

I also submitted an issue report to JetBrains

boreal bramble
#

Idk why it is not working. I need it for now

naive goblet
#

you cant invoke an abstract class nor use the method coming from the class. You'd need to invoke the overridden method then

boreal bramble
#

on documentation it is not abstract
So what should I do? Override isClosed Method?

naive goblet
#

send class of RS ?

cloud crater
cloud crater
#

just use a spigot version jar

#

or buildtools

subtle blade
#

BuildTools will compile the API for you

#

Accessible through Maven with the spigot-api artifact

#

If you want the artifact, should be in Spigot/Spigot-API/target (relative to the BT directory)

cloud crater
#

bugging me. anyone know the issue.
expected <block end>, but found BlockMappingStart

  0:
    type: '[firstjoin]'
    actions:
      0_sub:
        subtype: '[broadcast]'
          text: 'EnumBot Welcome to the server'
      1_sub:
        subtype: '[msg]'
          text: 'EnumBotPrivate> welcome to the server'```
limber marlin
subtle blade
#

You're on a fork

#

Seek support there

limber marlin
#

ok

subtle blade
#

Ceezy,

        subtype: '[broadcast]'
          text: 'EnumBot Welcome to the server'```
#

Can't do this

#

You're trying to make it a string and a section

tiny dagger
#

mineresetlite mason

frigid ember
cloud crater
#

thanks choco, fixed

errant valley
#

Hi, I have a problem with my spigot account, I can't get in because I don't have the 2 factor code

boreal bramble
#

@naive goblet RS is build-in class named ResultSet

worn temple
#

@frigid ember probably an error on boot. We would need more in order to help you.

boreal bramble
#

And i dont have Access to it

worn temple
#

@errant valley You need to use either the 2fa generator for a key, or use the backup codes they give you (which the remind you to write down every single time you log in).

If you don't have either, you're SoL, as they do not do account resets anymore according to their reminder.

frigid ember
#

@worn temple what you need?

errant valley
#

@worn temple I have no key app, how do I do it?

worn temple
#

@frigid ember namely for you to check if there are errors when the server boots. If there aren't, remove any "hotload" plugins like Plugman, as they are only meant for developers. If you are still having issues, contact the dev of mcmmo since it may be a code issue.

frigid ember
#

ok il check

worn temple
#

@errant valley You can't have enabled 2fa without an app like authenticator. Again, you either need the otp generated by authy/authenicator when you turned on 2fa, or your backup codes. Otherwise you can't login and should make a new account.

frigid ember
#

if i start my server it says [ERROR] [mcMMO] There was an error while enabling mcMMO!

worn temple
#

Okay, what's the full error? pastebin that please

frigid ember
worn temple
#

whatever mcmmo version you are using, it doesn't seem compatible with spigot 1.15.2. mcMMO is a premium plugin btw

errant valley
#

@worn temple I had bought plugins in that account, can't I do anything?

frigid ember
#

ok il check with the dev of mcmmo

worn temple
#

@errant valley No, if you didn't bother writing down the backup codes like you were told many many times to do, you getting locked out of your account is on you.

errant valley
#

yes but what does it mean, one can also lose backup codes. I have taken a new pc it is normal that I have nothing left

worn temple
#

Its on you to make sure you always have those backup codes. This is why you should be using a password manager like lastpass where you could store those backup codes.

ebon yoke
#

i recommend you put them in a password manager next

#

lol just read that

errant valley
#

okay, are you sure what you say? because you are only a verified user

ebon yoke
#

what do you mean you lost your codes not us

#

also quick question how do i get rid of the commands showing up red in bungee even tho they are correct

worn temple
shy shard
#

I need a bit help with making fake player to which players can send /tpa or /msg
is it possible to create player on server not just thru packets
so player is killable
thanks

worn temple
#

You can make an NPC, but you can't truly make "fake players"

#

So, to your question, no, that's not actually possible. You can make them through packets in the tab list, and an npc that can be killed, but you can't make it possible to /tpa, etc. unless a plugin is specifically made to handle those commands and make "fake players"

shy shard
#

oh ok thanks

subtle blade
#

I mean... you can make a fake command sender, but plugins are going to absolutely hate you for it

worn temple
#

^

#

True

#

Forgot about that, but yeah, most plugins will really hate that

#

You'd break way more things than you'd think

ebon yoke
#

also quick question how do i get rid of the commands showing up red in bungee even tho they are correct
@ebon yoke anyone ?

shy shard
#

@subtle blade What I mean is really player should be able to send /tpa or /msg to fakeplayer

#

so real player thinks that person is online

#

and they don't get message "that player is not online "

#

xd

ashen stirrup
#

how do you check the location of a chest when it’s closed?

#

can you use event.getInventory().getLocation()?

subtle blade
#

InventoryHolder

#

inventory.getHolder()

frigid ember
#

Hello, is there any good way to calculate blocks between player and this.Example point?

worn temple
#

Pretty sure there's a distance function somewhere, or you make a vector for each and then do the distance calculation on that

ashen stirrup
#

@subtle blade What would the InventoryHolder do? I’m checking for a chest at a location.

subtle blade
#

well if you have an inventory...

#

you can get its holder, and InventoryHolder has a getLocation() method

ashen stirrup
#

I’m assuming event.getInventory().getLocation() would work in the same way?

subtle blade
#

Do Inventories have a getLocation()?

#

Huh. TIL they do

#

So what's your question then. I don't understand

ashen stirrup
#

I didn’t know if event.getInventory().getLocation() would get the location of the chest or not

subtle blade
#

It would

ashen stirrup
#

Great

barren abyss
#

I have a legal stuff question, if I made a plugin and I uploaded in spigot, can other website take my plugin and use it in their own website?(Im talkin about those minecraft web hosting), they are offering plugins to install, and in that list its my plugin.

#

Idk if I can do something about it or they have the right to do it

subtle blade
#

That's up to you. You're the one licensing the project and the one who should take legal action if they're in violation

#

If you mean the web panels that are "one click install plugin", depends on whether or not they download it from Spigot or they host mirrors

#

If you're talking about a free plugin, honestly who cares? So long as you've gotten your credit, you're not really losing anything

dusty topaz
#
  @EventHandler
  public void onInventoryClick(InventoryClickEvent event) {
    if (event.getClickedInventory() != null
        && event.getClickedInventory().getType() == InventoryType.PLAYER) {
      Player player = (Player) event.getWhoClicked();
      if (event.getRawSlot() == HELMET_SLOT) {
        ItemStack cursor = event.getCursor();
        if (HelmetItem.getInstance().isHelmet(cursor)) {
              player.setItemOnCursor((event.getCurrentItem() == null
                  || event.getCurrentItem().getType() == Material.AIR) ? null
                  : event.getCurrentItem());
              player.getInventory().setHelmet(cursor);
        }
      }
    }
  }

why does this not work, but running the setItemOnCursor / setHelmet stuff works if I runTask

#
          Bukkit.getScheduler().runTask(oxygen, () -> {
            player.setItemOnCursor((event.getCurrentItem() == null
                || event.getCurrentItem().getType() == Material.AIR) ? null
                : event.getCurrentItem());
            player.getInventory().setHelmet(cursor);
          });

this works for some reason though

barren abyss
#

is there anyway to make my resource private? just accesible with a link? X))

subtle blade
#

No

bright forge
#

Hey, does someone knows how to get server compression threshold from a spigot plugin?

frigid ember
#

How can I install slimeworldloader without changing run.bat because my host doesn't allow for that

bright forge
#

Thats not really necessary

#

still i would recommend getting a private host

#

that flags are to increase ram in your server, you dont really need that and your host manages that.

frigid ember
#

How can I install slimeworldloader without changing that?

bright forge
#

just installing it

#

it would probably work

#

if not rip

bright forge
#

did you atleast like, understand what flags do?

frigid ember
#

Yeah it's at 1:20

bright forge
#

Oh i didnt see that

#

no way sorry mate

#

You have to get a dedicated hosting or vps for that

barren abyss
#

I can't delete my own reousrce kek

worn temple
#

@bright forge @frigid ember You can't change the memory flag unless you purchase more with the host you are using. That's what that flag is, its max ram allocation... so you'd have to pay more to get more

silk gate
#

wellll

barren abyss
#

hey..... How can i create config section?
@frigid ember Create a config.yml file, and request info by using instance.getConfig()

silk gate
#

you can use a jar that launches another jar

#

your host won't like it

#

but it'll work

#

@frigid ember

worn temple
#

I'll only work if they don't containerize everyone's instances (which they should be doing now). And, if your host notices, they will just shutdown your account without so much as a warning, so rip all your configs and world data.

silk gate
#

why would docker mean that a jar can't launch another jar

worn temple
#

No, it can launch another jar, that's not the issue. The issue is changing the run time flags and allocating more memory

dusty topaz
#

not enough ram allocated to the container

silk gate
#

he doesn't want to allocate more ram

#

he wants to add more flags it seems

worn temple
#

I saw the mem flag highlighted, that's why I was saying that

#

But depending on the flags, the host could just delete their account anyway.

silk gate
#

yeah he was just demonstrating he can't edit it

frigid ember
#

Didn't mean to highlight that, but I'm trying to add -javaagent

worn temple
#

You'd have to check the ToS about doing something like that

silk gate
#

if you contact your host they should be able to add additional flags for you

frigid ember
#

alright

bright forge
#

anyways, do anyone knows how to get network compression threshold from a plugin? Im trying to add a custom decompressor.

worn temple
#

Not sure what you mean by that

#

Also, not sure why you want to add an agent... since that can cause a lot of performance issues.

bright forge
#

server.properties -> network_compression_threshold

I need to know how to get that value

#

Its an api to manipulate packets

#

like its not 100% important but i want developers to be able to decompress and compress with a method

pastel condor
#

my server has a 1MB/S upload speed, what should I set the compression threshold to?

worn temple
#

oh (haven't worked with spigot since early 1.14 so I'm a bit rusty).

Load it as a Properties file. and then get the network_compression_threshold key

#

@pastel condor you should be fine to just leave it as it is until you get a ton of players. 1mb/s is plenty for a small server

silk gate
#

1mbps will do you 2 players

worn temple
#

It'll do more, I hosted a 30player server on 3mb/s up

silk gate
#

I generally see 0.5mbps/player

pastel condor
#

I was able to get 10 - 15 on and it was pretty good

silk gate
#

according to netdata

pastel condor
#

I see

worn temple
#

I don't think those numbers are realistic. I'd like to see if they factored in other possible bottle necks.

Low upload speeds are fine for smaller servers. You should be okay to just leave the compression alone

pastel condor
#

I see okay

#

Thanks

silk gate
#

even if you manage to get 0.1mbps/player

#

you're cutting it really fine

little lava
worn temple
#

@bright forge pseudo code here since I don't know it off the top of my head

File settingsFile = new File("./settings.properties");

String netComp = "";
try {
  InputStream fil = new FileInputStream(settingsFile);
  Properties settings = new Properties;

  settings.load(fil);

  netComp = settings.get("network_compression_threshold"); //Should be a string returned.
} catch (IOException e) {
  //handle file read error
}

Likely plenty of errors in that, did it all without an IDE. But that should be the gist of it and enough to get you to what you need.

bright forge
#

thank you man

worn temple
#

Np

bright forge
#

I think getProperties should be added to Server object

#

so people doesn't have to do this process all over again

worn temple
#

There may be somewhere it's at, but I don't know, so this is the best solution I could think of lol

bright forge
#

I hope haha, thx for that, this will be my solution atm

worn temple
#

yee

left plover
#

how do you differentiate a click from the top or bottom inventories from an if statement

#

Using InventoryClickEvent

plucky relic
#

Help

#

I tried to use BuildTools to install Maven with the NMS on it

#

But it didn't add anything to my current version

#

I think it's because BuildTools installed maven by itself

#

I have the spigot jar, what can I do to add the full spigot to my local repo????????

#

I already have maven on my system

#

BTW, MacOS

worn temple
#

@left plover I think its all indexed, so you should be able to tell based on its index. But I don't know where that index starts at relative to the top and bottom

#

@plucky relic You can add spigot by including the dep in your plugin's pom.xml, and craftbukkit has to either be manually imported in, or hosted in a maven repo and then referenced in the pom.xml of your plugin.

left plover
#

It isn't different weirdly, I tested it and it indexes the top and bottom like completely different UIs

plucky relic
#

What?

#

Isn't it gonna update my Spigot on my local repo?

worn temple
#

You can specify the version. spigot is hosted on a maven repo so you can just include it in your project like other maven deps. CB has to be imported manually, differing depending on your IDE unless you have a private repo set up, but that's a whole thing on its own

plucky relic
#

CB can be built from BuildTooks, correct?

worn temple
#

Yes, but then you have to import it into your project manually

plucky relic
#

I could Local host, is it hard?

#

i got a server and a domain after all

worn temple
left plover
#

oh does that mean .getRawSlot() is the actual slot hm

plucky relic
#

Also.. there is local repos, right?

worn temple
#

There is local repos, but you have to mess with maven's settings.xml which can be hard to find, and is a pain to get pointing to the correct spot.

plucky relic
#

Ughhhh

worn temple
#

@left plover I don't know, but they did mention checking if the inventory clicked is implementing player inventory or not, if it is, its the bottom, if it isn't, its the top.

#

Again, I can't speak to if its completely correct, I'd have to test that myself and can't do that right now

plucky relic
#

Nova

#

I excecuted build tools.

#

I got some maven repos

#

Including one titled CraftBukkit

#

If I package it, will it be the CraftBukkit jar?

worn temple
#

Yes, I know what BT does. You should just have the craftbukkit jar already.

plucky relic
#

It only gave me the spigot one

worn temple
#

It should be giving you CB as well, always has for me. That's how I got all of them hosted in my private repo online

plucky relic
#

k

frigid ember
#

Hey guys, is this correct?

    for (UUID uuid : members) {
        Player target = Bukkit.getPlayer(uuid);
        
        if (target.isOnline()) {
        
        }
    }

or do I have to do

If (target == null)

first?

plucky relic
#

Yess

#

it works

#

tysm

#

I'ma make a private repo later on cause this is shit but thx

radiant pollen
#

@frigid ember I'm pretty sure getPlayer() is nullable.

worn temple
#

It is, pretty sure it will return Null if the player is offline, however OfflinePlayer will always return something

#

if the player is null, then the player is offline. So, there's no need for the target.isOnline() check

radiant pollen
#

When using OfflinePlayer, you're right you'll always get an OfflinePlayer, but it might not be a real player.

#

You have to check OfflinePlayer.hasPlayedBefore() to make sure it's an actual player and has played on the server

worn temple
#

Yeee

#

never said it would return a real player, just that it always returns not-null

frigid ember
#

@radiant pollen so if the player has logged off then this will be fine and not through errors?

    for (UUID uuid : members) {
        Player target = Bukkit.getPlayer(uuid);
        
        if (target != null) {
        
        }
    }
worn temple
#

Yup, that will work

hazy nimbus
#

hey so im new to like spigot and bungeecord and all that, well i have 3 servers and i was wondering how i could like the hypixel npc's to take me to another server

frigid ember
#

Anyone know how to pull an enum constant given just a String

worn temple
#

@frigid ember YourEnum#ofValue("yourString");

#

@hazy nimbus how to code them? or how to add them, usually it was the Citizens plugin with addons that allowed actions like that.

hazy nimbus
#

well for now just how to ad them, ill check it out thanks

frigid ember
#

@worn temple Do you mean the valueOf() method?

worn temple
#

enums have a valueOf method

frigid ember
#

I know

#

I need to explain this better

#

If you'd rather I explain it here, I'll give it another go:

#

Basically, I am given a String

"gaul"
"rome"
"greece"

etc

#

I have an enum like so:

    GAUL_RAM_UPGRADED("gaul_ram_upgraded.schem", new Location(Bukkit.getWorld(Statics.worldName), 0, 100, 0)),    
    GREEK_RAM("greek_ram.schem", new Location(Bukkit.getWorld(Statics.worldName), 0, 100, 0)),
    GREEK_RAM_UPGRADED("greek_ram_upgraded.schem", new Location(Bukkit.getWorld(Statics.worldName), 0, 100, 0)),
    PERSIA_RAM("persia_ram.schem", new Location(Bukkit.getWorld(Statics.worldName), 0, 100, 0)),
    PERSIA_RAM_UPGRADED("persia_ram_upgraded.schem", new Location(Bukkit.getWorld(Statics.worldName), 0, 100, 0)),
    CARTHAGE_RAM("carthage_ram.schem", new Location(Bukkit.getWorld(Statics.worldName), 0, 100, 0)),
    CARTHAGE_RAM_UPGRADED("carthage_ram_upgraded.schem", new Location(Bukkit.getWorld(Statics.worldName), 0, 100, 0));```
plucky relic
#

Hey

frigid ember
#

The String can be the first part of that constant

#

but I don't know matter of factly which it will be

#

I'm looking for an easy way to pull that constant & its related values based soley off a semi-unrelated String

worn temple
#

Loop through them and find a match

frigid ember
#

They won't watch

#

match*

#

Only certain portions of the String will

#

You could use some dynamic programming to solve this probably

#

But a waste of time

worn temple
#

Yes, so filter with a findAny

#

you have to use regex

frigid ember
#

Even if you do that though, it does not return the constant

#

It gives back a String

#

So then I will have to have these gross "if" statements everywhere

worn temple
#
MyEnum found = null;

for (MyEnum e : MyEnum.values()) {
  if (e.name.contains("myString".toUpperCase()) {
      found = e;
  }

if (found != null) {
    //Do something
  }
}
plucky relic
#

Okay

#

Suppose I made a custom entity by extending from entity zombie

#

If I do a listener to check, say for exmple, a hit, and I get that entity

#

If I do an instanceof, will it give me the custom class I made?

worn temple
#

Should

#

Wait

#

hang on

#

I did this in a plugin, let me find the snippet

plucky relic
#

ok

#

NMS is so weird z.z

frigid ember
#

@onyx spear nice solution πŸ‘

#

Ty

worn temple
#

https://owo.oooooooooooooo.ooo/i/xp2e.png

Basically, check if its the base entity you used, then cast to that, then check if its your entity, then you can cast to that.

You may be able to not do the cast twice and go straight from entity to yours, but I'm not 100% sure. The code in this snippet is about 4 years old now... but it did work at the time.

frigid ember
#

@plucky relic yeah

#

Gives you the base class by default

plucky relic
#

Okay

#

And suppose

#

Okay

#

How could I give a NMS Entity, a way to store some data on it

#

Like an "id"

#

of sorts...

#

You know what, nvm

#

It shouldn't be necessary.

worn temple
#

You can do that in your class

plucky relic
#

I mean yeah

#

I was thinking of the constructor

#

But the zombie wouldn't hold said variables.... or would it????

worn temple
plucky relic
#

Wait

#

so if I get the entity

#

s

#

cast it to my custom class

#

and get the valu

#

it will hold said value??

#

That's epic

worn temple
#

yeah, that's how inheritance works

plucky relic
#

Siiiiickk πŸ˜„

#

I thought it would just think of it as a normal zombie

#

Wait

#

Okay, hear me out on this

#

Can I make a class that extends Entity in general, and holds an ID

#

And other different entity classes that extend said class, so that all of them will also store ID's ?

#

I think I'm missing a step on what I said, most likely, but basically, I want to make different "EntityMobs" but have all of them have an identifier

worn temple
#

Just have:

MyEntityData extends Entity

MyZombie extends MyEntityData, Zombie

and then if you cast, you either cast to MyZombie and get the entity data and other zombie stuff, or cast to MyEntityData and just grab the data.

That should work, assuming you do that for each of the mobs you custom make

plucky relic
#

....

#

you can only extend 1 class

worn temple
#

implements then

plucky relic
#

you can IMPLEMENT more than 1

worn temple
#

Extends Zombie, implements MyEntityData

#

That will work

plucky relic
#

you sure????

worn temple
#

Well, it should.

#

Basically forces each custom entity class you make to extend from the entity its related to, and then implements the methods defined in the MyEntityData class, which can have defaults laid out to reduce repeating yourself

#

im really tired, and doing 10 things at once, so I may be a bit off, but this should be this general principles of it

plucky relic
#

it's ok

frigid ember
#

Does anyone know if there is a way to change how the command structure that is formatted for 1.15 for the command structure for previous versions? Like getting rid of the tab suggestions and saying "that isn't a valid command" even when the client doesn't know what it's talking about? Or is it purely client side?

worn temple
#

Because you can't just extend entity since its such a low level base class, so you'd either have massive chain of extensions (really bad), or just use an interface and define required methods so your code can just cast to the interface and call the ID method you want.

#

@frigid ember its not purely client side. There's a tab completion event you can override and help it along, but its plugin specific, so each plugin would have to do it.

At least, the last time I messed with that stuff, it may have changed.

radiant pollen
#

@frigid ember If you use the plugin.yml to specify permissions for commands, a player won't be able to see tab completions for commands they don't have permissions to use.

frigid ember
#

@frigid ember its not purely client side. There's a tab completion event you can override and help it along, but its plugin specific, so each plugin would have to do it.

At least, the last time I messed with that stuff, it may have changed.
@worn temple Alright. This new command structure thing whatever is quite annoying. Sometimes my slash gets doubled and then it screws with me typing in commands and whatnot. Could just be me, still hate it.

radiant pollen
#

lol that's just you

frigid ember
#

Rip my keyboard is messed up

radiant pollen
#

Saw your message, dw. The bot is stupid.

frigid ember
#

Oh rip

#

Thanks anyhow haha

worn temple
#

Β―_(ツ)_/Β―

barren abyss
#

it is hard to use disguise api? i want to change a zombie skin when hitted by another player

wanton vine
#

anybody know why this is showing up in my timings report?
0.06% 88.54% 0.04 s 44.27 ms 0.0 0.0k World Save

wanton vine
edgy pendant
#

@wanton vine Check if you have a firewall that blocks the UTC port on your Network/Computer, but It could also be if you bind to a false port, ic you changed that

#

because I had this Problem with my firewall and it seems preatty the same Issue here

obtuse rose
#

UTC port is not a thing

grand aurora
#

Does anyone know how I can take the yaw from a Location and set a block (chest) to be facing in the proper direction?

barren abyss
#

How can I change ghast fireball damage (ExplosionPower)?? thinkingpepe

barren abyss
#

nvm I realized

frigid ember
#

Hey guys, is this the right place to ask this? For youtube I search this and nothing pops up, but if I search just Notely then my channel pops up. I put both tags on my channel and videos but only notely works

barren abyss
#

"Spigot"

marsh hawk
#

anyone know how to change the multicraft panel to ssl? I already have it installed and dont want to lose my current files.

obtuse rose
#

@marsh hawk is it your own server machine? you have SSH access?

marsh hawk
#

yeah

#

i read some source and it just says use a reverse proxy but that doesnt seem to work

silver pewter
#

Hello, what's the best way to crate an region when someone creates an area thanks πŸ™‚

keen compass
#

@silver pewter what do you mean?

barren abyss
#

Bukkin runnables only can take 25L of delay?

#

when I put something higher than that the block dsnt work

tiny dagger
#

no there is no limit

barren abyss
#

This works:

scheduler.scheduleSyncDelayedTask(instance, new Runnable() {
                @Override
                public void run() {
                    player.kickPlayer(ChatColor.RED + "Has sido PERMABANEADO");
                    Bukkit.getBanList(BanList.Type.NAME).addBan(player.getName(), ChatColor.RED + "Has sido PERMABANEADO",null, "console");
                }
            }, 20L);

This doesn't:

scheduler.scheduleSyncDelayedTask(instance, new Runnable() {
                @Override
                public void run() {
                    player.kickPlayer(ChatColor.RED + "Has sido PERMABANEADO");
                    Bukkit.getBanList(BanList.Type.NAME).addBan(player.getName(), ChatColor.RED + "Has sido PERMABANEADO",null, "console");
                }
            }, 125L);
bronze marten
#

Long.MAX_VALUE + 1 is your limit

barren abyss
#

hm?

tiny dagger
#

wait that would be 1 frank i think

#

because it referts

#

that or negative max long

#

πŸ€”

bronze marten
#

Negative

keen compass
#

you are missing an argument

#

there should be two

#

well technically 3

#

mmm, I see I am tired

barren abyss
keen compass
#

it should work, if it is your IDE complaining then you need to fix your IDE

sturdy oar
#

use lambda plz

bronze marten
#

Bukkit.getScheduler().runTaskLater(plugin, () -> {}, delay);

silver pewter
#

@silver pewter what do you mean?
@keen compass would worldguard be the best option so players can own their own land?

keen compass
#

well it comes with an API to leverage regions for custom stuff

#

so if you are meaning like making a plugin would it be wise to use worldguard, probably as it makes doing quite a few things easier if you are not familiar with them

silver pewter
#

Okay thanks

barren abyss
#

okay now it does work

#

thanks homie

bronze marten
#

What fixed it

keen compass
#

probably restarting the IDE XD

bronze marten
#

Oof

hardy cedar
#

guys can i get help in something

#

when a server is offline in bungeecord it gives a very big message

#

is it possible to change it

#

?

sturdy oar
#

the one 'could not connect to a fallback...'

hardy cedar
#

yes

sturdy oar
#

I don't think so , I might be wrong.

hardy cedar
#

i need to change it fast 😦

keen compass
#

you could use a plugin to remove it from the list until it comes back online

barren abyss
#

Can I distinguish between slime generate naturally and slime that generates by the kill of the first slime?

keen compass
#

there is a slimesplitevent

#

for when the slime turns into more of them

barren abyss
#

God bless you

keen compass
#

so the first one you can use your normal entity spawn event

#

second one, slimesplitevent

barren abyss
#

Want to hear what am I doing? maybe you can give me any tip

keen compass
#

if you want. I am not an expert πŸ˜›

barren abyss
#

Me neither

#

Im makin the slime spawn with a higher size

#

but when I kill it the splits are the same size

keen compass
#

larger size slimes? like super giant slimes?

barren abyss
#

and thats a big issue

#

ye

keen compass
#

with the slimesplitevent you can get the amount and sizes with the event

#

and then you can just simply cancel it and spawn new ones with whatever size you want

#

if it meets a certain criteria to do so

#

instead of cancelling a better way might to use the setCount() method and set it to 0

#

and then just spawn new ones afterwards

#

this way you don't have unnecessary entity objects being created and then tossed away lol

barren abyss
#

So I can but the event in there and just change their sizes every time it kills a split?

keen compass
#

yep

#

since it gives you the entity in the event which will be a slime

#

and slime has setSize()

#

so you have multiple ways to handle it πŸ˜‰

#

actually that would be an even better way because then you don't actually have to do any spawning yourself, just set their sizes when they split πŸ˜„

reef sparrow
#

Can anyone help me with this?... This is coded with the ProtocolLib API and I dont know why the Packet Listener doesnt calling when i click done on the Sign here the Code(Method): https://hasteb.in/funasefo.java my MC Version is 1.14.4 ...sorry for my bad english

barren abyss
#

if I set: cancell the slime will die without splits am I right?

#

ill make him split 1 time and then just disappear

keen compass
#

@reef sparrow if the server never receives Open Sign Editor before it gets that packet, that packet will get silently ignored

reef sparrow
#

But the open sign editor packet is called and i recieved the text message but the update sign packet dont send the broadcast message

#

@keen compass do you know why this doesnt work?

keen compass
#

does it throw any errors?

#

just fyi, your String needs to be an array since there is 4 lines for a sign

#

also, there is a block location in that packet as well

reef sparrow
#

Know only it says I tried to edit a non-editable sign but in the PlayerInteract Event I set the opened sign to editable true...

keen compass
#

you can't edit signs after you close the edit sign window

#

another packet doesn't get sent for it

reef sparrow
#

also, there is a block location in that packet as well
@keen compass Yeah but i dont know how to get the Position

#

you can't edit signs after you close the edit sign window
@keen compass But the sign is opened the only problem is that when i click done nothing happened

hardy cedar
#

you could use a plugin to remove it from the list until it comes back online
@keen compass im sure that changing the message will be 100% better tho

reef sparrow
#

@keen compass Please help me because i dont know how to solve my problem...

barren abyss
#

Why is this not cancelling the slime to split in other slimes?

@EventHandler
    public void onSlimeSplit(SlimeSplitEvent event){
        event.setCancelled(true);
    }
keen compass
#
public void onSignUpdate(PacketEvent packetEvent) {
    PacketType t = packetEvent.getPacketType();
    PacketContainer p = packetEvent.getPacket();
    //gets the lines in the packet
    List<String> lines = p.getStrings().getValues();
    //gives you the location of the sign
    Location signLocation = p.getBlockPositionModifier().getValues().get(0).toLocation(World);
}
reef sparrow
#

ohh thanks but my main problem is that the Sign Update Packet Event doenst be called

keen compass
#

@barren abyss try doing event.setCount(0); instead

#

you need to implement PacketListener for it to get registered properly @reef sparrow

barren abyss
#

oh nvm I see my error

reef sparrow
#

Okay i try this thanks

barren abyss
#

the event was after the normal spawn event

keen compass
#

ah

#

Well if you are going to cancel the event, don't do that

#

uses up more resources

#

just use setCount(0); instead. The difference is this tells the server to not generate entity objects

#

as opposed when you use event.setCancelled it already did

#

but then just tosses the objects away

barren abyss
#

Okay! thanks for the tip appreciate it

keen compass
#
    Block block = e.getBlock();
            
            if(block.getType() == Material.STONE){

            }
#

fixed it @frigid ember

#

ok, think I am safe to reboot now that I have helped everyone πŸ˜„

#

if you still having problems I will be back shortly πŸ˜›

reef sparrow
#

@keen compass when i implement PacketListener it adds this methods ```@Override
public Plugin getPlugin() {
// TODO Auto-generated method stub
return null;
}

@Override
public ListeningWhitelist getReceivingWhitelist() {
    // TODO Auto-generated method stub
    return null;
}


@Override
public ListeningWhitelist getSendingWhitelist() {
    // TODO Auto-generated method stub
    return null;
}


@Override
public void onPacketReceiving(PacketEvent arg0) {
    // TODO Auto-generated method stub
    
}


@Override
public void onPacketSending(PacketEvent arg0) {
    // TODO Auto-generated method stub
    
}```
#

what is to do with this methods

bronze marten
#

its an interface

#

which requires you to implement all methods

keen compass
#

You need to implement those to have a proper listener for the packets

#

not all of them need to be implemented just some of them

bronze marten
#

the ones which u dont need just {}

keen compass
#

ListeningWhitelist just sets the type of packets your listener listens for

reef sparrow
#

How does I use these until now I do my PacketListener in the Main Class

sturdy oar
#

wut

keen compass
#

you have to implement that interface if you want a listener for packets in ProtocolLib

#

as I said, not all those methods you need to implement but they need to be present

reef sparrow
#

Okay is it okay when these methods are empty?

keen compass
#

up to you if you want to override any of them

sturdy oar
#

well they can't be empty if they need a return

keen compass
#

well, can just return null, but I think a couple of them methods do need to be implemented properly though

sturdy oar
#

i don't know... I'd check properly before returning null anywhere

keen compass
#

getPlugin needs to be implemented, that is easy just return your plugin πŸ˜›

#

onPacketSending doesn't need to be implemented since the packets being listened for are being received

#

so onPacketReceiving needs to be implemented

#

that is where the event goes πŸ˜‰

#

onPacketSending you can just do {} and leave it empty

#

really it isn't all that hard

reef sparrow
#

getPlugin needs to be implemented, that is easy just return your plugin πŸ˜›
@keen compass I will make it static but than it says I must remove the static modifier...

keen compass
#

create a public method for the listener

reef sparrow
#

these are all public methods

keen compass
#
public Listener(Plugin plugin){
   this.plugin = plugin;
}```
reef sparrow
#

Yeah I know but when I change the Name I must edit all classes in the Plugin and also when I doesnt change the name because it isnt static

keen compass
#

don't use a static then o.O

#

if you don't know how to pass a reference of your plugin you probably shouldn't be messing with packets

reef sparrow
#

Okay ...But always I need to edit all classes where i used getPlugin

keen compass
#

why do you need to edit all classes?

reef sparrow
#

if you don't know how to pass a reference of your plugin you probably shouldn't be messing with packets
@keen compass I know but I dont even like it until now I always used static getPlugin its easier

keen compass
#

There is 2 enchantments for loot @frigid ember

Enchantment.LOOT_BONUS_BLOCKS
Enchantment.LOOT_BONUS_MOBS
#

think fortune is for pickaxe, in which case you want the one for blocks

#

alright, be right back now

#

really need to finish these updates for windows πŸ˜›

barren abyss
#

Hmmm

#
@EventHandler
    public void onSlimeSplit(SlimeSplitEvent event){
        event.getEntity().setSize(event.getEntity().getSize() / 2);
    }
#

This should split in half of size every time that splits am I right?

#

idk why isnt working

hollow owl
#

ClickEvent(ClickEvent.Action.RUN_COMMAND, ))

#

What I need to write after run_command^^^^

torn robin
#

A string

#

Ie the command

hollow owl
#

with /

torn robin
#

Yes

hollow owl
#

okay thanks πŸ™‚

keen compass
#

and I am back

torn robin
#

@barren abyss is the event being fired?

barren abyss
#

Everytime an slime splits

#

Right?

kind crow
#

Hi, I have a question about Spigit/BungeeCord. How do I redirect certain commands from one server to another on bungee? I have a server for auth only, but I want to change the password/email etc from other servers. Did someone already have that issue and how did you solve it?

torn robin
#

Is the event being fired?

barren abyss
#

It is

keen compass
#

@frigid ember

percentage = (x/y)*100
barren abyss
#

i'll put an out put message to say if it is

torn robin
#

It should work assuming the slimes size is > 4

keen compass
#

x and y are whatever values you determine

torn robin
#

I’d debug our just to make sure

#

Resources out of stone?

#

@kind crow something like a bungeecommands plugin might work

#

Can you provide an example

#

What exactly should that look like

#

Like the mcmmo skyblock feature?

#

Do you want multiple possible drops? Or just one?

#

It should probably be a map

#

Assuming you want custom probabilities per item

barren abyss
#

It should work assuming the slimes size is > 4
@torn robin ITS 16

torn robin
#

@barren abyss lmk when you add debug messages please

pearl maple
#

Hello, i have FeatherBoard and i want to change my scoreboard called "scoreboard1" to my second scoreboard called "scoreboard2" by a command like "/scoreboard toggle scoreboard2".
How i can this ?

kind crow
#

@torn robin I don't see where I can specify the server for the commands to run on

torn robin
#

@kind crow it wouldn’t be plugin specific which one are you looking at?

reef sparrow
#

@keen compass So i tried it and it du not give me my message in the Update Sign Packet Event The OPEN Sign Editor Event still work the only ERROR or WARN ist thisPlayer hallo5000 just tried to change non-editable sign

barren abyss
#

but the slime size its the same

keen compass
#
private Random = new Random(100)
public void percentageCalculator() {
int randomInt = randomGenerator.nextInt(100) + 1;
if (randomInt == ((x/y)*100)) {
   //do something
}
}
kind crow
torn robin
#

@barren abyss try using the event.setSize method

keen compass
#

@reef sparrow
good news though! You are making progress. Now you have some output πŸ˜„

barren abyss
torn robin
reef sparrow
#

Yes but the bad thing is ive the same output before so The only Thing that dont work is the Update Sign Event

torn robin
#

@barren abyss try using event.setSize

barren abyss
#

that dnst exist

torn robin
#

It is structure related so should be helpful DKL

reef sparrow
#

Yes but the bad thing is ive the same output before so The only Thing that dont work is the Update Sign Event
And I dont know how du fix it... @keen compass

keen compass
#

You need to cancel the packet if you want to change what the sign is going to have @reef sparrow

kind crow
#

@torn robin I'm already using that plugin. I don't think it had that functionality. I can't run authme commands across all servers and I didn't see that functionality in the plugin description. I think I need another plugin for that

torn robin
#

@barren abyss for now can you try setting the size to a constant?

reef sparrow
#

You need to cancel the packet if you want to change what the sign is going to have @reef sparrow
@keen compass wich packet?

keen compass
#

the Update_Sign one

reef sparrow
#

Oh okay

keen compass
#

cancel it, then using bukkit api

torn robin
#

@kind crow I think that’s probably just a bad setup then, could you try using a database?

keen compass
#

change the sign

#

only thing you need from the packet is to get the data you want to do whatever it is you are wanting with the sign

torn robin
#

@frigid ember just look at it

barren abyss
#

its weird

torn robin
#

It provides a thorough explanation and some great pseudo code

reef sparrow
#

only thing you need from the packet is to get the data you want to do whatever it is you are wanting with the sign
@keen compass Okay thanks i try this

barren abyss
#

even if I just use: event.getEntity().setSize(1); the size is the CreatureSpawnEvent size

#

hm

kind crow
#

@torn robin I'm using mysql. I don't think it matters because I only have authme plugin on my Auth server and AuthMeBungee on the bungeecord side. Other servers don't have authme (and should not have)

keen compass
#

Ah @barren abyss didn't realize that setSize() is for the new size of the slimes that spawn

torn robin
#

I suppose that makes sense because the original slime is removed

barren abyss
torn robin
#

@kind crow I don't have that much experience with bungee so I can't help you out any further unfortunately

keen compass
#

so what you do instead @barren abyss is do

setSize(size);
setCount(1);
#

this will then create a new slime for you with the size you specified πŸ˜‰

#

all in one event

barren abyss
#

but how do I structure the thing

#

I cant fit an event inside an event right?

keen compass
#

just make sure you run setSize() before you do setCount()

#

don't need two events, just use the slimeSplitEvent

barren abyss
#

but I need the slime to spawn naturally with 15

keen compass
#

that is fine

#

set the size of the next slimes that will split to 15 by using setSize()

kind crow
#

I'm gonna write a plugin for my auth server then. Is there a way to send a command from specific player and get the output in a variable?

keen compass
#

and then right after that code

#

put setCount(1);

#

that will cause the event to spawn a new slime, AKA it split

torn robin
#

What do you mean by output?

keen compass
#

of 1 with the size you specified

barren abyss
#

the size will be 15 again

torn robin
#

then set it to size/2

keen compass
#

It shouldn't, if setSize() dictates the next size of the slime if it dies

barren abyss
#

Can you write a little example for me?

keen compass
#

then setCount(1) ensures that 1 slime will spawn from it if it dies

barren abyss
#

im a dumb fuck at this hour

kind crow
#

When I type a command I get a response in the chat. Can I save that response of the exact command I run in a variable?

keen compass
#
public void onSlimeSplit(SlimeSplitEvent event) {
int size = 7;
Entity slime = event.getEntity();
slime.setSize(size);
slime.setCount(1);
}
torn robin
#

With packets yes but I'm not sure why you'd want to

barren abyss
#

but this will spawn splits of 7 all the time

kind crow
#

I will send the response to my other server

barren abyss
#

they will not be half their size when you kill one

keen compass
#

then make it so you can change the number then

#

you can grab the int from where you want XD

barren abyss
#

thats the problem, I cant if I cant touch both events at the same time

torn robin
#

@barren abyss just try it, it if works you know that the size works that way

#

if a slime splits do you want it to double in size before it splits? ie two/four other slimes will spawn from that slime with the same size?

#

It just seems poorly setup Rundik

#

I'd probably rethink your server setup if you have to go through loops and hoops to get what you're trying to achieve

keen compass
#

@barren abyss you are only using 1 event. You don't need 2.
if you want to ensure you get half their size all the time.

public void onSlimeSplit(SlimeSplitEvent event) {

Entity slime = event.getEntity();
int size = event.getEntity.getSize();
slime.setSize(Math.round(size/2));
slime.setCount(1);
}
#

now, the next slime will always be half or near half the size of the previous

reef sparrow
barren abyss
#

what you did there is what I have

#

but the problem is, that this code isnt making the natural slime to be 15

torn robin
#

Main.signList.contains(block.getType())

barren abyss
#

thats why I need to take the event when it spawns naturally and not by split

reef sparrow
#

signList contains all Sign Materials

keen compass
#

@barren abyss difference between mine and yours is that I am making use of setCount() which will spawn a new entity from the old slime

torn robin
#

@reef sparrow did you make sure signLoc is what you're expecting it to be?

kind crow
#

@torn robin I don't think it's a poor setup. Bungeecord has channels for the plugins to exchange the information. I will send the command I want to run to the auth server and get the responce from them. It looks simple. Or do you mean it's difficult to extract the command response? Can I do that without parsing the chat?

torn robin
#

afaik you can't get a command response from a command run ingame without parsing chat

#

the better use would be an api specifically made for that cause

kind crow
#

Oh, you're right. Authme should have an api for that I think

reef sparrow
torn robin
#

@Hallo5000#2393 did you make sure signLoc is what you're expecting it to be?

reef sparrow
#

@Hallo5000#2393 did you make sure signLoc is what you're expecting it to be?
@torn robin Ive send you a new Hastebin in it are the Code of the signList i think its right

torn robin
#

That's not what I meant

#

try debugging out signLoc

#

same with lines

reef sparrow
#

This is another problem but its not so bad ...I dont can debug it dont work but i think its not so bad

torn robin
#

You can't debug (it's not working) or you don't know how?

#

if you don't know how it's trivial, just use System.out.println or otherwise a way to send a message to yourself

reef sparrow
#

Okay so i can do this i think you mean the debug mode from any IDE

torn robin
#

no

reef sparrow
#

if you don't know how it's trivial, just use System.out.println or otherwise a way to send a message to yourself
@torn robin Wait i try this

torn robin
#

yes

keen compass
#

I can't spoonfeed you every line of code

#

I have pretty much gave you all you needed. It is up to you to get it to work

#

Not hard to debug where you are going wrong

torn robin
#

you might have to update the blocks' blockdata

reef sparrow
#

I insert debug texts every code block @SuppressWarnings("deprecation") @Override public void onPacketSending(PacketEvent e) { System.out.println("PacketEvent-------------------------------------------------"); if (e.getPacketType() == PacketType.Play.Server.UPDATE_SIGN) { System.out.println("if UPDATE_SIGN-------------------------------"); PacketContainer packet = e.getPacket(); e.setCancelled(true); try { System.out.println("Try ----------------------------------------"); List<String> lines = packet.getStrings().getValues(); Location signLoc = packet.getBlockPositionModifier().getValues().get(0).toLocation(e.getPlayer().getWorld()); Block block = signLoc.getBlock(); if(Main.signList.contains(block.getType())) { System.out.println("if Block is Sign -------------------------------------------"); Sign sign = (Sign) block.getState(); sign.setLine(0, lines.get(0)); sign.setLine(1, lines.get(1)); sign.setLine(2, lines.get(2)); sign.setLine(3, lines.get(3)); } Bukkit.broadcastMessage(lines.toString() + "-----" + signLoc.toString()); System.out.println("broadcast--------------------------------------"); }catch(Exception ex) { System.out.println("Catch------------------------------------"); ex.printStackTrace(); Bukkit.broadcastMessage("CATCH"); } System.out.println("End--------------------------------------"); Bukkit.broadcastMessage("Server UPDATE_SIGN"); } }

#

you might have to update the blocks' blockdata
@torn robin Yes i try this too

reef sparrow
#

@keen compass @torn robin So ive insert some debug messages https://hasteb.in/ejukodib.swift and also ive cancelled the Event but the only debug messages in the Console are "PacketEvent-------------------------------------------------" and "else at Begin ------------------------------------------" so the if blocks it ...

pearl maple
#

Hello, i have FeatherBoard and i want to change my scoreboard called "scoreboard1" to my second scoreboard called "scoreboard2" by a command like "/scoreboard toggle scoreboard2".
How i can this ?

keen compass
#

@reef sparrow just keep modifying your code until it outputs your debug stuff. Also you don't need a try catch either I don't think

#

not necessary to use try catches if it isn't going to produce an exception

reef sparrow
#

It outputs the debug messages but not all beacause the first if clause returns false ...i dont no why

keen compass
#

Then change it to so you can see what blocktype it is actually getting

reef sparrow
#

no the first if clause checks if it is the right packet

keen compass
#

yeah remove the try catch, and then output Location signLoc to the console

#

so you can see what location it has

#

I would do the same for every data type so that you can ensure that what you are expecting the data to be, is actually what you think it is

reef sparrow
#

Okay i try this out

keen compass
#

If for some reason it is different, then you need to figure out why it is different

#

odds are the location is the block under the sign

#

or if its a wall sign, the block behind the sign

#

which means you need to modify how you are getting the location for the sign to do your changes

#

but you won't know until you debug the data types πŸ˜‰

#

Need to get use to doing this stuff because a lot of the times, just doing this you can usually solve your own problems before coming here for help

#

And this is how you get better at programming as well so, just take this as a learning experience πŸ˜„

reef sparrow
#

it gives me this packet when i click on done TILE_ENTITY_DATA[class=PacketPlayOutTileEntityData, id=10]

#

it gives me this packet when i click on done TILE_ENTITY_DATA[class=PacketPlayOutTileEntityData, id=10]
@keen compass I dont know why this packet is called

keen compass
#

that packet is that ^

#

although the id shouldn't be 10 though

#

it should be 9

reef sparrow
#

But the ID of the Packet is 10

#

The console give me this when i press done @keen compass [13:41:54 WARN]: Player hallo5000 just tried to change non-editable sign [13:41:54 INFO]: PacketEvent------------------------------------------------- [13:41:54 INFO]: else at Begin ------------------------------------------ TILE_ENTITY_DATA[class=PacketPlayOutTileEntityData, id=10]

#

@frigid ember You dont send us the code or something so nobody can help you

keen compass
#

@reef sparrow its fine if its 10, its unused according to the protocol, the only other thing I can think of is that the packet is being sent as part of a block change packet

#

in which case, the id specifies the direction it is facing

#

@frigid ember it would be more helpful to see what you have so far

reef sparrow
#

Ohh yes because in the addPacketListener Method ive written that this PacketListener only accept the UPDATE_SIGN Packer

keen compass
#

?paste

worldly heathBOT
keen compass
#

this is a community effort. There is a chance that I might not know how to solve your problem, but if you paste what you are having a problem with, it allows others here to also contribute their wisdom or thoughts on it.

sturdy oar
#

yo is someone able to tell me If i'm doing it wrong

#

why does it keep saying 'unchecked operation?' I've marked the constructor with ClassCastException

hollow thorn
#

can someone send me hastebin

nimble stump
#

@sturdy oar you can’t just cast from a string to T, you have to parse the string into your custom object type

#

The string won’t be of type T so that will throw an exception every time

hollow thorn
#

if(e.getItem() != null && e.getItem().getItemMeta().getLocalizedName().contains("staff3")) {
Player me = e.getPlayer();
Location loc = me.getEyeLocation();
World world = me.getWorld();
cooldown.put(me, (System.currentTimeMillis()/1000));
if((cooldown.get(me) + 5) >= (System.currentTimeMillis()/1000)) {

                ItemStack stuff = e.getItem();
                ItemMeta em = stuff.getItemMeta();
                em.setCustomModelData(3);
                em.setUnbreakable(true);
                em.setLocalizedName("Staff1");
                stuff.setItemMeta(im);
                me.getItemInHand().setItemMeta(em);
                me.updateInventory();
               loc = loc.add(loc.getDirection());
             new BukkitRunnable(){
              @Override
              public void run() {
                  Player me = e.getPlayer();
            Location loc = me.getEyeLocation();
            World world = me.getWorld();
            loc = loc.add(loc.getDirection());
            while(loc.getBlock().getType() == Material.AIR) {
                loc = loc.add(loc.getDirection());
                world.spawnParticle(Particle.FLAME, loc, 0);
                world.playEffect(loc, Effect.BLAZE_SHOOT, 4);
                for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
                    if(ent instanceof LivingEntity) {
                        ((LivingEntity) ent).damage(10, me);
                        ((LivingEntity) ent).setFireTicks(10);
                        
                    }
                    
                }
            }
            }}.runTask(new StaffWeapon());
        }
#

why doesnt this work

ashen stirrup
#

` <- use that

hollow thorn
#

` if(e.getItem() != null && e.getItem().getItemMeta().getLocalizedName().contains("staff3")) {
Player me = e.getPlayer();
Location loc = me.getEyeLocation();
World world = me.getWorld();
cooldown.put(me, (System.currentTimeMillis()/1000));
if((cooldown.get(me) + 5) >= (System.currentTimeMillis()/1000)) {

                ItemStack stuff = e.getItem();
                ItemMeta em = stuff.getItemMeta();
                em.setCustomModelData(3);
                em.setUnbreakable(true);
                em.setLocalizedName("Staff1");
                stuff.setItemMeta(im);
                me.getItemInHand().setItemMeta(em);
                me.updateInventory();
               loc = loc.add(loc.getDirection());
             new BukkitRunnable(){
              @Override
              public void run() {
                  Player me = e.getPlayer();
            Location loc = me.getEyeLocation();
            World world = me.getWorld();
            loc = loc.add(loc.getDirection());
            while(loc.getBlock().getType() == Material.AIR) {
                loc = loc.add(loc.getDirection());
                world.spawnParticle(Particle.FLAME, loc, 0);
                world.playEffect(loc, Effect.BLAZE_SHOOT, 4);
                for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
                    if(ent instanceof LivingEntity) {
                        ((LivingEntity) ent).damage(10, me);
                        ((LivingEntity) ent).setFireTicks(10);
                        
                    }
                    
                }
            }
            }}.runTask(new StaffWeapon());
        }
#

done

frigid ember
#

close but

reef sparrow
#

No 3 of these ` at the end and begin

hollow thorn
#
                Player me = e.getPlayer();
                Location loc = me.getEyeLocation();
                World world = me.getWorld();
                 cooldown.put(me, (System.currentTimeMillis()/1000));
                if((cooldown.get(me) + 5) >= (System.currentTimeMillis()/1000)) {
                   
                    ItemStack stuff = e.getItem();
                    ItemMeta em = stuff.getItemMeta();
                    em.setCustomModelData(3);
                    em.setUnbreakable(true);
                    em.setLocalizedName("Staff1");
                    stuff.setItemMeta(im);
                    me.getItemInHand().setItemMeta(em);
                    me.updateInventory();
                   loc = loc.add(loc.getDirection());
                 new BukkitRunnable(){
                  @Override
                  public void run() {
                      Player me = e.getPlayer();
                Location loc = me.getEyeLocation();
                World world = me.getWorld();
                loc = loc.add(loc.getDirection());
                while(loc.getBlock().getType() == Material.AIR) {
                    loc = loc.add(loc.getDirection());
                    world.spawnParticle(Particle.FLAME, loc, 0);
                    world.playEffect(loc, Effect.BLAZE_SHOOT, 4);
                    for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
                        if(ent instanceof LivingEntity) {
                            ((LivingEntity) ent).damage(10, me);
                            ((LivingEntity) ent).setFireTicks(10);
                            
                        }
                        
                    }
                }
                }}.runTask(new StaffWeapon());
            }```
reef sparrow
#

Perfect

frigid ember
#

well you keep putting the cooldown over and over again? so it will never run

hollow thorn
#

does the runnable

#

need to have e defined inside of it

reef sparrow
sturdy oar
#

well it think I know how to solve

#

I'll have to move the constructor to the classes implementing the abstract class

#

Because they don't have generics and I can parse there

reef sparrow
#

And how i get a string out of a Field

frigid ember
#

hello, where do i set a new image to my bungeecord server ?

keen compass
#

@reef sparrow its a list<String>