#help-development
1 messages · Page 846 of 1
My knowledge of gaps in smp tools is rather outdated; I haven't been involved in a large server project in quite a few years.
There's only one giant gap that I can think of, and I am kind of reserving that as a potential passion project for this year.
I can tell you of some past gaps though; not sure if they have been filled recently
I'm looking to store quite a bit of locations
Guava maybe?
guava literally tells you to use caffeine instead 
Also, a few things.
You're basically aiming at medium sized smp servers.
Small ones don't really need tools to run efficiently
Large ones generally develop their own tools.
And, sadly, medium sized smp servers are very rare now, so I am not sure what your potential uptake would be like.
I am coding it for myself
When coding things for yourself, just ask your staff what they think would be useful
That's the most important thing
I don't have staff lol
Then you probably don't need smp admin utility plugins
Off the shelf stuff is usually good enough
like gameplay mechanics?
no
util stuff
config stuff
admin tools
I just like coding stuff by myself instead of using off-the-shelve stuff for every small detail
Tbh, as the scale you're at, it would probably be more fun coding gameplay stuff
Would make your server more appealing and help attract a playerbase
well it's aimed to be kinda near to vanilla
you can still expand vanilla gameplay
I am only aiming at a private playerbase
Can't you just use spigot out of the box then lol
please read what I wrote 10 messages above
idk
I still think gameplay, vanilla-like mechanics, and expansions thereto is probably the most fulfiling thing you could do
either that or identify gaps or outdated implementations in other people's public stuff and make things for others
There you go
for example I wrote cool stuff like manually locking/unlocking end, scripted system for the start of the server with timers and border stuff and so on, elytra spawn island stuff
Oh lmfao
does anyone know how I can create a functioning end world with the world creator? is environment THE_END enough? I dont think that will spawn the dragon etc..
Can't you just do command blocks for simple stuff like that?
no
More accurately, shell scripts
also no
Shell scripts can do anything if you try hard enough
Just use spigot for everything, why complicate it more?
live end event without having to restart the server
two things
- it's probably possible to do that with shell (it's possible to do everything with shell), but I digress
no it is not
- your server is tiny. resource usage probably doesn't matter. Just keep the end running and deny people permissions to enter it while it is "off".
I mean, easiest to just, delete the target folder 
resource usage does matter with 100 players online at the same time in 1.20
also, thats literally what im doing, in more fancy
It's a private server though. Can't you just have people not go in until it's ready lol
100 concurrent users isn't that big of a threshold (in my previous experience), but hardware costs add up
no
Why
Doesn't sound like a private server bro lol
throwing out vanilla and changing everything is way more fun imo. but I guess opinions differ
but the same boring SMP stuff for the 100th time? nah
How you gonna get 100 even, lol
gotta ask, what should I put in my start_server.sh
a private server for me is a server where only people from a chosen group of people can enter
last server had 40 people concurrently, with only 2 of 9 grades invited
lol
are you talking 100 concurrent?
yes
I mean... that's probably at the point where some moderation / tools would make sense.
Although, hybrid moderation is much easier
Just tie it in to school accounts and school penalties
So go and write some stuff. What was the question? Lol
ideas on what I could write
When I did it, we:
- Made a "club" and got official approval and support
- Made a custom launcher publicly accessible on a shared drive school wide.
- Made it so that that launcher would connect to the server with credentials from the school computer
- Gave teachers an interface to control hours that people could connect during and classrooms they could connect from.
Pull up the API and just write some random things down
If we wanted to ban people we would ban people at a student account level
which would make it nearly impossible for them to rejoin.
Okay, idk what to really recommend for a mostly vanilla server lol
wait for 1.20.5, make everyone really tiny and then do something with that
got time on mass anyways
also, it should be in general, not only for the one server
like growing with level ups or something lol
I mean you're trying to make a club with irl people. I don't see why you would need too many crazy things bro
Other than utils for event things, what else would you need lol
- Classroom and student account based connection and logging. Seriously, it's amazingly powerful.
- Extensions to whatever land claim plugins you are using, tweaks to permissions, etc..
- Stages of progression; unlock new regions and features as time goes on to increase excitement.
- Gameplay events... more to the point, gameplay that relies on a large amount of people, in a scheduled event
I mean, that's pretty much the answer.
Also, chat controls, moderation stuff, etc.
Even within a school, 100 people without moderation is kinda dumb.
Especially if it is not synced to something you can use to control access
I already got multiple people that I trust that can moderate
thanks for the ideas
Then give them tools that work for school stuff
Make a club, do events through that club, do moderation through that club, do moderation linked to school stuff
It's not private if your audiance is a substantial portion of the school at large
How would you go about using school credentials?
simple
that does not work, I do not have access to that
I don't even think that is possible through our account page
- Extract whatever information you can from the school computer.
LDAP, hostname, everything.
Generally, most schools have shit security.
You can usually pull classroom numbers, computer IDs, usernames, first names, last names, student numbers, everything.
we got some random shit with 0 functionality that works lol
- Make a launcher that requires authentication with a server via that shit
not every student has an account from the school computers anyways
I do not have one
wtf
Even in grade 1 we had student accounts
those were big crt computer labs back then though
I had a very special case where I moved from a lower type of school to the gymnasium
this was before portable electronics
so IT is (sadly) not in my schedule on the new school
We had a bunch of old Apple PCs in Grade 1
we had windows
we had windows mini pcs
Specifially, windows 95
idk what they use now tbh lol, I think it's built into the tables
I have been in an IT room once
if you can't figure out what os it is, it is probably some weird education linux distro or chromeos
meh, hardware really doesn't matter
if their hardware can't handle modern clients, just use older versions
if they can't handle older versions, the hardware is really, really, terrible, so just run classic games
I really don't miss windows 95
Anyways, we peaked at like 800 concurrent back then
damn thats a lot of players
school servers are definitely an interesting thing.
probably aren't as much of a thing now though.
we never had any special events or stuff like that sadly
I'm running a server at uni but no one is joining 😦
as you can see, im trying to change that as I moved to this school 3 months ago
uni students are too busy though
I haven't had enough free time to do anything in years
If you're in high school, convince some teacher to let you make it a club, then use that club and the resulting infrastructure around it to organise events.
If you're in middle school or below... idk.
I can do it privately, 10x better
Not always
If you do it officially, you can do things like pa system announcements to the entire school about specific events at specific lunch breaks
server infrastructure is not the issue
oh bro I got enough connections lmao
well I don't, but friends of friends of friends
don't need social infrastructure
is we could do stuff like stats
and we could figure out things like several administrative staff and one vice principle playing in their office 😛
(this was in MC's heyday tbf)
lmao
anyways, that's enough remniscing... just do whatever you think your players would find fun, and if needed, what you think your staff would find useful
That's really the only goal that matters for small servers
and medium servers for that matter
(100 is bordering on medium)
I still find it funny you call 100 concurrent players small lmao
that is HUGE for me
the 800 concurrent was my school experience. I've had experience with bigger
we only got like 1-1.2k students on the school
For me, huge is hypixel tier
same (aproximately), which is why I am impressed we got 900 of them.
well maybe im underestimating everyone
maybe we'll also get multiple hundreds lmao
yeah thats fair
Dont think so
oh wait
I fucked around and found out
you can
WorldCreator overworldCreator = new WorldCreator(plugin.getDataFolder().getPath().replace("\\", "/") + "/worlds/" + worldName);
Bukkit.createWorld(overworldCreator);``` its just kinda cursed though
but it actually works
I love surprise features
Any good TAB API out there? the literal plugin "TAB" api does not fully convince me
you want a tab api or an api for the plugin tab
How would I go about extending from an enum to add a method?
I'm trying something like this:
public class MaterialPlus {
private Material material;
public MaterialPlus(Material material) {
this.material = material;
}
public Material getMaterial() {
return material;
}
public boolean isTool() {
switch (getMaterial()) {
case NETHERITE_PICKAXE:
case NETHERITE_SHOVEL:
case NETHERITE_HOE:
case NETHERITE_AXE:
case NETHERITE_SWORD:
case DIAMOND_PICKAXE:
case DIAMOND_SHOVEL:
case DIAMOND_HOE:
case DIAMOND_AXE:
case DIAMOND_SWORD:
case IRON_PICKAXE:
case IRON_SHOVEL:
case IRON_HOE:
case IRON_AXE:
case IRON_SWORD:
case STONE_PICKAXE:
case STONE_SHOVEL:
case STONE_HOE:
case STONE_AXE:
case STONE_SWORD:
case WOODEN_PICKAXE:
case WOODEN_HOE:
case WOODEN_AXE:
case WOODEN_SHOVEL:
case WOODEN_SWORD:
case GOLDEN_AXE:
case GOLDEN_HOE:
case GOLDEN_PICKAXE:
case GOLDEN_SHOVEL:
case GOLDEN_SWORD:
return true;
default:
return false;
}
}
}
This is the exact scenario where you should use utility methods
until they add a new tool
When was the last time that happened
idk 🤷
So make the constructor private?
1.16
I mean yall are right, new tool types is more likely than new tools
No?
thats just netherite
oh new tool
in existing tools
The only problem with tags is datapacks can change em
All fun and games until I add waxed lightly weathered cut copper stairs to the sword tag
Sure, but that sounds like a datapack problem
or make a config option with a list of tools and blame the server owner for not using the plugin correctly
which is only exponentially more work for you ofc
Coll would you be able to help me out with utility methods? My plugin work is solely a case by case atm cuz trying to learn it all at once doesn't help lol
My SMP server has a data pack (terralith) and I’m looking to add seasons to the server. The problem is, I need to get every custom biome. Should I iterate through an array of terralith biome names, and get the registry for each?
Utility method basically means make a static method that takes a material and returns a Boolean
Have fun working with datapack biomes
Biome is still an enum :(
So similar to what I have already?
similar but no enum extensions needed
You don’t need an enum to get a level.biome.Biome object
I don't need the parameter for the constructor?
Ah so you are using NMS
Yes
I just work with namespaced key
Yeah, so it would be possible to access the datapack biome registries through a namespace?
Yes
It seems like it would
Ok awesome, thanks
Like this?
public class MaterialPlus {
public static boolean isTool(Material material) {
switch (material) {
case NETHERITE_PICKAXE:
case NETHERITE_SHOVEL:
case NETHERITE_HOE:
case NETHERITE_AXE:
case NETHERITE_SWORD:
return true;
default:
return false;
}
}
}
@EventHandler
public static void itemPickupEvent(EntityPickupItemEvent event) {
Player player = ((Player) event.getEntity()).getPlayer();
PlayerInventory inventory = player.getInventory();
if (event.getItem().getItemStack().isSimilar(ItemManager.abundanceDiamond)) {
for (ItemStack item : inventory) {
ItemMeta meta = item.getItemMeta();
if (item.isSimilar(ItemManager.abundanceDiamond)) {
} else if (item.containsEnchantment(Enchantment.LOOT_BONUS_BLOCKS) || item.containsEnchantment(Enchantment.LOOT_BONUS_MOBS)) {
// player.sendMessage("Enchantments have already been added");
} else if (MaterialPlus.isTool(item.getType())) {
// player.sendMessage(item.getTranslationKey() + " is in your inventory.");
meta.addEnchant(Enchantment.LOOT_BONUS_BLOCKS, 3, true);
meta.addEnchant(Enchantment.LOOT_BONUS_MOBS, 3, true);
player.sendMessage(item.getTranslationKey() + " is now enchanted.");
} else {
player.sendMessage(item.getTranslationKey() + " is in your inventory.");
}
item.setItemMeta(meta);
}
}
}
cool
lol, any suggestions on cleaning it up?
can someone help me with intelliJ?
i'm trying to have my plugin directly in the right dir for my local server, then reload/restart the server ||reload is better||
This?
@EventHandler
public static void itemPickupEvent(EntityPickupItemEvent event) {
if (!(event.getEntity() instanceof Player)) return;
Player player = ((Player) event.getEntity()).getPlayer();
PlayerInventory inventory = player.getInventory();
if (event.getItem().getItemStack().isSimilar(ItemManager.abundanceDiamond)) ...
}
ohhhhh
gotcha
sorry I was confused on why I was inverting the statement
gotchaaaa
So like how i updated it?
@EventHandler
public static void itemPickupEvent(EntityPickupItemEvent event) {
if (!(event.getEntity() instanceof Player)) return;
Player player = ((Player) event.getEntity()).getPlayer();
PlayerInventory inventory = player.getInventory();
if (event.getItem().getItemStack().isSimilar(ItemManager.abundanceDiamond)) {
for (ItemStack item : inventory) {
ItemMeta meta = item.getItemMeta();
if (item.isSimilar(ItemManager.abundanceDiamond)) {
} else if (item.containsEnchantment(Enchantment.LOOT_BONUS_BLOCKS) || item.containsEnchantment(Enchantment.LOOT_BONUS_MOBS)) {
// player.sendMessage("Enchantments have already been added");
} else if (MaterialPlus.isTool(item.getType())) {
// player.sendMessage(item.getTranslationKey() + " is in your inventory.");
meta.addEnchant(Enchantment.LOOT_BONUS_BLOCKS, 3, true);
meta.addEnchant(Enchantment.LOOT_BONUS_MOBS, 3, true);
player.sendMessage(item.getTranslationKey() + " is now enchanted.");
} else {
player.sendMessage(item.getTranslationKey() + " is in your inventory.");
}
item.setItemMeta(meta);
}
}
}
17
could you show an example? I want to figure it out but I got to see a stepping stone
Error:
java.lang.NoClassDefFoundError: net/md_5/bungee/api/chat/BaseComponent
Caused by: java.lang.ClassNotFoundException: net.md_5.bungee.api.chat.BaseComponent
if I commend this out it works:
TextComponent textComponent = new TextComponent(chatMessage);
textComponent.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text(hoverMessage)));
player.spigot().sendMessage(textComponent);
I think its a problem related to dependencys. but i dont get how to add the bungeeAPI
sorry about this, i'm not in the best headspace and i thought coding would help
All good. I'll work on it some more
Thanks for the help though!
Bungee chat api is included in spigot
Are you runing craftbukkit or something
im using bukkit yeah (if thats what u mean)
Send output of /version
ingame?
This server is running CraftBukkit version 3670-Bukkit-bd29f41 (MC: 1.19.3) (Implementing API version 1.19.3-R0.1-SNAPSHOT)
Checking version, please wait...
You are 26 version(s) behind
Use spigot
Not the craftbukkit jar
Idk where people even manage to get the craftbukkit jar
Error occurred while enabling wamasterv3 v${project.version} (Is it up to date?)
java.lang.NoClassDefFoundError: net/minecraft/world/level/Level
got error while intelliJ is saying it's working, any idea?
You need to reobfuscate with special source
so i basically have to set the whole mincraft server up completly from scratch?
No you can just change the jar
Does get[redacted] offer craftbukkit jars or something
https://hastebin.skyra.pw/obalavulay.pgsql
here is my code
Smh my head
Like I said you need to reobfuscate
yeah
can't i just use the mojang mapping?
the link is telling me to use mojang mapping
and i did set it up
Well it appears to be looking for the Mojang mapped classes at runtime
i went to this exact page multiple time today (it took me a long time to understand)
k got it
i think
Is there a way to constantly check a players inventory for an item that isn't just picked up? Like if crafted and added to an inventory or transfered from a chest?
Or do I have to create an event for every event to check?
Runnable?
?scheduling
so
import net.minecraft.world.level.World;
instead of
import net.minecraft.world.level.Level;
?
entire package is obfuscated
BuildTools deofuscates the craftbukkit sources. Then you need obfuscate deobfuscated code from your codebase back when compiling.
how do i do that?
If you need to access NMS classes from inside your Spigot plugin, it is a very good idea to use the so called Mojang mappings. Disclaimer: This post is obviously written for 1.18.2. If you use another version, you of course have to replace every occurance of “1.18.2” with the version you actually use. What...
this is my pom
https://hastebin.skyra.pw/okifobopir.htm
Your server version?
1.20.4
paperweight better fr
😎
https://hastebin.skyra.pw/uyohewagin.htm
what's wrong with my pom.xml
2 things:
-followed this, and it's not compiling in the right folder (IDK where it's compiling but i do have the profile)
https://blog.jeff-media.com/how-to-make-maven-automatically-put-your-plugins-jar-into-your-test-servers-plugins-folder/
-followed this, and my mapping is still not working ||feel free to ask for more||
https://blog.jeff-media.com/nms-use-mojang-mappings-for-your-spigot-plugins/
did you use maven to compile?
also your remap config is incomplete
you're missing the remap-spigot configuration
you missed this part
you also have to set the scope of brigadier to provided
and then compile using mvn package
you also didnot follow the tutorial on how to change the output directory at all
Hey, so I've got a question. So I've never had to do this before, but I'm making an android app that is supposed to connect to a database and perform both read and write operations on it. I have no idea how to store the credentials in a way that won't make it easily accessible for anyone who would want to tamper with my database. What is the standard procedure for this? Maybe you could link some articles for me?
What you'd do is have a backend server for this
a rest api for example
or gRPC if that fits your use case better
app -> server -> database
look into restful API's using OAuth
restful api is to have the end points to connect to based on what needs to happen
and oauth to control the level of permissions the user has
can someone help me, im trying to send 2 different messages on action bar but they are sending on same line like over lapping. is there any example which sends 2 different messages on action bar so i can study it and learn
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
1 sec
?paste
The Actionbar only has one line
oh
There is a way to do it, I just wanted to see what they had lol
basically you just remove the action bar and create a new one to show another different line
if (player != null) {
int taskId = Bukkit.getScheduler().scheduleSyncRepeatingTask(BlissPluginRemake.getInstance(), () -> {
if (player.isOnline()) {
if (isRightClick) {
long remainingRightClickCooldown = getRemainingCooldown(rightClickCooldowns, player.getUniqueId(), RIGHT_CLICK_COOLDOWN_SECONDS);
String rightClickMessage = ChatColor.GREEN + "" + ChatColor.BOLD + "ULTIMATE Ability " +
(remainingRightClickCooldown <= 0 ? "Ready!" : "Cooldown: " + Math.ceil((double) remainingRightClickCooldown / 1000) + "s");
sendActionBarMessage(player, rightClickMessage);
} else {
long remainingLeftClickCooldown = getRemainingCooldown(leftClickCooldowns, player.getUniqueId(), LEFT_CLICK_COOLDOWN_SECONDS);
String leftClickMessage = ChatColor.GREEN + "" + ChatColor.BOLD + "LEFT CLICK Ability " +
(remainingLeftClickCooldown <= 0 ? "Ready!" : "Cooldown: " + Math.ceil((double) remainingLeftClickCooldown / 1000) + "s");
sendActionBarMessage(player, leftClickMessage);
}
} else {
Bukkit.getScheduler().cancelTask(hotbarTasks.get(player.getUniqueId()));
hotbarTasks.remove(player.getUniqueId());
}
}, 0L, 20L);
hotbarTasks.put(player.getUniqueId(), taskId);
}
}``` im trying to send cooldowns for 2 different abilities
ik it is messy and not readable -_-
sorry
can you give me a example
Ok so I looked at the api, and easier method is actually to register 2 bars
oh
and then use a task to set one visible and the other invisible
and then you just alternate every so often
it should make it to where the bar doesn't dissappear but the text changes
i want that they both show at same time but is that possible?
Sorry, I'm still stuck. I do get the idea, but I do not really understand how I'd implement it, if that makes sense. So, for example, I want to have a database containing likes and dislikes and I want a user to be able to submit their like/dislike (given that they are authenticated with Google for example). Could you very briefly go over how I could do that?
Well it only has one line, so there isn't like a trick to get 2 bars to show up but with one with lower text, so I doubt it. It might be possible with a resource pack if packs are able to distinguish the bars
resource pack? thanks i will try to make a resource pack and see if that wrks maybe
First of authenticated the user in some way
When the user likes a post send a request to the server telling it what they liked and their auth token
the server should then save that in to the database and return a response
I think the Minecraft Commands discord server might be more of help with the resourcepack.
I am fairly sure you can use font magic to create multiple lines.
can you please send me the server link i will be very gratefull
https://discord.gg/QAFXFtZ
Then go to https://discord.com/channels/154777837382008833/1067203509495267448 and crate a post
thanks!
That makes sense now , thx!
you need the auth token so you can verify that they are legit, you don't need to save the auth token in the DB just fyi
once verification is done, you do whatever you need to do from the request and the DB 🙂
its really not all that difficult, and yeah may be wise to use something like google auth instead of straight making your own OAuth stuff lol
^
Gotcha, ty 🙂
If you're writing the backend in JavaScript you can use PassportJS to help with authentication
not sure if there's anything like it for other programming languages
actually they probably could just straight do it with apache and mysql
without any backend language
True but take a look at all the options Passport provides 
I don't use javascript for backend purposes and never will lol
says not found
guess someone messed up
lol
Click strategies on the side
if they do use that
they need to ensure they use OAuth 2.0
I have no clue if OAuth 1.0 even still works with google
yeah I see that just it has both OAuth 1 and 2 for google
and was just saying I am not sure if 1 even still works XD
ah yeah
Looking at it Oauth1 was deprecated in 2015
Yeah I know, hence me mentioning it most likely won't work if you tried it 😛
by now google would have most likely migrated everything away from that end point
I know that the strategy works so it must be using oauth2 by default
it could be the default
would is good if it is
just really weird though they have kept in there for Compatibility but not sure how that works if the service simply won't accept it regardless XD
back in 2015, it was necessary but that is because as per the usual it takes a year or two for everything to migrate lol
It was last updated in 2019
or you can be like some other services and just immediately cut it off without warning >>
Still working though 
btw, if this is an app if you want a way to handle disconnects because cellphone signal isn't always top notch
implement SQLite into your app, and then in the app have a scheduling service to clear it out every so often
Hmmm that's fair, I'll keep that in mind
also android devices disconnect when you connect to wifi
when it decides to switch over too
another reason I mentioned it
Yeah I've noticed that, I don't think that will be a problem though? If the user is authenticated already, the token is stored locally for the duration of the session, right?
The worst use of SQLite I've seen is the Swedish dictionary app. They store html as rows :c
session resets if its a new connection from a different connection source
Spigot Discord, the unlikeliest places to receive help for random programming things
I still need to figure out a better way of ripping it
they store raw html?
it's not raw
they use their own int ids for html tags
I had to reverse engineer their app to figure that one out
at that point they might as well just save the html files as blobs
would be a lot faster then some random conversion thing they got going
yeah
frostalf you don't happen to know how to get another apps additional content download
It seems to be a separate URL downloaded on first launch
Depends how you are wanting to obtain it
I skipped that part by rooting my emulator and grabbing the downloaded file
but I just want to automate fetching it so I don't have to do that
are you trying to restore?
I want to grab the SQLite database that it downloads
oh that is easy then
It's the only offline version I could find
hmmm, not sure if you are able to do it the easy way or not
so, anyways, depending on your router you could just look at the router looks with the specific ip of your device
should show the URL
if you don't have that level of control with your router, then you could just turn your computer into a router
if your computer happens to have a wifi card
use wifi card as AP, let device connect there, then use wireshark on pc
and pull the url
or, since you are rooted just scour your device for the content 😛
This app is actually so poorly coded
I wonder if they got a poor student to write it
can anybody order these events by the which is called first? PostLoginEvent, ServerConnectEvent, ServerConnectedEvent
those are bungeecord events if anybody is wondering
PostLoginEvent ServerConnectEvent ServerConnectedEvent
oh i already had them ordered O:
yeah
thanks for the confirmation
just note that serverconnectevent doesn't always happen because of a player connecting
Hey everyone, I'm working on a plugin to prevent my friend from using console, for peace of mind. I need to somehow hide the coordinates of a player when they join, like the console says "Player joined at x,y,z in {some_world}"
the server events are independent of the player as bungee and mc server routinely communicate to make sure they are still connected
you are probably not going to be able to hide the console lol, but you could try I suppose just won't be easy
sounds like its their friends server to begin with
how can I not give console access to someone else lol
Then there's nothing you can do
i beg to differ
so the event could be called again for an online player?
If they have full access they can do whatever they want
your plugin isn't going to stop them
I actually do have a neat command to hide the entire console, but the thing is it seems to always run before the join message is displayed
the server events can be thrown because a server connected or something caused bungee to initiate a connection to a server
True, but it might halt him, we can check if the plugin in enabled or not, and if it isn't, we will know something is up
its just not always the case that its caused by a player if I recall correctly
What I have is:
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
console_clear();
print(ChatColor.GOLD + "A player has joined, obfuscating console...");
event.setJoinMessage(StringUtils.repeat("/n", 10000));
}
this will never clear the log
But it always runs before the full join message is displayed
ah wait
wrong one
that was my goofy ass first attempt
so it may clear the console screen but not the log
indeed
everything
well shit
log captures output before the console gets the output
yea then there is nothing I can do, does anyone know of a better way to prevent op abuse?
So I found how the app downloads the database
It uses the AssetPackManager fetch method provided by Android
oh should be easy then
you mean owner abuse?
Yep
well they are the owner, its their's
Yea, but is there no way to give peace of mind to their players? Like we would have zero clue if he cheated
Even if I make a server, is still cannot prove i did not cheat
Reason it makes it easy is because it has to go in the apps private data directory
/data/data
if you have root, its a non-issue to fetch it
or you could use ADB
Yeah I've already done that
as I said I already rooted my emulator and grabbed the file manually
I'd just like to avoid that part and download it from an url or smth
yeah might be harder to do depending how they have the end point setup
that was why I was saying using wireshark or your router logs
because it should show urls 😛
True but I've never used Wireshark before
super easy, but the only way to use wireshark though for this is your pc needs to have both ethernet and wifi
you use the wifi card as an AP device
this lets your android device connect to it, and now your computer acts as a router
ethernet connection because well you need internet and we can't use wifi as that is now an AP
you would use wireshark to just monitor the AP/Wifi connection
well log that is
and then you have the app do its thing, once you have your log, you just go through it 🙂
Monitoring packets☠️
no
we don't need packets
we just need the log of connections
we don't care about the data in the connection
not everyone has a fancy router
and not everyone owns their router and its some low grade ISP thing
so it just depends, occasionally an ISP uses a somewhat decent router that is sufficient to use for this lol
they want the url of a file that an app uses to pull a particular file
they have the file, they just want to be able to pull the updated file whenever they want
ftp?
no, it uses https
More like socket
using Androids Package Manager
Androids package manager? Isn't that what installs apks??
yes but it can be used to download other files too
lol
you should try doing some crazy stuff sometimes

