Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Item {
- static int last = 0;
- public static boolean sell() {
- int current = 0;
- StackTraceElement[] lines = Thread.currentThread().getStackTrace();
- StackTraceElement ste = lines[2];
- current = ste.getLineNumber();
- if (last == current) return false;
- last = current;
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement