#help-development

1 messages ยท Page 1446 of 1

white mango
#

?

wraith rapids
#

if you do it enough yes

#

server will lag with anything

#

the dose is what makes the poison

lost matrix
#

If you have a ton of users then it will def eat a lot of tick time.

candid galleon
#

that shouldn't eat a lot of time tho?

#

just checking the block beneath a player?

#

it is in PME but still

lost matrix
#

Eh... Yeah. Should be fine

lost matrix
#

Checking 1k blocks a tick should be ok for most machines.

white mango
#

okay

#

1k is not my players

#

i hv only 40 players

hollow canopy
candid galleon
#

well how did you do it with command blocks?

hollow canopy
#

I used execute if block

candid galleon
#

you can check a block type

#

and run code based on that

hollow canopy
#

Okey I figured out

candid galleon
#

oh

#

im a bit disappointed

#

I thought you were pathfinding but

#

I see now ๐Ÿ˜ข

hollow canopy
#

This is easier way to do it

candid galleon
#

agreed

#

less impressive though

#

ยฏ_(ใƒ„)_/ยฏ

hollow canopy
#

yes you are right

#

but what event should I use for this?

candid galleon
#

none probably

#

i'd use a scheduler

hollow canopy
#

I dont know the schuduler thing I will search for it

white mango
#

did i do it right?

lost matrix
white mango
#

||@EventHandler||

#

oh

#

one moment

white mango
hollow canopy
#

or I wont do it @candid galleon I will do it in another way.Defend the Crystal style

#

it is lot easier and I can use mythic mobs for it

lost matrix
# white mango

First of all:
No single character variables please. I know a lot of tutorials think they are cool by only using e and p and whatnot
but thats just not how variables should be named. So rename your e to something like event pls.

white mango
#

ok

#

done

lost matrix
#

And remove the InterruptedException

white mango
#

why

#

and what that means

candid galleon
#

why is that there ๐Ÿ˜‚

white mango
#

idk

candid galleon
#

why'd you put it there?

white mango
#

copied from old project

candid galleon
#

other*

white mango
#

no

#

old

candid galleon
#

interesting

white mango
#

like this

white mango
white mango
quaint mantle
dusty herald
#

why is crawl outside of the event if it's just being reassigned

#

make it local

white mango
summer scroll
dusty herald
#

what

#

event is very much better than e DogKek

white mango
candid galleon
#

at least it's not static ๐Ÿคง

white mango
#

k

quaint mantle
white mango
dusty herald
#

what're you trying to do

white mango
#

I want

#

To damage player if he stands on grass

summer scroll
white mango
#

HOW do i read that var

vagrant stratus
#

question... do you even know java?

#

or any programming language for that matter

dusty herald
#

Optic can u teach me java

vagrant stratus
#

Why?

white mango
white mango
#

how to parse three vars in Location to three different int's

#

idk how to ask normal Q

dusty herald
#

this is..

white mango
#

what

#

im newbie

candid galleon
#

there's a javadoc for Location

dusty herald
#

there is no getTo for that event iirc

white mango
#

ok

candid galleon
#

PlayerMoveEvent#getTo ?

dusty herald
#

PlayerItemHeldEvent

vagrant stratus
candid galleon
#

ah yeah there isn't lol

summer scroll
#

Block#getRelative()

white mango
#

ok i ll read in JaVaDoCs

#

but thx

dusty herald
#

?jd

vagrant stratus
white mango
#

wait whas it class

#

how to do it right

#

why rainbow

#

im not lgbt

candid galleon
#

optimistic/creative

white mango
#

so

wraith rapids
#

"minecraft:grass_block" is a String

#

Block is a Block

#

String is not a Block

#

Block is not a String

white mango
#

how do i convert them

wraith rapids
#

you can't = a String into Block

vagrant stratus
#

So uh...i don't think they actually know java ๐Ÿ‘€

wraith rapids
#

and you shouldn't compare two Block's with ==

#

look up a java tutorial

white mango
#

why

wraith rapids
#

because that's not how it works

white mango
#

if is un optimized

wraith rapids
#

it's not

#

it's just not how it works

#

look up a tutorial

white mango
#

what tutorial

wraith rapids
#

a java tutorial

#

or a guide

#

or a book

white mango
#

can u send me a link

wraith rapids
#

use google

white mango
#

okay

white mango
wraith rapids
#

consult the guide

#

it'll tell you

white mango
#

bruh

#

peoples on irc is friendlier

wraith rapids
#

people on irc won't spoonfeed you how to java either

white mango
#

what Trans Pride Flag means

wraith rapids
#

we aren't a walking talking java guide

wraith rapids
#

we won't teach you the language

candid galleon
#

it is the flag that represents trans pride

#

woah you can't say that

wraith rapids
#

say what

candid galleon
#

indeed

#

so im trying to make a skywars game

#

how do most plugins go about setting/getting spawns?

#

Mineplex used wool blocks / data points to grab spawn points, which I liked

wraith rapids
#

locations are ConfigurationSerializable

candid galleon
#

yeah but how would I go about having the server admin set those up

white mango
wraith rapids
#

i'd probably use a command to set the location to either where you are or to the optional parameters you provide

candid galleon
#

that does sound fairly simple

#

and probably what I should do

#

though, the wool blocks approach is so cool

#

but it's a pain in the ass atm

wraith rapids
#

obviously it's cool and hip with the kids because hypickle does it

candid galleon
#

if i'm unable to figure it out i'll probs just do that

wraith rapids
#

completely redundant and unnecessary imo

candid galleon
#

uHm ActUaLly