Making craftbukkit thread safe
I made a generator of random images (just a lot of random pixels), then I made it generate random videos, but as it turns out random is very slow so I'm gonna make it threaded
Also, as it turns out, having enough bitrate to display all the pixels takes a lot of space, my biggest has been about 2gb
But I don't really have a lot of space
I also wanna make a video player using spigot that just uses blocks and then play a randomly generated video
I'll put this on hold again idk how to use Wireshark
lol
probably gives you a new perspective on networking and people who specialize in it 😛
🤷♂️ I haven't tried Wireshark yet
well, maybe you should try it so you can know how to use it
yeah I'll try it someday when I have more time
Hey, I've been thinking, I want to have a hosting to store images and a MySQL database. Would it be fine to just get a VPS and run them on the same address but different port?
It probably is but I'm kind of overthinking
you only need hosting for the DB
you can just store the images as blobs in the DB
Oh
Actually yeah I can, especially given that my images are gonna be rather small
Is it better to look for a solution that provides me a database or do everything myself with a VPS?
even if they weren't, it is still the better method since images are binary things anyways and blobs is for storing binary objects
Fair enough
you could easily get away with a cheap VPS with a bit of space
it doesn't need super good CPU specs either
just enough to run a small webserver, DB and voila
just need a bit of space to allow your DB room to grow if it needs to
I did, thx for showing me my errors.
but still got the error
java.lang.NoClassDefFoundError: net/minecraft/world/level/Level```
Thanks for the advice! One more question, is it ok to just create a user with read-only permissions and authenticate it in the app code? I do not need any authentication for accessing these images and they are basically the main purpose of the app, so I thought that having a read-only user is fine here, but I'm also afraid that somebody can take the credentials and send a bajillion requests to my database to make it inaccessible
always use separate users for various things, and users should only be given as much perms as is necessary. In your case you just need read only. However you are going to still need to have a webserver component to help protect against the thing you stated, second you would have to create the user with a global host flag which you don't want to do and your don't want your DB being accessible directly by the public either
so you still need a webserver but the whole images thing greatly benefits from restful solutions
literally just a single script if not just 2 or 3 lmao
you don't even need a full blown apache webserver either
you could go with more slimmed down webservers
Oh, I see, so I would still send requests to my REST instead of going directly to the database, and then I could have something like a rate-limit on the REST?
exactly
all the while the DB is not accessible to the public keeping it safe 🙂
literally they would need to have access to the terminal to get the required access
if they manage that, well might as well give them their reward because you have other problems other then worrying about your DB at that point
Yep, gotchu. Thanks a lot, I'm going to look into some affordable VPSs now 🙂
Haha fair enough
for ram, you need no more then 4GB and that is a bit generous in what your needing lmao
slim http server won't take more then about 300-500mb of ram
allocate 2GB to mysql
Does the CPU matter much for this?
not really, a simple quad core is good enough at 2-3ghz
doesn't really matter the model or anything
doesn't even have to be modern either
Cool, ty:)
just fyi, the thing you are going to make, I can easily run off a router with a HDD connected to it
that is how little in terms of resources you need for this
What order is mysql stored in, are newest at the top or the bottom?
Yeah, I imagine that not much is needed for this 😛
this is a bit ambiguous
first it depends on the storage driver
second, its not really relevant as it depends on your queries
that is, the queries give rise to order
there is default ordering based on the queries if you exclude explicit ordering
so lets say you have a primary key, ordering is based off that by default
otherwise ordering is alphanumeric of whatever is the first column
but the ordering only applies based on what is returned via query
so what you get from a query isn't necessarily how its exactly stored in the DB
but it also depends on the storage driver too, as the storage driver dictates how it stores stuff in the raw format XD
innodb for example records every transaction and stores the most recent at the end
guys
i buyed itemsadder and says this:
[ItemsAdder] Enabling ItemsAdder v3.6.3-beta-5
[12:56:03] [Server thread/INFO]: [NBTAPI] Found Spigot: v1_16_R3! Trying to find NMS support
[12:56:03] [Server thread/INFO]: [NBTAPI] NMS support 'MC1_16_R3' loaded!
[12:56:03] [Server thread/ERROR]: Error occurred while enabling ItemsAdder v3.6.3-beta-5 (Is it up to date?)
java.lang.UnsupportedClassVersionError: ia/m/je has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 55.0
at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:186) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at java.lang.ClassLoader.loadClass(ClassLoader.java:589) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:104) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?]
at ia.m.iK.a(SourceFile:170) ~[?:?]
at ia.m.iK.a(SourceFile:105) ~[?:?]
at ia.m.iK.a(SourceFile:42) ~[?:?]
at ia.m.iK.b(SourceFile:36) ~[?:?]
at ia.m.mn.<init>(SourceFile:26) ~[?:?]
at ia.m.mn.init(SourceFile:42) ~[?:?]
at dev.lone.itemsadder.Main.onEnable(SourceFile:219) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:492) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:406) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:554) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:257) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:928) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:273) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at java.lang.Thread.run(Thread.java:829) [?:?]
we are not itemsadder support
YES BUT WHY THIS S.HIT DOESNT HAVE DISCORD?
ask them I guess, you can always contact the author on the forums
anyways, your problem is your java is outdated for the version of the plugin you are trying to use
update your java
Also this would probably go to #help-server but eh a bit ambigious
yeah, but I figured I would just tell them that and hopefully they just be on their way
if it continued I was going to tell them to go there 😛
It does
Usually what takes longer:
HTTP request to a website or
reading from a database?
how do you compile?
you have to use mvn package to compile, as I already said
using this
?paste your pom
your remapping config is still incomplete, as I already said earlier
you're still missing this execution part
or the other one, haven't checked
just copy paste the whole plugin section
np
btw if you want to use ${project.version} in plugin.yml, you also need to add this directly inside <build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
thx
package com.amirparsa.iranskylobby.listeners;
import com.amirparsa.iranskylobby.IranSkyLobby;
import com.amirparsa.iranskylobby.items.structure.Clickable;
import com.amirparsa.iranskylobby.items.structure.CustomItem;
import com.amirparsa.iranskylobby.items.structure.CustomItemContainer;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.persistence.PersistentDataType;
public class PlayerInteractListener implements Listener {
@EventHandler(ignoreCancelled = true)
public void onPlayerInteract(PlayerInteractEvent e){
IranSkyLobby.getPlugin().getLogger().info(e.getAction().name());
if (e.getAction() != Action.RIGHT_CLICK_AIR && e.getAction() != Action.RIGHT_CLICK_BLOCK) return;
IranSkyLobby.getPlugin().getLogger().info("04");
if (!e.getPlayer().getInventory().getItemInMainHand().hasItemMeta()) return;
IranSkyLobby.getPlugin().getLogger().info("03");
if (!e.getPlayer().getInventory().getItemInMainHand().getItemMeta().getPersistentDataContainer().has(IranSkyLobby.getPlugin().getItemKey(), PersistentDataType.INTEGER)) return;
CustomItem item = CustomItemContainer.get(e.getPlayer().getInventory().getItemInMainHand().getItemMeta().getPersistentDataContainer().get(IranSkyLobby.getPlugin().getItemKey(), PersistentDataType.INTEGER));
IranSkyLobby.getPlugin().getLogger().info("02");
if (!(item instanceof Clickable)) return;
if (e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK) {
((Clickable) item).onClick(e);
}else{
IranSkyLobby.getPlugin().getLogger().info("01");
}
}
}```
why is it not logging any right clicks?
im tryna right click a compass in air
Does it print anything?
no
did you register the listener?
yeah
try setting ignoreCancelled to false
This event will fire as cancelled if the vanilla behavior is to do nothing (e.g interacting with air).
i should fix this quick im losing tons of players cause my internet speed is so quick that i cant move the files to a dev server
no way
it got fixedddd
thanks
https://paste.md-5.net/faduzarenu.xml
am i using java 7 ??
yes
set the java version in <properties> as in the example pom here (1.8 = java 8, 17 = java 17) https://blog.jeff-media.com/how-to-create-your-first-minecraft-plugin-using-the-spigot-api-and-maven/
Any way to simulate a right/left click from a player?
as in animation?
swingMainHand()
What is the goal here
?xy
has anyone here ever worked with display entities in spigot?
yes
oh! Well have you ever animated item display entities?
Because I'm having a problem with it
?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!
ah alr
I was trying to spawn an item display entity, but it didn't really seem to work. Can I upload my code here or is that not allowed? Just wanna be sure
?paste
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
tysm
will do
I thought I was going to be able to animate an item display in spigot because I already knew how item displays worked through commands and also the basics in spigot. But when I tried adding any type of animation to it, it just didn't work... Why?
This is my code rn: (it's really bad code, but it was just a proof of concept)
https://paste.md-5.net/alifuvekel.cs
so do I use a bukkitrunnable?
Also use the spawn method that accepts a consumer if you plan on modifying an entity directly as it's spawned
That will ensure that the entity is spawned with the modifications instead of it spawning and then being modified
yes
ty everyone!
I have created a code that gives me about than vector per block that tells where the arrow is located.
But the goal is to create a code gives more vectors how do I do that?
Here is the code now:
https://paste.md-5.net/hipusiwohe.java
PlayerObject?
Are you trying to predict the trajectory of an arrow?
My goal is to retrieve the trajectory from a "projectile", therefore I want to be able to retrieve a list of all the locations it will pass through
Do you need to see the code for playerObject?
Bukkit.broadcastMessage("ee "+
Bukkit.getScoreboardManager().getMainScoreboard().getObjective("OpNum0").getScore("mommyplease_uwu").getScore());```
the line above gives me
ee 0
but it's supposed to give me 1000
[15:39:33 INFO]: MommyPlease_UwU issued server command: /scoreboard players get MommyPlease_UwU OpNum0
[15:39:49 INFO]: MommyPlease_UwU has 1000 [OpNum0]
Is it possible to have multiple primary keys in MySQL?
If they unique
no
rip
but you can have multiple columns in the key
I want to lookup something both by location and by player
CREATE TABLE userdata (
userid INT,
userdataid INT,
info char(200),
primary key (userid, userdataid)
);
(https://stackoverflow.com/questions/217945/can-i-have-multiple-primary-keys-in-a-single-table)
this e.g. does work
anyone has a clue about this?
anyone know how to set biomes using NMS?
i can only find 1 packet
but i dont know how to use it
Is it case sensitive?
this class to be specific
don't thinks so for the name (i'll try tho)
but the scoreboard is
Are you trying to make clientside biomes?
uh well, yes and no. I'm just trying to make my thing faster but if i need to do it client side its whatever
rn im using bukkit unsafe
and its slow asf
Packets won't make it save
ye ik
also you'll have to update it every time the area is loaded (comes in to view)
hmm
is there a way to make it server side using nms?
async? if possible
people say its unsafe to set biomes using nms
just use bukkit unsafe
but its kinda slow imo, it takes like 3 seconds to set a 200x200 area
which makes sense but i want to improve it
even with case sensitive it's not working
how would i start going about filling everything inside a list of locations with particles
i've tried getting the center point, set the outside points closer and closer to the center point and creating new triangles,
just asking if there's a better way
someone has info obaut key from lootTable obj (all keys if possible to save time)?
it's meant for polygons
i need this for this class
declaration: package: org.bukkit.loot, enum: LootTables
i can get this from obj?
?
I have no idea what you're trying to say
can I get the type of an object from the object itself?
how get LootType from LootTable obj in event
What's LootType
for item generation in chest
in this event
.
??
tf
to generate an item in a chest, I need to get it from the event, but I also need to get what structure the chest belongs to, I take the key from the LootTable object
and to set up generation I create my enum to the structure for the config
but you showed a link to an existing enum
So I wanted to know if it is possible to get the type from the LootTable object itself
don't many items overlap?
what?
like different structure chests have the possibility to give the same items
how get this from LootGenerateEvent
all what i can get this key
hosting an api on github packages, how can i authenticate to install it on my project ?
because maven says :
authentication failed for <url>, status: 401 Unauthorized
don't you want getlootcontext
declaration: package: org.bukkit.event.world, class: LootGenerateEvent
ive followed this but i cant seem to find the settings.xml file its talking about in my plugins filetree
settings.xml is located in your maven install
where can i find that ?
You should know where it's installed
my IDE did it for me
if you have bash you can use the where command
where mvn
ah that won't work with the IJ install
it says it couldnt find any file
well then try using the .m2 repo as the guide tells you to
Never tried putting a settings file there but ig it'll work
Create one where it tells you to
bump
No, that's the whole point of having them?
Ok, howd I make it so I can have multiple rows with the same key?
i need get structure type from opened chest but all what i can get this key like "chest/village/village_savanna/chest"
and i try depent this with my enum
becuse i not can get StructureType
Looking at what alex sent those probably shouldn't exist twice
but this really long so i was want find someone who was do same thing
basically: I have a plugin that logs it to a database when a player throws an ender pearl, and I want to be able to lookup by uuid the database
uh try to get LootTables with Registry.LOOT_TABLES.get
Then dont make it a primary key
Yeah but idk if both float and double exist on specific sql flavours
did u try what i told u?
hi is there anyway to make a spigot plugin send messenger to all player in bungeecord?
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
maybe you can do locateneareststructure on the location of the chest
trying to turn my core plugin into an api for my other projects, i set up a simple consumer for my api
public final class Fabledconsumerplugin extends JavaPlugin implements Listener {
public static Core api;
public static MongoWrapper db;
@Override
public void onEnable() {
Plugin plugin = Bukkit.getPluginManager().getPlugin("Core");
if (plugin != null) {
msg.log(""deeb• &fHooked into the FabledRealmsAPI, "deeb" + plugin.getDescription().getVersion() + "&f!");
api = (Core) plugin;
db = api.getHelper().getMongoWrapperInstance();
getServer().getPluginManager().registerEvents(this, this); // Register events
} else {
msg.log("&#eb4034• &fCouldn't find the FabledRealmsAPI, continuing without it");
}
}
@Override
public void onDisable() {
msg.log("Bye bye from consumer");
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
CompletableFuture<Object> query = db.getFieldValue("players", player.getUniqueId().toString(), "type", "profile", "country");
query.thenAccept(country -> {
if (country != null && country instanceof String) {
msg.send(player, "You are from " + country);
} else {
msg.send(player, "Error retrieving your country!");
}
});
}
}```
But when i run it, this is what it says : https://pastebin.com/7abLBzuu
the msg class (used to log and send messages) is a static class from my api plugin, so as you can see it actually is logging to the console, but i cannot retrieve the Core api object ?
Core is basically my api plugin
db is apart of my api, its the database wrapper ive built around mongodb
Did you load the same class twice
like in two different plugins
You probably shaded it
im not installing the shaded version from maven
ohhh
mvn --batch-mode -DuseGitHubPackages=true deploy
the batch mode flag might be the cause of the issue right ?
doesnt batch mode also include the shaded version ?
hi is there anyway to make a spigot plugin send player to another server by bungeecord and teleport player to another player in the request?
no all it does is run in non-interactive mode (disables certain console behavior)
It doesn't affect the outcome
Yes use the messaging channel
Depending on how you want it to work you might need your own messaging channel and bungeecord plugin
but for a simple tpa you should be able to use a clickable message to avoid needing it
(a tpa accept command requires bungee plugin)
so what could be the issue ?
.
do you have an guide to show how the spigot side send data to bungee side? cus i want to make it easier by spigot plugin send data to teleport player to server xxx then bungeecord side will move player to with a data to make spigot side know it not a normal change request and teleport player to xxx player by UUID included in the data
how do i check that
I already sent you the guide for that
Open the jar and see what's inside or send your pom
?paste
doing it rn
If you need a more detailed guide read: https://www.spigotmc.org/wiki/sending-a-custom-plugin-message-from-bungeecord/
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
why did you disable the dependency-reduced pom?
hey, so ihave this code in this list, there is an item that looks like this, wich means he should be removed from the list, because of its lore. But, when idrop all the items of the list, its still drops. Do you know why?
Yea xD
yep it was the problem, thx !!!
why not just use PDC to identify those items?
what?
or: Why you should NEVER use NBT tags again! Spigot 1.14.1 added the biggest improvement that (in my opinion) ever made it into the Bukkit API: The Persistent Data Container (PDC). It can be used to store custom data on Entities, TileEntities, and ItemStacks. Using a bit of math, it can also be used to...
you shouldnt use the lore to identify your items
why tho?
Maybe you want to not have a String in the lore
Maybe you want it clean
And other items
could accidentally duplicate the lore
So a Item from another plugin could be picked up by your Event/Manager
No, i want to have this in the lore, to represent its an item from the plugin
Why not do both, but identify the item via a PDC
You can, but you shiuld still identify via pdc
Its much more secure, lore changes would destroy the functionality
Ok i ll try
Is it possible to increase someone's underwater mining speed without aqua affinity or conduit power?
does haste not work underwater?
I'd like to make it the same speed as out of water, and haste doesn't increase it to a specific speed
and it makes the hand movement faster, and breaks it after a certain point
you could apply haste only when they're in water
It still speeds up the hand movement and breaks after a certain point, and it wouldn't make it the same speed as out of water since it can't be set to a specific speed it's just faster
comet, i think the only way would be a fully custom block breaking system
alr
if you really want to fully customize
Why not use the conduit effect, you can set it as invisible
altough if you tell me what you want to achieve maybe there is an easier solution @storm scaffold
it also makes sight underwater clearer, which I don't want to do
what do you want to do exactly?
they want to make mining underwater behave as if the player was out of water
has anyone worked with mcpi python with rapsberry pi, I want to make the discord bot interact with minecraft server, but there is a problem that I have encountered, I constantly get the wrong coordinates?
Is there a way to check if a block is clear? Like glass or water, stuff that light can pass through and burn mobs
if i want to cancel certain commands from all plugins during their event what event should i use and what priority
or isOpaque I forget
I think it's isOpaque actually
no I guess it is Material#isTransparent
deprecated though :/
Clear yes, burn mobs no
how can i convert 10000 - (System.currentTimeMillis() - cooldown.get(player.getUniqueId())) in seconds?
1 second is 1000 milliseconds
/ 1000
ye ye i done it thx
is it going to work if i put random Y coordinate value to load a chunk?
new Location(playerLocation.getWorld(), sheepSpawnX, sheepSpawnZ, 100).getChunk().load()
i mean not random but always the same
Bukkit.broadcastMessage("ee "+
Bukkit.getScoreboardManager().getMainScoreboard().getObjective("OpNum0").getScore("MommyPlease_UwU").getScore());```
the line above gives me
ee 0
but it's supposed to give me 1000
[15:39:33 INFO]: MommyPlease_UwU issued server command: /scoreboard players get MommyPlease_UwU OpNum0
[15:39:49 INFO]: MommyPlease_UwU has 1000 [OpNum0]
why are you editing your scoreboard with ingame commands
i'm not (i think)
i'm juste trying to acces the scorboard with my plugin
but it's giving me 0 instead of 1000 ||the last part is to prove that it's really supposed to be 1000||
Thinking about main scoreboard
Created sb should have a name
Or something
right, i'll check this
Lol what a username
yeah i love it
huh, not quite
https://www.youtube.com/watch?v=fj_smZ0Elt0 a custom pvp like this
Makes use of a ressource pack, otherwise it is completly vanilla
Utilise uniquement un ressourcepack, dépourvu de mods ou autre ajouts.
my friend is using command blocks and scoreboard to do that, and i'm assisting for some commands
was originaly a joke but quite love it in fact
Hi, does anyone know how to reproduce this minecraft HUD pattern when you hover your cursor over the item (Name, enchants, damage) etc. But does this have to do with cursor hovering in chat, and does appearing also happen in inventory?
Mojave banned guns. Good luck with that.
I know is adventure minimessage hover tag
Can also be done with the Bungee chat API
how to i get vault api to work
cause either my attempt is outdated or im stupid
but neither can be
cause i got it right of the githuv
github
?paste
Hey guys I'm trying to make a flashlight with light blocks that raytraces the block the player is looking at. I have it partially working right now, except it's like a paintbrush and replaces the block it raytraces to. How can I make it replace the block in front of the block it raytraces to? Like the next block towards the player
I tried subtracting the blocks location with the direction the player is facing but that didn't work
Any thoughts?
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
This should work
not gun actually
not working or i may be bad
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
yup i'm sending you the code
public static int process(List<String> sub,Entity targetEntity){
for (String e:sub){
Bukkit.broadcastMessage(e);
}
Bukkit.broadcastMessage(targetEntity.getName());
if (sub.get(0).contains("scoreboard")){
Scoreboard scoreboard = Bukkit.getScoreboardManager().getMainScoreboard();
for (String i :scoreboard.getEntries()) {
Bukkit.broadcastMessage( i);//sending my pseudo
}
Objective objective = scoreboard.getObjective(sub.get(2));
Bukkit.broadcastMessage( objective.getDisplayName()); //sending the name of the scoreboard
if (objective == null) {
return -1;
}
Score score = objective.getScore(targetEntity.getName()); //so i think it's this that does not work
return score.getScore();
}Bukkit.broadcastMessage("jcrois que ta commande $ existe pas");
throw new IllegalArgumentException("Error: truc qui ne marche pas");
}```
here's what i did:
Location playerLocation = player.getEyeLocation();
Vector direction = playerLocation.getDirection().normalize();
...
Location targetLocation = targetBlock.getLocation().subtract(direction);```
how would i make client side blocks breakable? I can break them in creative but not survival
How do you created and inited the scoreboard?
created with commands them inited with Bukkit.getScoreboardManager()
how can i create a custom biome? (nms)
why the Explotion of the tnt didn't break the block in the list?
private static final Set<Material> toDestroy = new HashSet<Material>();
static {
toDestroy.add(Material.OBSIDIAN);
}
@EventHandler
public void onEntityExplode(EntityExplodeEvent event) {
if (event.getEntity().getType() == EntityType.PRIMED_TNT) {
List destroyed = event.blockList();
Iterator it = destroyed.iterator();
while (it.hasNext()) {
Block block = (Block) it.next();
if (!(toDestroy.contains(block.getType()))) {
it.remove();
}
}
}
}```
nms
fr
you want to destroy everything except obsidian? wth
how can i use an api...
i haven't used one before
i want to destroy only the obsidian
gotta add it to your dependancies
your if statement is wrong then
ye i just saw it bruh
it tells you what to do etc
how do i add protocollib to my plugin? i need it to use PacketPlayOutPlayerInfo
Thanks
on the right are tabs
no wait it's right because now i changed it to if (toDestroy.contains(block.getType())) and it remove all the other blocks
i don't have to add anything to the server, right?
it's just a dependency when developing
yeah so jitpack broke with 0.0.1 so gotta use this:
implementation "com.github.Outspending:BiomesAPI:36ae278d6b" instead
you are using gradle?
yeah, jitpack doesn't like gradle so i had to do some magic and i had to fix it
but never reuploaded 0.0.1
or do you want him to use THAT specific build?
you gotta use that build cuz i didn't commit the fix until after 0.0.1
that's 0.0.1 ^^
which is fixed but
you created the plugin?
nice
no BiomeGenerator (to define how blocks are placed)?
hey
haven't done a full on generator implementation yet
gotta use
should probably be able to implement the biome in a chunkgenerator without the api tbh
for setting biomes
i wanted some help, i have created a sphere of particles around player and want to damage entities which are present in sphere. but the calculations are not coming to be accurate, some entities like 9-10 blocks outside sphere are still getting damaged
uh, oh no. It seems i have forgotten a method 💀
?pastebin
Is there any way to get a level.biome.Biome object from a level.chunk.LevelChunk ?
I would like to get the biome at specific coordinates within a chunk
@Override public void onEnable() { NMSHandler.init(); } init is on red ._.
how to use PacketPlayOutPlayerInfo? i have protocollib added to my project
yeah the wiki isn't updated you dont have to do that anymore
just use the images i sent
^
why the Explotion of the tnt didn't break the block in the list?
private static final Set<Material> toDestroy = new HashSet<Material>();
static {
toDestroy.add(Material.OBSIDIAN);
}
@EventHandler
public void onEntityExplode(EntityExplodeEvent event) {
if (event.getEntity().getType() == EntityType.PRIMED_TNT) {
List destroyed = event.blockList();
Iterator it = destroyed.iterator();
while (it.hasNext()) {
Block block = (Block) it.next();
if (!(toDestroy.contains(block.getType()))) {
it.remove();
}
}
}
}```
oh okay
using List without generics... what is this, java 4?
i supose that something has to be done on onEnable
They aren't using the diamond operator. So might be Java 6 :p
i usually just put listener classes there
wdym wait?
ah
use that to create a biome
oh ok
i have created a sphere of particles around player and want to damage entities which are present inside sphere. but the calculations are not coming to be accurate, some entities like 9-10 blocks outside sphere are still getting damaged. here is my code: https://pastebin.com/aLazhZxM can someone help me out?
your math is off. to check if the player is in circle just check the distance between the player and the center of circle. Then just check if the distance is less or equal to the radius
where can i get the numbers corresponding to a color?
oh, lemme try it thanks
you can just use Color.fromRGB(r, g, b);
if you'd like
oh it's rgb, nice
ye
Use generics so you don't have to cast randomly. List<Block> destroyed event.blockList()
@hardy cairn
return location.distanceSquared(center) <= radius;