#help-archived
1 messages ยท Page 40 of 1
event.getSource() == Inventory
so maybe, event.getSource().getHolder() instance of GUI
there public void preventShiftgui (InventoryMoveItemEvent event) { if (!(event.getSource().getHolder() instanceof GUI)) return; event.setCancelled(true); }
I'll test it rn
worked?
sure did!
also anyone know why this isn't saving a world? ```public class LeaveListner implements Listener {
@EventHandler
public void PlayerQuit(PlayerQuitEvent event) {
Player player = event.getPlayer();
String uuid = player.getUniqueId().toString();
Bukkit.unloadWorld(Bukkit.getWorld(uuid), true);
}
}```
I don't really see why it wouldn't work.
yeah
lmao
It's a String
Is it possible to block a specific command, but not its alias?
say I have /shop, and I setup /buy as an alias, but dont want people using /shop
commands.yml
Well
I was warned for spamming?!
Is the world loaded?
but won't it block the Alias too @pastel condor
Are you getting a stack trace with it?
An alias is the same thing as using the command?
static boolean unloadWorldโ(@NotNull World world, boolean save)
Hey, does anybody know what kind of path should I use instead?
20:16:32 [SEVERE] java.io.FileNotFoundException: bunnyFarm/id.json (No such file or directory)
My file is inside of resources folder, and yeah the files exist.
Hey guys, I wanna know if the problem between the bedwars plugin as hypixel and the Multiverse-core plugin has been solved?
Why would it matter if he's converting the player's uuid to a string if he's referencing getWorld(String)
- "shop"
shop:
- []``` @wicked sequoia
I'm more-so wondering if the world was never loaded and he's getting a null pointer exception.
that renames the shop command to buy
The fact it's a string of a UUID shouldn't matter.
@wicked sequoia this is the full doc if you want to read https://bukkit.gamepedia.com/Commands.yml
Hmmm. My commands worked before but wont work anymore? Any reasons + what files you need?
idk what to do
thanks
@dusky herald it's the wrong uuid
that matters
unless he has a world saved as the players uuid
Anyone?
Yeah
with that name, in which case it should work
He's using the player's uuid as the name, which I would expect.
but, I dont have that info
I have the world saved as a player uuid
Did you load the world?
yup
ah it should be loaded anyways
actually it loads when the player joins the game
Why wont my commands work?
is it loaded in as the correct string then?
yes
@blissful verge You cannot make multiple methods that handle CommandExecutor
Unless you make your own handler class for that
I am using the .slime world format which might make things complicated
like the slime world manager
what is teh difference between label and command?
Well then, that might be why it isnt working then
Command is your object that contains information about a command and label is the /<basically this>
oh
You should unload the world and save it using the slime world manager the same way you loaded it in then.
so is command.getName() the same as label?
I have experience with .slime what's the problem?
How do I do that then
@fluid bloom basically
oh
That's not good
lol
so there is no difference whatsoever?
this is new info he just gave us
I recommend using command.getName()
return new MultipleLocationPrompt("key1",
"message1",
new MultipleLocationPrompt("key2",
"message2",
new MultipleLocationPrompt("key3",
"message3",
END_OF_CONVERSATION)
)
);
note: MultipleLocationPrompt extends FixedSetPrompt
Is there a better way of chaining prompts in bukkit's conversation api?
what is the advantage of using label versus command.getName() ?
@boreal juniper my worlds aren't saving
command.getName() supports all kind of aliases of the current command
Label is what was used to execute the command
A command may have multiple different labels
the problem is the worlds aren't being written to the disk
choco are you familiar with the conversation api ? if so, could you check my question please ๐
If I have a command, /foo, with alias /bar. I run /bar, the label will be "bar" while the command.getName() will (and always will) be "foo"
if(label.equals("shop")) return false;?
You should compare against its name to avoid unnecessary || conditions for every single alias
Use label for command feedback
oh
@subtle blade Agreed
Label is used when you really want to know what player inserted in /<over here>
Yup
does anyone know an api that can get skins from the mojang api and assign them to a player?
that works in 1.9
or if you want only OP to use the shop command then if(label.equals("shop")) { if(commandSender instanceof Player) { Player p = (Player) commandSender; if(!p.isOp()) return false } }?
@fluid bloom NickAPI
k
You can do a lot with the label tbh. Can even include little easter eggs if you really want lol
Running a specific alias might say something different
im using nametagchanger but the dev hasn't updated in a long time and there is bugs
I recommend NickAPI it's async and has a lot of possibilities
You can even make it so the skin is different than the profile's name
With that being said: for example you can make a player named Herobrine with a Notch skin
@blissful verge Make sure to add your command to plugins.yml
And in your main class add @Override above your onCommand method
Is someone here good with solution design? And with good I mean good
What kind of solutions are you looking for ;P
A very experienced developer who knows how to work with layers in your application
I would need to discuss in private, it goes quite far
I can compute 2 + 3 for you
6
2
Damn it. Beat me to it ๐ฆ
Just saying this is the spigot community
Okay I'll try to explain anyway ๐
23
32
-1
๐
So basically, I seperate my plugins into 3 main layers
๐ด
First layers are the commands, event listeners, etc ...
Second layer is the Service layer
and third layer is the Repository layer
Does the conversation api have someway to setup a finished conversation callback?
Now the thing I'm stuck with
I have a singleton instance where I intialize my services and my repositories
And I use dependency injection from my main class to inject them into my commands, events etc
A dependency?
I also have a package for all my models
So example: Game.class
The game has properties, like ID, etc
but now
my commands.yml keeps being reset, and it never loads. (I think it resets when it tried to load it)
command-block-overrides: []
ignore-vanilla-permissions: false
aliases:
icanhasbukkit:
- version $1-
point:
- "token"
token:
- []
points:
- "token"
token:
- []
Why can't it load the commands.yml? is there an issue with it?
Does it give a error on start
In Theory I can use my singleton to retrieve my services in my model classes
too many spaces @wicked sequoia
wdym?
- "token"
``` example
you could use like Guice or something I guess
too many conversations going on here xd
there's also Dagger (re: mrgeneralq)
@fair abyss I was told that that would work to make the command "token" not work, and have "points" replace it
so
command-block-overrides: []
ignore-vanilla-permissions: false
aliases:
icanhasbukkit:
- version $1-
point:
- "token"
points:
- "token"
token:
- []
right?
oh ok
so
command-block-overrides: []
ignore-vanilla-permissions: false
aliases:
icanhasbukkit:
- version $1-
point:
- "token"
points:
- "token"
token:
- []
ok
you want to remove token
yes
and rename it points and point
yeah
point:
- "token"
points:
- "token"
token:
- []
``` try this
ok
old wiki absolutely has some space problems
is token an array? if so, place the square brackets directly after the colon, not on a new line, because now theres an empty array as first element, unless thats how its suppose to be
its not default YamlConfiguration
commands.yml https://bukkit.gamepedia.com/Commands.yml
that works, so that point is there when you press [tab]
Stupid question: Is the gradle builder for the whole spigot server not working at the moment or am I dumb?
I think token needs to be first though, so that it doesn't override point, and points
@vale slate you mean Buildtools?
@wicked sequoia not sure about you can rename deleted command ๐
yeah...
so the one you wrote made token not exist, but it made "point", and "points" not work either
Is there an arrow land event? I can only see the entityarrowfire event so will I have to get the projectile and use its data?
Theres should something about Collision @pastel sierra
no, in the gradle build file, if I add 'org.spigotmc:spigot:1.15.2-R0.1-SNAPSHOT' as dependency it is not working, build.gradle like
https://www.spigotmc.org/wiki/spigot-gradle/
How do I make the "point" command still work, even though i'm dissabling the token command?
because the point command throws an error
not an error
it just says "unnown command"
@vale slate send more from build.gradle please
So I use getAttachedBlock() function?
ProjectileHitEvent
Called when a projectile hits an object
@Nullable Block getHitBlockโ() Gets the block that was hit, if it was a block that was hit.
Thanks
@wicked sequoia commands.yml is some old, and dont think spigot will help to this.
it was left from bukkit times
oh ok
maybe its deprecated who knows.
and other suggestions?
whats the name of the plugin? @wicked sequoia
point:
- "TokenMaster:token"
points:
- "TokenMaster:token"
token:
- []```
ok
Is there a way to read placeholder values from spigot
Yes PAPI
@stuck pulsar do you want to list all placeholders?
that worked kingOf0! thanks
https://pastebin.com/5AkV8R71 @fair abyss
getValues() returns a Map of keys to values
@subtle blade I just got around to testing it and it seems like the value is a MemorySection
Nah i just want to read 2 placeholders values, and based on that i want to give an action bar
@vale slate pls ?paste hastebin is banned in my country
actually... that doesn't pass through arguments. is that possible? @fair abyss
Im startin at coding haha
Map<String, Object> serializedSection = resourcesSection.getValues(true); This is what I did
banned? lmao
Object is a memorysection
some serious shit must be going on if you ban hastebin ๐
๐
@wicked sequoia im really not commands.yml master, it should but dont know
dig some wiki
https://paste.md-5.net/yetigumaxe.cs @fair abyss
ok
i just want to read 2 placeholders values, and based on that i want to give an action bar, can someone give me an example im not very good hah
well its most likely included in the guide
https://paste.md-5.net/uwudixanej.cs @vale slate try this
papi is pretty popular so it most likely has alot
@stuck pulsar i think your problem is "dont know how to tell what I want to do"
cus i understand really nothing
https://paste.md-5.net/uwudixanej.cs @vale slate try this
@fair abyss one problem with this, I want the whole server not just the api
dealing with NMS
if I know correcy, nms isnt included by maven or gradle repos
you should build it from build tools or include directly
it is, it worked before actually
you should build it from build tools or include directly
that's my current workaround
@fair abyss his question is pretty simple,problem is hes not on that level yet
he wants to take the values another plugin gives to the placeholder..
How can I get the block arrow hit in spigot 1.8?
wasnt this answered already?
ProjectileHitEvent doesn't seem to have a get block
It works in 1.15
but not in 1.8
so, update your server ๐
^
(PvP)
Haste doesn't effect attack as far as I know
there are combat plugins for newer versions
yep checked 1.8 docs no getblock..
i still dont get why people use 1.8 when were bout to even have .16
because of 1.9
will you still run 1.8 when we get minecraft 2? ๐
@fair abyss creates 1.8.8 pit server for playing with friends
you just don't know about it It's in Mojangs secret labs
@fair abyss i have a bootleg
difficult
/summon (Mob) ~ ~1 ~ {NoAI:1,Silent:1,Invulnerable:1} how can i spawn mobs but make them spin around and follow player?
has all dem features,coins,golden apples,buyable equipment/permanent/temporary
all that crap
not move, but spin in accordance to players movement
if you want to butcher it even more๐
i need for spawn
I was came here to ask a thing, then forgot :D
here you go.
@Override
public void run() {
player.getActivePotionEffects().clear();
player.addPotionEffect(new PotionEffect(cooldownEffect, 5 * 20 * 3 + 20 * 60, 1)); //cooldown
event.getTool().setAmount(3);
player.updateInventory();
}
}.runTaskLater(Main.getInstance(), 5 * 20));```
it gives effect, but doesnt change tool's amount.
custom event
@neat orbit not very much, just ask
check if theres a forgotten mistake
@vernal spruce its just player's tool.
@fair abyss how can i make mobs spawn based off this command /summon (Mob) ~ ~1 ~ {NoAI:1,Silent:1,Invulnerable:1} but also make them spin around in accordance to players motion
you spawn the entity,cast it to livingentity
public void onUse(PlayerInteractEvent event) {
ItemStack item = event.getItem(); <--- here
if (item == null || item.getType() == Material.AIR) return;
Player player = event.getPlayer();
BasePlayer basePlayer = KeepApi.getPlayer(player.getUniqueId());
Champion champion = basePlayer.getLastChampion();
if (champion.getItemData().isSimilar(item))
Bukkit.getPluginManager().callEvent(new UseEvent(player, item, champion, basePlayer));
}
is that for me
hmm
how would it look?
NoAI:1 makes it "doesnt spin around player"
change its speed to 0
so it wont move
but spin around
id Im correct NoAI makes it idiot
it forgets move, look etc.
how do i do it?
told you
im sorry guys. i am a nutcrack, i know little at all
yea but how would i form it?
/summon (Mob) ~ ~1 ~ {NoAI:1,Silent:1,Invulnerable,livingentity:0}
would it be like that?
Entity zombie = world.spawnEntity(entitytype,location); LivingEntity livzombie = zombie; livzombie.setAI(false)..
I think he doesnt know java
aww fk
.D
second
hmm i know the solution
ahhh im so confused
suggest learn java
hmm i know the solution
@vernal spruce ๐ ๐
to the king! https://www.youtube.com/watch?v=HBFLnaREliM
to the almighty god thesourcecode
@vernal spruce PlayerInteractEvent
public @Nullable ItemStack getItemโ()
Returns the item in hand represented by this event
Returns:
ItemStack the item used```
says nullable, so it cant be copy of tool
yeah checked the event
@fair abyss test it
how :?
persistent means that it won't despawn
oh ok
on the event do player.sendmessage(getTool().gettype.tostring
or send it to console
re check code
@keen compass it doesnt turn around
i wanted to make it be able to "turn" to where the player is headed
ok
it should work too
ill try
@fair abyss try setting the amount in the event itself
it doesnt spin around
hmm
@keen compass do you know what i should do to make it "spin" or react to player
@neat orbit its very hard to do it with "commands"
how to thn
harsh but true.. what you are trying to do is not that simple..
@neat orbit , what is your question?
@fair abyss hmm how about trying to link the tool to the player inventory?
you would need to use a command block to do that
so you would get the item through his inventory
@peak marten I'd like to spawn a mob with this command /summon ~ ~1 ~ {Invulnerable:1,PersistenceRequired:1, basically, and i'd like it to spin around the players movements
@vernal spruce
isn't ItemStack's stored in array
if I change it from anywhere
it should change everywhere
i cant say for sure..
I managed to do my job by getting the location of the arrow in projectile hit event
like, it would follow the player by rotating @peak marten but not actually move
if not copied you should sure
The method sendMessage(String) in the type CommandSender is not applicable for the arguments (BaseComponent)Java(67108979) why does it still think it's a command sender...? :/ anyone has a clue?
@fair abyss try grabbing it from the inventory,check each item if its similar and test it that way
there isn't any options to do that with a summon command @neat orbit
you would need to make use of command blocks to move your entity
or use a plugin
let me check in local
i will make item cant "changeable slot" dont know how to say
and get item from getIvnentory()getItem(slot)
@fair abyss oof solved it, there was a typing error, therefore it didn't work
thank you for helping
@keen compass ok then, thank u. i'll try my best
i will make item cant "changeable slot" dont know how to say
and get item from getIvnentory()getItem(slot)
then worked
@keen compass sorry to bug, last question; what would u call what i asked help for in a plugin? like, how can i explain this to google lol
this works for me hmm
@EventHandler
public void onPlace(PlayerInteractEvent e) {
e.getItem().setAmount(3);
}
nothing more
apply 5 sec delay
works
@EventHandler
public void onPlace(PlayerInteractEvent e) {
new BukkitRunnable() {
@Override
public void run() {
e.getItem().setAmount(3);
}
}.runTaskLater(this, 5*20);
}
interesting...
version?
.D
jjeez christ i need an ssd
mhmm
public ItemStack getItem()
Returns the item in hand represented by this event
Returns:
ItemStack the item used
no more notnull
kingofo
anyone know why i crash near 1.8 players?
debug https://pastebin.com/7gJR1g5J
the event gets fired with a item in hand right?
cant you force set the players item in hand
to that?
maybe
if it gives you a copy(maybe)
it should be the same
holy shit talking bout old
1.7
do viaversion even offers support to 1.7?
.D
yeah....
impredictable 1.8..
Guys, I have a question
Can I play a mp3 file, like in my case, the gong of the undertaker?
dont think so.
something that converts notes of a song to noteblock equivalent
quite tricky to pull off
You need to add the song to a resource pack and put it on the server @round lichen
how do I code that?
you dont..
well the converter
I think there are programs for it
How do I do it then?
I have mp3 files not nbs
canยดt I just make a command like /taker <Player> and the gong plays to that player`?
Is there any way to see which materials share the same statistic values? We encounter a very annoying issue on calculating the total blocks broken by an user because materials like DIRT, GRASS and SOIL share the same values for some reason. Thank you.
how exactly are you saving those values?
@round lichen mp3 -> MIDI -> nbs
...
The files need to be NBS. So convert the MP3 to a MIDI then convert that to a NBS.
Put that in the plugin folder where it tells you to.
EZ PZ
If you are talking to me @vernal spruce they aren't saved by us, we use Player#getStatistic()
so, but theres no command to play it to a specific player
@modern monolith unless you have your own system to do it,dont think you can change how statistics work
I don't need to change them
I just want to know if there's a list or something of materials that share the same value
version?
1.15.2
@modern monolith The statistics page on 1.15.2 has separate values for each of those.
There's stats on dirt, grass blocks, and coarse dirt
That's not helping
actually he was pretty straight
No, in-game.
The statistics list
There has to be a way to get individual statistics for each of those because I'm looking at individual statistics for each of those
yes, there is because that statistic require an argument
wasnt multiple values removed with modern materials?
like stone no longer has more values
Yes, you should just be able to use Material.COARSE_DIRT, Material.DIRT, etc.
They shouldn't be grouped together.
if I softdepend Multiverse-Core I should be loading my plugin after the world loads right?
or is mv-core doing world loads post-launch?
hang on trying to see if load: startup is messing with the softdepends maybe
probably right
yep that was it
outdated code from years ago
don't even remember what possessed me back then to put this in there
thanks
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
Got a bungeecord server and on the hub i want to put some ncps that show how many pepole are online on eatch server,also i want to make it so if i restart a server the players will go back to the hub server until they can rejoin my prison server affter is done restarting
?
Please forgive the disturbance, but I would like to ask if itโs already possible to compile Spigot API 1.16-R0.1-SNAPSHOT?
^
What's path should I use to get something in the resources folder from getResource?
Because I have this but it seems to return null
folder? not package? reeee
actually "structures" isn't a package.
it just a folder
getResource works perfectly for me. the file seperator you used ("/") maybe wrong
just try to not use a folder.
yep
trying
wait
im fucking stupid
I added to the schematic name .schem
sorry
You said it was only available for testing โ what if I told you that I only intend to use it to test the new JSON color formatting features?
It is a closed testing
JavaPlugin#saveResource seems to corrupt .schematic files
saveResource*
Cause when I use it I get java.util.zip.ZipException: Not in GZIP format when reading the schematic file
What do you guys suggest for testing with multiple accounts?
Do I really need to buy another one?
multimc and offline mode is an option if you don't already have another account
How do I make multiple columns in the tablist? Do I need to use packets, if so then what packets?
I think it's only possible with packets, but I did this in 1.8 the last time
@neat orbit an NPC
I think it's only possible with packets, but I did this in 1.8 the last time
and it's pretty annoying to make
@zenith siren You'll need the PacketPlayOutPlayerInfo* packets
@fleet burrow you need to use getResourceAsStream
to get after saving
not getResource
Do I just need to send a ton of no-name PacketPlayOutPlayerInfo packets?
Uff, I'd need to look at it again, they changed the Tablist at some point
But I guess I'll look at it, because I need that to
The worst problem is getting the skinfile for the head
Some good person made a API for that @zenith siren
https://github.com/ZombieStriker/playerlistutil/blob/master/PlayerList.java
but it's old too by now
how resource intensive is checking if a chunk is loaded?
depends on your method
if(!b.getWorld().isChunkLoaded(b.getX()/16,b.getZ()/16){return};...
when will it get too much?
or is there a nms way of doing this
so i can run it async?
damn
Just be careful, if you use the wrong method, you'll load the chunk accidently
is it intensive?
not really
oh god let me check, what it does in NMS
does anyone know how to set up a fork for spigots like paper spigot or taco spigot so that you can edit the source code directly? Not sure how the whole patch system works
if you don't want it to be too resource intensive, why not just keep track of the chunks that get loaded and unloaded using a map or list @vernal spruce but generally if you use the API it isn't that resource intensive though.
by that i meant can i use it in a 1-1 sec timer?
@vernal spruce why are you checking that each second?
and yeah that was going to be my question XD
the usual... run the timer only if..
there is an event that gets called when chunks load and when they unload just fyi to add to what I said
@naive stratus just use like any altgen
so no timers needed ๐
the chunkload thing is indeed resource intensive
its one of the choices
@arctic cloud Oh yeah, I forgot to respond. I followed the Ebay suggestion and got a cheap one ๐
lmao ight
guess ima keep it at the end,not spawn stuff when the timer reaches
so it gets called once every 5-20mins
the chunkload thing is indeed resource intensive
Oh really, if they just check against a map if you don't want to load the chunk
you'll be fine
its np ima just not bother with it..
as the stuff its alrdy pretty heavy depending on how many of em are placed
the loaded chunks are stored, the only resource intensive thing is, NMS needs to find the chunk from the coords
stole poor guys ideea https://www.spigotmc.org/threads/item-spawners.430391/
and finished it in around 10hrs of coding
damn nbt took like 2 hrs to get how its working
Hi I need help! I need someone to help me making a plugin ๐ฅบ
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
what is your issue @shy birch ?
or ?ask
are you making it yourself and just need help or you want someone to make it for you?
are you making it yourself and just need help or you want someone to make it for you?
@keen compass Basically yes, I need a custom plugin but I donโt know how to make one
that didn't really answer my questions, since I asked two of them XD
was about to say ๐
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
take a look here
the moment your plugin needs 5 minutes to compile
o.O
you must have a large project
or you are trying to do something fancy with your build pipeline
nah it's getting big
just increase the resources maven can use
Everything is money. ๐ฅบ
@shy birch I DM'ed you
all you do is download the jar for the appropriate minecraft server version you are running, and place them in your plugins directory
then start server and hopefully it works
uhm platform? some fancy GUI or normal in FileManager
more precise, you have got a web interface or not
@frigid ember
I feel this is going to be one of those convo's where you are going to have to explain every step in detail @vale slate
If he/she would respond
lets shoot this off with eclipse
waiting for comments
I'm very confused now
Nobody from the opponents online?
what if u just wanna change some commands in a existing plugin
I started off with eclipse personally but recently switched to IntelliJ.
IntelliJ shows you possible NullPointers and better ways to write your code.
like for example i wanna change /jukebox to /audio
Go with eclipse to start, change to IntelliJ later
I use eclipse with SonarLint(TM)
like for example i wanna change /jukebox to /audio
open plugin.yml and add alias
well yes
No just
alias is buggy
@placid minnow I think there are plugins that can make aliases for other commands.
alias is buggy
explanation please?
do u guys by any change know what the /spell plugin is
depends on the version, is the bug with the alias simply doing nothing fixed^^
it could be custom coded, which means you can't
^
their using public plugins so i doubt it
well, what does this plugin do?
Just because some of the plugins they use are public doesn't mean all of them are.
^
it sais the server name is the plugin
but i know how to do that
thats not custom thats a plugin
now I'm confused
It's probably custom.
Hello, is the UUID different when you are opped?
@silver pewter Your UUID never changes.
The UUID is tied to your account, it's the same for every server you play on.
Your premium UUID never changes
That's wired
No, it isn't.
now it sais An internal error occured
because you need to add alias instead of changing
It's logical
because when I set it in the config my prefix changes to none but when I am opped it goes back to the prefix
How would a server know who you are if you changed your name?
commands:
jukebox:
usage: /jukebbox <music/sound> <player> {options}
@silver pewter There's probably a permission that gives access to the prefix. OPs have all permissions so they, therefore, have the prefix permission.
commands:
jukebox:
usage: /jukebox <music/sound> <player> {options}
A little demonstration, what is your mc name @silver pewter
so what do i change
brandonlea
@placid minnow commands: jukebox: usage: /jukebox <music/sound> <player> {options} aliases: [audio]
@radiant pollen good point thanks lol
Does block#getState return a clone
the players can still do /jukenox
jukebox
can i disable /jukebox or not possible
not possible
unless i recode the plugin
Could listen on commandPreprocess and cancel?
You can change strings inside of .class files using tools like InClassTranslator
Meaning you can find jukebox registration inside plugin .class files
please check the plugin's license first
and change it to what you need
^
so they'd know how to use bytecode o.o
name: MCJukebox
version: 2.6.5
main: net.mcjukebox.plugin.bukkit.MCJukebox
softdepend: [WorldGuard, Skript]
commands:
jukebox:
usage: /jukebox <music/sound> <player> {options} aliases: [audio]
so i did that
and now the plugin dosent work at all
uhm, this is not quite right
there is no description
iirc plugin.yml requires description
i am incorrect
it turns out
name: MCJukebox
version: 2.6.5
main: net.mcjukebox.plugin.bukkit.MCJukebox
softdepend: [WorldGuard, Skript]
commands:
jukebox:
usage: /jukebox <music/sound> <player> {options}
aliases: [audio]
look guys
InClassTranslator doesn't require you to know how to operate bytecode
i actually wanna make my own plugins too
Hey
do i choose eclipse ida for java developers
Does anyone know how to create something like this:
InClassTranslator doesn't require you to know how to operate bytecode
@novel phoenix it is not legal to decode others bytecode according to the DMCA
@paper compass You'd have to use some math to make it work well.
some
So you know how it works?
big math
and more math
it is not legal to decode others bytecode according to the DMCA
According to DMCA?
what?
and don't mess up the angle format
or else
According to DMCA?
@novel phoenix Digital Millennium Copyright Act
well you know that other countries than USA exist?
has pex been abandoned?
where was the plugin coded? ^^
@silver pewter use luckperms
No I was just wondering because I'm making my own
And another one
wdym?
I'm just joking
How would I get it to work @vale slate
Okay
Yes
How would I get it to work @vale slate
@paper compass Are you experienced with spigot
Yeah?
instead of a single region
I guess
are you good in maths
@vagrant widget use __global__ for region name
What maths equations would I have to use really
What maths equations would I have to use really
@paper compass trigonometry
ohhhhh
What kind of problem are you having @paper compass
sqrt(a^2 + b^2) = c
No
so what option
wait
do i chooose when opening eclipse
Yes... I think this project might be a bit complicated for you to try
i see eclipse ide and eclipse ide enterprise
Just see if you can generate a circle that looks like that with one solid color using code @paper compass
Break it into steps
This screenshot doesn't represent what kind of problem do you have
There are plenty of resources online for getting block locations to create a circle
After you get that working, you'll probably understand more and can ask specific questions. It's better to ask specific questions than to ask how to do an entire project.
Yes... It's a rotating circle
It won't look smoother than 20 TPS multiplied by lag anyway
The final product, whether using math or pre-built frames, is the same
Use armorstands, mount blocks on the heads, set the rotation so they're facing all in the same direction
Move according to a rotation axis
Using basic trig
Update the facing direction too
That's probably the smoothest you'd ever get^
For a basic circle, since its 360* I will have to do a for loop for i = 0; i < 360; i++
But probably harder
right?
I mean radians or degrees, doesn't matter lol
armorstand modeling makes me cry inside itโs so tedious
You can just convert to radians for the product
Well no not really... There isn't enough of a difference between degrees to make that worth it
remember you're working with blocks
if you're working with trig just use radians
because they're much easier to visualize
inside your head
It doesn't matter
do custom block models still have limited maximum size?
I remember some random youtube recommendation video where guy made flying house using command blocks
armorstand modeling makes me cry inside itโs so tedious
@nova mural I must deal with it for nearly a month now, I'm slowly getting crazy
and I think he used like 2 or 3 custom blocks representing parts of the house
means you can probably make top half of the wheel
and bottom half of the wheel
as 2 custom blocks
and rotate 2 armorstand heads
instead of creating a huge mess
which will undoubtedly look horrible if your server isn't running perfect 20 TPS
He's probably using vanilla. Will need a bunch
I've got some entities that are made up of like 20 armorstands
No lag
I mean production servers with like 70+ players rarely run perfect TPS
@vale slate i was working on a vehicles plugin out of boredom and i literally gave up so quick, i donโt have the patience for the custom models
Nah, people invest a lot of money into custom spigots
Most of these big 200+ in-single-instance servers run extremely good
19.99 tps. Just because of garbage collection cycles
have anyone tried openj9
It's not good for minecraft. Don't bother with it
well I certainly did bother with it
They're targetting cloud, and smaller applications
and we're running a lot of instance of j9
You wont get any performance increase
Best way is to try it
my point is
With a jvm profiler
j9 GC is exceptionally fast
It doesn't do anything beneficial for a minecraft server. They don't even claim t o do that
It's not
Just use G1
G1's minecraft server's best friend
do you have any logs to back your claim?
Low latency, pretty damn high throughput
because I do
You may try GraalVM
We were running 4G instances for 100 players on J9
-Xmx4G -Xmn1G
200 players online
Also got a question:
anyone knows why this causes a IndexOutOfBoundsException ?
private List<Zone> zoneList = new ArrayList<Zone>();
@Override
public Zone get(String id) {
if(zoneList.size() == 0)
return null;
return zoneList.stream().filter(zone -> zone.getZoneID().equalsIgnoreCase(id)).collect(Collectors.toList()).get(0);
}
G1 is life
fullGC cycle was taking 40ms on average
but it only causes it if there is another zone
@peak marten resulting list may be empty?
possible yes
Ok @vale slate first test
lol
Idid
again
why?
because collect is terminal operation
Ready MFM?
@novel phoenix , what do you mean?
.collect(Collectors.toList()) returns you List that can be empty
yes
do .collect(Collectors.toList()).stream().findAny()
it should
hmm
depending on your Zone list size
you can just make Map<String, Zone>
for easy access by name
yeah , I thought about that
hmm
I might do that actually
but first of all: sorry for asking you this:
but it doesn't seem to accept this:
return zoneList.stream().filter(zone -> zone.getZoneID().equalsIgnoreCase(id)).collect(Collectors.toList()).stream().findFirst());
I'm missing something, it's syntax error
No, still not working
also findFirst() can return Optional<Zone> instead of Zone
it does indeed
that's why it doesn't work
so, any way to get that fixed?
tbh, never heard of that optional one
Streams summed up basically lmao
help please
You would get that Exception if it doesn't exist. Meaning there's 0 entries in your stream; none met the criteria you specified.
If he's trying to get index '0' in a list with no entries?
Ah my bad
ok, don't beat yourself
it should be somewhere in the settings
I can't point you in the right direction because I don't use IDEA
but google can
why is eclipse better than idea?
its not better
You should probably make it so parameter names don't show for Java classes, but keep them for dependency classes ๐ค
english please
And neither is better, it all comes down to opinion
oh ok
I prefer IntelliJ, however several other developers prefer Eclipse. It's like whether you like Pepsi or Coke better .-.
Well there's a clear winner between Pepsi and Coke
