#help-development
1 messages · Page 600 of 1
^
Well you can still access the index of the list if you want a specific one
yes but you need to still pull all of the list
This is where I've gotten
Which outputs this
The list is "pulled" onEnable anyway. Configs are cached
It's updating all of them.
not saying your way is incorrect just pointing out the advantage of the other way
Yeah you don't have a section. You have a list
yes in config, but they are not an object
So you have to update a list index
They are a LinkedHashMap<String, Object>
still an object that isn't created automatically
I think it is actually however I could be wrong about that. I'd imagine the caching is object based and not string based
How I can create a list for if (block.getType() == ) { for all sign exist on minecraft ?
Tags ? Sorry Im new in Java ^^'
i can copy and paste correctly, totally
questionable link lmao
😂
i was just telling someone to watch it
tom scott is in it
So I do if (Tag.ALL_SIGNS.isTagged(block.getType())) ?
yeah
Ok thanks you !
It's updating all of them.
Instead of making a new one
ConfigurationSection section = ...;
int nextInt = section.getKeys(false).get(section.getKeys(false).size)) + 1;
//set
``` could probably save the key value i just cba to type it out
https://minecraft.fandom.com/wiki/Item_repair are there any items missing from this for newer updates?
or even just do getKeys(false) .size + 1
okay
so
i got this doodoo code dont worry ima redo it
@Override
public void run() {
Map<UUID, Map<Material, List<PlayerGenerator>>> generators = GeneratorHandler.getPlayerGenerators();
generators.entrySet().stream()
.filter(entry -> Bukkit.getPlayer(entry.getKey()) != null)
.forEach(entry -> {
Map<Material, List<PlayerGenerator>> playerGenerators = entry.getValue();
playerGenerators.forEach(((material, playerGenerators1) -> {
final int size = playerGenerators1.size() - 1;
final PlayerGenerator generator = playerGenerators1.get(size);
final Location location = generator.getLocation().clone().add(0, 0.6, 0);
final ItemStack item = getFormmatedItemStack(generator, size);
Bukkit.broadcastMessage(item.toString());
new BukkitRunnable() {
@Override
public void run() {
Item i = location.getWorld().dropItemNaturally(location, item);
i.setVelocity(new Vector());
}
}.runTask(plugin);
}));
});
}``` whenever the map is at 1 item it wont drop anything. `item.toString()` shows `COBBLESTONE` which is right but whenever i do `Bukkit.broadcastMessage(i.toString())` on the other thread it wont drop. It only works if there's 2 or more things in the map
and i can't figure it out
whats the most efficent way to make an armorstand move along a certain block? ill probably have quite a few armorstands
does anyone know of a resource on formating the data from this minecraft command: /data get entity ToastARG. Holds all the data on the player including the PDC and I need to look through it all, but it looks like shit and cant read it.
use a List<Map<String,Object>
then retrieve it using getMapList
nvm, google docs works pretty well ish.
is it not just nbt @zenith gate?
Why is my IntelliJ crashing every 20-30minutes completely randomly
Got an example for that, i have no idea what that does tbh. what is that and what is it called
Getting the same issues
idk i think idk what nbt data looks like lol.
uninstall minecraft development and 2 bytecode related plugins that i forgot the names of
yeah, i’m pretty sure you are looking at the SNBT data
there are probably online viewers for it
you cant run bukkit methods in an async environment
where is he running smth async ?
he is syncing it with main thread infact
[16:18:28] [Server thread/INFO]: Left enchantments: {}
[16:18:28] [Server thread/INFO]: Right enchantments: {}
Why is leftEnchantments == rightEnchantments evaluating to false
he said whenever he does Bukkit broadcastMessage it wont drop
They're both Map<Enchantment, Integer>
.equals
What is the difference between them
== compares instances
one is checking reference, and other values
== compares memory location, .equals can be overridden to compare values
Should I always be using .equals for stuff
not always
if you want to check if its same value, yes, if you want to check if its same object no
also you probably already figured, but you can't call .equals on primitives
Hey, I'd like to ask if this is a correct way to check someone's inventory
player.getInventory().getSize(), because despite if a player has something if his inv is empty, it outputs 41
how do I get a NMS BlockState from a Material since byId is depprecated?
because player inventory always have 41 slots
what exactly you want to check
a player object doesnt have pronouns
there is Inventory#isEmpty
Player as in the living thing behind the screen, but sure xD
Thanks
still need help with this if anyones got any idas
configurationSection called "nextInt" doesn't exist
why are you setting nextInt to nextInt?
and why are you looping through spawner.getKeys(true) and in the loop checking if spawned.getKeys(true) contains the current key
thats just r
redundant
Im essentially trying to save a spawners coord when a command is ran to prevent players from setting it twice
set(nextInt + "x"
When I start dealing with configs I lose brain cells
calling set(nextInt, nextInt) wont make a config section
there isnt really a need for it, just call spawner.set(nextInt + ".x", value)
check ur code
you do it every loop
why are you even looping
public void saveNewSpawner(FileConfiguration config) {
ConfigurationSection section = config.getConfigurationSection("spawnerlocations");
int nextId = section.getKeys().size() + 1;
spawner.set(stuff);
save
}
Ah truth be told I dont know lol I thought that was the only way to check ids
how do I add an enchant to an item that isn't usually enchantable
FOR EXAMPLE: a stone block
Set the final param to true
Works perfecylt thank you @remote swallow
hey, i made a plugin on paper, but my server is using spigot, can i use it anyway?
@remote swallow Okay epic final question
How would I check if it exists at any of those locations
This is what I got
Possibly. If it uses paper specific api then no
the thing is, i tried loading in but it gave me an error, while in a paper server it worked just fine
and i dont remember using any specific paper api
Then it probably uses paper specific api
let me see
lol, i got a class from paper imported automatically
i thought paper made compatibility to and from spigot
paper supports spigot plugins
Epic would that be a cause of looping through everything?
if you need to check if its in it you might as well just save a list of locations
Wdym
a List<Location>
so, enchant name and level are the item lore, right?
can i change them while i'm enchanting?
Do you have guide or something on stuff like that you can link me
How would I create a list
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
lists are probably one of the most common things you should know
List<Location> locations = new ArrayList<>()
locations.addAll(config.getList("spawnerlocations"));
locations.add(block.getLocation)
are you making custom spawners
Kinda
just add the mob type to the pdc and handle spawning like that
wat
?pdc
Persistant Data Holders huh
So I pretty much just overcomplicated the fuck out of this huh
pretty much
Spawners considered a tile entity yeaH?
yes
?arrowcode
Will work on it
holy fuck I got it
@remote swallow Thank you so fucking much
@vivid cave Thank you so fucking much
I'm trying to boost a potion's level but for reason meta.hasCustomEffects() is always false
PotionMeta meta = (PotionMeta) holding.getItemMeta();
meta.getPersistentDataContainer().set(new NamespacedKey(plugin, "boostAmount"), PersistentDataType.INTEGER, multiplier);
// Boost effect level of potion
if (meta.hasCustomEffects()) {
for (PotionEffect effect : meta.getCustomEffects()) {
int newAmplifier = ((effect.getAmplifier() + 1) * multiplier) - 1;
meta.addCustomEffect(new PotionEffect(effect.getType(), effect.getDuration(), newAmplifier), true);
}
}
holding.setItemMeta(meta);
any ideas? I tried messing with getBasePotionData:
PotionType potionType = meta.getBasePotionData().getType();
if (potionType.isUpgradeable()) {
meta.addCustomEffect(new PotionEffect(potionType.getEffectType(), ????), false);
}
But how am I supposed to get the original duration and amplifier?
Does anyone know if it's possible?
Yes but you would have to hide the original enchantments and then add your own to the lore
Cause i want to remove that enchant.level n
Well, at least in that case you can create a resource pack to add new entries
Oh thats fine, i just need to edit, thanks
Dude persistant data containers are fucking awesome
wdym
PDC epic yes
so, i somehow managed to hide the enchantments, but i dont know how to place another text in their place
Im struggling with the recreation, how do i do that?
add gray lore to the start of the lore list if it has or, or a new list
I made an list with a text components, and insert a string, but that didnt change anything
Yeah you just add grey text to the top of the lore
im trying the following, but's not working
ItemMeta meta = item.getItemMeta();
@Nullable List<Component> lore = item.lore();
if(lore == null){
lore = new ArrayList<>();
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
Map<Enchantment, Integer> enchants = item.getEnchantments();
for(Enchantment enchantment : enchants.keySet()){
String enchantName = enchantment.getKey().toString();
int enchantLevel = enchants.get(enchantment);
lore.add(Component.text(enchantName +" "+ enchantLevel));
}
item.lore(lore);
item.setItemMeta(meta);
}
it just dont give any lore at all
You’re also only adding it if lore is null
It’s possible it already has lore
Or paper api returns an empty list rather than null, who knows
if (lore == null) lore = new ArrayList<>()
I’ll do ya one better
that's what i have done here
List lore = meta.hasLore ? meta.getLore : new ArrayList
shush
What’s deprecated
a method or class that was replaced by another
lmao he means which method
setLore()
you are in the wrong place
I think it’s just lore in their api
everything from spigot i can use in paper, idk why would that be the case
Also I didn’t delete anything
Either ignore the deprecation to maintain compatibility or use paper specific api only
you are using paper methods, we cannot help with paper methods, if you want to use paper api go to paper discord or stay here and use spigot api
if you want me to go, i can go 😔
im just directing you to the correct place for support
Build against Spigot API and your plugin will run everywhere. Build against Paper and your plugin only runs on Paper
im jk
yep, thats a good point
you can also read deprecation messages, they typically tell you why something is deprecated :)
usualy its because they implemented another method that does the same thing
i.e. a lot of methods on the paper api are deprecated because they have changed to use components instead of strings
i asked there and someone said i need to use datapacks for client side
i dont think that's a real answer
what would you need that for
Datapacks aren’t even a client side thing
i asked how to rename enchantments, and an admin said "Only with a use of datapack which should be installed by a client"
yep, thats what i was thinking
thats why i think that cant be a real answer
im gonna take a while guess and say they meant resource packs
server resource packs
in several servers some items have a lot of custom enchantments, i think that surely is a way to do that
but its asked when you join, if you dont use it the items keep the custom names and custom enchantment names
so force the resource pack
im searching everywhere and i cant find the answer 😔
everything that i try just doesnt work
You could use some trickery possibly with nms. Not entirely sure. At minimum can make use of lore
?? why's it not finding papi
fuck gradle
not even scanning the repo
I'm fuckin blind lmao
Use maven
How does runTaskAsynchronously work precisely? Does it create a new thread each time, reuse an existing thread that isn't main thread if one is available, does it use the main thread at times, what's the dealio?
Never uses the main thread. Iirc it creates a new thread then discards it as soon as it’s done
You might be able to rummage around the bukkit scheduler src and see how it does it
It uses a thread pool to execute tasks. So it will create a thread if necessary but it wont necessarily get a dedicated thread to itself
Unless its the only task needing to be run lol
not even trying the repo 
Repost of yesterday's question of mine:
Is anyone aware of some library that basically does regex on steriods? i.e. I'm looking for something that can evaluate something like follows:
{
"priority": 100,
"validFor": {
"locales": ["DEU", "FRA"],
"patternMatches": "[\d\.]+(,\d+)?[KMGTY]?"
},
"value": {
"pattern": "([\d\.]+)(?:,(\d+))?([KMGTY]?)",
"transform": [
{
"validFor": {
"ifNotPresent": ["{2}"]
},
"data": "0",
"store": { "variable": "{2}", "as": "STRING", "via": "STORE" }
}, {
"concat": [ "{1}", ".", "{2}" ],
"store": { "variable": "ret", "as": "DECIMAL", "via": "ADD" }
}
],
"return": "ret"
}
}
I know, cursed beyond belief but without some cursed combination of sscanf (which would require the FFI anyways) and regex it is hard to do otherwise
Needn't be JSON and can also be another file format.
AHH a pool ok. That's okay. I know creating threads is supposed to be a little expensive but a pool is beneficial. Thank you, both.
I want to make a gun but what I have won't work can you help me?
Vector vec = player.getEyeLocation().getDirection();
for(Player players: Bukkit.getOnlinePlayers()){
if(players.getLocation().getDirection().equals(vec)){
players.damage(2);
}
}```
check for targetentities from the player
there is a method for that
how can i do that? (i don't find "targetentities")
i swear there was a getTargetEntity but i may be tripping nvm then
https://bukkit.org/threads/get-entity-player-is-looking.300661/ check out this thread
the code you made will try and match any player looking in the same direction as the current player. It logically doesnt make sense
Does Java have any way to define custom methods on external types other than using a newtype pattern
thanks
as in extending functionality?
yes
no
😡
other than extending it theres no way
Wdym extending it? Don't you have to extend in the original class def
Or can you extend interfaces in your own code
Implement methods on ItemStack so I don't need a bunch of dangling static functions everywhere
just use a util class
sub util classes lol
where is my impl Trait
How do I figure out if an item is being renamed in an anvil? It seems the normal way to do this is to check the result item but if I'm trying to determine the result item how do I check for it?
like they are actively typing the name in?
Kotlin does
I suppose so, just an event handler for PrepareAnvilEvent
yeah PrepareAnvilEvent is pretty much all you have
If only Spigot had a Rust API ;-;
you can do a packet listener aswell
There’s something even better than Rust called Skript
https://github.com/MitchGB/MinecraftEnhanced/blob/main/src/main/java/com/buoobuoo/minecraftenhanced/core/event/listener/AnvilRenamePacketListener.java
I did this a bit ago with protocol lib
But do you see how this becomes an issue, where I'm basically relying on the functionality remaining unchanged in order to reimplement the functionality?
yeah ig
Wdym relying on the functionality to remain unchanged?
The anvil has its normal functionality which includes renaming items
You type a new name, the result becomes the left item with that name
However, when you're trying to figure out whether the user is trying to rename the item, you all of a sudden have to rely on the original functionality to reimplement itself
Because you can only check the name of the result item
There is no API call to query the name box
Can’t you check the name of the first item? I don’t get what you mean
You can check the name of the first item but you cannot determine what is in the name box
I would send an image but I cannot
The closest you can get to this is by checking whether the left input item has the same name as the result item, if they are different then the result item is the name the user typed in
I am not sure how the code works, not to say it doesn't but I try to avoid using code that I don't understand
I don't know where it would go or anything
This is my second day doing plugin development
gotcha
What’s the issue with that? Is it not updated when the user types?
I used to know Java but I forgot it over time
It is, but it is not possible to query without a packet listener, apparently
declaration: package: org.bukkit.inventory, interface: AnvilInventory
has a getRenameText method
Can I somehow force-open the chat for a player?
no
you trying to force text input?
Yes
What are you trying to do specifically?
But having to click on a rename field on an anvil and then having go click the item is... annoying as hell
Idk imma implement it into my system because I just saw Anvil Things in this chat and that reminded me
Wait sign input field?
Can I confirm with enter?
It switches the line with enter, but is that detectable?
nah pretty sure they have to click it still
Thats sad
Well but at least I can customize the UI right?
with a resourcepack, yeah
I came into this err :l
for some reason it shows that
tried Invalidate Caches but no luck
show the full error
click the uppermost item on the list, then select everything from the console output and paste it
just change to ultimate version :l
and it work for some reason
Good luck, you'll wait a lot longer than that
What does it include?
any way to decode these characters?
128 char cap of what?
better yet, any way to make cmd actually show them properly?
I see
I can't fix this problem when building spigot server. I downloaded the file both pom and jar and put it in the work folder but it still gives me this error and can't see I downloaded it manually
[ERROR] Failed to execute goal on project spigot: Could not resolve dependencies for project org.spigotmc:spigot🫙1.20.1-R0.1-SNAPSHOT: Failed to collect dependencies at com.mojang:authlib🫙4.0.43: Failed to read artifact descriptor for com.mojang:authlib🫙4.0.43: Could not transfer artifact com.mojang:authlib:pom:4.0.43 from/to minecraft-libraries (https://libraries.minecraft.net/): Connection reset -> [Help 1]
What can I do? I have a bad internet but I can't fix it any time soon
Can you use mobile data?
fixed by adding chcp 65001 (change code page to utf-8) in the beginning of the startup script
no why
When you say downloaded do you mean through build tools
could have been more reliable
no, manually from libriries minecraft net
did you install the authlib to your local maven repository?
Did you manage to download it manually?
How long can it take until spigot updatechecker api updated?
which one do you mean? the legacy one, or the new one?
the "new" one is basically instant
I want to prevent people from dropping a specific item, is it reasonable to use PDC for this?
sure
If you want it to be different for each player or be able to give any item that tag, then yes. Otherwise you could just add a config or something.
what's the right way to log errors to console?
I don't want to pass the plugin to each class should I create functions for logging?
You could make the logger static or just System.out.println() ig
got the legacy yeah
the legacy one, idk. why don't you use the new one?
yeah good question 😂
https://api.spigotmc.org/simple/0.2/index.php?action=getResource&id=%s parse that to json, there shuold be a string named "version"
Player#getName
with #?
No
beacause i need i get a player name for put in a scoreboard
then just call getName() on the player object
okok thx
chcp 65001 >nul
Score score = objective.getScore(ChatColor.WHITE + Player.getName() + 1);
it gives me an error under getName
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
you don't know the basic stuff, e.g. difference between classes and objects/instances of classes
obviously, getName() is not a static method, it wouldn't make any sense
check out one of these tutorials
ah okok
you need to have an object of player, a specific player
AHAHAHAH im so stupid
sorry
but is my first time
np lol
@tender shard its work
Who knows how to implement a 2nd place for a passenger in a horse? like in this plugin
https://www.spigotmc.org/resources/twoplayerhorseriding.89058/
That plugin is open source
You can take a look
he’s afraid of packets
oh i remember this dude
he was trying to serialize an entire horse yesterday
of course he is afraid of packets
They are just keeping an armorstand synced with the horse
imho all packet libraries have the wrong name. ProtocolLib, PacketEvents... They should be called Customs!
and some packets
for some reason
lol
Customs deals with incoming and outgoing packets all day, why is no library called customs
what is this witchcraft
make your own
😄
but if we are serious
those libs just want to be descriptive
if i saw a lib named "customs" i would think of custom items, enchantments, entities
nah I'll play KFC simulator
def not packets
that's also a good idea
i bad read not my code (
unfortunate
The only packet usage seems to be hiding the passengers from eachother
oh
Presumably because they would block your view
Yes
then why is this with packets 😭
that was added in 1.19.X
actually?
i thoguht it was there for a very long time
It is
ho lee
nvm that's a getter lol
1.12.2 has this getter
actually wait
1.12.2
hides a player from this player
Yeah it’s been around forever
alex you lied to me how coudl you
Yes hideEntity is new
Would it be better to make my own economy plugin or just use Essentials since there's a lot of plugins supporting it ?
Most plugins support it through Vault
If you want your own econ plugin make it support vault
Anyways I'd just use Essentials
Why is Vault so special ?
I'd just implement Vault and let the server choose what eco they use
I'd the standard API for Economy plugins
It's been around for years
I just put in work folder in my buildtools folder
wrong
yes, I have jar and pom files of this lib
where?
you need to instal it to your local maven
how does it look?
except for the path to file I dont know what these fields are
is it posible to do it through maven ?
Would this be it ?
public bukkit values is pdc
ty
hey nerds, remind me real quick, if I want to teleport a player when they get on should I do the player login event or the player join event?
thanks, just this once I won't take all of your lunch money
PDC is NBT
setDamageRewards(1);
Invalid method declaration; return type required
class:
public class Combat extends Skill implements ConfigurationSerializable {
theres a setDamageRewards Method on the Skill abstract class
Okay, so you've marked it as @Override but the method signature is wrong
Skill#setDamageRewards() has a different return type than your Combat#setDamageRewards() implementation
no i want to use the mothod i created in the abstract class
I'm going to need to see the entirety of both classes to actually understand what you're trying to do lol
?paste ideally
the world creator is used even just for loading existing but currently unloaded worlds right?
or wrong?
correct
You're calling it outside of any scope
public Combat(){
setDamageRewards(1);
}
wdym?
You're right. The constructor you just sent is what you should be doing
I suppose you have two constructors though so if you want to run it for both you can either put it in both constructors, or use an initializer block
i was just about to say that
thanks for the help btw
public Combat(Map<String, Object> m){
setXp((Integer) m.get("xp"));
setLevel((Integer) m.get("level"));
this.setDamageRewards(1);
}
public Combat(){
this.setDamageRewards(1);
}
// OR
public Combat(Map<String, Object> m){
this();
setXp((Integer) m.get("xp"));
setLevel((Integer) m.get("level"));
}
public Combat(){
this.setDamageRewards(1);
}
// OR
{
this.setDamageRewards(1);
}
public Combat(Map<String, Object> m){
setXp((Integer) m.get("xp"));
setLevel((Integer) m.get("level"));
}
public Combat(){}
Both will work
Edited in a third actually. Second one is probably best in case you choose to add more things to the default constructor
i have downloaded the code from github i want to compile it into a plugin iam using intellJ what do i do after importing it ?
what code
a source code of a plugin
send the link of its github
Is it possible to refresh the values in a GUI without closing and reopening the inventory?
yes
the code isnt actually on there
correct'
Any ideas why popular plugins like LuckPerms, WorldEdit, "essentialsX, ... don't define any permissions to their commands in plugin.yml? Just courious about what the actual reason(s) could be.
sad
Something like setItem and then updateInventory?
because they are bad
bruh cuz they have given them on website
no reason to, luckperms just grabs perms from usage iirc so unless its an op only thingt here isnt a need to add them
btw how do we add a new value in plugins ?
a new value where
like making a plugin with a new value
what new value
like coins for example
probably
do u know the event ?
just had a look and it turns out vault doesnt have events
so what they use
they handle it from econ responses probably
its returned when you call the add currency method
oh you mean /pay
no, the api method
i see
so to create our own currency in a plugin we need to use their api ?
if you want it to work with most other plugins that use money sure
if you want to convert it back to other currencies, sure
you cant add code to vault, vault is an api
you would need a plugin that hooks into vault
alr and what about /withdraw
you make a command to hook vault and remove it from there bank, and give them something to do with said withdrew currency
and in the code it will go like ?
No one is writing it for you
im not spoonfeeding you it
ah
import net.milkbowl.vault.economy.Economy;
import org.bukkit.plugin.RegisteredServiceProvider;
public class EconomyController {
private static Economy econ = null;
public static boolean setupEconomy() {
if (HypixelSkillCore.getInstance().getServer().getPluginManager().getPlugin("Vault") == null) {
return false;
}
RegisteredServiceProvider<Economy> rsp = HypixelSkillCore.getInstance().getServer().getServicesManager().getRegistration(Economy.class);
if (rsp == null) {
return false;
}
econ = rsp.getProvider();
return econ != null;
}
public static Economy getEconomy() {
return econ;
}
}
dam
replace HypixelSkillCore with your plugin name
make sure to create a way of obtaining the plugin instance
thanks
alr
Hi, the tutorial of kody simpson is good for menu handlers?
https://gitlab.com/kodysimpson/menu-manager-spigot/-/tree/master/src/main/java/me/kodysimpson/menumanagersystem
https://www.youtube.com/watch?v=xebH6M_7k18
or the best is https://www.spigotmc.org/threads/a-modern-approach-to-inventory-guis.594005/ ?
deffo the forum post
kody simpson has the best youtube tutorials on spigot development.
yes that's why I'm hesitating between the 2
the forums for most stuff is always better
and a java series if you are just getting started with java
also kody simpson use inv holders which is the entirely wrong way to do it
ok down there I did kody simpson's I'm going to look at the other small question anyway, on kody simpson's when the menu is closed, it's not deleted from the list it seems to me?
is using skript bad when you know spigotapi? i know spigotapi but making a custom spawners plugin in spigotapi is too hard
use the forum post, it uses the correct way of making inventories
spigotapi is very easy, im gonna guess you probably need to learn java
chill out lol
I have already made a spawners plugin in skript and it's a hassle
I did it with player.getOpenInventory().setItem which seemed to work
no i dont mean leveling up spawners and... i mean a spawner that is invisible and summons the mob no matter the light level, block underneath, space available
oh no I had made a system so that when your spawner is broken you can recover it in a gui
oups sorry EpicEbic i speak to @spare hazel
admin only or also for the players?
e
also players
the hardest part was more the page system etc... I used a var to find out which page I was on etc... I am still a beginner in the spigot api but one of my goals is to redo this plugin in spigot
csv stockage
you can reference java classes i think using skript-mirror
but I dont think it has a way to define classes
spigot supa ez
fr fr
'''
// Evento PlayerJoinEvent
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
String MondoGiocatore = player.getWorld().getName();
Inventory InventarioGiocatore = player.getInventory();
if (MondoGiocatore.equals("world")) {
// NON PRENDE NESSUN TIPO DI DANNO QUANDO IL GIOCATORE SI TROVA NELLA LOBBY
PotionEffect invincibilityEffect = new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, Integer.MAX_VALUE, 4, false, false);
player.addPotionEffect(invincibilityEffect);
player.setFoodLevel(20);
// TELETRASPORTO AL PUNTO DI SPAWN
player.teleport(new Location(player.getWorld(), 735.500, 23, -1012.500));
Bukkit.dispatchCommand(player, "ScoreboardLobby");
}else {
Bukkit.dispatchCommand(player, "NascondiScoreboardLobby");
player.getActivePotionEffects().forEach(potionEffect -> {
PotionEffectType effectType = potionEffect.getType();
player.removePotionEffect(effectType);
});
}
}
'''
because when i change the world it doesn't hide the board
if you get to the point where you need classes in your skript files, just switch to java
Hello, how can I make this in spigot for a ItemDisplay ?
?
/summon item_display {item_display:head}
declaration: package: org.bukkit.entity, interface: Display
(make the item_display looks like a block)
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/ItemDisplay.html#setItemDisplayTransform(org.bukkit.entity.ItemDisplay.ItemDisplayTransform)
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/ItemDisplay.ItemDisplayTransform.html#HEAD
declaration: package: org.bukkit.entity, interface: ItemDisplay
declaration: package: org.bukkit.entity, interface: ItemDisplay, enum: ItemDisplayTransform
okay thanks
here
declaration: package: org.bukkit.entity, interface: ItemDisplay
oh someone else got it
Hey. I'm working on something where I interact a lot with the inventory. I see that there seems to be 41 items when I do player.getInventory().getContents(). Is there somewhere I can read about what exactly all these slots are? I've made the assumption that this is the 36 inventory slots, + offhand + armor slots, but is this incorrect?
I did think that it could potentially be the inventory crafting grid, too, but since they can't store anything the armor slots seem more likely
I realize now maybe PlayerInventory.getStorageContents() is what I should be using, huh?
you're correct
i forget which ones are which but that is correct
there
Thank you @wise mesa @humble lynx
Depending on the event use e.getrawslot as well
this is correct for Inventory.getItem(int)
getRawSlot might be different, usually that one starts to count at the top most slot - but not always lol
Yeah, using GUIs you have two separate slot numbers going on at the same time, so e.getRawSlot is a good reminder
??
Hi, i made plugin which replaces insted of emeralds to diamons villager trade and now the villagers level not increasing and he not giving xp why??
Did you set the villagerExperience value for your recipes?
how i cen do it :D
You call the setter?
It's also an option in the constructor
I wasnt talking to you, but you just need to use paste or format the code using triple backticks `
ahh i dont get it :D
a
i have installed the plugin minecraft development in intellj but when i do new project it doesnt show me the option of spoigt it shows bukkit bungecord etc
yes i saw it later thanks
Raycast works on DisplayEntity? it doesn't have a hitbox.
Yes but only if you use the raySize option
They didn't.
Is there a way of listening to the inventoryclickevent after it has triggered? (After everything has finished)
I am trying to add more crafts to the vanilla anvil and I need the anvil with the items in it when the players adds a new one. I could technically handle everything myself, delete items and replace them in the anvil, but there surely is a better way?
You can just run it with a 1 tick delay from a scheduler
Yep I tried that
didn't seem to work...
I'm looking now into the event priority, perhaps that will work
nope it doesnt
BukkitScheduler scheduler = mainPlugin.getServer().getScheduler();
scheduler.scheduleSyncDelayedTask(mainPlugin, new Runnable() {
public void run() {
//code
}
},0);
You just create an itemStack with Material.POTION and then change the PotionMeta you can get by calling myItemStack.getItemMeta()
this is the correct code for scheduling right?
Try with a 1 instead of a 0 although I'd expect that to be the same
Isn't the turtle master potion a combo of two potion effects?
Where can I download a ready spigot server jar without building it?
Dunno if that's hardcoded into the client for that combination of potion effects
You don't unless you like malware
?bt
can you build it for me?)
Not legally
damn, why?
?dmca
An unofficial explanation of the DMCA can be found here: https://www.spigotmc.org/wiki/unofficial-explanation-about-the-dmca/
Long story
Use the Gui jar my link sent you to
It's a wip If you have any issues feel free to report them in the thread
It should be much easier than command line
Book formatting is such a pain
Yes
At this point I'm not even trying to write pretty code and still I run into weird issues
what is wip?
Work in progress
it might take a while to download this with my 2KB/s internet. Is it going to fix my problem with non ability to download authlib for the building?
With internet that slow you probably can't download anything
You'd be hardpressed to even get paper with internet that slow
well, normally it can reach about 50KB/s
Yikes, you'll have to download even more once you get the jar. BuildTools clones git repos so it can build everything locally.
Just combine them.
if (GG >= 0 && GG <= 19) {
// Do stuff
}
Do you mind getting involved in illegal business by sending me a built server jar?
Even if I was, you internet speed wouldn't download it in a fast manner. The final jar is like ~75MB
my server folder is already 250Mb
No, but it just makes it easier to read. Plus less nesting.
Yeah, it's probably that
with this internet I've downloaded intellijidea with all necessary stuuf for mc plugins, minecraft, discord, and three spider man movies
Then what's the issue with running BuildTools?
[ERROR] Failed to execute goal on project spigot: Could not resolve dependencies for project org.spigotmc:spigot🫙1.20.1-R0.1-SNAPSHOT: Failed to collect dependencies at com.mojang:authlib🫙4.0.43: Failed to read artifact descriptor for com.mojang:authlib🫙4.0.43: Could not transfer artifact com.mojang:authlib:pom:4.0.43 from/to minecraft-libraries (https://libraries.minecraft.net/): Connection reset -> [Help 1]
I downloaded this authlib manually but I have no idea how to let the buildtools use it. It's impossib;e
this checking for secure connection on spigot site makes my life harder
I still can't see why you can't send me ready server jar
illegal is why
It's for the same reason why spigot can't provide direct downloads.
Also, BuildTools primary purpose is to compile the server jars.
It can install the mappings via the --remapped flag, but past that, there shouldn't be any need for a manual lib import.
can I show only one armor stand hand?
How can I fix that error?
You should be able to get mojang related code through the spigot dependency. You are using maven right?
yes, though I dont even know at which point of all this process I decide if I use maven
Maven is a dependency management tool. It removes the hassle of hunting down jar files and manually importing them.
You choose whether to use it at the start of your project.
I don't understand what you said in the first sentence
Shouldn't we use + there
If you use maven, you'll have a dependency section that contains
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.18.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
You'll want to use the artifiactId of spigot for usage of NMS code.
Are you sure that it is libraries.minecraft.net? https://libraries.minecraft.net/com/mojang/authlib/maven-metadata.xml shows that this artifact does not exist under the repository
?
No? If you want to check if GG is greater than 0 and less than 19, you combine the statements by using an AND check.
So it won't work with +?
Not if you're doing a comparison like that one.
Oh ok
Actually seems like it is just an improperly maintained repo. https://libraries.minecraft.net/com/mojang/authlib/3.17.30/authlib-3.17.30.pom works, but the maven-metadata.xml files are missing strangely enough
I used different link to download.
what do you think it is ?
What are you running the plugin with?
You know, the version of the server?
Well I guess that fixes your issue then. Glad to see you figured it out
Idr the name for it; but in certain languages yes that’s possible true is treated as 1, false is treated as 0 and vice versa
Oh yes branched programming
And what is it?
They figured that out already
You know I have no idea what you mean by this. How do I use this information to build the server?
Do a maven clean install or a gradle clean build
Also make sure you are using the right target+source/release version for your build
Given that you are probably using IJ: Go figure it out yourself.
For the CLI it would be mvn clean install and ./gradlew clean && ./gradlew build respectively
Under maven open the POM, click on the drop-down menu next to the "Run" button, go on "Run as..." and click "maven clean".
in eclipse you can just use the project menu and select clean
Under gradle click on Window > Show View > Other > Gradle > Gradle Tasks.
Then execute the clean goal from there
I'm going to assume that you don't have anything setup.
- Download BuildTools (Whether it through the link on the wiki or the link to the GUI that's in development)
- Run it. (java -jar BuildTools.jar --rev <THE VERSION YOU WANT> --remapped)
- Copy the completed jar to your server directory.
- Setup your maven project and include that dependency in your pom.xml
- Use the built in maven tools to package your plugin jar.
That's all you have to do. If you just want the server jar, stop at step 3.
That won't do much if the improper JVM version is checked out by your IDE.
Maven unfortunately has a bug in which it does not attempt to recompile classes compiled by the IDE even though the IDE built these classes for the wrong JVM
I'm stuck on the second step. Though I always ran the BuildTools without --remapped. I don't know what it does but I'll try it
--remapped installs the remapped jars to your .m2 directory so that you can use the mojang mappings in your projects.
How do you know all that?
How do I get the max durability on an item? I'm trying to add together durabilities but Damageable.getDamage() and Damageable.setDamage() only get how much the tool has been damaged rather than how much durability it has left
- I keep up to date with the game and the community postings.
- I've been working on the GUI for it so much that I know way more about it than the average person.
Is this Maven a part of Spigot or it is a different thing?
Completely separate. It's just a dependency management tool.
Maven is a project management system Spigot uses
I can't get the EnchantItemEvent to trigger. the docs say Called when an ItemStack is successfully enchanted (currently at enchantment table) I am enchanting items, they are successful, but yet the event is never called upon.
@EventHandler
public void FrozenAspect(EnchantItemEvent event) {
event.getEnchanter().sendMessage("I WAS CALLED");
Bukkit.getLogger().info("I WAS CALLED");
}
This is what I have and it never runs. I do have it registered.
my brain melts when I see word dependency
think of spigot(-api) as a dependency to ur plugin
well, dont think it just to think it, since it really is a dependency, but yeah
dependency, its something ur plugin requires to compile/run
A dependency is something that you depend on.
I.E. your project depends on the Spigot API.
It cannot run without it.
ur plugin is "dependent" on spigot-api
Spigot API is what lets ur plugin interface/use Spigot
nvm it's Material.getMaxDurability()
hey, how do i check who's using the anvil?
cause the PrepareAnvilEvent doen't have a getPlayer method
i tried using InventoryOpenEvent, but i cant get the anvil in that case
np
I'm trying to boost a potion's level but for reason meta.hasCustomEffects() is always false
PotionMeta meta = (PotionMeta) holding.getItemMeta();
meta.getPersistentDataContainer().set(new NamespacedKey(plugin, "boostAmount"), PersistentDataType.INTEGER, multiplier);
// Boost effect level of potion
if (meta.hasCustomEffects()) {
for (PotionEffect effect : meta.getCustomEffects()) {
int newAmplifier = ((effect.getAmplifier() + 1) * multiplier) - 1;
meta.addCustomEffect(new PotionEffect(effect.getType(), effect.getDuration(), newAmplifier), true);
}
}
holding.setItemMeta(meta);
any ideas? I tried messing with getBasePotionData:
PotionType potionType = meta.getBasePotionData().getType();
if (potionType.isUpgradeable()) {
meta.addCustomEffect(new PotionEffect(potionType.getEffectType(), ????), false);
}
But how am I supposed to get the original duration and amplifier?
The only thing you can really use is PotionData#isExtended() and isUpgraded()
how do i get a Player from HumanEntity?
Cast it
theres really no way to get the duration or level?
i would assume the orignal would be in the getBasePotionData
docs say Returns the potion data about the base potion
thanks
is there any way to show a text in front of the anvil gui?
wdym infront of the gui?
thats annoying af
3 nested loops
x and z are from 0 to 15 and y is from world.getMinHeight to world.getMaxHeight
I've resorted to just manually listing out all the durations and amplifiers
public enum PotionStat {
// 180 seconds = 3 minutes
// 480 seconds = 8 minutes
NIGHT_VISION(PotionEffectType.NIGHT_VISION, 180, 480),
INVISIBILITY(PotionEffectType.INVISIBILITY, 180, 480),
JUMP_BOOST(PotionEffectType.JUMP, 90, 180, 480, 0, 1),
...
private final PotionEffectType potionEffectType;
private final int shortenedDuration;
private final int normalDuration;
private final int extendedDuration;
private final int normalAmplifier;
private final int upgradedAmplifier;
private PotionStat(PotionEffectType potionEffectType, int normalDuration, int extendedDuration) {
this(potionEffectType, normalDuration, normalDuration, extendedDuration, 0, 0);
}
private PotionStat(PotionEffectType potionEffectType, int shortenedDuration, int normalDuration, int extendedDuration, int normalAmplifier, int upgradedAmplifier) {
this.potionEffectType = potionEffectType;
this.shortenedDuration = shortenedDuration * 20;
this.normalDuration = normalDuration * 20;
this.extendedDuration = extendedDuration * 20;
this.normalAmplifier = normalAmplifier;
this.upgradedAmplifier = upgradedAmplifier;
}
this is fun
@EventHandler
public void onAnvil(PrepareAnvilEvent event){
AnvilInventory inventory = event.getInventory();
int levelCost = inventory.getRepairCost();
if (levelCost > 39) {
Player player = (Player) event.getViewers().get(0);
ChatColor chatColor;
if (levelCost <= player.getLevel())
chatColor = ChatColor.GREEN;
else{
chatColor = ChatColor.RED;
}
List<String> lore = new ArrayList<>();
lore.add(chatColor + "Enchantment Cost: " + levelCost);
ItemStack tempItem = inventory.getResult();
if (tempItem != null) {
tempItem.setLore(lore);
inventory.setResult(tempItem);
}
}
}```
Why isnt this working?
how can I get the exact location tho not just the 0..15 ?
Do you need the exact location?
Yes I do
Because Chunk has methods that take releative location
I do need exact locations
Either way you should just have to multiple the chunk x and z by 16
And then add your 0-15
this wont work for turtle master
cause it has 2 effects
damnit
what about Y?
https://www.spigotmc.org/threads/a-modern-approach-to-inventory-guis.594005/
hello, I followed this tutorial to make my menu handler, but I find the handler "too developed". I mean, as far as click events etc. are concerned, I would prefer not to have a class inventory button but directly redefine the onCLick function in the menu itself, after that maybe it's really better and that it I just have to get used to it?
Y doesn't need to be changed
rn its 0..16?
Is there an event that gets triggered when a cactus grows ?
like for example a specific "CropGrowthEvent" or something
i just need the result to show the custom lore, but as soon as the player gets it, i want it removed, but it's never showing anything
x and z are from 0 to 15 and y is from world.getMinHeight to world.getMaxHeight
is it possible to get the vanilla potion duration and amplifier with NMS?
probably
Easiest way is to just loop through the potion registry and prnt out their duration and amplifiers
because it's all hardcoded
Or just make a custom one ? 🙂
A quick question
I'm making a custom item, and it'll allow for it to have storage and the player to sell it.
Is there a way to make something like @EventHandler and call it from other classes, and when a player sells, it triggers ?
https://www.spigotmc.org/threads/a-modern-approach-to-inventory-guis.594005/
hello, I followed this tutorial to make my menu handler, but I find the handler "too developed". I mean, as far as click events etc. are concerned, I would prefer not to have a class inventory button but directly redefine the onCLick function in the menu itself, after that maybe it's really better and that it I just have to get used to it?
You can make custom events
?event-api
That's just a guide generally I'd recommend if you want multiple of the same event for multiple items just use a static instance
would u happen to know how to do that
Hello, this error occurs when I try to make an ItemFrame entity spawn, is this a bukkit bug? I didn't find anything on web.
The cause comes from here: https://prnt.sc/hIQw8FHXAhkB
Error : https://code.alwyn974.re/bironujaxo.apache
Is it a good idea to store all the bounding boxes for peoples claims in one array?
im talking in terms of memory and stuff like that
Only store what you need
So wait, after making a custom event , whenever I want it to be called I just use Bukkit.getPluginManager().callEvent(event_here); ?
Yeah
Is it always the case that Listeners that listen to events that have extended Events catch the extended Events, too?
I just noticed that's a thing when I got a EntityTargetLivingEntityEvent while listening to the EntityTargetEvent which broke my logic since I had a map that stored the EntityTargetEvent class and therefore did not find anything for the EntityTargetLivingEntityEvent class
Basically I have a central listener (inside an api) that has to delegate back to the registrator. Now I gotta find a solution for dealing with extended Events.
Just wanna know if that's consistent across all events
If someone got a solution I'd also take that but it's probably not that easy
well, its not that they necessarily catch the extended events rather the extended events relies from the base one. If you cancel the base event, then the extended can't fire since its an extension of it and relied on that event to be fired in order to fire as well
its basically the reason why there is some generic ones you can't cancel
but there is still some though where you could
Hmm that makes things a lot harder
not necessarily, you could listen for the upper most one and uncancel
but, this is why there is a general etiquette devs should be following in regards to events. Such as not only using the appropriate events they need but as well as using the appropriate priorities and cancelling if its necessary. I will admit a lot of the times it is easier to just cancel and let the server handle that lmao
Well I basically have someone who's using the api create a function like that
@Override
public Map<Class<? extends Event>, EventPriority> getEventsToRegister() {
return Map.of(EntityTargetEvent.class, EventPriority.NORMAL);
}
And prepare another function for receiving the listed events.
@Override
public void handleEvent(Event event, EventPriority priority) {
if (event instanceof EntityTargetEvent e) {
onEntityTarget(e);
}
}
I now need to figure out a way to delegate back to the handleEvent even when I receive an EntityTargetLivingEntityEvent instead of the (registered) EntityTargetEvent. My approach so far was the following map:
Map<Class<? extends Event>, Map<EventPriority, TreeSet<RegionEvent>>> eventListeners = new HashMap<>(); where RegionEvent would be all Events (not bukkit events) that listen to a specific Event with the given Priority
Now that I can't be sure that I receive the exact Class that was registered, how shall I store and delegate correctly? I don't wanna listen to all super classes as I will then have to listen to EntityEvent and PlayerEvent.
mhm that's icky
yeah so far I don't really have an idea
this is where reflection comes in
you actually can check if it is the exact class or not
Well I also wanna delegate the child events if the usual listener would receive them obviously
But even with reflection I would not know how to do that
but, I think the simple solution would be to just add some information to your paremeters for the constructors
you can always tell the handle event which it is specifically
Not really since I only have one executor that has to delegate:
Map<Class<? extends Event>, Map<EventPriority, TreeSet<RegionEvent>>> eventListeners = new HashMap<>();
// .....................
@AllArgsConstructor
private class CustomExecutor implements EventExecutor {
private final EventPriority priority;
@Override
public void execute(@NotNull Listener listener, @NotNull Event event) {
Map<EventPriority, TreeSet<RegionEvent>> regionEventMap = eventListeners.get(event.getClass());
if (regionEventMap == null) {
return;
}
TreeSet<RegionEvent> events = regionEventMap.get(priority);
if (events == null) {
return;
}
events.forEach(regionEvent -> regionEvent.handleEvent(event, priority));
}
}
I mean I do have one executor per Priority but they receive all types of events for that priority. And then using the map they get delegated to the right places
you could check the event if it has a living entity or not
if it doesn't it is the top most event
if it does, its the living entity event
That applies to this event. What about all the others?
as I said most others generally have a generic event you can't listen to or cancel
Yeah I figured that out when I tried to go with
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerBucketEvent.html
vs.
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerBucketEmptyEvent.html
declaration: package: org.bukkit.event.player, class: PlayerBucketEvent
declaration: package: org.bukkit.event.player, class: PlayerBucketEmptyEvent
those are the same as what I said
you could just check for specific thing being set or not
really the only difference between them
EntityTargetEvent fires regardless of the entity, EntityTargetLivingEntity just provides a more specific event based on that if the entity in question is a living one
but I don't see why it would make a difference which event you ultimately listened to on that because they both essentially contain the same information
I mean I can make an exception for that event and handle it explicitly instead of generic like I currently handle all events. The problem is that this is prone to breaking for other cases like this
the bucket event is the same way
You can not listen to the PlayerBucketEvent directly though
However you can listen to the EntityTargetEvent - you just might get a specific one with LivingEntity
you could always make a pr to change that
it could have been in error or not really thought about when it was added
that the generic event should have been abstract
and that there should have been 2 events under it
one for living entities and then another for all others
but unless that happens you are just going to have to actually look and see which events this issue applies to and make exception code for each
sucks, but there is really no other way if you really must know the specific event
is there a standard effecient way to know if a player has entered a claim? all the methods i can think of are really inefficient
bounding box
i got the bounding boxes stored but im not sure how to know effeciently if a player has entered one. Ive tried to look for some resources but theyre doesnt seem to be much out there
Meh. I guess I'll have to do that.
Basically if you wanna listen to EntityTargetEvent you'll also listen to EntityTargetLivingEntityEvent
declaration: package: org.bukkit.util, class: BoundingBox
the main idea is that i loop through every claim and check if the player is inside of it but i feel like that could be inneficient
this was my idea originally. alrigh thanks
this is probably a sign your code is probably not structured appropriately
one of the downsides of programming 🙂
most likely its my first java and spigot project lmao
this is why refactoring code is a thing lmao
ive pretty much restarted my project like 3 times but im fine with it. Learning innit
well, before you worry about efficincy
first get it working
its far easier to work with and around something that is working, then just theory
How would he utilize a hashmap here?
Yeah true. Im just used to working with games differently
to store the location object as a key to check fast
if there is a matching key, then the value should be the claim
Store each block of a bounding box??
I'm going to use a Hashset with my claims class which looks like this
public class Claim {
private Location corner_1;
private Location corner_2;
private BoundingBox bounding_box;
public Claim(int corner_1_x, int corner_1_z, int corner_2_x, int corner_2_z) {
World world = Bukkit.getWorld("world");
this.corner_1 = new Location(world, corner_1_x, 0, corner_1_z);
this.corner_2 = new Location(world, corner_2_x, 0, corner_2_z);
this.bounding_box = new BoundingBox(corner_1_x, world.getMinHeight(), corner_1_z, corner_2_x, world.getMaxHeight(), corner_2_z);
}
}```
and i'll just loop through each of them and see if the player is colliding
well could, best not do that, still a bit tired. I would have to think about it a bit for an ideal solution
its probably going to take a double hashmap or even a multimap
That's what I do in my regional event api (I was just talking about), too
One otimization method i thought of is storing the chunk ids that have a claim in them and just checking the ones that the player has loaded
ah right you could go by chunks if you want
since you could use bitshifting to check the chunk a given location is in
you shift by 15
you have a valid chunk coord when its divisible by 16
Yeah you could only check regions that are in loaded chunks and use the chunkload/chunkunload event to update that list
ohh im starting to get you now
Thats a really good idea aswell
is your project public?
whose?
you know if you toss it on github and routinely update it with your progress you might get some people willing to make pr's and the sorts 😛
also makes it easier to show what you have too
when you are stuck like this
Are you talking to AyPle or to me? lol
yes
I see!
I can make my git repo public if you want to look at it
since they are new to programming as they said
nah im not new to programming
Makes sense, yes
just spigot
oh, well still applies all the same
I can't guarantee that I will or not, I do every once in a while make contributions to some projects regardless of their popularity and skills. I do like contributing to those who are of lesser skill because it helps show how something can be done differently
but also remember this though, just because you think it is inefficient or doesn't use the most efficient method, doesn't mean it really is inefficient. It could be efficient enough which is all that matters really until it really is an issue
Yeah just atm the server isn't that great so im trying to cut costs basically lol
an example, looping through an array of 1k and using a hashmap of 1k keys. Obviously the hashmap would be faster but you would only notice this difference if you actually measured it in microseconds to see that.
but those microsecond differences don't matter because you wouldn't have a large enough server where microsecond optimizations really make a difference
i know basic java from a course i did and i really want to know how to develop plugins especially minigames, does anyone know a good tutorial for total spigot beggnners or a good way to learn?
Best Practices: Added functionality without inheritance
https://www.youtube.com/@KodySimpson and his spigot series got me started, he does alot of good tutorials especially for modern versions of minecraft
yeah true true
alright thanks i'll start working on it again
we are generally always here if you are need of more help 🙂
love 🙏
ty
how attach sources of mojang mappings eclipse
with or without maven
maven
?nms
does eclipse not have a bytecode decompiler
It does
It’s a plugin
No it has a decompiler built in too, but the plugin is definitely much better because you can switch between a few different decompilers
Yeah I use it as well
anyone know how i can use nms to get all the vanilla potion durations and amplifiers
They recently added support for Quiltflower which is nice
There is PotionType, but it doesn't (yet) support multiple potion effects like the turtle master potion
do you have a pr open for it
It also doesn’t have the durations
Nah, the deenumification improves it
and do you have a pr to change the creative category stuff
Change it how? They don't exist on the server anymore
been as some stuff is now in 2 categories
oh lol
The creative menu is entirely clientside right? No scrollable custom inventories
I think honestly the fact that it existed on the server to begin with was an oversight
Tbf I’m surprised they did before
Ye
i would fookin love scrollable invs
rip scott tom
Bedrock has fancy GUIs
Mojang knows very well we utilize inventories as GUIs and yet still they decided to not give us scollable inventories on the serverside
I demand parity
mojang knows we need a better category of menus and yet doesn't create one...