vagrant stratus
candid galleon
#

I got the idea from Mineplex

#

no idea what Hypixel does

white mango
wraith rapids
#

all cancer servers are the same

candid galleon
#

mhmmmm

#

"i dont like it because its cool to dislike"

#

๐Ÿ˜Ž

white mango
#

what

wraith rapids
#

i don't like it because i think minigames are gay

candid galleon
#

you must be fun at parties

wraith rapids
#

there are no minigames at parties

candid galleon
#

beer pong

#

spin the bottle

wraith rapids
#

those aren't minigames

candid galleon
#

they are games

#

that are mini

wraith rapids
#

yes

candid galleon
#

board games

vagrant stratus
#

mini-games ๐Ÿ‘€

wraith rapids
#

they aren't minigames, they're a passage of time

candid galleon
#

you sound in denial

wraith rapids
#

minigames are gay

candid galleon
#

you're just in denial

#

maybe you were gay all along

wraith rapids
#

lol

vagrant stratus
candid galleon
#

not a minibox

wraith rapids
#

it's ridiculous to use a sandbox game to play minigames

candid galleon
#

just a gay box

wraith rapids
#

you should just play an actual game that implements the thing better

candid galleon
#

i agree to that to an extent

wraith rapids
#

it's like building a redstone computer to play tetris in minecraft

candid galleon
#

though games like skywars, bedwars, murder mystery, etc. are very well implemented

wraith rapids
#

fun to set up i guess but completely ass to play in comparison to an actual game

vagrant stratus
#

what about making an operating system just to play tetris? ๐Ÿค”
https://github.com/jdah/tetris-os

GitHub

An operating system, but it only plays Tetris. Contribute to jdah/tetris-os development by creating an account on GitHub.

wraith rapids
#

there is an operating system just to serve god

#

so that's fair game

vagrant stratus
#

make an OS in minecraft ๐Ÿ‘€

#

I guess ComputerCraft & OpenComputers kinda already allows that pretty easily actually ๐Ÿคฃ

candid galleon
#

that's just cheating

vagrant stratus
#

true ๐Ÿค”
use JNI and code an assembly OS ๐Ÿ‘€

candid galleon
#

JNI

#

i haven't heard that name in a long time

vagrant stratus
#

an OS that does nothing but play outdated and annoying memes

wraith rapids
#

basically reddit

vagrant stratus
#

but reddit isn't an operating system :/

wraith rapids
#

it's an operating system of stupid

#

it uses people as its circuits and components

crude loom
#

Hey, I have Events on a class that isn't the main class, how do I make it so the game will recognize these?

wraith rapids
#

the same way you would with any other events class

#

instantiate and register

young knoll
#

RegisterEvents the class

wraith rapids
#

the instance

crude loom
#

I wrote this:
Bukkit.getServer().getPluginManager().registerEvents((Listener) new Compass(), this);
did I do something wrong?

white mango
wraith rapids
#

assuming Compass implements Listener and is your event listener class yes that looks fine

vagrant stratus
#

arch does more than play outdated and annoying memes though @white mango

wraith rapids
#

only barely though

white mango
young knoll
#

I doubt it does, their ide probably made them add that cast

crude loom
#

Thanks!

vagrant stratus
wraith rapids
#

i haven't updated my os in 2 years

#

i haven't updated my main browser in 6 years

vagrant stratus
#

I don't remember when i last updated windows or kali linux ๐Ÿค”

sleek pond
#

i don't even know what an os is

white mango
sleek pond
#

just kidding of course, I don't even have any technology that I can access

wraith rapids
#

god you are annoying

sleek pond
#

so idk who is typing this

white mango
#

ur os is kinda AMOGUS

sleek pond
#

ur gae

vagrant stratus
white mango
#

How do i do it right

wraith rapids
#

have you looked at a guide yet

sleek pond
#

wtf are yu doing

white mango
#

nah

wraith rapids
#

go look at a guide then

#

you have literally no clue what you are doing whatsoever

sleek pond
#

do you even know what a class is

white mango
#

ToMoRrOw

wraith rapids
#

then be sure not to be back before tomorrow

white mango
wraith rapids
#

because this is not a "how to java" channel

sleek pond
#

cuz your code is cancer

vagrant stratus
#

