#help-development
1 messages Β· Page 2165 of 1
What can't you create yourself in it
As a developer I'd prefer not to reinvent the wheel, and it has a lot of features that are very useful from a server management standpoint
https://discord.com/invite/casfFyh
if you wanna ask there, that's apparently their discord
idk i rewrote my own essentials plugin but my server is kind of weird because it's a network and i decided to use TCP+Matchmaking servers+Redis
so essentials is useless to me
Essentials is not the wheel it would be the aesthetic wheel cover
i mean i personally never use any public plugins except worldedit
There's nothing wrong with using essentials. It's just that if you are developing your own server, you are likely going to run into issues/limitations with essentials, basically forcing you to rewrite it so it fits your needs.
because worldedit would be hell to recreate
ehhh im kind of mixed now on public plugins.
the only plugins i use that are public is denizens and itemsadder
itemsadder for custom models/items/blocks/gui and denizens for npcs with custom models
because im not gonna fuckin do all that NMS shit, hell no
π
oraxen exists but it uses the NMS where itemsadder uses packets so itemsadder is way faster in my experience
even currently recreating my own discordsrv alternative, because discordsrv has so much stuff that annoys me
despite closed source
you reminded me i should continue this (this is designed to work on multiple servers btw, fabric and spigot)
alltho my bot is bascially only there for verification (whitelisting) and the console sync
i implemented lwjgl 3d head rendering and then i realized it needs an actual gpu to run
all the other stuff from discordsrv was either buggy, or unneeded
as in you hate writing gl rendering?
same lmao
π₯° beautiful tho
these are old screenshots, its evolved
i need to finish my finals and finish this plugin
mine's just working, nothing special
one sec
you send him a random generated code, and it saves your uuid to a config file
thats all
Riku your GitHub page is so π
cool
linked users send as their actual pfp
non linked users send the image of their mc head
i got to the point where i had to re-think about the console thing lol
https://github.com/JSH32/DiscordLink/tree/master/core/src/main/java/com/github/riku32/discordlink/core/framework also basically ended up writing a crossplatform framework interface (and spigot impl) for plugins
including my own eventbus and DI and command framework (with annotation autocompletions)
because it would spam the discord thing and make it rate-limit all the frickin time
i kind of regret not doing this in kotlin tho
What if you add those to one large embed and when the description limit is reached it starts building another one?
can we all agree on the fact that discord's rate-limit is completely trash?
yes
i know the dev of https://pylon.bot/ (really cool v8 embedding made in rust btw). They had to actually make a load balancer/bridge for discord ratelimits
lemme find the doc page on it
Maybe slack is better xd
well i just found out how to detect the console output
and just disabled the sync for certain messages
which are likely spammy
its not OSS but there is a gateway wrapper that wraps discords gateway and works over multiple servers
so its kind of like a rotating proxy/better discord API so you dont need to constantly rewrite shit
i think i may start making more plugin stuff again. only did clientside stuff for like half a year now
the only time i can get motivated is with shit like custom models and stuff like glyphs and the magic post 1.14 resource pack stuff
the problem is, im not an artist and can't actually make the content, just the code
π€‘
exactly same
i made a mod with custom cosmetics which are free
but uhhh
it only has wings and capes
fuck, i'm no nitro anymore fml
only because i'm not creative enough to create own models
i stole it from you
you bad person...
want it back? :o
i miss my pink name in here tho
pink is best
^
Is it possible to replace a column name in a mysql query using the ? syntax?
E.G. String query = "UPDATE indicators SET ? = ? WHERE uuid=?";
Cause I'm running into an issue with it. Currently my workaround is to do this. However, this seems like a fancier version of string concatenation.
String query = "UPDATE indicators SET %test = ? WHERE uuid=?".replace("%test", type.getValue());
how do i go through an arraylist in a yml file?
Depending on the type of list, you can call FileConfiguration#getStringList() or FileConfiguration#getIntegerList()
Apparently there is also a generic #getList()
can someone explain me why this error happening? The files are there! https://paste.md-5.net/lorinujafo.java
H2 drivers aren't provided by spigot. You will need to depend on an external library. Take LuckPerms for instance, it downloads extra libraries in it's plugin folder and uses them to run. H2 is one of the libraries.
this fixes the error?
I mean, your error says that no suitable driver was found so, yea, it should.
What's wrong with it though?
what
What's the issue you are having with it?
the one in the link
Yes... what's the problem with it though?
You tell us. You posted the image. Are you not able to use the code from the repo? Is your code not executing? What is the problem you have?
DriverManager.getConnection(the url) returns null and it is because the database cannot connect
i copied it from the page
like he did in the tutorial
let me check what his text said
It should be compile if you want it to be in your final jar.
^^
xd
how did it work for him :V
how old is the tut?
did he make a plugin?
yes
well idk why it worked for him but did that fix your issue?
i mean, you could try using Class.forName("com.mysql.jdbc.Driver");
which may fix it
it did for me at least
for me not but i have'nt the maven dependency so maybe
i see
i am restartingπ
now i'm even more confused, thanks
if you mean slots, no
You don't.
π’
they're clientside
you can make a triple chest xd
Well, you kinda can, but it breaks the UI.
ok i guess i will just make the player invenotry big π€
It just overflows to where the next row would be.
he told nothing about the UI
ight how does one add slots to a player inventory π§
nope
not at all
it's straight up impossible
imposible
what!
it is : (((((((((
disaster
yes
how would your client want to detect those extra slots to render them
if they don't exist in the base game
magic
-_-
:>
not my problem twizzy π― π€
yashboi make the inventory scrollable
you can't mess with stuff that is limited by the client
code goes into complier box and commands work
with pages
you have to believe in magic sometimes >:C
An Inventory size can be defined when you create it. Multiples of 9. But those are custom Inventories not attached to objects. you have to manage opening them yourself
magic doesn't exist
it does
imagine believing in things pff
woah :o
that didn't fix my issue btw : (
sorry
changing it to compile
i looped through a getStringList arraylist
thanks
he wanted to add more than 54 apparently
unfortunatley i tried this but it didn't work
xd
54 is the max size. You could create a paginated Inventory (in code) but its not that easy to do
ohhhh
hello
i mean, you can also just create 2 inventories, and then add an item to the last slot to switch to the second inventory
28
36
counting the offhand
π§
oh i see
9 * 4 + 1
how 46 what
if you include crafting and armor
36 + 1 + 4 + 4 + 1
hmm ok then i will just add another 9
Oh sorry, 37 is the size
crafting ;v
crafting is not storable
i overflowed da ting with 36!
unless using a modified client
shadow my problem not fixed ;(
that wasn't the question
36 (inventory slots) + 1 (offhand) + 4 (crafting grid) + 4 (armor) + 1 (cursor)
That code didn;t work because you forgot to cancel the event
It looks like you tried to override the player opening an inventory to open your own
You can't place items in the crafting grid with the api can you?
oh facts
thanks elgarL you helped me yesterday too
the cursor is an extra slot? lol?
π
didnt know that
You have to cancel the event else it will still open the inventory and close yours
It could be used for one yea.
i mean you can store stuff there if you dont send the close packet
btw you forgot the crafting result field
Thinking outside the box a little.
-_-
that doesnt technically count
since the item isnt real yet
Yea, but it has to be done manually.
but it cant store anything
thats true
thoughts?
Refer to my post about H2 not being included as part of spigot.
wat
event.setCancelled(true);
what!
faster hehe
my bad
Anyone know about this one?
nope
Hey so is there a way I can make the message with getLogger().severe() to be an exception? For whatever reason I cannot get it to work without errors
hes fine
Well it's normally reserved for errors, but you should be able to just call getLogger()#severe() and pass in a string.
Yea but even if I call toString() on the exception it creates an error but when I put in any other string, it works fine
Well if an error is being thrown, you need to catch it to prevent it from spewing out the stacktrace.
ah i see
so the message is just the first line basically
and the stracktrace is like 20+ lines
anyone got an OSS plugin that does custom entities from models?
Oraxen is only item and block atm
And the problem with modelengine is that it basically requires mythicmobs to run which i dont like
and itemsadder is severely limited in its java API
So I've been kind of spit balling here trying to make a custom teleport plugin where the functionality is to have a teleport request sent from playerA to playerB and where playerB has to then accept it for playerA to be teleported to playerB
import org.bukkit.plugin.java.JavaPlugin;
import static me.nuclearkat.customteleport.PlayerReceiver.playerb;
public final class CustomTeleport extends JavaPlugin {
@Override
public void onEnable() {
System.out.println("Custom teleport plugin starting up!");
getCommand("tpr" + playerb).setExecutor(new TeleportCommand());
}
@Override
public void onDisable() {
// Plugin shutdown logic
}
}
This is my main class
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.UUID;
import static me.nuclearkat.customteleport.PlayerReceiver.playerb;
public class TeleportCommand implements CommandExecutor {
static ArrayList<UUID> Player_UUIDs = new ArrayList<>();
static org.bukkit.entity.Player Player;
static UUID playerA = (getPlayerA().getUniqueId());
static UUID playerB = (playerb.getUniqueId());
public static org.bukkit.entity.Player getPlayerA() { return null;
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
Player playerA = (Player) sender;
if (sender instanceof Player){
if (playerA.hasPermission("customtp.teleport")){
if (getPlayerA().performCommand("tpr" + playerb.getUniqueId())){
playerA.sendMessage(ChatColor.DARK_AQUA + "You have requested to teleport to " + playerb + "!");
}
}
} else {
playerA.sendMessage(ChatColor.DARK_RED + "You do not have permission to use this command!");
}
return false;
}
}```
what the fuck
this is the playerA send request
getCommand("tpr" + playerb)```
what is `playerb`
one more class to send
hi
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.plugin.messaging.PluginMessageRecipient;
import java.util.UUID;
import static me.nuclearkat.customteleport.TeleportCommand.*;
public class PlayerReceiver {
static Entity playerb;
UUID playerB = (playerb.getUniqueId());
public static void messageReceiver(PluginMessageRecipient recipient, CommandSender sender) {
Player playerB = (Player) recipient;
Player messageSender = (Player) getPlayerA();
Player_UUIDs.add(playerB.getUniqueId());
if (playerB.isOnline()){
playerB.sendMessage(ChatColor.DARK_AQUA + getPlayerA().getDisplayName() + "has requested to teleport to you!");
if (playerB.performCommand("tpa")){
getPlayerA().teleport(playerB);
} else if (playerB.performCommand("tpdeny")){
getPlayerA().sendMessage(ChatColor.DARK_AQUA + "Your teleport request to " + playerB.getDisplayName() + " has been denied!");
}
}
}
}```
that's not how it works
how to make crops can't grow in bukkit?
this is where I define playerB
as well as add the functionality for playerB to accept the request
when sending the command, save both player's in a hashmap (the request sender as the key), then when the player accept's a request, do the teleport stuff
which you apparently already do
static initializing Player object and then trying to use (while initializing)
can someone help plz
what get's my mind blown is this
getCommand("tpr" + playerb).setExecutor(new TeleportCommand());```
i'm pretty sure he doesn't want to run `/tprplayername`
and if so, you would need to register a new command for every player
which would be dumb, and probably even impossible
Hmm
I was thinking this project would be a lot less complex than it is
and dont judge that line, I'm very new to the spigot api and java as a whole
you register a command with getCommand("baseCommand")
have you type
commands:
tpr:
``` in plugin.yml?
while basecommand is just the one after the /
yes
you don't register it with arguments
@Eventhandle ?
so how do i define baseCommand?
that wouldnt work
because he registered tprplayerb in his main
This is never going to work```java
static UUID playerA = (getPlayerA().getUniqueId());
static UUID playerB = (playerb.getUniqueId());
public static org.bukkit.entity.Player getPlayerA() { return null;
}```
that's not his main problem lol
Like I said, new to the spigot api so just throwing ideas into code
It is, it will NPE as soon as the class loads
lookup some command tutorial on yt ig
the plugin won't even enable
because of the tprplayerb command
yes, everything is broken
It does enable, it just doesnt work as far as functionality goes
due to design
version: '${project.version}'
main: me.nuclearkat.customteleport.CustomTeleport
api-version: 1.18
authors: [ NuclearKat ]
description: Custom player to player teleport command
commands:
tpa:
tpr:```
with this code and this yml file, your plugin shouldn't enable
Well it does
except you run a very old mc version which i dont know about
wdym old?
With that code it will thrown an NPE at startup and disable
hey bro i have an queston what happend to your plugin it not work right or somethings error?
...
on enable, you register the command /tprplayerb
which isn't in the yml
which would straight up crash the plugin on startup
im not sure what to tell you
i suppose you want to have something like /tpr <playername>
Would that include the hash saving of player names?
then you would in your mainclass register it just with getCommand("tpr").setExecutor(WhateverExecutor());
wdym lol
as in saving the player name in a hash
so not just 2 people can use the command right?
give me a sec and i can think how to word this
So with the hash I do something that whenever playerA sends the request, the hash will save playerA and playerB's names, then if playerB accepts the command it will teleport playerA to playerB
Or would I even need to do that?
And I looked back through the console you were right, the plugin never enabled, but it showed up green when I did /pl
gimme a bit
Are you writing what will work?
I wasnt sure if you'd be able to send messages to me or not, I'm tired and need to go to sleep
i'll just ping you in here
ok, is this channel active?
wdym active
do people talk here a lot
just check your discord mailbox lol
@worthy yarrow
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player p) {
if (args.length == 2) {
if (args[0].equalsIgnoreCase("request")) {
if (Bukkit.getPlayer(args[1]) != null) {
Player target = Bukkit.getPlayer(args[1]);
map.put(p.getUniqueId(), target.getUniqueId());
p.sendMessage("Request sent.");
target.sendMessage("You got a teleport request from " + p.getName() + ". Accept with <whatever is your accept command>");
} else p.sendMessage("This Player doesn't exist, or isn't online.");
} else if (args[0].equalsIgnoreCase("accept")) {
if (Bukkit.getPlayer(args[1]) != null) {
Player target = Bukkit.getPlayer(args[1]);
if (map.containsKey(target.getUniqueId())) {
target.teleport(p);
target.sendMessage("You were teleported to " + p.getName() + ".");
p.sendMessage(target.getName() + " was teleported to you.");
map.remove(target.getUniqueId());
} else p.sendMessage("You don't have any requests from this player.");
} else p.sendMessage("This Player doesn't exist, or isn't online.");
} else p.sendMessage("Syntax: /tpr <request|accept> <player>");
} else p.sendMessage("Syntax: /tpr <request|accept> <player>");
} else sender.sendMessage("Please run this command as a player.");
return false;
}```
in your main, register it with ```getCommand("tpr").setExecutor(new YourCommand());```
and in your yml put ```yml
commands:
tpr:
to be safe, remove the target from the map when they leave the server
Thank you I really appreciate it
would any1 here know of some kind of service that would let me visualize data through a rest api or something?, bassically like bstats but have your own charts, diagrams etc.
I use event.getEntity().getKiller() in EntityDeathEvent and it returns null when an denderman kills an endermite
tf?
An enderman isn't a player
but isn't this event for all entities?
The event is. Get killer is for players only
ok so how do I get the enderman?
last damage cause
^^
in EntityDamageEvent does event.getEntity() return the entity that got damaged or the entity that was damaging?
?jd-s Please use the Javadocs
(It's the damaged entity)
InventoryClickEvent only fires for external inventories e.g. chests. What's an event with the same function, but for player inventory?
it does work on player inventory no?
It should
check if the inventory is an instance of player inventory
i think thats an object
dont quote me on that tho
It only works if I'm in a chest
Make sure to listen to the drag event too
If I just press e, the items are not deleted
But if I go into a chest then click the items, they are deleted
Why's that?
Because the click event isn't fired when you drag items around
u can check if the player has something in their hand
Why would they be? The server doesn't know you opened the inventory
Fair point, but this is a click event, not an open event
I don;t understand how the server would miss that
How can you drag it without clicking?
Is there some mc feature I don't know about here lol
InventoryDragEvent
Oh that's called a drag event?
if you move the mouse a bit on the same slot it's also a dragevent although its only one stack
O ok I didn't know about that
Either way I might just do this
hi i think the plugin i have made does crash my server
bacus my server crash after som hours Pls help me
how about you start by sending some errors it gives you when it crashes
there's the ?ask command for that
i think there was something akin to ?nowork
yes that was my invention lol
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
that's the best command i've ever seen
you it can be used like 20 times per day in this channel lol
anybody know how to add Claimblocks inside a Vote crate?
i blindly believe that
we shall use it 20 times then
is that a coding question or a question about existing plugins?
existing plugins
I just wanna add like if a player opens a vote crate they can get 1000 claim blocks as a reward
and the other junk too. like swords and blocks etc
no one in here knows your plugin's code base
ExcellentCrates
Is there any entitydie event?
EntityDeathEvent, PlayerDeathEvent
i love such questions
then ask on their discord
this channel is for coding your own plugins
Thanks i was able to find PlayerDeathEvent but could not enntity
most of the time they come from eclipse users, who don't know that ctrl+space exists lol
they got a discord?
damn gg to you lot for coding ur own plugins
idk anyway this is the wrong channel
yeah true but I doubt they'll get any useful answer there
and how can we get the killer
LivingEntity has a getKiller method
suggest it on the forums
now
?tas
oh
tf
Sadly it doesn't embed it
tas is a weird command
It is speedrun stuff
i know
thanks sherlock
i think thats what it stands for
try and see is more likely
basically baritone lol
i love it when i cant join a discord server because it's full
1 million members... fuck my entire life
Does PathFinderPetGoal class exist in mojang mappings?
if it doesn't exist, then it simply has another name
yeah and thats what im looking for
since i cant find it
also whats the name of EntityCreature in mojang mappings?
might be PathfinderMob
to find it, I looked at the CraftFeature class and there you can see that it stores a PathfinderMob
basically you can find most of the proper NMS names by just looking at the corresponding CraftWhatever class
e.g. a NMS world is called ServerLevel. You can find that out by looking at CraftWorld. The second field stores a ServerLevel, so that's your NMS name
hey how can i any random spawnEntity after player breaking a block
have a list with all entity types and randomly get one of them could be a solution
not sure if you can directly get a random entity type
oh nvm EntityType.values() and get a random index from 0 to length - 1
BlockBreakEvent I believe
but i cant able to do
what have you tried?
there is no option to spawn any entity
get the world the block is in and call spawnEntity
public void onBlockBreak(BlockBreakEvent event) {
event.getPlayer().setHealth(20);
Location location = event.getPlayer().getLocation();
}
like this?
then call EntitySpawnEvent function?
the EntitySpawnEvent is an event like the BlockBreakEvent which is called when an entity spawns.
you have to get the world from the location and then call the spawnEntity() method on the world in order to spawn a new entity
i didnt get what you are saying
get the world from the location?
can you please explain?
ah...
i wish @Cleanup was an intellij annotation instead of a lombok one
what does that even do
inserts a try with resources iirc
@Cleanup Connection conn = getConn()
will be closed afterwards
hey how can i turn this off
simple question, ive been looking for how to disable it, but nothing seemed to work
you have to put in a @SuppressWarnings
where?
no
ignore it
Thats an IDE warning not a code error
or just check for null
check for null, or add an assert statement. assert will be ignored at runtime
so how do i make an assert statement instead of checking for null?
nvm
ill just check for null
Either way you have to assign the value to a variable to be able to check it
when I'm sure it wont be null I just annotate the method
whats assert even doing?
nothing
ah nice
thank you
same thing as ObjectsRequireNonNull or whatever. never seen it do anything
an assert is ignored at run time. during debug it stops the processing if it fails
np
can i disable it globally?
probably
player.getInventory().setItem(7, null); why doesn't this remove a player's leggins?
thats the targets a SuppressWarnings annotation can have
try updating the inventory after
wdym? it setItem(), shouldn't it update it automatically?
Thatβs not true
call update() on the inventory
requireNonNull is fail fast
in terms of warnings that are shown in the ide i meant
in my experience it usually just makes the code less readable but it does suppress the single warning yeah
Wut
how does it make code less readable
Like you usually call requireNonNull on incoming data such as on parameters
Or if you wanna lightly assert a variable wonβt ever point to null at a certain point of time
of course readability is relative, but it suggests it on a lot of things which usually make my if statements longer
damn, theres no arguing with you is there XD
π π π
you win
as revenge:
when I set a block to air how can I prevent that block from dropping what it was before?
not sure what you mean
I do this: location.getBlock().setType(Material.AIR) but the block that was in that location drops its item. How can I prevent that?
it won't drop anythign when set to AIR
that shouldnt be happening yeah
it only drops if you do a breakNaturally
why there items then hmmm
possibly another bit of your code or so?
ohhh its cause it breaks the blocks under the carpet first
and it drops before it gets set to air
thank you all
use setType(Material.AIR, false)
I thknk thats the one
No physics updates so nothing attached should pop off
can anyone tell me the difference between?
if(entityExplodeEvent.blockList().stream().map(Block::getType).toList().contains(Material.CHEST))
and
if(entityExplodeEvent.blockList().stream().map(Block::getType).collect(Collectors.toList()).contains(Material.CHEST))
The first one is immutable list and the second one is mutable list, cmiiw
thank you!
an uuid is a varchar(36) right?
32 but displayed in five groups separated by hyphens, so 32chars + 4 -
ok
that would throw unchecked cast warning
@SupressWarning ftw
i did SupressWarnings("all") once π³
I do that all the time

Hi team, i've one question, I have an InteractEvent on a door, I discover that door have two part x) on bottom part and one top part, how can i get this two part in my condition ?
Yes I've already found that
why asking it then?
if you have the Top you getRelative(BlockFace.DOWN) to get the other
java can be wonderful
unchecked cast?
ye
Yeah, its not that intelligent
wondering the same thing
I wonder if thats just a stupid ide warn
You can get rid of the cast need with throws Throwable
public void sneakyThrow(Throwable t) throws Throwable {
throw t;
}```
then you will have to add a try catch around that method
The throws E is needed to get rid of the try catch enforcement
ah
using it like this
Still a bit concerned why you use sneaky throws there
Just throw a new runtime exception that wraps the sql exception
cuz theres a cf wrapped around it which catches exceptions
that would do the same thing ye
When will event handlers support type parameters?
wdym?
Like this
if PacketEvent has type parameter of ClientboundUpdateTagsPacket, then I shouldn't have to use an if instanceof statement
It just seems dumb
What does e::getPacket return?
just do PacketEvent<?>
the packet object, type ClientboundUpdateTagsPacket
Myeah no need to check for instanceof then?
No I do
because the event fires for other packet types
even if the type parameter is ClientboundUpdateTagsPacket
Oh
Is that a bug?
Might wanna ask retrooper about that then
But fyi bukkits system doesnβt support it by default
Aw
Youβd have to register a custom event executor
love how clean it is
What make org.spigotmc.minecraft-server.jar in maven local?
I've tried BuildTools and Spigot maven install but either didn't make it.
minecraft-server.jar is not a spigot product
you either get the minecraft-server.jar (vanilla server) via the minecraft launcher or you get the spigot server jar via buildtools
Just a question whatβs CLASS::new ?
a supplier
or a runnable
Supplier<MyClass> s = MyClass::new
new Supplier() {
@Override MyClass get() {
return new MyClass();
}
}
discord hates me lol
i mean yeah but itβs just a warning
- you can do @SupressWarnings(βuncheckedβ) or whatever itβs called
i've never heard of the Generic<T> class
BungeeCord
How to get Offline Player without using Mojang API ?
There is no such thing as an OfflinePlayer in Bungeecord
Ye I found that
But is there some option to get somehow from Servers under Proxy those players?
Have a plugin on the spigot server
You could use PMC to query each server
Whats the reason for this? It sounds like you are viewing things backwards
hi, please tell me if there is a method in Spigot that returns a list of the names of all players on the server?
nope
Bukkit.getOnlinePlayers()
just an example class
get list of all online players, go thru it and store names in another list
no actual method just for that
Set<String> playernames = Bukkit.getOnlinePlayers().stream().map(Player::getDisplayName).collect(Collectors.toSet())
idk if theres a Player::getName
and elgarl
hi
there is
it is
probably `Bukkit.getOnlinePlayers().stream().map()...
Fourteen beet me to it
DisplayName is a nick pretty much
ha
how do I send a message?
Okay, I got it. It just wouldn't be rational to run a loop on Bukkit.getOnlinePlayers() every time I need to get a list of players
Player#SendMessage(String)
Bukkit#BroadCastMessage(String)
DIscord COnnection
Im doing checks regullary if user on discord has the correct roles as they should have based on their Roles
i would say keep track of the joining and leaving players and add their name in a collection
how often would you do that?
why do u have to make things this hard
?
@fallow violet ur very fluffy 
thanks
shouldn't that be a spigot plugin?
It also contains moderation tools
And, the in game ranks are from a perms plugin right?
yes
public static ItemStack makeSkullItem(String displayname, String owner, int amount, String... lore) {
ItemStack item = new ItemStack(Material.SKULL_ITEM, amount, (short) 3);
SkullMeta meta = (SkullMeta) item.getItemMeta();
meta.setOwner(owner);
meta.setLore(Arrays.asList(lore));
meta.setDisplayName(displayname);
item.setItemMeta(meta);
return item;
}```
any way to add custom skull texture here?
u can send a message by pressing the enter button
you don't need the actual player/offlineplayer every time to check their ranks
imma get it on Server Start
well no i must write it first
I'm overriding the tabComplete(args) method in the org.bukkit.command.Command class
I don't know yet how often it will be called
Yeah if it's for args it should be updated every time it's needed
i would keep track of all the player names of the server
anyone help pls
and add/ remove when someone joins our leaves
with what?
a what
cockroach
eww
dont want to translate that
wat
i did :c
too unnecessary for a tiny tiny bit of maybe performance
And I'm Sorry. I forgot that I already have a HashMap with keys for each of the players in my project
stop overcomplicating things
also this
how 2 add custom head textures
or skull textures
@twilit roost so, i've looked thru luckperms api, you can store user uuid in a database with their discord id and when needed, u can check their perms by creating a User object from their UUID
?
like
oooh
that would be helpfull
Please link
texture id?
when I was trying to set Texture to skull
I needed just 1 singular google to find it out
i dont think that you can set a custom texture
tf
oh no way
i cannot understand you, you are writing random shit
public static ItemStack getCannonBall(){
String url = TextureConfigManager.getConfig().getString("cannonBallTextureURL");
ItemStack head = new ItemStack(Material.PLAYER_HEAD);
if (url.isEmpty()) return head;
SkullMeta skullMeta = (SkullMeta) head.getItemMeta();
GameProfile profile = new GameProfile(UUID.randomUUID(), null);
profile.getProperties().put("textures", new Property("textures", url));
try {
Method mtd = skullMeta.getClass().getDeclaredMethod("setProfile", GameProfile.class);
mtd.setAccessible(true);
mtd.invoke(skullMeta, profile);
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException ex) {
ex.printStackTrace();
}
head.setItemMeta(skullMeta);
return head;
}
this is what i used
replace url with url for the texture
its working?
yep
holy shit nice
^
u use this "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDhiZWUyM2I1YzcyNmFlOGUzZDAyMWU4YjRmNzUyNTYxOWFiMTAyYTRlMDRiZTk4M2I2MTQxNDM0OWFhYWM2NyJ9fX0=:
to add
ikd
ASPAS
like
im more confused right now
custom skull texture
In this Episode we deal with getting custom textures on skulls!
Head Database: minecraft-heads.com
Plugin.yml: https://pastebin.com/xkCKMwRz
Main Class: https://pastebin.com/AwUnCchF
Heads enum: https://pastebin.com/0cZFsUMq
Music: http://www.purple-planet.com
For cheap advertising, for ever...
dis video
thing
now we are getting soemthing
it looks like it will work only for Spigot tho
so PMC will still come in handy
imma send website for u
so whats the problem? @quaint mantle
https://minecraft-heads.com/custom-heads/search?searchword=cannonball
here's my last search
On Minecraft-Heads.com you can find more than 30.000 custom heads, which can be used to decorate your world! The collection is seperated into two databases: the first contains custom heads, which never change their texture, using the Give-Codes from Minecraft 1.8+, the second one includes player heads which can be used in all Minecraft versions.
my code is given above
the hash?
you should be able to upload custom texture
sure thx !
5:20
wat
Just keep in mind that spigot 1.17.2+ has dedicated API for this
^
IK HE IS I TRIED REMOVING THE LINE
AND THE ENITRE CODE JUST COMIITED DIE
?jd-s
but
no but
String Preofix
idk just do it
can I use this
public static ItemStack makeSkullItem(String displayname, String owner, int amount, String... lore) {
ItemStack item = new ItemStack(Material.SKULL_ITEM, amount, (short) 3);
SkullMeta meta = (SkullMeta) item.getItemMeta();
String idTag;
String prefix = ""
meta.setOwner(owner);
meta.setLore(Arrays.asList(lore));
meta.setDisplayName(displayname);
item.setItemMeta(meta);```
and yes
there is a } brloe
below
forgot to enter it
okay?
that is not how you do it
okay
wat
Use the player profile API if you are using 1.17
Uhm display name lol
And if you are using 1.12, get the fuck out
1.8 o7
1.17+
wait
Lmfao
Even worse
HEHEHHEHEH
Bruh good luck
lmao
No support given given that you NEED to use NMS with these versions
thanks
Protip: Use mojang's GameProfile API
There is not but, you need to use it
okay dude. Can you write in one sentence what do you want and whats the problem?
a custom mob head texture
do you mean as a skul?
not a player head thing
There are prob skins online you can 7se the base64 idk if it works in 1.8 tho so that's a use problem
Yea just find a skin and use the base64
make a skull and then put it on the mob
^
Idk I don't use 1.8 that's a you problem
go on youtube maybe i cannot help with that
what version was pdc added?
I tried
1.14
1.14 iirc
ok ty
what is pdc xd
?pdc
ah i know that
you can set the owner of the skull to get the player head texture
hm
I'd reccomend using base64 string tho
2nd screen lmao
nope?
ok
i have my ipad as the 3 screen
wtf
^
tf have u been on intellij
for 13 hours
:>
bro im broke
You know that
my mom was about to disown me
wat dat
i must use the time i have :>
Don't go Apple and save yourself 70%
wat
yes
I'm always lurking :)
da fuqqq
Why'd you ghost ping him
stalker alert
Is there a way to remove the plugin namespace before a command for my plugin specifically
instead of having to disable it for the entire server
Why do you need that
^
If you are replacing an already existing command you can replace it in teh command map
Not recommended, but you can
Its just that my command matches the plugin name, and I've seen other plugins do it before
its mostly for asthetics
why?
π«
Explain better
o.o
tell
I am a Boeing AH-64 Apache
private static void InteractShop(Player plr, Action action, ItemStack item) {
if (action == Action.RIGHT_CLICK_AIR || action == Action.RIGHT_CLICK_BLOCK) {
Inventory ShopGUI = Bukkit.createInventory(null, 18, "Shop");
ItemStack tnt_item = UtilsItem.createItem(Material.TNT, 1, "Explosion");
tnt_item = UtilsItem.addItemFlag(ItemFlag.HIDE_ENCHANTS, tnt_item);
tnt_item = UtilsItem.addEnchant(Enchantment.ARROW_DAMAGE, 1, tnt_item);
ShopGUI.setItem(1, tnt_item);
plr.openInventory(ShopGUI);
}
}
public static void init(PlayerInteractEvent event) {
Player plr = event.getPlayer();
Action action = event.getAction();
ItemStack item = event.getItem();
if (item != null && item.getType() == Material.IRON_AXE) {
InteractIronAxe1(plr, action, item);
} else if (item != null && item.getType() == Material.DIAMOND_SWORD && item.hasItemMeta() && item.getItemMeta().hasDisplayName() && item.getItemMeta().getDisplayName().equalsIgnoreCase("Epee cheat")) {
InteractEpeeCheat(plr, action, item);
} else if (item != null && item.getType() == Material.CHEST && item.hasItemMeta() && item.getItemMeta().hasDisplayName() && item.getItemMeta().getDisplayName().equalsIgnoreCase("Shop")) {
if (item instanceof ItemStack) {
InteractShop(plr, action, item);
}
}
}
``` How can I check if the chest was created with a plugin and no a normal craft?
Just don't
my brain is running at 2 fps
so I can sit on u o.o
ew
you will never get help from me again
Shh, no spam while there are active questions
omg sorry sorry π π
no
sry
The simplest method is to apply meta or a PDC flag to indicate its custom
ItemMeta?
Like hide enchants?
move to general don't spam here
PDC ?
?pdc
?pdc
tf is pdc
This
bro im a boomer
lmao
wtf
Tab complete shows /plugin:command and /command because the plugin name is similar to the command. It is possible to disable this for the whole server, but I would like to do it for my plugin only. The plugin will be used on a private server, so I don't particularly care about convention.
i sent you a link how to use the event api yesterday
When placed a Chest also has a TileState so it also has a PDC. you can transfer that to the block once placed
And "pluginInstance" is ?
Just modify the tab complete List
