#help-development
1 messages · Page 418 of 1
i know you can do that with items (like mcci does, with the orbs and magic sparks) but idk about mobs
im not looking to change the way these mobs are animated or move or anything btw, just a retexture
Fairly sure you can’t do that, but you definitely can’t do it with Entity#setMetadata
That metadata is never sent to the client
Has anyone seen that cool thing you can do with rain packets to make rain change the sky's color? how can I do that?
Not asking for spoonfeed, just wondering what do I have to look into because I've never worked with packets
can anyone give me some hints on how can I go and make interactive holograms which update on client side?
I was thinking of armor stands and changing its name, but then it would update for all players which is something I don't want
You use armorstands and packets
Instead of sending the packet to all players you send the packet to just the one player
And then you have to listen for those packets from players too
Now when using the armorstands you dont make them on the server instead they only exist in code for the packets to the client
This way only that specific client knows about it
and what about right click interactions with armor stand?
can the client side armor stand still fire the interact event?
apparently not
You would have to listen for the relevant packets
You wouldnt be able to make use of most of the api because you dont want the server to know about your fake entity
If the server knows about it. Either it will conplain or turn it into a real entity or tell the client its fake and remove it lmao
Also if there is anyone who could help me with ItemsAdder i would pay them up to 20$.
Problem is i updated server from 1.18.2 to 1.19.3 so i updated itemsadder &lonelibs &protocollib too, 95% textures work but if i do /ia it says its loading, but its saying 12 hours straight so there is something wrong and i need to fix it with someone. Did not managed after 12h to fix it. DM me.
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (args.length != 1) return false;
sender.sendMessage("Creating world '" + args[0] + "'");
String name = args[0];
WorldCreator wc = new WorldCreator(name);
wc.generator(new DeepDarkChunkGenerator());
wc.biomeProvider(new DeepDarkBiomeProvider());
wc.createWorld();
sender.sendMessage("World created");
return true;
}```
one question guys
i have this command that generates a custom terrain world
but when the server is restarted it starts to generate normal world
how could I fix this?
HI , is it possible to make this number final for all enchantments?
i googled it , but i didn't seem to get any result
declaration: package: org.bukkit.inventory, interface: AnvilInventory
How To Cancel PlayerCommandSendEvent?
all enchantments books and repair too
sharpness 1 enchantment book = 15 level to enchant , etc etc all same ..
Listen to the PrepareAnvilEvent and set the cost on the anvil inventory
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/PrepareAnvilEvent.html
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/AnvilInventory.html#setRepairCost(int)
declaration: package: org.bukkit.event.inventory, class: PrepareAnvilEvent
declaration: package: org.bukkit.inventory, interface: AnvilInventory
thanks
event.getCommands().clear();
?
Yeah
that will work?
can this be achieved in the old versions?
?tas
ok
With a lot more work, yes
[10:09:35 ERROR]: POI data mismatch: never registered at BlockPosition{x=123, y=69, z=41}
[10:09:35 ERROR]: POI data mismatch: never registered at BlockPosition{x=122, y=69, z=41}
[10:09:35 ERROR]: POI data mismatch: never registered at BlockPosition{x=122, y=70, z=41}
[10:09:35 ERROR]: POI data mismatch: never registered at BlockPosition{x=123, y=70, z=41}
[10:09:35 ERROR]: POI data mismatch: never registered at BlockPosition{x=124, y=70, z=41}
[10:09:35 ERROR]: POI data mismatch: never registered at BlockPosition{x=125, y=70, z=41}
[10:09:35 ERROR]: POI data mismatch: never registered at BlockPosition{x=125, y=69, z=41}
[10:09:35 ERROR]: POI data mismatch: never registered at BlockPosition{x=125, y=71, z=41}
[10:09:35 ERROR]: POI data mismatch: never registered at BlockPosition{x=124, y=71, z=41}
[10:09:35 ERROR]: POI data mismatch: never registered at BlockPosition{x=123, y=71, z=41}
[10:09:35 ERROR]: POI data mismatch: never registered at BlockPosition{x=122, y=71, z=41}
[10:09:35 ERROR]: POI data mismatch: never registered at BlockPosition{x=122, y=72, z=41}
[10:09:35 ERROR]: POI data mismatch: never registered at BlockPosition{x=123, y=72, z=41}
[10:09:35 ERROR]: POI data mismatch: never registered at BlockPosition{x=124, y=72, z=41}
[10:09:35 ERROR]: POI data mismatch: never registered at BlockPosition{x=125, y=72, z=41}
[10:09:35 ERROR]: POI data mismatch: never registered at BlockPosition{x=124, y=69, z=41}```
why am I getting this error
public void fill() {
int portalID = getLastPortal();
for (int y = 1; y < height - 1; y++) {
for (int x = 1; x < width - 1; x++) {
Block blockAt = startBlock.getLocation().add(x, y, 0).getBlock();
blockAt.setType(Material.NETHER_PORTAL, false);
}
}
}```
this is the code that generates those blocks
Looks like POI wasn't registered
probably caused by you disabling the physics check
Then you're going to need to find a way to register the POI
what is POI?
not working
not working
I'm trying to compile spigot for 1.8 using BuildTools.jar on Windows. My git is set to checkout using LF line endings.
Despite this, my compilation still fails on the applyPatches step. Any ideas on how to fix this?
If I check the repo out myself, it works fine.
sup
delete everything in your buildtools directory, then download a new version of buildtools and try again. also, the git line-ending thing isn't needed from my experience, but I have to say that I only use git bash to run buildtools, maybe that makes a difference
also are you using java 8 to run buildtools?
Done this several times, on the latest version of buildtools.
I am also using Java 8 to run it.
I'll have a look at which bash I'm using, it might be the WSL one
Well, running it in git bash got me longer, albeit another error
Failed to execute goal on project spigot-api: Could not resolve dependencies for project org.spigotmc:spigot-api:jar:1.8-R0.1-SNAPSHOT: Could not find artifact net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT
Do I not need to add --compile spigot for 1.8?
you should just need to run
java -jar BuildTools.jar --rev 1.8.8```
dont think 1.8 is still hosted
That's not good then, I need NMS 1.8_R1 😅
who uses just 1.8
no, just do --rev 1.8
LMAO, 1.8.8 doesn't work either, same error
for me too, on mac and windows
what the heck?
lemme have a check, sorry for being a noob, been a while since I did java and spigot stuff 😅
Yeah, no settings.xml
as a quick heads up, 1.8 has the log4shell exploit
Darn. Means I need to add a patch for that too
Anyway, here's the 1.8 compile log if you want it
easier to not use 1.8
?paste the full buildtools output. you can directly save it to file
java -jar BuildTools.jar --rev 1.8 > output.txt 2>&1
Well yeah, but my plugin's had the support since forever so
use 1.8.8
you don't have to build against 1.8 to support 1.8
if anyone is still using 1.8.0 thats their issue
I do, since I use NMS
ah
weird, it's missing bungeecord chat. you could try if you find the 1.8 version of the chat module in the repo (go through the commits or sth), then manually mvn install that version: https://github.com/SpigotMC/BungeeCord
yeah, 1.9.2 doesn't compile either, same issue as the paste, bungeecord-chat
ig they arent hosted anyone 
Maven Central: net.md-5:bungeecord-chat:1.16-R0.4
Doesn't look like it
Oh for the love of god
thats 1.16
go to "Spigot-API" directory in buildtools, edit pom.xml and add this repo: https://oss.sonatype.org/content/repositories/snapshots
and then somehow make buildtools not overwrite it again lol
oh wait
I'm stupid
way easier, gimme a sec
oh?
mvn dependency:get -DrepoUrl=https://oss.sonatype.org/content/repositories/snapshots -DgroupId=net.md-5 -DartifactId=bungeecord-chat -Dversion=1.8-SNAPSHOT
run this once
then you got bungeecord-chat 1.8-SNASHOT in your local repo
then it should work
np
Ty!
Can i display a second thing under a entity's CustomName?
save the resource not the config
whitespace is ignored in teh config
blank lines deleted
save the resource from teh jar instead of saving the config
unless you made changes
How can i create a loop in an Event? i want to loop something while a creature is alive (the creature spawns on PlayerFishEvent). Cananyone help?
Anyone has an Idea why this code does not work?
BlockStateMeta bsm = (BlockStateMeta) itemInHand.getItemMeta();
ShulkerBox box = (ShulkerBox) bsm.getBlockState();
Inventory inventory = box.getInventory();
for (int i = 0; i < 27; i++) {
ItemStack dirt = new ItemStack(Material.COARSE_DIRT, 64);
inventory.addItem(dirt);
}
bsm.setBlockState(box);
box.update();
This code is executed in the blockplaceevent. I made sure the item in Hand is a shulker box
Spigot 1.19
?scheduling
you can only do somethign every x ticks until it dies or goes out of scope
you didn't cancel the event
I want to edit the placed block
@EventHandler
public void onDamage(EntityDamageEvent e) {
Bukkit.getScheduler().runTaskTimer(this,(task) -> {
if(e.getEntity().isDead()) {
System.out.println("The entity died.");
task.cancel();
}
}, 0, 20);
}
this creates a runnable that runs every second after an entity takes damage, then prints that it died when it died, and then cancels itself (so it doesn't run once per second anymore)
however, you may have many players fishing. Instead of creating a new runnable everytime, I would use just one runnable that runs all the time, then add the entities you wanna track to a Set<UUID> or Set<Entity> or whatever, and loop over that in your runnable
that e.g. could look like this:
private final Set<Entity> trackedEntities = new HashSet<>();
public void onEnable() {
getServer().getPluginManager().registerEvents(this, this);
getServer().getScheduler().runTaskTimer(this, () -> {
trackedEntities.removeIf(entity -> {
if (entity.isDead() || !entity.isValid()) {
System.out.println("The entity has died.");
return true;
}
return false;
});
}, 0, 20);
}
@EventHandler
public void onDamage(EntityDamageEvent event) {
trackedEntities.add(event.getEntity());
}
I'm running into a bug where I have a Villager mob I remove while it's sleeping and the bed says The bed is occupied. Even though it's gone. Is there a clean up I have to do elsewhere when I remove a mob?
Cheers, setAware is false but if it's near a bed it still goes to sleep
Does getEntities() return entities like a Villager if it's not loaded within the current region? And or can I use that to remove an Entity from the main world if I'm in the nether? I think the second question is that I have to target the specific world first.
getEntities only returns loaded entities
hmmm
It says world in the docs
Is there a way to remove villagers I've created from far away?
Load the chunk they're in and remove them
Loop the material enum and store it in a static final variable
You can use streams to make it clean
You can also just combine the tags into a list of materials
guys how i can do for display the current head of player in a gui?
- create an itemstack with Material PLAYER_HEAD
- cast the meta to SkullMeta
- use setOwningPlayer
- set the meta back to the item
- done
thx
what is wrong with this code?
WorldCreator wc = new WorldCreator("flat");
wc.type(WorldType.FLAT);
wc.generateStructures(false);
wc.generatorSettings("2;0;1;");
usually helps if you state what problem you are having
oh wait i think this is the wrong server
oh sorry, it throws "An internal error occurred while attempting to perform this command" and in the log it says malformed json
probably due to your generatorsettings possibly
but you haven't really shown any code
if i remove this part of the code it works fine, so it has to be this part
if you say so
if(command.getName().equals("newflatworld")){
if(args[0].isEmpty()){
sender.sendMessage("§4This command needs 1 argument");
}
else{
WorldCreator wc = new WorldCreator("flat");
wc.type(WorldType.FLAT);
wc.generateStructures(false);
wc.generatorSettings("2;0;1;");
World w = Bukkit.getWorld(args[0]);
Player p =Bukkit.getPlayer(sender.getName());
Location l = new Location(w, 0, 5, 0);
p.teleport(l);
}
}
instead of args[0].isEmpty() try args.isEmpty() instead
yeah makes sense
so its most likely wasn't what you thought
this is why you don't show code you think is wrong. Remember you are the one with the issue in code you created not us 😉
Hey all, so I've been going mad over this right now, but... persistent storage. I want to store an Object of all the players save data to the player but I'm not having much luck achieving this. Wouldn't I need to create the object on the first join, ect. ect.? Any help would be appreciated. Also does assigning data to a player assign it to name or UUID?
I am fairly new to plugin dev, but do have programming experience, so should be fine. Hopefully.
very generalized statements with no specifics
you cant use .isEmpty on a string
but it says it cant resolve on string
i have the same code on other command and it works fine
In broader detail, I have a "SaveGame" object. It contains the players current level, exp earned, and any other data I might want in it. What I am struggling with here, is trying to use "PersistentStorageContainers" to try and give that to each unique user, so that when they rejoin they do not lose their data. It's hard to go into much further detail than this, honestly.
player.getPersistentDataContainer().set()
or instead of trying to set so much data using PDC
you could instead look into better storage mechanisms
i have removed the argcount checker and it still gives the same error
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
that might be better and easier
Yeah to be honest, I don't really like PDC as it stands.
only thing I can think of is that its this wc.generatorSettings("2;0;1;");
Is player a UUID?
closest thing you have to json of anything
okay i'll try something different
no
Okay so I'm going to have to save them to UUIDs.
I have two events, main(EntityDamageByEntityEvent) to make criticals work and EntityShootBowEvent to check should bow critical, but I don't see when I should reset bowCritical boolean or better even split them somehow to not intersect
players pdc does save to their uuids datafile
depends
because it saves to nbt
Righty
oh yes this text has to be json, thanks
and player would just be something I set in a listener or something, such as joining game ect.?
Okay. Not tried that yet.
Does someone has a idea why I'm getting this error when I'll try to build a 1.19.4 spigot jar using buildtools?
https://pastebin.com/WvWba3fC
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Player player = event.getPlayer();
player is an instance of Player, event would be something like the join event
Okay, cool. And do I need to seperate whether its their first join or not? Wouldn't adding the object again overwrite stuff with the default?
are you using git-bash?
if you use getOrDefault when reading you only need to set it if it goes up
why would you need to save whether or not its their first join when the server already does that?
seems a bit redundant
Just check player statistics
hasPlayedBefore()
If Quit statistic == 0 then it means it's their first time
Well, same thing
not quite
Either way he doesn't need to save it
^
Tried with gitbash and normal CMD booth not working
java version?
Let me check
My line of thinking was this. If I want to create save data, I do it when they join, and create their object. My concern was if they rejoined, it'd create completely new, blank save data.
But eh.
Just set it if it doesn’t exist
yeah, no need only create the data once it changes from the default and just have null checks for things
try using java 18?
doubt that could be the issue
if nothing else, just clear out the buildtools files and retry
Okay
Sorry, dumbass brain today.
public void onPlayerJoin(PlayerJoinEvent event){
Player player = event.getPlayer();
player.getPersistentDataContainer().set(new SaveData);
}
That last line seems to error, but eh. So ideally I'd want to at least try to load my object on a join?
?pdc
Yeah you can’t just set any object to pdc
You need a type adapter
Also you need a key to assign it to
Okay I'm finding a better way of doing this 🤣
Hello, I'm creating a custom dialog system for villagers. Is there an event I can listen to when a player right clicks on a villager to know when to begin the conversation?
Similar to how right clicking opens a trade window?
Ah nm PlayerInteractAtEntityEvent
How can I get PlayerConnection#connection in 1.19.4?
There is no getter for it anymore
reflection
?nms
There was never a getter for it was there?
no the field is private now
that is the issue they are talking about
mojang mappings won't help them there
Ah
pretty sure its also obfuscated in 1.19, and on earlier versions its not
1.19.4
I'll build and test. not looked at .4
what does NMS stand for?
net.minecraft.server
oki ty
e.g minecraft server code
How can i give an allium?
how do i remove this glitched armorStand?
try /minecraft:kill @e[type=armor_stand,distance=.. 3] while withing a 3 block radius of it
thanks alot!
No idea what tag he's referring to, I've never heard of it. It's definitely possible to prevent them from changing though.
Ask him to look into EntityChangeBlockEvent, as that event does fire when the falling block hits the ground. He'll have to do some finicky stuff to get it to work properly, since the falling block still despawns, but cancelling that event should prevent the block from appearing.
i mean as long as the block does not touch ground ur fine right
and since ships go in water
pretty sure fallingblocks go through water fine
Any idea to remove th .0 from a double? its making me uncomfortable
Is public in 1.19.4
sounds like someone was trying to make a smart technical excuse and is now backfiring because they didn't account for said person coming to the experts
LMAOO
cast it to an int or Math.floor, idk what ur tryna do tho. tryna print it?
"coming to the experts"
set it as a customName to an armorStand
that is not the field they were talking about
no idea. but u can see its possible xd
I am sure some of us are experts and some others are on their way to obtaining that level
never looked into it myself
ah I see it connection.connection
Magma slug
Some of the people here are definitely experts
yea and said field is now private
at least on spigot
How???
the connection is public, connection.connection isn;t
yeah
why are you wanting connection.connection?
To register my packet listener
connection connection
That's what ProtocolLib is for
ProtocolLib is just too heavy of a plugin for my use
i guess he means its performance impact on the server
idk how big that is tho if its existent
well it looks bigger than what it is iirc since it injects a lot of stuff where it just delegates
How do i enable the second layer of an EntityPlayer's skin without mojang mappings
.getEntityData().set(...) doesnt exist maybe cus im on 1.8.8
so how do i do it?
someone said
npc.getDataWatcher().set(new DataWatcherObject<>(16, DataWatcherRegistry.a), (byte)127);
but .set doesnt exist and neither does DataWatcherRegistry
there is
for the entire body
i love ancient
WTH they changed a previous boolean to a byte in teh protocol for what reason?java public boolean shouldKeep(byte b0) { return (this.dataToKeep & b0) != 0; }
how does this make sense when i fire it straight to the eye direction
Getting this error when trying to connect to my database,
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Client does not support authentication protocol requested by server; consider upgrading MySQL client
how do i upgrade mysql?
or don;t use ssl
then what
Either stick to the supported protocols or add your desired driver version as a dependency and shade & relocate it into your plugin
Hi, would like to submit a pull request to BuildTools. Is there an option to do so in Stash?
?contribute
You can find information about contributing to Spigot at the following links:
https://www.spigotmc.org/wiki/cla/
https://www.spigotmc.org/wiki/guide-contributing-to-spigot/
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/README.md
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/CONTRIBUTING.md
A lot to go thought but to be covered legally
ok but ngl ive never heared of "using" and it doesnt work either
found another way
but also what on earth does my error have to do with ssl, doesnt say it anywhere and even without using ssl i still get the error
@tender shard help him 🙂
?bootstrap
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
Dies someone know why I'm getting this error when I'll try to build a 1.19.4 with the buildtools?
https://pastebin.com/4xJxdGZc
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Can make plugin?
guess who forgot to add the mysql dependency
pom looks fine, other than your source/target
that import is fine, so long as you did actually build SPigot using Buildtools
?paste your buildtools log
I literally just built 1.19.4 and used nms this morning
I’ve been using it for a few days
yes
Not with buildtools but still
hi, i'm trying to prevent the player from closing a gui by doing e.getPlayer().openInventory(e.getInventory());, but it keeps crashing my server
is there any other way to do this?
https://paste.md-5.net/zonajukute.java
Add a delay of at least 10 ticks before opening the GUI again
read teh javadoc, it tells you not to do that
Why 10
I'm sure this is a common question asked by newbs on this channel but I am one. I have a Plugin and allows for dynamic Villager creation and deletion. Originally it was using Entity ID but I found that doesn't persist from restarts. So I switched to uid's and looping through getLivingEntities.
However I'm seeing the getLivingEntities only returns a set list of about 100 uid's. Is there a different call to use or a pagenation I have to use in order to fully propegating the full list of UIDs?
Tbf that warning is only in the click event
It'll only return loaded entities
I'm standing next to the villager. His UID starts with d but the printing out the list of living entities is only giving UID's that start with A. About 100 of them.
The heck is that import
The obc for 1.19.4 is
org.bukkit.craftbukkit.v1_19_R3
Try with org.bukkit.craftbukkit.v1_19_R3.entity
import org.bukkit.craftbukkit.v1_19_R3.entity.CraftEntity;
That is mojmap
Well not that one, craftbukkit doesn't get remapped
Because as I said
1.19.4 is NMS version R3
I mean the IDE should find the import for you
I use a reflection util so I avoid version specific imports for CB
?nms
thanhks
1.19.4-R0.1-SNAPSHOT
any way to drop particles of an item?
drop particles what particles?
and drop
what do you mean
its 1_19_R3 in imports
mods
fr?
I think there was a particle named "BLOCK_DUST" or something like that. It allows the use of MaterialData.
A fast look at the JavaDocs will confirm it
well it won't be the texture of an item
I have an item that looks like a block with custom model data
I want to drop particles of it from the resource pack
You can use those new item display stands to mimic particles if ur clever.
Wouldn't that be laggy?
who knows
Any way to send block damage to a barrier block?
What's the overall purpose out of interest
I think they are using them to give collision to their fake blocks
Idk why they don't just use a fitting block for their fake block
Like stone or wood or dirt
Hi does anyone know a plugin where we can talk to a bot in the chat and who answers us, example:
Player: <@&694706251958845482> Hi, how are you?
Bot: Yes well and you, I'm having a nice day (...) : )
In the same style as ChatGPT but for minecraft which work in 1.8.9
I already gave you one
you just need to either update your jafa
or compile it with a lower version
Don't compare strings with ==
.equals or .equalsIgnoreCase as he said
As they said
As a general rule only use == for primitive types, null checks, and enums
One ignores case
msg is not equals mSg, but msg is equalsIngnoreCase with mSG
Am I able to ask a question not related to spigot nor bungeecord here?
maybe
Regarding development
Yes, it's about development
go for it
Go ahead
I got a really weird problem.
I'm trying to run this query, but it fails to run (sqlite)
CREATE TABLE IF NOT EXISTS `account` (`id` INTEGER NOT NULL, `password` TEXT, `pin` TEXT, `2fa_token` TEXT, `panic` TEXT, `2fa` BOOLEAN, `created_at` NUMERIC DEFAULT (strftime('%s', 'now') * 1000), PRIMARY KEY(`id` AUTOINCREMENT))
The error is this one:
https://mclo.gs/7zRUEjr
When I run this exact same query in a sqlite engine, it just works
It does not work
send us your new logs.
This is the class that is running the code btw: https://github.com/KarmaDeb/LockLogin2/blob/master/LockLoginCommon/src/main/java/es/karmadev/locklogin/common/api/sql/CSQLDriver.java#L123
Custom blocks
If I use any other block they'll z-fight
Make the display one a tiny tiny fraction bigger
Then the block breaking animation won't show
And this is being shown in console
https://mclo.gs/vrsNhEw
Which has nothing to be with the main problem
How can I get TPS in 1.14.4 (it has to be 1.14.4)
cast Bukkit.getServer() to CraftServer, get the handle to get the NMS server, then call getServer() on that again, this now has a field "recentTps"
can you translate that error ?
If I run into problems I'll come back to you
What do you mean? If I understand what it's saying?
import net.minecraft.server.v1_14_R1.DedicatedPlayerList;
import net.minecraft.server.v1_14_R1.DedicatedServer;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
public class TPSTest {
public static double[] getTps() {
CraftServer craftServer = (CraftServer) Bukkit.getServer();
DedicatedPlayerList nmsPlayerList = craftServer.getHandle();
DedicatedServer nmsServer = nmsPlayerList.getServer();
return nmsServer.recentTps;
}
what does this means
Oh
Execution finished without errors.
Reults: Query executed with success. Took 1ms
In the line 1:
That's when I run the exact same query in the sqlite engine
When the query is run from java (jdbc) it throws the error I sent in the logs
https://mclo.gs/7zRUEjr
your table here is called account but in java, you are tryin to access table user
SQL error or missing database (no such table: user)
No, that's the error the console prints because it can't find the table users
The query that is being run is the one I sent
That's the actual log file
yeah i said that error you sent is related to that you dont have user table
It doesn't exist because the account table is not being able to be created.
The table user references the table account
As creating the table account throws error, the code stops executing and so the table user doesn't get created
The main issue is the reason of why the account table is not being able to be created
In jdbc, throws exception, in the sqlite engine, it just works
Thanks
The console log (https://mclo.gs/vrsNhEw) is thrown right after the exception https://mclo.gs/7zRUEjr gets catched in the file. So the console error is a result of the logged error
what error does creating table account throws, you didnt show it
It's this one:
https://mclo.gs/7zRUEjr
show your code
Wait
I just realised
I'm using QueryBuilder#queryType instead of QueryBuilder#build
QueryBuilder#queryType returns if the query is a "create", "update", etc...
I was blind, the problem was because using the wrong method, thanks for your help anyway
I am working on a Item Exchange Plugin and need for the GUI categories. I already investigate a bit, but did not found a way to get the category each item from the creative menu I want to use. Is there a way to extract on spigot or how can I get it in general? Would be enough for me if I have a json file with the itemname and the category.
Anyone know why I'm getting an Null error? I'm storing a serialized location in the Config here
ConfigService.getConfig().set("server.characters." + id + ".location", sender.getLocation().serialize());
I save the config right after and the values show up in the file.
When I go to retrieve the value
Map<String, Object> test = ConfigService.getConfig().getConfigurationSection("server.characters." + this.id + ".location").getValues(false);
right away I get this error:
Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.configuration.ConfigurationSection.getValues(boolean)" because the return value of "org.bukkit.configuration.file.FileConfiguration.getConfigurationSection(String)" is null
However when I reload the plugin and it processes the value from the same code using the File it works fine.
Also if I change the getConfiguration to
Object test = ConfigService.getConfig().get("server.characters." + this.id + ".location");
LOG(LogType.Info, "test " + test.toString());
And run it again by storing the location right away it prints out the value just fine so the data's there.
Check id
server.characters.yourId.location is null or not a configuration section. show how your config looks like, pls
I tried to use Material.getMaterial(itemid).getCreativeCategory().toString(); to get the category of an item in the creative menu. But the output is on every item: BUILDING_BLOCKS
even for stuff like... diamond pickaxds?
characters:
the_mad_hatters_house/The_Mad_Hatter:
location:
world: world
x: -10.705837881439956
y: 70.5625
z: 338.3117730248967
pitch: 37.50001
yaw: -6.0
uid: '0'
Just a note this null only occurs when I change how I'm retrieving the data not. If I use an .get() it works but as an object if i use getConfigurationSection() it's null
correction getConfigurationSection() + getValues()
what path?
server.characters.the_mad_hatters_house/The_Mad_Hatter.location
Is that why it works fine when it loads the file though?
it shouldn't though
yes, nothign wrong with the layout
it also reads it using the get()
it's probably a bukkit thing then
kk
where's the locaiton class thing name thingy
Hmm sorry for a further question on this.
Object test = ConfigService.getConfig().get("server.characters." + this.id + ".location");
This reads like it's a java.util.Object. But when I try using it I'm getting.
class org.bukkit.configuration.MemorySection cannot be cast to class java.util.Map (org.bukkit.configuration.MemorySection is in unnamed module of loader java.net.URLClassLoader @3f91beef; java.util.Map is in module java.base of loader 'bootstrap')
he's getting values no not using an object
MemorySection is Bukkits wrapper for teh backing Map
cast to MemorySection and getValues(true) to get teh map
kk
I usually create a method for that as there is a bug in the Bukkit configuirations serialization
class java.util.HashMap cannot be cast to class org.bukkit.configuration.MemorySection (java.util.HashMap is in module java.base of loader 'bootstrap'; org.bukkit.configuration.MemorySection is in unnamed module of loader java.net.URLClassLoader @3f91beef)
Lol the complete reverse. I feel like I'm taking crazy pills!
if you add a Map to the config, you can fetch that Map and it will be returned as a Map.
If you then save/load yoru config and fetch the same path, you will get a MemorySection.
MemorySection location = (MemorySection) ConfigService.getConfig().get("server.characters." + this.id + ".location");
Gotcha that makes sense
this is what I use. Could be done better```java
/**
* If loading from file the Maps in the data
* will be stored as a MemorySection not Maps.
*
* @param entry MemorySection or Map to check.
* @return Map containing the serialised data.
*/
@SuppressWarnings("unchecked")
protected Map<String, Object> castToMap(Object entry) {
if (entry instanceof MemorySection) {
return ((MemorySection) entry).getValues(true);
} else {
return (Map<String, Object>) entry;
}
}```
Woot it works thank you so much!
How to check is Entity can be damaged?
Is there a way to extend the flight duration of a rocket?
check Entity#isInvulnerable()
maybe check if entity is https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Damageable.html?
declaration: package: org.bukkit.entity, interface: Damageable
all Entities are Damageable
why does this exist then lol
they can be invulnerable
Both won't work
explain your usecase
isInvulnerable() not works for damage immunity after hit
I want fire event only when chicken can be damaged
We're not talking about damage
um we are
Problem is event can be fired as many times as I can click
I want fire event only when chicken can be damaged
you only act if the chicken can be damaged, not the other way around
I'm saying, there is damage immunity in game
Should be a way to check is Entity have it or not
there is, Elgar told you
This is determined by the no damage ticks property
even tho no support for older versions but for those using 1.8,
How on earth do i spawn particles on 1.8
I don't believe there is a particle API in 1.8, only 1.9
uhhh so how do i spawn big fake explosion
err ?1.8 😄
yeahhh
what
No API so packets or NMS
ok how do i do it with nms
you google as it's too old to support
world.createExplosion(location.getX(), location.getY() + 2, location.getZ(), 1.0f, false, false);
I didnt use nms for this
Well then its
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(
EnumParticle.SMOKE_NORMAL, true, (float) standLoc.getX(), (float) standLoc.getY(),
(float) standLoc.getZ(), 0.5f, 0.5f, 0.5f, 0.01f, 5);
sendPacket(packet);
Atleast what i did
thanks but any explanation on what all those arguments are?
The arguments can be find on the wiki site, just in case you dont remember
The arguments display b, float, float, float, v3, v4, v5, v6, i..
Erhm floats are locsations
Send him the link to the packet docs, its 100 better than explaning him each argument
Can't find it lol
wiki.kv or something like that its the url for the wiki, i dont remember either
?wiki
Well, I made it another way, chicken.setNoDamageTicks(0); and now it gets damage every time at least, but other way is to make cooldown and that's it?
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
yea cant seem to find it on there
also is there an event for when an item changes durability? i cant set the item to unbreakable for some reason
It must be there, all minecraft packets are documented
yyea
Its there.
haha
.
But do you my issue?
Is github repository collaborators api working? Because im not able to invite any people as collaborator to my projects, it seems that they dont receive the invitation or they receive it but the invite links is broken with a 404 response code
no idea
It seems to be something really weird
I will prob open them a support ticket or send an email
Could someone help me figure out why plugin from runTaskTimer and getCommand are red? https://paste.md-5.net/wewobanewa.java
Any reason you don't just use the World#spawnParticle() methods?
Versioning probably
Definitely possible in 1.8 too though I think under playEffect
md_5 any idea if github repository collaborators api is wroking wrongly?
Cuz it doesnt even allow me to invite people as collaborator
No idea
Oh right thanks
which particle is the big big big round explosion
if you know
works fien for me
Weird must smth there, it doesnt allow me to invite collaborators, they dont receive the email or the invite url received is broken with a 404 code
I just sent an email some hours ago, till waiting for response
Theres EXPLOSION_SMALL,NORMAL,LARGE
Found packets easier lol
And i knew how to spawn does
so
yeah
dont seem to be the right one tbh, im looking for one big one that kinda expands
No reason really
No idea then :p
Oh
yeah
u just gotta send the actual url to them
what happened to you?
i mean in my case, during first weeks of februray i was able to add colaborators as yourn normally would do, and they receive the email and join the repo without any issue
Im not sure when this started to happen tho, because i have while outside of coding caused of classes
oh mine never recieved any mails
okay, so now im quiet thats a platform issue, maybe they didnt realize it
And with my email they realize about it 🤔
idk i just want to get that fixed or a response of what can be happening atleast
Also where do you get his invite url? When i click here, it just copy me the next url "https://github.com/Alexito2060/<repository-name>/invitations"
Bump
what the hell is that
not you
I think i find the cause of it, because when you invite someone as collaborator they get this url "https://github.com/<user-name>/<repository-name>/invitations", instead of the actual generated uri for invitation
ok i found it, its the small but the data thing is set higher so its bigger, but its a random size, any idea on how to change that
?
yeah just send them that
that's the invite url
I cant even copy the invite url
sound like a you issue
No thats not how it looks the invvitation
Worked fine for me
the invitation uri has a hash and its temporal
Hmm whats your offsets?
Maybe that
no idea
Oh lol, so they changed the uri format. Because last invitation ive done they receive a uri including a temporal hash
Hoping someone can answer this.
So basically I wanted to modify SimplePluginManager to look in the update directory's jar's to find the plugin name, then update the file appropiately.
So if I have LibsDisguises-1.19.jar in my plugins directory, then LibsDisguises-1.20.jar in my update directory, it'll delete the 1.19 jar and add the 1.20 jar.
So basically, I'm not forced to rename the jar in the update directory to LibsDisguises-1.19.jar just to get it to update.
So anyways, just two questions.
- Is there a reason this wouldn't be accepted (Just need to test my change)
- Does it belong in Bukkit or Spigot, I'm not even sure why there's two repos given they're both controlled by spigotmc now
@supple parcel The amount of times i've seen stuff named in a different way than that is amazing.
Like sure it'd work for the plugin that actually make sense with their naming. Else you'd have to name all that shit yourself
I'm not too sure what you mean
My thoughts here is if I download WorldEdit-b543.jar I should be able to stick it into the update folder and not have any problems with it updating over WorldEdit-b434.jar
How they get those "1b444", hexa decimals? Where does github add to them?
Who knows, but if you added two different jars for the same plugin in the update folder, then yeah its going to be selecting one of them "randomly"
heh?
Github doesn ot
I'm not talking about an update system that checks version
it's build 5432
Then a PR to version check the file name would be refused. it's too variable to reliably check
yeah, but thats is github build CI/CD, its the only that add to them
I'm talking about it simply finding jars by the plugin name, not just the file name
Doesn't have to be
I'm now confused on what you're talking about. This is in no way a version check.
jenkins can add them
all 0.05
Jenkins is the same, its used for Ci/CD 🤔
but the offset is the position
my point is how much or little does the name have to match?
You can name a jar a.jar but if it contains a plugin.yml that is name: LibsDisguises then it will delete LibsDisguises.jar and add a.jar in the plugins folder
ah I see
You gotta know that something doing the same thing does make them equals. A sandwich and a burger both have buns and meat inbetween plus vegetables, they are not referred to as the same though (unless you are a weirdo).
you just want a blind replace of anything in the plugin folder with anything in the update folder, no matter what information it has. Just teh plugin name in plugin.yml
You phrased that a bit weirdly, but yes
Currently it will only check the file name
someone proposed a similar thing just last week https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/817/overview although quite cryptic "Improve update file finding" with little description
Huh
Why dont you do a spiget replicatron? You can base on it update system or auto update ssytem
what
They have both of them, Spiget has a versioning and updating path.
I'm confused by this.
Spiget is a website that acts as an API for spigotmc
If you're suggesting the answer is to rename the update file content to match the jars in plugins, then that's what I'm trying to avoid.
I am following the https://www.spigotmc.org/wiki/scheduler-programming/ tutorial. I am using example 2 for passing my main plugin instance. However, when I put the code in, the word plugin is still red: https://paste.md-5.net/ujuzuledah.java
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
?di
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
why is there 2 other classes in your command class
Didnt want to ask that too, i just prefer to avoid innecessary questions
So what you doing? Im really struggling right now
Because you dont want to compare plugin versioning nor auto updating 🤔
I have a plugin called LibsDisguises
If a file called LibsDisguises-54.jar is in update, and a file called my-file.jar is in plugins, and both plugins are called LibsDisguises, then it will move LibsDisguises-54.jar to plugins and delete my-file.jar
So if you ever want to update a plugin, you don't need to worry about file names. Just drop it into update and it'll replace the plugin.
Ah, so you want to compare plugin.yml names
Yes
Makes sense
Feel kinda awkward about that existing PR though
Mainly a versioning/naming comparison, what i have said from the start 🤔
verano no one listens to you
Yeah i hate that, but thats the society that our parents have created. Many parents have said that the 3rd generation is really broken and many things
what
?
XDD
That's the society you have created.
Thats such an Verano answer
Sure, except it doesn't matter what version it is.
I should be able to install the very first version of a plugin and overwrite the newest version of a plugin if I want to be stupid.
yeah its a verano combo what more you can expect
🤣
We speaking about the update folder?
Would SimplePluginManager even apply here then? Wouldn't you need to get the contents of the jar file in update and grab the plugin.yml file from within to make comparisions?
I would directly name the jars via build version, and then leave the plugin.yml name as LibDisguise
Maybe you could use it for the jar that's already loaded in /plugins, but since the one in update isn't loaded, you won't be able to use SimplePluginManager for it.
Let me just make the PR 🥺
Yes you are right
But now, why is task in task.cancle; red?
?paste
Paste your currently code
?basics
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.
anyone know a custom death sound plugin
What part are you stucked?
Finding a plugin 😂
how did you know 🫢
Btw smile I managed to completely restructure my project and cleaned up a lot of messy code thanks to your feedback.
Sounds nice 😄
Only took like 9 hours lol
Worth it
it is/was indeed
I just need to know the scheduler id
Yeah that i can really agreee, smily is really friendly and helpful guy
can java application define its custom default startup params?
You mean VM params? Or just properties you set with -D for example
@supple parcel I made a PR for this
Just forgot to include it as optional lmao
many ways
can u give me one?
How can I check if a plugin on server
I know their is some sort of getDataFolder thing
but cannot remember
yeah
f bing
eat a gpt-4 sandwich
True, unless u know what oyu are doing
if u know what u doing u dont need it
If you ask why chatgpt chose for a certain approach its actually really valuable info
That's a lie, if i can say do this for me and it does it for me perfectly i don't need to write it.,
.getDescription()
Lazy ftw
oh yeah my bad
YamlConfiguration.loadConfiguration(file);
} catch (InvalidConfigurationException exception) {
throw new InvalidConfigurationException("Error processing file " + file.getName() + ": " + exception.getMessage());
}```
how i can catch that exception ?
which option are you looking for?
Well I am trying to make a new one
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/817, need to add an option for this
I am not going ot log on sigjh
@rotund ravine
Eyes hurt
It's only lightmode
The PR for what I was talking about
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/825/overview
This is also a really nice solution
Mine is somewhat more contained though, both still work
Yeah, I'm personally not a fan of reading every file in update every time a plugin loads. But other than making it more complicated, not much to do there.
Yeah I also aren't a fan of it, I should just keep a cache tbh
Hey guys help me pls
Why this code doesn't work?
Code
@Override
public void onEnable() {
try {
Socket socket = new Socket("localhost", 25565);
OutputStream out = socket.getOutputStream();
byte[] PacketLogin = new byte[]{0x01, (byte)'P', (byte)'l', (byte)'a', (byte)'y', (byte)'e', (byte)'r'};
out.write(PacketLogin);
out.flush();
socket.close();
} catch (IOException e) {
e.printStackTrace();
}
}
Error
00:25:04 [INFO] Server permissions file permissions.yml is empty, ignoring it
00:25:04 [SEVERE] java.io.IOException: Received string length longer than maximum allowed (25970 > 16)
00:25:04 [SEVERE] at net.minecraft.server.Packet.a(Packet.java:165)
00:25:04 [SEVERE] at net.minecraft.server.Packet1Login.a(Packet1Login.java:23)
00:25:04 [SEVERE] at net.minecraft.server.Packet.a(Packet.java:110)
00:25:04 [SEVERE] at net.minecraft.server.NetworkManager.g(NetworkManager.java:168)
00:25:04 [SEVERE] at net.minecraft.server.NetworkManager.c(NetworkManager.java:293)
00:25:04 [SEVERE] at net.minecraft.server.NetworkReaderThread.run(NetworkReaderThread.java:34)
00:25:04 [INFO] /127.0.0.1:51696 lost connection
are you running 1.5 lol
you're missing the string length
Also this
no
1.2?
its infdev 2010 06 18 with beta 1.7.3 api
damn
Im also using bungee cord
Where?
?
00:29:11 [SEVERE] java.io.IOException: Received string length longer than maximum allowed (20588 > 16)
00:29:11 [SEVERE] at net.minecraft.server.Packet.a(Packet.java:165)
00:29:11 [SEVERE] at net.minecraft.server.Packet1Login.a(Packet1Login.java:23)
00:29:11 [SEVERE] at net.minecraft.server.Packet.a(Packet.java:110)
00:29:11 [SEVERE] at net.minecraft.server.NetworkManager.g(NetworkManager.java:168)
00:29:11 [SEVERE] at net.minecraft.server.NetworkManager.c(NetworkManager.java:293)
00:29:11 [SEVERE] at net.minecraft.server.NetworkReaderThread.run(NetworkReaderThread.java:34)
byte[] PacketLogin = new byte[]{0x01, (byte) 0, (byte) 0, (byte) 0, (byte) 6, (byte)'P', (byte)'l', (byte)'a', (byte)'y', (byte)'e', (byte)'r'};```
smt like that yeah
It returns
00:29:11 [SEVERE] java.io.IOException: Received string length longer than maximum allowed (20588 > 16)
00:29:11 [SEVERE] at net.minecraft.server.Packet.a(Packet.java:165)
00:29:11 [SEVERE] at net.minecraft.server.Packet1Login.a(Packet1Login.java:23)
00:29:11 [SEVERE] at net.minecraft.server.Packet.a(Packet.java:110)
00:29:11 [SEVERE] at net.minecraft.server.NetworkManager.g(NetworkManager.java:168)
00:29:11 [SEVERE] at net.minecraft.server.NetworkManager.c(NetworkManager.java:293)
00:29:11 [SEVERE] at net.minecraft.server.NetworkReaderThread.run(NetworkReaderThread.java:34)
Inventory anvil = Bukkit.createInventory(p, InventoryType.ANVIL);
p.openInventory(anvil);
when it opens the anvil and i try and repair something
when I take out the result, it just disappears
so how?
hm actually the one I was thinking of only captures user input
You're going to need to use NMS to make the anvil inventory work
net minecraft sever?
Yeah
"Player".getBytes()
Incompatible types. Found: 'byte[]', required: 'byte'
so can you just quickly tell me how I would use NMS for this particular case so I don't need to spend hours researching how all of NMS works?
lol
Sounds like you used it wrong
byte[] PacketLogin = new byte[]{0x01, (byte) 0, (byte) 0, (byte) 0, (byte) 6, "Player".getBytes()};
I don't have time to research that for you. You'll need to do that part on your own
ok thx
<insert naming conventions>
with my Code.
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
And my mental health
bro put a byte array into a byte array initializer
Ok so I'm not a professional coder anymore. But I want to get back to it. And so basically I wrote this script but never got to use it and I forgot why the errors detected by the IDE prevented it from working when I exported it as a jar file.
There are errors on the underlined parts of the code and when I try to export it
its a plugin meant for API Spigot 1.8.8 by the way
There is no main hand in 1.8
Well that’s issue 1
getItemInMainHand doesn’t exist in 1.8
As for enchantment, you haven’t imported it
doesnt getiteminhand work?
can I just use that without it affecting it
Mhm
ok
Hi im sending the next structure over redis, im a bit confused about doing the checks, so the receiver doesnt self listen to the packets he sent
// Sending to a specific server
{
"payload": {
"server": {
"sender:" "lobby-1",
"receiver": "proxy-1"
}
"packet": {
"uniqueId": "1"
// Fields serialized here
}
}
}
// Sending to any server:
{
"payload": {
"server": {
"sender:" "lobby-1",
"receiver": ""
}
"packet": {
"uniqueId": "1"
// Fields serialized here
}
}
}
Its a stupid question, but i cant code the correct check for it
What about registerevents
It says in the IDE "The method registerEvents(Listener, Plugin) in the type PluginManager is not applicable for the arguments (BowBoost, BowBoost)"
Is there a way to define a custom crafting recipe requiring an item with a certain PersistentData tag, but without requiring any other certain data? e.g. a certain tag, but regardless of name/damage/custom model data
it needs a plugin and listener
No
You’ll have to use the PrepareItemCraftEvent to check
What does that mean? Do I need to just set the item in the result slot manually without a recipe? Could that cause lag through looping the custom recipes?
or should I cast arg 2 to plugin?
You need to manually check if the item in whatever slot is your desired item
If it isn’t, clear the output
Would that cause a lot of lag if I have loads of crafting recipes?
The event gives you access to the recipe in use
I forgot how to convert implicit to explicity constructs
You have to learn basics concepts before coding, those include POO, DI, etc
does anyone know
Which has a namespaced key
o I already fixed it
but thanks
I will def do that
before continuing
You can map that key to your custom recipes so you don’t have to loop anything
when I get back
I mean if you wont learn the basics from a lang dont code directly, ofc not being rude. Just some bad personal experiences
Implicit super constructor Object() is undefined for default constructor. Must define an explicit constructor
yeah
I forgot the method I used
At this point im seeing you didnt learnt Java, so this def is not the way
Not entirely
I only know the basics and then did some courses
but I had help
just difficult applying it to games
i dont even think you learn it, because the basics include, fields, constructors, excetions, also you dont understand what issues throw the IDE and why, etc
To be fair: Nobody knows everything. But yeah basics is far from "entirely"
understood
I can look for a good java playlist on english if you want
Tf is poo
OOP is the common term
Isn't it oop xd
Oh POO is called in spanish, my bad
I would appreciate that : )
Hell yeah time to apply somewhere and tell them I can code POO 💩
whenever you program in java make sure your code is poo!
haha
Thats another Alexito memeb 🤣
okay im struggling with redis for some reason is listening to self data arrive (its listening to the data, he is sending ) while he shouldnt listen to that data, cuz he is the sender
I got new error
Socket socket = new Socket("localhost", 25565);
OutputStream out = socket.getOutputStream();
byte[] PacketLogin = new byte[]{(byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 6, (byte)'P', (byte)'l', (byte)'a', (byte)'y', (byte)'e', (byte)'r'};
out.write(0x1);
log.info("PACKET SENT: LOGIN STATUS");
out.write((byte) 16);
log.info("PACKET SENT: PROTOCOL ID "+ (byte) 16);
out.write(PacketLogin);
log.info(Arrays.toString(PacketLogin));
out.flush();
socket.close();
@rough drift
Are you coding some booting tool? 🤔
Because this seems like a terrible way to code anything useful
Huh? No
I want to create npc on my server
sir that is not how you should try to create a server at all
thats not how you should use packets at al
And why are you using that code?
i dont know where u got that from 😭
I haven't GameProfile on this version
Its a separate lib
wht version
because it haven't authlib
Maybe he is using the api instead of the jar (spigot.jar )
im using infdev 2010 06 18 with beta 1.7.3 api
1.7.3 isnt supported
Dont send text over redis.
Register a decent codec and send objects right away.
Legacy
server.jar
why are u using such an old version
How would beta 1.7 API even work on infdev?
You recommend binary pub sub right?
One guy ported Poseidon-Project to infdev
Topics with a decent Codec. Mine is backed by Gson.
Either way no one here is going to help you with a 13 year old version
because my players want
Never even heard of Poseidon, but this is surely the wrong place for help with it
Can you give some advices about this topic and more or less explains what you mean with "mine is backed by Gson" ?
it like bukkit, but some better
just use a recent version and have viarewind + viabackwards?
this???
They don’t
This is spigot support, you should ask only about bungee or spigot programming
Yeah
why
who tills plays mc 1.0 💀
for what reason
Yes its ilegal, cuz its exposing CraftBukkit it was firs tthing i realized
💀
Also bad commits, if you will make some public and good open source project, yo should use conventional commits atleast or even thought follow an order
hi, i am using HikariCP and a Postgres database but i get this error:
Caused by: java.lang.ClassNotFoundException: org.postgresql.ds.PGSimpleDataSource
this is my code:
public ConnectionPoolManager(Main plugin) {
this.plugin = plugin;
this.USER = plugin.getConfig().getString("database.user");
this.PASSWORD = plugin.getConfig().getString("database.password");
this.HOST = plugin.getConfig().getString("database.host");
this.PORT = plugin.getConfig().getString("database.port");
this.DATABASE = plugin.getConfig().getString("database.database");
setupPool();
}
private void setupPool() {
HikariConfig config = new HikariConfig();
config.setDataSourceClassName("org.postgresql.ds.PGSimpleDataSource");
config.addDataSourceProperty("serverName", HOST);
config.addDataSourceProperty("portNumber", PORT);
config.addDataSourceProperty("databaseName", DATABASE);
config.addDataSourceProperty("user", USER);
config.addDataSourceProperty("password", PASSWORD);
dataSource = new HikariDataSource(config);
}
And last but not least my pom.xml
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.5.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>5.0.1</version>
</dependency>
If you need more of the code or error just let me know i!
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>15</source>
<target>15</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadeTestJar>true</shadeTestJar>
<shadedClassifierName>SHADED</shadedClassifierName>
<shadedArtifactAttached>true</shadedArtifactAttached>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
```This shades it right?
Why people now a days love to use configuration for databases? Instead of making approach of the connection uri 🤔 🤔
you need to set scope to compile
not it
Format like: <mysql|sqlite|redis|mongodb>://<username>:<password>@<host>:<port>/<database>/<settings>
That makes your db config to reduce to 1 line 💀
Yeah that also works i will do that but i don't think it will solve my problem
right let me read ur issue
What jar are you putting on the server
Because the maven-shade-plugin will create 2 jars every time, one named as your project wihich is the one you have to use and another called your original-blabla.jar
i used the maven shade wrong thank you love the server already with this quick help!
Na man, its perfect we are here for help
Really happy you fixed it
In here, my task.cancel is red. Why is that? https://paste.md-5.net/ibelatavip.java
What even is that code
Because you have no variable named task
guys is there an easy way to check in a for loop if i equals to a number out of a list? lets say i run a for loop from 1 to 100, want to check if any of those numbers contains the same number in a list (example list: 1,6,17,18,29,47 etc)
*without having to do a bunch of ifs
call .contains(i) on the List
ahhh okay i will try
Also consider a HashSet if you are going to be using a lot of contains
a Hashset or a hashmap?
Honestly, dont use lambda expressions () -> { }
Create a new class, let it implement Runnable and pass an instance of that class
to your scheduler method. At your level lambdas are just confusing.
can anyone help me edit a plugin to only happen when shifting its a simple plugin combat one https://www.spigotmc.org/resources/⚔-simpleparrying-⚔.107280/ its only 2 class files
Sets can’t be accessed by index
no duplicate entries allowed, and maybe im just dumb but theres also no .get
Yes, no access by index and no duplicates
SetListMapQueue?
wonder why Sets dont have index
No internal order


