#development
1 messages · Page 111 of 1
I don't earn any money from anything really lmao
well, the extra premium features tho :/
fair enough ig
yeah you're not having it both ways
but again that ruins people being able to use the base part free ;-;
aaaaaaaaaargh
sad, but understood
you actually get a ton of people wanting to buy your plugin before its even released even tho they are fully capable of compiling
then make a addon system and make the premium stuff in a separate jar thats p2d
- open source aspect
yes
People who want to support you will, and people who don't will not
If you want to take the really toxic approach, you can manually provide the jar to each Patreon member. Sign the jar and utilize the jar hash that will change as you put a different license key in each jar.
^^ true
No matter what DRM you put in, people will do anything
well the reason OS is useless to me is because all my plugins I make once, are then used in a video, and then are available for download. I don't maintain it
I don't see that as a reason open source is useless
^^
If anything, someone who cares about the plugin can submit a PR
Or just go sell it for a high price to people who have money
or fork and continue it
Sounds like the smartest option
but I don't have the time to watch a ton of repositories
exactly
you don't have to
that's the best part of open source
the community will watch it for you
fair
and also, reviewing a PR for one of your plugins will take like, 30 seconds
if you have a good one lmao
I think you vastly overestimate the work involved with an open source project lmao
Idk, if there was an easy way to make a monorepo for my plugins I might do that
dear god why
because I don't need 100 repos
jesus crist
you'd be surprised, but actually a lot of people out there are quite interested in the things you do
can't handle typing git init 50 times?
lmao
You could have a parent module and have each of your plugins be a submodule
no I use an IDE 
but nah, it's just that I don't want to have tons of repositories to monitor
that's the thing
Fred what does "monitoring" involve
opening them once a year
Getting an email once a year about a PR?
well, you have this options:
- all premium
- addon system and premium stuff on a paid one
- open source
- cry about it
wait I can get emails from github?
uhhhh
man I need to enable those
you sure can buddy
that's all I ever do
did not know that was a thing
i don't like check up on my repos lmao
We always turn those things on cause we are depressed and pray a random guy in the world
will come in
Lol
weirdo
And it actually... quite surprisingly works
luckily for me, I am not the owner of FJ, so I don't get all of the emails about Blitz lmao
whats FJ? lmao
Yeah I put each one to bed every night and make sure they get their food and water.
FrozenJoin?
ya
😌
when i think of FJ i always think of farmer john cause these problems used to abbreviate his name with that
are they not on by default? I swear for me they are
i thought so
sure lmao
they are for me
but yea they do email you
but for real tho. when update? spigot page needs a bit of redesign as well. so not just an update
i didn't explicitly turn them on
the issue is the first 3 don't work with the idiot-proofing I do
so ig #4 ._.
why don't you be the maintainer of FJ lmao
LMFAOO
u r right
AHHAHAHA
funny
like i have to manually type the url now
I use the GitHub refined browser extension and I think mine still shows
for wtf is frozen join
I also have some thing to show me the best forks of a project
funny you should say that. but it would lose all the 100 downloads from spigot. kek
173*
you can move resources from one account to another
I've done that
it works fine
^
we now have a bentobox spigot account
alright blitz whats your spigot
with all the various resources
ok. interesting
from various people
also glare change my nick to "Happy Staryear"
Star. for real? xD. I'm not going to take a lot of care of it but I can do this update
Boost and change it yourself
that you can both access
FUCK
buddy im taking zero care of it
you're better than me
the boost is on cooldown 
shared account then?
nah you can have it
lmao
FYI you need to email MD_5 for a shared account first
why not/ xD
theres a rule against it without prior permission
this is why not
Boutta start a new group called InactiveResources
well. he doesn't need to know its a shared account
md_5 replied to me in under 15 minutes
kek
alright how do I move resources
report it, and select transfer
:)))) helpchat can have its own inactive resources account and it would have more plugins listed than the official one
Yeah if you send him pictures of your feet when you ask him about it, he typically responds pretty quick.
yes, yes
lmfao
but it worked for me 5+ times
Report the resource is request it to be transfered to another account.
That's how I get reviews removed.
lmfao
also, the authors responses to reviews change names when you change who owns it
it's pretty funny actually
glare please
alright @broken elbow what's your spigot account name
BlitzGamer88
lmao
bcz I cant change my name unless I pay them 🥲
sad
Also if you transfer a premium resource, you don't get added to the buyers list
😂
they are still using crappy xenforo
this is so scuffed
this is why Hangar is a thing right
Found that out when clip told me 6 months after I got VoteParty that he had to buy it to download it
lmfao
hahaha
clip bought it?
is it tho? its not yet ready afaik
well yeah when it is tho
will hangar support premium tho
yeah. even tho it was his plugin before. kek
Nah I think I felt nice and added him to the buyers list
That was his Christmas present
lmao
haha
what u gonna do about it?
no
n o
kek
only there do I have people deleting their message and then resending it just to make sure they ping me
lmao was my bad
didnt reply at first
weirdo
I guess I'm sometimes weird lmao
anyone good with ProtocolLib? For some reason, even after following the tutorial it says that my ProtocolManager is null: https://paste.helpch.at/idakucosod.cs
show your plugin.yml
strange...
hm yeah even with their snapshot versions it still pops that
are you using maven/gradle to build your plugin or what?
coolio
yesss i think it was this thank u sm
So i somehow managed to make a Frankenstein maven+gradle project
I can build in both gradle and maven
should I be worried or is this normal
i was in your situation before lmfao
that is not at all good
oh boy
Yeah I tried to convert my project from maven -> gradle so I could do hotswapping
then you also get confused
but well
Should i stay with maven or use gradle
use gradle
alright
the gradle conversion thing doesnt delete maven build files
you need to delete them by yourself
Does anyone know how to get this tab to pop back up? It doesn't seem to be in my intellij project
Use https://paste.helpch.at/ for errors, logs and configs. So we don't spam the discord.
I get this error: https://paste.helpch.at/wirafemeje.css
With this code: https://paste.helpch.at/epimolevog.java
What am i doing wrong?
This is my messages.yml
Please @ me
@sharp cove
public void loadFile() {
messagesFile = new File(OorlogSimulatie.instance.getDataFolder(), "messages.yml");
if (!messagesFile.exists())
OorlogSimulatie.instance.saveResource("messages.yml", true);
loadMessages();
messagesConfig = YamlConfiguration.loadConfiguration(messagesFile);
}
Try this
am i not able to get the name of an Inventory in 1.16?
The name belongs to the InventoryView
but Inventory still has a name property? Bukkit.createInventory still takes in a title and returns an Inventory
I guess i'll have to rework my menu api to store the string elsehow .-.
Yeah, but that's because the Container needs a title
But InventoryView is the only interface that actually accesses it
.-.
is it like
reasonable practice to extend InventoryView to use for my menu api?
or is that something that a plugin shouldn't do
https://paste.helpch.at/ediwofafen.css
PLEASE HELP ME AS SOON AS POSSIBLE
what's on line 28 of GUICommand.java
int slots = Integer.parseInt(config.getString(Text.chat("GUI_SLOTS")));
config is null
or getString
what lol, pretty sure Integer.parseInt doesn't throw an NPE if it is given a null
public static int parseInt(String s)
throws NumberFormatException```
Parses the string argument as a signed decimal integer. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' ('\u002D') to indicate a negative value or an ASCII plus sign '+' ('\u002B') to indicate a positive value. The resulting integer value is returned, exactly as if the argument and the radix 10 were given as arguments to the parseInt(java.lang.String, int) method.
s - a String containing the int representation to be parsed
NumberFormatException - if the string does not contain a parsable integer.
the integer value represented by the argument in decimal.
oh my god it does
yeah weird
hey star this error came out again https://paste.helpch.at/inugifacav.css
i removed slots from config and code
its 27 now
now this error came out
String title = config.getString(Text.chat("GUI_TITLE"));
What is Text.chat
config might be null
config is most likely null
Send your GUICommand class
Would be a lot easier with code
btw i have 2 configs
messages.yml
and config.yml
@sterile hinge @atomic echo https://paste.helpch.at/ohexigizos.java
Use a proper config instance instead and pass it to the constructor
are you sure your config is intialized or so?
yes it is
like getLogger#info(config.getString())
Well, it's not
try this
It likely isn’t
then we can know for sure
@night ice https://paste.helpch.at/emolibixoh.java
and where is the base called?
Code…
show that too please
Order is important
like the order
like
FileManager.base(this);
new GUICommand(this);
yeah...
thank you very much guys
but also, you should do this
also you could go for non-static methods
can i do saveDefaultConfig(); there?
yeah, thats what i meant
if i want to save my defalit config and messsages
ok
@night ice ahh i need help ;--;
https://paste.helpch.at/dixuwiwoqe.java is not generating messages.yml
Oh
how do you know it's not saving?
And why do you do location serialization on your own?
i just want stuff in specific order kinda picky yk
but it doesn't write to the file it's blank still
what was your method call, like parameter...may be it didn't satisfy any of the if
When will deluxetags go back to spigot?
officialy*
because some plugin developers only will add compatibility when it reaches spigot officially
Yes, the config.yml is already done and that always works.
Thanks, ill try that then.
Player#getPlayerExact() returns player only if player is currently online or has joined before?
d;spigot Bukkit#getPlayerExact
@Nullable
public static Player getPlayerExact(@NotNull String name)```
Gets the player with the exact given name, case insensitive.
name - Exact name of the player to retrieve
a player object if one was found, null otherwise
since it returns a Player object, they need to be online
it would be nice if it return Optional<T> right?
but i don't think it would be ever done
Spigot loves their nullability, even some NotNull methods are nullable!
If I have a base class Condition<T>(t: T), is possible to have a class that extends it but without a parameter?
private abstract class Condition<T>(protected val t: T) {
abstract fun check(player: Player, other: Player): Boolean
}
private class WorldCondition(t: Nothing) : Condition<Nothing>(t) {
override fun check(player: Player, other: Player): Boolean = other.world.uid == player.world.uid
}```
This requires a `Nothing` object, so it won't work =/
I could make it extend Condition<Byte>(0) 🤣
Can't you do Unit?
well, yeah, but what about the parameter?
That's Any
I'd say if you do Nothing then it should be nullable maybe Condition<Nothing>(null) or I guess like dkim said Condition<Unit>(Unit)
But what even is the point of the T there?
Non null, Matt
I know that's why i said it should be nullable
There's other conditions that have an argument such as String for PermissionCondition
Condition<T>(t: T?)
wdym
ik
I actually might have a better way to do this
He was talking about object not Object
oh
separately?
companion is used in a class if you want only some "static" functions/properties
object makes the class a singleton
object means it's a singleton, companion means it's for a singleton that accompanies the class
Nah, this is better
I can see the object meaning
I was like, who the fuck is Rider and why are they constantly typing

dc#
d#
I've used it before why?
Yeah
but
Context #development message
Lol
lol
ok yes
So I'm facing a pretty bad issue. I was using JDA and I didn't realize that it used JNA for loading its native libraries. However, my library is also using JNA, and it loads two different versions of the same API into the classpath. The worst part is, that you can't relocate JNA. (If you do, then the native binaries won't be relocated with the new relocated names, and JNI won't be able to find the methods. I tried before and it showed this error). So basically there are two different versions of JNA that are not relocated. I haven't encountered any issues right now, but it could be severe later. Anyone know any tips?
it might work when loading them with different class loaders, but I can't guarantee anything
idk what JNA is but why not just use the version JDA is using?
JDA is using an old ass version
private fun getMetadata(name: String): WrappedDataWatcher = WrappedDataWatcher().apply {
setObject(
WrappedDataWatcher.WrappedDataWatcherObject(0, byteSerializer), (0x20).toByte()
) // Entity data - invisible
setObject(
WrappedDataWatcher.WrappedDataWatcherObject(2,
WrappedDataWatcher.Registry.getChatComponentSerializer(true)), Optional.of(
AdventureComponentConverter.fromComponent(name.toComponent()).handle
)
) // name tag
setObject(
WrappedDataWatcher.WrappedDataWatcherObject(3, booleanSerializer), true
) // custom name visible
setObject(
WrappedDataWatcher.WrappedDataWatcherObject(5, booleanSerializer), true
) // no gravity
setObject(
WrappedDataWatcher.WrappedDataWatcherObject(15, byteSerializer), (0x01 or 0x02 or 0x08 or 0x10).toByte()
) // Armorstand data
}
``````kt
val packet = PacketContainer(PacketType.Play.Server.ENTITY_METADATA)
packet.integers.write(0, id)
packet.watchableCollectionModifier.write(0, getMetadata(name).toList())
for (player in players) {
ProtocolLibrary.getProtocolManager().sendServerPacket(player, packet, true)
}
```anyone know why this results in this: https://i.imgur.com/Hc9TJ1i.png
:/
Classic JDA
Fuck jda
Javacord?
Java Discord API
I'm well aware of what it is, I'm trying to see what Emily likes.
oo..lol..mb then
How DARE you say that
discord.js relieved
Well don't keep us in suspense, what do you like?
Javacord good, CF good reactive streams good
d4j?
is javacord actually any better than jda?
CF?
CompletableFutures
Oh duh
damn glare. should've been obvious
Bro I was thinking Cloudflare
:)))
Javacord seems decent. I used it back when it was first created, seems to have come a long way. Beemo is written in Javacord.
I just don't really have a need to make a discord bot at this given time unfortunately.
Me neither but if I did I'd very much likely use javacord, lol
In reality I haven't used it that much to have a "valid" opinion on it but uh I do prefer it over JDA and some of its… questionable design choices
Is it getting worse in the 5.x beta?
TabComplete is suggesting tab completes of a string on the last argument instead of the next one
/cenchant enchant suggests telekinesis for enchant instead of the next arg
i figured it out
just upped the (arg.length) check 1 for each
guys hello
can u help me with some thing?
why 50?
i can send u a link in DM
it a requirment to win in agame
ok sure
I’d argue for that it’s almost the same as 4, not gotten better or worse in terms of design imho, tho they do add new features in conjunction with discord adding new ones
Such as?
Believe ThreadChannel, StageChannel and all of these new things discord adds are getting their own interfaces as opposed to just being an Enum constant of some type
such as nothing and everything you'll never use
yeah. they have a channel with all (or some of) the changes that come with 5.0.0.
Ahh
Oh yeah and they also decided to yeet a lot of deprecated stuff in v4
That’s something at least 
but mostly design changes. since they already had those stuff just bundled all into one I guess.
Yeah but rather insignificant design changes
Although Ig better than all those Nullable returning methods
For tabcompletion if i type in a char it still suggests options that dont have the same char at the start, how should i go about removing them?
#dev-general fellas
/permipbanlist add @broken elbow
hahahaha. just gonna restart my router and join back with a different IP. kek

