#help-development
1 messages ยท Page 1446 of 1
if you do it enough yes
server will lag with anything
the dose is what makes the poison
If you have a ton of users then it will def eat a lot of tick time.
that shouldn't eat a lot of time tho?
just checking the block beneath a player?
it is in PME but still
Eh... Yeah. Should be fine
Checking 1k blocks a tick should be ok for most machines.
I made this with command blocks but how can I make this in a plugin? Any idea?
well how did you do it with command blocks?
I used execute if block
This is easier way to do it
I dont know the schuduler thing I will search for it
did i do it right?
Ok this should be the highest precision you can achieve using packets.
https://gist.github.com/Flo0/302f7eae875e5dd990f66cdd58de7087
How many packets are sent is up to the client.
did i do it right?
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
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.
And remove the InterruptedException
why is that there ๐
idk
why'd you put it there?
copied from old project
other*
interesting
like this
done
what should i do next
Agreed, but not for extremely obvious situations such as event > e
bruh i no more need that it is old
I still think event is more readable tho. And also it's just bad habit I guess.
cuz i wanted to acces to that bool from JavaPlugin class
at least it's not static ๐คง
k
What should i do nexttttt how do i read Location var
what're you trying to do
check the block below player
HOW do i read that var
Optic can u teach me java
Why?
yup
how to parse three vars in Location to three different int's
idk how to ask normal Q
this is..
there's a javadoc for Location
there is no getTo for that event iirc
ok
PlayerMoveEvent#getTo ?
PlayerItemHeldEvent
why though ๐คฃ
ah yeah there isn't lol
you can get block from location.
Block#getRelative()
?jd
package index
Javadocs -> code documentation -> Your best friend while coding
optimistic/creative
so
"minecraft:grass_block" is a String
Block is a Block
String is not a Block
Block is not a String
how do i convert them
you can't = a String into Block
So uh...i don't think they actually know java ๐
why
because that's not how it works
if is un optimized
what tutorial
can u send me a link
use google
okay
how do i do this right
people on irc won't spoonfeed you how to java either
what Trans Pride Flag means
we aren't a walking talking java guide
they do
we won't teach you the language
say what
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
locations are ConfigurationSerializable
yeah but how would I go about having the server admin set those up
?
i'd probably use a command to set the location to either where you are or to the optional parameters you provide
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
obviously it's cool and hip with the kids because hypickle does it
if i'm unable to figure it out i'll probs just do that
completely redundant and unnecessary imo
uHm ActUaLly
I'd teach someone java but it would cost $$$
I use arch btw
all cancer servers are the same
what
i don't like it because i think minigames are gay
you must be fun at parties
there are no minigames at parties
those aren't minigames
yes
board games
mini-games ๐
they aren't minigames, they're a passage of time
you sound in denial
minigames are gay
lol
not a minibox
it's ridiculous to use a sandbox game to play minigames
just a gay box
you should just play an actual game that implements the thing better
i agree to that to an extent
it's like building a redstone computer to play tetris in minecraft
though games like skywars, bedwars, murder mystery, etc. are very well implemented
fun to set up i guess but completely ass to play in comparison to an actual game
what about making an operating system just to play tetris? ๐ค
https://github.com/jdah/tetris-os
make an OS in minecraft ๐
I guess ComputerCraft & OpenComputers kinda already allows that pretty easily actually ๐คฃ
that's just cheating
true ๐ค
use JNI and code an assembly OS ๐
an OS that does nothing but play outdated and annoying memes
basically reddit
but reddit isn't an operating system :/
Hey, I have Events on a class that isn't the main class, how do I make it so the game will recognize these?
RegisterEvents the class
the instance
I wrote this:
Bukkit.getServer().getPluginManager().registerEvents((Listener) new Compass(), this);
did I do something wrong?
but arch is operating system :]
assuming Compass implements Listener and is your event listener class yes that looks fine
arch does more than play outdated and annoying memes though @white mango
only barely though
getServer().getPluginManager().registerEvents(new eventListener(), this)
I doubt it does, their ide probably made them add that cast
Ohh forgot about implement listener
Thanks!
arch has evry day updates
The OS should boot up and do NOTHING but play outdated and annoying memes ๐
I don't remember when i last updated windows or kali linux ๐ค
i don't even know what an os is
opensussy
just kidding of course, I don't even have any technology that I can access
god you are annoying
so idk who is typing this
ur os is kinda AMOGUS
ur gae
How do i do it right
have you looked at a guide yet
wtf are yu doing
nah
do you even know what a class is
ok i ll look
ToMoRrOw
then be sure not to be back before tomorrow
why
because this is not a "how to java" channel
cuz your code is cancer
I even asked if they knew java (โฏยฐโกยฐ๏ผโฏ๏ธต โปโโป
yeah go on the irc
inb4 IRC does the same thing
fair enough ๐คฃ
bruh there is so NOT much peoples on irc
Indeed
true
So you're stuck with us ๐
How do i do it right
check block documentation @white mango
or the available classes
seriously...
that shit answers your questions for you
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
Switch the -1 to +1?
Material.GRASS_BLOCK, don't confuse them with the #
ok
what's that
you've stopped pinging everybody in every response
or i guess you're using replies now
usin replies
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
hmm hope it ll work
what
what is modern in plugin.yml
and why &a dont work in console messages
ok
thx
& codes are Minecraft specific, console uses ANSI codes iirc
like this ?
real men use ยง
Real men know both will get removed in newer versions
you want to get the block under player instead
okay ll be interesting to know hot do i do this
did you ask on the irc yet
show me your current code
one moment
did they tell you to fuck off there too
no i didnt ask cuz not much peoples online
you can do that using Block#getRelative
ok
you can google it actually
#=.
"how to get blocks under player"
ok
omg
toLoc.subtract(0,1,0).getBlock()
congratulations, you have just been spoonfed your entire plugin
hopefully you learned at least something
more importantly
why are you jumping every time you break a block
it's nauseating ๐ฅด
it is hacked client
and how u know
what said
haha
uhhhh
there's also ESP in the game
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)
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
cancel click event?
thats smart actually
however its not what looking for
since i want to use the "used map" material for a new itemstack
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
how would i set its id?
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
Spawn entity in unloaded chunk is not working is it normal ?
i think yes
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
i load it before spawning it but it never appear
is it a hostile mob
yep
because those despawn instantly if not within x blocks of a player
use the spawnEntity method with the Consumer parameter and set the entity's removeWhenFarAway to false
already done
@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
that's not using the consumer
the consumer ?
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
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());
}
you'll want to use the Consumer parameter which will let you perform operations on the entity before it's added to the world
Am I erasing the world, right?
there's an overload for spawnEntity that takes a consumer
okay thc i will lokk this
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
do you have some example i can't find how to do it with consumer ?
hide_attributes doesnt cover that stuff tho
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
Inventory#setItem(int, ItemStack)
?
huh
oh youre right, why is it considering this stuff to be potion effects tho?
bro you dont have to refer every time ๐
ping me if you have an idea
Is it possible to set a custom chatcolor in a sendMessage?
how would I get the location x blocks in front of a directional vector
multiply the vector
and then toLocation?
ah thanks
So long as your vector is a unit or normalized vector
Thanks, it seems to work
actually it seems a bit too far to the right
sometimes too low too
`
I am gettin error that JoinQuit class is not used
paste that error
||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
that's normal in most cases
Ohh
Even then my plugin not working๐ฅฒ
Yeah bro
errors?
No errors
show the events
thanks
I think problem is Java
`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");
}
}
`
lol
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());
}
}`
@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
Did nt work
I think it doesnt care
you extend javaplugin in event
there is nothing to do
you should only extend javaplugin in your plugin's main class
Hi, How would I be able to, when players click something in chat, teleport them to a location?
Ooo
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
ty
``[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
do not create a new instance of your plugin
^
Or a class extending JavaPlugin
or that
don't extend javaPlugin, except in your main-class
never
in your joinEvent, you're still extending JavaPlugin
i dont think someone in a tutorial extended javaPlugin that often tho
Thanks Man
sure
would u know how I would set the command?
SecondMessage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "tp "));
I want to teleport the player to a set of coords
SecondMessage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "tp " + p.getname + " x y z"));
ty
p.getname is whatever u reference ur players with
no worries
how to check for wet sponge in 1.8?
wtf is wrong with this javadoc
ah this is for 1.16
btw this doesn't help i know its something to do with data.
u need 1.8 right?
yea
ItemStack(Material.SPONGE, (short) 1);
i used to do it once but i really dont remember how
ok so
He wants to get the wet sponge material
i have a luckyblock plugin, when you break a block with also a custom data in the config something happens
like here
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
Thanks!
like:
if(Bukkit.getPlayer(args[0]) != null) {
Player target = Bukkit.getPlayer(args[0]);
}
has someone got any response for this?
im not asking for server support ๐๐ป
how can i get this exception using a try catch, i tried to add but it didn't work very well
when reading from the config just do
try {
your stuff to read
} catch(InvalidConfigurationException exception) {
exception.printstacktrace();
}
does that read the file?
yea
but it was exactly the thing that I did
i added throws in my constructor too
I keep getting the error
maybe your file doesn't exist?
hey also how would I set the world, I want it to go to the end
why don't you check for it
the spawn is in the end tho
it gives you the error right in front of you
can you send us the config file?
Hello every1
i see that you are missing ":"
makarov:
name: "&7Lv.1 &eMakarov"
name "test"
wow u use arch
ik of this, but i want get the exception without get error
you are missing a : at "name"
nope, he is missing :
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
anything
thats just horrible
because spam the console?
why
it only happens when you load the configuration
How do i do summoning fireball in one direction(like in bedwars) and it will not destroy anything
if you load it 1000 then thats why the spam happens
its there so you fix your bugs
+1
we are not yelling at you btw, we are just making you follow the convention
thats there because people need to know it happens
i know that, but I don't want him to receive the error inside the code, you know, just the line he missed
ok ignore me
this is a example
i ll go to irc
lmao
we are helping 1 first
if you know how to spawn an entity
yeah just dont be patient
okay i ll wait
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.
like /summon fireball dont work it ll stay in one place
and use 2 spaces!
what you need to do ;_;
it'll break most config interpreters today
but the catch exception doesn't seem to work
are you using spigot or vanilla lmao
reply
hey I have
it happens that there are lay people, I want to create an api for future projects, where you donโt necessarily need to receive a gingesque error in front of you
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
"lay people"?
each one has a different idea
oh lazy
btw install discord rich presence using the intellij idea marketplace, its way cooler than idea64 in your rcp
ty
if you dont want the error then fix your config ๐ง
just make your own teleport?
dude you are dumb or what
like when the player clicks use like
p.teleport(new Location(world,x,y,z))
this is an x y problem
i know i can solve the error, but i want to improve the way to solve this problem, HOW TO SOLVE IT ALONE
dude
just
catch
the error
ty
but and exactly what I'm trying to do
xd
then show your code
he's asking how he could make so it just shows the line where the error is
even tho the console literally says it well
e.getStackTrace()[0].getLineNumber();
yes, but continues shows internal scanner errors
anyone knows?
thank you
no problem
sry for bothering again, but where would I put that?
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
keep giving me error
} catch (InvalidConfigurationException|ScannerException e) {
sendMessage("dick");
}```
in your clickevent?
so after the Action.RUN_COMMAND?
no, you have to remove that i think
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 : )
huh
I want to do like in bedwars fireball
does Location.add(x,y,z) change the original location, or does it just return a copy
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
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))
what
are you using vanilla or spigot....
ok thx
this is spigot server !!
no problem
then just spawn a fireball and set its velocity to the eylocation of the player which returns a vector
still since its a fork we can provide support till its help-server
I was joking
xd

how to add plugins to vanilla
ok
mods for vanilla
k
you should use command blocks if it is a vanilla server
can't use a spigot plugin on an vanilla server
inventory starts with i
wat u wanna do rather
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
HEROBRI... * dead *
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
is there any way to force player to sneak
String message2 = plugin.getConfig().getString("message2");
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.
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());
anything guys??
k
String message2 = plugin.getConfig().getString("message2");
It wouldnt show up in chat
only the p.sendMessage would actually show up, not the TextComponent
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
huh
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.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
like the whole thing?
well it's the first time I'm using this
how to send msg to the all server
and to store that inside the persistent data container?
ty
wdym by this
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??
You're never sending the text components
?paste
Use that in future
any reason why this dosent save??
?paste
You might want to add an ! to that if statement
So I would do public void sendMessage or p.sendMesage
ok yeah but why dosent it save??
Because the code doesn't run
tysm
For it to set the timeplayed the timeplayed value needs to already be set
does a commandExecutor class needs a constructor?
No
Ok that makes sense but how would I save the time for players who already played??
Just remove that if statement?
What does Intellij tell you
Use Bukkit instead of Server
ty
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?
ILikeToCode do you really like to code ๐ค
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
getServer().getPluginManager().registerEvents(new JoinEvent(this), this);
what end
this
just do p.teleport(location)
looks like i did something https://gist.github.com/dulatello08/a759d0544685edffcbc86599f20777d4
is it right
example:
if (Bukkit.getWorld("worldName") != null) {
p.teleport(new Location(Bukkit.getWorld("worldName", x, y, z));
}
help plz
okay ignore me
yes me too
ight imma use this is what Im trying now isnt gonna work
bro theres 3 people still telling about errors just wait
same for u
ok :(
okay show me the code u have
me?
yes
?paste
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
import static org.bukkit.ChatColor.*;
oh
Is it right
ok 1s
what doesnt work about it?
could you try /alert a b c
hm weird lemme try
i am useing 1.16
reply for who
for crayzfish
for my guess main is a class that has javaplugin in it
its alright
@white mango What's the problem?
doesnt work
Please use dependency injection
i copied code from web and idk how to use it
Show code
k
yea
whats the problem
Tf is @Service? And why do you have two classes in the same file?
And add @Override on onEnable()
is it illegal to hold 2 classes in 1 file?
yeah and how tf you wanna get instance when you didnt even create it
k
ikr lmao
No
It's just like why
Rather have it organized
Tf is this code
beginner code
ok
@white mango What are you trying to do
Don't copy code
IT DOESNT work
wehere is the A?
throable fireballs like in bedwors
my bad replace for(int i = 1; i < args.length; i++) { with for(int i = 0; i < args.length; i++) {
ok i will test it
@shy wolf Uh like what are you trying to do?
okay
what?
broadcast command
throwable fireballs like in bedwars
he is Arab
Yeah
and later i what to make whan you bc it's show's in title
what?
sory i dont know english very good
java naming conventions, Let's learn what is naming convention and what are its benefits.
i think you meant something like you want to make it later send titles?
yes?
oh okay
player.spigot().sendMessage(whatever action bar enum, "message")
wait that's for actionbar
player.sendTitle() I meant
Okay I guess
for(Player player : Bukkit.getOnlinePlayers()) {
player.sendTitle("whatever");
}``` I know, I spoonfed
@shy wolf
Why not.
he wanted title? and why would you want to even send /me?
my strat worked lol, ty anyways
All you need to do is add fadeIn, stay and fadeOut properties and sendTitle isn't depricated
Oh
@shy wolf player.sendTitle("blah", 1, 1). That will add a one second fadeIn and a one second fadeOut
?jd
package index
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?
How do i do fireballs like in bedwars
My mind is not cooporating today
ok
Use. camelCase. Variable. Names.
ripoff website lmao
Google. Coding. Conventions.
._.
xd
i tried
i know
instead saying it say me how do i do fireballs like in bedwars
?
Get off your ass then
Learn to code first
And learn java
Bruhhhhhhhh
^ donโt talk about how youโve been told that or whatever
bruh i know how to spawn
i dont know how to do velocity for it im not mathematic
Bro
does this work?(not related to the discussion at hand)
https://mystb.in/StructRegMidi.properties
Lol learning a spigot method != learning java
Refer to what @cinder thistle said.
math is not java
????????????
Lol what
๐
No
Uuhh
๐
Yeesh
I dont think this guy has any brain cells left
isn't camelcase for method names?
it is not my plugin
Itโs for variable names as well
it is popular Holograms
oh well, k
Who tf asked for a database.yml file????
@St33lPhoenix
well, im confused
Dulat hi
um why is my listener not working
I implemented the listener
and had eventHandler
and registered it at the main class
must be deaf
send code
did you define as @fresh templetHandler?
wtf
@ EventHandler
with no space in between
im trying to make it that one you spam it kicks the player / mute them how can i do it?
player.kick
do this.getPluginManager not getserver()
now dispatch dosen't work
he had a fricking return
cuz usally
Learn java
when u spam the same message
arent events void?
it tells you Pls do not spam
@digital plinth arent vents void
oh getpluginmamager?
commands are boolean
it shouldnt matter
okay move the line return spamMsg to the line after the .dispatch
the return will have no effect
it should be void?