I even asked if they knew java (โ•ฏยฐโ–กยฐ๏ผ‰โ•ฏ๏ธต โ”ปโ”โ”ป

white mango
#

i better not install discord

#

use IRC

wraith rapids
#

yeah go on the irc

white mango
#

k

#

bye

vagrant stratus
#

inb4 IRC does the same thing

wraith rapids
#

i don't care what the irc crew does

#

so long as he isn't here i'm content

vagrant stratus
#

fair enough ๐Ÿคฃ

white mango
#

bruh there is so NOT much peoples on irc

young knoll
#

Indeed

vagrant stratus
#

a lot of them moved to discord ๐Ÿคทโ€โ™‚๏ธ

#

or just aren't active

white mango
vagrant stratus
#

So you're stuck with us ๐Ÿ‘

white mango
#

How do i do it right

vagrant stratus
#

check block documentation @white mango

#

or the available classes

#

seriously...

#

that shit answers your questions for you

quaint mantle
#

hey guys. I want to remove durability from my pickaxe.

                short durability = (short) (p.getItemInHand().getDurability() -1);
                p.getItemInHand().setDurability(durability);```

This is my code, however, if I break a block, it addes an extra durability instead of removing it
young knoll
#

Switch the -1 to +1?

quaint mantle
#

I did

#

but didn't work

#

nvm works

#

thanks

#

I didn't export it or something

white mango
#

ok tysm

#

did i do it right

#

cuz ide dont show any warns

vagrant stratus
#

Material.GRASS_BLOCK, don't confuse them with the #

white mango
#

ok

wraith rapids
#

what's that

#

you've stopped pinging everybody in every response

#

or i guess you're using replies now

white mango
#

usin replies

wraith rapids
#

good thing I can't see them

#

i remember him being very annoying with his insistence to ping me and everybody else with every fucking message

white mango
#

hmm hope it ll work

#

what is modern in plugin.yml

#

and why &a dont work in console messages

#

ok

#

thx

vagrant stratus
white mango
#

like this ?

wraith rapids
#

real men use ยง

white mango
#

wow it loads

#

hooray at least it loads

vagrant stratus
white mango
#

hmmmmmmmmmmmmmmm

#

it doesnt work

summer scroll
wraith rapids
#

they won't

#

and if they do get removed, I'll just write my own lexer for them

white mango
wraith rapids
#

did you ask on the irc yet

summer scroll
#

show me your current code

white mango
#

one moment

wraith rapids
#

did they tell you to fuck off there too

white mango
white mango
summer scroll
#

you can do that using Block#getRelative

white mango
#

ok

summer scroll
#

you can google it actually

white mango
#

#=.

summer scroll
#

"how to get blocks under player"

white mango
#

okay

#

what do i type in brakes

#

like this

summer scroll
#

it accepts BlockFace.

#

so BlockFace.DOWN

white mango
#

ok

summer scroll
#

omg

eternal oxide
#

toLoc.subtract(0,1,0).getBlock()

white mango
#

wowwwwww

#

it is working!!!!!

#

wowwww

wraith rapids
#

congratulations, you have just been spoonfed your entire plugin

#

hopefully you learned at least something

white mango
#

thx @ every1

paper viper
#

why are you using a hack client

#

lmao

candid galleon
#

more importantly

#

why are you jumping every time you break a block

#

it's nauseating ๐Ÿฅด

white mango
wraith rapids
#

it's obvious that he'd be using a modded client

#

can't you tell

white mango
paper viper
#

dumbass it said "Wurst" at the end

#

lmao

white mango
#

what said

wraith rapids
#

frankly i'm surprised he isn't on 1.8

#

seems like a 1.8 guy

paper viper
#

Lmao

summer scroll
#

haha

white mango
#

uhhhh

candid galleon
#

there's also ESP in the game

craggy cosmosBOT
crude hound
#

hi can you help me to re-produce the java tagCounpound = nmsStack.getOrCreateTag(); line in minecraft (so spigot) 1.8.9?

#

(so the .getOrCreateTag() method)

digital rain
#

hello i wanted to ask. do you have any ideas how to remove the map functionality from a map and instead have it as a normal stackable item. any ideas guys?

#

yeah well ping me back if you decide to respond

summer scroll
digital rain
#

thats smart actually

#

however its not what looking for

#

since i want to use the "used map" material for a new itemstack

wraith rapids
#

removing map functionality will be difficult

#

but you can make it stackable by setting its map id to a fixed value

#

it will then stack with all other used maps with the same map id

digital rain
#

how would i set its id?

wraith rapids
#

i don't remember off the top of my head

#

see the dox for the itemmeta related classes and find the one that represents an used map

#

and see what the method is called

#

the client won't recognize the server's max stack size for items

#

it'll 'work' but there will be jitter

#

and you still need to have the maps have the same nbt for them to stack

tribal holly
#

Spawn entity in unloaded chunk is not working is it normal ?

digital rain
#

i think yes

wraith rapids
#

i don't remember what the semantics for that are

#

i vaguely remember that it should load the chunk synchronously and then spawn the entity, but i could be wrong

tribal holly
#

i load it before spawning it but it never appear

wraith rapids
#

is it a hostile mob

tribal holly
#

yep

wraith rapids
#

because those despawn instantly if not within x blocks of a player

tribal holly
wraith rapids
#

use the spawnEntity method with the Consumer parameter and set the entity's removeWhenFarAway to false

tribal holly
#

already done

digital rain
#
  @Deprecated
  boolean hasMapId();
  
  @Deprecated
  int getMapId();
  
  @Deprecated
  void setMapId(int paramInt);
  
  boolean hasMapView();
  
  @Nullable
  MapView getMapView();
  
  void setMapView(@UndefinedNullability("implementation defined") MapView paramMapView);
  
  boolean isScaling();
  
  void setScaling(boolean paramBoolean);
  
  boolean hasLocationName();
  
  @Nullable
  String getLocationName();
  
  void setLocationName(@Nullable String paramString);
  
  boolean hasColor();
  
  @Nullable
  Color getColor();
  
  void setColor(@Nullable Color paramColor);
  
  @NotNull
  MapMeta clone();
}```
the mapmeta class
wraith rapids
#

that's not using the consumer

tribal holly
#

the consumer ?

wraith rapids
#

the method you're using right now spawns the entity and adds it to the world and then applies the setRemoveWhenFarAway

#

which gives it a chance to despawn

sand hinge
#

public static void delete(World world) {
File deleteFolder = world.getWorldFolder();
removeconfirm(deleteFolder);
}

public static boolean removeconfirm(File path) {
	if(path.exists()) {
		File files[] = path.listFiles();
		for(int i=0; i<files.length; i++) {
			if(files[i].isDirectory()) {
				removeconfirm(files[i]);
			} else {
				files[i].delete();
			}
		}
	}
	return(path.delete());
}
wraith rapids
#

you'll want to use the Consumer parameter which will let you perform operations on the entity before it's added to the world

sand hinge
#

Am I erasing the world, right?

wraith rapids
#

there's an overload for spawnEntity that takes a consumer

wraith rapids
#

that's not the documentation

#

that's the api interface

#

but yes that is the right class

#

i don't remember if used maps are naturally stackable even if they have the same data though

#

if they aren't, you'll have to do what the deer guy said or use inventory listeners to stack them manually

#

that said no matter what you do, it'll behave strangely because the client still assumes the vanilla stack size

digital rain
#

also any idea on how to remove this stuff?

tribal holly
digital rain
#

hide_attributes doesnt cover that stuff tho

frosty torrent
#

Hey how can you set a 3x3 space in an inventory as the crafting matrix? I think my problem is when checking the 3x3 area cause I'm not really sure how I put it into the matrix

candid galleon
#

Inventory#setItem(int, ItemStack)

frosty torrent
#

?

digital rain
#

huh

maiden briar
#

Which class in the bungee api implements ProxiedPlayer?

#

Thanks

digital rain
#

oh youre right, why is it considering this stuff to be potion effects tho?

#

bro you dont have to refer every time ๐Ÿ˜„

spice juniper
#

Is it possible to set a custom chatcolor in a sendMessage?

upper vale
#

how would I get the location x blocks in front of a directional vector

eternal oxide
#

multiply the vector

upper vale
#

and then toLocation?

eternal oxide
#

no

#

add

#

location.add(direction.multiply(x))

upper vale
#

ah thanks

eternal oxide
#

So long as your vector is a unit or normalized vector

upper vale
#

Thanks, it seems to work

#

actually it seems a bit too far to the right

#

sometimes too low too

quaint mantle
#

`
I am gettin error that JoinQuit class is not used

sullen dome
quaint mantle
#

||package plugins.romeo.joinquit;

import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
import plugins.romeo.joinquit.events.JoinEvent;
import plugins.romeo.joinquit.events.QuitEvent;

public final class JoinQuit extends JavaPlugin implements Listener {

@Override
public void onEnable(){
    getServer().getPluginManager().registerEvents(new JoinEvent(), this);
    getServer().getPluginManager().registerEvents(new QuitEvent(), this);


}

}||

#

This is the code

sullen dome
#

that's normal in most cases

quaint mantle
#

Ohh

sullen dome
#

i mean

#

its just a yellow warning right?

quaint mantle
#

Even then my plugin not working๐Ÿฅฒ

quaint mantle
sullen dome
#

errors?

quaint mantle
#

No errors

sullen dome
#

show the events

crude hound
#

thanks

quaint mantle
#

I think problem is Java

sullen dome
#

i dont think so

#

you would probably get an error then

quaint mantle
#

`package plugins.romeo.joinquit.events;

import org.bukkit.ChatColor;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerQuitEvent;

public class QuitEvent implements Listener {

@EventHandler
void onQuit(PlayerQuitEvent quit){

    quit.setQuitMessage(ChatColor.RED + "You Left the Server");
}

}
`

sullen dome
#

lol

quaint mantle
#

Join event

#

Lol

#

`import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class JoinEvent extends JavaPlugin implements Listener {

@EventHandler
void onJoin(PlayerJoinEvent join){

    Player player = join.getPlayer();
    join.setJoinMessage(ChatColor.GOLD + "Welcome to the server" + ChatColor.RED + player.getDisplayName());

}

}`

sullen dome
#
@EventHandler
void onQuit

mayb that's why it says not used.

make it public and try

#

on both

#

events generally should be public i think

quaint mantle
#

Did nt work

ivory sleet
#

I think it doesnt care

sullen dome
#

oh no

#

my mistake

opal juniper
#

It doesn't change it

#

ignore it

sullen dome
#

you extend javaplugin in event

opal juniper
#

there is nothing to do

sullen dome
#

you should only extend javaplugin in your plugin's main class

civic tapir
#

Hi, How would I be able to, when players click something in chat, teleport them to a location?

sullen dome
civic tapir
#

ty

quaint mantle
#

``[16:52:30 INFO]: [JoinQuit] Enabling JoinQuit v1.0
[16:52:30 ERROR]: Error occurred while enabling JoinQuit v1.0 (Is it up to date?)
java.lang.IllegalArgumentException: Plugin already initialized!
at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader.java:231) ~[patched_1.16.5.jar:git-Paper-705]
at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:52) ~[patched_1.16.5.jar:git-Paper-705]
at plugins.romeo.joinquit.events.JoinEvent.<init>(JoinEvent.java:11) ~[?:?]
at plugins.romeo.joinquit.JoinQuit.onEnable(JoinQuit.java:12) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.16.5.jar:git-Paper-705]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:364) ~[patched_1.16.5.jar:git-Paper-

#

error is get

#

When loading this plugin

eternal oxide
#

do not create a new instance of your plugin

sullen dome
#

^

quaint mantle
#

Instance wdym?

#

Like I am a newbie

sullen dome
#

somewhere you use new <YourMainClass>();

#

JavaPlugin does that automatically

rotund ravine
#

Or a class extending JavaPlugin

sullen dome
#

or that

quaint mantle
#

Ohhhhhhh

#

Well Then How to fix it?

sullen dome
#

don't extend javaPlugin, except in your main-class

#

never

#

in your joinEvent, you're still extending JavaPlugin

quaint mantle
#

Hope now it works

#

My first experience was quite struggling

sullen dome
#

if you're not good at this, maybe watch a few tutorials.

#

that helped me too

quaint mantle
#

Yeah...I was watching videos only

#

But didn't got why i got the error

sullen dome
#

i dont think someone in a tutorial extended javaPlugin that often tho

quaint mantle
#

Thanks Man

sullen dome
#

sure

quaint mantle
#

It worked

#

After a struggle of 2 hours

civic tapir
#
SecondMessage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "tp "));
#

I want to teleport the player to a set of coords

quaint mantle
#

SecondMessage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "tp " + p.getname + " x y z"));

civic tapir
#

ty

quaint mantle
#

p.getname is whatever u reference ur players with

civic tapir
#

yea

#

Im using p so tysm

quaint mantle
#

no worries

kind coral
#

how to check for wet sponge in 1.8?

kind coral
#

wtf is wrong with this javadoc

quaint mantle
#

ah this is for 1.16

kind coral
quaint mantle
#

u need 1.8 right?

kind coral
#

yea

quaint mantle
#

ItemStack(Material.SPONGE, (short) 1);

kind coral
#

i used to do it once but i really dont remember how

quaint mantle
#

try this perhaps

#

this is just a guess tho :p

kind coral
#

ok so

quaint mantle
#

He wants to get the wet sponge material

kind coral
#

i have a luckyblock plugin, when you break a block with also a custom data in the config something happens

#

like here

stiff topaz
#

How can I get an argument from a command and cast it as a Player.

#

Im trying to give permissions to a user in a command

kind coral
#

i think 1.8 is pre 1.13

#

lol

stiff topaz
#

I want arg[0] to be used as a Player

#

Player target = args[0];

kind coral
#

just do Bukkit.getPlayer(arg[0]);

#

you must check if its valid first

stiff topaz
#

Thanks!

kind coral
#

like:
if(Bukkit.getPlayer(args[0]) != null) {
Player target = Bukkit.getPlayer(args[0]);
}

kind coral
#

im not asking for server support ๐Ÿ‘๐Ÿป

minor garnet
kind coral
#

when reading from the config just do

#

try {
your stuff to read
} catch(InvalidConfigurationException exception) {
exception.printstacktrace();
}

minor garnet
#

does that read the file?

kind coral
#

yea

minor garnet
#

but it was exactly the thing that I did

#

i added throws in my constructor too

#

I keep getting the error

kind coral
#

maybe your file doesn't exist?

civic tapir
kind coral
#

why don't you check for it

civic tapir
#

the spawn is in the end tho

minor garnet
#

exists, and pretty much the same error

kind coral
#

can you send us the config file?

white mango
#

Hello every1

kind coral
#

i see that you are missing ":"

minor garnet
#

makarov:
name: "&7Lv.1 &eMakarov"
name "test"

white mango
quaint mantle
#

not 4

minor garnet
kind coral
#

you are missing a : at "name"

kind coral
quaint mantle
#

and that

#

but its 2 spaces

#

use 2

minor garnet
#

i know there is the error there, but I don't want you to receive a message on the console when that happens, I'm trying to model it better

kind coral
#

its made so people know how to fix

#

why would you change that?

minor garnet
#

because spam the console?

minor garnet
kind coral
white mango
#

How do i do summoning fireball in one direction(like in bedwars) and it will not destroy anything

kind coral
#

if you load it 1000 then thats why the spam happens

quaint mantle
#

its there so you fix your bugs

kind coral
#

we are not yelling at you btw, we are just making you follow the convention

#

thats there because people need to know it happens

minor garnet
#

i know that, but I don't want him to receive the error inside the code, you know, just the line he missed

white mango
#

ok ignore me

minor garnet
#

this is a example

white mango
#

i ll go to irc

kind coral
#

we are helping 1 first

#

if you know how to spawn an entity

quaint mantle
white mango
#

okay i ll wait

kind coral
# minor garnet this is a example

what i think you can do is ready every line of the config and if it finds an error just print the line using a for cycle i guess. or a while using scanner, i really don't know.

white mango
quaint mantle
#

and use 2 spaces!

kind coral
quaint mantle
#

it'll break most config interpreters today

minor garnet
#

but the catch exception doesn't seem to work

kind coral
#

are you using spigot or vanilla lmao

civic tapir
#

hey I have

minor garnet
civic tapir
#
SecondMessage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "tp " + p.getname + " x y z"));
``` this command, and I want it to teleport to a specific world, where would I list the world
minor garnet
#

each one has a different idea

quaint mantle
#

oh lazy

kind coral
# civic tapir hey I have

btw install discord rich presence using the intellij idea marketplace, its way cooler than idea64 in your rcp

civic tapir
#

ty

quaint mantle
#

if you dont want the error then fix your config ๐Ÿง

minor garnet
quaint mantle
#

i'm dumb?

#

just catch the damn exception if you're so picky

kind coral
#

like when the player clicks use like
p.teleport(new Location(world,x,y,z))

quaint mantle
#

this is an x y problem

minor garnet
#

i know i can solve the error, but i want to improve the way to solve this problem, HOW TO SOLVE IT ALONE

minor garnet
quaint mantle
#

then show your code

kind coral
#

even tho the console literally says it well

quaint mantle
#

e.getStackTrace()[0].getLineNumber();

minor garnet
#

yes, but continues shows internal scanner errors

kind coral
minor garnet
quaint mantle
#

Do you see the problem here

#

InvalidConfigurationException
ScannerException

minor garnet
#

thank you

quaint mantle
#

no problem

civic tapir
#
TextComponent SecondMessage = new TextComponent(ChatColor.DARK_GREEN + message2);
        SecondMessage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "tp " + p.getName() + " 0 100 0"));
        SecondMessage.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text("Go to the main hub!")));
