#help-development
1 messages · Page 1110 of 1
block.isValidTool() is random on certain items like LEAVES, I need something like this but not random, what should I use?
sorry, but getDrops() I think is in spigot, I just need to know if the tool is correct to break the block
I have a bossBar indicating if item can be dropped or not, but when I target a leave with hand it is changing every tick because getDrops() 95% returns empty
Yeah that’s just how leaves work
You should use tags and whatnot
BlockData#isPrefferedTool is also an option
thank you for the ideia
Pretty sure theres a method for whether an item can yield drops on a block either in mayerial or blovkdata
Using mongodb ,-,
Yeah there ya go
thats usually how authentication goes
i have mongo on docker , i don't remmber how to use it
Scoreboard scoreboard = Bukkit.getScoreboardManager().getNewScoreboard();
Objective healthObjective = scoreboard.registerNewObjective("rust_health", Criterias.HEALTH);
healthObjective.setDisplayName("§c❤");
healthObjective.setDisplaySlot(DisplaySlot.BELOW_NAME);```
I need to do this but give a tag if user.isBeginner() or if not give another tag, this is constantly updated. I need to add this in addition to life, how do I do it?
How to use docker?
You can set auth in compose pretty easy
i did , but it still not working ..
https://www.youtube.com/watch?v=0gCRw13C2Xw if serious
I was replying to his message saying “I don’t remember how to use it”
Probs shouldve clarified
ah
You’ve restarted the container right?
no its been 3 month since i worked on my plugins so i fogot my server info (for mongo)
for testning yk
only 3 months
i have really hard job ..
Amateur. It’s been 10 years since ive seen my children
oh ..
Are you using docker compose?
Player targetPlayer = Bukkit.getPlayer(t);
if(targetPlayer == null || !targetPlayer.isOnline()) {
player.sendMessage(main.getMessage("PlayerGottaBeOnline"));
return false;
}
``` since when doesnt that work anymore?
no i don't think so ..
or i am i really forgot 😦
then how iam running pterodactyl panel ....that's pretty weird
Docker ls
Not app
Either way mongo will have your auth in some file
Im pretty sure you can exec -it in and add ajother account anyway
where?
Depends where you set it up
that's the thing i forgot xD
ok , can you help me setup it ?
do i need to remove mongodb?
Id really recommend you use docker compose
i don't have anything important in the database anyway
Thats if you dont want to install it through docker
If you want a docker container for mongo dont worry anout downloading mongo
Install docker compose and I’ll show you from there
why was getOfflinePlayer(String) deprecated?
?
Persistent storage of users should be by UUID as names are no longer unique past a single session.
what does that mean
Players can change their name once every 30 days, so using names to fetch an account is unreliable
ahhh okay
the dep is simply a warning to be certain what you are doing when using the method
will the blocking of the web request be that impactful?
it can
how does one get around that
generally you'd never notice, but it is a web request so could be delayed
if it is delayed you'd lock the server for a few ms
can this method be run in async?
You can, but its not really safe
what are the alternatives to not have the lock the server
noit using teh name version use UUID
I don;t remember if the UUID version does a lookup
it doesn't
Does someone has a idea why this doesn't load any texture to a head on older mc versions it totally worked fine
fun build(): ItemStack {
val head = ItemStack(Material.PLAYER_HEAD, 1, 3.toShort())
if (base64!!.isEmpty()) return head
val headMeta = head.itemMeta as SkullMeta
val profile = GameProfile(UUID.randomUUID(), "head")
val encodedData: ByteArray = Base64.encodeBase64(java.lang.String.format("{textures:{SKIN:{url:\"%s\"}}}", base64).toByteArray())
profile.properties.put("textures", Property("textures", String(encodedData)))
var profileField: Field? = null
try {
profileField = headMeta.javaClass.getDeclaredField("profile")
profileField.isAccessible = true
profileField[headMeta] = profile
} catch (e1: NoSuchFieldException) {
e1.printStackTrace()
} catch (e1: IllegalArgumentException) {
e1.printStackTrace()
} catch (e1: IllegalAccessException) {
e1.printStackTrace()
}
if (this.displayName!=null) {
headMeta.setDisplayName(this.displayName);
}
if (this.lore!=null) {
headMeta.setLore(this.lore);
}
head.setItemMeta(headMeta)
return head
}
1.8 moment?
version 1.20.6+
Use the api
So no base64?
I want my plugin to send an update message when a new version of my plugin is released
String updateURL = "https://www.spigotmc.org/resources/exstraban-%E2%9C%A8-plugin.119078/history";```
How do I put the new update link in the plugin?
Fine, thank you
Hi im pretty new to coding and I need help with my Plugin. Yes I know there are Plugins like this already but i wanna write it by myself. I wanna create a Multiworld Plugin with a Lobby, a Creative World and a Survival World. Everytime u reconnect u get tped to the Lobby and need to get through a portal or smt to get back to the world where u played before. My problem is that the server isnt loading the Lobby world so i need help getting it loaded 😄 And yep I know my english is not the very best cause I'm from germany
package de.stauder.test.listener;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
public class ConnectionListener implements Listener {
@EventHandler
public void onJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
event.setJoinMessage(ChatColor.DARK_PURPLE + player.getName() + ChatColor.GRAY + " hat das Spiel betreten");
}
@EventHandler
public void onLeft(PlayerQuitEvent event) {
Player player = event.getPlayer();
event.setQuitMessage(ChatColor.DARK_PURPLE + player.getName() + ChatColor.GRAY + " hat das Spiel verlassen");
}
}
Thats my code for the listener. I tried some player.teleport(Bukkit.getServer().getWorlds().get(0).getSpawnLocation()); but everything i tried didnt work cause the world is not loaded
for 1.21.1 Paper
What you want to make is a bad idea. You should not be mixing multiple gamemodes on one server
Instead use a multi server setup with a proxy like Bungeecord
Im a starting programmer 😄 I dont know anything how to setup a multiserver etc
get(0) is the main world
its always loaded
however, do not try to teleport IN the join event
yeah i wrote a lot of world names in it but it will never work cause the world world_lobby isnt loaded
delay the teleport by a couple of ticks
how do i delay it?
?scheduling
and how can i load worlds with a plugin?
worldCreator
i dont need to create worlds. i need to load it
it tries to load the world first, then creates it if it does not exist
ie WorldCreator("YourWorld").createWorld()
well it doesnt work ._.
then you did it wrong
You don't need to code anything for that
Read ^^
for me it seems like an another instance of minecraft running but how do i connect them?
@EventHandler
public void onJoin(PlayerJoinEvent event, Plugin plugin) {
Player player = event.getPlayer();
event.setJoinMessage(ChatColor.DARK_PURPLE + player.getName() + ChatColor.GRAY + " hat das Spiel betreten");
new WorldCreator("world_lobby").createWorld();
BukkitScheduler scheduler = Bukkit.getScheduler();
scheduler.runTaskLater(plugin, () -> {
Bukkit.broadcastMessage("Loading!");
}, 20L * 30L /*<-- the delay */);
player.teleport(Bukkit.getWorld("world_lobby").getSpawnLocation());
}
how do i add it to it then?
Anyone used Morphia before with mongodb?
Hi! I need help creating a plugin that makes it so when a world is generated, the center of the world (0,0) is a roofed forest. Alternatively, using a command, it could create a roofed forest with a radius of XX. I've been trying for 6 hours and the results haven't been successful, so it would be great to get a bit of help ^^'
?jira Make a bug report
Dear,
I got a problem with my Discord plugin where this import is not recognized : import net.dv8tion.jda.api.entities.TextChannel;
My dependency is well declared into my pom: <dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>5.0.0</version>
</dependency>
Small question about NMS. I have this zombie entity class, in where I have
@Override
public void die(DamageSource damagesource) {
super.die(damagesource);
}
How would I know if the entity died because of sun burn?
I don't really care if its sun burn (as I guess it's impossible to know), but any kind of fire damage
There you go
You know what the difference between in and in are
@EventHandler
public void onEntityDamage(EntityDamageEvent event) {
Entity entity = event.getEntity();
if (entity.hasMetadata("custom_entity")) {
event.setCancelled(true);
}
}
```Howcome this does not prevent me from killing my entity with a sword? is there a different type of event to check for hitting?
In meaning inside on meaning on the entity
inFire = standing in fire
on fire = get a fire extinguisher pls help
That’s my guess
NBT.modify(item, nbt -> {
ReadWriteNBT profileNbt = nbt.getOrCreateCompound("minecraft:profile");
ReadWriteNBT propertiesNbt = profileNbt.getCompoundList("properties").addCompound();
propertiesNbt.setString("name", "textures");
propertiesNbt.setString("value", customHeadUUID);
profileNbt.setUUID("id", finalTextureUUID);
});```
Anyone got any idea why this is being put under the "minecraft:custom_data" tag?
(mc version 1.21.1)
(nbt-item-api)
Should I be using the jdbi api instead of raw Statements
a) nbt isn't a thing anymore in ItemStacks, all foreign data goes into the custom_data component, and that's where NBTAPI operates
b) there is API for player head profiles, why are you even using nbt?
I know nbt isn't a thing, but in the official example it says to use this for (1.20.5+).
What is the API called?
Anyone know how you create custom recipes with outputs dependent on the input items? For example, how do you make ONE recipe which takes leather pants, and then ANY dye, and then outputs leather pants dyed that color?
Youd have to do a shapless for each variation
i mean
i dont think mojang coded a separate shapeless for all like 150000 possible dye combinations
there has to be a way
😂
I cant use URLs for this though that is why I was using NBT in the first place
What exactly are you trying to achieve. Bit of an xy problem?
I actually helped Mojang with all the dyes
It is
i have a set of basically thousands and thousands of dyes
I mean, that's literally how player heads work
im not coding a shapeless for every single one 😛
But yeah, you can do a shapeless for each dye then calculate the dye colour in recipe prepare event
just dunno how it works
its b64 strings in the nbt, or components
Oh it says “server defined behaviour”
Might be internal only?
You could try and spoof a crafting recipr with leather armour then apply it
uh the wiki example says to use modifyComponents for 1.20.5+ instead of NBT.modify, it looked fine lol
Bro I'm slow 😭
tysm
Hi guys,
In a java plugin (spigot/paper) I would like to use a model made using bdengine (and including an animation).
I would have to summon (and then animate) the same model multiple times.
Since it's the first time I'm playing with block display / entity display and bdengine could you please give me some leads/advices on how to do this ?
Are there any pitfalls to avoid ? Do you have a link to some tutorials ? Should I use a lib/plugin to simplify this ? bdengine exports animated models as datapacks, should I use it or is there another better way (like exporting it as model and then rotate it using Entity::teleport ?
Thank you per advance !
Is there a list of block states/properties somewhere
Id really recommend using a library like @torn shuttle freeminecraftmodels
Making your own is pretty complicated
Or do you explicitly want to make your own?
damn, is that like modelengine basically?
Yes
pretty cool!
Pay me for advertising
“Nuh uh”
@EventHandler
public void onEntityDamage(EntityDamageEvent event) {
Entity entity = event.getEntity();
if (entity.hasMetadata("custom_entity")) {
Bukkit.broadcastMessage("hit");
event.setCancelled(true);
}
}
```Howcome this code does not prevent the entity from being killed/hit even tho the log happens
Is there any other events overriding that
not that im aware of. the only other event is one similar for a claim plugin, but no where would it force allow damaging them...
this debug log ran, it should have cancelled the event
Try highest priority
works now, thanks for the idea
there are so many cool things in the spigot subclass for the Player but they're all "Not supported yet" 😭
Why yall teasing me? 😭
Hi! I need help creating a plugin that makes it so when a world is generated, the center of the world (0,0) is a roofed forest. Alternatively, using a command, it could create a roofed forest with a radius of XX. I've been trying for 6 hours and the results haven't been successful, so it would be great to get a bit of help ^^'
#general message
don't crosspost @merry sapphire
I need answers fast
calm down buddy
then asking at 9am maybe isn't the best idea
sorry, im so hyped rn
its 3:13PM for me
2:13 am buddy timezones don’t exist and obviously cst is superior anyway
timezones
idc what time it is, you dont cross post in every channel
Steaf know any bed time stories?
Man you and rad suck
no u
I don’t remember dreaming, not for a couple years at least lol
answer my question if you know, if you dont then stfu, dont give me attitude bro
Ooooo?
dude im just telling you to be a little bit reasonable
i dont go around in servers spamming every channel
the right channel is probably #help-server
if someone knows the answer and wanna help, they will answer you
why be rude now
who asked about you? again if you dont know then just shut up, geeez
just use the correct channels.
he started it bro, "idc what time is it"
that was to rad
thats why i said sorry

