ive been tinkering with adding abilities to custom weapons for java. temp is one ive been messing with. was thinking of making a fridge for food so maybe something like an air conditioner/furnace that will cover a set amount of blocks. add snow to an ice box wood to fireplace for a primitive lvl. have a potion planned for traveling into hot areas and a hand warmer for cold areas
Posts by james1bow
The next update will be available on Tuesday, April 29, in the early evening (UTC+2)
-
-
nice work, mine would not have looked nearly as nice
-
just a tip: if others play on your server as well i would connect via external IP. reason being is if there is an issue you will know as well.
-
a friends is trying to play unity but it loads to white screen then crashes, couldnt find logs in local only local low.
-
bit of an update. the /ap command when run from player command causes the ap listener to stop responding as well as my on listeners.
this was my fix in the case that this is ever useful to anyone else.
Code -
Untested code - just done this in notepad.
Javai can confirm this does work. thank you guys for the help. mind if i use the code?
-
Hehe that could be the smallest plugin ever
Edit: Just thought I would add this. It's probably better to use keyboard shortcuts for this as opposed to a GUI. Because using a GUI by definition will create an extra step. The player will have to open the GUI to open pnb or ap. With a keyboard shortcut (I've just used F keys in my example) the player can get straight to pnb or ap - and isn't that the objective?
I agree with the hot keys instead of gui. Finaly understand what red was talking about with the command event, still learning. As for smallest plugin. I just made one just to enable the mouse pointer for stuck open gui's.
-
I looked at doing this before, but figured it was not possible.
Would be interested to see if there was a hack to get this to work
There is one other option, you could always decompile the pnb and ap jar files. Then add an event listener (maybe a keyboard key) to launch the UI and then recompile?
i beleive this can be achieved byt using the import (
import java.awt.Robot;
import java.awt.event.KeyEvent;)
edit. works on single player but not multiplayer. i must be missing something.
try {
robot = new Robot();
robot.setAutoDelay(125);
robot.keyPress(KeyEvent.VK_T);
robot.keyRelease(KeyEvent.VK_T);
robot.keyPress(KeyEvent.VK_SLASH);
robot.keyRelease(KeyEvent.VK_SLASH);
robot.keyPress(KeyEvent.VK_A);
robot.keyRelease(KeyEvent.VK_A);
robot.keyPress(KeyEvent.VK_P);
robot.keyRelease(KeyEvent.VK_P);
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
}catch (AWTException e){e.printStackTrace();
-
I looked at doing this before, but figured it was not possible.
Would be interested to see if there was a hack to get this to work
There is one other option, you could always decompile the pnb and ap jar files. Then add an event listener (maybe a keyboard key) to launch the UI and then recompile?
thought about it but didnt feel rite messing with others code.
-
There is unfortunately no showChat method in the Java version, but it will be part of the new plugin API
If you want to send a chat message to a player, you can use the sendTextMessage() method.
The PlayerChatEvent you've linked, however, is an event, as mentioned by Minotorious : It gets triggered by the game as soon as a player sends a chat message (i.e. after he presses the Return key). At this stage, it's not visible in chat yet, so you can manipulate the chat message through the API (or cancel the event if you don't want the chat message to show up). The message from the PlayerChatEvent will be broadcasted to all players (unless you cancel the event).
thank you, was trying to make it so players didnt have type commands for /ap /pnb.
-
That method simply intercepts the chat event and alters the message if your plugin wishes to do so, for example to implement a language filter for swearing
thank you for the reply
-
Can you link the API page for this?
I can't find a setChat method?
-
trying to build a gui for players to make plugin commands clickable. will have gui with button assigned to some plugins (/ap, /pnb).
when using the setChat() method, does it just display in chat or does it enter it into chat as if typing the command and pressing enter?
-
-
Im trying to get a test usershop set up. I know the plugin works fine since the balance is shown at top. Im stuck at creating signs and I suppose linking them to chests. Can anyone explain simply how this needs to work please?
have you installed aktive signs?
if im not mistaken its [UserShop] first line capitalization must be correct as well.
-
This would take a lot of work, as you'd have to add in something to the code where it can communicate between servers. Though, I believe the code for communication between servers is already in some other plugin? Maybe they can shed more light on this.
or a central location to store a database for all servers running the plugin? as you know im just starting to learn the whole java thing. that being said, i do have some more hardware should anyone be interested in the idea enough.
-
Getting the transactions to work between them, and saving data shouldn't be too much of an issue. One way this can be done, is use Databases to Save Transactions, as well as use Databases to also handle transactions. However, using a Database to handle transactions might not be so performance friendly in the long run, unless you have it programmed so once the transaction has been handled, that entry gets cleared out of the database
now that i think about it, to be more performance friendly...if the coin is spawned(forged) its an item that can be swapped for another item(1 coin trade 1 apple). database would only be needed to know whats in the chest and at what prices.
-
Getting the transactions to work between them, and saving data shouldn't be too much of an issue. One way this can be done, is use Databases to Save Transactions, as well as use Databases to also handle transactions. However, using a Database to handle transactions might not be so performance friendly in the long run, unless you have it programmed so once the transaction has been handled, that entry gets cleared out of the database.
i think a cross server auction house would be cool as well. at a standstill on my plugin for java atm as im unsure of its future. plan on starting work on one for the unity version once there is an api
-
Does that mean he was able to destroy something inside a protected area?
According to the log, most elements were destroyed using the creative mode removal tools (F7).
The incoming CRM and ORM packets are harmless, these packets are part of the creative mode removal tools... There is an exception in the log though regarding undo handling, that seems to be a bug (but that bug isn't related to this issue).
yes he was able to destroy things, ill look into my permissions again. i went threw them a few times trying to figure out how he had done it but couldnt figure anything out. he should not have even been able to use creative tools.
edit* i can confirm he was able to brake things in a protected area and no one else even admin can not
-
james1bow i already build a little log house on your server and im acutally waited for a admin to protect it
This one.
oh ok, ill get on and find it. ive been busy latly. family just got over covid a death in the family now my father in law just had a stroke. when it rains it pours
edit* got it protected. will have to find you on sometime. more than welcome to join the discord https://discord.gg/6znXFhbB