#

this is what Im currently using

minor garnet
#
            } catch (InvalidConfigurationException|ScannerException e) {
                sendMessage("dick");
            }```
kind coral
civic tapir
#

so after the Action.RUN_COMMAND?

kind coral
#

no, you have to remove that i think

kind coral
#

wtf

grim sage
#

Hey there !

Particle.DustOptions dustOptions = new Particle.DustOptions(Color.fromRGB(204, 0, 255), 1);
player.spawnParticle(Particle.REDSTONE, player.getLocation(), 50, dustOptions);

I found this to spawn particle and it work ! how can I easily make a particle line ? ( 1.16.5)
Thanks : )

civic tapir
#

huh

white mango
livid tundra
#

does Location.add(x,y,z) change the original location, or does it just return a copy

white mango
#

ok ignore me

#

u typing im playing minecraft alpha v 1.2.6

#

I want to do like in bedwars fireball

#

but i can join hypixel ๐Ÿ˜ฆ

#

it is so funny

livid tundra
# white mango I want to do like in bedwars fireball

I think you should first dectect using an entityinteractevent when a person uses(right clicks), and check if it is a fireball, then reduce the fireball number by one, and use complicated mathmatical equations(that I don't know) and the direction of the player's head to find out which direction the fireball should go, and summon a fireball(you can do that with a normal summon) and change the direction somehow(probably by using the summon command(a argument in the summon command))

dusty herald
#

what

kind coral
white mango
#

paper*

dusty herald
#

this is spigot server !!

livid tundra
kind coral
#

then just spawn a fireball and set its velocity to the eylocation of the player which returns a vector

kind coral
dusty herald
#

I was joking

kind coral
#

xd

dusty herald
white mango
livid tundra
#

can't

#

plugins for servers

white mango
#

ok

livid tundra
#

mods for vanilla

white mango
#

so why he asking

#

craftbukkit is deprecated

livid tundra
#

vanilla server and spigot server

#

different kinds of servers

white mango
#

k

livid tundra
#

you should use command blocks if it is a vanilla server

white mango
#

haha funny joke

#

but how to open inventory in alpha 1.2.6

livid tundra
#

probably "e"

#

or "i"

white mango
#

E dont work

#

wow

livid tundra
#

can't use a spigot plugin on an vanilla server

white mango
livid tundra
#

inventory starts with i

white mango
#

k

#

it is so cool that im going to speedrun alpha 1.2.6

civic tapir
#

?

ivory sleet
#

wat u wanna do rather

civic tapir
#
 p.sendMessage(ChatColor.RED + "When you are done, please " + ChatColor.BOLD + ChatColor.DARK_PURPLE + "Click below" + ChatColor.GREEN + "to go to the main hub");
        p.sendMessage(ChatColor.DARK_GREEN + message2);
#

I want to make it so when u click message2, it teleports u to a location in the end

white mango
#

HEROBRI... * dead *

civic tapir
#

I know how to use setClickEvent, but what would I put before that

#

so ___.setClickevent

#

smth in my config.yml

#

cause I want to be able to change it easily

white mango
#

is there any way to force player to sneak

civic tapir
white mango
#

that means

#

He can jump sprint but others ll see him sneaking? right?

quaint mantle
#

I've made a gui with custom items (server selector) I've added an config option in the persistent container (servername) for each item. What would be the best way to get the item for click event ? This item is configurable to.

tardy delta
#

should this work? It stores the uuid of the player in string format who locked it

 ItemStack itemStack = (ItemStack) event.getClickedBlock();
        Block block = event.getClickedBlock();
        Player p = event.getPlayer();
        NamespacedKey key = new NamespacedKey(plugin, "MBN");

 itemStack.getItemMeta().getPersistentDataContainer().set(key, PersistentDataType.STRING, p.getUniqueId().toString());
civic tapir
#

anything guys??

white mango
#

k

civic tapir
#
String message2 = plugin.getConfig().getString("message2");
tardy delta
#

how do you mean?

#

like ItemStack itemStack = ... ?

civic tapir
#

It wouldnt show up in chat

#

only the p.sendMessage would actually show up, not the TextComponent

tardy delta
#

yea but i want to get the itemstack from an existing block where the player has to click on

#

remember Block block = event.getClickedBlock()

#

idk if thats possible

civic tapir
#

huh

young spade
#

hi, im having trouble with a new plugin i created and was wondering if someone could help

Code: https://pastebin.com/Ajh9hp5T

error: https://pastebin.com/49D4PrjP

The enderman drops works fine but the other 3 dont.
the armor works fine though.

civic tapir
#

like the whole thing?

tardy delta
#

well it's the first time I'm using this

shy wolf
#

how to send msg to the all server

tardy delta
#

and to store that inside the persistent data container?

shy wolf
#

ty

civic tapir
#

wdym by this

young spade
#

ohhhhh

#

ty

#

oh ty

civic tapir
#
public class JoinEvent implements Listener {

    Plugin plugin = Main.getPlugin(Main.class);

@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
    String message1 = plugin.getConfig().getString("message1");
    String message2 = plugin.getConfig().getString("message2");
    Player p = event.getPlayer();
    boolean hasPlayed = p.hasPlayedBefore();

    if (p.hasPlayedBefore()) {
        event.setJoinMessage(ChatColor.GREEN + " Please welcome back " + ChatColor.DARK_GREEN + p.getDisplayName() + ChatColor.GREEN + "to Orbited!");
    } else {
        event.setJoinMessage(ChatColor.GREEN + "Welcome " + ChatColor.DARK_GREEN + p.getDisplayName() + ChatColor.GREEN + "to Orbited!");
    }
    if (!p.hasPlayedBefore()) {
         p.sendMessage(ChatColor.LIGHT_PURPLE + "Please watch our Trailer below!");
         TextComponent FirstMessage = new TextComponent(ChatColor.DARK_GREEN + message2);
         FirstMessage.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, message1));
         FirstMessage.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text("Watch the server trailer!")));
         p.sendMessage(ChatColor.RED + "When you are done, please " + ChatColor.BOLD + ChatColor.DARK_PURPLE + "Click below" + ChatColor.GREEN + "to go to the main hub");
        TextComponent SecondMessage = new TextComponent(ChatColor.DARK_GREEN + message2);
        SecondMessage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "tp " + p.getName() + " 0 100 0"));
         SecondMessage.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text("Teleport to the main hub!")));
    }
}
}
#

this is my class

#

IDK if Im missing samth??

chrome beacon
#

You're never sending the text components

cinder thistle
#

?paste

queen dragonBOT
cinder thistle
#

Use that in future

civic tapir
#

sry

#

ty

cold pawn
#

any reason why this dosent save??

chrome beacon
#

?paste

queen dragonBOT
cold pawn
chrome beacon
civic tapir
#

So I would do public void sendMessage or p.sendMesage

cold pawn
chrome beacon
civic tapir
#

tysm

shy wolf
#

help plz

#

how to broadcast Message

#

what is it on the code

chrome beacon
tardy delta
#

does a commandExecutor class needs a constructor?

chrome beacon
#

No

shy wolf
chrome beacon
#

args is an array

#

Not a string

shy wolf
cold pawn
chrome beacon
#

Just remove that if statement?

shy wolf
chrome beacon
#

What does Intellij tell you

shy wolf
chrome beacon
#

Use Bukkit instead of Server

shy wolf
#

ty

civic tapir
#

in chat, it said null

#

like 0 message, just null

#

already have that at the top

#

ight

#

on top or below the event

#

so inside the @EventHandler

#

or

#
    

    private final Main plugin;

    public JoinEvent(Main plugin) {
        this.plugin = plugin;
    }
#

ight

#

we good

#

also how would I tp them to the end?

ivory sleet
#

ILikeToCode do you really like to code ๐Ÿค”

civic tapir
#

SecondMessage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/tp " + p.getName() + " 0 100 0"));

#

I have this

#

but how do I put them into the end, not the overworld

#

"'registerEvents(org.bukkit.event.Listener, org.bukkit.plugin.Plugin)' in 'org.bukkit.plugin.PluginManager' cannot be applied to '(me.twansil.orbitedbeginning.events.JoinEvent)'"

#

getServer().getPluginManager().registerEvents(new JoinEvent(this));

#

this right

quaint mantle
civic tapir
#

ight

#

and what do I do abt the end?

quaint mantle
#

what end

civic tapir
#

the End dimension

#

I want them to be telported to the End

quaint mantle
#

just do p.teleport(location)

shy wolf
#

error

white mango
quaint mantle
# civic tapir this

example:

if (Bukkit.getWorld("worldName") != null) {
  p.teleport(new Location(Bukkit.getWorld("worldName", x, y, z));
}
white mango
#

okay ignore me

shy wolf
#

yes me too

civic tapir
quaint mantle
quaint mantle
shy wolf
#

ok :(

quaint mantle
#

okay show me the code u have

shy wolf
#

me?

quaint mantle
#

yes

shy wolf
#

?paste

queen dragonBOT
shy wolf
quaint mantle
#

and what is the line causing errors btw

#

oh yeah

#

i see

#

youre trying to send message that player sent but not getting the message

shy wolf
#

import static org.bukkit.ChatColor.*;

quaint mantle
shy wolf
#

ok 1s

quaint mantle
shy wolf
quaint mantle
#

could you try /alert a b c

white mango
#

ide dont undestand

shy wolf
quaint mantle
#

hm weird lemme try

shy wolf
#

i am useing 1.16

white mango
quaint mantle
#

for crayzfish

quaint mantle
quaint mantle
#

try this

shy wolf
#

ok 1s

#

i am working on more thing so sory for the delay

quaint mantle
weary geyser
#

@white mango What's the problem?

white mango
#

doesnt work

weary geyser
#

Please use dependency injection

white mango
#

i copied code from web and idk how to use it

weary geyser
#

Show code

white mango
#

k

quaint mantle
#

yea

white mango
quaint mantle
#

whats the problem

weary geyser
#

Tf is @Service? And why do you have two classes in the same file?

#

And add @Override on onEnable()

white mango
#

is it illegal to hold 2 classes in 1 file?

quaint mantle
#

yeah and how tf you wanna get instance when you didnt even create it

white mango
weary geyser
#

It's just like why

#

Rather have it organized

#

Tf is this code

quaint mantle
#

beginner code

weary geyser
#

@OnEvent?

#

it doesn't even have the imports for it lol

white mango
weary geyser
#

@white mango What are you trying to do

weary geyser
#

Don't copy code

weary geyser
white mango
#

IT DOESNT work

shy wolf
#

wehere is the A?

white mango
quaint mantle
# shy wolf

my bad replace for(int i = 1; i < args.length; i++) { with for(int i = 0; i < args.length; i++) {

shy wolf
#

ok i will test it

weary geyser
#

@shy wolf Uh like what are you trying to do?

white mango
#

okay

weary geyser
#

what?

quaint mantle
white mango
#

throwable fireballs like in bedwars

weary geyser
#

Shouldn't the prefix be first?

#

Oh wait in your lang you read opposite

white mango
weary geyser
#

Yeah

shy wolf
quaint mantle
#

what?

weary geyser
#

lol

#

Don't use lowercase class names please

shy wolf
#

sory i dont know english very good

weary geyser
quaint mantle
quaint mantle
#

oh okay

weary geyser
#

player.spigot().sendMessage(whatever action bar enum, "message")

#

wait that's for actionbar

#

player.sendTitle() I meant

white mango
#

okay

#

i ll go to sleep

weary geyser
#

Okay I guess

white mango
#

no i lied

#

explain me plz how

#

i use kali btw

shy wolf
#

not just to one player

white mango
#

why dont use /me <message>

#

as console

weary geyser
#
for(Player player : Bukkit.getOnlinePlayers()) {
  player.sendTitle("whatever");
}``` I know, I spoonfed
#

@shy wolf

shy wolf
#

ok

#

i wiil test it

weary geyser
#

Why not.

quaint mantle
weary geyser
#

Shit, sorry bout' that

#

My mind is still stuck in 1.8

civic tapir
chrome beacon
#

All you need to do is add fadeIn, stay and fadeOut properties and sendTitle isn't depricated

weary geyser
#

Oh

#

@shy wolf player.sendTitle("blah", 1, 1). That will add a one second fadeIn and a one second fadeOut

#

?jd

livid tundra
#
    public void explodeCreepers(){
        List<Entity> list_of_creepers  = world.getEntities();
        Settings settings = new Settings();
        list_of_creepers.removeIf(entity -> entity.getType() != EntityType.CREEPER);
        for (Entity entity : list_of_creepers){
            Location location = entity.getLocation().getBlock().getLocation();
            long amount_of_player_blocks = 0;
            for (int add_to_x : settings.creeper_detect_range){
                for (int add_to_y : settings.creeper_detect_range){
                    for (int add_to_z : settings.creeper_detect_range){
                        Location temp_location = location.clone().add(add_to_x,add_to_y,add_to_z);
                        for (Location block_location : list_of_the_locations_of_blocks_players_placed){
                            if (temp_location == block_location){
                                amount_of_player_blocks++;
                            }
                        }
                    }
                }
            }
            if (amount_of_player_blocks >= settings.amount_to_explode){
                Creeper creeper_entity = (Creeper) entity;
                creeper_entity.setFuseTicks(100);//5 second fuse
                creeper_entity.setExplosionRadius(settings.creeper_detect_range[settings.creeper_detect_range.length-1]);
                creeper_entity.explode();
            }
        }
    }

