#help-archived
1 messages ยท Page 59 of 1
Oh ok thanks
Um so something like this ```ScheduledExecutorService ses = Executors.newScheduledThreadPool(1);
Runnable task = () -> System.out.println("Running task...");
ses.schedule(task, 5, TimeUnit.SECONDS);```?
Yes it is...
It's not needed in your case
Huh @frigid ember
How is it getting all instances when there's no paremeter in the constructor
They didn't create it for no reason https://www.spigotmc.org/threads/bukkitrunnable-vs-bukkitscheduler.126754/
BukkitRunnable is an useless class
That's like saying Lists are useless when you can use Sets, but Lists provide things that sets don't
Every method synchronized and throwing 5 exceptions
Get exerosis here to bully this guy @rigid nacelle LOL
No need, I'm not concerned about arguing all day
public boolean connectedToCore(Chunk chunk) {
return false;
}
private boolean searchAdjacentChunks(Kingdom k, Chunk v) {
Set<Chunk> claims = k.getChunks();
Set<Chunk> visited = new HashSet<Chunk>();
Chunk core = k.getCore();
for (Chunk c : getChunksAroundChunk(v)) {
if (!claims.contains(c))
continue;
if (core == c) {
return true;
}
if (!visited.contains(c)) {
searchAdjacentChunks(k, v);
visited.add(v);
}
}
return false;
}
public Collection<Chunk> getChunksAroundChunk(Chunk c) {
int[] offset = { -1, 0, 1 };
World world = c.getWorld();
int baseX = c.getX();
int baseZ = c.getZ();
Collection<Chunk> chunksAroundPlayer = new HashSet<>();
for (int x : offset) {
for (int z : offset) {
Chunk chunk = world.getChunkAt(baseX + x, baseZ + z);
chunksAroundPlayer.add(chunk);
}
}
return chunksAroundPlayer;
}
I need help on this though
What does BukkitRunnable provide more than BukkitScheduler @frigid ember
I don't know what to put in
public boolean connectedToCore(Chunk chunk) {
return false;
}
Exactly, nothing
oof
I'm not going to argue it's not going to get either of us anywhere
[Server thread/ERROR]: [Essentials] You are running an unsupported server version! i have essentials reloaded 2.16.1.0.
I only use BukkitRunnable because I never used anything else lol
@remote sluice Your server version is outdated
I'd because scheduler API in bukkit sucks
1.12
wtf??'
yes, totally useless class
is it normal for this to happen to me? I see that it works properly
@brisk mango But how do you get what entity dealth damage?
Event#getDamager
Oh ok lol
because its an EntityDamageByEntityEvent
It gets called whenever an entity hits another entity
@fleet crane I guess we need to remove bukkitrunnable from bukkit
@patent monolith It's technically not necessary. I guess the only disadvantages in using your own executor service instance is that it will be running out of sync with the server, it coudl either go faster or slower. Aside from that I don't know what it is thatBukkitScheduler"can't" do, a part fromConsumer<BukkitTask>which was actually an addition in the newer versions.
I guess that's one reason I'm not that into BukkitRunnable.
/s
other than threads, I havent really used anything other than BukkitRunnable tbh
Another disvantange to BukkitRunnable is lambdas
One thing I also really love is lambda.
other methods are most likely better, so I will use them when it becomes necessary
yh~ :p
Add Consumer<BukkitTask> into 1.12.2 :p
I wish it was a feature back in the older versions.
However they still CAN update it @rigid nacelle if they'd wanted
something I always yearned for was:
plugin.runTask(task -> System.out.println("here is my task: " + task))
lol
They could, but I'm sure they won't be touching any old versions. :p
yeah olders version, are older version. Nobody has time to add new stuff in older versions
they already have so much to do for 1.15- 1.16
That is understandable and I won't disagree there.
I mean unstable.
I took a look at the newer versions, and they are
also so many bugs
Use protocolsupport and oldcombatmechanics on 1.15
what bugs?
Well the server basically crashed when I spawned a few entities
or the tps went down
Tried the same thing on 1.12.2 latest build and nothing happened
So yes, it is unstable
well if there's a bug you should report to spigot
I've never had any of those issues locally
It's not really a bug, it's just the version that it's basically shit both client side/server side
It's not shit, its more resource intensive
More features and support available in 1.15
yes, in the API
mc servers are single-threaded right?
mainly
For the main operations like block placing, killing mobs and interacting with them
Etc
So when you create plugins, do they run on the same thread as the server? How does that work
I mean, its possible to run your code async
So when you make things run async, they run on different threads?
yeah it takes load off main thread
Yep
Ok so any resource heavy tasks should be run async?
however its not just do everything async.. they can still be bad if you pile em
I would say... database operations async?
nms block changing..
Hmm ok, what would you recommend making async for best optimization?
dont expect 10mil blocks to be changed on main thread
Hey guys, how big can classes and constructors be? Is there a workaround for this?
https://pastebin.com/2LC0tv6F
Perhaps do the calculations on separate thread, but the actual block operations on the main thread. If needed, only do like 100 blocks per tick.
I would not recommend changing blocks async
You can't avoid the long constructor , if you need that many elements
Kotlin may make things a little shorter tho
Also how do I prevent things such as memory leaks in my plugin?
Always using dependency injection, loading data into memory etc
many things you can do for it
not using static
generally, not doing dumb things
What's the best way to check if a server is running Spigot/Bukkit so I don't call Spigot only methods?
no server is running bukkit lmao
@frigid ember VPS aren't really meant for game-servers hosting, and you will probably get poor performance
31% of my users run Bukkit? Lol https://bstats.org/plugin/bukkit/ChestsPlusPlus/7166
๐ that's sad to be honest
Bukkit is supposed to be completely vanilla compared to Spigot that's why right?
Spigot just has performance enhancements on top
you could try and use reflection if you need Spigot method on server running Bukkit
wouldnt say on top
Well Spigot just extends the Bukkit api...?
And so I guess just look if the class org.bukkit.Server.Spigot exists
Starting to feel a little crazy. I cannot connect to my local server on same comp. I have a networking background and host servers for many other apps
just doesnt show in MC for LAN or WAN devices
what should I make for my first minigame
w/e you feel excited bout
But idk what to make
i mean dont go spamming every channel if thats the case..
ur gonna make it not us
replicate hypixels shit
lol
I need a plugin made for me but I can't post in the recruitments thread on spigot. What requirements do I need?
what is the right way to download plugins from command line?
wget https://www.spigotmc.org/resources/grappling-hook.70854/download?version=311454
--2020-05-03 19:23:27-- https://www.spigotmc.org/resources/grappling-hook.70854/download?version=311454
Resolving www.spigotmc.org (www.spigotmc.org)... 104.27.196.95, 104.27.195.95, 2606:4700:21::681b:c45f, ...
Connecting to www.spigotmc.org (www.spigotmc.org)|104.27.196.95|:443... connected.
HTTP request sent, awaiting response... 503 Service Temporarily Unavailable
2020-05-03 19:23:27 ERROR 503: Service Temporarily Unavailable.
@proven canyon sure
@frigid ember I recommend https://pebblehost.com/vps but you could go for OVH or Digital Ocean or Vultr really but they're typically annoying and require verification
I would recommend using something like cloudflare
it's pretty easy to setup and provides some extra ddos protection
cloudflare is free
I made creeper farm in this video https://www.youtube.com/watch?v=y9eTHnR2SE4 Although in singleplayer I get 8 stacks of gunpowder in 30 minutes , in Server I get 1 stack in 1 hours Can you help me ??
Does anyone know if there is any kind of benefit to using Maven or Gradle if you're making a private plugin? I've tried in the past to use them and for some reason could never wrap my head around how they work more efficiently than just building artifacts and adding dependencies via modules. Maybe if I use a lot of dependencies they're better? But at what threshold do they become better?
maven allows you to shade in jars so they're not necessarily needed to be present on the server
can also do other actions when you build, and build in different ways
most languages have some sort of package manager like pip or anaconda in python or nuget in c#
I mean I can build external jars into my plugin without maven anyways
kind of just makes it easier to manage and add dependencies
and is a life saver for open source, else people would have to put their jars in the exact same location
and have the exact same setup for it to work
Sure but for a private plugin that's not necessarily an issue
What other actions does it provide when you build that are helpful?
You can setup different profiles to build for debugging or for release for instance
can install it to your maven repo to have it there to depend on in other plugins
your argument is similar to me saying i can code in notepad
notepad works so why use an ide
does anyone here use PluginAnnotations? how does the output work? like, i dont see it generating a plugin.yml. Is it only in the result jar?
not sure, but when you build a jar open it with 7z or winrar and see if a plugin.yml is there
i presume it does add one
ah yes, the result plugin.yml is actaully in the final jar
try {
Yaml yaml = new Yaml();
FileObject file = this.processingEnv.getFiler().createResource( StandardLocation.CLASS_OUTPUT, "", "plugin.yml" );
try ( Writer w = file.openWriter() ) {
w.append( "# Auto-generated plugin.yml, generated at " )
.append( LocalDateTime.now().format( dFormat ) )
.append( " by " )
.append( this.getClass().getName() )
.append( "\n\n" );
// have to format the yaml explicitly because otherwise it dumps child nodes as maps within braces.
String raw = yaml.dumpAs( yml, Tag.MAP, DumperOptions.FlowStyle.BLOCK );
w.write( raw );
w.flush();
w.close();
}
// try with resources will close the Writer since it implements Closeable
} catch ( IOException e ) {
throw new RuntimeException( e );
}
return true;
kind of annoying, but sure, whatever
generates the yaml yeah
It's built at compile time
Those annotations have only a source retention, not runtime
yeah but i mean, it would be nice if the output was also put in the src resources folder
pretty sure they got changed to runtime
i've never looked at it properly though so don't quote me
im using it for the first time now, seems to be working fine
There's no code to use those annotations to generate them in your environment
It's not possible unless your IDE can miraculously understand how to do it
ah okay
when i was looking they were runtime
i'll check again
yup runtime .. lol
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Plugin {
/**
* The name of this plugin
*/
String name();
/**
* This version of this plugin
*/
String version();
String DEFAULT_VERSION = "v0.0";
}
that's the main one I believe?
What the hell are they runtime for?
no idea
all the commit messages are just
changed source to runtime (โฏยฐโกยฐ๏ผโฏ๏ธต โปโโป
Ah, uses an annotation processor
I have a plugin installed on my server but I want to overwrite one of the commands.
The command is /f top, so the command is /f (which I don't want to change) and I want to change what happens when someone uses "top" as the argument. How would I do this?
WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
where can I find this useSSL setting?
@inland depot listen to command pre process, check if it is "/f top" and then run what you would like
would I be able to cancel what would usually happen when I run that command?
yep
@deep cloak its part of the mysql config file for the mysql db server. Depending on your system it varies a bit on where it is located. on ubuntu it is in /etc/mysql
usually
unless you installed it manually in which case, it will be where ever you installed it at
google very much can
I am fairly certain cloudflare has documentation on that
someone linked a shockbyte post that also had some good information
would need webhosting for that
Then just point it to the appropriate server
if you have a dedicated server you can have both your website and mc server on the same box
But it appears the majority who come here do not have a dedicated box lol
crashing your MC server has nothing to do with the OS
or other applications running on that box
or at least it shouldn't anyways
yes
have no idea
anyways what you are going to do is set your domain to point to your webhost
then you are going to create a srv record that points to your mc server
once you have that, you should have a domain that points to both your website for the browser and mc server for the mc client
now the srv record is only necessary because you have both in two different locations/separate systems
Google will help you with that, plenty of documentation out there for creating srv records
the only difficult thing you will probably do DNS wise
i got Ultrapermission on my server but only me owner of the server can use /help, others can only use /minecraft:help
i want them to be able to use /help directly
?
then give the group the permission to use /help o.O
Guys I need help
Collection<Chunk> chunks = kingdomManager.getChunksAroundChunk(new int[] { -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 },
p.getLocation().getChunk());
StringBuilder br = new StringBuilder();
int index = 0;
for (Chunk c : chunks) {
index++;
if (index == 12) {
index = 0;
br.append("\n");
}
if (c == p.getLocation().getChunk()) {
br.append("+");
continue;
}
if (kingdomManager.getKingdom(c) != null) {
br.append("/");
continue;
} else {
br.append("-");
}
}
msg(p, br.toString());
I'm getting unexpected behavior
it says that i'm already verified
Phaze what is that even
@sturdy oar I'm trying to make a faction map
I think its because I used an unordered collection i have to see if i can change something
I am not entirely sure what that code is supposed to accomplish @frigid ember
what about me ...
can try uploading a picture or posting links, but generally those verified have blue names
not white names
you verify with the bot
that's already what i did
@keen compass I'm trying to get all the nearby chunks and display it as a text map to players
https://imgur.com/a/Z9IVL2p this is what its doing now
The image i uploaded is what its supposed to look like
Well, you wouldn't exactly need those methods to do that then
pretty sure all of cosmics source is leaked anyway, so if you are reaaaally stuck i guess you could check the actual stuff haha :p
Wouldn't really encourage that
lol
lmao
Sorry to interrupt, but I'm looking for an anti-cheat/anti-hack plugin for Paper 1.15.2. Any recommendations? ๐
Anyone know what's causing this crash?
sweats profusely
It isn't necessary to do any loops for what you are doing fyi @frigid ember you already know how many dashes you need. Just simple math really, nothing too complex
any ideas on how I could more easily "chain" conversation api prompts?
I thought about creating a ChainablePrompt interface with a chain(ChainablePrompt prompt) method that sets the next prompt and implementing that for the prompt types I need
and then have some sort of PromptChainBuilder kind of thing
@keen compass I'm still stuck, how would I do it?
j
Well, chunks are 16x16 blocks. If you want to display a cube, that is 9 chunks, or (16x3)x(16x3) which is equivalent to 48x48. I assume the dashes represents the chunk right?
Yeah
so, instead of looping, you already know the number of dashes you need based on the math ๐
then the next thing is just to grab the chunks that are relative to the players position
easy to do with player move event.
Then you just display your messages when the player moves to another chunk or another block or however you want to do it.
probably would recommend every time they move to a new chunk
It's a command so the player types /f map and it shows a map
I don't understand how to do it without looping
because player move event fires every time they move, which is what your map is going to be based on.
It only updates when the type the command
you don't need to send a message unless they move, you can already get the surrounding chunks based on their location
Then there you go, you just only do something when the command is ran
you can get the chunks around the player based on location of the player without a loop
simple math to add your dashes in, based on how many chunks you want to display
as I said a single chunk is 16 blocks wide and 16 blocks in length
you can get the chunks around the player based on location of the player without a loop
That's the part I'm stuck on
get the location of where the player is at, add at least 16 to the location of x and z and minus 16 from x and z etc etc
you can use a loop, but your plugin would be better without it though
or get the chunk coords and use the chunk coords instead
which might be better to do to get the other chunks
because then you could just do +1 and -1
would it not be better to do that in a single for loop then
for (int i = -5; i < 5; i++) {
// add to map
}
you could, but it would take longer for the loop to complete then it would be to just tell it to modify the coords that are already present to get the chunks
difference is, you have the machine count for you, vs you already know how much to count by
^
would you not have to individually spell it out 10 times then
wouldn't be 10 times
it would just be 4 times
up down left and right
already have the center
if they want to represent the corners, but I see there is compass
which shows north east south and west
just seems like a lot of inconvenience for little speed benefit
since it wouldn't be a particularly intensive loop
it wouldn't be intensive for a small server, but once you get enough players doing it though it will be ๐
Anyways, I am just going based on the compass representation
It would be 121 times for a 11x11 square but i need it to be wider than that
121 times ? o.O
lol..
not entirely sure how you get that
i mean, not that i looked at how a big server does it
but pretty sure they did only 200 blocks
with a lot of iteration, string parsing and a bunch of other gibberish
Where did you get that from?
must've dreamt it
๐ฆ
Because you don't need to iterate over every block for every dash
You need to iterate over every chunk
you already know a chunk is 16 blocks wide
Yes
so if the map only ever updates only when they use the command, then you don't need to iterate over every block, you just need to know where they are at in relation to the chunk.
minus their location from the center of the chunk they are in, and you already know how many dashes for the other chunk you need
no looping required for that, most of your methods is going to be math, not loops.
/**
*
* @param offset - int array to check
* @param c - Chunk player is standing on
* @return
*/
public List<Chunk> getChunksAroundChunk(int[] offset, Chunk c) {
World world = c.getWorld();
int baseX = c.getX();
int baseZ = c.getZ();
List<Chunk> chunksAroundPlayer = new ArrayList<>();
for (int x : offset) {
for (int z : offset) {
Chunk chunk = world.getChunkAt(baseX + x, baseZ + z);
chunksAroundPlayer.add(chunk);
}
}
return chunksAroundPlayer;
}
Yep I got that
unrelated but int array to check seems a bit ambiguous xD
Is sponge = Spigot?
no
where diffrence?
pretty sure sponge is for modded servers...
and a completely different api
so most spigot plugins will work on sponge
and most sponge plugins will work on spigot
Some plugins have universal implementations which do work
world edit
I mean spigot using plugin.yml
I think sponge uses a different one
they probably do like people do for nms
no idea, I just opened one and it had an mcmod.info thing xD
but I guess it'd still work
but you'd have to abstract stuff xD
jesusss
ok, I have to go get me some sustenance and then I will make a gist for you @frigid ember
can you look at this https://www.spigotmc.org/threads/mobs-not-spawnฤฐng-ฤฐn-my-server.435892/
need to modify the spawn limits it would appear
singleplayer is slightly different then hosted mc server as well as vanilla is different then spigot in some things lol
so can't exactly expect what you do in singleplayer to play out perfectly in hosted mc server that isn't vanilla
Anyways, if you have spigot, just look in spigot.yml
plenty of settings in there, in regards to spawn limits
make a backup of your spigot.yml file first @ashen glacier before editing it
so that if something messes up or something does seem right, you have something to go back to
I'll thanks
ItemStack creeper = new ItemStack(Material.getMaterial(383/50));
I created the stack item, which in this case is a creeper egg, but when it comes time to spawn the player, he spawns 2 bedrock, does anyone know what problem?
why are you gettmaterial 383/50 and not just doing Material.EXAMPLEBLOCK
Spigot = Dispenser with a water bucket inside
ItemStack creeper = new ItemStack(Material.CREEPER_SPAWN_EGG);
^
idk what you were trying to do but what forsthalf said is what you should be doing
you can use item id's in 1.8
seriously i just prefer material.EXAMPLEBLOCK much easier
believe it was 1.12 when they finally got rid of item id's completely
For the better imo
Guys canโt you just extends Material then you can use
DIAMOND_ORE instead of Material.DIAMOND_ORE cuz I forgot
I'm not quite sure i just do Material.DIAMOND_ORE i can do it at a decent speed doesn't bother me to type it all out
Material is an Enum so no
what you can do however is maintain your own enum and just add all from the Material
If they extended Material? could mean something else
you can static import the enum
don't know why you would want to extend Material not that long of a word
you can implement methods in enums
well specifically for DIAMOND_ORE instead of Material.DIAMOND_ORE cuz I forgot you just static import the enum
it is nice to do if you heavily use the enum
Ahhh yeah itโs static import ty guys, I just completely forgot
well using the static import for an enum is generally recommended because enums are static anyways
People are so helpful omg
@hallow surge I use version 1.8.8, Creeper_Egg does not exist, I have to use the item id.
I hate that ^^^^
their string name equivalent does exist in the API
not latest feels bad
Because I wish they had material creeper egg
Guys
What
I am trying to create a command and it's really giving an error that's not existing
Ok send
public String killCmd = "stuck";
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {```
you need to register your command as well as make sure your command is in the plugin.yml
You don't need to extend CommandExecute
Lol
because I have a command below it
๐ you dont need to do that
CommandExecute isnt a thing
Whatโs CommandExecute :3 :
^ gp
Ok I was following a tutorial and following him
however, removing it fixed the error lol
โ 3 โ
Lmao trash tutorial
I think the person ment CommandExecutor
Send the tutorial
instead of CommandExecute
Shows you how to register the command & put it in the plugin.yml
@spring sapphire send the tutorial I wanna see how bad it is
bet its some 13 year old
CommandExecutor executes a command, normally when implementing commands you don't need to Extend it or implement it. Usually plugins that want to run commands from other plugins would want to use that API class
I am 16
Im talking bout the guy who made the tutorial smh
I know
I am old ๐ฆ
Gin is like licking a pinecone.
he should really be doing in a Main Class
getCommand("Examples").setExecutor(new CommandExample());
//this code fetches the command Examples from the plugin yml and sets the executor to CommandExample class
What?
or, could just mean a card game @golden vault
oh lol
What
I am not certain which is implied however
@keen compass what u mean
Hopefully the card game if they are actually 16
gross
Gin is also a card game @paper compass not just a type of drink
But I like gin
I can't say much as for others drinking habits, I mean I started pretty early myself
Not that I recommend it, because I don't lol
For dependency injection, do i need to use guice?
no
In the Uk you can drink in public if your parents accompanies you and allows you to
being a hypocrite does not make you wrong
True, it doesn't make me wrong, but I try to not make it a habit of being one either lmao
fair
Gin is the best
for throwing in the trash
Uh no, but you can think so at least it isn't that bad of a drink
as far as the others go in terms of health etc etc
anyone good with coding that could answer a question about hostile turning into passive spawners, message me D:
?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.
Guys I forgot how to spell throat in my last sentence
well, if 70% does that for you might as well quit with the drinking. It only goes higher from there ๐
Okay, is there a mod or plugin to have spawner mobs not attack when you have them in a survival mode game? Same with passive mobs spawners. Instead of having them walk all over the map.
If that makes any sense.
I am sure many plugins exist for spawners
and spawner customizations
you should really stop drinking though and wait till you are about 21 or older @paper compass all you do is hurt your growth by doing so.
On my server,when I try to enchant something to above efficency 10, or put it in a kit, the pickaxe reverts to effiiency 10 even though it was supposed to be efficiency 20 or something... no error or message in console but when a player mines with the pickaxe, the enchants all revert to 10.
does anyone know the best spawner customization plugin? ๐ฎ
Legal age of majority in the US.
because you pretty much stop growing around 25, but really wouldn't hurt that much if you started doing so at a bit younger age
Iโve been drinking gin but Iโm still getting tall
You kill off brain cells by drinking, stunts your growth, you incur more problems later in life that don't manifest right away.
2 months ago I was 5 foot 5 inches and now Iโm 5 foot 8 inches
your height does not determine your mental and physical health
^
^
Lmao
Drinking alcohol at 16
14 actually
Why though?
But Iโm not 16
What does it do for you?
peer pressure @lilac wasp is generally the common thing
go lick a pinecone, it tastes the same
Not peer pressure, I just tried it and loved it
i feel like this is the wrong kind of help section
lmao
I would agree with @golden vault on that statement
https://www.youtube.com/watch?v=SaEqn0wpL40&list=PLdnyVeMcpY79UFZFfqwaXF2GUGc0v3YyG&index=11 Frost they were using this video just clearly can't follow tutorialos
You realise there are different flavours @golden vault
@hallow surge Ok, but I wasn't the one that was curious about the tutorial
additives not the base taste, which is pinecone
The base for gin used to be juniper berries
Palma violet gin
so I guess pinecone is better then those
not sure if you ever tasted a juniper berry
highly do not recommend it
Palma violet gin is the best
Anyways, alcohol just does a lot of bad things for you at a very young age that won't affect you right now
but later in life when you become an adult those problems will start to manifest
like early onset memory problems
where you find it more difficult to remember things then the typical person lol
Wtf even is #help-archived lol
sure its all fun and good when young to drink, but pretty much almost guaranteed you will incur some kind of problem by the time you are in your early twenties unless you are one of the lucky few that manages to not have any problems at all by then
I only drink like a glass every 4 months
hmmm, they way you make it sound, it would be as if you drank it almost everyday or at least once a week XD
I have bad memory problems
You're tripping out Frostalf lol
Even before gin days
Chill
@lusty vortex to be fair, I generally don't encounter people recommending alcoholic drinks that only drink once every 4 months
generally those that recommend alcoholic drinks to me, do a fair bit of drinking lol
Alcohol is only really bad if it becomes a habit
I hardly drink
And I doubt this dude drinks until he passes out
Well
it is literally a poison hence the effects
A damn good poison then
Once it was my sisters 18th birthday and everyone let me have a drink of their alcohol once they were done, there was about 20 drinks there LmFAO
pretty mild as poisons go
wine is pretty much one of the only types of alcoholic drinks that is good for you once in a while and it isn't because of the alcohol but rather where it comes from.
but can taste good, as long as it is not gin
tastes disgusting
Vinegar?
Yeah my parents hate the taste
i hate it too
Once in my art class we were drawing win glasses and a plant next to it
But there was some wine left in the bottle
So my friend drank a bit
Idk why
That was like 2-3 years ago
Guys, how do I make zombie look like a player?
protocolManager.addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Server.SPAWN_ENTITY_LIVING) {
@Override
public void onPacketSending(PacketEvent event) {
if (event.getPacketType() == PacketType.Play.Server.SPAWN_ENTITY_LIVING)
event.getPacket().getIntegers().write(1, (int) EntityType.ARMOR_STAND.getTypeId());
}
});
What do you mean look like a player
Look at my dog
Now look at all that ram
80gb ram there
@dusty topaz
if only your system could make use of it all
Server*
Which it does
HP DL380 G6
80Gb is a lot of ram
Jesus
I think there is 16x 4gb sticks and 2x 8gb sticks
I just bought a new raid card for my server
80GB isn't quite that much
For me thatโs a lot
Hey can somme1 help me out i put my back up World on my server after somm1 destroid my world but pieces of the World are gone like spawn
how do i set up MV so that if you change worlds it remembers were you were at so if you do the mv tp world command it takes you back to were you were at
Hey guys, this works if I set it to different mobs but disguising as a player doesn't work
protocolManager.addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Server.SPAWN_ENTITY_LIVING) {
@Override
public void onPacketSending(PacketEvent event) {
if (event.getPacketType() == PacketType.Play.Server.SPAWN_ENTITY_LIVING)
event.getPacket().getIntegers().write(1, (int) EntityType.PLAYER.getTypeId());
}
});
hey guys, is here someone who can help me rn, please?
?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.
oh, sorry
I want an Armorstand to always center itself in the block from any direction.
It only works in one direction, but I want it to be no matter which direction.
probably going to have to mess with packets for that or rotate the armor stand based on view
@keen compass do you know how to make mobs look like players? https://www.spigotmc.org/threads/disguise-a-mob-as-a-player.435994/
you are going to need to mess with packets for that
so, the packet you would need is the spawn player packet
@lusty vortex it keeps crashing the server when I join
protocolManager.addPacketListener(
new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Server.SPAWN_ENTITY_LIVING) {
@Override
public void onPacketSending(PacketEvent event) {
if (event.getPacketType() == PacketType.Play.Server.SPAWN_ENTITY_LIVING) {
Player p = event.getPlayer();
Location location = p.getLocation();
MinecraftServer nmsServer = ((CraftServer) Bukkit.getServer()).getServer();
WorldServer nmsWorld = ((CraftWorld) p.getWorld()).getHandle();
GameProfile profile = new GameProfile(UUID.randomUUID(), "name");
PlayerInteractManager interactManager = new PlayerInteractManager(nmsWorld);
EntityPlayer entityPlayer = new EntityPlayer(nmsServer, nmsWorld, profile, interactManager);
nmsWorld.addEntity(entityPlayer);
nmsServer.getPlayerList().players.add(entityPlayer);
((CraftPlayer) p).getHandle().playerConnection.sendPacket(
new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.ADD_PLAYER, entityPlayer));
((CraftPlayer) p).getHandle().playerConnection
.sendPacket(new PacketPlayOutNamedEntitySpawn(entityPlayer));
event.getPacket().getIntegers().write(1, entityPlayer.getId());
}
}
});
because that packet doesn't accept player entities
therefore, you can't stuff gameprofile into that packet
NAMEDEntity
You need to use Spawn Player packet
This one?
((CraftPlayer) p).getHandle().playerConnection
.sendPacket(new PacketPlayOutNamedEntitySpawn(entityPlayer));
Hello, i have a bungeecord server running at an external household and the hub for the server is located at my house. The issue is that when my internet goes down then comes back on, the bungeecord refuses to connect to it at all, the only way to get it to work again is to restart bungeecord. What can i do to fix this?
Idk if that's a good idea to begin with either. It's one thing to change the entity type by changing the id
But you're trying to spawn an NPC to completely replace the already existing entity lol
I only want to make zombies look like players
Yeah but you can't just do that
You need to spawn the entity on it's own
Not intercept a packet being sent to the client
Because they're two COMPLETELY different entity types
@frigid ember why don't you give citizens api a try
you don't need to reinvent the wheel
I'm not sure what effect that'd have on the tracker system either? If the client never gets the creation packet, the tracker will still keep sending them the movement update packets and such
@pastel basin I can make custom pathfinder goals with citizens?
Best to just create the entity from scratch rather then trying to mask another entities's type
Yeah they've got a cool API
That'd save you a lot of time and effort at least ๐
yeah, isn't quite easy to fool both the server and the client at the same time
have to fool the server into thinking it really isn't a player and that it is some other entity so it can have pathfinder goals etc, and then you have to fool the client into thinking it is a player and not some other entity
lots of packet interception and manipulation XD
And either way, the AI would of looked weird as hell if you managed to replace a zombie's skin with a player's
Alright
Spigot for java 14!
/minecraft:give @a?
stone_shovel, yes
Ill try that when i get on later thanks
can someone help me pls with this: https://www.spigotmc.org/threads/centering-armorstand-in-block-from-every-player-direction.436001/
How do I load certain chunks for crop growth, mob spawning etc
without a real player being there
cant figure out whats causing so much lag on my server https://timings.spigotmc.org/?url=tenoteteyu
i just upgraded from 1.12.2 to 1.15.2 and its just so bad
@pastel basin is citizens free for 1.15?
yes, they drop builds on jenkins
How can I generate tallgrass? I have tried setting the bottom half, and that just places the bottom, so I tried setting the bottom and the block above it, but it immediately breaks.
does anyone know how minecraft calculates status increases based on enchantment levels. So given value x being the enchantment level, what equation would give you the status increase?
What status? I'm not sure I understand. Enchantments are just integer levels
So for example protection or sharpness
if x is equal to the enchant level.
how does minecraft calculate the increase in damage, defence, etc..
That depends entirely on the enchantment. For protection it's (4*level)%
i.e. Prot II would be 8%
Sharpness is 0.5 * (level + 1)
i.e. Sharpness 4 is +2.5
that makes sense
Is their like a list for different enchantts
like on the minecraft wiki or something
Don't think the wiki gives a list on a single page, but each enchantment has their own page explaining how the enchantment works and gives the formula
ah
how can stop a player from using /wild in my spawn world in MV
depends if you own the plugin what plugin if its your own /wild plugin insert a check for a specific world
if not decompile and insert your checks in the current code not sure of an easier way to do it probably amuch easier way I wouldn't know of atm @mellow matrix
What event is called for a player head being broken by an explosion like TNT or creeper?
Im trying to remove the block from the blockList from BlockExplodeEvent and that isnt working
Cancelling the event if the block matches in BlockDamageEvent does not work
Cancelling the event if the block matches in BlockDropItemEvent does not work
I truly cannot figure out why my code is not working
Enjoy this source code, please ping me with any ideas.
The Event listener is guaranteed to be working: https://sourceb.in/29435238f9
Maybe BlockBreakEvent ?
I cancel for BlockBreakEvent as well; even though it is a player event
No dice
The piston detection works fine, interact works fine
yea as i thought just checked a thread on a simliar
issue
block break event should work fine
I will record a gif of what happens
private fun onBlockBreak(event: BlockBreakEvent) {
val block = event.block
extractGraveData(block) ?: return
//Disallow breaking of graves
event.isCancelled = true
}
However EntityExplodeEvent is an idea
EntityExplodeEvent it is
Someone should figure out the difference between BlockExplodeEvent and EntityExplodeEvent and make it clear in the docs
its pretty self explanatory in the names imo
one is for entities
one if for blocks
How does a block explode?
TNT is an entity
So what block just natively causes explosions
I'm guessing BlockExplodeEvent is targeting the blocks that are in an explosion
That doesnt make sense; because I am using the same exact code for EntityExplodeEvent and BlockExplodeEvent, and the block is only safe when EntityExplodeEvent is present
the java doc puts pretty clearly what it does
I cant read java very well but it explains pretty well what hte different funcntions do
private fun onBlockExplode(event: BlockExplodeEvent) {
event.blockList().removeIf{
extractGraveData(it) != null
}
}
private fun onEntityExplode(event: EntityExplodeEvent) {
event.blockList().removeIf{
extractGraveData(it) != null
}
}
This is Kotlin
How does a block explode friend
That is what I am asking you
smh xD clearly oyu dont understand what I'm getting at
primed TNT is an entity; thats why it is caught by EntityExplodeEvent
public class BlockExplodeEvent extends BlockEvent implements CancellableCalled when a block explodes
exactly called when a block explodes
I've already tried explaining this too you clearly you don't understand look it up if you have questions
link i posted before was a narrower use
reposted
I understand what BlockExplodeEvent does
Rather what it is supposed to do
The block to blow up should be the TNT block right? That would be the block from getBlock
clearly not
How does a block explode?
And then the affected blocks are in getBlockList
No, TNT would be an EntityExplodeEvent, I'm pretty sure.
Then what CAUSES a BlockExplodeEvent
Beds in the Nether.
Perfect example
And that explains why EntityExplodeEvent works and BlockExplodeEvent does not
Is a bed the only kind of block that can explode without an entity?
yea too my knowledge
AFAIK.
Yeah so why could you not have told me "Bed" when I asked what block is an explosion generator
Heads break in the water.
Will cancelling a BlockPhysicsEvent cancel this? or is it a waste of time?
BlockExplodeEvent does not extend BlockPhysicsEvent.
I understand that
I mean if water flows into the head
It will break
Like torches do
yea you can
just call for an event that has head break on touch with water
prolly a simpler optino
The head breaking in water is normal functionality
I am looking for the event to cancel that
But I have an alternative idea anyway so nvm; thanks for your help with the explosions
@neon matrix BlockFromToEvent.
Check if the to location is a head.
Works with lava and water.
I've opted to place the head in the closest available air block above the death location
how can I hide a command run from a command block?
please tag me if you have the answer cuz I am leaving temporary from discord
@proud lynx if you want to hide all of them you can use the in game command gamerule commandBlockOutput false
is there an event that gets called when weather is changed automatically by the server? according to my client WeatherChangeEvent isn't called unless you use /weather or /toggledownfall? ๐ค
As far as I'm aware, it should be called, although ThunderChangeEvent is another event entirely
Yes, you should listen for both.
Is it possible to check how much blocks a player has placed or mined using placeholders?
Fuck knows, ask the place holders guys?
yes, there are extensions for that
@pastel basin What extension?
search for it
I did and I didn't find it so I came here
Hi, how to detect player's language settings in client minecraft? I know about Player#getLocale(), but it returns always en_us regardless minecraft language settings... :/
@cold wharf literally the first result when I searched
How would I go about properly generating both halves of tall grass?
@pastel basin someone told me that it is for certain block
when setting both blocks to TALL_GRASS I get this:
So I didn't use that
pretty sure that counts for every block, but if you want for specific blocks you can do that too
Oh okay tysm
@knotty karma you might wanna take a look at https://www.spigotmc.org/threads/growing-tall-grass-1-12-vs-1-13.357163/
thank you! i've been looking for almost an hour and havent found anything lol
I have 2 plugins with the same commands, and one plugin is taking priority, but i want that the other plugins executes the command
I cant figure out how to do this
Oke thx,
But i still dont know how to block it
Just with a CommandBlocker plugin?
do you want to block players from using /plugin:command ?
I have 2 plugins with the command "/pay"
Plugin A is handeling that command, but i dont want that
I want that plugin B handels it
Yes but that is the problem, it blocks the whole command then
Not only for one plugin
create the command /pay on the command blocker and set it to execute /plugin:pay
create the command /pay on the command blocker and set it to execute /plugin:pay
@pastel basin i dont know a commandblocker plugin that can do that
I only can find commandblockers that blocks only one command
commands:
- chance: 50
command: eco give %player_name% 100
- chance: 50
command: give %player_name% DIAMOND 6
- chance: 50
command: give %player_name% IRON_INGOT 12```
if i wereto parse this, what would the data structure be?
config.getList("commands");
what will be the type of the lsit?
Hello ! Someone know how to set a pathfindersgoals on an EntityPlayer (npc) ?
use citizens
without use citizens
well, good luck reinventing the weel, you have a long path of research and packets ahead
Hi, how to detect player's language settings in client minecraft? I know about Player#getLocale(), but it returns always en_us regardless minecraft language settings... :/
@sacred wave In case someone has this issue, the problem probably is, you are calling it on Player Join... That is too soon, when invoked later, it works ๐
i'm trying to put a Custom Player Head Texture on an Armor Stand and am aware GameProfile is no longer an option. How would I go about getting this Player Head
{SkullOwner:{Id:"33a84c61-263c-4689-a62c-3b8044e1ff4d",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDVjNmRjMmJiZjUxYzM2Y2ZjNzcxNDU4NWE2YTU2ODNlZjJiMTRkNDdkOGZmNzE0NjU0YTg5M2Y1ZGE2MjIifX19"}]}}} 1```
Current Code:
```java
ItemStack chestHead = new ItemStack(Material.PLAYER_HEAD, 1);
SkullMeta chMeta = (SkullMeta) chestHead.getItemMeta();```
if (!texture.isEmpty() && !signature.isEmpty()) {
GameProfile profile = new GameProfile(UUID.randomUUID(), null);
PropertyMap propertyMap = profile.getProperties();
if (propertyMap == null)
throw new IllegalStateException("Profile doesn't contains property map");
propertyMap.put("textures", new Property("textures", new String(texture)));
ItemStack head = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);
ItemMeta headMeta = head.getItemMeta();
try {
Field profileField = headMeta.getClass().getDeclaredField("profile");
profileField.setAccessible(true);
profileField.set(headMeta, profile);
} catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) {
e.printStackTrace();
}
head.setItemMeta(headMeta);
this.current = head;
} else {
this.current = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);
}
return this;
}```
part of my old code. You can edit as your needs.
oh the issue was that GameProfile isnt a thing anymore
Do you use minecraft-head for getting texture?
yeh
GameProfile profile = new GameProfile(UUID.randomUUID(), null);
byte[] encodedData = Base64.getEncoder()
.encode(String.format("{textures:{SKIN:{url:\"%s\"}}}", url).getBytes());
profile.getProperties().put("textures", new Property("textures", new String(encodedData)));
Field profileField = null;
try {
profileField = itemMeta.getClass().getDeclaredField("profile");
profileField.setAccessible(true);
profileField.set(itemMeta, profile);
} catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) {
e.printStackTrace();
}```
url is URL of skull
oh the issue was that GameProfile isnt a thing anymore
GameProfile isnt in 1.15
unless i am doing something wrong
Would someone body help me with a ConfigurationSection issue?
https://www.spigotmc.org/threads/getting-the-configurationsection-by-using-the-value.436053/
you iterate over all sections and if it's equal with that number you return it
there is no skip over
Thank you @tiny dagger
no problem
@pastel basin that doesn't work I need to specify the block type
@cold wharf literally the first result when I searched
@pastel basin
[10:00:32 WARN]: java.lang.IllegalArgumentException: The supplied Material does not have a corresponding statistic
[10:00:32 WARN]: at org.apache.commons.lang.Validate.notNull(Validate.java:192)
[10:00:32 WARN]: at org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer.getStatistic(CraftPlayer.java:787)
[10:00:32 WARN]: at
armorstand.setHelmet is deprecated now for armorstands what is the alternative for it
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/ArmorStand.html#setHelmet-org.bukkit.inventory.ItemStack-
You have to use armor#getEquipment first
@cold wharf search for a stats plugin, there are many out there
yeh got that now @boreal tiger thanks tho ๐
๐
Aight ty
I would assume this would set the angle of the armor stands legs but it doesnt seem to:
EulerAngle legsPose = new EulerAngle(0f, 0f, 180f)
armorstand.setLeftLegPose(legsPose)
but it puts the legs at an odd angle "233.34"
(this is after spawning the armor stand on a specific player)
it is radians yeah
i
you have to convert from degrees
radians are cool
hhpazzzzz henlo
is it possible to create multiple worlds that can have their individual nether and end worlds with global and local plugins/mods etc.... but have everyone login into a reception world with portals to the other worlds?
Hello, how do I disable plugins in a certain world?
@fathom coral im not sure if u can do that
i mean if you go into every plugin and only make it react if in that world lmao
I would recommend you look into something like bungeecord to use plugins you want per server
^^
i mean if you go into every plugin and only make it react if in that world lmao
@marble ingot I'll try that
._.
this guy
@marble ingot
@fathom coral You would have to modify the source code of every plugin
okay well then maybe not
@fathom coral What you want to do is use Bungeecord to link multiple server instances
and choose the plugins you want on each server
if bungee isnt an option try using or decompiling this https://dev.bukkit.org/projects/perworldplugins
it did not work
oh
.-.
@fathom coral how are you hosting your server
it is on a dedicated server
ok great
A VPS or a singular?
a lot of providers of individual servers like to call them dedicated for some reason
@fathom coral is it off of your computer or are you using a website
it is on my computer
okay thanks
{TheSourceCode} has some great videos on this here is the first: https://www.youtube.com/watch?v=a8kRub5QpUY
Thank You
Any method to disable tab complete on bungee
?any plugin
in bukkit you can use the event TabCompleteEvent
i don't know how to do it with script, you can do it with java
you're probabily need to listen to the packlet playout tabcomplete i think ๐ค
there is the TabCompleteEvent in bungee, i checked
ty
but with the tabCompleteEvent you can't hide command entirely if you cancel the TabCompleteEvent you can block the parametes of a command but not the list of commands itself
you will need to block the PacketPlayOutCommands packet if you want to hide a command
custom tablist
what do you mean
well i hv zero language knowledge of java
but with the tabCompleteEvent you can't hide command entirely if you cancel the TabCompleteEvent you can block the parametes of a command but not the list of commands itself
@sharp dew
where to edit it
PlayerCommandSendEvent
Idk if its in bungee
But its how you clear the sent command list
Please help with this error you can not enter the server
13:50:29 WARN]: An exception was thrown by a user handler's exceptionCaught() method while handling the following exception:
java.lang.NullPointerException
[13:50:33 INFO]: Given Mining Fatigue (ID 4) * 3 to uselles_3iq for 6 seconds
[13:50:34 INFO]: Given Mining Fatigue (ID 4) * 3 to uselles_3iq for 6 seconds
[13:50:34 WARN]: Failed to initialize a channel. Closing: [id: 0xa5c3b5b2, /10.0.0.1:27702 => /10.1.20.24:15430]
java.lang.NoClassDefFoundError: Could not initialize class com.comphenix.protocol.injector.netty.ChannelInjector
at com.comphenix.protocol.injector.netty.InjectionFactory.findNetworkManager(InjectionFactory.java:205) ~[?:?]
at com.comphenix.protocol.injector.netty.InjectionFactory.fromChannel(InjectionFactory.java:142) ~[?:?]
at com.comphenix.protocol.injector.netty.ProtocolInjector$1.initChannel(ProtocolInjector.java:157) ~[?:?]
at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:69) [server.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:158) [server.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRegistered(AbstractChannelHandlerContext.java:144) [server.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:71) [server.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:158) [server.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRegistered(AbstractChannelHandlerContext.java:144) [server.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:71) [server.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandler
Where can I download the latest version of spigot? will anyone link me?
bukkit building tools?
ys
i have spigot
I use 1.8.8
Where can I download the latest version of spigot? will anyone link me?
@frigid ember
the latest verion is provided on build tools
wdym by 1.8.8
@frigid ember it just looks like you have the wrong version of protocol lib
anyone send the latest version of protocollib??
Any method to disable tab complete on bungee
?any plugin
@chrome heron
I dont hv any java language knowledge
Any plugin could help?
next problem, from time to time crashes half of the players and there is:
[159:41 INFO]: BasedShinso lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: Mr_Tymbark lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: Xerratch lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: OnlyBisYT lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: InsecT lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: phasmatos lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:42 INFO]: Protect_ONLY lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:42 INFO]: UUID of player Mr_Tymbark is 7155c5cf-8fdf-496c-af66-432e50cb3a0a
[159:42 INFO]: UUID of player Xerratch is 6f1ecf72-53f3-4836-b323-238b3f9ce761
[159:42 INFO]: UUID of player BasedShinso is fe3aac66-866a-4a83-87a2-8139ba9b4703
[159:42 INFO]: UUID of player BasedShinso is fe3aac66-866a-4a83-87a2-8139ba9b4703
[159:42 INFO]: UUID of player Mr_Tymbark is 7155c5cf-8fdf-496c-af66-432e50cb3a0a
[159:42 INFO]: UUID of player phasmatos_ is bacdbf5a-3629-48b8-a7d7-59fd71165215
[159:42 INFO]: UUID of player phasmatos_ is bacdbf5a-3629-48b8-a7d7-59fd71165215
I need PermissionsEx for a Plugin and its deleted now anyone Download for 1.8.8 Spigot?
use luck perms
im using break naturally to break a block. is there any way i can spawn the particles
breakNaturally() should do that. If not and if possible, pass the item used to break the block
@subtle blade java BlockBreakEvent blockBreakEvent = new BlockBreakEvent(clickedBlock, event.getPlayer()); Bukkit.getPluginManager().callEvent(blockBreakEvent); if (blockBreakEvent.isCancelled()) {return;} clickedBlock.breakNaturally();
What is a (nms) Vec3DPool ?
Hello,
i am doing a shop but dropped items.
The items are the passengers of the armorstands.
But when i right-click the sign (which i made), it doesn't center in the block.
It only works from only one player direction, but i want that it works from every direction.
next problem, from time to time crashes half of the players and there is:
[159:41 INFO]: BasedShinso lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: Mr_Tymbark lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: Xerratch lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: OnlyBisYT lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: InsecT lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:41 INFO]: phasmatos lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:42 INFO]: Protect_ONLY lost connection: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
[159:42 INFO]: UUID of player Mr_Tymbark is 7155c5cf-8fdf-496c-af66-432e50cb3a0a
[159:42 INFO]: UUID of player Xerratch is 6f1ecf72-53f3-4836-b323-238b3f9ce761
[159:42 INFO]: UUID of player BasedShinso is fe3aac66-866a-4a83-87a2-8139ba9b4703
[159:42 INFO]: UUID of player BasedShinso is fe3aac66-866a-4a83-87a2-8139ba9b4703
[159:42 INFO]: UUID of player MrTymbark is 7155c5cf-8fdf-496c-af66-432e50cb3a0a
[159:42 INFO]: UUID of player phasmatos is bacdbf5a-3629-48b8-a7d7-59fd71165215
[159:42 INFO]: UUID of player phasmatos_ is bacdbf5a-3629-48b8-a7d7-59fd71165215
Any method to disable tab complete on bungee
?any plugin
hey does anyone here know how to make the custom map images align together in order to make one large singular image that is made from other maps?
that would rly be helpful ๐
Does anyone know how to format a number with suffix (K, M, B, T) with one rounded decimal
wouldn't multiverse access mess up end and nether access?
Anyone ever run into issues with Map scales? For whatever reason, it refuses to render higher then 128 pixels no matter what scale it's set to. The scale is set server-sided too
Or am I just misunderstanding the entire concept of maps
I want to use an older map from 1.14.3 on my server 1.15.2. Do i just drop the old files in the /world folder on 1.15.2 server? anything I need to do beforehand?
hi how do i download new build pls
Im dealing with a little issue regarding scoreboards. I run these two lines in onEnable(): ```java
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "scoreboard objectives add health health");
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "scoreboard objectives setdisplay list health");
Don't run commands to execute logic
Ive also tried it using the API, but realized just using commands would be easier, however it aint working ๐
If you're running commands you might as well be using command blocks
How would you recommend I do it then?
When I used the bukkit api I first created the scoreboard, then got an objective from it, set the display to list, and iterated over each player to set that as their scoreboard
That didnt work though
Okay...interesting now. This is what it shows now, criteria is health. How would I get it to show hearts instead?
Scoreboard is created like so: java ScoreboardManager sbManager = Bukkit.getScoreboardManager(); scoreboard = sbManager.getNewScoreboard(); Objective healthObjective = scoreboard.registerNewObjective("health", "health", "health"); healthObjective.setDisplaySlot(DisplaySlot.PLAYER_LIST); then the player gets it set to itself with player.setScoreboard(UhcPlus.scoreboard); in a PlayerJoinEvent
just divide it by 2
each heart has 2 health
so if you divide health by 2 you will get hearts
yeah, but how do I get the actual hearts? like the icons
so with the restart-script approach, it launches a new process which I can't seem to access the console of. I'm using tmux but when I login all I see is the shut down one, but the new process is running. is there any way to properly attach to that new process? not being to access console is a prob
@light geyser you can add a fourth argument RenderType.HEARTS
Yep, that works. Thanks!
Then I ran into another..interesting issue.. ```java
//Put the died player into spectator mode and TP them to 0,0 in the UHC World
player.setGameMode(GameMode.SPECTATOR);
Location tpLocation = new Location(Bukkit.getServer().getWorld("uhcworld"), 0, 100, 0);
player.teleport(tpLocation);
Do I need to teleport before the gamemode change or?
Nope switching it wasnt the fix either
Is there an error?
After I die I should get TP'ed by the code, in a PlayerDeathEvent. I do actually die as far as I know, using /kill
You can't teleport a dead player afaik. You need to see if they're GOING to die, cancel the damage, and teleport them then
Or use PlayerRespawnEvent and teleport them then I suppose.
https://pastebin.com/ryGUMMMG
how to disable the tab complete which part should change?
set a TabCompleter, and return an empty list
how to set
e.g: ```java
getCommand("uhcp").setTabCompleter(new UhcpTabCompleter());
no idea on java ๐ฆ
then in UhcpTabCompleter, in my case (this is a class)
public class UhcpTabCompleter implements TabCompleter {
@Override
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
return new ArrayList<>();
}
}```
The first line I sent goes in your onEnable method
@light geyser, why do you add an empty string to your list?
I dont myself, but Terence could do it like that
Though thinking about it, you dont need to add anything no
Just return new ArrayList<>()
i just add it under the import?
Collections.emptyList() would be cleaner imo
is this a place to ask about the spigot api?
@frigid ember, sure
ok let me just double check it before i ask the question ๐
Server is probably underpowered
Hardware wise
or, you have something hogging system resources
Very well possible yes
@frigid ember if it is on startup, that would be fine, on join less fine
I know my plugin tends to throw those warnings, since it needs to generate a new world
Does it do it everytime?
Very well possible yes
@light geyser
Talking to me?
No, to Festive
@chrome heron, that onTabComplete looks fine, no clue wat that TabComplete event is suppose to do though
That message is literally telling you that the server is lagging lol
ok,ty for your help @earnest bay @light geyser
np ๐
back to my issue with TP'ed after death. doing it like this rn: ```java
@EventHandler
public void onPlayerRespawnEvent(PlayerRespawnEvent event) {
Player player = event.getPlayer();
System.out.println("TEST");
//Put the died player into spectator mode and TP them to 0,0 in the UHC World
Location tpLocation = new Location(Bukkit.getServer().getWorld("uhcworld"), 0, 100, 0);
player.teleport(tpLocation);
player.setGameMode(GameMode.SPECTATOR);
}```
Player still doesnt get TP'ed, and seems to go into half spectator, they cannot pass through blocks or use the spectator ui
๐ค seems I need to delay it one tick