StringUtils from bukkit has a method
Or use commodore + brig (:
Spigot actually has their own utilities 🌞
d;spigot StringUtil#copyPartialMatches
@NotNull
public static T copyPartialMatches(@NotNull String token, @NotNull Iterable originals, @NotNull T collection)
throws UnsupportedOperationException, IllegalArgumentException, IllegalArgumentException```
Copies all elements from the iterable collection of originals to the collection provided.
token - String to search for
originals - An iterable collection of strings to filter.
collection - The collection to add matches to
UnsupportedOperationException - if the collection is immutable and originals contains a string which starts with the specified search string.
IllegalArgumentException - if any parameter is is null
IllegalArgumentException - if originals contains a null element. Note: the collection may be modified before this is thrown
the collection provided that would have the elements copied into
KEK
lol
(args[n], possibleResults, new ArrayList<>())
Like does Java even accept that?
intellij would probably yell at you

thanks
I get this error: https://paste.helpch.at/wirafemeje.css
With this code: https://paste.helpch.at/epimolevog.java
What am i doing wrong?
https://gyazo.com/22249e718f4763ce009acce09c24d6aa
You use Npp
I hope you realize that you are saving the resource after you load the Yaml Configuration
kek
Is https://ci.dmulloy2.net/job/ProtocolLib/javadoc/overview-tree.html website bugged? No JavaScript, cannot search :C wtf
javascript is disabled on your browser
How do I add a ConfigurationSection to a FileConfiguration/.yml file? I've copied a ConfigurationSection and have it as a variable, I want to save it to my file. I'd rather not re-write the entire function to make it save the values instead of building a configSection.
fileConfig.set("section", section)?
or like, merge them together?
or what do you mean by "add" exactly?
Ok, so I have a configuration section that I want to copy. I create a copy based on the original and have that as a variable. I now want to add that configuration section to my config file. So that my file goes from containing ConfigExample to containing ConfigExample & ConfigExampleCopy. Does that make sense? I tried config.set("", configCopyVariable);.
something like this should work src.getValues(false).forEach(dest::set), src being the ConfigSection you copy from, dest the ConfigSection you copy to
I did this: https://ibb.co/tY7QhGz, it did not work :/
Is there any way to get noteblocks to not show their current note while left clicking? canceling the PlayerInteractEvent causes the block to become unbreakable
So I have this method https://paste.helpch.at/huqagecisa.java (properties is a Map<String, String>) which I'm calling from kotlin like this
private val progress: Float = meta.getProperty("progress", BossBar.MAX_PROGRESS) { it.toFloatOrNull() }```
And... I get this error when I compile the project `Type mismatch: inferred type is Float? but Float was expected`. Any idea how to fix this? 😅
Well it's because you're specifying it not null but you're returning possibly null.
Can you change the type to Float??
well, no, the point of the method is to get a value from the map, apply the function and always return a not null value
But you're doing orNull()
yes
if you want it to throw an exception just do toFloat
I was just hopping it will go well with Function<String, @Nullable R> 😦
Santa Mitten, more like, Smartass Mitten
Emily more like stfu
alternatively annotate the method return type as @NotNull as well
just throw a stfurxcrptoine
Just add !! Everywhere.
YEAH OR THAT
true
java.base/sun.nio.fs.NativeBuffers
okay, I got it to compile the code, let's see
who/asked
you did
you did actually
oh
damn...
Fuck I just lost the game
I use windows, broken too
same - but i clicked off and clicked back on and now it's not happening
nvm now its broken
🥲
Fake news
Photoshopped
noo! it's ezgif
aftereffects
aftereffects?
shut up windows user
It's synced the first few for me, then it gets out of sync
How can I transfer everything from one remote to another?
My secondary remote is outdated and when trying to push to it, there are no commits to push since everything is done on "origin" I assume. Secondary is called "private" btw.
I have a design structure related question:
So I am currently working on a Npc system, and I have a NpcRegistry (Hashmap with a uuid key and a Npc class value), where Npcs are being added to when you create them, so I can properly make changes to them at runtime.
Now it comes to the entity part.
I want every npc (which is a fake player, send to joining players through packets) to have a second line of a name, displayed by an empty armorstand. To keep track of both the npc as well as the hologram/armorstand entity, I have to store them somewhere.
Would you have a Hashmap, where all the corresponding entities to the Npc are being stored under its uuid, or..? Ideas and tipps are very much appreciated 🙂
So I have two plugins in one
Ones a bungee and ones a spigot
How could I access the plugins BUNGEE config.yml through the spigot side of the plugin?
Any help would be appreciated, thanks.
Send a plugin message from the spigot plugin to the bungee plugin on what to do, perform the actions in the bungee plugin
yes
it uses the player connection to transfer data
it's literally just another packet
Could you just store that on the NPC?
You mean as an attribute?
Feels kinda weird ngl
So when I change the sub name of the NPC, I am changing the sub name attribute of the Npc class, only to then access its armor stand attribute to change the entities name to the just changed title attribute?
Well if you do it properly you just have the methods on the NPC class to change its name that accesses its child variable armor stand.
You mean for instance the setSubName() method?
Sure, why not. Thanks
I still have to save the title though, but yea
Lol
And you are an experienced Java developer?
debatable lol
i am a java developer 
what constitutes experienced seems to change depending on who you're talking to.
I’m just kidding around
Though, I really gotta get some sleep now
Let’s hope your design choice won’t make a hell fire out of my system
This is fine.
I hope so too lol.
i have a problem, i'm creating a Minecraft Plugin with PlaceholderAPI support, but when i have started coding the class and compiled Intellij game me this error:
package me.clip.placeholderapi.expansion does not exist
Java Version: JDK 8
Spigot Version: 1.8.8
Maven Dependency 2.10.10
I need them to check if PlayerCommandPreprocessEvent is cancelled before running the command's action so that we can set command cooldowns on those commands
Because none of the command cooldown plugins dont work if this is not concelled
I need some help cause im a bit lost,
I am trying to write a plugin to manage joining queues through ajQueue by detecting which ip the user connected from via bungeecord and determining what server to joinqueue the player in.
Moral of the story is, How the hell do I send a message to spigot to tell it to send a command? Or even send a message to a plugin and have the plugin do the work
Could you share you pom.xml
can i share you in DM?
yeah
?
I have been reading this for hours, It straight up doesn't work, I tried to change it a lot, literally doesn't do anythinh
Isn't there something about the spigot server needs a player on it for that to work or something
yeah...a player should be online...if i remember correctly, it uses players packet to communicate or so
Could you show your code?
@ BungeeCord
//main class
@Override
public void onEnable() {
...
getProxy().registerChannel( "BungeeCord" );
}
@Override
public void onDisable() {
getProxy().unregisterChannel( "BungeeCord" );
}
public class PluginMessageUtils {
public static void sendCustomData(ProxiedPlayer player, String channel, @Nullable String stringInformation) {
Collection<ProxiedPlayer> networkPlayers = ProxyServer.getInstance().getPlayers();
// perform a check to see if globally are no players
if ( networkPlayers == null || networkPlayers.isEmpty() )
{
return;
}
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF( channel ); // the channel could be whatever you want
if (stringInformation != null) out.writeUTF(stringInformation);
// we send the data to the server
// using ServerInfo the packet is being queued if there are no players in the server
// using only the server to send data the packet will be lost if no players are in it
player.getServer().getInfo().sendData(channel, out.toByteArray());
}
}
// command
@Override
public void execute(CommandSender sender, String[] args) {
PluginMessageUtils.sendCustomData(((ProxiedPlayer) sender),"BungeeCord",
"sdeadf");
}
@ Spigot
public class PluginMessageListener implements org.bukkit.plugin.messaging.PluginMessageListener {
@Override
public void onPluginMessageReceived(@NotNull String s, @NotNull Player player, @NotNull byte[] bytes) {
player.sendMessage("A");
}
}
@Override
public void onEnable() {
this.getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
this.getServer().getMessenger().registerIncomingPluginChannel(this, "BungeeCord", new PluginMessageListener());
}
@Override
public void onDisable() {
this.getServer().getMessenger().unregisterOutgoingPluginChannel(this, "BungeeCord");
this.getServer().getMessenger().unregisterIncomingPluginChannel(this, "BungeeCord", new PluginMessageListener());
}
I really hate to ping you @robust crow But please check
Would be better if you put it in a pastebin
@red notch
Firstly, we need to register our custom channel into onEnable() in our main class. We do this with ProxyServer#registerChannel(String). The channel should be lowercase and should contain ":".
It does not make a difference if it's lower case or has a : from failed attempts, but i can try
well, those are something that they emphasize and i don't see anything else that could mess with the system
so..trying it would be good
They bolded it...so ofc you should follow it
I need help,please someone from dev team help
just check if it's cancelled? PlayerCommandPreprocessEvent#isCancelled
you should probably rewrite your question, as I don't really understand what you mean and what you're trying to do
This was my question
Developer from custom cooldown plugin asked me to ask this, bc command cooldowns dont work on those commands i created on deluxe commands
I qoute: DeluxeCommands? You should tell the dev of that plugin that they should be checking if PlayerCommandPreprocessEvent is cancelled before running the command's action.
If they do that, your setup should be fixed
The plugin should be checking if the event is already cancelled before continuing
@void orchid
is there a method to return a list of every minecraft enchantment?
i found the method i was looking for
Enchantment.values()
I told you how to check if the event is cancelled, isn't that what you wanted?
Where do i check that?
how can i reload hikaricp connection pool? I am making a /reload command and i want it to reload all essential functions so i need to reload hikari too 😄
i would assume you close the connection then open a new version of the connection.
https://paste.helpch.at/tijigezumi.js
does anyone know why this is not returning items?
it is making the gui but not adding items
have you updated the inventory
im going to guess that inv never gets changed
then the question doesn’t make much sense
How is it possible that the items aren’t returned from the method if they are a child of the inventory object
like
shall i send you code?
im new to bukkit
@slim vortex
plz help
PlayerCommandPreprocessEvent#isCancelled
Replace PlayerCommandPreprocessEvent with what you're referring to the event as. (I'd assume it's either event or e)
Heyy, Is it possible to create a plugin that allows a player to turn off everyone elses nametag visible to them, but keep em visible for other players?
yes
Could you provide me in the right direction to what I should be looking for?
@zealous yoke
@void orchid that's not what he was asking
I have a plugin called CommandCooldown and @gentle mauve has put a cooldown on a custom command made with DeluxeCommands.
When a player has a cooldown on a command it (CommandCooldown) cancels the PlayerCommandPreprocessEvent. The problem is, DeluxeCommands does not check to see if this event is cancelled before executing the custom command, preventing compatibility with my plugin.
if (e.isCancelled()) return;
``` added into this listener within DeluxeCommands would fix this issue
Since DeluxeCommands is not open-sourced, I am unable to contribute towards the plugin; otherwise, I would simply just make a git request
Hey guys I'm new to Java but I am using it for developing a custom MC Plugin for my minecraft server. I've got the list of established Bukkit Events (e.g JoinEvent, ect.) and I'm trying to find the event for player right-click. In this context I'm trying to create a custom Event of players right clicking specific items in their hotbar. What is the Bukkit event name for a player right-clicking?
public class PlayerInteractEvent
extends PlayerEvent
implements Cancellable```
PlayerInteractEvent has 4 fields, 1 all implementations, 18 methods, 1 implementations, and 1 extensions.
Represents an event that is called when a player interacts with an object or air, potentially fired once for each hand. The hand can be determined using getHand().
This event will fire as cancelled if the vanilla behavior is to do nothing (e.g interacting with air). For the purpose of avoiding doubt, this means that the event will only be in the cancelled state if it is fired as a result of some prediction made by the server where no subsequent code will run, rather than when the subsequent interaction activity (e.g. placing a block in an illegal position (BlockCanBuildEvent) will fail.
Ah thank you. I think the list I had may have been slightly outdated.
I've been looking through that Event list, which of the events would I use to check for the player holding a specific named item?
If anybody knows the correct uses for these Events it would be very helpful, thank you.
You do not need an event to achieve that. Simply getting the main item of the player's inventory would achieve what you're trying to do.
Ah ok... I just realised the link to Events sent above is not already implemented into my IDE? How can I implement these custom events so that they are usable? Just for future reference, ty.
what build tools do you use?
Sorry I'm not that experienced. I've just downloaded IntelliJ IDE, and I've got SpigotAPI downloaded and set up on it currenctly, and that's all I know.
How can I get the events sent by DocDex in the link to work in my IDE?
just type the event name and it should autocomplete
It's not working for those events up there
What do you mean working? Are they errors in your IDE or not working as you want in-game?
Oh no. Sorry I'm really new to this. Previously they've appeared once I start to type them and I can select them. I've been looking at that list and many stated there aren't appearing automatically and aren't being accepted as events?
Are you looking at a list with the same version as your API?
I think that's the problem. Let me check quickly.
I don't really know IntelliJ, I'm used to writing them myself. So you can do that otherwise lol
I've got spigot API 1.18.1
Ah ok. Hmmm...
What version is the list from?
Oh I see... the list is from 1.12.
That shouldn't really be a problem tho, unless the events are deprecated or removed.
Is there any place where I can download more API stuff or more events?
Not really
Try writing them yourself and see if they work ingame. It might be that IntelliJ does not like different versions, but the events still work fine
It mentions different "packages" all of which seem to include lots of really detailed specific events. Is that just due to it being an older version?
Can I ask you a more specific question?
I mean all versions have different packages with events and stuff? I don't understand what you mean
^
Ah don't worry. How can I define or create a new event?
For example, one event that is triggered if a player performs multiple actions?
???
Like this, for example: https://ibb.co/vkcXkNF
I suggest watching some tutorial, there is more to it than that. It won't work with only that
Wait so what would that then do?
Ah ok I will, thank you.
That would fire every time a player sends a chat message
Ah ok ty.
Np :))
Ty. Bye :)))
You need to learn java first
Why does this: https://ibb.co/yywFFDT not work? It does not update the inventory correctly, the new configsection only appears once I reload the GUI. This is located in a InventoryClickEvent.
have you tried updating the inventory instead of opening a new one?
Inventory#updateInventory or along of the lines
Noop, I had not tried it. Did not even know it existed, but it did not work. I build it around config files, for every configsection another item is added. And they (the items) don't disappear (even thought the configsection is gone) until I reopen the inventory. Are the FileConfigurations why it does not work maybe?
@void orchid can u pls do this?
How do I detect what item a player is holding?
player.getInventory().getItemInMainHand();
Ah ok thank you. How could I then check if the item is correct as in a boolean? e.g "is item blue wool" if not, output false.
player.getInventory().getItemInMainHand().getType().equals(Material.LIGHT_BLUE_WOOL);
So that would be if player.get... ect.?
with if statement before
and if it was blue wool it would output true?
Yeah
Np :))
do what? I'm not the creator of DeluxeCommands so I cannot do much unfortunately. You'll have to ask the author to include what Darrion mentioned above
And where can i find this person, or get to contact with him ASAP?
Discord? There might be a link at the spigot page
Tofpu, you have any other idea on how to fix it lol? I've tried putting it in a BukkitScheduler to since someone told me Spigot API can't run asynced or smth like that.
they meant async, so long it's sync; it's fine
The "player" part of that is highlighted in red? I believe that's error. Why might I be getting that error. If i put capitol "P" in and have "Player" the "get.inventory" becomes red.
Probaly, remember wrong ig
you need to have a reference of the player
wdym? sry im really new.
no worries, please paste the code in the link below
?paste
Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
• HelpChat Paste - How To Use
yeah, that should fix it I believe
Like this: https://ibb.co/wCMcPct
If that is what you mean
Ah ol. I realised i was using different thingy for players. ty.
yeah. i shortened it to "plr" when definine it originally. ty anyways.
Yeah, player, p are most common I think. But anything goes
Materials is still highlighted red though? do you know what might have caused that?
ah yeah ty.
Like this: https://ibb.co/VqVr4Js ? Because that does not fix it :/
Have you imported org.bukkit.Material;?
you shouldn't create an inventory like that...
Wot lol?
use Bukkit.createInventory
oh yep sorry i was being stupid 😳
Ohh
ty btw.
I've learned that you should do it like that...ok then
np
Wait no, nvm. Inventories is a class
I was confused for a moment lol
I have a full GUI and don't want my inventories in my InventoryClick event class
ahh
whats the code for detecting when a player right clicks? sry for asking u all these questions...
didn't see the s
no it's fine :)) I get it, it looks similar
try closing the inventory maybe? (don't put it inside the scheduler though)
what's the code for detecting right clicks?
Like this: https://ibb.co/KzTJgcG. Also, I suggest watching some tutorials, also Google is your best friend :))
ah yeah ty.
Yw
is the "return" part anything special? could i just take out return and have semicolon at end of statement instead?
If it is not a right click, the function will end. The code after it will not be executed. If you remove it, it will still register left clicks
ah ok ty. the "and" isn't working? is that a java thing?
Noop, did this: https://ibb.co/cv31dDP still nothing :/
is there a different way of writing the "and" statement in java?
It basically says If the click isn't a right click, end the function. If it is a right click, continue with the code
&& means "and" and || means "or"
ah ok ty.
np
"getAction" is highlighted red? Why might that be?
Is the event type PlayerInteractEvent?
wdym?
how do i set an event type?
i don't know.
@zealous yoke this is the answer i got. I contacted the admin in dms, should i add u? So we can discuss
How can I take advantage of velocity/bungee's api to make a plugin that allows players to join my proxy and be proxied to an external server (e.g. my custom server redirects to Hypixel)?
wouldn't hypixel think that your ip is connecting everyone to that server tho?
i got security banned for using a vpn once ☹️
Sure they would but I just want to know how to do it
Hypixel is an example. I don't care if it doesn't work, I just am curious to know how to.
add the server you want as sub-server on your proxy and just send the player to that server
ah
Afaik, that only works when the backend server is exposed to the public, and also a Spigot server that has bungeecord = true
Sadly not possible as far as I’m aware, I wanted to do a similar thing where users would add a IP to their client and would get a random server on ping
there is no mf-msg for bungee, right?
It builds adventure components so you can use it on any platform that adventure supports
I'll switch to it cause using md5 component system is pain, but only tomorrow, my brain is not functioning anymore today
the md5 component system is so lacking
I would definitely start extracting things out or modifying logic to reduce indentation levels
You could also pull out your usage string into the usage of your command and just return false instead of true
<a href="store.itheriomc.net" class="item store">
<div>
<img src="img/store.png" alt="Minecraft store icon" class="img">
<p class="title">Store</p>
</div>
</a>```
This just links it to my domain.name/store.domain.name D;
Add https:// before store.itheriomc.net
thanks! 😄
has anybody ever coded a discord bot before? somethin simple, i'd like to code my own but i'm not sure where to start
just eager to hear some more about it and maybe where to start
Which language?
i'd be interested in anything, i probably can't just jump straight into a discord bot from no experience but i want to learn possibly java.
i just don't really know where to start
Most people use https://github.com/DV8FromTheWorld/JDA to make discord bots in Java
But there are others like Javacord or Discord4j
Does anyone know why even though im cancelling AsyncChatEvent, the chat message is still shown on the server? it only happens when the server is under a bungee proxy, but i dont know what do do about it
@EventHandler(priority = EventPriority.LOWEST)
public void onChat(AsyncChatEvent e) {
if(toGet.containsKey(e.getPlayer().getUniqueId())) {
Consumer<String> c = toGet.get(e.getPlayer().getUniqueId());
toGet.remove(e.getPlayer().getUniqueId());
Bukkit.getScheduler().runTask(LandGUI.getInstance(), () -> c.accept(
PlainTextComponentSerializer.plainText().serialize(e.message())
));
e.setCancelled(true);
}
}
is ur chat still handled through the proxy
How is it possible to parse time from strings like 5s - 5 seconds, 5h - 5 hours etc?
new TimeAPI("5s")
can do other shit like "5s and 10 minutes"
basically good for any human time format
Thanks, piggy!
and it is made by THE PIG himself
nice
Any good libs/guides these days for creating dynamic multi page GUIs, without the fluff?
Looking for useful libraries/frameworks?
Here are some which have been deemed useful by the community and are used daily.
-> Menus: https://mf.mattstudios.me/mf-gui/gui
-> Commands: https://mf.mattstudios.me/mf/mf-1/getting-started
-> Messages: https://mf.mattstudios.me/message/mf-msg
-> Config: COMING SOON™️
Ah thank you, any good example repos or guides on utilising it? Especially with multiple guis connected to each other etc
None of mine that are public
I got one which utilizes the guis itself, not multiple guis connected tho, but it's fairly straight forward to do that
You can take a look at this if you want I guess https://github.com/op65n/VaultManager
Hey..is there a way to check whether the crops are broken by water or like piston or so?
i think so, but other plugins have chat events cancelled on the server so im confused why mine doesnt work
I don't know if there is a better way, but you can use a BlockFromToEvent & BlockPistonEvent and check if the block they affect is a crop or not?
Is this event even ran throw in a debug
hey, i'm trying to trace a redstone rectangle and create a bounding box around it, right now I have a method to look for redstone adjacent to a location but that's about as far as I've gotten. I know I can use the blockdata from the redstone to look which blockface it's connected to, however I still don't know how to make it only work for rectangles, and how to find the opposite corners so I can make a bounding box around it, could someone provide help?
Hi there, has anyone found a way to get colored name tags? I wish to achieve something like this.
https://gyazo.com/73f3e26933de46b95fd6eb748556548c
Even with this tutorial, everything stays white. https://www.youtube.com/watch?v=UAkF-Lu2vlE
That's a 6 year old tutorial my guy
Either use packets or teams if you're talking about above head names.
idk if i could jump straight into writing a discord bot though, regardless the language. how could i just go from never coding in my life to learning java
i’m not sure where to start to learn java and i’ve been interested in it for years
how one just develops the skill i’m unsure of, so if you maybe have any good beginner sources i could read/watch, or any tips i’d appreciate it a lot
@summer ingot you could try finding a class. I learned it in high school.
it really all depends on how you learn stuff i guess. I tried youtube tutorials but I could never pick it up from that.
?learn-java
Online Courses:
Online courses are also great for learning java. Some websites that offer them are:
- Coursera - Free unless you want a certificate
- PluralSight - Great courses from what I've seen. Mostly Paid
- Udemy - Never used them myself but they seem to all or at least most be paid.
My first ever course was one from Coursera. - I can say it was pretty good at introducing me to the programming world as a whole not just java.
Oracle Docs:
Oracle docs can help a lot at learning and understanding java:
- Start with this,
- Breeze through this (skipping stuff that doesn't seem relevant like bitwise operators),
- Hit this.
They're the first three from this larger thing which you should definitely go through overall. But those three should be enough for slightly better understanding of what is happening here without feeling like a huge time sink.
That one is a small part of this larger site wherein "Essential Java Classes" and "Collections" also have good useful stuff
Other services:
Some other cool services that will help you learn java are:
As you can see there are plenty of good ways to learn as long as you're willing to invest the time. Have fun learning!
I was in the class for that at the beginning of the year, the only one they had was computer programming and it was python. IMO it was not a good class though, for about 3 weeks we were connecting blocks to each other which unless i’m missing something didn’t teach anyone anything
python sucks
my school taught visual basic to 10th grade kids and java to 11 and 12th
i’m not sure what classes i have available to me for the semester but i’d have to check
but if your school had java for 11/12 mine probably will be similar
but this is definitely where you should start. if you can't find something through your school, find a free course online.
👍🏽
school usually teaches you jack shit, atleast in the beginner classes
school taught me the basics
eclipse and maven are IDEs
which is where you write your code
maven isn't an IDE, but a build tool
^
i know maven a little because i’ve used it and still kinda use it to compile src codes
but Intellij and gradle ftw
but several people told me to use gradle
^^^
🙃
piggy has a guide
and stuff
gradle and intellij is the favorite amongst us here
IntelliJ ultimate if ur in school
I use intellij with the minecraft development addon
idk i just press a button and it builds the jar
fun
i’ll check em out
it’s honestly astonishing though, coding, you kinda just generate words and they do stuff
been trying to learn for a while know but never picked it up
Also a suggestion I can make is, if you have any friends who already know java, that they help you with it
That's how I started and it helped me remember to actually have some guidance
unfortunately i do not have any friends who speak java
i'm not sure if this is the place, but is it possible for me to install node.js 12 on windows 10
Prolly
how would i do it
the download file i got is just full of other files and i'm not sure what to do
Gotta look up a tutorial I don’t use js. I don’t see why you wouldn’t be able to install it tho
the current versions download was just a simple exe to install but for 12 i got a zip
Probably some script to run
i think i was downloading the wrong thing
i downloaded the win-64.zip
i jut needed to get the .msi
that file was the setup file
Gg
sorry Lol
wait so would you use IntelliJ to edit .js files?
what kinnda files would you be using in it
intellij is for java
so a .js file?
There is WebStorm for JS (but it's paid unless ur a student or smth), but Vsc is also perfectly fine
Yes Santa mitten will give you webstorm next xmas
but seeing this, im assuming he's in school?
so he gets it all for free
😌
Well it seems it's deprecated nowadays. https://hub.spigotmc.org/javadocs/spigot/org/bukkit/scoreboard/Team.html
This is why I was curious as to how developers are doing it nowadays
I saw there was an option to do it with commandblocks, that has been removed as well
i dont think we have any good java classes
RIP
but at least u get some cool stuff from github dev pack
hundreds of dollars worth of stuff 😍
i never got that b4
if my school had a java class tho then maybe youd get that
as long as you have a school email it works
u dont need java class
You don't even need school email, just proof that you're studying
Can someone help me i want to create a own Plot plugin and i need help at the plots and that a player can build there
i applied for it fingers crossed im accepted
i also have a java book
but idk if its any good theres a lot of pictures
btw for the "Why do you want it?", you can only just put a sentence or two
it usually takes a couple hours to get accepted, but I'm not sure if you're going to get an email
you can just go to ur github profile and check if you have github pro
i just said im interested in learning and practicing coding languages
that should work 👍
alrighty
I have the Head First Java book
players are able to deal upwards of 20k damage on our server and mojang decided to not add a cap to the amount of damage particles that will appear. We already created a texturepack to hide those from players, but that wont stop them from actually spawning in. Sometimes the particle counter can go over 10k if they smack a lot of mobs in a short period of time. Does anyone have an idea how to disable those particles from appearing entirely?
handle damage on your end not the mojang way.
Like how hypixel and others with custom "damage" handle it
player#sendTitle
ah I thought hypixel didnt have that because those particles were introduced post-1.8. Just to be clear, could having 10k+ particles per player cause performance issues, or is all of that handled on the client itself and not the server
❤️
Is there any border-type of Plugin where you can claim land and only permission X can build there?
and when you enter it, you can get a message like this '
If not, I'm gonna attempt to do it myself.

ez