does this work?

white mango
#

How do i do fireballs like in bedwars

weary geyser
#

My mind is not cooporating today

weary geyser
#

*20, 20

#

player.sendTitle("a", 20, 20)

cinder thistle
weary geyser
#

ripoff website lmao

cinder thistle
#

Google. Coding. Conventions.

weary geyser
#

._.

cinder thistle
#

Use good variable names

#

Concise and descriptive

#

Not long and descriptive

sly bay
#

xd

weary geyser
#

Mans been watching John Hammond lmao

#

^

white mango
weary geyser
#

Bruh

#

He wasn't talking t you

white mango
#

i know

white mango
#

?

cinder thistle
weary geyser
#

And learn java

white mango
#

Bruhhhhhhhh

weary geyser
#

Learn the basics, design patterns etc

#

Please

cinder thistle
#

^ donโ€™t talk about how youโ€™ve been told that or whatever

white mango
#

bruh i know how to spawn

cinder thistle
#

You know one thing so you know Java

#

Smart

white mango
#

i dont know how to do velocity for it im not mathematic

weary geyser
#

Bro

livid tundra
chrome beacon
unkempt peak
#

Lol learning a spigot method != learning java

weary geyser
livid tundra
white mango
weary geyser
#

????????????

unkempt peak
#

Lol what

