#help-archived

1 messages · Page 69 of 1

idle zodiac
light geyser
#

I calculate X and Z, and use uhcworld.getHighestBlockYAt((int) x, (int) z) + 1 for Y

idle zodiac
#

brb

silent veldt
#

Doesn't getHighestBlockAt() return the highest air block?

light geyser
#

Highest non empty

hoary parcel
#

there was a fix for a off by one error regarding that method fairly recently

silent veldt
#

Hmm..

#

Yeah might want to test the block below and above just to be sure

frigid heath
#

not sure if non empty includes air in that case

idle zodiac
#

back

silent veldt
#

Leaves are transparent, though I don't think it looks for solid blocks

light geyser
#

yeah, I was thinking the same, so I added this loop: ```java
//Check if the block they're being teleported to is air or not, if not Y+1
while(location.getBlock().getType() != Material.AIR) {

            System.out.println(location.getBlock());

            location = new Location(uhcworld, location.getX(), location.getY() + 1, location.getZ());
        }``` aint really helping much though
silent veldt
#

Start at Y = 255

#

Print them all lol

#

Wait a sec

light geyser
#

lol that works too, though that seems like a bit of a waste though?

frigid heath
#

a safe bet is to start at sea level and work your way up

silent veldt
#

For debugging

#

Are you sure uchworld is the world you are in?

light geyser
#

yep

frigid heath
#

for my uhc plugin i dont care about that and scatter them at y300 with resistance for 20 seconds

#

it works until you get scattered into a lava lake

#

then it isnt so fun

light geyser
#

thats actually a good point, should add a check for that too lol

idle zodiac
#

Anyone have any advice on my thing?

#

Sorry for the impatience

silent veldt
#

I have a random teleport for my wilderness feature, and I check to see if World.getHighestBlock is Material.LAVA or Material.FIRE

frigid heath
#

sec gonna post my question first before i take a look at the code so my clipboard isnt overridden

#

how would i go about removing all effects from a player? currently im using this but it doesn't work

for (PotionEffectType e : PotionEffectType.values()) {
    event.getPlayer().removePotionEffect(e);
}```
sturdy oar
#

I have a random teleport for my wilderness feature, and I check to see if World.getHighestBlock is Material.LAVA or Material.FIRE
@silent veldt I also check for cactus to be safe

#

you never know

light geyser
#

cactus thats a good point too

silent veldt
#

Lol good point, didn't think of that

#

I'll add that, thanks!

sturdy oar
#

or MAGMA if random spawn is inside nether

frigid heath
#

and water if you dont want angry players

silent veldt
#

Nah, its overworld only

sturdy oar
#

^^^ yeah water

silent veldt
#

Hey, they can be angry if they want lol

sturdy oar
#

people get triggered if they spawn in the middle of the ocean

uneven sandal
#

I'm fairly new to the BungeeCord Plugin development, an i was wondering what would be the best way to go about join leave messages. I have it sending messages fine, but how can I remove/disable the default "<player> has joined" join/leave messages on the spigot servers?

I tried doing

@EventHandler
public static void onPlayerJoin(PlayerJoinEvent playerJoinEvent) {
  playerjoinevent.setJoinMessage(null)
  // I also tried playerJoinEvent.setJoinMessage("")
}

But it just stops my messages and keeps the normal join messages

sturdy oar
#

its funny

silent veldt
#

I tell them to bring a boat if they're going to the wilderness

sturdy oar
#

k

light geyser
#

lol

naive goblet
#

why static eventhandler

silent veldt
#

@idle zodiac So what happens when you run the command?

sturdy oar
#

yeah why the hell the listener method is static

frigid heath
#

@idle zodiac

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args)
    {
 
        if (sender instanceof Player)
        {
 
            Player player = (Player) sender;
 
            sender.sendMessage("Le Command works L");
            return true;
        }
 
        return true;
    }```
idle zodiac
#

AH

#

Ok

#

let me see if this orks

naive goblet
#

@frigid heath pls no

silent veldt
#

No that isn't it

marsh hawk
#

Anyone here ever worked with Google Sheets API within a plugin?

naive goblet
#

Use implicit else instead.

frigid heath
#

i dont actually know why its static lol

#

ill just remove it if intellij doesnt scream at me

silent veldt
#

what's static?

#

I see nothing static in the code he posted

frigid heath
#

oh wait

#

yeah

#

not my code

sturdy oar
#

not his

light geyser
idle zodiac
#

nice

sturdy oar
#

so regarding my issues, this is how the player is now TP'ed
@light geyser add +1 to Y

frigid heath
#

@light geyser just +1 lol

light geyser
#

Yeah I do

naive goblet
#
//onCommand
if (!(sender instanceof Player)) {
  //code if not a Player
  return true;
}
Player player = (Player) sender;
//code if it's a Player```
frigid heath
#

+2 then

sturdy oar
#

you could also remove leaves

#

so they don't spawn on trees

idle zodiac
#

OK

light geyser
#

Often it also happens that they just spawn inside the tree stem

frigid heath
#

ghetto fixes for everyone!

hoary parcel
#

@light geyser there is a proper hightmap api that lets you specify if you want to ignore leaves

light geyser
#

is this included in the spigot api?

worn gate
#

yeah

frigid heath
#

i should make my plugin stop relying on resistance so i dont have to deal with potion effects

hoary parcel
#

yes it is

frigid heath
#

just use my already existing damage handlers

naive goblet
#

Qther depends on what you're doing.

light geyser
#

0.o thanks

hoary parcel
#

you want MOTION_BLOCKING_NO_LEAVES

frigid heath
#

cancelling fall damage so players i scatter at y 300 dont instantly die

hoary parcel
#

I think

worn gate
#

@naive goblet were should i put that ?

Map<UUID, Long> cooldownMap = new HashMap<>();