@merry sapphire
Finally thank god
I literally chat gpt it mane
I dont use that LOL
gpt is a nice search engine
can someone tell me what CustomModelData is? (ItemStacks)
its mainly for resource packs to assign custom models to an item
the resource pack can change the texture or model depending on what number you use
ahhhhhhhhhhhhhhhhhh
so you would use it with a custom resource pack that you could give out bundled with your plugin or sum?
i suppose that's what ItemStack#setCustomModelData is for?
thanks
anyone know how to get a 20 bytes long sha1 hash for setresourcepack
cant find the java jacksblibraray that is recommended in some help articles
ngl i tried chatgpt for this one:
public class ResourcePackHashGenerator {
public static String generateSHA1Hash(String filePath) throws Exception {
// Load the file
Path path = Paths.get(filePath);
byte[] data = Files.readAllBytes(path);
// Get SHA-1 digest
MessageDigest digest = MessageDigest.getInstance("SHA-1");
byte[] hashBytes = digest.digest(data);
// Convert to hex string
StringBuilder sb = new StringBuilder();
for (byte b : hashBytes) {
sb.append(String.format("%02x", b));
}
return sb.toString();
}
}
and from what i know it makes sense
then u need the URL of ur resource pack and its hash and set the pack
if the player doesnt have it yet: he will download it, if not: it will automatically load it via the hash
Thank you @hybrid turret @blazing ocean
that led me to convert the string to a hash in website
really appreciate the help thank you ❤️ 💚 💙 🤟
durability is now part of ItemMeta. To avoid confusion and misuse, getItemMeta(), setItemMeta(ItemMeta) and Damageable.setDamage(int) should be used instead. This is because any call to this method will be overwritten by subsequent setting of ItemMeta which was created before this call.
oh nvm
i just saw it
thanks tho rad
i was blind apparently
sets the damage
Does this mean it sets how much durability is removed or how much is left?
?tas
tbh
fair enough
i asked bc i don't have the resources (or balls) to try it rn since i'm at work lmao
buuuuuuuuuuuut since ItemStack#setDurability just passes the value to Damageable#setDamage, ig it's the durability
damage means how much durability is taken away
full durability is 0 damage
you should use damageable and use setmaxdamage and setdamage
oh so it is inverted from what it was before okay
thanks
to whoever gave me the idea with the ItemBuilder, i love you dude. idk why i didnt think of this earlier, lol
How do I use the Colorable interface?
when I use ItemDisplay#setRotation does setТeleportationDuration work for him?
whats the best way to store changeable messages like what file type
Usually .yml
declaration: package: org.bukkit.material, interface: Colorable
or do i just setDamage with the Color.getData()
or in other words: how do i set a dye color? i can only find old shit in the forum
If you're changing the transformation matrix, then use the setInterpolationDuration
I prefer to change the actual rotation for parts rather than LeftRotation
like here
this is so that you don't have to bother with converting back and forth from EulerAngle to Quaternionf
@sterile breach u wanted to send me ur code for ur PaginatedGUI/Menu approach, just a reminder (i would have forgotten, if i didnt note it down)
depends on what you want to color
but it mostly applies to blocks like beds
and stuff you can color by clicking on it
like signs
items.
soooo i guess beds, wool and dye?
yeah not for items
I see. I would assume that teleportationDuration should work for this then.
yes and entities like sheep and shulker
ahh
but like why do you need it
ItemBuilder
wdym
dont add methods you aint gonna use
just expand it as needed
unless you wanna release it as an API
in which case there are like a billion already probably
and is hard to do properly for all cases
yeah that doesn't really matter
i basically do all of my project without extra stuff
bc it's my learning project
right
well better know now instead of when i need it(?)
wrong reply
meant this one
well its like the exact opposite
for me it isn't
it's less about functionality
more about just doing stuff
sooo again, what would be the today way of setting item colors?
idk
apart from what I did I have not found a nice api to use
but essentially, manually
hmmm alright guess i'll go through the docs again, ty anyway :))
if you find a better way, please lmk xD
i will lol
hello
It should return true or false smth..but it returns string false i really got no idea why
]: Error occurred while enabling NarniaCore v1.0 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "lt.narniacore.play.MainClass.getCommand(String)" is null
@Override
public boolean onCommand(CommandSender sender, Command command, String alias, String[] args) {
Player player = (Player) sender;
if (command.getName().equalsIgnoreCase("upick")) {
if (args.length != 1) {
player.sendMessage("§8(§c!§8)§7/upick §8<unbreaking/fortune/efficiency>");
return true;
}
if (!player.getInventory().getItemInMainHand().getType().equals(Material.DIAMOND_PICKAXE)) {
player.sendMessage("§8(§c!§8)§7Norint tobulinti įrankį, tau reikia jį laikyti rankoje!");
return true;
}
ItemStack pickaxe = player.getInventory().getItemInMainHand();
if (args[0].equalsIgnoreCase("unbreaking")) {
if (getBlocks(MainClass.instance, pickaxe) >= 100) {
player.sendMessage("" + getBlocks(MainClass.instance, pickaxe));
ItemStack newPickaxe = registerUpgrade(MainClass.instance, pickaxe, player, 100);
;
player.getInventory().setItemInMainHand(newPickaxe);
return true;
}
return true;
}
if (args[0].equalsIgnoreCase("fortune")) {
player.sendMessage("fort");
return true;
}
if (args[0].equalsIgnoreCase("efficiency")) {
player.sendMessage("eff");
return true;
} else {
player.sendMessage("§8(§c!§8)§7/upick §8<unbreaking/fortune/efficiency>");
return true;
}
}
return true;
}```
It looks like you forgot to register your command in the plugin.yml
well
the thing it used to work
I'll double check
yeah it's not. But it's some intelliji problem. It keeps making it to old version
thank u
is there a way to check if player has permissions on AsyncPlayerPreLoginEvent
there is no player at the pre login event
i mean if you use luckperms you can use their api ig
yeah I know but pure spigot
All you use should really be the UUID provided in the event, using a permission plugin’s api.
Checking that way
you still can;t get accurate perms as they may differ by world
yeah im just gonna go to user Join Event then
much safer
yes
use OfflinePlayer to check
Nah it’s on temp servers so mostlikey not played before
then why was it a question?
bc I dont wanna force plugin users to 1 permission system
and you don't need to
OfflinePlayer has permissible
so just do OfflinePlayer.hasPermission()
But will that work if I eg. have luckperms running(syncing with db) and using cloud system I create a minigame server fresh, no data, will Offlineplayer perms check still work there?
that's not a thing 🤔
can some1 please explain what I'm doing wrong here?:
Bukkit.getScheduler().runTaskLater(this, new Runnable() {
@Override
public void run() {
// code
}
}, 100);```
The error cones under `runTaskLater` and says `The method runTaskLater(Plugin, Runnable, long) in the type BukkitScheduler is not applicable for the arguments (CmdStart, new Runnable(){}, int)`
Thaks :P
Use lambda
Bukkit.getScheduler().runTaskLater(this, () -> {
// Code here
}, 100L);
still giving the same error :/
whatever this/CmdStart is, it is not a Plugin instance
idk if im missing something esomewhere else
you need to pass your Plugin instance to the scheduler
Oh yeah, the this must be a plugin instance.
could u explain what that is? I only started learning a few days ago so idk what im doing tbh
you will need to parse an instance of the class where you extend JavaPlugin
Check the javadocs https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/scheduler/BukkitScheduler.html#runTaskLater(org.bukkit.plugin.Plugin,java.lang.Runnable,long), the first argument must be a Plugin instance
declaration: package: org.bukkit.scheduler, interface: BukkitScheduler
how would i go about implementing serializing and deserializing objects from and to database (and ideally using a single table for all implementations of the object)
like, should i serialize with gson and then save to db as string?
or in different way
probably, that's what i would do.
depends on what you want to serialize and deserialize. but serializing with gson and storing the string is generally not the way to go
also what do you mean by "using a single table for all implementations fo the obkect"?
do you want to serialize to binary or serialize to a string?
whichever would be the best
in mysql, there is blob = binary large object
bc this sounds like it violates https://en.wikipedia.org/wiki/Third_normal_form
Third normal form (3NF) is a database schema design approach for relational databases which uses normalizing principles to reduce the duplication of data, avoid data anomalies, ensure referential integrity, and simplify data management. It was defined in 1971 by Edgar F. Codd, an English computer scientist who invented the relational model for d...
i have an inteface Mail with implementations like ItemMail or CommandMail to store either string command or itemstack item
and i wanna load it to memory only when player is online
but 9mm bullets can?
what exactly does this "Mail" do? like what's the purpose, i can't wrap my head around it yet
it has a method to get the stored value from it
which could be anything depending on the implementation
I would probably serialize to base64 and then store it as a string
and a method which returns nothing and executes something to give player the thing stored in mail
if I was using mysql
you could technically serialize as a java object instead and store it as blob as well, which you don't need to really implement much for that except serializable
and the mail is created by another playing "sending" someone said item?
not exactly, its given to the player by server
when player is offline
to collect later
for example you cant give player an item if offline
like... a reward from an automated system or sum?
I would store the mail content however as a blob though
yeah
i see
i mean is there much of a difference between a b64 string and a blob?
yeah but isn't it just bytes represented as string?
not really
its just changing the format of the data or its representation
blob is just binary
well tbh not much discussion since blobs are also a lot faster, no?
i could maybe make the interface force implementations to implement a method that returns arr of bytes
they can be yes, but the down side is they can't be optimized and sometimes take up more space since mysql can't compress it
space issues? sounds like an end user issue 😎
NoSQL the best
❌
😂
we won't fight sql wars here now
these days space is not an issue you are right
not universal
please xd
it must be plug&play so sqlite
xdxddddxd
sqlite doesn't have blob
it does
that's why i'm using sqlite rn but i'll release a mysql version as well lmao
yes it does
im using blob with sqlite in my other plugin
best research
ah, well I wouldn't really see the advantage of that though lmao
If you are using sqlite, I would just store a reference to the text file
what
what do you think mail is?
💀 there could be possibly hundreds of thousands of mail files then
exactly
does anyone know any 1.8.9 factions plugins that calculate spawner value
you should have clarified
and the plugin is your virtual post office where your box is
1.8.9 o.o
i did say it
when i described the two implementations i was thinking of
items and commands
but I do remember this discussion though
didn't we discuss this like a month or so ago
^
im positive we didnt
I am pretty sure we did
because ive created the project a week ago
mustve been sometihng else then
- i didnt ask questions related to it here
maybe other person, but that's besides the point.
but yeah ig blobs would be the way to go
wait did we settel yet what db u are using?
mysql?
best version for factions
they want to use sqlite
oh
they want it to work without user having to do anything else
okay
well okay i get that tbh
the only downside with using sqlite is no cross server mailing
sure, but something some users may actually want lol
back in my days there was only one server 👴
sqlite for now*
i mean u could eventually release 2 versions. simple and advanced
one with sqlite and one with mysql
or whatever db server you want to use
i can just abstract my databases
I see Sqlite just as a fallback in case the user doesnt have a proper SQL database.
Makes it easier because you only need to implement the persistence once.
dang i need to learn javas serialization now
also hello mr bratwurst
since a post box could contain quite a bit, I would probably go with blob
however I wouldn't use sqlite at all though for this
one singular item? damn
since these boxes are going to be what no more then 100kb or whatever
do you guys have some resource where i can learn javas serialization
I would serialize to NBT into binary file with a simple storage format to easily separate the data and then dedicate like 30mb of memory to memory map files.
you should easily be able to load and save thousands of post boxes this way
this also makes it easier to implement error detection code and error correction code
or alternatively, as you said
i could make json for each player
and only load to memory on join
well my method will allow you to offload objects from memory if a box isn't being used at the moment while keeping the file in memory to re-setup the objects
how do you load a file in ram
Read it
isnt file in ram when you're reading it because you are reading it from the hard drive
ye
❓
not necessarily no
you read it and store contents somewhere
like in a map or list
Any data that is stored in a variable, is stored in ram
when you read from a file, it has to read the bytes in first. When you memory map a binary file, it just gets lobbed into ram in its entirety
your config.yml is loaded to ram on startup for example
and only loaded again with reload or saved with save
so a slight difference from reading a file on hard disk and memory mapping a file and then reading it
small question how do you check what block is on a block?
like what block is on spruce_log and if its air place a item frame on it (every spruce_log)
so whenever someone places a diamond block u want to place an armorstand above if possible?
yea but like on all so also if its generated by world
do diamond blocks even generate
o your right
only in woodland mansions iirc
but i mean as example
well thats pretty difficult to do
Im sensing a lag machine
u would prolly have to meddle with the world generator
ik thats why i asked help :)
or make a lag machine xd
lol
well im not smart enough to help you with custom world generation sorry
o but isend it both on player place and world generation? is that the same?
simplest would be to scan the chunk on load if its a new chunk
else in teh chun generator
What are you trying to achieve in the first place?
ummm place a itemframe on configedblock1
What for?
minecraft plugin
😂
lol
lol keep going smile, he may tell you after 20 questions
placing a unholy amount of entities to lag the server the plugin 💪
no lol
anyways
?
People tried to help but you give near to zero information
the rest of the plugin is not inportand
yes it is, which is why people asked for information
i just need to know how to scan blocks
what if now this is wild absolutely wild, what if there is a better way to do what you want to do
then i will discover it later
how to scan blocks? Block#getRelative(BlockFace.UP)
I wouldn't do that thousands of tens of thousands of time on the main thread
terrible idea
just on start and player place?
If you want to scan blocks make chunk snapshots on the main thread using work distribution and then process them asynchronously. You need to resync to the main thread to actually do things at that location. The scanning itself though outside of making the ChunkSnapshot can be done on many threads simultaneously. This should boost the actual time it takes to scan thousands of chunks. It'll still take a while, but improve performance a ton.
I got another one
for(int x = Integer.MIN_VALUE; x <= Integer.MAX_VALUE; x++) { ... you get the idea
interesting
i love the <= part
Depends on what you are trying to do. There are so many possibilities
use longs next time
Wouldnt want to lose the edge
surely it won't loop :4head:
raydan are you walking home rn or something
so you are making a lag machine
i want to place a item frame on every spruce_log
stop lying!
no I'm home already
then why deafen
because I'm watching a yt video
? not a lag machine XD will problebly lag tho but no
Not going to happen
why?
you can do it.
ChunkLoadEvent,
BlockPlaceEvent,
BlockBreakEvent.
Asynchronous processing in ChunkLoadEvent after grabbing a snapshot. It'll kill the servers performance, but it does as they want
thanks
Stop giving him ideas like this... He is actually going to try and implement that
I'm assuming this is malicious
yep I hope he wastes hundreds of hours doing it
only to find out it literally brings the server to its knees
is there a better way? i mean like in a 100 block radius of a player?
LOL
i just starded java let me find out how stopid i am by my self
oh if you just started java go at it
hopefully you learn your lesson after committing hundreds of hours to this
do as I said it'll work perfectly
well the server won't like it kekw
but clearly you give 0 fucks about that
Tell us what your end goal is, and we will point you in the right direction.
We'll let you figure out the way yourlsef.
its a secret. This is the next hypixel right here
no its rily simple just place item frames on spruce_logs . nothing more
I genuinely want you to implement this and learn your lesson. Here are my suggestions
If you want to scan blocks make chunk snapshots on the main thread using work distribution and then process them asynchronously. You need to resync to the main thread to actually do things at that location. The scanning itself though outside of making the ChunkSnapshot can be done on many threads simultaneously. This should boost the actual time it takes to scan thousands of chunks. It'll still take a while, but improve performance a ton.
ChunkLoadEvent,
BlockPlaceEvent,
BlockBreakEvent.
In that case do what Y2K suggested. Check BlockPlaceEvents and create a Snapshot in the CunkLoadEvent to scan it async.
now go do it
yea thanks :)
remember you need to resync to spawn entities and place blocks 👍
Bukkit scheduler
Bukkit.getScheduler().runTask()
it'll queue your sync operation for the next tick
though in the case where your dealing with on mass smile has a good thread on work distribution
?workdistro
you can make your work distro queue thread safe instead of using an array deque
and queue to your distro setup asynchronously
depends on the situation idk if there are more Deque implementations
many data structures have different thread safe implementations
for different cases
https://paste.md-5.net/afodivomah.php
for some reason, this only prints one parent above, and doesn't get the root. the root should be the first parent which starts the whole recursive call and should all match
[17:45:03 INFO]: missing.plugins.turboenchants.syntax.sections.ConditionalSection@1add20cb
[17:45:03 INFO]: missing.plugins.turboenchants.syntax.sections.ConditionalSection@1add20cb
[17:45:03 INFO]: missing.plugins.turboenchants.syntax.sections.iterables.ForSection@5e2ab59d```
instead these are the "roots" it found
also the actual root is a FunctionSection
https://paste.md-5.net/ezusakafup.php
thhis is setParent and getParents because i forgot to include them
i think the issue is with getParents
it gets the root as the last child of the actual root
No I don't mind using freeminecraftmodels.
- It does work with bdengine models or should I (re)create the model using blockbench ?
- I don't want to use resource packs. Does it loads models as entity/block display (instead of client side entities using resource packs) ?
Hello! How can I load the chunk for my falling block. I have made a plugin with airdrop which spawn on a random location falling block. But if the chunk isn't loaded it bugs and don't work. How can I load the chunk when my fallingblock spawns?
my startdrop method: https://paste.md-5.net/gunubuviri.cs
Can provide full code if you need.
I tried it with location.getWorld().getChunkAt().load(true); but it don't work
Chunk plugin tickets probably.
declaration: package: org.bukkit, interface: Chunk
Don't forget to remove it after it falls.
I'll try thanks
I need help setting up mmocore, mmoitems and mythic mobs to have classes with upgradable skills with skill points. The tricky part I am dealing with is that I cannot figure out how to attach an MMOcore skill to an MMOItem item. It seems that the MMOitem is basing its stats off the default skill damage values rather than the value of my skill points level. If you are deeply familiar with these three plugins please
Can anyone help please ?
Why do I get this errors ?
https://media.discordapp.net/attachments/1176397184434966608/1276550581187510415/image.png?ex=66c9efdf&is=66c89e5f&hm=c378e1a226a7c915fcda4bdc3a110123289e6b9647dab1a4ecae1ec81e7d3032&=&format=webp&quality=lossless
I got maven and Eclipse installed
Your maven/Gradle doesn't have spigot as a dependency
Checkt hat ur pom.xml or build.gradle has the spigot dependency
Is this right ?
Spigot 1.21.1
Is your main class detecting it?
can you come general 2 ?
I'm kinda new to plugins
Can't rn, I'm on the road, kinda difficult sorry.-.
Oh ok, stay safe bro
Can you tell me how can i find the pom.xml ?
that's the project's folder
hey y'all im having issues with Entity#copy, its just not working even though (i think) im using the method correctly
for (Entity entity : entitiesMap.keySet()) {
try {
entity.copy(entitiesMap.get(entity));
Snapshots2.getInstance().getLogger().info("Copying entity: " + entity);
} catch (IllegalArgumentException e) {
Snapshots2.getInstance().getLogger().info("Couldn't copy entity: " + entity + " to " + entitiesMap.get(entity));
}
}
[16:33:20 INFO]: advaits issued server command: /rollback
[16:33:20 WARN]: Skipping Entity with id
[16:33:20 INFO]: [Snapshots2] Couldn't copy entity: CraftBat to Location{world=CraftWorld{name=world},x=291.833160281426,y=1.553220565947573,z=194.6250547816754,pitch=0.0,yaw=328.55582}
[16:33:20 WARN]: Skipping Entity with id
[16:33:20 INFO]: [Snapshots2] Couldn't copy entity: CraftRabbit{RabbitType=WHITE} to Location{world=CraftWorld{name=world},x=270.22702206520245,y=68.0,z=195.27166055508525,pitch=0.0,yaw=309.91156}
[16:33:20 WARN]: Skipping Entity with id
[16:33:20 INFO]: [Snapshots2] Couldn't copy entity: CraftSquid to Location{world=CraftWorld{name=world},x=396.9719316959381,y=59.0,z=196.7118338868022,pitch=0.0,yaw=1.4288096}
[16:33:20 WARN]: Skipping Entity with id
[16:33:20 INFO]: [Snapshots2] Couldn't copy entity: CraftCreeper to Location{world=CraftWorld{name=world},x=359.5,y=-39.0,z=188.5,pitch=0.0,yaw=-216.25058}
[16:33:20 WARN]: Skipping Entity with id
[16:33:20 INFO]: [Snapshots2] Couldn't copy entity: CraftZombie to Location{world=CraftWorld{name=world},x=311.5,y=-33.0,z=151.5,pitch=0.0,yaw=-61.99251}
[16:33:20 WARN]: Skipping Entity with id
[16:33:20 INFO]: [Snapshots2] Couldn't copy entity: CraftRabbit{RabbitType=WHITE} to Location{world=CraftWorld{name=world},x=439.5,y=64.0,z=77.5,pitch=0.0,yaw=100.00048}
[16:33:20 WARN]: Skipping Entity with id
[16:33:20 INFO]: [Snapshots2] Couldn't copy entity: CraftSpider to Location{world=CraftWorld{name=world},x=367.04761786932096,y=-9.0,z=81.00035534411637,pitch=0.0,yaw=29.89267}
[16:33:20 WARN]: Skipping Entity with id
[16:33:20 INFO]: [Snapshots2] Couldn't copy entity: CraftPolarBear to Location{world=CraftWorld{name=world},x=385.30000001192093,y=63.0,z=138.99650873306211,pitch=0.0,yaw=122.74106}
[16:33:20 WARN]: Skipping Entity with id
[16:33:20 INFO]: [Snapshots2] Couldn't copy entity: CraftSpider to Location{world=CraftWorld{name=world},x=331.80325859729817,y=2.0,z=211.60811701805764,pitch=0.0,yaw=163.68027}
[16:33:20 WARN]: Skipping Entity with id
[16:33:20 INFO]: [Snapshots2] Couldn't copy entity: CraftGlowSquid to Location{world=CraftWorld{name=world},x=371.48499831790105,y=18.849162741564214,z=233.3240877033677,pitch=0.0,yaw=0.4824977}
[16:33:20 WARN]: Skipping Entity with id
[16:33:20 INFO]: [Snapshots2] Couldn't copy entity: CraftRabbit{RabbitType=WHITE} to Location{world=CraftWorld{name=world},x=380.50741861649124,y=62.3544480140121,z=139.20000000298023,pitch=0.0,yaw=179.22757}
[16:33:20 WARN]: Skipping Entity with id
[16:33:20 INFO]: [Snapshots2] Couldn't copy entity: CraftBat to Location{world=CraftWorld{name=world},x=308.54768769645653,y=25.87341376651692,z=98.57801031208602,pitch=0.0,yaw=1690.7703}
[16:33:20 WARN]: Skipping Entity with id
[16:33:20 INFO]: [Snapshots2] Couldn't copy entity: CraftRabbit{RabbitType=WHITE} to Location{world=CraftWorld{name=world},x=212.02797420747694,y=74.0,z=358.89050697575414,pitch=0.0,yaw=149.42606}
[16:33:20 WARN]: Skipping Entity with id
[16:33:20 INFO]: [Snapshots2] Couldn't copy entity: CraftZombie to Location{world=CraftWorld{name=world},x=428.28041226900507,y=-9.0,z=124.52208668761494,pitch=0.0,yaw=251.41702}
...
EDIT: the solution is to use EntitySnapshot instead of Entity#copy
how would I go about making a list of Locations (and then ItemStacks but I can probabyl figure that out after)?
I have ArrayList<Location> chests = new ArrayList<Location>();
But how do I add Locations to the list?
ok, there any steps should i do here or here ?
ty for replying
how?

hi, do you have to check if the meta is not null before doing methods on it?
ItemStack carrot = new ItemStack(Material.CARROT, 1);
ItemMeta meta = carrot.getItemMeta();
declaration: package: org.bukkit.inventory, class: ItemStack
in that instance, no. But an ItemStack is not guaranteed to have meta
currently only AIR has no meta
oh
water has meta?
so do i actually have to? with my carrots
Water can't be an itemstack tho
That happens automatically when you get it from an itemstack that can have a meta
TECHNICALLY, no Bukkit ItemStack has ItemMeta by default 👀
Currently all ItemStacks (other than AIR) have meta, but its good practice to check as it can be null
It just gets created automatically when getItemMeta() is called
BARRIER has itemMeta?
Yeah. Display name, lore, etc.
Why wouldn't it
XD
is
!carrot.hasItemMeta()
and
getItemMeta() != null
the same?
what about air
kinda dont get it
I think its less expensive
so what if it has not?
Pretty sure has item meta isn't the same as getMeta != null
getItemMeta literally reconstructs the whole item each time you call it
then its AIR or you messed up bad
Implementation wise
No. getItemMeta() will create a new instance of ItemMeta if one doesn't exist. hasItemMeta() will not
Choco == chocolate
yes it will
so why cant i just always use getItemMeta
good programming practices
but why
CraftItemStack#hasItemMeta calls getItemMeta, it's creating a new meta instance
if it can be null you check before usign it
why not get it, assign it to a variable
and then check if its null
if its not nmull (i.e. 99% of cases) you alreay have a variable of the meta
if it is?
It's null if it's air
If its Marcely99 it will be null
why is this a debate
return?
return the cat
like idk what your code is supposed to do
and if not null take the cat
eat the cat

how for what?
i mean you said use the snapshow entity... how you make that? for curious :3
public class EntityUtil {
public static Map<EntitySnapshot, Location> copyEntities() {
Map<EntitySnapshot, Location> entitiesMap = new HashMap<>();
for (World world : Bukkit.getWorlds()) {
for (Entity entity : world.getEntities()) {
if (!(entity instanceof Player)) entitiesMap.put(entity.createSnapshot(), entity.getLocation());
}
}
return entitiesMap;
}
public static void placeEntities(Map<EntitySnapshot, Location> entitiesMap) {
for (int i = 0; i < 2; i++) { // Need to run this code twice to account for any dropped items when entities are removed (e.g. minecart chests).
for (World world : Bukkit.getWorlds()) {
for (Entity entity : world.getEntities())
if (!(entity instanceof Player))
entity.remove();
}
}
for (EntitySnapshot entitySnapshot : entitiesMap.keySet()) {
try {
entitySnapshot.createEntity(entitiesMap.get(entitySnapshot));
} catch (IllegalArgumentException e) {
Snapshots2.getInstance().getLogger().info("Couldn't copy entity: " + entitySnapshot + " to " + entitiesMap.get(entitySnapshot));
}
}
}
}
ignore me clearing the existing entities you dont need to do that
but yeah just use Entity#createSnapshot and then you can do entitySnapshot.createEntity
its not perfect, currently im having issues with paintings because theyre not placing properly
How can I add a beginner tag below the player name? I'm using spigot 1.8
Sharpie
Hi, just created a Spigot plugin project in 1.21 with jdk 21 using the Minecraft Development extension on IntelliJ and now I cant call or import the Material class even tough it's present in the external libs, (its icon is the one of the decompiled classes tho which is not normal)
update IJ
alr thanks will do
how to do on 1.20 then
I actually
maybe thats in 1.8 too
kek
public void displayTitle(Player player, Title title) {
World world = player.getWorld();
Location location = player.getEyeLocation();
String titleContents = ColorUtil.parsePlaceholders(player, title.getTagContents());
TextDisplay textDisplay = world.spawn(location.clone(), TextDisplay.class);
Vector3f offset = new Vector3f(0, 0.15f, 0);
AxisAngle4f rotation = new AxisAngle4f();
Vector3f scale = new Vector3f(0.75f, 0.75f, 0.75f);
Transformation transformation = new Transformation(offset, rotation, scale, rotation);
textDisplay.setText(titleContents);
textDisplay.setBillboard(Display.Billboard.CENTER);
textDisplay.setBackgroundColor(Color.fromARGB(0x80333333));
textDisplay.setCustomNameVisible(false);
textDisplay.setPersistent(false);
textDisplay.setSeeThrough(false);
textDisplay.setShadowed(false);
textDisplay.setInvulnerable(true);
textDisplay.setTransformation(transformation);
this.activeTextDisplays.put(player.getUniqueId(), textDisplay);
this.activeTitles.put(player.getUniqueId(), title);
player.sendMessage(ChatColor.GREEN + "You have just equipped the " + ColorUtil.convertLegacyColorCodes(title.getDisplayName()) + ChatColor.GREEN + " title!");
player.addPassenger(textDisplay);
}```
Displays just below the player name (also I use the legacy serializer / minimessage for cooler color formatting support)
K bye
this is especially funny since there are no display entities in 1.8
I did say modern
exactly
You could probably do basically the same thing with armor stands tho
Not sure if armor stands have a transformation method tho
(probably not)
no this is not the same. first of all, I assume you meant to flip one of those boolean expressions, carrot doesn't have item meta, carrot does have item meta. so if you did, they are not equivalent.
oh..
i actually
did it without the !
then added it
yea, without it
should be
this prints false and then true
Implementation details moment
I mean its a legit issue. I think a lot of people think hasItemMeta is just a getItemMeta != null check
and it is not
the javadocs for hasItemMeta are pretty correct, but the javadocs for getItemMeta are doing no favors to the confusion
because it doesn't return a copy of the current defined meta, if there is no defined meta, it returns a blank meta for the stack's type
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/Entity.html#getNearbyEntities(double,double,double)
1/2 the size of the box along x axis
player box: (1;2;1) so to expand all from 1 in every direction I have to do ?
getNearbyEntities(2, 1, 2)
The players y coordinate is always their feet
🐾
wait, do skulls actually expose the full player texture?
just a link
but when getting that texture does it get the full player texture?
the client does
Can anyone suggest a way or give an example of how I would go about structuring a custom animation system. I want to be able to do fancy animations with Armorstands and Particles but I'm stuck with how I would be able to do it in a way were implementing new animations requires less effort than the last, any suggestions?
smh mojang
https://github.com/bradleyq/stable_player_display/tree/main I can't believe this might actually work
Thats not for 1.8.8
I'd imagine you can basically replicate that with armor stands, just dont think they have a transformation method
But I like my cave full of rocks
kek
no it doesn't exist in the api, however there is libraries that exist for it or you could just make it yourself
do you know what lib is it?
no, I generally just had my own stuff for that because relatively it isn't hard to do yourself
I only know of libs existing because back then I had friends mention stuff about them and what not
Is vector3f a bukkit object?
no
What does this look like
let me go find a pic
spammer
That was supposed to be the second one lol
The transformation used here is to allow enough spacing for the actual player name, as well as armor and that glow cosmetic
Oh
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/util/Vector.html#toVector3f()
Yeah I'm stupid it's ok
Is this a spigot bug? looks like the BlockIterator isn't working as expected dues to some internal BlockFace
[19:32:46 ERROR]: Could not pass event EntityDamageByEntityEvent to Cannons v3.0.1
java.lang.NullPointerException: Cannot invoke "org.bukkit.block.BlockFace.getOppositeFace()" because "this.mainFace" is null
at org.bukkit.util.BlockIterator.<init>(BlockIterator.java:145) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
at Cannons (5).jar/at.pavlov.cannons.utils.CannonsUtil.findSurface(CannonsUtil.java:606) ~[Cannons (5).jar:?]
at Cannons (5).jar/at.pavlov.cannons.CreateExplosion.blockBreaker(CreateExplosion.java:163) ~[Cannons (5).jar:?]
at Cannons (5).jar/at.pavlov.cannons.CreateExplosion.detonate(CreateExplosion.java:778) ~[Cannons (5).jar:?]
at Cannons (5).jar/at.pavlov.cannons.CreateExplosion.directHit(CreateExplosion.java:760) ~[Cannons (5).jar:?]
at Cannons (5).jar/at.pavlov.cannons.projectile.ProjectileManager.directHitProjectile(ProjectileManager.java:155) ~[Cannons (5).jar:?]
at Cannons (5).jar/at.pavlov.cannons.listener.EntityListener.onProjectileHitEntity(EntityListener.java:47) ~[Cannons (5).jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor192.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:1.20.6-148-20f5165]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.6.jar:1.20.6-148-20f5165]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[paper-1.20.6.jar:1.20.6-148-20f5165]
probably a Paper bug
?whereami
Doesn't mean paper / spigot aren't vastly different
Maybe one day people will learn why forks exist and realize that they aren't 100% compatible with each other.
🤷
Wishful thinking ig
My 3ds game shoudl work on a PS5 as they are both consoles, right
100%
Well, this is more like "will my spigot plugins work on paper"
Make it ps5 game on 3ds
Now that's more like paper plugin on spigot
Running out of manhwa to read/watch. I may have to get up and do some housework 😮
I feel you man
Yo i have quick question, how ItemsAdder features like custom emojis (like in fortnite) are made?
Wdym like in fortnite?
that too kek
This is minecraft
How do we make sure that a fake death doesn't hinder the statistics..? Like kills death killstreak
@EventHandler
public void onPlayerDamageByPlayer(EntityDamageByEntityEvent event) {
if (event.getEntity() instanceof Player && event.getDamager() instanceof Player) {
Player victim = (Player) event.getEntity();
Player killer = (Player) event.getDamager();
// Eğer oyuncunun canı kritik seviyeye inmişse sahte ölüm gerçekleştir
if (victim.getHealth() - event.getFinalDamage() <= 0) {
event.setCancelled(true); // Gerçek ölümü engelle
// Sahte ölüm işlemleri
victim.setHealth(20.0); // Canı tamamen doldur
victim.setGameMode(GameMode.SPECTATOR); // Spectator moduna geçir
// Ölüm ve öldürme istatistiklerini manuel olarak artır
victim.incrementStatistic(Statistic.DEATHS);
killer.incrementStatistic(Statistic.PLAYER_KILLS);
// 3 saniye sonra oyuncuyu spawn noktasına ışınla ve Survival moduna geçir
Bukkit.getScheduler().runTaskLater(this, () -> {
Location spawnLocation = victim.getWorld().getSpawnLocation();
victim.teleport(spawnLocation);
victim.setGameMode(GameMode.SURVIVAL);
}, 60L); // 3 saniye (60 tick)
}
}
}
For example, a fake death like this, after the player dies, he goes into spectate mode and teleports to spawn after 3 seconds
But there is a bad side of this system, the statistics do not increase. Logically, it does not increase because it is a fake death, but it is a real death, like statistics (Kills, Death, killstreak)
How can we make it increase? I tried a few methods but they were unsuccessful.
- The reason I made such a system is to completely hide the Respawn screen```
Through a fair bit of packet manipulation
That's what i thought but those are animation packets or what?
So which packets
with packets/nms you're basically on ur own
Eh there are some here who are knowledgeable
I am not one of them tbf
I assume you'd have to animate these emotes yourself, I just have no clue how you'd actually apply them
seems like with a model
from a custom ressourcepack
as the player sees its body when going back to first person
Maybe some display entity magic
maybe, but probably not
I'd think it'd be harder with display entities
that would be way too complicated to animate, using a ressourcepack and a custom model animation that'd be the preferred way in most cases
i'm just not excactly sure how the players skin is displayed with the correct textures from given player
tbf it looks like a mod
yeaa
Shader magic if you do it yourself.
Otherwise, look through the ItemsAdder documentation.
ewwwww shaders
Yea, I don't even know where to begin with those.
I do know that custom animations like that are done with shaders to get your player skin on those body parts.
When it comes to a rather large multi module project such as a hybrid skyblock / rpg core that I'm working on, I'm not too sure what should be delegated to different modules ie: base api, common, skyblock / rpg api, etc... that being said would it be suggested to try a rather reverse engineered approach and define mechanics / gameplay aspect then work on abstractions / interfacing everything out?
hey, im looking for a web panel to manage minecraft servers scattered in different machines. heres how i want it to work:
- install a plugin on the mc server
- link the server to the panel
- manage files, logs, tps, playercounts blah blah blah from the panel
is there anything similar to what i want?
p.s: NOT docker based
Hello, how can I check if an item is a sword ?
for my personal experiance I have 3 modules, spigot, proxy and common everything that can be put into common is put into common (also api for your case) that's what I'd do, I think
It's rather in the sense of this being such a large project
I've got my dependency tree figured, it's just onto the actual impl of these modules
How do i get nms in spigot 1.21 using maven?
check jeff media's blog post
https://blog.jeff-media.com/nms-use-mojang-mappings-for-your-spigot-plugins/
In which I just probably don't have enough written out to actually abstract / interface things yet
thanks
if all module have acces to api why don't put it in common?
Common I was saving for the more reused abstractions, whereas base api I wanted to define generic interfaces for whatever
Cloudnet
Idk if they have a webpanel though
is it self hosted
Yes, it's for server automation and clustering
of what I know defining interface and util if you plan to have people rewrite certain things but if it's just for one use I'm not sure it's util
example:
Base api:
public interface Invite {
UUID getInviter();
UUID getInvitee();
boolean isExpired();
}
Common:
public class InviteImpl implements Invite {
private final UUID inviter;
private final UUID invitee;
private final Instant expiryTime;
public InviteImpl(UUID inviter, UUID invitee, Instant expiryTime){
this.inviter = inviter;
this.invitee = invitee;
this.expiryTime = expiryTime;
}
public UUID getInviter() {
return inviter;
}
public UUID getInvitee() {
return invitee;
}
public boolean isExpired() {
return Instant.now().isAfter(expiryTime);
}
}```
There are some plugins that create a webinterface (not specifically to maintain cloudnet), you can theoretically combine those if you really want one to have one
Base api is simply there to hold my very generic interfaces (for the most part)
Whereas the skyblock / rpg api's would be where other plugin devs actually use to do whatever
well common is included in that as well
well
common (with interfaces) -> imported in api and import api in your plugins
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Entity.html#getNearbyEntities(double,double,double)
is the source entity returned?
See in my vision, base api, like I said just holds my generic stuff ie: no depends on anything, common uses base api for some basic and reusable implementations, skyblock / rpg api for other devs + my actual gameplay / mechanic implementations
as defined in the tree, I just don't know how to go about actually filling in the missing pieces, such as I may define a mechanic that can be reused in either rpg / skyblock modules, this should probably be held in common right? I think my issue is that I just need to keep writing out the mechanics and what not, then decide what would be applicable to whatever module
nvm i just want a panel for 1 server
Pterodactyl Panel?
no. just a simple panel for managing a single mc server (possibly a plugin) that can be used for files, logs and.....
Pterodactyl has all of that though...
Otherwise you're just looking at a basic server that you can ssh into
but its docker based
So?
docker prob has a team of 50 engineers brainstorming ideas on how to block access to my country even more
wut
I mean, proxies do exist.
Using servers in other countries is also an option.
You are running this on a remote server right?
it depends what country they're from
I'd imagine things would not be simple if it were somewhere like Iran
they work day in day out trying to make it almost impossible to access the outside web. Not to mention owning a server outside of the country is a huge no no
not docker based is a huge ask, honestly you might be best off making a simple py script that you can use from ssh
Its unfortunate, but being resourceful is pretty much all you can do here
you could also try to modify pteradactyl to run outside of docker. Which I imagine wouldn't be impossible
If that's the case then we can go down the list of other panels.
- PufferPanel
- Multicraft
- NodeMC
- Any hosting service (if you're going to pay for a server anyways)
Not sure if these are docker based or not
Seems like you can do PufferPanel with and without docker
seems like a pretty reasonable option given the situation
its a remote server but we put lag free and cheap on all of our adverts but running it in another country is not lag free nor cheap
check out PufferPanel
thanks
this seems to be almost exactly what you'd need
don't thank me thank @kind hatch
I just started looking through the list he posted :P
exactly
nah dude its not north korea here, just the ||dumb|| us sanctions
Yeah I had an online friend from Iran its tough shit over there
idk what happened to them I think they lost access to discord because of something
discord is unbanned... i think
when i asked one of my friends, he said the wanted to block the cdns but they accidentaly unblocked discord
doesnt seem real to me
theres a new president that made bold claims about removing sanctions and international trading and free internet and other shit
Is there any way to make these a,b,c things from nms to readable values?
Compare different mappings with this website: https://mappings.cephx.dev
is 1.21 supported? and i have the BuildTools.exe i dont know how to do it there
Yes, --remapped supports anything above 1.17.1
You just need to go to the Options Tab and select Generate Remapped Jars
i've done that at the first time i generated the dependency. as far as i know i can still use maven with it right?
i will try it again maybe it works then? idk
yeah i removed the repo and changed spigot-api to just spigot
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.21-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>
Why don't we have this as a command?
ohh so i just forgot the classifier?
Probably
hm okay now
WorldServer, EntityPlayer and stuff like this arent working any more
That's cause everything is now using Mojang names.
Instead of Spigot names
Things will be deobfuscated, but will also be named differently
This is where the mappings site comes in handy
WorldServer > ServerLevel
EntityPlayer > ServerPlayer
I see alright thanks
Hello guys, I'm here for advice. Let's say I have:
Listener a: Cancels blockBreakEvent
Listener b: Gives exp for mined blocks to unlock better blockbreakers.
It doesn't take durability from item, because event is cancelled in Listener A, but gives exp from listener B. What priority should I put on Listener a and on Listener b