white mango
#

๐Ÿ‘

weary geyser
#

No

unkempt peak
#

Uuhh

weary geyser
#

๐Ÿ‘Ž

cinder thistle
#

Yeesh

unkempt peak
#

I dont think this guy has any brain cells left

livid tundra
white mango
cinder thistle
#

Itโ€™s for variable names as well

white mango
#

it is popular Holograms

livid tundra
weary geyser
white mango
#

yup

#

but im redditor

weary geyser
#

@St33lPhoenix

livid tundra
#

well, im confused

ivory sleet
#

Dulat hi

digital plinth
#

um why is my listener not working

#

I implemented the listener

#

and had eventHandler

#

and registered it at the main class

unreal quartz
#

must be deaf

warm galleon
#

did you define as @fresh templetHandler?

#

wtf

#

@ EventHandler

#

with no space in between

digital plinth
quaint mantle
#

im trying to make it that one you spam it kicks the player / mute them how can i do it?

digital plinth
quaint mantle
#

but i want it through the plugin

#

like

digital plinth
#

u want to use .dispatch

#

why?

quaint mantle
#

/mute %player% 1h

#

wdym

warm galleon
digital plinth
#

true

#

nooooo

#

look at his code

quaint mantle
#

now dispatch dosen't work

digital plinth
#

he had a fricking return

quaint mantle
#

cuz usally

digital plinth
quaint mantle
#

when u spam the same message

warm galleon
#

arent events void?

quaint mantle
#

it tells you Pls do not spam

warm galleon
#

@digital plinth arent vents void

digital plinth
warm galleon
#

commands are boolean

sage swift
#

it shouldnt matter

digital plinth
sage swift
#

the return will have no effect

digital plinth
#

it should be void?