//onCommand
Player sender = (Player) sender; //instanceof check first
if (!cooldownMap.contains(sender.getUniqueId()) {
  cooldownMap.put(sender.getUniqueId(), TimeUnit.MILLIS.toSeconds(System.currentTimeMillis()));
} else {
  long current = TimeUnit.MILLIS.toSeconds(System.currentTimeMillis()), 
  original = cooldownMap.get(sender.getUniqueId());
  if (current - original > 5) {
    //code if it has been 5 seconds since last execution
  } else {
    //code if not
  }
}```
idle zodiac
#

It just says "/kit" in chat when I execute it

silent veldt
light geyser
#

yep that bug explains my issue then

naive goblet
#

gnaboo where you want?

hoary parcel
#

and then just getHighestBlockAt(x, z, HeihgtMap.MOTION_BLOCKING_NO_LEAVES)

silent veldt
#

Apparently they are still figuring it out, so I wouldn't rely on the behavior either way

worn gate
#

in the /randompt command

#

?

naive goblet
#

Just keep a reference of the map

light geyser
#

Mini, think you mean HighestBlockYAt?

#

since highestBlockAt only takes two params

silent veldt
#

@frigid heath Just use setAllowFlight == true for a few seconds

worn gate
#
if (cmd.getName().equalsIgnoreCase("randomtp")) {
                player.sendMessage("§2Vous allez etre §5teleporte de facon aleatoire. Sortez votre     §9seau d'eau");
                Random random = new Random();
                Location plocation = player.getLocation();
                Location rtp = new Location(player.getWorld(), plocation.getX()+ random.nextInt(500), plocation.getY()+random.nextInt(100), plocation.getZ()+random.nextInt(500));
                player.teleport(rtp);
            }```
silent veldt
#

Well, they might abuse that though

frigid heath
#

true

frigid heath
#

i should use that method for scatter instead

light geyser
#

mmm mightve been using the wrong one then, explains it

frigid heath
#

might keep mine for a future elytra scatter

hoary parcel
#

@worn gate pls don't create a new random every time

#

you are ruining the randomness

sturdy oar
#

xd

hoary parcel
#

also like, you are just teleporting the player way up in the sky

silent veldt
#

@idle zodiac Do you register the command is plugin.yml?

worn gate
#
if (cmd.getName().equalsIgnoreCase("randomtp")) {
Map<UUID, Long> cooldownMap = new HashMap<>();

//onCommand
Player sender = (Player) sender; //instanceof check first
if (!cooldownMap.contains(sender.getUniqueId()) {
  cooldownMap.put(sender.getUniqueId(), TimeUnit.MILLIS.toSeconds(System.currentTimeMillis()));
} else {
  long current = TimeUnit.MILLIS.toSeconds(System.currentTimeMillis()), 
  original = cooldownMap.get(sender.getUniqueId());
  if (current - original > 5) {
    player.sendMessage("§2Vous allez etre §5teleporte de facon aleatoire. Sortez votre     §9seau d'eau");
                Random random = new Random();
                Location plocation = player.getLocation();
                Location rtp = new Location(player.getWorld(), plocation.getX()+ random.nextInt(500), plocation.getY()+random.nextInt(100), plocation.getZ()+random.nextInt(500));
                player.teleport(rtp);
            }
  } else {
    player.sendMessage('Please wait for the coolddown')
  }
}```
idle zodiac
#

@silent veldt Ye

sturdy oar
#

i use ThreadLocalRandom over Random, it has more stuff

idle zodiac
#
version: "0.1"
author: OccyDaBoss
main: me.islimyocelotzbe.spigotplugin.Main

commands:
  kit:
    description: Kit
    usage: /<command>```
frigid heath
#

this is my random lol

            Random rand = new Random(player.getUniqueId().getMostSignificantBits() * System.currentTimeMillis());
            Random rand2 = new Random(player.getUniqueId().getMostSignificantBits() + System.currentTimeMillis() * 777);```
naive goblet
#

have the map outside the executors method @worn gate

#

and reference it

worn gate
#

?

frigid heath
#

rand is used for x and rand2 is used for z

light geyser
#
            Location location = new Location(uhcworld, (int) x, uhcworld.getHighestBlockAt((int) x, (int) z, HeightMap.MOTION_BLOCKING_NO_LEAVES).getY(), (int) z);
``` seems to do it 🙂
hoary parcel
#

oh god that is even worse qther

frigid heath
#

let me just steal that code real quick

light geyser
#

lol

worn gate
#

reference ? @naive goblet

silent veldt
#

It's displaying usage because you are returning false it seems

light geyser
#

want the rest of the spreading code too? @frigid heath

hoary parcel
#

ppl need to stop missuing random like that

silent veldt
#

That's the default

frigid heath
#

yes im aware that means people can reverse engineer the random but doesnt really matter

idle zodiac
#

I'm returning true

frigid heath
#

i mean its a random world

silent veldt
#

It seems that way, but the fact it's displaying /kit is showing otherwise

hollow thorn
#

how do i use pitch in playsound

frigid heath
#

@light geyser i was joking lols

#

ill figure out a better prng

sturdy oar
light geyser
#

lol oki, Im fine with sending it over though 😄

hoary parcel
#

its just that its not actually random

#

like at all

worn gate
#

🤣

silent veldt
#

I mean, it seems right

hoary parcel
#

it will not spread ppl evenly

#

and its so easy to do properly

naive goblet
#
Map<Object, Object> map = new HashMap<>();

method() {
//referencing map
map.get(someObjectInstance);
}```
hoary parcel
#

just dont create new instances all the time...

frigid heath
#

properly is something i have trouble doing

light geyser
#

seems to work 🤷‍♀️

hoary parcel
#

oh ffs

idle zodiac
#

AAAAAA

#

PASTEBIN

light geyser
#

😛

#

sorry hold on

silent veldt
#

@idle zodiac Try changing your usage text and see if the message changes. Change usage: to Test Message

hoary parcel
#

don't past code like that

idle zodiac
#

will do

naive goblet
#

Dutch pls bin when having long code blocks

light geyser
sturdy oar
#
private static final var RANDOM = ThreadLocalRandom.current();

that's it

idle zodiac
#

It Still says /kit

#

not "Ding Dong the Witch is Dead"

frigid heath
#

aaah people using math in scatter algorithms!

idle zodiac
#

what is this

silent veldt
#

Hmm...

light geyser
#

Mm why's that wrong @frigid heath ?

sturdy oar
#

someone may complain about me using var

light geyser
#

They need to be evenly spread over a circle 🤷

silent veldt
#

Change kit: and see if it breaks the plugin

worn gate
#

how should i include

Map<UUID, Long> cooldownMap = new HashMap<>();

//onCommand
Player sender = (Player) sender; //instanceof check first
if (!cooldownMap.contains(sender.getUniqueId()) {
  cooldownMap.put(sender.getUniqueId(), TimeUnit.MILLIS.toSeconds(System.currentTimeMillis()));
} else {
  long current = TimeUnit.MILLIS.toSeconds(System.currentTimeMillis()), 
  original = cooldownMap.get(sender.getUniqueId());
  if (current - original > 5) {
    //code if it has been 5 seconds since last execution
  } else {
    //code if not
  }
}``` so that the code if the cooldown is ok is : 
```java
if (cmd.getName().equalsIgnoreCase("randomtp")) {
                player.sendMessage("§2Vous allez etre §5teleporte de facon aleatoire. Sortez votre     §9seau d'eau");
                Random random = new Random();
                Location plocation = player.getLocation();
                Location rtp = new Location(player.getWorld(), plocation.getX()+ random.nextInt(500), plocation.getY()+random.nextInt(100), plocation.getZ()+random.nextInt(500));
                player.teleport(rtp);
            }```
frigid heath
#

im just terrible at math

sturdy oar
#

plzzz don't flood the chat with code

silent veldt
#

To ensure plugin.yml is being saved properly

worn gate
#

sorry

sturdy oar
#

mobile users are dying right now problably

silent veldt
#

so register kitz: instead, but don't change it in the code

hoary parcel
#

I lost all hope for this chat

#

see ya o/

light geyser
#

feel you there @frigid heath . if you want to copy my code though, feel free to. Open source for a reason

frigid heath
#

bye mini

idle zodiac
#

?

naive goblet
#

gnaboo I Will assist later on phone rn

idle zodiac
#

Sorry, I'm noobn

naive goblet
#

I think spigot has a WIKI tut for it though

silent veldt
#

@idle zodiac In plugin.yml, change kit: to kitz: to see if it breaks the plugin. I want to see if the changes you make to plugin.yml are being built into the plugin

idle zodiac
#

ok

frigid heath
#

@light geyser the reason i tried to make it completely random was to mimic other uhc plugins actually they're pretty bad at making even spawns but yours is definitely great at making it even

light geyser
#

I did my best 😄

idle zodiac
#

nvm i changed the wrong whatsit

frigid heath
#

ill probably do something like it as a config option

idle zodiac
#

i changed desc not usage

#

XDD

light geyser
#

it should spread 99-100% evenly 😄

idle zodiac
#

lets try again

light geyser
#

at least, according to the maths

silent veldt
#

OK, no need to change the kit: then. Just change usage 😄

frigid heath
#

it'll probably need some changing though cos lava, water, fire, and cacti

light geyser
#

Yep I need to add that still

idle zodiac
#

now it just says 'Unknown Command'

frigid heath
#

you cant really predict whats there in a circle until you check it

idle zodiac
#

WHAT IS THIS

#

MY BRAIN

frigid heath
#

then you'll have to respread it

#

possibly 100 times over

silent veldt
#

What did you change the text to?

light geyser
#

will prob do something like if(lava or cactus or fire) do x+1

idle zodiac
#

i changed /<command> to Ding Dong the Witch is Dead because i'm funny and quirky

light geyser
#

and just continue that until there's no danger left, then get Y

silent veldt
#

Should still work though. Lemme check the javadoc

idle zodiac
#

thansk

frigid heath
#

technically it does help but not in this situation

silent veldt
#

Yeah, that's the behavior..

Executes the given command, returning its success.
If false is returned, then the "usage" plugin.yml entry for this command (if defined) will be sent to the player.
idle zodiac
#

IT RETUNS TRUE

#

MY BRAIN

light geyser
#

also, @frigid heath I pregen the chunks, which should make checking a whole lot easier and faster

silent veldt
#

I know, I see that

idle zodiac
#

honestly

#

my brain hurts

light geyser
#

welcome to coding

frigid heath
#

well now you're one step ahead of me

idle zodiac
#

XDD

#

I haven't done spigot before so

#

I'm used to Java though

#

from Forge and other things

silent veldt
#

Your code looks correct. Add this to onCommand, before you check if the sender is a player

Bukkit.broadcastMessage("OnCommand start");
frigid heath
#

honestly i might just spawn them in with a boat and with fire res

arctic cloud
#

I'm starting to get used to spigot with js because I dont want to deal with java's oop shit 😩👌

sturdy oar
#

wdym

#

you're going to use OOP anyway

silent veldt
#

OOP has nothing to do with Spigot

arctic cloud
#

u sure about that cheif

#

yes I didnt say it is

silent veldt
#

Yes

arctic cloud
#

java's oop shit

sturdy oar
#

🤷‍♂️ I prefer Kotlin as well

#

but I don't have nothing against Java

frigid heath
#

i like OOP tbh

arctic cloud
#

I dont like being forced to use classes rofl

light geyser
#

I like OOP

sturdy oar
#

how do you even do things without OOP tbh

light geyser
#

^

sturdy oar
#

it basically becomes C at that point

arctic cloud
#

functions

#

functions everywhere

silent veldt
#

OOP saves us from so much BS

light geyser
#

Agreed there Craig

#

My teams system would be hell without OOP

silent veldt
#

You think null pointer exceptions are bad? Try playing with pointers

idle zodiac
#

@silent veldt did you manage to find a fix

silent veldt
#

Did you do what I asked?

light geyser
#

Feel you @silent veldt. Picked up C++ recently...

idle zodiac
#

What

#

I changed the plugin

#

i mean

#

waht

#

the

#

command thing

silent veldt
#

Your code looks correct. Add this to onCommand, before you check if the sender is a player

Bukkit.broadcastMessage("OnCommand start");
sturdy oar
#

xd

#

or maybe do proper debugging

silent veldt
#

Lol that's how I do debugging in minecraft

light geyser
#

same here

idle zodiac
#

TF

#

WHJAT

silent veldt
#

Not running is it?

idle zodiac
#

ITS

#

SAYING

#

/KIT

silent veldt
#

Your onCommand section isn't running

light geyser
#

System.out.println() or cout, my favs for debugging lol

sturdy oar
idle zodiac
#

my brain

silent veldt
#

Yeah but then you have to watch the console

light geyser
#

yeah true, not an issue for me though rlyu

silent veldt
#

Yeah there are better ways I know. But this is visual and quick and dirty 😄

light geyser
#

and my c++ applications have so far all been console only lol

silent veldt
#

Can you pastebin your current onCommand code?

#

And your main class?

idle zodiac
silent veldt
#

And plugin.yml. Sorry but it's important

#

oh nm

#

You still have /<command> as the usage

idle zodiac
#

I changed it back

#

but why isnt my onCommand working

sturdy oar
#

what's the issue with that code

#

define 'not working'

idle zodiac
#

its not working

silent veldt
#

onCommand isn't running

#

I mean, it should, looking at that code

#

But it isn't

idle zodiac
#

sorry

#

i'm just

#

like very quirky and funny like

#

haha

#

very funny moment

#

ye i stop

silent veldt
#

Change usage to a single word, Test. Then try it, for giggles

idle zodiac
#

OK

#

XDDD

silent veldt
#

Also remove description

idle zodiac
#

It still says /kit

#

what is this

#

my brain

sturdy oar
#

wait

#

can you send screenshot

#

of when you do /kit

idle zodiac
sturdy oar
#

yeah that's right

#

i don't see anything wrong with it

silent veldt
#

Really?

idle zodiac
#

it should send a message

#

not /kit

sturdy oar
#

you aren't ever checking the arguments

silent veldt
#

Doesn't matter

#

he's returning true

#

When you return true, it shouldn't display usage, no matter what you do in onCommand

#

Also, he changed usage to Test

idle zodiac
#

my brian hurteth

#

*thatcher

silent veldt
#

Silly question

#

You aren't using tabs in plugin.yml are you?

#

Make sure all the lines contain spaces

idle zodiac
#

i'm just doing what intellij gave me

silent veldt
#

Go to the start of each line and press right to count the spaces, on the lines that are indented

sturdy oar
#

or just use strings ""

#

idk

idle zodiac
#

is it 2 spaces for an indent?

silent veldt
#

2 for each level

sturdy oar
#

y

idle zodiac
#

ok

silent veldt
#

If it jumps immediately to the right, that's a tab

idle zodiac
#

my usage was 1 space too short

silent veldt
#

that explains it

idle zodiac
#

fax machine this sugar

#

amirite lads

silent veldt
#

try it now, with Test as usage

idle zodiac
#

ok

silent veldt
#

usage: Test

idle zodiac
#

it still says /kit

#

my brain

silent veldt
#

Did you refresh your project before compiling? I know eclipse likes to ignore changes made in an editor if you don't refresh

idle zodiac
#

i'm doing intellij

silent veldt
#

I realize that

idle zodiac
#

also

#

how do i refresh ol

silent veldt
#

IntelliJ probably doesn't have that issue TBH

idle zodiac
#

i used to use eclipse

#

but i just got fed up

silent veldt
#

Change kit: to kitz:

idle zodiac
#

ok

silent veldt
#

Eclipse sucks

idle zodiac
#

ye

silent veldt
#

See if it breaks

idle zodiac
#

it was good for its time

#

in like 2009

#

but there is no help

silent veldt
#

It's so bad it won't even recognize the online javadoc for spigot

novel phoenix
#

amazing how people try to bash Eclipse

#

on every possible occurence of unknown errors

idle zodiac
#

unknown command.

sturdy oar
#

Choco uses Eclipse , am I right?

idle zodiac
#

Let's just relentlessly bully eclipse users amirite XDD

#

jk

silent veldt
#

I bash Eclipse for issues I know are with Eclipse and they won't fix them

sturdy oar
#

I've used Apache NetBeans for a long period before switching to IntelliJ

idle zodiac
#

WHAR

#

NET

#

NET BEANS

#

i'm having nightmares

#

no offence but

#

like

sturdy oar
#

I don't 🤷‍♂️

idle zodiac
#

netbeans

sturdy oar
#

Never had any issues with it

#

just felt a little old

silent veldt
#

Give me a minute @idle zodiac, going to do something

idle zodiac
#

ok

#

*windows 98

sturdy oar
#

I think I still have it installed

idle zodiac
#

..

#

my brain

#

NOT JUST WIN98

#

BUT

#

NETBEANS

#

nice

tiny dagger
#

is there a way to import mojang authlib with maven?

#

i can't really find much to go on

sturdy oar
#

is it NMS?

limber moth
#

Hi all, the verification bot that spigot uses, it it possible to learn more how that works? I would like to create a simular bot. Someone logs into my discord server, they use ./verify <spigotusername>. The bot then looks up and see if that user has purchased the plugin, if they have They get a message on the forums, they use that to verifiy and I assign them to a group.

tiny dagger
#

not nms

frigid ember
#
[15:35:52] [Server thread/INFO]: [Helpful] org.bukkit.craftbukkit.v1_15_R1.inventory.CraftInventory@67d2a5b8
[15:35:52] [Server thread/ERROR]: Could not pass event InventoryCloseEvent to Helpful v1.0

Can't we listen for this event? 🤔

tiny dagger
#

it's nm authlib

#

something

novel phoenix
#

@tiny dagger you can install .jar files in local repository

#

if there isn't a public one

tiny dagger
#

tbh i only need to use the gameprofile class

#

if it's so much of a hassle i can just pass value and signature instead

novel phoenix
#

its not much hassle

#

you can install any .jar files under any maven package names

#

with one command

#

but there isn't much point of doing that because you can also use <system> scope

sturdy oar
#

yeah

novel phoenix
#

its equally bad solution

frigid ember
#

I have a creative server and was wondering if there was a way to disable the use of the toolbar because people have been taking advantage of it and crashing the server

#

Ping me if you know an answer

limber moth
#

toolbar?

sturdy oar
#

toolbar?

pastel sage
#

Hello I have a question how do I get the zero out of my self-programmed tablist? I use 1.15.2 https://prnt.sc/se657y

frigid ember
#

You know the saved toolbar that came out in 1.12

#

Your basically able to save items and take them out in creative mode

sturdy oar
#

oh I got it

limber moth
#

how are people crashing the server with them tho?

sturdy oar
#

oh there are some funny items

#

what version are you?

frigid ember
#

1.8-1.15

sturdy oar
#

the jar is 1.15.2, shouldn't it be fixed there

frigid ember
#

People can save these special items and take them out on my server and it crashes it

#

Also was wondering if I could disable the the of blocks ex. TNT

open mantle
#

Could not load 'plugins/2FA-1.1.jar' in folder 'plugins'

#

heelp

silent veldt
#

@idle zodiac Still around?

naive goblet
#

zelenskii send stacktrace

limber moth
#

People can save these special items and take them out on my server and it crashes it
@frigid ember what special items?

naive goblet
#

InventoryInteractEvent?

#

InventoryClickEvent?

paper ridge
#

why when I start my run spigot file this window is opening ?

sturdy oar
#

which window

paper ridge
#

I can't put a screen

sturdy oar
#

the gui thing?

limber moth
#

make sure you put in nogui as a startup parameter

naive goblet
#

^

sturdy oar
#

--nogui at the end

limber moth
#

java -Xms1G -Xmx1G -jar spigot.jar nogui

paper ridge
#

ok tranks

swift compass
#

How to convert id to Material ?

paper ridge
#

thanks*

sturdy oar
#

id?

limber moth
#

item id

swift compass
#

Yes

sturdy oar
#

who's even using IDs anymore

limber moth
#

thats not the question

#

lol

naive goblet
#

1.8.8 people be like 🤬

paper ridge
#

it's only natural that in 1.15.2 ?

swift compass
#

I Must block item from mod on server

limber moth
#

item ids are depreciated tho?

sturdy oar
#

yes

#

they shouldn't be used

limber moth
#

does that still work?

sturdy oar
#

i don't know what that dude is doing with his outdated version

hallow surge
#

people still code in 1.8.8

limber moth
#

Ik for sure you cannot use the id's in commands anymore

sturdy oar
#

no, but they still are saved in the Material Enum

limber moth
#

ah so they would have to create a helper class to convert them

sturdy oar
#

people still code in 1.8.8
@hallow surge 🤮 let's hope it dies asap

limber moth
#

something like that

hallow surge
#

also tadzio is trying to block an item from a mod so xD its not vanilla

frigid ember
#

@limber moth pretty much you can make an item with a command block and save it to your toolbar and use the item in any server as long as your in creative mode

hallow surge
#

how are command blocks even that powerful

limber moth
#

right, did spigot add anything to the api so we can even try and prevent this?

#

@frigid ember

frigid ember
#

I have no idea

naive goblet
#

command blocks are very powerful lmfao

limber moth
#

do they have to try and use the item like place it or what happens there

swift compass
#

how to block item from mod on server ?

limber moth
#

or is it just selecting the slot crashes the server

hallow surge
#

tadzio wdym mod

#

like galacta craft

#

thats already blocked players cant use those xD because its not vanilla

#

iirc

frigid ember
#

They use items like shulkers to lag the server till it crashes now I can’t even figure out what’s going on with my own server because every time I start it a couple seconds later it stops

sturdy oar
#

mod???

limber moth
#

you need to start logging whats happening otherwise you wont know how they are doing it

#

You would have to block certain items / events to prevent it I dont think there is an out of the box solution here for it

frigid ember
#

I can’t prevent any of it I have a player base with 20 other people it’s been a rotation of me just banning people clearing plots etc

sturdy oar
#

try some plugins

limber moth
#

well right now you dont know the exact cause on how they are actually crashing the server only an idea of what is going on

#

log every item placed, every interaction, you should be able to figure or get some sort of an idea on how its being done

#

there is no need for shulker boxes on creative

#

i think anyway

hallow surge
#

no

frigid ember
#

It’s hard to explain it’s like a shucker full of special items and when someone opens it they crash

hallow surge
#

oh book bans

#

oof

limber moth
#

you could for example allow them to be placed but not interact with the contents inside

mild osprey
#

In help.yml. Adding a general topic. Anyone know what to place after "permission:" So when players use /help it shows? I have what I want added showing for ops, but not players.

timber forge
#

Hey!! Lately I've had some issues with people botting my network & I've came to the point were I would like to add a captcha. I've seen some servers were you need to add the server to your servers list in order to join. Does anyone know how I possibly could get something like that?

hallow surge
#

chewbacca you might be dealing with the book ban exploit highly likely

frigid ember
#

It’s like these books filled with special characters

hallow surge
#

yep

#

book bans

#

thats not good

limber moth
#

looks like Y2k has it

hallow surge
#

happened on 2b2t

#

very dangerous stuff if you interact your done

limber moth
#

ah so it crashes the clients

hallow surge
#

its all client side shouldnt crash the server

limber moth
#

makes sense

sturdy oar
#

2b2t book ban is not client sided

#

it was one of their plugin which was badly coded

frigid ember
#

no

hallow surge
#

book bans are vanilla

frigid ember
#

yes

hallow surge
#

so is the book dupe

frigid ember
#

its because they had a char limit on booklets

sturdy oar
#

the dupe yes

frigid ember
#

pre 1.13

sturdy oar
#

but you don't get banned for duping

hallow surge
#

@frigid ember yuo need an anti book dupe plugin should prevent book banning

frigid ember
#

or just make a custom papermc build

#

with a patch

limber moth
#

interesting

sturdy oar
#

yeah but book-banning is not a thing in vanilla

#

the server doesn't ban anybody automatically

hallow surge
#

its because your constnatly sending too many packets

#

thats the "ban" part

sturdy oar
#

nope

#

there is not a single line in Spigot that bans players

#

they may be kicked, but not banned

hallow surge
#

omg you idiot

limber moth
#

its not a ban ban its a false ban that stops you from playing on the server

hallow surge
#

xD

limber moth
#

due to your client crashing

hallow surge
#

its not an actual ban

limber moth
#

yep

#

exactly

hallow surge
#

lol

sturdy oar
#

well since you were saying 'banned'

hallow surge
#

dude its what its called book banning

sturdy oar
#

i never played on 2b2t so I couldn't know

limber moth
#

someone made up the term, but its called book banning

hallow surge
#

because its basically what it does

limber moth
#

its more like a denial of service to some extent

#

using an item to cause it

#

what you need @frigid ember is someone who knows how to create this exploit and test that plugin to see will it prevent it

hallow surge
#

as soon as he said this i knew exactly what the problem was

It’s hard to explain it’s like a shucker full of special items and when someone opens it they crash

limber moth
#

yep and the title of this seems to confirm it

#

Bookbanning is a practice used to "ban" unsuspecting victims. To book ban, you need to fill three shulkers with ban books.

sturdy oar
#

the plugin i've sent before

#

should fix that

limber moth
#

should verify it with someone whom knows how that exploit works to to make sure it does in fact work

hallow surge
#

i have no idea how to book ban but i think chewbacca should try it tout

frigid ember
#

Now what am I supposed to do about my server saying server closed as soon as I join I checked logs and crash reports can’t find anything

hallow surge
#

you were book banned xD

limber moth
#

LMAO

hallow surge
#

gahaha

#

thats kinda funny lmao

limber moth
#

you may have to delete inventories would that fix it?

hallow surge
#

yea

#

delete your player file

#

and all those who were book banned

frigid ember
#

What is the maximum volume level for playSound ?

limber moth
#

thats insane

frigid ember
#

At 100 the sound is not enough audible for me

hallow surge
#

there is your answer 🙂

limber moth
#

turn your volume up?

#

xD

frigid ember
#

I clearly hear the music and others sounds

limber moth
#

does it allow higher than 100?

frigid ember
#

I don't know, I haven't tried that's why I'm asking for not being dumb

limber moth
#

I would try it, as I dont know

hallow surge
#

@frigid ember your creative server 🙂 dangerous stuff for hacked clients

#

you need to ban spawner placement etc

#

i could crash your server with a ender dragon spawner

limber moth
#

the api doesn't specify a limit, it only says its a float datatype

hallow surge
#

which multiplies until it breaks the map

limber moth
#

this should have better info on it

frigid ember
#

Thanks

limber moth
#

if in doubt googles your friend! xD

mild osprey
#

In help.yml. Adding a general topic. Anyone know what to place after "permission:" So when players use /help it shows? I have what I want added showing for ops, but not players.

ashen stirrup
#

So how would you clone a root in a config file.
e.g

x:
  y: 1
  z: 2

into

a:
  y: 1
  z: 2
frigid ember
#

Even if I google it, it'll change nothing.

#

After reading that and doing my stuff, nothing change, the sound is still inaudible at 1 block away

sturdy oar
#

and it works.

frigid ember
#

On which sound? EVENT_RAID_HORN ????

timber forge
#

Hey!! Lately I've had some issues with people botting my network & I've came to the point were I would like to add a captcha. I've seen some servers were you need to add the server to your servers list in order to join. Does anyone know how I possibly could get something like that?

sturdy oar
#

botting?

#

how come

tiny dagger
#

is there a way to switch the package explorer look in intellij

timber forge
#

They are joining with OQ minebot and such and spamming IPs

#

pretty much

sturdy oar
#

yeah there are some captcha plugins i guess

sturdy oar
#

aren't those bots under a VPN anyway?

timber forge
#

But its really outdated

#

Yes they are

#

Thats why I need a plugin like the one I sent

sturdy oar
#

I'm pretty sure that plugin is bypassable easily

#

it only checks if the client has stored the server in the server list

timber forge
#

Yea

timber forge
#

And OQ minebot uses directconnect

#

Don't want to ban VPNs

#

As they block internet cafés and such

pure pasture
#

How can you delete Files in a specific Folder?

hallow surge
#

very descriptive problem we have here

#

by clicking delete? xD

bronze marten
#
for (File file : files) {
  file.delete();
}
frigid heath
#

more of a java question, but can i use ThreadLocalRandom.current().nextInt() twice in the same line?

hybrid elbow
#

why wouldn't you be able to

frigid heath
#

actually i wasnt too clear

#

i meant to get different numbers

bronze marten
#

sure

#

it says "next"Int()

frigid heath
#

ah so it isnt fully time dependant?

bronze marten
#

mh no

#

pseudorandom

#

but you could also use Random instance

frigid heath
#

cool thanks!

neon matrix
#

What are some best practices regarding updating a Player's lastDamageCause ?
I'm running into some behavior I feel is extraneous but it may just be due to me not fully understanding how to update this field.

frigid ember
#

Im working on a AntiBot plugin, is it allowed to share like stuff here to get feedback on ideas?

bronze marten
#

first google result haha

neon matrix
#

I know how to update the field. I'm not a fucking ape; thank you.

valid ice
#

damn

#

so much hostility

neon matrix
#

Here's the code I am using.
https://sourceb.in/bff6754e9f

The idea is that I fire a different event when the EntityDamageByEntityEvent is fired.

However when the grave is created (external event), the lastDamageCause is always EntityDamageByEntityEvent rather than PlayerPVPEvent

valid ice
#

what's that, kotlin?

sturdy oar
#

yes

valid ice
#

ah yes so it is

#

didn't think many people used it

sturdy oar
#

am I missing something about that code

#

like the @EventHandler annotation

neon matrix
#

Sorry I have a custom events system

#

The events all fire normally

#

Checked with the debugger agent

#

That looks like this

#
Events.listen(this, EventPriority.HIGHEST, this::onEntityCombat)
Events.listen(this, EventPriority.HIGHEST, this::onPlayerPVP)
Events.listen(this, EventPriority.HIGHEST, this::onGraveCreate)
#

GraveCreateEvent is fired from an external plugin, through PlayerDeathEvent

neon matrix
#

victim.lastDamageCause = pvpEvent

dusty topaz
#

what is the code for playerpvpevent

#

specifically just the class definition

neon matrix
dusty topaz
#

might also have something to do with all the events being highest priority

#

ah i see

#
        val pvpEvent = PlayerPVPEvent(attacker, victim, event.cause, event.damage)
        Events.fireEvent(pvpEvent)
        if (pvpEvent.isCancelled) return
        victim.lastDamageCause = pvpEvent
#

you set the cause after firing the pvp event

neon matrix
#

Yes the last damage cause should only be updated if the pvp event was successful

#

If the pvp event is cancelled, no damage is taken

dusty topaz
#

you don't cancel damage

neon matrix
#

Oh this is interesting

#

I dont cancel the original damage

#

Do you think this might solve the issue?

if (pvpEvent.isCancelled) {
  event.isCancelled = true
} else victim.lastDamageCause = pvpEvent
dusty topaz
#

why dont you try it

neon matrix
#

I am just waiting for it to compile is all

#

Hmm no not quite

remote socket
#

How do you check if an item is floating on top of a hopper?

#

I've tried

if (e.getLocation().getBlock().equals(Material.HOPPER)) {
                plugin.logger.info("There is an entity on a hopper!");
            }
neon matrix
#

An item wont float up there for long unless the hopper is full I think :p

remote socket
#

Its full

#

But it's not working

#

It's floating like that, but I am not getting any output

#

Do I not need to get the block below #getLocation()#getBlock()

sturdy oar
#
 entityLocation.getBlock().getRelative(BlockFace.DOWN).getType() == Material.HOPPER

maybe this?

#

or even SELF

neon matrix
#

Is it even possible to set an entity's last damage cause while inside of the event that would be the entity's last damage cause? lol... if that makes sense

#

Inside the scope of the event listener method, the lastDamageCause is fine, but then when checking it later it is just not.

dusty topaz
#

maybe not, you could pass a damage cause into the event though

#

and override damage cause methods

keen compass
#

no, you can't update the damage cause without cancelling the event first. Any attempts to update it would be ignored by the server.

neon matrix
#

So I must cancel the EntityDamageByEntityEvent and then apply the damage by hand?

keen compass
#

or, create a new event with the values you want

naive goblet
#

You should be able to manipulate?

keen compass
#

You could cancel the event and in the same event method create a new event with updated values or apply the damage yourself

#

but if you don't cancel the event, the server uses the values from when the event was created and not what you want it to use.

#

This is due to the fact that the referenced objects are used in the implementation if it isn't cancelled as opposed what was changed in the event.

#

That is, the implementation doesn't check the event itself after the event is created other then if it has been cancelled or not.

dusty topaz
#

is that not a flaw

#

or is it intended to be that way

keen compass
#

I think it is intended that way because there is usually more then one plugin that would try to change things and the easiest way would be to require that it be cancelled otherwise it would be down to whoever last updated the values plugin wise that wins as well as causing the server to wait on every plugin that wants to make a change since it isn't async. That would be more chaotic then just simply having the need to cancel it first if you don't want it to apply.

#

in this manner, plugins can still listen for the event even if the event was cancelled and still do something.

neon matrix
#

I dont intend on manipulating the damage at all

#

Maybe I will just do this the long way without all the extra events and hard coupling

remote socket
#
 entityLocation.getBlock().getRelative(BlockFace.DOWN).getType() == Material.HOPPER

maybe this?
@sturdy oar This worked ty

keen compass
#

the other way to get to work @remote socket is to get the block 1 down from the location of the item

#

either way works

sturdy oar
#

😎 xd

#

no problem

#

although I'm not sure but since hoppers are not full blocks items could technically be in the SELF blockface

#

you may check that

keen compass
#

Hoppers count as tile entities, which are blocks, like chests are, that have inventories.

#

so, you should be able to get it using the location of the item entity as long as you know you need to adjust the y value of the location to be 1 down.

remote socket
#

How can you check the amount of items in an entity?

keen compass
#

you grab its inventory

#

Should first check that the block or entity you are referencing does indeed have an inventory though instead of assuming it does.

remote socket
#

How do u grab its inventory? I do not see a method

split oxide
#

hey so im a complete noob at java and the spigot api but how would i set the MOTD on command?

sturdy oar
#

well

keen compass
#

?jd

worldly heathBOT
remote socket
#

By this I mean the entity is a stack of floating blocks

keen compass
#

the only block I know of that can hold items even as an item, is shulker boxes. All other inventory types tend to drop their inventories upon becoming an item entity

remote socket
#

Basically my issue is that it detects a stack of blocks only as one

sturdy oar
fleet burrow
#

Does anyone have a good resource for pasting schematics?

sturdy oar
#

WorldEdit

fleet burrow
#

¯_(ツ)_/¯

#

not worldedit

sturdy oar
#

???

split oxide
#

Thank you FendiTony

fleet burrow
#

I need one that I could edit

sturdy oar
#

you can edit schematics in the clipboard

#

to a certain limit

fleet burrow
#

I need to make it paste block block with effects

keen compass
#

@fleet burrow you can look at world edits code to see how they do it, and then modify it to your liking since it is open source.

#

only caveat is that if you choose to use their code, you need to abide by their license

fleet burrow
#

I know how I could paste one and all

#

I was just wondering if there was an already available resource 😛

patent monolith
#

🇶 Is there a way to get the actual fire block from EntityDamageEvent when the DamageCause is FIRE? I checked and made sure that the event was not EntityDamageByBlockEvent. I couldn't find any methods in there that would give the block. Would I need to check the block underneath them?

remote socket
#

I have an Entity, which is a dropped item. How do I know how many items there are?

patent monolith
#

Item#getItemStack

wind dock
#

um so for some reason i cant use any of my bungeecord commands even thoughn im opped

#

i sue luckperms as my permissions plugin

patent monolith
#

Temporarily disable/remove lp to see if it is the cause

wind dock
#

it is

#

it only started happening after the luckperms was added @patent monolith

remote socket
#

How can you check the amount of items in an entity?
If anyone is interested I managed to do it by doing this:

if (e instanceof Item) {
  ItemStack itemStack = ((Item) e).getItemStack();
  int amount = itemStack.getAmount();
}
sturdy oar
#

what is e 😐

remote socket
#

Entity object

wind dock
#

um so any reason why?

patent monolith
#

@wind dock do other op abailities work? Is it only bungee not working?

#

abilities

wind dock
#

only bungee

frigid ember
#

so paper and spigot, I hear paper offers far more customization aswell as more improvements to performance. anybody know of any benchmarks comparing the two together side by side?

wind dock
#

nvm got it solved @patent monolith thnx

frozen kiln
#

Someone on spigot gets this with my plugin, but it's working for myself and everyone else who's installed the update. I can't really reproduce it if I don't get it.

#

Just wondering if anyone knows what's happening.

warm carbon
#

hey guys, quick question. I worked on my plugin and it worked, but since today building the project, I get the java.io.FileNotFoundException error because the jar does not contain the plugin.yml, but it worked before. Using maven, plugin.yml is like it should be. But it does not really make sense why the plugin.yml is not there, any idea why?

#

never had this error in my entire life tbh

patent monolith
#

@frozen kiln ask them to delete their current jar and re-upload the plugin to their plugins folder

frozen kiln
#

Ok @patent monolith, I'll try that.

patent monolith
#

@warm carbon open the jar as an archive and see if plugin.yml is in there

warm carbon
#

what exactly do you mean as an archive? opening it with winrar for example?

patent monolith
#

yeah

warm carbon
#

looked it up, seems as if the resource folder is not there

patent monolith
#

?

#

The plugin's folder?

#

I meant the plugin jar

warm carbon
#

the plugin.yml, that is in the resource folder, is not in the jar

#

yeah sure

patent monolith
#

Well it needs to be in the jar

#

Or the plugin won't work

warm carbon
#

putting it in there always worked out, and worked yesterday and the days before as well, but now it just doesn't

#

that is why I'm curious

patent monolith
#

@warm carbon forget the ide. After you compile the plugin, is the plugin.yml in the jar? (Use winzip to check)

#

If not, then your IDE has a problem

warm carbon
#

nope, it is not. I compiled another plugin and there it is

#

but just not for that project

#

even though the plugin.yml is at the same location

#

it apparently skips it for that project since today

patent monolith
#

nope, it is not
even though the plugin.yml is at the same location

Is it in there or not

warm carbon
#

no

#

not in that jar of the project

patent monolith
#

Then that is your answer

#

In the end, the plugin.yml needs to be in there

#

So your IDE may not be packaging it in there

warm carbon
#

I see, but I am just curios why something that worked before for that project, and others, but just now it does not

#

but yeah thanks fam, I'll look it up

patent monolith
#

Not sure

#

No

#

Np*

vernal spruce
#

How is it possible that a item from a list can get removed from simply calling .get on it

ashen stirrup
#

How do you set the skull rotation, in correlation with the player's Yaw?

keen compass
#

@vernal spruce if you implement List you can override the .get() to do more then just get the something from said list

vernal spruce
#

@keen compass thats the problem im not doing anything

#

i even siwtched to a hashmap to get a random item from it

#
        Random rnd = new Random();
        int toGet = rnd.nextInt(easterItems.size());
        return easterItems.get(toGet);
    }```
#

beside just simply removing it from the list its somehow removing it from the config file itself

#

how can this happen..

#

fixed

#

Somehow calling entitydeathevent.getdrops.add removes everything

#

related to the item added

hearty trellis
#

so i see both bukkit and spigot dont have an entity despawn event, how could i work around that? context: i need the particle effect of my custom mob to stop when he gets despawned

vernal spruce
#

literally everything including config file somehow

#

just check if entitiy.isDead?

hearty trellis
#

does that work for despawned?

tranquil rampart
#

I have an GLITCH with NameTagEdit Plugin. Can someone help

hearty trellis
#

i tried using the ChunkUnloadEvent but that doesn't always work, since it appears sometimes entities despawn while chunks don't

vernal spruce
#

yeah

#

it will return true if it no longer exists

hearty trellis
#

hmm okay

#

@tranquil rampart ?ask

tranquil rampart
#

...

hearty trellis
#

just ask ur question

tranquil rampart
#

I can't send ss

frigid ember
#

hi

wanton delta
#

@tranquil rampart use ?paste

#

?paste

worldly heathBOT
wanton delta
#

or verify ur account with forums

tranquil rampart
#

Oh, yeah

#

No errors or logs

wanton delta
#

you are giving us

#

very little information

chrome edge
#

@tranquil rampart May you provide code here with using pastebin/hastebin?

wanton delta
#

and its likely not a spigot issue we can help with

#

unless its a plugin youre developing yourself

calm frost
cold wharf
#

How can I check if a variable contains a online player's name?

empty sonnet
#

Hi, is there anyway I can return all vanilla redstone mechanics in spigot? AFAIK redstone mechanics were changed to make the server more fast and optimized

dreamy silo
#
    private void onA(IslandPreLevelEvent event) {
        Bukkit.broadcastMessage("level " + event.getLongLevel());
        Bukkit.broadcastMessage("pp " + event.getLongPointsToNextLevel());

        event.setLongLevel(100);

        Bukkit.broadcastMessage("level " + event.getLongLevel());


    }```
this code is working perfect but 
```@EventHandler
    private void onA(IslandPreLevelEvent event) {
        Bukkit.broadcastMessage("level " + event.getLongLevel());
        Bukkit.broadcastMessage("pp " + event.getLongPointsToNextLevel());

        long x = event.getLongPointsToNextLevel() - main.dataMap.get(event.getPlayer()).getPoint();

        if(x <= 0) {
            Bukkit.broadcastMessage("if");
            Bukkit.broadcastMessage("map " + main.dataMap.get(event.getPlayer()).getLevel());
            event.setLongLevel(event.getLongLevel() + 1;
            main.dataMap.get(event.getPlayer()).setPoint(1);
            Bukkit.broadcastMessage("level : " + event.getLongLevel());
        }

    }```
#

but this code doesn't work

subtle blade
#

afaik neither should work. Last I recall, event listeners cannot be private

mossy wraith
#

Does anyone know plugin which can make this function: if you die in specific multiverse world than you'll spawn in specific multiverse world's spawnpoint?

That's normal if you don't understand me. Sorry for it

naive goblet
#

Well

#

get the world of the player who died and respawn him in that world spawn point?

#

I don't think mv has it's own sps

#

It only manipulates default world data etc iirc

naive goblet
#

Hmm yes should be removable

#

It might be a plugin.

sweet hemlock
#

@frigid ember If you're using stock BungeeCord (or Waterfall), It's most definitely a plugin doing that. What plugins do you have on the BC server?

naive stratus
#

https://imgur.com/a/GPt62Ts - Has anyone over seen this happen? I have reset The End several times by deleting the world folder and it was recreated the same every time, except for this time where I find the exit portal spawned above ground.

naive goblet
#

Hmm well I suppose it's going to generate same aslong as the seed is same on the overworld?

naive stratus
#

Seed has not changed

#

I've reset it 10-12 times today, but this just happened now.

#

normal and nether folders remain

naive goblet
#

Idk how it works for the end but coordinates can be involved i guess.

#

It seems to just be a drunk generation, why it happened times is kind of hmm.

naive stratus
#

Its just that one part thats raised. So weird...

#

Not a huge problem. I can get around it for sure. It's just odd.

naive goblet
#

It's actually weird rn.

#

Yeah it's very odd.

naive stratus
#

I'll save the files, just in case

naive goblet
#

Do so

naive stratus
#

@subtle blade You're somewhat of a MC genius it seems. Do you have any idea what's going on here?

fair abyss
#

can you upload it to another site? @naive stratus

subtle blade
#

"minecraft genius" PES_Think

#

no but really, that's actually fucked lol. I've never seen the portal generate like that before

naive stratus
#

@subtle blade That's a stamp of approval

#

Sure, I can upload it somewhere.

#

I'll include the normal world and nether

#

Idk if it matters, but better add it just in case.

#

@fair abyss Did you mean upload somewhere else than imgur or upload the worlds? 😛

fair abyss
#

else than imgur

naive goblet
#

Choco is that one percent that will continue charlesdarwinsm of humanity 😮

naive stratus
#

@fair abyss Sure, but what is the problem with imgur?

fair abyss
#

its blank for me

#

dont know why

fair abyss
#

second image requires permission

patent monolith
#

🇶 Is there a way to get the actual fire block from EntityDamageEvent when the DamageCause is FIRE? I checked and made sure that the event was not EntityDamageByBlockEvent. I couldn't find any methods in there that would give the block. Would I need to check the block underneath them?

naive stratus
#

Try again @fair abyss

#

THat one is not as important though. That was just to confirm that its the same that was generated earlier. THat part is very distinct.

fair abyss
#

fire block? @patent monolith

naive goblet
#

@patent monolith get the livingentity, then get the location ?

#

I am pretty sure you can get the material from the location.

fair abyss
#

@naive stratus didnt understand anything abuot your isse or question sorry

#

you can get block's material from location

#

but just material, nothing else

naive goblet
#

Pretty sure you can get the block there as well?

fair abyss
#

yes you can get block

#

i mean you cant get some data of blocks

naive goblet
#

Yeah that's true

fair abyss
#

about eula
is coding a client with mcp legal?

it says "hacked versions" isn't legal. But im not coding cracked or hacked so is it legal?

naive goblet
#

You said it yourself?

#

it says "hacked versions" isn't legal.

hoary parcel
#

you also need to be careful with distributing

#

you cant distribute a recompiled client for example

fair abyss
#

@naive goblet yes but mine isnt hacked

hoary parcel
#

basically, creating custom clients is ok

#

distributing them? not so much

subtle blade
#

just don't distribute a binary

hoary parcel
#

you need some patching algo or smth

#

or good old jar modding

subtle blade
#

Hacked clients have moved over to a patch system

#

Not to say you should write one...

#

though that's most likely the approach you would take if you want to distribute it

hoary parcel
#

mojang is actually going after ppl nowadays

subtle blade
#

Good. As they should

hoary parcel
#

they pay some company that goes after ppl that miss use the brand

subtle blade
#

Just waiting for them to finally go after server mirrors. heh.

hoary parcel
#

we have giant list of alt sites aubry already took down

#

server mirrors arent a problem

fair abyss
#

so, no problem with coding. but problem with publishing?

hoary parcel
#

yes

#

I mean, I can submit the url to songodas shit if you want choco 😄

subtle blade
#

server mirrors arent a problem
If that were the case, we'd have a download button lol

hoary parcel
#

no like

#

alt sites are an issue

subtle blade
#

Yea I get that

hoary parcel
#

hacked clients are an issue

subtle blade
#

Just not top priority

hoary parcel
#

those should be prio

subtle blade
hoary parcel
#

nobody gets hurt by distributing server jars

fair abyss
#

so, optifine is legal?

subtle blade
#

Ehm - sort of

#

They're in a legal gray area

patent monolith
#

@naive goblet I can do that, but I want to make sure the correct fire block is damaging the player. I am making a plugin that allows certain fires to heal players

hoary parcel
#

optifine doesnt distribute the client

#

optifine is worse tho

#

they sell capes

subtle blade
#

Right - though their patching methods are strange af and, yea, capes

hoary parcel
#

mojangs is reaaaaally unhappy about that

subtle blade
#

Y'know, the thing their EULA explicitly disallows

#

Yea that thing lol

hoary parcel
#

the one thing they don't allow you to sell

#

the one thing that is supposed to be special

patent monolith
#

it's just kind of strange to me why damage from a fire block doesnt trigger EntityDamageByBlockEvent

fair abyss
#

i have confused a bit

patent monolith
#

you think it would fire it

fair abyss
#

not mean you

subtle blade
#

The fire block isn't doing the damage. The fire ticks as a result of the fire block are causing it

patent monolith
#

is that so?

#

i have another handler cancelling EntityCombustEvent

subtle blade
#

Fire increases your fire ticks. Doesn't damage you directly

patent monolith
#

hmmm

#

but the entity isnt combusting

fair abyss
#

after obfuscating can I share it with my friends?

hoary parcel
#

no you cant

patent monolith
#

i also put water on the side and stood between the fire and the water so i wont catch on fire

#

i was taking damage but wasnt on fire

fair abyss
#

so how can optifine do

#

really confused

patent monolith
#

I will make a test plugin that cancels the EntityCombustEvent to see if the block is the cause of the damage or not

marsh nova
#

you can share with your friends if you don't do it publicly

#

no one will notice if you just dm it to a friend you know

fair abyss
#

so how can optifine do this?

#

they share it public

#

optifine says
"OptiFine is a Minecraft optimization mod. It allows Minecraft to run faster and look better with full support for HD textures and many configuration options."

#

but, isnt it a client too?

patent monolith
#

@subtle blade yeah, it damages directly

#

they should add it to the event though... should i open a jira ticket?

keen compass
#

optifine isn't a client. it is a client modification @fair abyss

fair abyss
#

@keen compass

#

it contains obfuscated minecraft codes

frigid ember
#

hi, im trying to get this plugin to work properly, i got 2 gui, and in the gui has same items for example i have item Ghast Tear,

and im code the ghast tear to execute command /normalboss
and in naother gui im used the ghast tear too execute the command /hardcoreboss

when i clicked the gui hardcore menu, has same item (Ghast Tear)
it always execute command /normalboss
and i have done code that ghasttear on the gui hardcore tu execute command /hardcoreboss

any silutions ?

fair abyss
#

first, check is it null like ide says

#

then, compare enum with == instead of equeals

frigid ember
#

talk to me ? king ?

fair abyss
#

yes you

#

and different guis should have different name

#

so you can understand which gui

frigid ember
#

yea ye ai got the diffrent name , does not work

keen compass
#

@fair abyss yes I am sure, it will contain some minecraft code because it needs to modify some things in the client, not just only add to make it work.

frigid ember
fair abyss
#

@keen compass it contains all, not some

frigid ember
#

did i typing the code wrong ?

keen compass
#

it doesn't contain all @fair abyss there is no way a 5mb jar contains all the mc code for the client

fair abyss
#

@frigid ember so you say, when I click ghast tear in gui which has name "hardcode boss.." it runs "/normalboss1"?

frigid ember
#

yea king

fair abyss
#

and if you compress 8mb jar can be 5 too. depends on resources

keen compass
#

mc client is far bigger then 5 or 8mb

fair abyss
#

this jar doesnt contains assets and libraries

#

actually any of them contains

#

if then they will 33mb (1.8.8 tested)

#

@frigid ember you sure about clicking right menu?

frigid ember
#

hmm can we private chat / dm discord

fair abyss
#

using telephone internet currently, sorry.

patent monolith
frigid ember
#

ah, im sure im clicked the right gui's

#

i can show u the console

fair abyss
#

so wheres debug code? in images you send

frigid ember
fair abyss
#

dont you say when I click ghast tear in gui which has name "hardcode boss.." it runs "/normalboss1"?

#

in that image you clicked normal one

frigid ember
#

no

#

look the times, when i clicked the gui's

fair abyss
#

whats your problem

#

i didnt understand anything

frigid ember
#

when I click ghast tear in gui which has name "hardcode boss.." it runs "/normalboss1"? this one

#

so must be diffrent items ?

#

or something

fair abyss
#

are you really sure about clicked right named gui?

frigid ember
#

because in gui normalboss got same items

#

yea im sure

fair abyss
#

can you send message to player

#

in each code

#

so you can debug

keen compass
#

if optifine was a client then you should be able to run optifine without the need of forge mode loader or modifying the client

#

just fyi

#

last I recalled, you can't just run the optifine jar by itself